Skip to content

Commit

Permalink
Aizad|Likhith/Task Appropriateness Testing Implementation (binary-com…
Browse files Browse the repository at this point in the history
…#5831)

* added verified modal component

* feat: incorporated welcome modal

* fix: integrated new user flow

* added styles to modal risk tolerance warning and cooldown warninig

* change border bottom stylings

* code cleanup

* fix cooldown warning modal styling and added to handleondecline

* feat: redirect user to POI

* remove margin at the bottom for risk tolerance modal

* added trading experience modal, ic-eu-check icon and fix stylings for verified account modal

* added completed assessment modal for existing user trading assessment flow

* feat: integrated new user flow with API

* minified svg

* fix: incorporated error modals

* ref: Code refactor

* fix: Added Cool down modal

* fix: removed console statements

* ref: API request update

* replace icon in complete assessment modal with IcCheckmarkCircle

* ref: removed commented code

* remove ic-verification-success icon from icons.js

* removed icon

* feat: Added logic to display cooldown modal

* test: verified functionality of new MF flow

* feat: incorporated welcome modal

* removed consoles

* feat: Integrated exisitng user flow

* feat: integrated exisiting user flow

* Added todos

* readded ic verification success to modal

* change function of risk tolerance modal and added displayNextPage

* feat: incorporated existing user flow

* ref: Code refactor in assessment form

* fix: Responsive CSS styles

* fix: lint errors

* fix: precommit file

* code refactor

* added stylings for responsive for mf new users signup

* ref: Modified the payload structure to be in sync with BE

* resolved: remove isMobile inside of risk-tolerance-modal

* resolved: remove isMobile inside of risk-tolerance-modal

* fix: Modified API call for Financial assessment section for All users

* fix dropdown option select issue

* resolved review comments

* reverted changes

* fix button in test modal for mobile view

* fix: account switcher

* feat: Move to next question

* fix: reverted css removal

* fix resolve issues: added .jsx, rename components for dropdown and radio, change logic for enabling next section and remove comments

* remove es-lint

* resolved duplicated keys in accordion.jsx and autocomplete.jsx

* resolved: change units from px to rem

* changed units from px to rem account-wizard.scss

* resolved: logic at trading-assessment-dropdown, shorten name in ui-store

* added new assessment section in profile settings

* fix: remove trading assessment from appstore

* added questions onto the settings page

* added trading-assessment form and stylings to both desktop and mobile

* feat: incorporated disable-withdrawal-modal

* feat: incorporated notification

* feat: re-ordered the notification list

* feat: incorporated withdrawal disable for desktop

* feat: incorporated notification for mobile

* fix: added stylings as per figma

* added functionalities to the form including submit functionalities aswell as modals

* fix issues: initial value not shownfor some fieldset

* added trading assessment into webpack and add changes to trading assessment

* Refactored Trade assessment code (#23)

* fix: resolved issues with index

* ref: refactored trade assessment code

* fix: added unique key

* Feat  new flow mf account (#24)

* fix: resolved issues with index

* ref: refactored trade assessment code

* fix: added unique key

* fix: refactored response pick

* Feat: added disable checks for assessments (#25)

* fix: resolved issues with index

* ref: refactored trade assessment code

* fix: added unique key

* fix: refactored response pick

* feat: added check to disable financial and trade assessment for not risk clients

* feat: incorporated notification (#26)

* fix: resolved issues with index

* ref: refactored trade assessment code

* fix: added unique key

* fix: refactored response pick

* feat: added check to disable financial and trade assessment for not risk clients

* feat: made changes to dialog

* changed the modal text (#27)

* fix: resolved issues with index

* ref: refactored trade assessment code

* fix: added unique key

* fix: refactored response pick

* feat: added check to disable financial and trade assessment for not risk clients

* feat: made changes to dialog

* fix: modified text content

* added reinitialize

* edit dropdown component and remove useeffect focus

* Fixed risk client check (#28)

* fix: resolved issues with index

* ref: refactored trade assessment code

* fix: added unique key

* fix: refactored response pick

* feat: added check to disable financial and trade assessment for not risk clients

* feat: made changes to dialog

* fix: modified text content

* fix: risk status flag

* Feat  new flow mf account (#29)

* fix: resolved issues with index

* ref: refactored trade assessment code

* fix: added unique key

* fix: refactored response pick

* feat: added check to disable financial and trade assessment for not risk clients

* feat: made changes to dialog

* fix: modified text content

* fix: risk status flag

* fix: css issues

* added financial assessment banner for high risk clients aswell as normalize values for financial-assessment

* remove commented line

* remove trading experience section from view for mf clients

* added is_risk_client into banner conditions  and fix client store error

* remove is_risk_client into banner conditions

* Empty-Commit

* Syncing with upstream (#30)

* fix: resolved issues with index

* ref: refactored trade assessment code

* fix: added unique key

* fix: refactored response pick

* feat: added check to disable financial and trade assessment for not risk clients

* feat: made changes to dialog

* fix: modified text content

* fix: risk status flag

* fix: css issues

* fix: added missing store state

* resolved comments in: trading-assessment-config, select-native, trading-assessment-existing-user, trading-experience-modal,account-wizard, real-account-signup,account-wizard and client-store.

* Feat  new flow mf account (#31)

* fix: resolved issues with index

* ref: refactored trade assessment code

* fix: added unique key

* fix: refactored response pick

* feat: added check to disable financial and trade assessment for not risk clients

* feat: made changes to dialog

* fix: modified text content

* fix: risk status flag

* fix: css issues

* fix: added missing store state

* fix: modified conditions

* fix: added new flag to check

* added setFinancialAndTradingAssessment inside of client-store

* added loading screen component to trading-assessment

* Feat  new flow mf account (#32)

* fix: resolved issues with index

* ref: refactored trade assessment code

* fix: added unique key

* fix: refactored response pick

* feat: added check to disable financial and trade assessment for not risk clients

* feat: made changes to dialog

* fix: modified text content

* fix: risk status flag

* fix: css issues

* fix: added missing store state

* fix: modified conditions

* fix: added new flag to check

* resolved conflict in ui-store

* replaced is_svg with is_mf in financial-assessment.jsx

* fix logic banner on financial-assessment and added cfd score inside of client-store

* Feat  new flow mf account (#33)

* fix: resolved issues with index

* ref: refactored trade assessment code

* fix: added unique key

* fix: refactored response pick

* feat: added check to disable financial and trade assessment for not risk clients

* feat: made changes to dialog

* fix: modified text content

* fix: risk status flag

* fix: css issues

* fix: added missing store state

* fix: modified conditions

* fix: added new flag to check

* resolved conflict in ui-store

* fix: added missing store

* fix: status

* Feat  new flow mf account (#34)

* fix: resolved issues with index

* ref: refactored trade assessment code

* fix: added unique key

* fix: refactored response pick

* feat: added check to disable financial and trade assessment for not risk clients

* feat: made changes to dialog

* fix: modified text content

* fix: risk status flag

* fix: css issues

* fix: added missing store state

* fix: modified conditions

* fix: added new flag to check

* resolved conflict in ui-store

* fix bug (binary-com#6154)

* yauheni/ 70488/ edit note in self-exclusion message box (binary-com#6044)

* text|edit_note_self_exclusion_message_box

* test fix

* regexp in tests fix

* accident text deleted

* popup message text fix

* text fixes

* test text query fix

Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>

* Akmal / Ignore IDV verification if client is high risk && withdrawals are locked (binary-com#4644)

* Ignore IDV verification if client is high risk

* Fix formatting

* Fix cfd-poi issue due to client store unavailability

* Fix formatting

* Merge with master

* Fix formatting

* Merge with master

* Revert "Merge with master"

This reverts commit 4bead99.

* Fix merge issues

* Chain extra condition to cover wrong status returned from BE

* Fix: wrong component shown when manual upload is triggered

* fix:tax_number_validation (binary-com#6259)

* george / rm65047 / convert routes, cashier, error-component components to TS (binary-com#6361)

* perf(cashier routes): convert csahier routes to TS

* perf(cashier routes): convert error-component to TS

* refactor(error-dialog, types): refactor error-dialog types, move error type to shared types

* perf(cashier): convert cashier to TS

* perf(types): refactor types

* refactor(routes with sub routes): refactor default subroute

* refactor(types): add/refactor server error type

* test: refactor pathname

* refactor(route types): refactor route types

* fix: fix ts error in React.Suspense

* george / rm65033 / ts migration of withdraw UI components (binary-com#6343)

* perf(cashier withdraw): convert withdrawal-verification-email to TS

* perf: add data-testid for checklist action

* perf(cashier withdraw): convert withdrawal-locked to TS

* perf(types): add types for TClinetStore

* perf(cashier withdraw): convert withdraw to TS

* perf(cashier withdraw): convert crypto-withdraw-receipt to TS

* perf(cashier withdraw): convert crypto-withdraw-form to TS

* perf(cashier withdraw): convert withdrawal to TS

* refactor(cashier withdraw): refactor array syntax (ts)

* test(cashier withdraw): remove eslint disables for tests

* update deriv go redirection link (binary-com#6386)

* Farzin/68320/Update cashier withdrawal locked status if PA already withdraw all his allowable withdrawal amount (binary-com#6032)

* fix(cashier): ✨ handle `PACommisionWithdrawalLimit` state in `CashierLocked`

* test(cashier): ✅ add test case to `CashierLocked` for `PACommisionWithdrawalLimit`

* Trigger Build

* Jim/73479/appstore-workspace-ts-fix (binary-com#6208)

* chore: update appstore tsconfig

* chore: update appstore tsconfig

* chore: add react and types/react packages to appstore

* refactor: remove unnecessary includes

* refactor: change from reexports to import -> export

* Niloofar Sadeghi / Trader Typescript configuration issue (binary-com#6275)

* fix: trader typscript configuration issue

* fix: tsc errors on trader

* Niloofar Sadeghi / Add typescript configuration on reports (binary-com#6276)

* chores: add typescript configuration on reports

* fix: remove extra paths

* fix: revert removing packages

* george / rm65041 / migrate p2p-cashier component to TS (binary-com#6177)

* refactor(p2p-cashier): migrate p2p-cashier component to TS

* commit

* perf(types): add types for notification store

* perf(types): add types for ui store

* perf(types): convert p2p-cashier to TS

* refactor(types): change RootStore type to TRootStore

* test(p2p-cashier): test fix (change wrapper order fro p2p-cashier component)

* refactor(types): refactor current_focus type

* test(p2p-cashier): remove eslint disables

* Vinu/Ts onramp cashier (binary-com#5727)

* refactor: converted on-ramp module into typescript

* refactor: included type related to store in on-ramp

* ts fix in on-ramp-provider-card.spec.tsx

* added path in tsconfig

* added path in tsconfig

* added type for react-router-dom

* added ts related change required for migrating all components (binary-com#5760)

* changed the name of data-testid in on-ramp component

* ts-migration-crypto-fiat-converter (binary-com#5796)

* Trigger build

* Update package-lock

* ts-migration-cashier-notifications (binary-com#5765)

* implemented review comments and updated branch as per latest upstream branch

* bahar/funds_protection_component-ts-migration (binary-com#5756)

* funds_protection_component-ts-migration

* remove_extra_type_file

* fix_merge_issue

* hamid/migrate-transfer-confirm-to-ts (binary-com#5815)

* Migrate TransferConfirm to TS

* Rename component in test file

* Replace Confirm with TransferConfirm in PAs

* Enhance Tests

* ts-migration-page-404 (binary-com#5766)

* corrected imports in on-ramp pages

* coreected setSideNotes type in on-ramp file

* arranged the order of imports in on-ramp

* refactor: add menu-option type to types folder in cashier

* replaced type for FormEvent in on-ramp from Types

* added types from TRootstore

* added types of TClientStore, TUiStore and TCommonStore in on-ramp

Co-authored-by: Nijil Nirmal <nijil@deriv.com>
Co-authored-by: Bahar <bahar@firstsource.tech>
Co-authored-by: Hamid <hamid@re-work.dev>

* hamid/65036/migrate-account-transfer-to-ts (binary-com#6305)

* Migrate Account Transfer to TS

* Enhance type names

* Remove eslint ignore line

* Remove generic type from useState

* trigger tests

* Fix test errors

* Change data-testid name

* Niloofar Sadeghi / Account typscript configuration issue (binary-com#6273)

* fix: account typscript configuration issue

* text: remove include comment on account tsconfig

* fix: added missing store

* Niloofar Sadeghi / Circleci issue (binary-com#6402)

* fix: circle ci issue

* fix: circle ci issue

* Niloofar Sadeghi / Add typescript to each workspace dependency (binary-com#6306)

* build: add typescript to all packages

* build: move typescript to devdependency

* add some TS configs to eslint file

* fix: conflicts

* Shayan/74388/fix ts config on cfd (binary-com#6351)

* checking circle/ci test

* removed test changes

* fix: updated tsconfig and fixed some errors

* fix: updated tsconfig and added globals.d.ts

* chore: removed experimentalsDecorators from local config

* translations: 📚 sync translations with crowdin (binary-com#6405)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* fix: status

Co-authored-by: Eduard Hrachou <107860964+eduard-deriv@users.noreply.github.com>
Co-authored-by: yauheni-kryzhyk-deriv <103182683+yauheni-kryzhyk-deriv@users.noreply.github.com>
Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
Co-authored-by: Akmal Djumakhodjaev <akmal@binary.com>
Co-authored-by: amina-deriv <84661147+amina-deriv@users.noreply.github.com>
Co-authored-by: George Usynin <103181646+george-usynin-binary@users.noreply.github.com>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>
Co-authored-by: Farzin Mirzaie <72082844+farzin-fs@users.noreply.github.com>
Co-authored-by: Jim Daniels Wasswa <104334373+jim-deriv@users.noreply.github.com>
Co-authored-by: Niloofar Sadeghi <93518187+niloo-fs@users.noreply.github.com>
Co-authored-by: vinu-deriv <100689171+vinu-deriv@users.noreply.github.com>
Co-authored-by: Nijil Nirmal <nijil@deriv.com>
Co-authored-by: Bahar <bahar@firstsource.tech>
Co-authored-by: Hamid <hamid@re-work.dev>
Co-authored-by: Shayan Khaleghparast <100833613+iman-fs@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* fix select-native placeholder prop and remove success modal from existing user TA settings page

* disabled financial assessment submenu on mobile

* change css for financial-banner on FA page

* Feat  new flow mf account (#35)

* fix: resolved issues with index

* ref: refactored trade assessment code

* fix: added unique key

* fix: refactored response pick

* feat: added check to disable financial and trade assessment for not risk clients

* feat: made changes to dialog

* fix: modified text content

* fix: risk status flag

* fix: css issues

* fix: added missing store state

* fix: modified conditions

* fix: added new flag to check

* resolved conflict in ui-store

* fix bug (binary-com#6154)

* yauheni/ 70488/ edit note in self-exclusion message box (binary-com#6044)

* text|edit_note_self_exclusion_message_box

* test fix

* regexp in tests fix

* accident text deleted

* popup message text fix

* text fixes

* test text query fix

Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>

* Akmal / Ignore IDV verification if client is high risk && withdrawals are locked (binary-com#4644)

* Ignore IDV verification if client is high risk

* Fix formatting

* Fix cfd-poi issue due to client store unavailability

* Fix formatting

* Merge with master

* Fix formatting

* Merge with master

* Revert "Merge with master"

This reverts commit 4bead99.

* Fix merge issues

* Chain extra condition to cover wrong status returned from BE

* Fix: wrong component shown when manual upload is triggered

* fix:tax_number_validation (binary-com#6259)

* george / rm65047 / convert routes, cashier, error-component components to TS (binary-com#6361)

* perf(cashier routes): convert csahier routes to TS

* perf(cashier routes): convert error-component to TS

* refactor(error-dialog, types): refactor error-dialog types, move error type to shared types

* perf(cashier): convert cashier to TS

* perf(types): refactor types

* refactor(routes with sub routes): refactor default subroute

* refactor(types): add/refactor server error type

* test: refactor pathname

* refactor(route types): refactor route types

* fix: fix ts error in React.Suspense

* george / rm65033 / ts migration of withdraw UI components (binary-com#6343)

* perf(cashier withdraw): convert withdrawal-verification-email to TS

* perf: add data-testid for checklist action

* perf(cashier withdraw): convert withdrawal-locked to TS

* perf(types): add types for TClinetStore

* perf(cashier withdraw): convert withdraw to TS

* perf(cashier withdraw): convert crypto-withdraw-receipt to TS

* perf(cashier withdraw): convert crypto-withdraw-form to TS

* perf(cashier withdraw): convert withdrawal to TS

* refactor(cashier withdraw): refactor array syntax (ts)

* test(cashier withdraw): remove eslint disables for tests

* update deriv go redirection link (binary-com#6386)

* Farzin/68320/Update cashier withdrawal locked status if PA already withdraw all his allowable withdrawal amount (binary-com#6032)

* fix(cashier): ✨ handle `PACommisionWithdrawalLimit` state in `CashierLocked`

* test(cashier): ✅ add test case to `CashierLocked` for `PACommisionWithdrawalLimit`

* Trigger Build

* Jim/73479/appstore-workspace-ts-fix (binary-com#6208)

* chore: update appstore tsconfig

* chore: update appstore tsconfig

* chore: add react and types/react packages to appstore

* refactor: remove unnecessary includes

* refactor: change from reexports to import -> export

* Niloofar Sadeghi / Trader Typescript configuration issue (binary-com#6275)

* fix: trader typscript configuration issue

* fix: tsc errors on trader

* Niloofar Sadeghi / Add typescript configuration on reports (binary-com#6276)

* chores: add typescript configuration on reports

* fix: remove extra paths

* fix: revert removing packages

* george / rm65041 / migrate p2p-cashier component to TS (binary-com#6177)

* refactor(p2p-cashier): migrate p2p-cashier component to TS

* commit

* perf(types): add types for notification store

* perf(types): add types for ui store

* perf(types): convert p2p-cashier to TS

* refactor(types): change RootStore type to TRootStore

* test(p2p-cashier): test fix (change wrapper order fro p2p-cashier component)

* refactor(types): refactor current_focus type

* test(p2p-cashier): remove eslint disables

* Vinu/Ts onramp cashier (binary-com#5727)

* refactor: converted on-ramp module into typescript

* refactor: included type related to store in on-ramp

* ts fix in on-ramp-provider-card.spec.tsx

* added path in tsconfig

* added path in tsconfig

* added type for react-router-dom

* added ts related change required for migrating all components (binary-com#5760)

* changed the name of data-testid in on-ramp component

* ts-migration-crypto-fiat-converter (binary-com#5796)

* Trigger build

* Update package-lock

* ts-migration-cashier-notifications (binary-com#5765)

* implemented review comments and updated branch as per latest upstream branch

* bahar/funds_protection_component-ts-migration (binary-com#5756)

* funds_protection_component-ts-migration

* remove_extra_type_file

* fix_merge_issue

* hamid/migrate-transfer-confirm-to-ts (binary-com#5815)

* Migrate TransferConfirm to TS

* Rename component in test file

* Replace Confirm with TransferConfirm in PAs

* Enhance Tests

* ts-migration-page-404 (binary-com#5766)

* corrected imports in on-ramp pages

* coreected setSideNotes type in on-ramp file

* arranged the order of imports in on-ramp

* refactor: add menu-option type to types folder in cashier

* replaced type for FormEvent in on-ramp from Types

* added types from TRootstore

* added types of TClientStore, TUiStore and TCommonStore in on-ramp

Co-authored-by: Nijil Nirmal <nijil@deriv.com>
Co-authored-by: Bahar <bahar@firstsource.tech>
Co-authored-by: Hamid <hamid@re-work.dev>

* hamid/65036/migrate-account-transfer-to-ts (binary-com#6305)

* Migrate Account Transfer to TS

* Enhance type names

* Remove eslint ignore line

* Remove generic type from useState

* trigger tests

* Fix test errors

* Change data-testid name

* Niloofar Sadeghi / Account typscript configuration issue (binary-com#6273)

* fix: account typscript configuration issue

* text: remove include comment on account tsconfig

* fix: added missing store

* Niloofar Sadeghi / Circleci issue (binary-com#6402)

* fix: circle ci issue

* fix: circle ci issue

* Niloofar Sadeghi / Add typescript to each workspace dependency (binary-com#6306)

* build: add typescript to all packages

* build: move typescript to devdependency

* add some TS configs to eslint file

* fix: conflicts

* Shayan/74388/fix ts config on cfd (binary-com#6351)

* checking circle/ci test

* removed test changes

* fix: updated tsconfig and fixed some errors

* fix: updated tsconfig and added globals.d.ts

* chore: removed experimentalsDecorators from local config

* translations: 📚 sync translations with crowdin (binary-com#6405)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* fix: status

* hamid/75726/missing-grey-box-side-note (binary-com#6410)

* Fix sidenote in mobile view of account-transfer

* Remove duplicate title

* Add sideNote title

Co-authored-by: Eduard Hrachou <107860964+eduard-deriv@users.noreply.github.com>
Co-authored-by: yauheni-kryzhyk-deriv <103182683+yauheni-kryzhyk-deriv@users.noreply.github.com>
Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
Co-authored-by: Akmal Djumakhodjaev <akmal@binary.com>
Co-authored-by: amina-deriv <84661147+amina-deriv@users.noreply.github.com>
Co-authored-by: George Usynin <103181646+george-usynin-binary@users.noreply.github.com>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>
Co-authored-by: Farzin Mirzaie <72082844+farzin-fs@users.noreply.github.com>
Co-authored-by: Jim Daniels Wasswa <104334373+jim-deriv@users.noreply.github.com>
Co-authored-by: Niloofar Sadeghi <93518187+niloo-fs@users.noreply.github.com>
Co-authored-by: vinu-deriv <100689171+vinu-deriv@users.noreply.github.com>
Co-authored-by: Nijil Nirmal <nijil@deriv.com>
Co-authored-by: Bahar <bahar@firstsource.tech>
Co-authored-by: Hamid <hamid@re-work.dev>
Co-authored-by: Shayan Khaleghparast <100833613+iman-fs@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* fix: failing test cases

* addded success button for TA, change modal for TA, and add new state in ui store

* remove footer message in mobile and fix scoll offset for both mobile and desktop in FA

* fix warning modal behavior on TA

* resolved: replaced { with ( in risk-tolerance-warning-modal.jsx, removed default props in mobile-dialog.jsx

* resolved: refactor code at trading-assessmnet-form.jsx and financial-assessment.jsx

* resolved: add setFinancialAndTradingAssessment in proptypes.

* resolved: change background-color name

* resolved: remove curly brackets and return statment and replaced with regular brackets. Remove size prop in Text

* resolved: change conditions to not show financial assessment tab in mobile view

* resolved: added is_trading_assessment_for_existing_user_enabled in Proptypes

* fix: incorporated review comments

* fix: incorporated review comments

* resolved: added is_svg based on compliance requirements

* resolved: replace with suggested stylings

* resolved: updated hide placeholder prop inside of select native component

* fix: localize issue

* renamed the icon

* refactor: ♻️ incorporated review comments

* resolved: change position of text and value in config file

* fix: 🎨 removed index based key for child elements

* fix: fix typo in testwarning modal and remove duplicate modals in trading assessment

* fix: remove banner after financial assessment change and remove notification from trading screen

* fix: 🐛 incorrect display of notification

* fix: refactor warning modal in trading-assessment

* resolved: change component key

* resolved: change is_risk_client --> is_risky_client based on comment

* fix: circle ci fail test

* feat: ✨ moved employment field to personal details incase of MF clients

* Revert "likhith/moved employment field to personal details incase of MF clients" (#37)

* likhith/moved employment status field (#38)

* feat: ✨ moved employment status field

* Create CNAME

* Delete CNAME

* feat: 💄 added style to highlight next section button

* perf: 💄 incorporated fied changes

* feat: 🐛 title case

* feat: 🔥 removed unwanted state

* feat: ♻️ reverted code changes of diff package

* feat: 🐛 added key prop to iterating component

* fix: 🐛 removed decorators

* feat: ♻️ incorporated review comments

* feat: ♻️ incorporated review comments

* feat: ♻️ removed extensions

* feat: ♻️ incorporated review comments

* feat: ♻️ Added comments to explain code logic

* feat: ♻️ reordered imports

* feat: ♻️ incorporated styling changes

* feat: 🐛 navigate the user to next question

* feat: 🐛 resolved logout error

* fix: add warning icon to cooldown warning modal

* fix: display correct cool down modal for new client signup

* feat: 🐛 missing warning when trading assessment values are changed

* fix: submit button not triggered in mozilla

* fix: 🚑 logic fix to trigger click event in mozilla

* fix: resolve memory leak for risk modal

* fix: move employment fieldset at the bottom

* fix: added space to remove overlapping text on fieldset

* fix: 🎨 reused component

* fix: 🎨 reused component

* fix: next and previous button fix

* fix: change employement status field in personal details page

* ci: fix circle ci issues

Co-authored-by: Likhith Kolayari <likhith@regentmarkets.com>
Co-authored-by: Likhith Kolayari <98398322+likhith-deriv@users.noreply.github.com>
Co-authored-by: Eduard Hrachou <107860964+eduard-deriv@users.noreply.github.com>
Co-authored-by: yauheni-kryzhyk-deriv <103182683+yauheni-kryzhyk-deriv@users.noreply.github.com>
Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
Co-authored-by: Akmal Djumakhodjaev <akmal@binary.com>
Co-authored-by: amina-deriv <84661147+amina-deriv@users.noreply.github.com>
Co-authored-by: George Usynin <103181646+george-usynin-binary@users.noreply.github.com>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>
Co-authored-by: Farzin Mirzaie <72082844+farzin-fs@users.noreply.github.com>
Co-authored-by: Jim Daniels Wasswa <104334373+jim-deriv@users.noreply.github.com>
Co-authored-by: Niloofar Sadeghi <93518187+niloo-fs@users.noreply.github.com>
Co-authored-by: vinu-deriv <100689171+vinu-deriv@users.noreply.github.com>
Co-authored-by: Nijil Nirmal <nijil@deriv.com>
Co-authored-by: Bahar <bahar@firstsource.tech>
Co-authored-by: Hamid <hamid@re-work.dev>
Co-authored-by: Shayan Khaleghparast <100833613+iman-fs@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>
Co-authored-by: Matin shafiei <matin@deriv.com>
Co-authored-by: System Administrator <root@Likhith-Kolayaris-MacBook-Pro-C02G8AT9MD6M.local>
  • Loading branch information
22 people committed Nov 25, 2022
1 parent e09668e commit e08387b
Show file tree
Hide file tree
Showing 56 changed files with 2,519 additions and 236 deletions.
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged --allow-empty
npx lint-staged --allow-empty
24 changes: 15 additions & 9 deletions packages/account/build/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = function (env) {
'demo-message': 'Components/demo-message',
'error-component': 'Components/error-component',
'file-uploader-container': 'Components/file-uploader-container',
'financial-assessment': 'Sections/Profile/FinancialAssessment',
'financial-assessment': 'Sections/Assessment/FinancialAssessment',
'financial-details': 'Components/financial-details',
'financial-details-config': 'Configs/financial-details-config',
'form-body': 'Components/form-body',
Expand All @@ -31,34 +31,40 @@ module.exports = function (env) {
'icon-message-content': 'Components/icon-message-content',
'leave-confirm': 'Components/leave-confirm',
'load-error-message': 'Components/load-error-message',
'personal-details': 'Components/personal-details',
'personal-details-config': 'Configs/personal-details-config',
'poa-expired': 'Components/poa/status/expired',
'poa-needs-review': 'Components/poa/status/needs-review',
'poa-status-codes': 'Components/poa/status/status-codes',
'poa-submitted': 'Components/poa/status/submitted',
'poa-unverified': 'Components/poa/status/unverified',
'poa-verified': 'Components/poa/status/verified',
'personal-details': 'Components/personal-details',
'personal-details-config': 'Configs/personal-details-config',
'poi-expired': 'Components/poi/status/expired',
'poi-missing-personal-details': 'Components/poi/missing-personal-details',
'poi-unsupported': 'Components/poi/status/unsupported',
'poi-unverified': 'Components/poi/status/unverified',
'poi-upload-complete': 'Components/poi/status/upload-complete',
'poi-verified': 'Components/poi/status/verified',
'proof-of-address-container': 'Sections/Verification/ProofOfAddress/proof-of-address-container.jsx',
'proof-of-identity': 'Sections/Verification/ProofOfIdentity/proof-of-identity.jsx',
'proof-of-identity-container': 'Sections/Verification/ProofOfIdentity/proof-of-identity-container.jsx',
'proof-of-address-container': 'Sections/Verification/ProofOfAddress/proof-of-address-container.jsx',
'proof-of-identity-config': 'Configs/proof-of-identity-config',
'proof-of-identity-form-on-signup': 'Components/poi/poi-form-on-signup',
'proof-of-identity-container-for-mt5':
'Sections/Verification/ProofOfIdentity/proof-of-identity-container-for-mt5',
'poi-poa-docs-submitted': 'Components/poi-poa-docs-submitted/poi-poa-docs-submitted.jsx',
'reset-trading-password-modal': 'Components/reset-trading-password-modal',
'risk-tolerance-warning-modal': 'Components/trading-assessment/risk-tolerance-warning-modal.jsx',
'self-exclusion': 'Components/self-exclusion',
'scrollbars-container': 'Components/scrollbars-container',
'sent-email-modal': 'Components/sent-email-modal',
'terms-of-use': 'Components/terms-of-use',
'terms-of-use-config': 'Configs/terms-of-use-config',
'proof-of-identity-config': 'Configs/proof-of-identity-config',
'proof-of-identity-form-on-signup': 'Components/poi/poi-form-on-signup',
'proof-of-identity-container-for-mt5':
'Sections/Verification/ProofOfIdentity/proof-of-identity-container-for-mt5',
'poi-poa-docs-submitted': 'Components/poi-poa-docs-submitted/poi-poa-docs-submitted.jsx',
'trading-assessment': 'Sections/Assessment/TradingAssessment',
'trading-assessment-config': 'Configs/trading-assessment-config',
'trading-assessment-new-user': 'Components/trading-assessment/trading-assessment-new-user.jsx',
'test-warning-modal': 'Components/trading-assessment/test-warning-modal.jsx',
'trading-assessment-form': 'Components/trading-assessment/trading-assessment-form.jsx',
},
mode: IS_RELEASE ? 'production' : 'development',
module: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ import {
import { Link } from 'react-router-dom';
import { localize, Localize } from '@deriv/translations';
import { getLegalEntityName, isDesktop, isMobile, routes, toMoment, PlatformContext } from '@deriv/shared';
import { getEmploymentStatusList } from 'Sections/Assessment/FinancialAssessment/financial-information-list';
import { splitValidationResultTypes } from '../real-account-signup/helpers/utils';
import FormSubHeader from '../form-sub-header';
import classNames from 'classnames';

const DateOfBirthField = props => (
<Field name={props.name}>
Expand Down Expand Up @@ -161,7 +163,7 @@ const PersonalDetails = ({
onSubmit(getCurrentStep() - 1, values, actions.setSubmitting, goToNextStep);
}}
>
{({ handleSubmit, errors, setFieldValue, touched, values, handleChange, handleBlur }) => (
{({ handleSubmit, errors, setFieldValue, setFieldTouched, touched, values, handleChange, handleBlur }) => (
<AutoHeightWrapper default_height={380} height_offset={isDesktop() ? 81 : null}>
{({ setRef, height }) => (
<form
Expand Down Expand Up @@ -538,6 +540,44 @@ const PersonalDetails = ({
{warning_items?.tax_identification_number && (
<div className='details-form__tin-warn-divider' />
)}
{'employment_status' in props.value && (
<fieldset
className={classNames('account-form__fieldset', 'emp-status')}
>
<DesktopWrapper>
<Dropdown
placeholder={localize('Employment status')}
is_align_text_left
name='employment_status'
list={getEmploymentStatusList()}
value={values.employment_status}
onChange={handleChange}
handleBlur={handleBlur}
error={
touched.employment_status &&
errors.employment_status
}
/>
</DesktopWrapper>
<MobileWrapper>
<SelectNative
placeholder={localize('Please select')}
name='employment_status'
label={localize('Employment status')}
list_items={getEmploymentStatusList()}
value={values.employment_status}
error={
touched.employment_status &&
errors.employment_status
}
onChange={e => {
setFieldTouched('employment_status', true);
handleChange(e);
}}
/>
</MobileWrapper>
</fieldset>
)}
{'tax_identification_confirm' in props.value && (
<Checkbox
name='tax_identification_confirm'
Expand Down
4 changes: 4 additions & 0 deletions packages/account/src/Components/trading-assessment/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export { default as TradingAssessmentNewUser } from './trading-assessment-new-user.jsx';
export { default as RiskToleranceWarningModal } from './risk-tolerance-warning-modal.jsx';
export { default as TestWarningModal } from './test-warning-modal.jsx';
export { default as TradingAssessmentForm } from './trading-assessment-form.jsx';
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import React from 'react';
import { Button, DesktopWrapper, Icon, MobileDialog, MobileWrapper, Modal, Text } from '@deriv/components';
import { localize } from '@deriv/translations';

const RiskToleranceWarningModal = ({ show_risk_modal, onClick, title, button_text, body_content, has_icon }) => {
return (
<React.Fragment>
<MobileWrapper>
<MobileDialog
portal_element_id='modal_root'
visible={show_risk_modal}
title={title}
wrapper_classname='risk-acceptance'
has_close_icon={false}
>
<Icon icon='IcRedWarning' size={65} />
<Text as='p' size='xs' align='center' line_height='l'>
{body_content}
</Text>
<Button type='button' large text={button_text || localize('OK')} primary onClick={onClick} />
</MobileDialog>
</MobileWrapper>
<DesktopWrapper>
<Modal
width='44rem'
height={has_icon ? '44rem' : '37.4rem'}
title={title}
is_open={show_risk_modal}
has_close_icon={false}
className='center-risk-modal'
>
<Modal.Body>
{has_icon && <Icon icon='IcRedWarning' size={63} />}
<Text as='p' size='xs' align='center' line_height='0.24rem' className='risk-acceptance__text'>
{body_content}
</Text>
</Modal.Body>
<Modal.Footer>
<Button type='button' large text={button_text || localize('OK')} primary onClick={onClick} />
</Modal.Footer>
</Modal>
</DesktopWrapper>
</React.Fragment>
);
};

export default RiskToleranceWarningModal;
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import React from 'react';
import { DesktopWrapper, MobileDialog, MobileWrapper, Modal } from '@deriv/components';
import { localize } from '@deriv/translations';

const TestWarningModal = ({ show_risk_modal, body_content, footer_content }) => (
<React.Fragment>
<MobileWrapper>
<MobileDialog
wrapper_classname='test-warning'
portal_element_id='modal_root'
visible={show_risk_modal}
title={localize('Appropriateness Test Warning')}
has_close_icon={false}
>
<Modal.Body>{body_content}</Modal.Body>
<Modal.Footer>{footer_content}</Modal.Footer>
</MobileDialog>
</MobileWrapper>
<DesktopWrapper>
<Modal
width='44rem'
has_close_icon={false}
title={localize('Appropriateness Test Warning')}
is_open={show_risk_modal}
>
<Modal.Body>{body_content}</Modal.Body>
<Modal.Footer>{footer_content}</Modal.Footer>
</Modal>
</DesktopWrapper>
</React.Fragment>
);

export default TestWarningModal;
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import React from 'react';
import { Field } from 'formik';
import { DesktopWrapper, Dropdown, MobileWrapper, Text, SelectNative } from '@deriv/components';
import { localize } from '@deriv/translations';

const TradingAssessmentDropdown = ({ item_list, onChange, values, setFieldValue, setEnableNextSection }) => {
React.useEffect(() => {
checkIfAllFieldsFilled();
}, [values]);

const checkIfAllFieldsFilled = () => {
if (values) {
setEnableNextSection(
values.cfd_experience &&
values.cfd_frequency &&
values.trading_experience_financial_instruments &&
values.trading_frequency_financial_instruments
);
}
};

return (
<div className='trading-assessment__wrapper__dropdown'>
{item_list.map(question => (
<Field name={question.form_control} key={question.form_control}>
{() => {
return (
<React.Fragment>
<DesktopWrapper>
<Dropdown
classNameDisplay='trading-assessment__wrapper__dropdown--mobile--display'
is_align_text_left
name={question?.question_text}
placeholder={question?.question_text}
list={question?.answer_options}
onChange={e => onChange(e, question.form_control, setFieldValue)}
value={values[question.form_control]}
/>
</DesktopWrapper>
<MobileWrapper>
<Text as='h1' color='prominent' weight='bold' size='xs'>
{question?.question_text}
</Text>
<SelectNative
placeholder={localize('Please select')}
label={localize('Please select')}
name={question?.question_text}
list_items={question?.answer_options}
onChange={e => {
onChange(e, question.form_control, setFieldValue);
}}
value={values[question.form_control]}
hide_top_placeholder
/>
</MobileWrapper>
</React.Fragment>
);
}}
</Field>
))}
</div>
);
};

export default TradingAssessmentDropdown;
Loading

0 comments on commit e08387b

Please sign in to comment.