refactor: edit layout

This commit is contained in:
Thanaphon Frappet 2024-11-12 10:40:11 +07:00
parent 1dbb113049
commit cf15595fb9

View file

@ -1,7 +1,6 @@
<script setup lang="ts">
import { EmployeeOtherCreate } from 'stores/employee/types';
import {
AddButton,
EditButton,
DeleteButton,
SaveButton,
@ -18,6 +17,13 @@ defineProps<{
hideAction?: boolean;
}>();
defineEmits<{
(e: 'save'): void;
(e: 'edit'): void;
(e: 'delete'): void;
(e: 'undo'): void;
}>();
const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
</script>
<template>
@ -73,9 +79,20 @@ const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
:readonly="readonly || employeeOther.statusSave"
hide-bottom-space
:label="$t('customerEmployee.formFamily.citizenId')"
class="col"
class="col-4"
v-model="employeeOther.citizenId"
/>
<q-input
:for="`${prefixId}-input-citizen-id`"
:dense="dense"
outlined
:readonly="readonly || employeeOther.statusSave"
hide-bottom-space
:label="$t('customerEmployee.formFamily.telephoneNo')"
class="col-3"
v-model="employeeOther.telephoneNo"
/>
</div>
<div class="col-12 app-text-muted-2">
<q-icon size="xs" class="q-mr-xs" name="mdi-human-male" />
@ -122,16 +139,6 @@ const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
:label="$t('form.lastNameEN')"
v-model="employeeOther.fatherLastNameEN"
/>
<q-input
:for="`${prefixId}-input-father-birthplace`"
:dense="dense"
outlined
:readonly="readonly || employeeOther.statusSave"
hide-bottom-space
class="col-6"
:label="$t('customerEmployee.formFamily.fatherBirthPlace')"
v-model="employeeOther.fatherBirthPlace"
/>
</div>
<div class="col-12 app-text-muted-2">
@ -179,16 +186,6 @@ const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
:label="$t('form.lastNameEN')"
v-model="employeeOther.motherLastNameEN"
/>
<q-input
:for="`${prefixId}-input-mother-birthplace`"
:dense="dense"
outlined
:readonly="readonly || employeeOther.statusSave"
hide-bottom-space
class="col-6"
:label="$t('customerEmployee.formFamily.motherBirthPlace')"
v-model="employeeOther.motherBirthPlace"
/>
</div>
</div>
</div>