refactor edit btn add
This commit is contained in:
parent
04bd1b0ba5
commit
4dce5a5b92
2 changed files with 20 additions and 43 deletions
|
|
@ -1,4 +1,8 @@
|
|||
<script setup lang="ts"></script>
|
||||
<script setup lang="ts">
|
||||
defineProps<{
|
||||
hideIcon?: boolean;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<q-page-sticky position="bottom-right" :offset="[8, 8]">
|
||||
|
|
@ -10,7 +14,12 @@
|
|||
class="color-btn"
|
||||
>
|
||||
<slot>
|
||||
<q-fab-action padding="xs" color="primary" icon="mdi-account-plus" />
|
||||
<q-fab-action
|
||||
padding="xs"
|
||||
color="primary"
|
||||
icon="mdi-account-plus"
|
||||
v-if="!hideIcon"
|
||||
/>
|
||||
</slot>
|
||||
</q-fab>
|
||||
</q-page-sticky>
|
||||
|
|
|
|||
|
|
@ -1510,55 +1510,23 @@ watch(
|
|||
|
||||
<template>
|
||||
<ButtonAddComponent
|
||||
hide-icon
|
||||
v-if="actionDisplay && !currentNoAction"
|
||||
style="z-index: 999"
|
||||
>
|
||||
<q-fab-action
|
||||
v-if="productMode === 'group'"
|
||||
id="btn-add-product-group"
|
||||
style="color: white; background-color: hsla(var(--pink-6-hsl))"
|
||||
padding="xs"
|
||||
icon="mdi-folder-multiple-plus-outline"
|
||||
:label="$t('productService.group.addTitle')"
|
||||
external-label
|
||||
label-position="left"
|
||||
@click="
|
||||
async () => {
|
||||
@click="
|
||||
async () => {
|
||||
if (productMode === 'group') {
|
||||
clearFormGroup();
|
||||
await fetchListOfOptionBranch();
|
||||
dialogInputForm = true;
|
||||
}
|
||||
"
|
||||
/>
|
||||
<q-fab-action
|
||||
v-if="productMode === 'product'"
|
||||
:label="$t('productService.product.addTitle')"
|
||||
id="btn-add-product"
|
||||
external-label
|
||||
label-position="left"
|
||||
style="color: white; background-color: hsla(var(--green-11-hsl))"
|
||||
padding="xs"
|
||||
icon="mdi-folder-multiple-plus-outline"
|
||||
@click="
|
||||
async () => {
|
||||
if (productMode === 'product') {
|
||||
productTab = 1;
|
||||
clearFormProduct();
|
||||
await fetchListOfOptionBranch();
|
||||
dialogProduct = true;
|
||||
}
|
||||
"
|
||||
></q-fab-action>
|
||||
<q-fab-action
|
||||
v-if="productMode === 'service'"
|
||||
:label="$t('productService.service.addTitle')"
|
||||
id="btn-add-service"
|
||||
external-label
|
||||
label-position="left"
|
||||
style="color: white; background-color: hsla(var(--orange-6-hsl))"
|
||||
padding="xs"
|
||||
icon="mdi-server-plus-outline"
|
||||
@click="
|
||||
async () => {
|
||||
if (productMode === 'service') {
|
||||
serviceTab = 1;
|
||||
clearFormGroup();
|
||||
clearFormService();
|
||||
|
|
@ -1566,9 +1534,9 @@ watch(
|
|||
serviceTab = 1;
|
||||
dialogService = true;
|
||||
}
|
||||
"
|
||||
></q-fab-action>
|
||||
</ButtonAddComponent>
|
||||
}
|
||||
"
|
||||
/>
|
||||
|
||||
<div class="full-height column no-wrap">
|
||||
<div class="text-body-2 q-mb-xs flex items-center">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue