Preprod (#194)
This commit is contained in:
commit
5a7f251df7
@ -65,6 +65,18 @@ const mimeTypesAccepted: { [key: string]: IMimeTypes } = {
|
|||||||
extension: "xls",
|
extension: "xls",
|
||||||
size: 104857600, // 100MB
|
size: 104857600, // 100MB
|
||||||
},
|
},
|
||||||
|
"application/msword": {
|
||||||
|
extension: "doc",
|
||||||
|
size: 104857600, // 100MB
|
||||||
|
},
|
||||||
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
|
||||||
|
extension: "docx",
|
||||||
|
size: 104857600, // 100MB
|
||||||
|
},
|
||||||
|
"text/plain": {
|
||||||
|
extension: "txt",
|
||||||
|
size: 104857600, // 100MB
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
type IDocumentFileBase = {
|
type IDocumentFileBase = {
|
||||||
|
@ -20,7 +20,7 @@ export default function ContactBox(props: IProps) {
|
|||||||
|
|
||||||
const notaryContact = useMemo(
|
const notaryContact = useMemo(
|
||||||
() =>
|
() =>
|
||||||
folder?.stakeholders!.find((stakeholder) => stakeholder.office_role?.name === "Collaborateur")?.contact ??
|
folder?.stakeholders!.find((stakeholder) => stakeholder.office_role?.name === "Notaire")?.contact ??
|
||||||
folder?.stakeholders![0]!.contact,
|
folder?.stakeholders![0]!.contact,
|
||||||
[folder],
|
[folder],
|
||||||
);
|
);
|
||||||
|
@ -71,33 +71,17 @@ class ViewDocumentsNotaryClass extends BasePage<IPropsClass, IState> {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className={classes["file-container"]}>
|
<div className={classes["file-container"]}>
|
||||||
{this.state.selectedFile.mimetype !== "text/csv" &&
|
{this.state.selectedFile.mimetype === "application/pdf" ||
|
||||||
this.state.selectedFile.mimetype !==
|
this.state.selectedFile.mimetype === "image/jpeg" ||
|
||||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" &&
|
this.state.selectedFile.mimetype === "image/png" ||
|
||||||
this.state.selectedFile.mimetype !== "application/vnd.ms-excel" && (
|
this.state.selectedFile.mimetype === "image/jpg" ? (
|
||||||
<FilePreview
|
<FilePreview
|
||||||
href={this.state.fileBlob ? URL.createObjectURL(this.state.fileBlob) : ""}
|
href={this.state.fileBlob ? URL.createObjectURL(this.state.fileBlob) : ""}
|
||||||
fileName={this.state.selectedFile.file_name}
|
fileName={this.state.selectedFile.file_name}
|
||||||
key={this.state.selectedFile.uid}
|
key={this.state.selectedFile.uid}
|
||||||
/>
|
/>
|
||||||
)}
|
) : (
|
||||||
{this.state.selectedFile.mimetype === "text/csv" && (
|
<div className={classes["unsupported-format"]}>
|
||||||
<div className={classes["unsuported-format"]}>
|
|
||||||
<Typography typo={ETypo.TEXT_MD_REGULAR} color={ETypoColor.COLOR_GENERIC_BLACK}>
|
|
||||||
L'affichage de ce format de fichier n'est pas supporté.
|
|
||||||
</Typography>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{this.state.selectedFile.mimetype ===
|
|
||||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" && (
|
|
||||||
<div className={classes["unsuported-format"]}>
|
|
||||||
<Typography typo={ETypo.TEXT_MD_REGULAR} color={ETypoColor.COLOR_GENERIC_BLACK}>
|
|
||||||
L'affichage de ce format de fichier n'est pas supporté.
|
|
||||||
</Typography>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{this.state.selectedFile.mimetype === "application/vnd.ms-excel" && (
|
|
||||||
<div className={classes["unsuported-format"]}>
|
|
||||||
<Typography typo={ETypo.TEXT_MD_REGULAR} color={ETypoColor.COLOR_GENERIC_BLACK}>
|
<Typography typo={ETypo.TEXT_MD_REGULAR} color={ETypoColor.COLOR_GENERIC_BLACK}>
|
||||||
L'affichage de ce format de fichier n'est pas supporté.
|
L'affichage de ce format de fichier n'est pas supporté.
|
||||||
</Typography>
|
</Typography>
|
||||||
@ -144,8 +128,6 @@ class ViewDocumentsNotaryClass extends BasePage<IPropsClass, IState> {
|
|||||||
folder: true,
|
folder: true,
|
||||||
depositor: true,
|
depositor: true,
|
||||||
});
|
});
|
||||||
console.log(documentNotary);
|
|
||||||
|
|
||||||
this.setState(
|
this.setState(
|
||||||
{
|
{
|
||||||
documentNotary,
|
documentNotary,
|
||||||
|
@ -12,6 +12,7 @@ import { useCallback } from "react";
|
|||||||
import { AnchorStatus } from "../..";
|
import { AnchorStatus } from "../..";
|
||||||
import classes from "./classes.module.scss";
|
import classes from "./classes.module.scss";
|
||||||
import DeleteCustomerModal from "./DeleteCustomerModal";
|
import DeleteCustomerModal from "./DeleteCustomerModal";
|
||||||
|
import Documents from "@Front/Api/LeCoffreApi/Notary/Documents/Documents";
|
||||||
|
|
||||||
type IProps = {
|
type IProps = {
|
||||||
customer: Customer;
|
customer: Customer;
|
||||||
@ -28,8 +29,12 @@ export default function ClientBox(props: IProps) {
|
|||||||
const { isOpen: isErrorModalOpen, open: openErrorModal, close: closeErrorModal } = useOpenable();
|
const { isOpen: isErrorModalOpen, open: openErrorModal, close: closeErrorModal } = useOpenable();
|
||||||
|
|
||||||
const handleDelete = useCallback(
|
const handleDelete = useCallback(
|
||||||
(customerUid: string) => {
|
async (customerUid: string) => {
|
||||||
if (customer.documents && customer.documents.length > 0) {
|
console.log(customer);
|
||||||
|
const documents = await Documents.getInstance().get({ where: { depositor_uid: customerUid, folder_uid: folderUid } });
|
||||||
|
console.log(documents);
|
||||||
|
|
||||||
|
if (documents && documents.length > 0) {
|
||||||
closeDeleteModal();
|
closeDeleteModal();
|
||||||
openErrorModal();
|
openErrorModal();
|
||||||
return;
|
return;
|
||||||
|
@ -189,7 +189,7 @@ export default function SendDocuments() {
|
|||||||
<DragAndDrop
|
<DragAndDrop
|
||||||
name="files"
|
name="files"
|
||||||
title="Glisser ou déposer ou"
|
title="Glisser ou déposer ou"
|
||||||
description="Formats acceptés : PDF, JPG, PNG, CSV, XLSX Taille maximale : 100 Mo"
|
description="Formats acceptés : PDF, JPG, PNG, CSV, XLSX, doc, dox, txt Taille maximale : 100 Mo"
|
||||||
onChange={handleFileChange}
|
onChange={handleFileChange}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -89,33 +89,17 @@ class ViewDocumentsClass extends BasePage<IPropsClass, IState> {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className={classes["file-container"]}>
|
<div className={classes["file-container"]}>
|
||||||
{this.state.selectedFile.mimetype !== "text/csv" &&
|
{this.state.selectedFile.mimetype === "application/pdf" ||
|
||||||
this.state.selectedFile.mimetype !==
|
this.state.selectedFile.mimetype === "image/jpeg" ||
|
||||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" &&
|
this.state.selectedFile.mimetype === "image/png" ||
|
||||||
this.state.selectedFile.mimetype !== "application/vnd.ms-excel" && (
|
this.state.selectedFile.mimetype === "image/jpg" ? (
|
||||||
<FilePreview
|
<FilePreview
|
||||||
href={this.state.fileBlob ? URL.createObjectURL(this.state.fileBlob) : ""}
|
href={this.state.fileBlob ? URL.createObjectURL(this.state.fileBlob) : ""}
|
||||||
fileName={this.state.selectedFile.file_name}
|
fileName={this.state.selectedFile.file_name}
|
||||||
key={this.state.selectedFile.uid}
|
key={this.state.selectedFile.uid}
|
||||||
/>
|
/>
|
||||||
)}
|
) : (
|
||||||
{this.state.selectedFile.mimetype === "text/csv" && (
|
<div className={classes["unsupported-format"]}>
|
||||||
<div className={classes["unsuported-format"]}>
|
|
||||||
<Typography typo={ETypo.TEXT_MD_REGULAR} color={ETypoColor.COLOR_GENERIC_BLACK}>
|
|
||||||
L'affichage de ce format de fichier n'est pas supporté.
|
|
||||||
</Typography>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{this.state.selectedFile.mimetype ===
|
|
||||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" && (
|
|
||||||
<div className={classes["unsuported-format"]}>
|
|
||||||
<Typography typo={ETypo.TEXT_MD_REGULAR} color={ETypoColor.COLOR_GENERIC_BLACK}>
|
|
||||||
L'affichage de ce format de fichier n'est pas supporté.
|
|
||||||
</Typography>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{this.state.selectedFile.mimetype === "application/vnd.ms-excel" && (
|
|
||||||
<div className={classes["unsuported-format"]}>
|
|
||||||
<Typography typo={ETypo.TEXT_MD_REGULAR} color={ETypoColor.COLOR_GENERIC_BLACK}>
|
<Typography typo={ETypo.TEXT_MD_REGULAR} color={ETypoColor.COLOR_GENERIC_BLACK}>
|
||||||
L'affichage de ce format de fichier n'est pas supporté.
|
L'affichage de ce format de fichier n'est pas supporté.
|
||||||
</Typography>
|
</Typography>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user