refactor: add group value

This commit is contained in:
Thanaphon Frappet 2024-11-12 16:01:43 +07:00
parent 22f19ca8cc
commit e70fafe203
2 changed files with 50 additions and 24 deletions

View file

@ -53,7 +53,12 @@ const props = withDefaults(
autoSave?: boolean; autoSave?: boolean;
hideAction?: boolean; hideAction?: boolean;
columns: QTableProps['columns']; columns: QTableProps['columns'];
menu?: { label: string; value: string; _meta?: Record<string, any> }[]; menu?: {
label: string;
group: string;
value: string;
_meta?: Record<string, any>;
}[];
}>(), }>(),
{}, {},
); );

View file

@ -64,60 +64,72 @@ export const countryCode = [
export const uploadFileListCustomer: { export const uploadFileListCustomer: {
label: string; label: string;
value: string; value: string;
group: string;
_meta?: Record<string, any>; _meta?: Record<string, any>;
}[] = [ }[] = [
{ {
label: 'customer.typeFile.citizenId', label: 'customer.typeFile.citizenId',
value: 'citizen', value: 'citizen',
group: 'citizen',
}, },
{ {
label: 'customer.typeFile.registrationBook', label: 'customer.typeFile.registrationBook',
value: 'house-registration', value: 'attachment',
group: 'houseRegistration',
}, },
{ {
label: 'customer.typeFile.houseMap', label: 'customer.typeFile.houseMap',
value: 'vat-registration', value: 'attachment',
group: 'vatRegistration',
}, },
{ {
label: 'customer.typeFile.businessRegistration', label: 'customer.typeFile.businessRegistration',
value: 'commercial-registration', group: 'commercialRegistration',
value: 'attachment',
}, },
{ {
label: 'customer.typeFile.dbdCertificate', label: 'customer.typeFile.dbdCertificate',
value: 'power-of-attorney', group: 'powerOfAttorney',
value: 'attachment',
}, },
{ {
label: 'customer.typeFile.vatRegistrationCertificate', label: 'customer.typeFile.vatRegistrationCertificate',
value: 'vatRegistrationCertificate', group: 'vatRegistrationCertificate',
value: 'attachment',
}, },
{ {
label: 'customer.typeFile.powerOfAttorney', label: 'customer.typeFile.powerOfAttorney',
value: 'powerOfAttorney', group: 'powerOfAttorney',
value: 'attachment',
}, },
{ {
label: 'customer.typeFile.others', label: 'customer.typeFile.others',
value: 'others', group: 'others',
value: 'attachment',
}, },
]; ];
export const uploadFileListEmployee: { export const uploadFileListEmployee: {
label: string; label: string;
group: string;
value: string; value: string;
_meta?: Record<string, any>; _meta?: Record<string, any>;
}[] = [ }[] = [
{ {
label: 'customerEmployee.fileType.passport', label: 'customerEmployee.fileType.passport',
value: 'passport', value: 'passport',
group: 'passport',
}, },
{ {
label: 'customerEmployee.fileType.visa', label: 'customerEmployee.fileType.visa',
value: 'visa', value: 'visa',
group: 'visa',
_meta: { _meta: {
number: '', number: '',
type: '', type: '',
@ -132,35 +144,43 @@ export const uploadFileListEmployee: {
}, },
{ {
label: 'customerEmployee.fileType.tm6', label: 'customerEmployee.fileType.tm6',
value: 'tm6', value: 'attachment',
group: 'tm6',
}, },
{ {
label: 'customerEmployee.fileType.workPermit', label: 'customerEmployee.fileType.workPermit',
value: 'other', value: 'attachment',
group: 'workPermit',
}, },
{ {
label: 'customerEmployee.fileType.noticeJobEmployment', label: 'customerEmployee.fileType.noticeJobEmployment',
value: 'noticeJobEmployment', value: 'attachment',
group: 'noticeJobEmployment',
}, },
{ {
label: 'customerEmployee.fileType.noticeJobEntry', label: 'customerEmployee.fileType.noticeJobEntry',
value: 'other', value: 'attachment',
group: 'noticeJobEntry',
}, },
{ {
label: 'customerEmployee.fileType.historyJob', label: 'customerEmployee.fileType.historyJob',
value: 'other', value: 'attachment',
group: 'historyJob',
}, },
{ {
label: 'customerEmployee.fileType.acceptJob', label: 'customerEmployee.fileType.acceptJob',
value: 'other', value: 'attachment',
group: 'acceptJob',
}, },
{ {
label: 'customerEmployee.fileType.receipt', label: 'customerEmployee.fileType.receipt',
value: 'other', value: 'attachment',
group: 'receipt',
}, },
{ {
label: 'customerEmployee.fileType.other', label: 'customerEmployee.fileType.other',
value: 'other', value: 'attachment',
group: 'other',
}, },
]; ];
@ -172,16 +192,17 @@ export const columnsAttachment = [
field: 'branchNo', field: 'branchNo',
}, },
{ {
name: 'document', name: 'createdAt',
align: 'center',
label: 'general.document',
field: 'attachmentName',
},
{
name: 'uploadDate',
align: 'center', align: 'center',
label: 'general.uploadDate', label: 'general.uploadDate',
field: 'uploadDate', field: 'attachmentName',
},
{
name: 'ัexpireDate',
align: 'center',
label: 'general.expirationDate',
field: 'attachmentName',
}, },
{ {