Skip to content

Commit

Permalink
feat(account): backport account code from dedicated
Browse files Browse the repository at this point in the history
ref: MANAGER-14722

Signed-off-by: Jacques Larique <[email protected]>
  • Loading branch information
Jacques Larique committed Jan 10, 2025
1 parent b2d6293 commit 4a3efbf
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,15 @@ const replaceTrackingParams = (hit, params) => {

export default class AccountUserIdentityDocumentsController {
/* @ngInject */
constructor($q, $http, $scope, coreConfig, coreURLBuilder, atInternet) {
constructor(
$injector,
$q,
$http,
$scope,
coreConfig,
coreURLBuilder,
atInternet,
) {
this.$q = $q;
this.$http = $http;
this.$scope = $scope;
Expand Down Expand Up @@ -62,6 +70,9 @@ export default class AccountUserIdentityDocumentsController {
this.proofs = this.DOCUMENTS_MATRIX[this.user_type]?.proofs;
this.selectProofType(null);
this.trackPage(TRACKING_TASK_TAG.dashboard);
// We are storing the information that the KYC India modal validation has been displayed, that way we won't
// display it on the next connection
localStorage.setItem('KYC_INDIA_IDENTITY_DOCUMENTS_MODAL', 'true');
}

selectProofType(proof) {
Expand Down Expand Up @@ -127,6 +138,16 @@ export default class AccountUserIdentityDocumentsController {
this.isOpenInformationModal = open;
}

closeInformationModal() {
this.handleInformationModal(false);
// We try to notify the container that the action required by the KYCIndiaModal has been done
// and we can switch to the next one if necessary
if (this.$injector.has('shellClient')) {
const shellClient = this.$injector.get('shellClient');
shellClient.ux.notifyModalActionDone();
}
}

addDocuments(proofType, documentType, files, isReset) {
if (isReset) {
delete this.files[proofType];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,6 @@
<!-- Modal confirmation after uploading documents -->
<document-upload-validation-modal
data-is-open-modal="$ctrl.isOpenInformationModal"
data-on-close="$ctrl.handleInformationModal(false)"
data-on-close="$ctrl.closeInformationModal()"
>
</document-upload-validation-modal>

0 comments on commit 4a3efbf

Please sign in to comment.