Fix some issues
This commit is contained in:
parent
c5bf332242
commit
4b7a08534d
@ -257,7 +257,7 @@ export default class DepositOtherDocument extends React.Component<IProps, IState
|
||||
const date: Date = new Date();
|
||||
const strDate: string = `${date.getDate().toString().padStart(2, '0')}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getFullYear()}`;
|
||||
|
||||
const fileName: string = `${customer.contact.last_name}-${strDate}-APCL.${file.name.split('.').pop()}`.toUpperCase();
|
||||
const fileName: string = `aplc-${file.name.split('.')[0]}-${strDate}.${file.name.split('.').pop()}`;
|
||||
|
||||
const arrayBuffer: ArrayBuffer = event.target.result as ArrayBuffer;
|
||||
const uint8Array: Uint8Array = new Uint8Array(arrayBuffer);
|
||||
|
@ -208,7 +208,7 @@ function buildRows(
|
||||
): IRowProps[] {
|
||||
return documentsNotary.map((documentNotary) => ({
|
||||
key: documentNotary.uid ?? "",
|
||||
name: formatName(documentNotary.files?.[0]?.file_name?.split(".")?.[0] ?? "") || "_",
|
||||
name: documentNotary.files?.[0]?.file_name?.split(".")?.[0] || "_",
|
||||
sentAt: new Date(documentNotary.created_at!).toLocaleDateString(),
|
||||
// actions: <IconButton onClick={() => onDownloadFileNotary(documentNotary)} icon={<ArrowDownTrayIcon />} />,
|
||||
actions: {
|
||||
@ -228,7 +228,3 @@ function buildRows(
|
||||
},
|
||||
}));
|
||||
}
|
||||
|
||||
function formatName(text: string): string {
|
||||
return text.replace(/[^a-zA-Z0-9 ]/g, "");
|
||||
}
|
||||
|
@ -314,7 +314,7 @@ export default function DocumentTables(props: IProps) {
|
||||
},
|
||||
file: {
|
||||
sx: { width: 120 },
|
||||
content: document.files?.[0]?.file_name ?? "_",
|
||||
content: document.files?.[0]?.file_name?.split(".")?.[0] ?? "_",
|
||||
},
|
||||
actions: {
|
||||
sx: { width: 76 },
|
||||
@ -360,7 +360,7 @@ export default function DocumentTables(props: IProps) {
|
||||
},
|
||||
file: {
|
||||
sx: { width: 120 },
|
||||
content: document.files?.[0]?.file_name ?? "_",
|
||||
content: document.files?.[0]?.file_name?.split(".")?.[0] ?? "_",
|
||||
},
|
||||
actions: {
|
||||
sx: { width: 76 },
|
||||
@ -411,7 +411,7 @@ export default function DocumentTables(props: IProps) {
|
||||
},
|
||||
file: {
|
||||
sx: { width: 120 },
|
||||
content: document.files?.[0]?.file_name ?? "_",
|
||||
content: document.files?.[0]?.file_name?.split(".")?.[0] ?? "_",
|
||||
},
|
||||
actions: { sx: { width: 76 }, content: "" },
|
||||
};
|
||||
@ -428,7 +428,7 @@ export default function DocumentTables(props: IProps) {
|
||||
key: document.uid,
|
||||
document_type: {
|
||||
sx: { width: 300 },
|
||||
content: formatName(document.files?.[0]?.file_name?.split(".")?.[0] ?? "") || "_",
|
||||
content: "Autre document",
|
||||
},
|
||||
document_status: {
|
||||
sx: { width: 107 },
|
||||
@ -440,7 +440,7 @@ export default function DocumentTables(props: IProps) {
|
||||
},
|
||||
file: {
|
||||
sx: { width: 120 },
|
||||
content: document.files?.[0]?.file_name ?? "_",
|
||||
content: document.files?.[0]?.file_name?.split(".")?.[0] ?? "_",
|
||||
},
|
||||
actions: {
|
||||
sx: { width: 76 },
|
||||
@ -539,10 +539,6 @@ function getHeader(dateColumnTitle: string, isMobile: boolean): IHead[] {
|
||||
];
|
||||
}
|
||||
|
||||
function formatName(text: string): string {
|
||||
return text.replace(/[^a-zA-Z0-9 ]/g, "");
|
||||
}
|
||||
|
||||
function getTagForSentDocument(status: EDocumentNotaryStatus) {
|
||||
if (status === EDocumentNotaryStatus.SENT) {
|
||||
return (
|
||||
|
@ -83,7 +83,7 @@ export default function SendDocuments() {
|
||||
const date: Date = new Date();
|
||||
const strDate: string = `${date.getDate().toString().padStart(2, '0')}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getFullYear()}`;
|
||||
|
||||
const fileName: string = `${customer.contact.last_name}-${strDate}-APCL.${file.name.split('.').pop()}`.toUpperCase();
|
||||
const fileName: string = `aplc-${customer.contact.last_name}-${strDate}.${file.name.split('.').pop()}`;
|
||||
|
||||
const arrayBuffer: ArrayBuffer = event.target.result as ArrayBuffer;
|
||||
const uint8Array: Uint8Array = new Uint8Array(arrayBuffer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user