refactor: add props showBtnSave of Employee
This commit is contained in:
parent
c2e869a74c
commit
b49956c708
5 changed files with 114 additions and 35 deletions
|
|
@ -40,16 +40,21 @@ const insuranceCompanyOption = defineModel<{ label: string; value: string }[]>(
|
||||||
|
|
||||||
const tab = ref();
|
const tab = ref();
|
||||||
|
|
||||||
defineProps<{
|
withDefaults(
|
||||||
title?: string;
|
defineProps<{
|
||||||
dense?: boolean;
|
title?: string;
|
||||||
outlined?: boolean;
|
dense?: boolean;
|
||||||
readonly?: boolean;
|
outlined?: boolean;
|
||||||
separator?: boolean;
|
readonly?: boolean;
|
||||||
typeCustomer?: string;
|
separator?: boolean;
|
||||||
prefixId: string;
|
typeCustomer?: string;
|
||||||
}>();
|
prefixId: string;
|
||||||
|
showBtnSave?: boolean;
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
showBtnSave: false,
|
||||||
|
},
|
||||||
|
);
|
||||||
async function fetchProvince() {
|
async function fetchProvince() {
|
||||||
const result = await adrressStore.fetchProvince();
|
const result = await adrressStore.fetchProvince();
|
||||||
|
|
||||||
|
|
@ -483,6 +488,19 @@ const insuranceCompanyFilter = selectFilterOptionRefMod(
|
||||||
</q-input>
|
</q-input>
|
||||||
</template>
|
</template>
|
||||||
</VueDatePicker>
|
</VueDatePicker>
|
||||||
|
|
||||||
|
<div class="col-12 row justify-end" style="min-height: 50px">
|
||||||
|
<q-btn
|
||||||
|
v-if="!readonly && showBtnSave"
|
||||||
|
dense
|
||||||
|
unelevated
|
||||||
|
id="save-basic-info"
|
||||||
|
color="primary"
|
||||||
|
class="q-px-md"
|
||||||
|
:label="$t('save')"
|
||||||
|
@click="$emit('save')"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-separator
|
<q-separator
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,20 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { EmployeeOtherCreate } from 'stores/employee/types';
|
import { EmployeeOtherCreate } from 'stores/employee/types';
|
||||||
|
|
||||||
defineProps<{
|
withDefaults(
|
||||||
dense?: boolean;
|
defineProps<{
|
||||||
outlined?: boolean;
|
dense?: boolean;
|
||||||
readonly?: boolean;
|
outlined?: boolean;
|
||||||
separator?: boolean;
|
readonly?: boolean;
|
||||||
employee?: boolean;
|
separator?: boolean;
|
||||||
prefixId: string;
|
employee?: boolean;
|
||||||
}>();
|
prefixId: string;
|
||||||
|
showBtnSave: boolean;
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
showBtnSave: false,
|
||||||
|
},
|
||||||
|
);
|
||||||
const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
|
const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -159,6 +165,19 @@ const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
|
||||||
v-model="employeeOther.motherBirthPlace"
|
v-model="employeeOther.motherBirthPlace"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12 row justify-end" style="min-height: 50px">
|
||||||
|
<q-btn
|
||||||
|
v-if="!readonly && showBtnSave"
|
||||||
|
dense
|
||||||
|
unelevated
|
||||||
|
id="save-basic-info"
|
||||||
|
color="primary"
|
||||||
|
class="q-px-md"
|
||||||
|
:label="$t('save')"
|
||||||
|
@click="$emit('save')"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-separator
|
<q-separator
|
||||||
|
|
|
||||||
|
|
@ -38,15 +38,21 @@ const visaTypeOption = defineModel<{ label: string; value: string }[]>(
|
||||||
{ required: true },
|
{ required: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
defineProps<{
|
withDefaults(
|
||||||
title?: string;
|
defineProps<{
|
||||||
dense?: boolean;
|
title?: string;
|
||||||
outlined?: boolean;
|
dense?: boolean;
|
||||||
readonly?: boolean;
|
outlined?: boolean;
|
||||||
separator?: boolean;
|
readonly?: boolean;
|
||||||
typeCustomer?: string;
|
separator?: boolean;
|
||||||
prefixId: string;
|
typeCustomer?: string;
|
||||||
}>();
|
prefixId: string;
|
||||||
|
showBtnSave: boolean;
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
showBtnSave: false,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
async function fetchProvince() {
|
async function fetchProvince() {
|
||||||
const result = await adrressStore.fetchProvince();
|
const result = await adrressStore.fetchProvince();
|
||||||
|
|
@ -423,6 +429,19 @@ const visaTypeFilter = selectFilterOptionRefMod(
|
||||||
</q-input>
|
</q-input>
|
||||||
</template>
|
</template>
|
||||||
</VueDatePicker>
|
</VueDatePicker>
|
||||||
|
|
||||||
|
<div class="col-12 row justify-end" style="min-height: 50px">
|
||||||
|
<q-btn
|
||||||
|
v-if="!readonly && showBtnSave"
|
||||||
|
dense
|
||||||
|
unelevated
|
||||||
|
id="save-basic-info"
|
||||||
|
color="primary"
|
||||||
|
class="q-px-md"
|
||||||
|
:label="$t('save')"
|
||||||
|
@click="$emit('save')"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-separator
|
<q-separator
|
||||||
|
|
|
||||||
|
|
@ -23,14 +23,20 @@ const workplaceOption = defineModel<{ label: string; value: string }[]>(
|
||||||
|
|
||||||
const tab = ref();
|
const tab = ref();
|
||||||
|
|
||||||
defineProps<{
|
withDefaults(
|
||||||
title?: string;
|
defineProps<{
|
||||||
dense?: boolean;
|
title?: string;
|
||||||
outlined?: boolean;
|
dense?: boolean;
|
||||||
readonly?: boolean;
|
outlined?: boolean;
|
||||||
separator?: boolean;
|
readonly?: boolean;
|
||||||
prefixId: string;
|
separator?: boolean;
|
||||||
}>();
|
prefixId: string;
|
||||||
|
showBtnSave: boolean;
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
showBtnSave: false,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
function addData() {
|
function addData() {
|
||||||
const canAdd = checkTabBeforeAdd(employeeWork.value || []);
|
const canAdd = checkTabBeforeAdd(employeeWork.value || []);
|
||||||
|
|
@ -470,6 +476,19 @@ const workplaceFilter = selectFilterOptionRefMod(
|
||||||
</q-input>
|
</q-input>
|
||||||
</template>
|
</template>
|
||||||
</VueDatePicker>
|
</VueDatePicker>
|
||||||
|
|
||||||
|
<div class="col-12 row justify-end" style="min-height: 50px">
|
||||||
|
<q-btn
|
||||||
|
v-if="!readonly && showBtnSave"
|
||||||
|
dense
|
||||||
|
unelevated
|
||||||
|
id="save-basic-info"
|
||||||
|
color="primary"
|
||||||
|
class="q-px-md"
|
||||||
|
:label="$t('save')"
|
||||||
|
@click="$emit('save')"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-separator
|
<q-separator
|
||||||
|
|
|
||||||
|
|
@ -3394,6 +3394,7 @@ watch(isMainPage, () => {
|
||||||
formDataEmployeeTab === 'healthCheck' &&
|
formDataEmployeeTab === 'healthCheck' &&
|
||||||
formDataEmployee.employeeCheckup
|
formDataEmployee.employeeCheckup
|
||||||
"
|
"
|
||||||
|
show-btn-save
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model:employee-checkup="formDataEmployee.employeeCheckup"
|
v-model:employee-checkup="formDataEmployee.employeeCheckup"
|
||||||
|
|
@ -3412,6 +3413,7 @@ watch(isMainPage, () => {
|
||||||
v-model:position-name-option="optionStore.globalOption.position"
|
v-model:position-name-option="optionStore.globalOption.position"
|
||||||
v-model:job-type-option="optionStore.globalOption.businessType"
|
v-model:job-type-option="optionStore.globalOption.businessType"
|
||||||
v-model:workplace-option="optionStore.globalOption.area"
|
v-model:workplace-option="optionStore.globalOption.area"
|
||||||
|
show-btn-save
|
||||||
/>
|
/>
|
||||||
<FormEmployeeOther
|
<FormEmployeeOther
|
||||||
prefix-id="form-dialog"
|
prefix-id="form-dialog"
|
||||||
|
|
@ -3421,6 +3423,7 @@ watch(isMainPage, () => {
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model:employee-other="formDataEmployee.employeeOtherInfo"
|
v-model:employee-other="formDataEmployee.employeeOtherInfo"
|
||||||
|
show-btn-save
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #by-type>
|
<template #by-type>
|
||||||
|
|
@ -3460,6 +3463,7 @@ watch(isMainPage, () => {
|
||||||
v-model:tm6-number="formDataEmployee.tm6Number"
|
v-model:tm6-number="formDataEmployee.tm6Number"
|
||||||
v-model:entry-date="formDataEmployee.entryDate"
|
v-model:entry-date="formDataEmployee.entryDate"
|
||||||
v-model:visa-type-option="optionStore.globalOption.nationality"
|
v-model:visa-type-option="optionStore.globalOption.nationality"
|
||||||
|
show-btn-save
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</FormDialog>
|
</FormDialog>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue