fix(03): responsive employee form personal info

This commit is contained in:
puriphatt 2024-07-24 09:10:26 +00:00
parent 5e93c5b01c
commit 6215338e58
6 changed files with 34 additions and 29 deletions

View file

@ -79,10 +79,12 @@ watch(districtId, fetchSubDistrict);
<template> <template>
<div class="col-12"> <div class="col-12">
<div class="col-12 app-text-muted row items-center q-mb-md"> <div class="col-12 app-text-muted row items-center q-mb-md">
{{ title || $t('formDialogTitlePersonnelAddress') }} <span class="q-mr-lg">
{{ title || $t('formDialogTitlePersonnelAddress') }}
</span>
<div <div
v-if="employee" v-if="employee"
class="q-ml-lg surface-3 q-px-sm q-py-xs row" class="surface-3 q-px-sm q-py-xs row"
style="border-radius: var(--radius-3)" style="border-radius: var(--radius-3)"
> >
<span <span

View file

@ -209,7 +209,7 @@ defineProps<{
emit-value emit-value
map-options map-options
:label="$t('formDialogInputGender')" :label="$t('formDialogInputGender')"
class="col-3" class="col-md-3 col-6"
option-label="label" option-label="label"
option-value="value" option-value="value"
v-model="gender" v-model="gender"
@ -231,7 +231,7 @@ defineProps<{
map-options map-options
options-dense options-dense
:label="$t('formDialogInputNationality')" :label="$t('formDialogInputNationality')"
class="col-3" class="col-md-3 col-6"
option-label="label" option-label="label"
option-value="label" option-value="label"
v-model="nationality" v-model="nationality"

View file

@ -42,10 +42,10 @@ defineEmits<{
</script> </script>
<template> <template>
<div class="col-3 app-text-muted"> <div class="col-md-3 col-12 app-text-muted">
{{ $t(`formDialogTitleInformation`) }} {{ $t(`formDialogTitleInformation`) }}
</div> </div>
<div v-if="!employee" class="col-9 row q-col-gutter-md"> <div v-if="!employee" class="col-md-9 col-12 row q-col-gutter-md">
<q-select <q-select
id="input-source-nationality" id="input-source-nationality"
:dense="dense" :dense="dense"
@ -148,7 +148,7 @@ defineEmits<{
/> />
</div> </div>
<div v-if="employee" class="col-9 row q-col-gutter-md"> <div v-if="employee" class="col-md-9 col-12 row q-col-gutter-md">
<q-select <q-select
for="select-employer-branch" for="select-employer-branch"
:use-input="!customerBranch" :use-input="!customerBranch"
@ -250,16 +250,18 @@ defineEmits<{
</template> </template>
<template v-slot:selected-item="scope"> <template v-slot:selected-item="scope">
<div v-if="scope.opt" class="row items-center no-wrap"> <div
v-if="scope.opt"
class="row items-center no-wrap"
style="width: 1px"
>
<div class="q-mr-sm"> <div class="q-mr-sm">
{{ scope.opt.code }} {{ scope.opt.code }}
{{ $t('branchName') }}: {{ $t('branchName') }}:
{{ $i18n.locale === 'en-US' ? scope.opt.nameEN : scope.opt.name }} {{ $i18n.locale === 'en-US' ? scope.opt.nameEN : scope.opt.name }}
</div> </div>
<div <div
class="text-caption app-text-muted-2 ellipsis col" class="text-caption app-text-muted-2"
style="max-width: 26vw"
v-if="scope.opt.customer && scope.opt.province" v-if="scope.opt.customer && scope.opt.province"
> >
{{ $t('customerBranchName') }}: {{ $t('customerBranchName') }}:

View file

@ -47,11 +47,8 @@ onMounted(async () => {
}); });
</script> </script>
<template> <template>
<div class="col-12 app-text-muted"></div>
<div class="col-12 row q-col-gutter-y-md"> <div class="col-12 row q-col-gutter-y-md">
<div class="col-3 q-pl-xl app-text-muted"> <div class="col-3 app-text-muted"> {{ $t('businessInformation') }}</div>
{{ $t('businessInformation') }}
</div>
<div class="col-9 row q-col-gutter-md"> <div class="col-9 row q-col-gutter-md">
<q-input <q-input
for="input-employment-office" for="input-employment-office"

View file

@ -29,8 +29,10 @@ defineProps<{
</script> </script>
<template> <template>
<div class="col-3 app-text-muted"> {{ $t(`formDialogTitlePassport`) }}</div> <div class="col-md-3 col-12 app-text-muted">
<div class="col-9 row q-col-gutter-md"> {{ $t(`formDialogTitlePassport`) }}
</div>
<div class="col-md-9 col-12 row q-col-gutter-md">
<q-select <q-select
id="select-passport-type" id="select-passport-type"
:dense="dense" :dense="dense"
@ -44,7 +46,7 @@ defineProps<{
option-value="value" option-value="value"
option-label="label" option-label="label"
:label="$t('formDialogInputPassportType')" :label="$t('formDialogInputPassportType')"
class="col-3" class="col-md-3 col-12"
:options="passportTypeOption" :options="passportTypeOption"
lazy-rules lazy-rules
:rules="[ :rules="[
@ -58,7 +60,7 @@ defineProps<{
outlined outlined
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col-3" class="col-md-3 col-6"
:label="$t('formDialogInputPassportNo')" :label="$t('formDialogInputPassportNo')"
v-model="passportNumber" v-model="passportNumber"
:rules="[ :rules="[
@ -82,7 +84,7 @@ defineProps<{
outlined outlined
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col-3" class="col-md-3 col-6"
:label="$t('formDialogInputWPassportPlace')" :label="$t('formDialogInputWPassportPlace')"
v-model="passportIssuingPlace" v-model="passportIssuingPlace"
:rules="[ :rules="[
@ -103,7 +105,7 @@ defineProps<{
option-value="value" option-value="value"
option-label="label" option-label="label"
:label="$t('formDialogInputPassportCountry')" :label="$t('formDialogInputPassportCountry')"
class="col-3" class="col-md-3 col-6"
:options="passportIssuingCountryOption" :options="passportIssuingCountryOption"
lazy-rules lazy-rules
:rules="[ :rules="[
@ -121,7 +123,7 @@ defineProps<{
:locale="$i18n.locale === 'th-th' ? 'th' : 'en'" :locale="$i18n.locale === 'th-th' ? 'th' : 'en'"
:enableTimePicker="false" :enableTimePicker="false"
:disabled="readonly" :disabled="readonly"
class="col-3" class="col-md-3 col-6"
> >
<template #year="{ value }"> <template #year="{ value }">
{{ $i18n.locale === 'th-th' ? value + 543 : value }} {{ $i18n.locale === 'th-th' ? value + 543 : value }}
@ -178,7 +180,7 @@ defineProps<{
:locale="$i18n.locale === 'th-th' ? 'th' : 'en'" :locale="$i18n.locale === 'th-th' ? 'th' : 'en'"
:enableTimePicker="false" :enableTimePicker="false"
:disabled="readonly" :disabled="readonly"
class="col-3" class="col-md-3 col-6"
> >
<template #year="{ value }"> <template #year="{ value }">
{{ $i18n.locale === 'th-th' ? value + 543 : value }} {{ $i18n.locale === 'th-th' ? value + 543 : value }}

View file

@ -54,8 +54,10 @@ onMounted(async () => {
</script> </script>
<template> <template>
<div class="col-3 app-text-muted"> {{ $t(`formDialogTitleVisa`) }}</div> <div class="col-md-3 col-12 app-text-muted">
<div class="col-9 row q-col-gutter-md"> {{ $t(`formDialogTitleVisa`) }}
</div>
<div class="col-md-9 col-12 row q-col-gutter-md">
<q-select <q-select
id="select-visa-type" id="select-visa-type"
:dense="dense" :dense="dense"
@ -69,7 +71,7 @@ onMounted(async () => {
option-value="value" option-value="value"
option-label="label" option-label="label"
:label="$t('formDialogInputVisaType')" :label="$t('formDialogInputVisaType')"
class="col-3" class="col-md-3 col-6"
:options="visaTypeOption" :options="visaTypeOption"
lazy-rules lazy-rules
/> />
@ -83,7 +85,7 @@ onMounted(async () => {
outlined outlined
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col-3" class="col-md-3 col-6"
:label="$t('formDialogInputVisaNo')" :label="$t('formDialogInputVisaNo')"
v-model="visaNumber" v-model="visaNumber"
/> />
@ -101,7 +103,7 @@ onMounted(async () => {
:locale="$i18n.locale === 'th-th' ? 'th' : 'en'" :locale="$i18n.locale === 'th-th' ? 'th' : 'en'"
:enableTimePicker="false" :enableTimePicker="false"
:disabled="readonly" :disabled="readonly"
class="col-3" class="col-md-3 col-6"
> >
<template #year="{ value }"> <template #year="{ value }">
{{ $i18n.locale === 'th-th' ? value + 543 : value }} {{ $i18n.locale === 'th-th' ? value + 543 : value }}
@ -166,7 +168,7 @@ onMounted(async () => {
:locale="$i18n.locale === 'th-th' ? 'th' : 'en'" :locale="$i18n.locale === 'th-th' ? 'th' : 'en'"
:enableTimePicker="false" :enableTimePicker="false"
:disabled="readonly" :disabled="readonly"
class="col-3" class="col-md-3 col-6"
> >
<template #year="{ value }"> <template #year="{ value }">
{{ $i18n.locale === 'th-th' ? value + 543 : value }} {{ $i18n.locale === 'th-th' ? value + 543 : value }}