diff --git a/src/pages/03_customer-management/MainPage.vue b/src/pages/03_customer-management/MainPage.vue index 067ef49e..baf69159 100644 --- a/src/pages/03_customer-management/MainPage.vue +++ b/src/pages/03_customer-management/MainPage.vue @@ -58,7 +58,7 @@ import FormEmployeeOther from 'src/components/03_customer-management/FormEmploye import FormEmployeePassport from 'src/components/03_customer-management/FormEmployeePassport.vue'; import FormEmployeeVisa from 'src/components/03_customer-management/FormEmployeeVisa.vue'; import useUtilsStore, { dialog } from 'src/stores/utils'; -import { calculateAge } from 'src/utils/datetime'; +import { calculateAge, dateFormat } from 'src/utils/datetime'; import { useI18n } from 'vue-i18n'; import useFlowStore from 'src/stores/flow'; @@ -1336,6 +1336,28 @@ async function checkEmployeeForm() { if (key === 'workerStatus') continue; if (key === 'image') continue; + const validPersonalInfoKeys = [ + 'customerBranchId', + 'firstName', + 'firstNameEN', + 'lastName', + 'lastNameEN', + 'dateOfBirth', + 'gender', + 'nationality', + 'passportType', + 'passportNumber', + 'passportIssueDate', + 'passportExpiryDate', + 'passportIssuingCountry', + 'passportIssuingPlace', + ]; + + if (validPersonalInfoKeys.includes(key) && (val === '' || val === null)) { + formDataEmployeeTab.value = 'personalInfo'; + return; + } + if (val === '' || val === null) { forget = true; } @@ -1835,7 +1857,7 @@ watch( @@ -1906,6 +1928,7 @@ watch( :grid="modeView" :rows="listCustomer" :columns="columnsCustomer" + class="full-width" card-container-class="q-col-gutter-md" row-key="name" :rows-per-page-options="[0]" @@ -2327,15 +2350,15 @@ watch( >
- {{ calculateAge(props.row.passportExpiryDate) }} + {{ dateFormat(props.row.passportExpiryDate) }}