Archive an unanchored folder
This commit is contained in:
parent
8da8b1139a
commit
b7d49f022c
Binary file not shown.
@ -65,6 +65,7 @@ class FolderInformationClass extends BasePage<IPropsClass, IState> {
|
|||||||
this.openArchivedModal = this.openArchivedModal.bind(this);
|
this.openArchivedModal = this.openArchivedModal.bind(this);
|
||||||
this.closeArchivedModal = this.closeArchivedModal.bind(this);
|
this.closeArchivedModal = this.closeArchivedModal.bind(this);
|
||||||
this.onArchivedModalAccepted = this.onArchivedModalAccepted.bind(this);
|
this.onArchivedModalAccepted = this.onArchivedModalAccepted.bind(this);
|
||||||
|
this.onPreventArchiveModalAccepted = this.onPreventArchiveModalAccepted.bind(this);
|
||||||
this.getCompletionNumber = this.getCompletionNumber.bind(this);
|
this.getCompletionNumber = this.getCompletionNumber.bind(this);
|
||||||
this.onArchivedDescriptionInputChange = this.onArchivedDescriptionInputChange.bind(this);
|
this.onArchivedDescriptionInputChange = this.onArchivedDescriptionInputChange.bind(this);
|
||||||
this.deleteFolder = this.deleteFolder.bind(this);
|
this.deleteFolder = this.deleteFolder.bind(this);
|
||||||
@ -198,6 +199,25 @@ class FolderInformationClass extends BasePage<IPropsClass, IState> {
|
|||||||
onChange={this.onArchivedDescriptionInputChange}
|
onChange={this.onArchivedDescriptionInputChange}
|
||||||
/>
|
/>
|
||||||
</Confirm>
|
</Confirm>
|
||||||
|
<Confirm
|
||||||
|
isOpen={this.state.isPreventArchiveModalOpen}
|
||||||
|
onAccept={this.onPreventArchiveModalAccepted}
|
||||||
|
onClose={this.closePreventArchiveModal}
|
||||||
|
closeBtn
|
||||||
|
header={"Archiver le dossier"}
|
||||||
|
cancelText={"Annuler"}
|
||||||
|
confirmText={"Archiver"}>
|
||||||
|
<div className={classes["modal-title"]}>
|
||||||
|
<Typography typo={ITypo.P_16}>
|
||||||
|
Vous êtes en train d’archiver le dossier sans avoir l’ancré, êtes-vous sûr de vouloir le faire ?
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
<TextAreaField
|
||||||
|
name="archived_description"
|
||||||
|
placeholder="Description"
|
||||||
|
onChange={this.onArchivedDescriptionInputChange}
|
||||||
|
/>
|
||||||
|
</Confirm>
|
||||||
<Confirm
|
<Confirm
|
||||||
isOpen={this.state.isVerifDeleteModalVisible}
|
isOpen={this.state.isVerifDeleteModalVisible}
|
||||||
onAccept={this.deleteFolder}
|
onAccept={this.deleteFolder}
|
||||||
@ -230,22 +250,6 @@ class FolderInformationClass extends BasePage<IPropsClass, IState> {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<Confirm
|
|
||||||
isOpen={this.state.isPreventArchiveModalOpen}
|
|
||||||
onAccept={this.closePreventArchiveModal}
|
|
||||||
onClose={this.closePreventArchiveModal}
|
|
||||||
closeBtn
|
|
||||||
header={"Vous devez valider et ancrer un dossier avant de pouvoir l'archiver"}
|
|
||||||
cancelText={"Annuler"}
|
|
||||||
confirmText={"J'ai compris"}>
|
|
||||||
<div className={classes["modal-title"]}>
|
|
||||||
<Typography typo={ITypo.P_16}>
|
|
||||||
Pour valider un dossier, toutes les pièces envoyées par vos clients doivent être validées (vert). Si certains
|
|
||||||
documents sont en attente (orange), alors, veuillez les valider ou les refuser et veillez à ce qu'aucun document
|
|
||||||
ne soit encore en demandé au client (gris)
|
|
||||||
</Typography>
|
|
||||||
</div>
|
|
||||||
</Confirm>
|
|
||||||
<Confirm
|
<Confirm
|
||||||
isOpen={this.state.isValidateModalVisible}
|
isOpen={this.state.isValidateModalVisible}
|
||||||
onClose={this.closeModal}
|
onClose={this.closeModal}
|
||||||
@ -423,6 +427,13 @@ class FolderInformationClass extends BasePage<IPropsClass, IState> {
|
|||||||
this.closeArchivedModal();
|
this.closeArchivedModal();
|
||||||
this.props.router.push(Module.getInstance().get().modules.pages.Folder.props.path);
|
this.props.router.push(Module.getInstance().get().modules.pages.Folder.props.path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async onPreventArchiveModalAccepted() {
|
||||||
|
if (!this.props.selectedFolder) return;
|
||||||
|
await Folders.getInstance().archive(this.props.selectedFolder.uid ?? "", this.state.inputArchivedDescripton);
|
||||||
|
this.closePreventArchiveModal();
|
||||||
|
this.props.router.push(Module.getInstance().get().modules.pages.Folder.props.path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function FolderInformation(props: IProps) {
|
export default function FolderInformation(props: IProps) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user