jws-frontend/src/pages/03_customer-management/constant.ts

336 lines
6 KiB
TypeScript
Raw Normal View History

2024-08-02 13:58:44 +07:00
import { QTableProps } from 'quasar';
2024-10-01 11:36:17 +07:00
export const dialogCreateCustomerItem = [
{
icon: 'mdi:office-building',
text: 'customer.employerLegalEntity',
iconColor: '--purple-10',
color: 'var(--purple-8-hsl)',
},
{
icon: 'heroicons:user-solid',
text: 'customer.employerNaturalPerson',
iconColor: '--green-11',
color: 'var(--green-9-hsl)',
},
];
export const formMenuIcon = <
{ icon: string; color: string; bgColor: string }[]
>[
{
icon: 'mdi-office-building-outline',
color: 'hsl(var(--info-bg))',
bgColor: 'var(--surface-1)',
},
{
icon: 'mdi-briefcase-outline',
color: 'hsl(var(--info-bg))',
bgColor: 'var(--surface-1)',
},
];
2024-08-29 17:00:12 +07:00
export const countryCode = [
{
label: 'thai',
value: 'th',
},
{
label: 'myanmar',
value: 'mm',
},
{
label: 'laos',
value: 'lo',
},
{
label: 'cambodian',
value: 'kh',
},
{
label: 'vietnam',
value: 'vn',
},
{
label: 'philippines',
value: 'ph',
},
{
label: 'china',
value: 'cn',
},
];
export const uploadFileListCustomer: {
label: string;
value: string;
2024-11-12 16:01:43 +07:00
group: string;
2024-09-20 09:21:15 +07:00
_meta?: Record<string, any>;
}[] = [
{
label: 'customer.typeFile.citizenId',
value: 'citizen',
2024-11-12 16:01:43 +07:00
group: 'citizen',
},
{
label: 'customer.typeFile.registrationBook',
2024-11-12 16:01:43 +07:00
value: 'attachment',
group: 'houseRegistration',
},
{
label: 'customer.typeFile.houseMap',
2024-11-12 16:01:43 +07:00
value: 'attachment',
group: 'vatRegistration',
},
{
label: 'customer.typeFile.businessRegistration',
2024-11-12 16:01:43 +07:00
group: 'commercialRegistration',
value: 'attachment',
},
{
label: 'customer.typeFile.dbdCertificate',
2024-11-12 16:01:43 +07:00
group: 'powerOfAttorney',
value: 'attachment',
},
{
label: 'customer.typeFile.vatRegistrationCertificate',
2024-11-12 16:01:43 +07:00
group: 'vatRegistrationCertificate',
value: 'attachment',
},
{
label: 'customer.typeFile.powerOfAttorney',
2024-11-12 16:01:43 +07:00
group: 'powerOfAttorney',
value: 'attachment',
},
{
label: 'customer.typeFile.others',
2024-11-12 16:01:43 +07:00
group: 'others',
value: 'attachment',
},
];
export const uploadFileListEmployee: {
label: string;
2024-11-12 16:01:43 +07:00
group: string;
value: string;
2024-09-18 10:59:21 +07:00
_meta?: Record<string, any>;
}[] = [
{
2024-08-28 15:07:31 +07:00
label: 'customerEmployee.fileType.passport',
value: 'passport',
2024-11-12 16:01:43 +07:00
group: 'passport',
},
{
2024-08-28 15:07:31 +07:00
label: 'customerEmployee.fileType.visa',
value: 'visa',
2024-11-12 16:01:43 +07:00
group: 'visa',
2024-09-18 10:59:21 +07:00
_meta: {
number: '',
type: '',
entryCount: 0,
issueCountry: '',
issuePlace: '',
issueDate: new Date(),
expireDate: new Date(),
mrz: '',
remark: '',
},
},
{
2024-08-28 15:07:31 +07:00
label: 'customerEmployee.fileType.tm6',
2024-11-12 16:01:43 +07:00
value: 'attachment',
group: 'tm6',
},
{
2024-08-28 15:07:31 +07:00
label: 'customerEmployee.fileType.workPermit',
2024-11-12 16:01:43 +07:00
value: 'attachment',
group: 'workPermit',
},
{
2024-08-28 15:07:31 +07:00
label: 'customerEmployee.fileType.noticeJobEmployment',
2024-11-12 16:01:43 +07:00
value: 'attachment',
group: 'noticeJobEmployment',
},
{
2024-08-28 15:07:31 +07:00
label: 'customerEmployee.fileType.noticeJobEntry',
2024-11-12 16:01:43 +07:00
value: 'attachment',
group: 'noticeJobEntry',
},
{
2024-08-28 15:07:31 +07:00
label: 'customerEmployee.fileType.historyJob',
2024-11-12 16:01:43 +07:00
value: 'attachment',
group: 'historyJob',
},
{
2024-08-28 15:07:31 +07:00
label: 'customerEmployee.fileType.acceptJob',
2024-11-12 16:01:43 +07:00
value: 'attachment',
group: 'acceptJob',
},
{
2024-08-28 15:07:31 +07:00
label: 'customerEmployee.fileType.receipt',
2024-11-12 16:01:43 +07:00
value: 'attachment',
group: 'receipt',
},
{
2024-08-28 15:07:31 +07:00
label: 'customerEmployee.fileType.other',
2024-11-12 16:01:43 +07:00
value: 'attachment',
group: 'other',
},
2024-08-26 18:05:33 +07:00
];
2024-09-18 10:59:21 +07:00
export const columnsAttachment = [
{
name: 'orderNumber',
align: 'center',
label: 'general.orderNumber',
field: 'branchNo',
},
{
2024-11-12 16:01:43 +07:00
name: 'createdAt',
feat: menu request list (#75) * feat: i18n * feat: request list * refactor: hide stat transition on app.scss * feat: request list i18n * feat: request list => constants and main page * feat: add store * feat: add fetch data * feat: add utilities fn * feat: add store function / types * refactor: request list type * refactor: request list constants * refactor: quotation card => add customData and badge color props * feat: avatar group components * feat: request list group * refactor: request list => remove tab, add table data * feat: send search query * feat: add parameter * refactor: remove unused function * fix: rename component lits to list * feat: show stats from api * chore: cleanup * refactor: make it type safe * refactor: accept rotate flow id as parameter * feat: use page size component * feat: add component, data display & expansion product * feat: i18n * refactor: constants and request list table * refactor: type code, createdAt, updatedAt * refactor: utils function changThemeMode * feat: request list => view page * refactor: use type instead of infer from value * fix: function getEmployeeName att type * refactor: fetch work list * refactor: loop work list * feat: add i18n duty * feat: add form issue component * feat: add form issue section * fix: store error * refactor: edit by value * refactor: accept basic info from outside instead * feat: add status filter support on fetch * refactor: remove delete button * refactor: wording * feat/fix: request list i18n & constant * feat: document type * feat/refactor: request list => document expansion * refactor: doc expansion use FormGroupHead * refactor: fetch data based on id from route param * refactor: text area disable * feat: properties expansion display (mocking) * refactor: add document at product relation * refactor: edit get value product * feat: get workflow step to show on top * refactor: add type * refactor: add get attachment * refactor: add view attachment * refactor: edit file name * refactor: define props get hide icon * refactor: edit align row * refactor: by value table document * refactor: by value row table * feat: add independent ocr dialog * chore: clean up * refactor: accept more props and small adjustment * fix: error withDefault call * feat: accept default metadata when open * fix: typo * feat: add override hook when finish ocr * feat: reset state on open * feat: detect reader result is actually string * fix: variable name conflict * feat: properties to input component * feat: properties input in properties expansion * feat: properties expansion data (temporary) * refactor: add i18n status work * refactor: edit type work status and add step status * refactor: add edit status work * refactor: edit step work * refactor: properties data type * refactor: filter selected product & specific properties * feat: add emit event * refactor: change variable name for better understanding * refactor: hide step that no properties * refactor: work status type to validate * feat: work status color * refactor: key for filename * refactor: close expansion when change step * refactor: responsive meta data * refactor: product expansion responsive * fix: dark mode step text color * fix: document expansion table no data label * refactor: main page body bordered and overflow hidden * refactor: use utils function instead * refactor: add process * refactor: by value name * refactor: add upload file * refactor: upload file * refactor: by value * fix: option worker type * refactor: fetchRequestAttachment after edit * fix: metadata display * refactor: add class full-height * refactor: edit type * refactor: fetch file * refactor: by value visa * refactor: request list attributes type * fix: properties to input props (placeholder, readonly, disable) * feat: request list properties function * fix: error when no workflow * docs: update comment to fix indent * refactor: step type (attributes) * refactor: add attributes payload on editStatusRequestWork function * feat/refactor: functional form expansion/filter worklist * refactor: set attributes properties after submit * refactor: add request work ready status * feat: request list => form employee component * feat/refactor: form expansion select user/layout * fix: properties readonly --------- Co-authored-by: puriphatt <puriphat@frappet.com> Co-authored-by: Thanaphon Frappet <thanaphon@frappet.com>
2024-11-22 18:02:03 +07:00
align: 'left',
2024-11-12 16:01:43 +07:00
label: 'general.uploadDate',
2024-09-18 10:59:21 +07:00
field: 'attachmentName',
},
2024-11-12 16:01:43 +07:00
2024-09-18 10:59:21 +07:00
{
2024-11-12 16:01:43 +07:00
name: 'ัexpireDate',
feat: menu request list (#75) * feat: i18n * feat: request list * refactor: hide stat transition on app.scss * feat: request list i18n * feat: request list => constants and main page * feat: add store * feat: add fetch data * feat: add utilities fn * feat: add store function / types * refactor: request list type * refactor: request list constants * refactor: quotation card => add customData and badge color props * feat: avatar group components * feat: request list group * refactor: request list => remove tab, add table data * feat: send search query * feat: add parameter * refactor: remove unused function * fix: rename component lits to list * feat: show stats from api * chore: cleanup * refactor: make it type safe * refactor: accept rotate flow id as parameter * feat: use page size component * feat: add component, data display & expansion product * feat: i18n * refactor: constants and request list table * refactor: type code, createdAt, updatedAt * refactor: utils function changThemeMode * feat: request list => view page * refactor: use type instead of infer from value * fix: function getEmployeeName att type * refactor: fetch work list * refactor: loop work list * feat: add i18n duty * feat: add form issue component * feat: add form issue section * fix: store error * refactor: edit by value * refactor: accept basic info from outside instead * feat: add status filter support on fetch * refactor: remove delete button * refactor: wording * feat/fix: request list i18n & constant * feat: document type * feat/refactor: request list => document expansion * refactor: doc expansion use FormGroupHead * refactor: fetch data based on id from route param * refactor: text area disable * feat: properties expansion display (mocking) * refactor: add document at product relation * refactor: edit get value product * feat: get workflow step to show on top * refactor: add type * refactor: add get attachment * refactor: add view attachment * refactor: edit file name * refactor: define props get hide icon * refactor: edit align row * refactor: by value table document * refactor: by value row table * feat: add independent ocr dialog * chore: clean up * refactor: accept more props and small adjustment * fix: error withDefault call * feat: accept default metadata when open * fix: typo * feat: add override hook when finish ocr * feat: reset state on open * feat: detect reader result is actually string * fix: variable name conflict * feat: properties to input component * feat: properties input in properties expansion * feat: properties expansion data (temporary) * refactor: add i18n status work * refactor: edit type work status and add step status * refactor: add edit status work * refactor: edit step work * refactor: properties data type * refactor: filter selected product & specific properties * feat: add emit event * refactor: change variable name for better understanding * refactor: hide step that no properties * refactor: work status type to validate * feat: work status color * refactor: key for filename * refactor: close expansion when change step * refactor: responsive meta data * refactor: product expansion responsive * fix: dark mode step text color * fix: document expansion table no data label * refactor: main page body bordered and overflow hidden * refactor: use utils function instead * refactor: add process * refactor: by value name * refactor: add upload file * refactor: upload file * refactor: by value * fix: option worker type * refactor: fetchRequestAttachment after edit * fix: metadata display * refactor: add class full-height * refactor: edit type * refactor: fetch file * refactor: by value visa * refactor: request list attributes type * fix: properties to input props (placeholder, readonly, disable) * feat: request list properties function * fix: error when no workflow * docs: update comment to fix indent * refactor: step type (attributes) * refactor: add attributes payload on editStatusRequestWork function * feat/refactor: functional form expansion/filter worklist * refactor: set attributes properties after submit * refactor: add request work ready status * feat: request list => form employee component * feat/refactor: form expansion select user/layout * fix: properties readonly --------- Co-authored-by: puriphatt <puriphat@frappet.com> Co-authored-by: Thanaphon Frappet <thanaphon@frappet.com>
2024-11-22 18:02:03 +07:00
align: 'left',
2024-11-12 16:01:43 +07:00
label: 'general.expirationDate',
field: 'attachmentName',
2024-09-18 10:59:21 +07:00
},
{
name: 'action',
label: '',
field: 'action',
},
] satisfies QTableProps['columns'];
2024-08-02 13:58:44 +07:00
export const columnsEmployee = [
2024-08-19 13:19:07 +07:00
{
name: 'orderNumber',
align: 'center',
2024-08-26 16:24:08 +07:00
label: 'general.orderNumber',
2024-08-19 13:19:07 +07:00
field: 'branchNo',
},
2024-08-02 13:58:44 +07:00
{
name: 'firstName',
align: 'left',
2024-08-26 16:24:08 +07:00
label: 'general.name',
2024-08-02 13:58:44 +07:00
field: 'firstName',
2024-08-19 13:19:07 +07:00
},
{
2024-08-26 16:24:08 +07:00
name: 'general.age',
align: 'center',
2024-08-26 16:24:08 +07:00
label: 'general.age',
2024-08-19 13:19:07 +07:00
field: 'dateOfBirth',
2024-08-02 13:58:44 +07:00
},
{
name: 'formDialogInputNationality',
align: 'left',
2024-08-26 16:24:08 +07:00
label: 'general.nationality',
2024-08-02 13:58:44 +07:00
field: 'nationality',
},
{
name: 'formDialogInputPassportNo',
align: 'left',
2024-08-26 16:24:08 +07:00
label: 'customerEmployee.form.passportNo',
2024-08-02 13:58:44 +07:00
field: 'passportNumber',
},
{
name: 'passportExpiryDate',
align: 'left',
2024-08-26 16:24:08 +07:00
label: 'customerEmployee.form.passportExpireDate',
2024-08-02 13:58:44 +07:00
field: 'passportExpiryDate',
},
{
2024-10-29 09:04:23 +07:00
name: 'visaExpireDate',
2024-08-02 13:58:44 +07:00
align: 'left',
2024-10-29 09:04:23 +07:00
label: 'customerEmployee.form.visaExpireDate',
field: 'visaExpireDate',
},
{
name: 'beDue',
align: 'left',
label: 'general.beDue',
field: 'beDue',
2024-08-02 13:58:44 +07:00
},
{
name: 'branchLabel',
align: 'center',
2024-08-26 16:24:08 +07:00
label: 'customerEmployee.branch',
2024-08-02 13:58:44 +07:00
field: 'customerBranch',
},
{
name: 'action',
label: '',
field: 'action',
},
] satisfies QTableProps['columns'];
export const columnsCustomer = [
2024-08-20 17:56:05 +07:00
{
name: 'orderNumber',
align: 'center',
label: 'customer.table.orderNumber',
field: 'branchNo',
},
2024-08-02 13:58:44 +07:00
{
2024-09-18 11:41:03 +07:00
name: 'titleName',
2024-08-02 13:58:44 +07:00
align: 'left',
2024-09-18 11:41:03 +07:00
label: 'customer.table.titleName',
field: 'titleName',
2024-08-02 13:58:44 +07:00
},
2024-08-20 17:56:05 +07:00
2024-08-02 13:58:44 +07:00
{
name: 'businessTypePure',
2024-08-02 13:58:44 +07:00
align: 'center',
2024-08-20 17:56:05 +07:00
label: 'customer.table.businessTypePure',
field: 'businessTypePure',
2024-08-02 13:58:44 +07:00
},
2024-08-20 17:56:05 +07:00
{
2024-09-17 18:01:13 +07:00
name: 'jobPosition',
align: 'left',
2024-09-17 18:01:13 +07:00
label: 'customer.table.jobPosition',
field: 'jobPosition',
2024-08-02 13:58:44 +07:00
},
2024-09-18 11:41:03 +07:00
{
name: 'address',
align: 'center',
label: 'customer.table.address',
field: 'address',
},
{
name: 'contactName',
align: 'center',
label: 'customer.table.contactName',
field: 'contactName',
},
2024-08-02 13:58:44 +07:00
{
2024-09-17 18:01:13 +07:00
name: 'officeTel',
2024-08-02 13:58:44 +07:00
align: 'left',
2024-10-25 14:23:21 +07:00
label: 'customer.table.tel',
2024-09-17 18:01:13 +07:00
field: 'officeTel',
2024-08-20 17:56:05 +07:00
},
2024-08-02 13:58:44 +07:00
] satisfies QTableProps['columns'];