🐛 Small fixes
This commit is contained in:
parent
6c9aa4e297
commit
3348f3ddca
@ -52,7 +52,6 @@ class DocumentNotaryClass extends React.Component<IPropsClass, IState> {
|
|||||||
private getDocumentsTitle() {
|
private getDocumentsTitle() {
|
||||||
const documentFiles = this.props.document.files?.filter((file) => !file.archived_at);
|
const documentFiles = this.props.document.files?.filter((file) => !file.archived_at);
|
||||||
if (documentFiles) {
|
if (documentFiles) {
|
||||||
console.log(this.props.document);
|
|
||||||
if (
|
if (
|
||||||
documentFiles.length === 1 &&
|
documentFiles.length === 1 &&
|
||||||
(this.props.document.document_status === EDocumentStatus.VALIDATED ||
|
(this.props.document.document_status === EDocumentStatus.VALIDATED ||
|
||||||
@ -60,7 +59,7 @@ class DocumentNotaryClass extends React.Component<IPropsClass, IState> {
|
|||||||
) {
|
) {
|
||||||
const fileName = documentFiles[0]?.file_path?.split("/").pop();
|
const fileName = documentFiles[0]?.file_path?.split("/").pop();
|
||||||
if (fileName && fileName.length > 20) {
|
if (fileName && fileName.length > 20) {
|
||||||
return `${fileName.substring(0, 7)}...${fileName.substring(fileName.length - 7, fileName.length)}`;
|
return `Nombre de documents : 1`;
|
||||||
} else {
|
} else {
|
||||||
return fileName;
|
return fileName;
|
||||||
}
|
}
|
||||||
@ -74,7 +73,7 @@ class DocumentNotaryClass extends React.Component<IPropsClass, IState> {
|
|||||||
return "Aucun document déposé";
|
return "Aucun document déposé";
|
||||||
}
|
}
|
||||||
|
|
||||||
return `${documentFileLength} documents déposés`;
|
return `Nombre de documents : ${documentFileLength}`;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return "Aucun document déposé";
|
return "Aucun document déposé";
|
||||||
|
@ -59,14 +59,19 @@ class AskDocumentsClass extends BasePage<IPropsClass, IState> {
|
|||||||
<Form onSubmit={this.onFormSubmit}>
|
<Form onSubmit={this.onFormSubmit}>
|
||||||
<div className={classes["form-container"]}>
|
<div className={classes["form-container"]}>
|
||||||
<div className={classes["checkbox-container"]}>
|
<div className={classes["checkbox-container"]}>
|
||||||
{this.state.documentTypes.map((documentType) => (
|
{this.state.documentTypes.map((documentType) => {
|
||||||
|
if (documentType.description && documentType.description.length > 1) {
|
||||||
|
return (
|
||||||
<CheckBox
|
<CheckBox
|
||||||
name="document_types"
|
name="document_types"
|
||||||
toolTip={documentType.description}
|
toolTip={documentType.description}
|
||||||
option={documentType}
|
option={documentType}
|
||||||
key={documentType.value as string}
|
key={documentType.value as string}
|
||||||
/>
|
/>
|
||||||
))}
|
);
|
||||||
|
}
|
||||||
|
return <CheckBox name="document_types" option={documentType} key={documentType.value as string} />;
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
<div className={classes["add-document-container"]}>
|
<div className={classes["add-document-container"]}>
|
||||||
<Button
|
<Button
|
||||||
@ -161,7 +166,7 @@ class AskDocumentsClass extends BasePage<IPropsClass, IState> {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
documentTypesOptions.sort((a, b) => a.label > b.label ? 1 : -1);
|
documentTypesOptions.sort((a, b) => (a.label > b.label ? 1 : -1));
|
||||||
|
|
||||||
return documentTypesOptions;
|
return documentTypesOptions;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user