ajanin #1

Merged
ajanin merged 3 commits from ajanin into cicd 2025-07-07 13:20:16 +00:00
4 changed files with 8 additions and 16 deletions
Showing only changes of commit 4b7a08534d - Show all commits

View File

@ -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);

View File

@ -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, "");
}

View File

@ -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 (

View File

@ -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);