From 90006e8b69cc5545ead839a33e99bf75276381f1 Mon Sep 17 00:00:00 2001 From: OxSaitama Date: Thu, 12 Oct 2023 23:18:47 +0200 Subject: [PATCH] add openedCustomer arg --- src/front/Api/LeCoffreApi/Notary/DeedTypes/DeedTypes.ts | 1 + .../LeCoffreApi/Notary/DocumentTypes/DocumentTypes.ts | 1 + src/front/Components/DesignSystem/UserFolder/index.tsx | 4 +++- .../LayoutTemplates/DefaultDeedTypeDashboard/index.tsx | 3 +++ .../DefaultDocumentTypesDashboard/index.tsx | 3 +++ .../Folder/FolderInformation/ClientSection/index.tsx | 5 +++-- .../Layouts/Folder/FolderInformation/index.tsx | 9 +++++++-- .../Components/Layouts/Folder/ViewDocuments/index.tsx | 3 ++- 8 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/front/Api/LeCoffreApi/Notary/DeedTypes/DeedTypes.ts b/src/front/Api/LeCoffreApi/Notary/DeedTypes/DeedTypes.ts index 5c051ef4..d4171d2b 100644 --- a/src/front/Api/LeCoffreApi/Notary/DeedTypes/DeedTypes.ts +++ b/src/front/Api/LeCoffreApi/Notary/DeedTypes/DeedTypes.ts @@ -21,6 +21,7 @@ export type IGetDeedTypesParams = { where?: {}; include?: {}; select?: {}; + orderBy?: {}; }; export default class DeedTypes extends BaseNotary { diff --git a/src/front/Api/LeCoffreApi/Notary/DocumentTypes/DocumentTypes.ts b/src/front/Api/LeCoffreApi/Notary/DocumentTypes/DocumentTypes.ts index 3737ddf3..f73255e3 100644 --- a/src/front/Api/LeCoffreApi/Notary/DocumentTypes/DocumentTypes.ts +++ b/src/front/Api/LeCoffreApi/Notary/DocumentTypes/DocumentTypes.ts @@ -6,6 +6,7 @@ import BaseNotary from "../BaseNotary"; export interface IGetDocumentTypesparams { where?: {}; include?: {}; + orderBy?: {}; } // TODO Type getbyuid query params diff --git a/src/front/Components/DesignSystem/UserFolder/index.tsx b/src/front/Components/DesignSystem/UserFolder/index.tsx index 0ff66682..14db0ac8 100644 --- a/src/front/Components/DesignSystem/UserFolder/index.tsx +++ b/src/front/Components/DesignSystem/UserFolder/index.tsx @@ -97,7 +97,9 @@ export default class UserFolder extends React.Component { documents={documentsAsked} title="Documents demandés" subtitle={ - documentsAsked && documentsAsked?.length === 0 ? "Vous n'avez pas encore demandé de documents" : "" + documentsAsked && documentsAsked?.length === 0 + ? "Vous n'avez pas encore demandé de documents" + : "Un mail de demande de documents a été envoyé pour ces documents :" } openDeletionModal={this.openDeletionModal} folderUid={this.props.folder.uid!} diff --git a/src/front/Components/LayoutTemplates/DefaultDeedTypeDashboard/index.tsx b/src/front/Components/LayoutTemplates/DefaultDeedTypeDashboard/index.tsx index b68bc64c..130e237e 100644 --- a/src/front/Components/LayoutTemplates/DefaultDeedTypeDashboard/index.tsx +++ b/src/front/Components/LayoutTemplates/DefaultDeedTypeDashboard/index.tsx @@ -91,6 +91,9 @@ export default class DefaultDeedTypesDashboard extends React.Component Promise; + openedCustomer?: string; }; type IState = { openedCustomer: string; @@ -23,10 +24,10 @@ export default class ClientSection extends React.Component { public constructor(props: IProps) { super(props); this.state = { - openedCustomer: "", + openedCustomer: this.props.openedCustomer ?? "", }; - this.changeUserFolder = this.changeUserFolder.bind(this); + this.renderCustomerFolders = this.renderCustomerFolders.bind(this); } public override render(): JSX.Element { diff --git a/src/front/Components/Layouts/Folder/FolderInformation/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/index.tsx index 2a17a3b7..1fe3c76f 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/index.tsx @@ -38,6 +38,7 @@ type IPropsClass = IProps & { selectedFolder: OfficeFolder | null; getAnchoringStatus: () => Promise; getFolderCallback: () => Promise; + openedCustomer?: string; }; type IState = { @@ -120,6 +121,7 @@ class FolderInformationClass extends BasePage { folder={this.props.selectedFolder} anchorStatus={this.props.isAnchored} getFolderCallback={this.props.getFolderCallback} + openedCustomer={this.props.openedCustomer} /> )} @@ -129,6 +131,7 @@ class FolderInformationClass extends BasePage { folder={this.props.selectedFolder} anchorStatus={this.props.isAnchored} getFolderCallback={this.props.getFolderCallback} + openedCustomer={this.props.openedCustomer} /> )} @@ -254,8 +257,8 @@ class FolderInformationClass extends BasePage { {this.state.hasValidateAnchoring && (
- Vous pouvez désormais télécharger les feuilles d'ancrage et les mettre dans la GED de votre logiciel de - rédaction d'acte. + Veuillez revenir sur le dossier dans 5 minutes et rafraîchir la page pour télécharger le dossier de + preuve d'ancrage et le glisser dans la GED de votre logiciel de rédaction d'acte. Anchoring animation
@@ -413,6 +416,7 @@ export default function FolderInformation(props: IProps) { const [selectedFolder, setSelectedFolder] = useState(null); let { folderUid } = router.query; + const customerUid = router.query["customerUid"] as string | undefined; folderUid = folderUid as string; const getAnchoringStatus = useCallback(async () => { @@ -481,6 +485,7 @@ export default function FolderInformation(props: IProps) { selectedFolder={selectedFolder} getAnchoringStatus={getAnchoringStatus} getFolderCallback={getFolder} + openedCustomer={customerUid} /> ); } diff --git a/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx b/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx index b84a18ec..f78a5fdd 100644 --- a/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx +++ b/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx @@ -175,6 +175,7 @@ class ViewDocumentsClass extends BasePage { }, document_type: true, folder: true, + depositor: true, }); this.setState( { @@ -296,7 +297,7 @@ class ViewDocumentsClass extends BasePage { this.props.router.push( Module.getInstance() .get() - .modules.pages.Folder.pages.FolderInformation.props.path.replace("[folderUid]", this.props.folderUid), + .modules.pages.Folder.pages.FolderInformation.props.path.replace("[folderUid]", this.props.folderUid) + '?customerUid=' + this.state.document?.depositor?.uid, ); } catch (e) { console.error(e);