-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2nd pillar custom transfer redesign (#1321)
* FundTransferTable to TS * Initial version of custom transfer table * Fix SCSS error, improve layout alignment * Update english translations * Fix second pillar flow test * Fix more tests * Remove obsolete text check * Fix fund transfer table test * Rewrite FundTransferTable test with RTL * Fix paddings * Remove too specific test, fix test string
- Loading branch information
Showing
15 changed files
with
98 additions
and
165 deletions.
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
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
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
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
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
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
48 changes: 0 additions & 48 deletions
48
src/components/flows/secondPillar/confirmMandate/fundTransferTable/FundTransferTable.js
This file was deleted.
Oops, something went wrong.
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
64 changes: 0 additions & 64 deletions
64
src/components/flows/secondPillar/confirmMandate/fundTransferTable/FundTransferTable.spec.js
This file was deleted.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
src/components/flows/secondPillar/confirmMandate/fundTransferTable/FundTransferTable.tsx
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,49 @@ | ||
import './FundTransferTable.scss'; | ||
import { PropsWithChildren } from 'react'; | ||
import { FormattedMessage } from 'react-intl'; | ||
|
||
type Props = { | ||
selections: { | ||
sourceFundIsin: string; | ||
sourceFundName: string; | ||
targetFundName: string; | ||
targetFundIsin: string; | ||
percentage: number; | ||
}[]; | ||
}; | ||
|
||
export const FundTransferTable = ({ selections = [] }: Props) => ( | ||
<div className="fund-selections-container"> | ||
<div className="pt-3 px-3"> | ||
<FormattedMessage id="confirm.mandate.transferExisting" /> | ||
</div> | ||
{selections.map((selection, index) => ( | ||
<div key={index}> | ||
<div className="px-3 pb-3 d-flex flex-column flex-md-row justify-content-between"> | ||
<TransferDataPoint className="flex-grow-0 flex-shrink-0 fund-selections-current-fund"> | ||
<FormattedMessage id="confirm.mandate.current.fund" /> | ||
<b>{selection.sourceFundName}</b> | ||
</TransferDataPoint> | ||
<TransferDataPoint className="flex-grow-1"> | ||
<FormattedMessage id="confirm.mandate.future.fund" /> | ||
<b> | ||
<span className="highlight">{selection.targetFundName}</span> | ||
</b> | ||
</TransferDataPoint> | ||
<TransferDataPoint className="flex-grow-0 flex-shrink-0"> | ||
<FormattedMessage id="confirm.mandate.percentage" /> | ||
<b>{selection.percentage * 100}%</b> | ||
</TransferDataPoint> | ||
</div> | ||
|
||
{selections.length > 1 && index !== selections.length - 1 && ( | ||
<div className="fund-selection-divider ml-3" /> | ||
)} | ||
</div> | ||
))} | ||
</div> | ||
); | ||
|
||
const TransferDataPoint = ({ children, className }: PropsWithChildren<{ className?: string }>) => ( | ||
<div className={`pt-3 d-flex flex-column justify-start ${className ?? ''}`}>{children}</div> | ||
); |
3 changes: 0 additions & 3 deletions
3
src/components/flows/secondPillar/confirmMandate/fundTransferTable/index.js
This file was deleted.
Oops, something went wrong.
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
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
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.