refactor: header can't edit Employee on page customer
This commit is contained in:
parent
84eed66b70
commit
8335f6cad6
4 changed files with 17 additions and 6 deletions
|
|
@ -58,8 +58,10 @@ withDefaults(
|
||||||
typeCustomer?: string;
|
typeCustomer?: string;
|
||||||
prefixId: string;
|
prefixId: string;
|
||||||
showBtnSave?: boolean;
|
showBtnSave?: boolean;
|
||||||
|
hideAction?: boolean;
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
|
hideAction: false,
|
||||||
showBtnSave: false,
|
showBtnSave: false,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
@ -160,7 +162,7 @@ const insuranceCompanyFilter = selectFilterOptionRefMod(
|
||||||
/>
|
/>
|
||||||
{{ $t(`customerEmployee.formHealthCheck.title`) }}
|
{{ $t(`customerEmployee.formHealthCheck.title`) }}
|
||||||
<AddButton
|
<AddButton
|
||||||
v-if="!readonly"
|
v-if="!readonly && !hideAction"
|
||||||
id="btn-add-bank"
|
id="btn-add-bank"
|
||||||
icon-only
|
icon-only
|
||||||
class="q-ml-sm"
|
class="q-ml-sm"
|
||||||
|
|
@ -185,7 +187,7 @@ const insuranceCompanyFilter = selectFilterOptionRefMod(
|
||||||
/>
|
/>
|
||||||
<span class="col-12 flex justify-between items-center">
|
<span class="col-12 flex justify-between items-center">
|
||||||
{{ $t('general.times', { number: index + 1 }) }}
|
{{ $t('general.times', { number: index + 1 }) }}
|
||||||
<div class="row items-center">
|
<div class="row items-center" v-if="!hideAction">
|
||||||
<UndoButton
|
<UndoButton
|
||||||
v-if="!readonly && !!checkup.id && !checkup.statusSave"
|
v-if="!readonly && !!checkup.id && !checkup.statusSave"
|
||||||
id="btn-info-health-undo"
|
id="btn-info-health-undo"
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ defineProps<{
|
||||||
separator?: boolean;
|
separator?: boolean;
|
||||||
employee?: boolean;
|
employee?: boolean;
|
||||||
prefixId: string;
|
prefixId: string;
|
||||||
|
hideAction?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
|
const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
|
||||||
|
|
@ -31,7 +32,7 @@ const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
|
||||||
style="background-color: var(--surface-3)"
|
style="background-color: var(--surface-3)"
|
||||||
/>
|
/>
|
||||||
{{ $t('customerEmployee.form.group.family') }}
|
{{ $t('customerEmployee.form.group.family') }}
|
||||||
<div class="row q-ml-auto">
|
<div class="row q-ml-auto" v-if="!hideAction">
|
||||||
<UndoButton
|
<UndoButton
|
||||||
v-if="!readonly && !!employeeOther.id && !employeeOther.statusSave"
|
v-if="!readonly && !!employeeOther.id && !employeeOther.statusSave"
|
||||||
id="btn-info-health-undo"
|
id="btn-info-health-undo"
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ defineProps<{
|
||||||
outlined?: boolean;
|
outlined?: boolean;
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
prefixId: string;
|
prefixId: string;
|
||||||
|
hideAction?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
defineEmits<{
|
defineEmits<{
|
||||||
|
|
@ -116,7 +117,7 @@ const workplaceFilter = selectFilterOptionRefMod(
|
||||||
/>
|
/>
|
||||||
{{ $t(`customerEmployee.formWorkHistory.title`) }}
|
{{ $t(`customerEmployee.formWorkHistory.title`) }}
|
||||||
<AddButton
|
<AddButton
|
||||||
v-if="!readonly"
|
v-if="!readonly && !hideAction"
|
||||||
id="btn-add-bank"
|
id="btn-add-bank"
|
||||||
icon-only
|
icon-only
|
||||||
class="q-ml-sm"
|
class="q-ml-sm"
|
||||||
|
|
@ -142,7 +143,7 @@ const workplaceFilter = selectFilterOptionRefMod(
|
||||||
<span class="col-12 flex justify-between items-center">
|
<span class="col-12 flex justify-between items-center">
|
||||||
{{ $t('general.times', { number: index + 1 }) }}
|
{{ $t('general.times', { number: index + 1 }) }}
|
||||||
|
|
||||||
<div class="row items-center">
|
<div class="row items-center" v-if="!hideAction">
|
||||||
<UndoButton
|
<UndoButton
|
||||||
v-if="!readonly && !!work.id && !work.statusSave"
|
v-if="!readonly && !!work.id && !work.statusSave"
|
||||||
id="btn-info-health-undo"
|
id="btn-info-health-undo"
|
||||||
|
|
|
||||||
|
|
@ -3078,7 +3078,7 @@ const emptyCreateDialog = ref(false);
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
:active="currentFromDataEmployee.status !== 'INACTIVE'"
|
:active="currentFromDataEmployee.status !== 'INACTIVE'"
|
||||||
use-toggle
|
:use-toggle="currentTab === 'employee'"
|
||||||
color="white"
|
color="white"
|
||||||
icon="mdi-account-outline"
|
icon="mdi-account-outline"
|
||||||
:bg-color="
|
:bg-color="
|
||||||
|
|
@ -3198,6 +3198,7 @@ const emptyCreateDialog = ref(false);
|
||||||
<div
|
<div
|
||||||
class="surface-1 rounded q-pt-sm row"
|
class="surface-1 rounded q-pt-sm row"
|
||||||
style="position: absolute; z-index: 999; right: 4%"
|
style="position: absolute; z-index: 999; right: 4%"
|
||||||
|
v-if="currentTab === 'employee'"
|
||||||
>
|
>
|
||||||
<UndoButton
|
<UndoButton
|
||||||
v-if="employeeFormState.isEmployeeEdit"
|
v-if="employeeFormState.isEmployeeEdit"
|
||||||
|
|
@ -3504,6 +3505,8 @@ const emptyCreateDialog = ref(false);
|
||||||
prefix-id="drawer-employee"
|
prefix-id="drawer-employee"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
:hide-action="currentTab !== 'employee'"
|
||||||
|
:readonly="!employeeFormState.isEmployeeEdit"
|
||||||
v-model:current-index="employeeFormState.currentIndex"
|
v-model:current-index="employeeFormState.currentIndex"
|
||||||
v-model:employee-checkup="
|
v-model:employee-checkup="
|
||||||
currentFromDataEmployee.employeeCheckup
|
currentFromDataEmployee.employeeCheckup
|
||||||
|
|
@ -3564,7 +3567,9 @@ const emptyCreateDialog = ref(false);
|
||||||
id="drawer-work-history"
|
id="drawer-work-history"
|
||||||
prefix-id="drawer-employee"
|
prefix-id="drawer-employee"
|
||||||
dense
|
dense
|
||||||
|
:hide-action="currentTab !== 'employee'"
|
||||||
outlined
|
outlined
|
||||||
|
:readonly="!employeeFormState.isEmployeeEdit"
|
||||||
v-model:current-index="employeeFormState.currentIndex"
|
v-model:current-index="employeeFormState.currentIndex"
|
||||||
v-model:employee-work="currentFromDataEmployee.employeeWork"
|
v-model:employee-work="currentFromDataEmployee.employeeWork"
|
||||||
v-model:position-name-option="optionStore.globalOption.position"
|
v-model:position-name-option="optionStore.globalOption.position"
|
||||||
|
|
@ -3608,10 +3613,12 @@ const emptyCreateDialog = ref(false);
|
||||||
</template>
|
</template>
|
||||||
<template v-if="employeeFormState.currentTab === 'other'">
|
<template v-if="employeeFormState.currentTab === 'other'">
|
||||||
<FormEmployeeOther
|
<FormEmployeeOther
|
||||||
|
:hide-action="currentTab !== 'employee'"
|
||||||
v-if="employeeFormState.currentTab === 'other'"
|
v-if="employeeFormState.currentTab === 'other'"
|
||||||
id="drawer-other"
|
id="drawer-other"
|
||||||
prefix-id="drawer-employee"
|
prefix-id="drawer-employee"
|
||||||
dense
|
dense
|
||||||
|
:readonly="!employeeFormState.isEmployeeEdit"
|
||||||
outlined
|
outlined
|
||||||
v-model:employee-other="
|
v-model:employee-other="
|
||||||
currentFromDataEmployee.employeeOtherInfo
|
currentFromDataEmployee.employeeOtherInfo
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue