Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WALL] aum / WALL-4454 / refactor-poi-poa-flow-controller (deriv-com#…
…15773) * chore: initial commit * feat: base components + inital setup * refactor: TaxInformation module - Moved PersonalDetails to modules as TaxInformation. - Refactored TaxInformation with Formik and FormField * refactor: validation logic for tin number * refactor: PoaScreen to Poa module - renamed PoaScreen to Poa module - refactored AddressSection with Formik and moved it to accounts/modules * feat: added FormDropdown component * refactor: DocumentSubmission component for Poa - Moved DocumentSubmission from account/screens to accounts/modules/Poa/components - Refactored it to make use of Formik - Completed Poa flow with API calls for updating address details and uploading poa document * chore: deleted old components from screens * refactor: converted IDVDocumentUpload to IDVService - Moved IDVDocumentUpload from account/screens to IDVService in account/modules - Refactored it by moving all the logic to useIDVService hook and make use of FormField - Removed IDVDocumentUpload from account/screens * refactor: converted VerifyDocumentDetails to VerifyPersonalDetails - Moved VerifyDocumentDetails as VerifyPersonalDetails - Refactored it by moving all logic to useVerifyPersonalDetails hook and using FormField * feat: Added error handling for VerifyPersonalDetails through useIDVService hook * feat: VerifyPersonalDetails - added error handling and ErrorMessage component * refactor: useVerifyPersonalDetails and useIDVService - Done to separate responsibilities for IDVService and VerifyPersonalDetails - Moved hooks, utils, types to their respective folders for both * refactor: Moved Onfido from cfd to accounts - Moved Onfido from features/cfd/screens to features/accounts/modules/DocumentService/components - Refactored it to use FormField - Moved all the UI logic to useOnfidoService hook * feat: added logic for ClientVerification * refactor: moved UI and API logic for TaxInformation to useTaxInformation hook * refactor: converted PoiPoaDocsSubmitted to ResubmissionSuccessMessage * refactor: converted PoiUploadError to UploadErrorMessage * refactor: ManualService setup + PassportUpload setup * refactor: SelfieUpload setup + usePassportUpload hook * refactor: replace Loader with deriv-com/ui * refactor: setup DrivingLicenseUpload * refactor: more setup for all Manual flows * refactor: setup for DocumentService and removed onfido component hook * feat: added disableAnimation prop form ModalStepWrapper * fix: bad import failing build * refactor: fix DatePicker and replace button with deriv-com-ui in Dropzone * fix: styles for PassportUpload and DocumentRules mapper * refactor: connect PassportUpload and SelfieUpload + styling * feat: added documentIssuingCountry prop from Manual POI components * refactor: added validation schemas for manual forms * fix: file upload for passport and selfie * refactor: move Poa logic to usePoa hook * fix: conflicts with master for WalletsDropdown and Loader * refactor: applied same method as passport upload to all the other manual upload forms * fix: desktop styles for manual components * fix: show manual document selection on retry after failed upload in manual flow * fix: added documentNumber param to selfie upload - added documentNumber param to be uploaded with selfie - helps identifying the selfie for a particular document * feat: added error screen for duplicate POA document upload * feat: added onCompletion for ManualService and handle resubmission logic in ClientVerification * refactor: moved validator to separate file and implemented form Footer * fix: isUploading logic for manual upload hooks * fix: behavior and styling issues of base components - set isInvalid when error for DatePicker - fix height for error message in Dropzone - set hasTouched onBlur for FormField to show error after touched * style: fixed height for input-group and fixed width for divider in manual components * refactor: expiryDateValidator and remove validations file * fix: return null after invoking onCompletion for Manual flows - this also fixed the warning react state update after unmount * fix: VerifyPersonalDetails checkbox not triggering submission * feat: added controller logic for DocumentService - also completed IDVService submission * chore: bump deriv-com/ui version from 1.29.3 to 1.29.9 * fix: errorMessage shown on initial focus * refactor: use Dropdown from ui library for FormDropdown - Also removed WalletDropdown * refactor: use FormDropdown in IDVService and added case for clients without docs * refactor: replaced Verification.tsx with ClientVerification.tsx * chore: remove accounts/screens folder * fix: minor fixes * fix: document resubmission * chore: remove unused unit tests * chore: reset unwanted files with master * fix: FormDropdown implementation * fix: autocomplete for FormField and DatePicker * chore: remove empty files * chore: clean up in IDVService * chore: added documentation for usePoa hook * chore: update versions for deriv-com/ui and deriv-com/translations * fix: FormField crashing upon field value length check and PoaUploadErrorMessage icon dims * fix: NIMC not showing due to invalid config and style fixes * chore: some cleanup * fix: IDVService crash on example selection * refactor: improve errorMessage obj for IDV submission errors * fix: IDV document type selection dropdown and example for document number field * feat: changed minimum issuing period message for POA of MF clients * chore: apply comments * fix: FormDropdown issue for TaxResidence * fix: Dropzone styling for Poa * feat: draft 1 useDocumentUpload * refactor: replace useDocumentUpload with useDocumentUploadv2 * fix: useOnfido unit test * chore: applied comments * fix: sonar issue * fix: types for useDocumentUpload * refactor: new impl of useDocumentUpload in PassportUpload and SelfieUpload * fix: DuplicateDocument error * refactor: impl new useDocumentUpload in IdentityUpload * refactor: impl of useDocumentUpload for DrivingLicenseUpload * refactor: impl new useDocumentUpload for NIMCSlipUpload * fix: search for FormDropdown * refactor: impl new useDocumentUpload for Poa * fix: ci checks * fix: sonarcloud issues * fix: more sonarcloud issues * chore: applied suggestions * refactor: replace type TDocumentUploadStatus with enum DocumentUploadStatus * feat: make changes for tablet view * feat: added localization Footer and Manual flows * feat: added localization for VerifyPersonalDetails * feat: added localization for IDV * feat: added localization for Onfido * feat: added localization for POA * feat: added localization for TaxInformation * fix: type error for availableDocumentOptions useIDVService * feat: added localization for ClientVerification * feat: convert maps to getters for localization * fix: revert suggestion to return values instead of promises in useDocumentUpload * refactor: convert validation schemas to getters for localization * chore: comment change * fix: put onCompletion inside useEffect to trigger only on success * refactor: remove file deletion for useDocumentUpload * chore: add translations to ResubmissionSuccessMessage component * refactor: move SelectedDocument component out of ManualService * fix: replace localization of template literals with template objects in localize function * fix: localize function with template literals * fix: color and pointer for disabled dates in DatePicker * fix: validation for manual document number field * feat: custom error message for exceeding file size in dropzone * fix: client unable to create 2nd MT5 account after POI-POA * fix: dropzone test case * fix: added check for previous poi submission to stop showing onfido after idv success
- Loading branch information