refactor: set layout btn add

This commit is contained in:
Net 2024-07-24 11:34:45 +07:00
parent 2f6a9791ad
commit 467a862344

View file

@ -1190,8 +1190,6 @@ async function assignFormData(customerId: string, branch?: CustomerBranch) {
});
cloneData();
console.log(formData.value);
}
function cloneData() {
@ -1566,6 +1564,7 @@ watch(
<template>
<ButtonAddComponent style="z-index: 999">
<div v-if="isMainPage">
<q-fab-action
v-if="selectorLabel === 'EMPLOYER' || !selectorLabel"
id="add-customer-legal-entity"
@ -1587,7 +1586,7 @@ watch(
style="color: white; background-color: hsla(var(--teal-10-hsl))"
padding="xs"
icon="mdi-account-plus"
></q-fab-action>
/>
<q-fab-action
v-if="selectorLabel === 'EMPLOYEE' || !selectorLabel"
:label="$t('add') + ' ' + $t('EMPLOYEE')"
@ -1598,7 +1597,25 @@ watch(
color="primary"
padding="xs"
icon="mdi-account-plus"
></q-fab-action>
/>
</div>
<div v-else>
<q-fab-action
id="add-branch"
:style="`color: white; background-color: ${customerType === 'CORP' ? 'hsla(var(--violet-11-hsl))' : 'hsla(var(--pink-6-hsl))'}`"
@click="
() => {
indexTab = 0;
dialogInputCustomerBranchForm = true;
}
"
padding="xs"
icon="mdi-office-building"
:label="$t('formDialogTitleCreateSubBranch')"
external-label
label-position="left"
/>
</div>
</ButtonAddComponent>
<div class="column full-height no-wrap">
@ -2830,12 +2847,6 @@ watch(
clearForm();
}
"
@dialog="
() => {
indexTab = 0;
dialogInputCustomerBranchForm = true;
}
"
@viewDetail="
async (v, i) => {
currentBranchId = v.id;