+
+
+ {{ title }}
-
-
+
+
+
+
+
+
+ {{ $t('general.noData') }}
+
+
+
+
+
+
+
+
+
+
+ (typeof v === 'string' ? (prefixName = v) : '')
+ "
+ @clear="prefixName = ''"
+ >
+
+
+
+ {{ $t('general.noData') }}
+
+
+
+
+
+
+
+
+
+
+ typeof v === 'string' ? (previousPassportReference = v) : ''
+ "
+ />
+
+
+
+
+
+ {{ $t('general.noData') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ title }}
+
-
-
+
+
-
-
-
-
-
- {{ $t('general.noData') }}
-
-
-
-
+
+ (typeof v === 'string' ? (workerStatus = v) : '')
+ "
+ @clear="workerStatus = ''"
+ >
+
+
+
+ {{ $t('general.noData') }}
+
+
+
+
-
+
-
-
-
(typeof v === 'string' ? (firstName = v) : '')
+ "
+ />
+
+ (typeof v === 'string' ? (middleName = v) : '')
+ "
/>
(typeof v === 'string' ? (lastName = v) : '')
+ "
/>
-
-
+
+ (typeof v === 'string' ? (firstNameEN = v) : '')
+ "
+ />
+
+ (typeof v === 'string' ? (middleNameEN = v) : '')
+ "
+ />
+
+ (typeof v === 'string' ? (lastNameEN = v) : '')
+ "
+ />
+
+
+
+ (typeof v === 'string' ? (gender = v) : '')
+ "
+ @clear="gender = ''"
+ >
+
+
+
+ {{ $t('general.noData') }}
+
+
+
+
+
+
+
+
+
+
- typeof v === 'string' ? (previousPassportReference = v) : ''
- "
- />
-
-
-
-
-
- {{ $t('general.noData') }}
-
-
-
-
-
-
+ :label="$t('personnel.age')"
+ class="col-2"
+ :model-value="
+ birthDate?.toString() === 'Invalid Date' ||
+ birthDate?.toString() === undefined
+ ? ''
+ : calculateAge(birthDate)
+ "
+ />
+
+ (typeof v === 'string' ? (nationality = v) : '')
+ "
+ @clear="nationality = ''"
+ >
+
+
+
+ {{ $t('general.noData') }}
+
+
+
+
+
+
+
+ (typeof v === 'string' ? (countryOfBirth = v) : '')
+ "
+ @clear="countryOfBirth = ''"
+ >
+
+
+
+ {{ $t('general.noData') }}
+
+
+
+
+
+
+
+
+
+ {{ $t('general.noData') }}
+
+
+
+
+
+
+
+
-
+
diff --git a/src/components/03_customer-management/FormEmployeeVisa.vue b/src/components/03_customer-management/FormEmployeeVisa.vue
index 1d49374e..eb571911 100644
--- a/src/components/03_customer-management/FormEmployeeVisa.vue
+++ b/src/components/03_customer-management/FormEmployeeVisa.vue
@@ -32,9 +32,17 @@ const visaIssuingPlace = defineModel
('visaIssuingPlace');
const visaStayUntilDate = defineModel(
'visaStayUntilDate',
);
+const entryCount = defineModel('entryCount');
+const issueCountry = defineModel('issueCountry');
+
const tm6Number = defineModel('tm6Number');
const entryDate = defineModel('entryDate');
+const workerType = defineModel('workerType');
+const dayNext = defineModel('dayNext');
+const tmNo = defineModel('tmNo');
+const enteredCheckpoint = defineModel('enteredCheckpoint');
+
defineProps<{
title?: string;
dense?: boolean;
@@ -47,6 +55,14 @@ defineProps<{
ocr?: boolean;
}>();
+async function calculate90DayNext(currentDate: Date) {
+ const futureDate = new Date(currentDate);
+
+ // Add 90 days to the current date
+ futureDate.setDate(currentDate.getDate() + 90);
+
+ return futureDate;
+}
async function fetchProvince() {
const result = await addressStore.fetchProvince();
@@ -63,12 +79,24 @@ let visaTypeFilter: (
update: (callbackFn: () => void, afterFn?: (ref: QSelect) => void) => void,
) => void;
+const workerTypeOptions = ref[]>([]);
+let workerTypeFilter: (
+ value: string,
+ update: (callbackFn: () => void, afterFn?: (ref: QSelect) => void) => void,
+) => void;
+
onMounted(() => {
visaTypeFilter = selectFilterOptionRefMod(
ref(optionStore.globalOption?.nationality),
visaTypeOptions,
'label',
);
+
+ workerTypeFilter = selectFilterOptionRefMod(
+ ref(optionStore.globalOption?.workerType),
+ workerTypeOptions,
+ 'label',
+ );
});
watch(
@@ -79,150 +107,442 @@ watch(
visaTypeOptions,
'label',
);
+
+ workerTypeFilter = selectFilterOptionRefMod(
+ ref(optionStore.globalOption?.workerType),
+ workerTypeOptions,
+ 'label',
+ );
},
);
-
-
-
- {{ $t(`${title}`) }}
-
-
- (typeof v === 'string' ? (visaType = v) : '')
- "
- @clear="visaType = ''"
- >
-
-
-
- {{ $t('general.noData') }}
-
-
-
-
-
- (typeof v === 'string' ? (visaNumber = v) : '')
- "
- />
-
-
-
+
+
- (typeof v === 'string' ? (visaIssuingPlace = v) : '')
- "
- />
-
-
+
- (typeof v === 'string' ? (tm6Number = v) : '')
- "
- @clear="tm6Number = ''"
- />
-
-
+
+
+ (typeof v === 'string' ? (issueCountry = v) : '')
+ "
+ @clear="visaType = ''"
+ >
+
+
+
+ {{ $t('general.noData') }}
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
(typeof v === 'string' ? (workerType = v) : '')
+ "
+ @clear="workerType = ''"
+ >
+
+
+
+ {{ $t('general.noData') }}
+
+
+
+
+
+
(typeof v === 'string' ? (visaNumber = v) : '')
+ "
+ />
+
+ (typeof v === 'string' ? (visaIssuingPlace = v) : '')
+ "
+ />
+
+
+
(typeof v === 'string' ? (visaType = v) : '')
+ "
+ @clear="visaType = ''"
+ >
+
+
+
+ {{ $t('general.noData') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (typeof v === 'string' ? (tmNo = v) : '')
+ "
+ />
+
+
+
+ (typeof v === 'string' ? (enteredCheckpoint = v) : '')
+ "
+ />
+
+ (typeof v === 'string' ? (issueCountry = v) : '')
+ "
+ @clear="visaType = ''"
+ >
+
+
+
+ {{ $t('general.noData') }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/i18n/eng.ts b/src/i18n/eng.ts
index 4e99594a..94405c88 100644
--- a/src/i18n/eng.ts
+++ b/src/i18n/eng.ts
@@ -491,6 +491,7 @@ export default {
table: {
orderNumber: 'No.',
fullname: 'Full Name',
+ fullnameEN: 'Full Name',
titleName: 'Name',
businessTypePure: 'Business Type',
jobPosition: 'Job Position',
@@ -516,6 +517,8 @@ export default {
other: 'Other',
family: 'Family',
},
+ workerStatus: 'Worker Status',
+ previousPassportNumber: 'Previous Passport Number',
employerBranch: 'Employer Branch',
employeeCode: 'Employee Code',
nrcNo: 'Non-Thai Identification Number (N.R.C No.)',
@@ -541,7 +544,14 @@ export default {
visaTM6: 'TM.6 Number (Arrival)',
visaEnter: 'Date of Entry into the Country',
visaExpireDate: 'Visa Expiry Date',
-
+ visa90Day: '90-day report next time',
+ arrivalCardNo: 'Arrival Card, Number TM',
+ visaCheckpoint: 'Entered through the checkpoint',
+ workerType: 'Type of worker',
+ placeOfBirth: 'Place of Birth',
+ countryOfbirth: 'Country of Birth',
+ issueCountry: 'Issue Country',
+ entryCount: 'Entry Count',
employerSelect: {
branchName: 'Branch Name',
customerName: 'Employer Name',
diff --git a/src/i18n/tha.ts b/src/i18n/tha.ts
index c7e55c8d..6bcfd50b 100644
--- a/src/i18n/tha.ts
+++ b/src/i18n/tha.ts
@@ -487,6 +487,7 @@ export default {
table: {
orderNumber: 'ลําดับ',
fullname: 'ชื่อ-นามสกุล',
+ fullnameEN: 'ชื่อ-นามสกุล ภาษาอังกฤษ',
titleName: 'ชื่อ บริษัท/นิติบุคคล',
businessTypePure: 'ประเภทกิจการ',
jobPosition: 'ตำแหน่งงาน',
@@ -512,6 +513,8 @@ export default {
other: 'ข้อมูลอื่นๆ',
family: 'ข้อมูลครอบครัว',
},
+ workerStatus: 'สถานะคนงาน',
+ previousPassportNumber: 'หมายเลขอันเก่าหนังสือเดินทาง',
employerBranch: 'สาขานายจ้าง',
employeeCode: 'รหัสลูกจ้าง',
nrcNo: 'เลขบัตรประจำตัวคนซึ่งไม่มีสัญชาติไทย (N.R.C No.)',
@@ -537,7 +540,14 @@ export default {
visaTM6: 'เลขที่ใบ ตม.6 (ใบขาเข้า)',
visaEnter: 'วันที่เดินทางเข้ามาในประเทศ',
visaExpireDate: 'วันหมดอายุ visa',
-
+ visa90Day: 'รายงานตัว 90 วัน ครั้งต่อไป',
+ arrivalCardNo: 'บัตรขาเข้า หมายเลข TM',
+ visaCheckpoint: 'เดินทางเข้ามาทางด่าน',
+ workerType: 'ประเภทคนงาน',
+ placeOfBirth: 'สถานที่เกิด',
+ countryOfbirth: 'ประเทศที่เกิด',
+ issueCountry: 'ประเทศที่ออก',
+ entryCount: 'จำนวนที่เข้าประเทศ',
employerSelect: {
branchName: 'ชื่อสาขา',
customerName: 'ชื่อนายจ้าง',
diff --git a/src/pages/03_customer-management/MainPage.vue b/src/pages/03_customer-management/MainPage.vue
index 24d44fd8..e41e98b5 100644
--- a/src/pages/03_customer-management/MainPage.vue
+++ b/src/pages/03_customer-management/MainPage.vue
@@ -46,7 +46,6 @@ import FormPerson from 'components/02_personnel-management/FormPerson.vue';
import { EmployerFormBasicInfo, EmployerFormBranch } from './components';
import BranchPage from './BranchPage.vue';
import FormEmployeePassport from 'components/03_customer-management/FormEmployeePassport.vue';
-import FormEmployeeVisa from 'components/03_customer-management/FormEmployeeVisa.vue';
import DialogForm from 'components/DialogForm.vue';
import SideMenu from 'components/SideMenu.vue';
import TableEmpoloyee from 'src/components/03_customer-management/TableEmpoloyee.vue';
@@ -77,6 +76,7 @@ import useOptionStore from 'stores/options';
import { DialogContainer, DialogHeader } from 'components/dialog';
import KebabAction from 'src/components/shared/KebabAction.vue';
import { nextTick } from 'vue';
+import FormEmployeeVisa from 'components/03_customer-management/FormEmployeeVisa.vue';
const { t, locale } = useI18n();
const $q = useQuasar();
@@ -464,7 +464,7 @@ async function toggleStatusCustomer(id: string, status: boolean) {
async function deleteEmployeeById(opts: {
id?: string;
- type?: 'passport' | 'healthCheck' | 'work';
+ type?: 'passport' | 'visa' | 'healthCheck' | 'work';
}) {
dialog({
color: 'negative',
@@ -478,6 +478,10 @@ async function deleteEmployeeById(opts: {
await employeeFormStore.deletePassport();
}
+ if (opts.type === 'visa') {
+ await employeeFormStore.deleteVisa();
+ }
+
if (opts.type === 'healthCheck') {
await employeeFormStore.deleteHealthCheck();
}
@@ -2300,6 +2304,10 @@ const emptyCreateDialog = ref(false);
await employeeFormStore.submitPassport();
}
+ if (employeeFormState.currentTab === 'visa') {
+ await employeeFormStore.submitVisa();
+ }
+
if (employeeFormState.currentTab === 'healthCheck') {
await employeeFormStore.submitHealthCheck();
}
@@ -2370,6 +2378,11 @@ const emptyCreateDialog = ref(false);
name: 'passport',
label: 'customerEmployee.fileType.passport',
},
+ {
+ name: 'visa',
+ label: 'customerEmployee.form.group.visa',
+ },
+
{
name: 'healthCheck',
label: 'customerEmployee.form.group.healthCheck',
@@ -2479,6 +2492,20 @@ const emptyCreateDialog = ref(false);
sub: true,
})) || []),
+ {
+ name: $t('customerEmployee.form.group.visa'),
+ anchor: 'drawer-visa',
+ tab: 'visa',
+ useBtn: true,
+ },
+
+ ...(currentFromDataEmployee.employeeVisa?.map((v, i) => ({
+ name: dateFormat(v.expireDate),
+ anchor: `drawer-employee-visa-${i}`,
+ tab: 'visa',
+ sub: true,
+ })) || []),
+
...(currentFromDataEmployee.employeeCheckup?.map((v, i) => ({
name: $t('general.times', { number: i + 1 }),
anchor: `form-employee-checkup-${i}`,
@@ -2953,6 +2980,8 @@ const emptyCreateDialog = ref(false);
v-model:visa-issue-date="meta.issueDate"
v-model:visa-expiry-date="meta.expireDate"
v-model:visa-issuing-place="meta.issuePlace"
+ v-model:entry-count="meta.entryCount"
+ v-model:issue-country="meta.issueCountry"
/>
@@ -3091,6 +3120,114 @@ const emptyCreateDialog = ref(false);