-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DT-4910: New texts for infobox #4875
Merged
Merged
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
9846088
fix: added new links for Tampere
Dvun 33b3c11
fix: added new text in infobox with links
Dvun 182ba1c
fix: added new text in infobox with links
Dvun 67fc9ae
fix: added new translation texts
Dvun 99f7b31
fix: renamed names in config
Dvun e807d10
fix: renamed
Dvun 290cf17
fix: added new text for infobox
Dvun 7cb8c67
fix: added new text for infobox
Dvun f569001
fix: renamed nysse-ticket-limited" to train-ticket-limited"
Dvun ed2ca98
fix: new function for check pickup type
Dvun 3cb02df
fix: added mode check
Dvun 6cb1f7f
fix: fixed function to check is Rail mode or not
Dvun 22ed412
Merge branch 'v3' into DT-4910
Dvun 08845a0
fix: fixed mystic string to constants
Dvun acad2d2
fix: fixed check
Dvun ca55d23
fix: removed not needed if
Dvun 81dfc4b
fix: totally reworked infoBoxText and created with nested constants
Dvun ac037fb
fix: if statement fix and removed 2 constants for default infoText
Dvun ae21227
fix: created new InfoBox component
Dvun 28d9113
fix: infoboxtext moved to own component
Dvun 2487893
fix: fixed if statement for info box
Dvun 9c720c7
fix: renamed from InfoBox to FareDisclaimer + added defaultProps
Dvun 14043e3
fix: config method renamed
Dvun 291099d
fix: renamed config method
Dvun 798ee74
fix: renamed function name
Dvun 98260b8
fix: renamed function names and methods
Dvun f83a7c3
fix: fix
Dvun 8934ca8
fix: config update
Dvun 0954c57
fix: renamed configData to linkText
Dvun 44d211b
fix: reworked, updated function to show info text
Dvun c5d341d
fix: removed unnecessary function
Dvun dafbba7
fix: updated to more generic
Dvun f3274b1
fix: fix
Dvun 1c1b6e1
fix: fixed same text pushed many times
Dvun f575303
fix: fix code
Dvun 8ee65b8
fix: code fix
Dvun 88aad96
fix: code fix
Dvun 84758f0
fix: removed config
Dvun d8faf24
fix: updated code and config with agencyName coming inside values
Dvun a5bec27
fix: removed 'train-ticket-limited' texts
Dvun d94c436
fix: update to more generic properties
Dvun f1c717e
fix: update to more generic properties
Dvun 125255c
fix: update to more generic properties
Dvun bc3c5a5
fix: moved texts from translation.js
Dvun 7b77158
fix: fix
Dvun b9c7ed1
fix: bad update :(
Dvun 0285ffa
fix: changed propTypes
Dvun 8b6c417
fix: update
Dvun 65567b7
chore: remove redundant variables
vesameskanen 74e5f3c
fix: incorrect message id
vesameskanen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React from 'react'; | ||
import { FormattedMessage } from 'react-intl'; | ||
import PropTypes from 'prop-types'; | ||
import Icon from './Icon'; | ||
|
||
const FareDisclaimer = ({ textId, values, href = null, linkText = null }) => { | ||
return ( | ||
<div className="disclaimer-container unknown-fare-disclaimer__top"> | ||
<div className="icon-container"> | ||
<Icon className="info" img="icon-icon_info" /> | ||
</div> | ||
<div className="description-container"> | ||
<FormattedMessage id={textId} values={values} /> | ||
|
||
{href && ( | ||
<a href={href}> | ||
<FormattedMessage id={linkText} defaultMessage={linkText} /> | ||
</a> | ||
)} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
FareDisclaimer.propTypes = { | ||
textId: PropTypes.string.isRequired, | ||
values: PropTypes.oneOfType([ | ||
PropTypes.shape({ | ||
agencyName: PropTypes.string, | ||
}), | ||
PropTypes.object, | ||
]), | ||
href: PropTypes.string, | ||
linkText: PropTypes.string, | ||
}; | ||
|
||
FareDisclaimer.defaultProps = { | ||
values: {}, | ||
href: null, | ||
linkText: null, | ||
}; | ||
|
||
export default FareDisclaimer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seuraava olisi hyvä ratkaisu:
Rakenna taulukko FareDisclaimereja. Taulukoon pusketaan CallAgency yms disclaimerit, ja lisäksi n kpl mode disclaimereja. Eli iteroi kaikki legit ja katso onko käytössä leg.mode disclaimer. Jos on puske taulukkoon.
Tekstit kannattaa siirtää pois translations.txt tiedostosta config .modeDisclaimer objektiin.