From f6c98b4936c9d5575d973ed66a5887e3df7f0b35 Mon Sep 17 00:00:00 2001 From: puriphatt Date: Tue, 27 Aug 2024 15:32:18 +0700 Subject: [PATCH] feat: passport type option --- public/option/option.json | 62 +++++++++++++++++++ .../FormEmployeePassport.vue | 9 ++- 2 files changed, 68 insertions(+), 3 deletions(-) diff --git a/public/option/option.json b/public/option/option.json index 594b4280..a8eea85a 100644 --- a/public/option/option.json +++ b/public/option/option.json @@ -823,6 +823,37 @@ "value": "type90Days", "type": "string" } + ], + + "passportType": [ + { + "label": "Ordinary Passport", + "value": "ordinary" + }, + { + "label": "Official Passport", + "value": "official" + }, + { + "label": "Diplomatic Passport", + "value": "diplomatic" + }, + { + "label": "Temporary Passport", + "value": "temporary" + }, + { + "label": "Monk Passport", + "value": "monk" + }, + { + "label": "Hajj Passport", + "value": "hajj" + }, + { + "label": "Certificate of Identity", + "value": "ci" + } ] }, @@ -1650,6 +1681,37 @@ "value": "type90Days", "type": "string" } + ], + + "passportType": [ + { + "label": "หนังสือเดินทางธรรมดา", + "value": "ordinary" + }, + { + "label": "หนังสือเดินทางราชการ", + "value": "official" + }, + { + "label": "หนังสือเดินทางทูต", + "value": "diplomatic" + }, + { + "label": "หนังสือเดินทางชั่วคราว", + "value": "temporary" + }, + { + "label": "หนังสือเดินทางพระ", + "value": "monk" + }, + { + "label": "หนังสือเดินทางเพื่อไปประกอบพิธีฮัจญ์", + "value": "hajj" + }, + { + "label": "เอกสารสำคัญประจำตัวเพื่อใช้แทนหนังสือเดินทาง", + "value": "ci" + } ] } } diff --git a/src/components/03_customer-management/FormEmployeePassport.vue b/src/components/03_customer-management/FormEmployeePassport.vue index e2a26004..9781cf82 100644 --- a/src/components/03_customer-management/FormEmployeePassport.vue +++ b/src/components/03_customer-management/FormEmployeePassport.vue @@ -49,9 +49,12 @@ let passportIssuingCountryFilter: ( ) => void; onMounted(() => { - if (optionStore.globalOption?.nationality) { + if ( + optionStore.globalOption?.nationality && + optionStore.globalOption?.passportType + ) { passportTypeFilter = selectFilterOptionRefMod( - ref(optionStore.globalOption.nationality), + ref(optionStore.globalOption.passportType), passportTypeOptions, 'label', ); @@ -67,7 +70,7 @@ watch( () => optionStore.globalOption, () => { passportTypeFilter = selectFilterOptionRefMod( - ref(optionStore.globalOption.nationality), + ref(optionStore.globalOption.passportType), passportTypeOptions, 'label', );