Skip to content
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

feat(account): follow up demo changes kyc #14361

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
data-translate="{{'user_account_identity_documents_proof_tile_heading_' + $ctrl.proof}}"
></h4>
<p
class="d-flex align-items-center my-1 text-danger"
class="d-flex align-items-center my-1 font-weight-bold"
data-ng-if="$ctrl.extended"
data-translate="{{'user_account_identity_documents_proof_tile_extended_' + $ctrl.proof}}"
></p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"user_account_identity_documents_proof_tile_heading_vat": "Preuve de TVA",
"user_account_identity_documents_proof_tile_heading_authority_declaration": "Attestation sur l'honneur",
"user_account_identity_documents_proof_tile_text_particular_identity": "Carte Aadhaar, carte d'identité, passeport, permis de conduire, carte d'électeur indienne.",
"user_account_identity_documents_proof_tile_text_particular_address": "Carte Aadhaar, certificat GST, facture (électricité, gaz, eau, internet ou téléphone), relevé bancaire.",
"user_account_identity_documents_proof_tile_text_particular_address": "Carte Aadhaar, certificat GST (taxe sur les produits et services), facture (électricité, gaz, eau, internet ou téléphone), relevé bancaire.",
"user_account_identity_documents_proof_tile_text_non_individual_identity": "Carte Aadhaar, carte d'identité, passeport, permis de conduire, carte d'électeur indienne.",
"user_account_identity_documents_proof_tile_text_non_individual_address": "Certificat GST, facture (électricité, gaz, eau, internet ou téléphone), relevé bancaire.",
"user_account_identity_documents_proof_tile_text_non_individual_address": "Certificat GST (taxe sur les produits et services), facture (électricité, gaz, eau, internet ou téléphone), relevé bancaire.",
"user_account_identity_documents_proof_tile_text_non_individual_vat": "Certificat GST (taxe sur les produits et services)",
"user_account_identity_documents_proof_tile_text_non_individual_authority_declaration": "Document vous donnant l'autorisation d'agir au nom de la société.",
"user_account_identity_documents_proof_tile_extended_identity": "Document du représentant légal, du directeur des opérations ou de tout autre contact mentionné dans le certificat GST.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
class="my-3 w-100"
>
<div class="oui-box">
<h4
class="oui-box__heading"
<h5
class="oui-box__heading h5"
data-translate="user_account_identity_documents_details_acceptance_criteria"
></h4>
></h5>
<ul>
<li
data-ng-repeat="(index, acceptanceCriteria) in $ctrl.currentAcceptanceCriteria"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"upload-documents-details-document-type-passport": "Passeport",
"upload-documents-details-document-type-driving_licence": "Permis de conduire",
"upload-documents-details-document-type-voter_indian_id_card": "Carte d'électeur indienne",
"upload-documents-details-document-type-gst_certificate": "Certificat GST",
"upload-documents-details-document-type-gst_certificate": "Certificat GST (taxe sur les produits et services)",
"upload-documents-details-document-type-bill": "Facture (électricité, gaz, eau, internet ou téléphone)",
"upload-documents-details-document-type-bank_statement": "Relevé bancaire",
"upload-documents-details-document-type-authority_declaration": "Document vous donnant l'autorisation d'agir au nom de la société",
Expand All @@ -26,11 +26,11 @@
"upload-documents-details-acceptance-criteria-names_account": "Le nom et le prénom doivent correspondre à l'identité de votre compte client.",
"upload-documents-details-acceptance-criteria-names_address_account": "Le nom, prénom et adresse doivent correspondre aux informations figurant dans votre compte client.",
"upload-documents-details-acceptance-criteria-less_than_three": "Justificatif de moins de trois mois.",
"upload-documents-details-acceptance-criteria-address_gst": "L'adresse figurant sur le document doit correspondre à l'adresse figurant sur le certificat GST.",
"upload-documents-details-acceptance-criteria-address_gst": "L'adresse figurant sur le document doit correspondre à l'adresse figurant sur le certificat GST (taxe sur les produits et services).",
"upload-documents-details-acceptance-criteria-address_account": "L'adresse figurant sur le document doit correspondre à l'adresse du compte client.",
"upload-documents-details-acceptance-criteria-company_name_vat": "Le nom de l'entreprise et la TVA doivent être mentionnés.",
"upload-documents-details-acceptance-criteria-mandatory_names": "Votre nom, celui du représentant légal ou du directeur des opérations doivent être mentionnés.",
"upload-documents-details-acceptance-criteria-names_date_sign_gst": "Le nom, prénom, date et signature du représentant légal, du directeur des opérations ou de tout autre contact mentionné dans le certificat GST.",
"upload-documents-details-acceptance-criteria-names_date_sign_gst": "Le nom, prénom, date et signature du représentant légal, du directeur des opérations ou de tout autre contact mentionné dans le certificat GST (taxe sur les produits et services).",
"upload-documents-details-acceptance-criteria-delegate_dates": "Dates de la période de délégation",
"upload-documents-details-acceptance-criteria-accepted-formats": "Formats acceptés pour tous les documents : pdf, .png, .jpg, .jpeg",
"upload-documents-details-acceptance-criteria-maxsize": "Poids maximum pour chaque document téléchargé : 10 Mb"
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,6 @@ export const TRACKING_TASK_TAG = {
dashboard: `${TRACKING_PREFIX}::identity-files::dashboard`,
openDetailView: `${TRACKING_PREFIX}::tile::button::{{name_click}}_identity-files::{{identity-files}}`,
clickSendMyDocuments: `${TRACKING_PREFIX}::page::button::submit_identity-files`,
displayPopUpSendMyDocuments: `${TRACKING_PREFIX}::identity-files::pop-up::identity-files-sent`,
confirmSendMyDocuments: `${TRACKING_PREFIX}::pop-up::button::identity-files-sent::confirm`,
};

export const TRACKING_VARIABLES = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export default class AccountUserIdentityDocumentsController {
this.loading = false;
this.showUploadOption = true;
this.displayError = false;
this.isOpenModal = false;
this.isOpenInformationModal = false;
this.dashboardRedirectURL = this.coreURLBuilder.buildURL('hub', '');
this.user_type = USER_TYPE[this.currentUser]
Expand Down Expand Up @@ -89,18 +88,20 @@ export default class AccountUserIdentityDocumentsController {
}

uploadIdentityDocuments() {
this.trackClick(TRACKING_TASK_TAG.clickSendMyDocuments);
this.handleUploadConfirmModal(false);
this.loading = true;
this.displayError = false;
this.trackClick(TRACKING_TASK_TAG.confirmSendMyDocuments);
if (this.isValid) {
const promise = this.links
? // We cannot re call getUploadDocumentsLinks if it answered successfully, so if we already
// retrieve the links we directly try to "finalize" the procedure
this.tryToFinalizeProcedure(this.links)
: // In order to start the KYC procedure we need to request the upload links for the number of documents
// the user wants to upload
this.getUploadDocumentsLinks(Object.values(this.files).flatMap(({ files }) => files).length)
this.getUploadDocumentsLinks(
Object.values(this.files).flatMap(({ files }) => files).length,
)
// Once we retrieved the upload links, we'll try to upload them and then "finalize" the procedure creation
.then(({ data: { uploadLinks } }) => {
this.links = uploadLinks;
Expand All @@ -123,14 +124,6 @@ export default class AccountUserIdentityDocumentsController {
}
}

handleUploadConfirmModal(open) {
this.isOpenModal = open;
if (open) {
this.trackClick(TRACKING_TASK_TAG.clickSendMyDocuments);
this.trackPage(TRACKING_TASK_TAG.displayPopUpSendMyDocuments);
}
}

handleInformationModal(open) {
this.isOpenInformationModal = open;
}
Expand Down Expand Up @@ -167,11 +160,11 @@ export default class AccountUserIdentityDocumentsController {
? this.checkInvidualValidity()
: Object.keys(this.proofs).reduce(
(acc, proofType) =>
(acc &&
(this.files[proofType] ||
proofType === this.PROOF_TYPE.authority_declaration)) ||
(this.user_type === this.USER_TYPE.default &&
proofType === this.PROOF_TYPE.vat),
acc &&
(!!this.files[proofType] ||
proofType === this.PROOF_TYPE.authority_declaration ||
(this.user_type === this.USER_TYPE.default &&
proofType === this.PROOF_TYPE.vat)),
true,
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
data-variant="primary"
data-size="l"
data-disabled="$ctrl.kycStatus.status === $ctrl.KYC_STATUS.OPEN || !$ctrl.isValid || $ctrl.links"
data-on-click="$ctrl.handleUploadConfirmModal(true)"
data-on-click="$ctrl.uploadIdentityDocuments()"
>
<span
data-translate="{{:: 'user_account_identity_documents_submit' | translate}}"
Expand Down Expand Up @@ -131,7 +131,7 @@
></upload-identity-documents-confirm>
</div>
<!--legal section-->
<div class="mt-4">
<div class="mt-4" data-ng-if="$ctrl.isListView">
<small>
<p
data-translate="user_account_identity_documents_legal_info3"
Expand Down Expand Up @@ -163,9 +163,3 @@
<!--end of legal section-->
</div>
</div>
<!-- Modal confirmation after uploading documents -->
<document-upload-validation-modal
data-is-open-modal="$ctrl.isOpenInformationModal"
data-on-close="$ctrl.handleInformationModal(false)"
>
</document-upload-validation-modal>
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import ngOvhHttp from '@ovh-ux/ng-ovh-http';

import component from './user-identitiy-documents.component';
import routing from './user-identity-documents.routes';
import uploadConfirmModule from './upload-identity-documents-confirm';
import documentUploadValidationModalModule from './document-upload-validation-modal';
import uploadDocumentsProofTile from './components/identity-documents-proof-tile';
import uploadDocumentsDetail from './components/identity-documents-upload-detail';

Expand All @@ -14,8 +12,6 @@ angular
.module(moduleName, [
ngAtInternet,
ngOvhHttp,
uploadConfirmModule,
documentUploadValidationModalModule,
uploadDocumentsProofTile,
uploadDocumentsDetail,
'oui',
Expand Down
Loading