diff --git a/src/components/03_customer-management/FormEmployeeHealthCheck.vue b/src/components/03_customer-management/FormEmployeeHealthCheck.vue
index a1a795ad..08c2f222 100644
--- a/src/components/03_customer-management/FormEmployeeHealthCheck.vue
+++ b/src/components/03_customer-management/FormEmployeeHealthCheck.vue
@@ -10,6 +10,7 @@ import { EmployeeCheckupCreate } from 'stores/employee/types';
import { useI18n } from 'vue-i18n';
import { checkTabBeforeAdd, selectFilterOptionRefMod } from 'stores/utils';
import { QSelect } from 'quasar';
+import DatePicker from '../shared/DatePicker.vue';
import {
AddButton,
EditButton,
@@ -154,7 +155,7 @@ const insuranceCompanyFilter = selectFilterOptionRefMod(
size="xs"
class="q-pa-sm rounded q-mr-sm"
color="info"
- name="mdi-hospital-box"
+ name="mdi-hospital-box-outline"
style="background-color: var(--surface-3)"
/>
{{ $t(`formDialogTitleHealthCheck`) }}
@@ -347,131 +348,22 @@ const insuranceCompanyFilter = selectFilterOptionRefMod(
type="textarea"
:for="`${prefixId}-input-remark`"
/>
-
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {
- if (v && v.toString().length === 10) {
- checkup.coverageStartDate = parseAndFormatDate(v, locale);
- }
- }
- "
- >
-
-
-
-
-
-
-
-
-
-
+
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {
- if (v && v.toString().length === 10) {
- checkup.coverageExpireDate = parseAndFormatDate(v, locale);
- }
- }
- "
- >
-
-
-
-
-
-
-
-
-
+ :id="`${prefixId}-input-coverage-expire-date`"
+ :readonly="readonly || checkup.statusSave"
+ clearable
+ />
-
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {
- if (v && v.toString().length === 10) {
- passportIssueDate = parseAndFormatDate(v, locale);
- }
- }
- "
- >
-
-
-
-
-
-
-
+
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {
- if (v && v.toString().length === 10) {
- passportExpiryDate = parseAndFormatDate(v, locale);
- }
- }
- "
- >
-
-
-
-
-
-
+ :readonly="readonly"
+ :rules="[
+ (val: string) =>
+ !!val || $t('selectValidate') + $t('formDialogInputPassportExpire'),
+ ]"
+ />
diff --git a/src/components/03_customer-management/FormEmployeeVisa.vue b/src/components/03_customer-management/FormEmployeeVisa.vue
index da375238..eec8a70d 100644
--- a/src/components/03_customer-management/FormEmployeeVisa.vue
+++ b/src/components/03_customer-management/FormEmployeeVisa.vue
@@ -11,6 +11,7 @@ import { useI18n } from 'vue-i18n';
import { selectFilterOptionRefMod } from 'stores/utils';
import useOptionStore from 'stores/options';
import { watch } from 'vue';
+import DatePicker from '../shared/DatePicker.vue';
const optionStore = useOptionStore();
const { locale } = useI18n();
@@ -154,146 +155,22 @@ watch(
(val: string) =>
!!val || $t('inputValidate') + $t('formDialogInputVisaNo'),
]" -->
-
+
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {
- if (v && v.toString().length === 10) {
- visaIssueDate = parseAndFormatDate(v, locale);
- }
- }
- "
- >
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {
- if (v && v.toString().length === 10) {
- visaExpiryDate = parseAndFormatDate(v, locale);
- }
- }
- "
- >
-
-
-
-
-
-
-
-
-
-
+ clearable
+ />
!!val || $t('selectValidate') + $t('formDialogInputVisaPlace'),
]" -->
-
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {
- if (v && v.toString().length === 10) {
- visaStayUntilDate = parseAndFormatDate(v, locale);
- }
- }
- "
- >
-
-
-
-
-
-
-
-
-
-
+ :id="`${prefixId}-date-picker-visa-until`"
+ :readonly="readonly"
+ :label="$t('formDialogInputVisaStayUntil')"
+ v-model="visaStayUntilDate"
+ clearable
+ />
!!val || $t('inputValidate') + $t('formDialogInputVisaTM6'),
]" -->
-
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {
- if (v && v.toString().length === 10) {
- entryDate = parseAndFormatDate(v, locale);
- }
- }
- "
- >
-
-
-
-
-
-
-
-
-
-
+ :id="`${prefixId}-date-picker-visa-enter`"
+ :readonly="readonly"
+ :label="$t('formDialogInputVisaEnter')"
+ v-model="entryDate"
+ clearable
+ />
diff --git a/src/components/03_customer-management/FormEmployeeWorkHistory.vue b/src/components/03_customer-management/FormEmployeeWorkHistory.vue
index fa380643..c16906f9 100644
--- a/src/components/03_customer-management/FormEmployeeWorkHistory.vue
+++ b/src/components/03_customer-management/FormEmployeeWorkHistory.vue
@@ -4,6 +4,8 @@ import { dateFormat, parseAndFormatDate } from 'src/utils/datetime';
import { EmployeeWorkCreate } from 'stores/employee/types';
import { useI18n } from 'vue-i18n';
import { checkTabBeforeAdd, selectFilterOptionRefMod } from 'stores/utils';
+import DatePicker from '../shared/DatePicker.vue';
+
import {
AddButton,
EditButton,
@@ -109,7 +111,7 @@ const workplaceFilter = selectFilterOptionRefMod(
size="xs"
class="q-pa-sm rounded q-mr-xs"
color="info"
- name="mdi-briefcase"
+ name="mdi-briefcase-outline"
style="background-color: var(--surface-3)"
/>
{{ $t(`workHistory`) }}
@@ -248,69 +250,15 @@ const workplaceFilter = selectFilterOptionRefMod(
v-model="work.remark"
type="textarea"
/>
-
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {
- if (v && v.toString().length === 10) {
- work.workEndDate = parseAndFormatDate(v, locale);
- }
- }
- "
- >
-
-
-
-
-
-
-
-
-
+ :id="`${prefixId}-input-work-until-date`"
+ :readonly="readonly || work.statusSave"
+ clearable
+ />
+
-
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {
- if (v && v.toString().length === 10) {
- work.workPermitIssuDate = parseAndFormatDate(v, locale);
- }
- }
- "
- >
-
-
-
-
-
-
-
-
-
-
+
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {
- if (v && v.toString().length === 10) {
- work.workPermitExpireDate = parseAndFormatDate(v, locale);
- }
- }
- "
- >
-
-
-
-
-
-
-
-
-
+ :id="`${prefixId}-date-picker-work-permit-expire-date`"
+ :readonly="readonly || work.statusSave"
+ clearable
+ />
+
('employmentOffice');
@@ -192,70 +194,13 @@ let jobPositionFilter = selectFilterOptionRefMod(
v-model="jobDescription"
/>
-
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {{ $i18n.locale === 'th-th' ? value + 543 : value }}
-
-
- {
- if (v && v.toString().length === 10) {
- payDate = parseAndFormatDate(v, locale);
- }
- }
- "
- >
-
-
-
-
-
-
-
-
-
+ :label="$t('payDay')"
+ :readonly="readonly"
+ clearable
+ />