add openedCustomer arg
This commit is contained in:
parent
930b51c140
commit
90006e8b69
@ -21,6 +21,7 @@ export type IGetDeedTypesParams = {
|
||||
where?: {};
|
||||
include?: {};
|
||||
select?: {};
|
||||
orderBy?: {};
|
||||
};
|
||||
|
||||
export default class DeedTypes extends BaseNotary {
|
||||
|
@ -6,6 +6,7 @@ import BaseNotary from "../BaseNotary";
|
||||
export interface IGetDocumentTypesparams {
|
||||
where?: {};
|
||||
include?: {};
|
||||
orderBy?: {};
|
||||
}
|
||||
|
||||
// TODO Type getbyuid query params
|
||||
|
@ -97,7 +97,9 @@ export default class UserFolder extends React.Component<IProps, IState> {
|
||||
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!}
|
||||
|
@ -91,6 +91,9 @@ export default class DefaultDeedTypesDashboard extends React.Component<IProps, I
|
||||
where: {
|
||||
archived_at: null,
|
||||
},
|
||||
orderBy: {
|
||||
name: "asc",
|
||||
},
|
||||
};
|
||||
|
||||
const deedTypes = await DeedTypes.getInstance().get(query);
|
||||
|
@ -94,6 +94,9 @@ export default class DefaultDocumentTypesDashboard extends React.Component<IProp
|
||||
where: {
|
||||
office_uid: jwt.office_Id,
|
||||
},
|
||||
orderBy: {
|
||||
name: "asc",
|
||||
},
|
||||
});
|
||||
this.setState({ documentTypes });
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ type IProps = {
|
||||
folder: OfficeFolder;
|
||||
anchorStatus: AnchorStatus;
|
||||
getFolderCallback: () => Promise<void>;
|
||||
openedCustomer?: string;
|
||||
};
|
||||
type IState = {
|
||||
openedCustomer: string;
|
||||
@ -23,10 +24,10 @@ export default class ClientSection extends React.Component<IProps, IState> {
|
||||
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 {
|
||||
|
@ -38,6 +38,7 @@ type IPropsClass = IProps & {
|
||||
selectedFolder: OfficeFolder | null;
|
||||
getAnchoringStatus: () => Promise<void>;
|
||||
getFolderCallback: () => Promise<void>;
|
||||
openedCustomer?: string;
|
||||
};
|
||||
|
||||
type IState = {
|
||||
@ -120,6 +121,7 @@ class FolderInformationClass extends BasePage<IPropsClass, IState> {
|
||||
folder={this.props.selectedFolder}
|
||||
anchorStatus={this.props.isAnchored}
|
||||
getFolderCallback={this.props.getFolderCallback}
|
||||
openedCustomer={this.props.openedCustomer}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
@ -129,6 +131,7 @@ class FolderInformationClass extends BasePage<IPropsClass, IState> {
|
||||
folder={this.props.selectedFolder}
|
||||
anchorStatus={this.props.isAnchored}
|
||||
getFolderCallback={this.props.getFolderCallback}
|
||||
openedCustomer={this.props.openedCustomer}
|
||||
/>
|
||||
)}
|
||||
|
||||
@ -254,8 +257,8 @@ class FolderInformationClass extends BasePage<IPropsClass, IState> {
|
||||
{this.state.hasValidateAnchoring && (
|
||||
<div className={classes["document-validating-container"]}>
|
||||
<Typography typo={ITypo.P_16} color={ITypoColor.BLACK} className={classes["validate-text"]}>
|
||||
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.
|
||||
</Typography>
|
||||
<Image src={ValidateAnchoringGif} alt="Anchoring animation" className={classes["validate-gif"]} />
|
||||
</div>
|
||||
@ -413,6 +416,7 @@ export default function FolderInformation(props: IProps) {
|
||||
const [selectedFolder, setSelectedFolder] = useState<OfficeFolder | null>(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}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -175,6 +175,7 @@ class ViewDocumentsClass extends BasePage<IPropsClass, IState> {
|
||||
},
|
||||
document_type: true,
|
||||
folder: true,
|
||||
depositor: true,
|
||||
});
|
||||
this.setState(
|
||||
{
|
||||
@ -296,7 +297,7 @@ class ViewDocumentsClass extends BasePage<IPropsClass, IState> {
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user