refactor: add props showBtnSave
This commit is contained in:
parent
feb7fa2575
commit
c2e869a74c
2 changed files with 21 additions and 11 deletions
|
|
@ -31,16 +31,22 @@ const customerBranch = defineModel<{
|
|||
const employeeId = defineModel<string>('employeeId');
|
||||
const nrcNo = defineModel<string>('nrcNo');
|
||||
|
||||
const props = defineProps<{
|
||||
dense?: boolean;
|
||||
outlined?: boolean;
|
||||
readonly?: boolean;
|
||||
separator?: boolean;
|
||||
typeCustomer?: string;
|
||||
employee?: boolean;
|
||||
employeeOwnerOption?: CustomerBranch[];
|
||||
prefixId: string;
|
||||
}>();
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
dense?: boolean;
|
||||
outlined?: boolean;
|
||||
readonly?: boolean;
|
||||
separator?: boolean;
|
||||
typeCustomer?: string;
|
||||
employee?: boolean;
|
||||
employeeOwnerOption?: CustomerBranch[];
|
||||
prefixId: string;
|
||||
showBtnSave: boolean;
|
||||
}>(),
|
||||
{
|
||||
showBtnSave: false,
|
||||
},
|
||||
);
|
||||
|
||||
defineEmits<{
|
||||
(e: 'filterOwnerBranch', val: string, update: void): void;
|
||||
|
|
@ -440,7 +446,7 @@ onMounted(() => {
|
|||
</div>
|
||||
<div class="col-12 row justify-end" style="min-height: 50px">
|
||||
<q-btn
|
||||
v-if="!readonly"
|
||||
v-if="!readonly && showBtnSave"
|
||||
dense
|
||||
unelevated
|
||||
id="save-basic-info"
|
||||
|
|
|
|||
|
|
@ -608,6 +608,7 @@ const employeeHistoryDialog = ref(false);
|
|||
const employeeHistory = ref<EmployeeHistory[]>();
|
||||
|
||||
async function triggerCreate(type: CustomerType) {
|
||||
countStartsOne.value = 1;
|
||||
customerType.value = type;
|
||||
await fetchListOfOptionBranch();
|
||||
openDialogInputForm();
|
||||
|
|
@ -3159,6 +3160,7 @@ watch(isMainPage, () => {
|
|||
v-model:customer-name-en="formData.customerNameEN"
|
||||
v-model:person-name="formData.personName"
|
||||
v-model:tax-no="formData.taxNo"
|
||||
:show-btn-save="true"
|
||||
@save="
|
||||
async () => {
|
||||
await onSubmitBasicInformation();
|
||||
|
|
@ -3309,6 +3311,7 @@ watch(isMainPage, () => {
|
|||
<FormDialog
|
||||
employee
|
||||
disabledRule
|
||||
:hiddenBtnSave="false"
|
||||
addressSeparator
|
||||
v-model:modal="dialogEmployee"
|
||||
:noAddress="formDataEmployeeTab !== 'personalInfo'"
|
||||
|
|
@ -3661,6 +3664,7 @@ watch(isMainPage, () => {
|
|||
dense
|
||||
outlined
|
||||
separator
|
||||
:show-btn-save="true"
|
||||
:readonly="!infoDrawerEdit"
|
||||
:type-customer="customerType"
|
||||
v-model:options-branch="branchOption"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue