diff --git a/src/front/Components/DesignSystem/DepositDocument/classes.module.scss b/src/front/Components/DesignSystem/DepositDocument/classes.module.scss index a11de4df..f68a2dfd 100644 --- a/src/front/Components/DesignSystem/DepositDocument/classes.module.scss +++ b/src/front/Components/DesignSystem/DepositDocument/classes.module.scss @@ -92,4 +92,9 @@ display: flex; flex-direction: column; gap: 16px; +} + +.error-message { + color: var(--red-flash); + margin-top: 8px; } \ No newline at end of file diff --git a/src/front/Components/DesignSystem/DepositDocument/index.tsx b/src/front/Components/DesignSystem/DepositDocument/index.tsx index f095a1e8..21173c1d 100644 --- a/src/front/Components/DesignSystem/DepositDocument/index.tsx +++ b/src/front/Components/DesignSystem/DepositDocument/index.tsx @@ -66,94 +66,100 @@ export default class DepositDocument extends React.Component { public override render(): JSX.Element { return ( -
- -
-
- Deposit document -
-
-
- -
- {this.props.document.document_type?.name} -
- {this.props.document.document_type?.public_description !== "" && - this.props.document.document_status !== EDocumentStatus.VALIDATED && ( - - )} - {this.props.document.document_status === EDocumentStatus.VALIDATED && ( - Document check - )} -
- {this.props.document.document_status !== EDocumentStatus.VALIDATED && ( - - Sélectionnez des documents .jpg, .pdf ou .png - - )} - {this.props.document.document_history?.map((history) => ( -
{this.renderDocumentHistory(history)}
- ))} -
-
- {this.props.document.document_status !== EDocumentStatus.VALIDATED && this.state.files.length > 0 && ( -
- {this.state.files.map((file) => { - const fileObj = file.file; - if (file.archived) return; - return ( -
-
- Document check - - {this.shortName(fileObj.name)} - -
- Cross icon + <> +
+ +
+
+ Deposit document +
+
+
+ +
+ {this.props.document.document_type?.name}
- ); - })} -
- )} - {this.props.document.document_status !== EDocumentStatus.VALIDATED && ( -
- + {this.props.document.document_status !== EDocumentStatus.VALIDATED && ( + + Sélectionnez des documents .jpg, .pdf ou .png + + )} + {this.props.document.document_history?.map((history) => ( +
{this.renderDocumentHistory(history)}
+ ))} +
- )} - -
- - Votre document a été refusé pour la raison suivante : - - -
-
-
+ {this.props.document.document_status !== EDocumentStatus.VALIDATED && this.state.files.length > 0 && ( +
+ {this.state.files.map((file) => { + const fileObj = file.file; + if (file.archived) return; + return ( +
+
+ Document check + + {this.shortName(fileObj.name)} + +
+ Cross icon +
+ ); + })} +
+ )} + {this.props.document.document_status !== EDocumentStatus.VALIDATED && ( +
+ +
+ )} + +
+ + Votre document a été refusé pour la raison suivante : + + +
+
+
+ {
} + ); } diff --git a/src/front/Components/DesignSystem/UserFolder/index.tsx b/src/front/Components/DesignSystem/UserFolder/index.tsx index b3ce9b9d..2a95a9b8 100644 --- a/src/front/Components/DesignSystem/UserFolder/index.tsx +++ b/src/front/Components/DesignSystem/UserFolder/index.tsx @@ -49,7 +49,10 @@ export default class UserFolder extends React.Component { this.deleteAskedDocument = this.deleteAskedDocument.bind(this); } public override render(): JSX.Element { - const documentsAsked: Document[] | null = this.getDocumentsByStatus("ASKED"); + const documentsAsked: Document[] | null = [ + ...(this.getDocumentsByStatus("ASKED") ?? []), + ...(this.getDocumentsByStatus("REFUSED") ?? []), + ]; const otherDocuments: Document[] | null = this.getValidatedAndPendindDocuments(); const redirectPath = Module.getInstance() .get() @@ -111,9 +114,7 @@ export default class UserFolder extends React.Component { Demander un autre document{" "} - +
)}
diff --git a/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx b/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx index 677b0260..333cbad2 100644 --- a/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx +++ b/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx @@ -148,7 +148,7 @@ class ViewDocumentsClass extends BasePage { Anchoring animation
- +
)}