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