refactor: header can't edit Employee on page customer

This commit is contained in:
Net 2024-09-02 15:26:03 +07:00
parent 84eed66b70
commit 8335f6cad6
4 changed files with 17 additions and 6 deletions

View file

@ -58,8 +58,10 @@ withDefaults(
typeCustomer?: string;
prefixId: string;
showBtnSave?: boolean;
hideAction?: boolean;
}>(),
{
hideAction: false,
showBtnSave: false,
},
);
@ -160,7 +162,7 @@ const insuranceCompanyFilter = selectFilterOptionRefMod(
/>
{{ $t(`customerEmployee.formHealthCheck.title`) }}
<AddButton
v-if="!readonly"
v-if="!readonly && !hideAction"
id="btn-add-bank"
icon-only
class="q-ml-sm"
@ -185,7 +187,7 @@ const insuranceCompanyFilter = selectFilterOptionRefMod(
/>
<span class="col-12 flex justify-between items-center">
{{ $t('general.times', { number: index + 1 }) }}
<div class="row items-center">
<div class="row items-center" v-if="!hideAction">
<UndoButton
v-if="!readonly && !!checkup.id && !checkup.statusSave"
id="btn-info-health-undo"

View file

@ -15,6 +15,7 @@ defineProps<{
separator?: boolean;
employee?: boolean;
prefixId: string;
hideAction?: boolean;
}>();
const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
@ -31,7 +32,7 @@ const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
style="background-color: var(--surface-3)"
/>
{{ $t('customerEmployee.form.group.family') }}
<div class="row q-ml-auto">
<div class="row q-ml-auto" v-if="!hideAction">
<UndoButton
v-if="!readonly && !!employeeOther.id && !employeeOther.statusSave"
id="btn-info-health-undo"

View file

@ -38,6 +38,7 @@ defineProps<{
outlined?: boolean;
readonly?: boolean;
prefixId: string;
hideAction?: boolean;
}>();
defineEmits<{
@ -116,7 +117,7 @@ const workplaceFilter = selectFilterOptionRefMod(
/>
{{ $t(`customerEmployee.formWorkHistory.title`) }}
<AddButton
v-if="!readonly"
v-if="!readonly && !hideAction"
id="btn-add-bank"
icon-only
class="q-ml-sm"
@ -142,7 +143,7 @@ const workplaceFilter = selectFilterOptionRefMod(
<span class="col-12 flex justify-between items-center">
{{ $t('general.times', { number: index + 1 }) }}
<div class="row items-center">
<div class="row items-center" v-if="!hideAction">
<UndoButton
v-if="!readonly && !!work.id && !work.statusSave"
id="btn-info-health-undo"