diff --git a/src/components/05_quotation/QuotationCard.vue b/src/components/05_quotation/QuotationCard.vue new file mode 100644 index 00000000..eec62803 --- /dev/null +++ b/src/components/05_quotation/QuotationCard.vue @@ -0,0 +1,155 @@ + + + + diff --git a/src/components/DialogForm.vue b/src/components/DialogForm.vue index 3d52fd75..f8003783 100644 --- a/src/components/DialogForm.vue +++ b/src/components/DialogForm.vue @@ -23,6 +23,7 @@ defineProps<{ saveAmount?: number; submitLabel?: string; + submitIcon?: string; isEdit?: boolean; tabsList?: { name: string; label: string }[]; hideCloseEvent?: boolean; @@ -217,6 +218,7 @@ const currentTab = defineModel('currentTab'); id="btn-form-submit" type="submit" solid + :icon="submitIcon" :label="submitLabel" :amount="saveAmount" /> diff --git a/src/components/button/SaveButton.vue b/src/components/button/SaveButton.vue index 09e0e4d9..d7325a45 100644 --- a/src/components/button/SaveButton.vue +++ b/src/components/button/SaveButton.vue @@ -12,6 +12,7 @@ defineProps<{ dark?: boolean; label?: string; + icon?: string; amount?: number; }>(); @@ -21,7 +22,7 @@ defineProps<{ diff --git a/src/components/form/AddressForm.vue b/src/components/form/AddressForm.vue index e209cc14..73d02690 100644 --- a/src/components/form/AddressForm.vue +++ b/src/components/form/AddressForm.vue @@ -76,18 +76,28 @@ const fullAddress = computed(() => { if (moo.value) addressParts.push(`${t('form.moo')} ${moo.value}`); if (soi.value) addressParts.push(`${t('form.soi')} ${soi.value}`); - if (street.value) addressParts.push(`${t('form.street')} ${street.value}`); + if (street.value) addressParts.push(`${t('form.road')} ${street.value}`); if (subDistrictId.value && sDistrict) { - addressParts.push(typeof sDistrict.name === 'string' ? sDistrict.name : ''); + addressParts.push( + typeof sDistrict.name === 'string' + ? `${t('form.subDistrict')} ${sDistrict.name}` + : '', + ); } if (districtId.value && district) - addressParts.push(typeof district.name === 'string' ? district.name : ''); + addressParts.push( + typeof district.name === 'string' + ? `${t('form.district')} ${district.name}` + : '', + ); if (provinceId.value && province) { addressParts.push( - typeof province.name === 'string' ? `${province.name}` : '', + typeof province.name === 'string' + ? `${t('form.province')} ${province.name}` + : '', ); sDistrict && addressParts.push( @@ -99,26 +109,26 @@ const fullAddress = computed(() => { }); const fullAddressEN = computed(() => { - const addressParts = [addressEN.value]; + const addressParts = [`${addressEN.value},`]; const province = provinceOptions.value.find((v) => v.id === provinceId.value); const district = districtOptions.value.find((v) => v.id === districtId.value); const sDistrict = subDistrictOptions.value.find( (v) => v.id === subDistrictId.value, ); - if (mooEN.value) addressParts.push(`Moo ${mooEN.value}`); - if (soiEN.value) addressParts.push(`Soi ${soiEN.value}`); - if (streetEN.value) addressParts.push(`${streetEN.value} Street`); + if (mooEN.value) addressParts.push(`Moo ${mooEN.value},`); + if (soiEN.value) addressParts.push(`Soi ${soiEN.value},`); + if (streetEN.value) addressParts.push(`${streetEN.value} Rd.`); if (subDistrictId.value && sDistrict) { addressParts.push( - typeof sDistrict.nameEN === 'string' ? sDistrict.nameEN : '', + typeof sDistrict.nameEN === 'string' ? `${sDistrict.nameEN},` : '', ); } if (districtId.value && district) addressParts.push( - typeof district.nameEN === 'string' ? district.nameEN : '', + typeof district.nameEN === 'string' ? `${district.nameEN},` : '', ); if (provinceId.value && province) { @@ -397,7 +407,7 @@ watch(districtId, fetchSubDistrict); class="col-md-3 col-6" :model-value="readonly ? street || '-' : street" :dense="dense" - :label="$t('form.street')" + :label="$t('form.road')" :readonly="readonly || sameWithEmployer" :for="`${prefixId}-${indexId !== undefined ? `input-street-${indexId}` : 'input-street'}`" @update:model-value=" @@ -552,7 +562,13 @@ watch(districtId, fetchSubDistrict); outlined hide-bottom-space class="col-12" - :model-value="address ? fullAddress : ''" + :model-value=" + address + ? $i18n.locale === 'eng' + ? fullAddressEN + : fullAddress + : '' + " :dense="dense" :label="$t('form.fullAddress')" readonly @@ -635,7 +651,7 @@ watch(districtId, fetchSubDistrict); class="col-md-3 col-6" :model-value="readonly ? streetEN || '-' : streetEN" :dense="dense" - label="Street" + label="Road" :readonly="readonly || sameWithEmployer" :for="`${prefixId}-${indexId !== undefined ? `input-street-${indexId}` : 'input-street'}`" @update:model-value=" diff --git a/src/components/shared/PersonCard.vue b/src/components/shared/PersonCard.vue index 3d65e795..7f0d52fd 100644 --- a/src/components/shared/PersonCard.vue +++ b/src/components/shared/PersonCard.vue @@ -49,7 +49,7 @@ defineEmits<{ }" @click="$emit('enterCard', 'INFO')" > -
+
diff --git a/src/components/shared/SelectInput.vue b/src/components/shared/SelectInput.vue index 480af59a..692019f2 100644 --- a/src/components/shared/SelectInput.vue +++ b/src/components/shared/SelectInput.vue @@ -1,45 +1,82 @@ diff --git a/src/components/shared/SelectZone.vue b/src/components/shared/SelectZone.vue new file mode 100644 index 00000000..0d69f30b --- /dev/null +++ b/src/components/shared/SelectZone.vue @@ -0,0 +1,76 @@ + + +