Merge branch 'master' into Hotfix-VnSearchbarRemoveParams
gitea/salix-front/pipeline/pr-master This commit looks good Details

This commit is contained in:
Jon Elias 2024-12-27 09:48:39 +00:00
commit d73b03f757
3 changed files with 31 additions and 27 deletions

View File

@ -54,8 +54,8 @@ const $props = defineProps({
default: true,
},
bottom: {
type: Object,
default: null,
type: Boolean,
default: false,
},
cardClass: {
type: String,
@ -575,29 +575,6 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
/>
</QTd>
</template>
<template #bottom v-if="bottom">
<slot name="bottom-table">
<QBtn
@click="
() =>
createAsDialog
? (showForm = !showForm)
: handleOnDataSaved(create)
"
class="cursor-pointer fill-icon"
color="primary"
icon="add_circle"
size="md"
round
flat
shortcut="+"
:disabled="!disabledAttr"
/>
<QTooltip>
{{ createForm.title }}
</QTooltip>
</slot>
</template>
<template #item="{ row, colsMap }">
<component
:is="$props.redirect ? 'router-link' : 'span'"
@ -727,6 +704,27 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
</QTr>
</template>
</QTable>
<div class="full-width bottomButton" v-if="bottom">
<QBtn
@click="
() =>
createAsDialog
? (showForm = !showForm)
: handleOnDataSaved(create)
"
class="cursor-pointer fill-icon"
color="primary"
icon="add_circle"
size="md"
round
flat
shortcut="+"
:disabled="!disabledAttr"
/>
<QTooltip>
{{ createForm.title }}
</QTooltip>
</div>
</template>
</CrudModel>
<QPageSticky v-if="$props.create" :offset="[20, 20]" style="z-index: 2">

View File

@ -149,7 +149,8 @@ select:-webkit-autofill {
.q-card,
.q-table,
.q-table__bottom,
.q-drawer {
.q-drawer,
.bottomButton {
background-color: var(--vn-section-color);
}

View File

@ -54,6 +54,7 @@ const transfer = ref({
});
const tableRef = ref([]);
const canProceed = ref();
const isLoading = ref(false);
watch(
() => route.params.id,
@ -213,6 +214,9 @@ const updateQuantity = async ({ quantity, id }) => {
};
const addSale = async (sale) => {
if (isLoading.value) return;
isLoading.value = true;
const params = {
barcode: sale.itemFk,
quantity: sale.quantity,
@ -233,7 +237,7 @@ const addSale = async (sale) => {
sale.item = newSale.item;
notify('globals.dataSaved', 'positive');
window.location.reload();
arrayData.fetch({});
};
const updateConcept = async (sale) => {
@ -466,6 +470,7 @@ const addRow = (original = null) => {
};
const endNewRow = (row) => {
if (!row) return;
if (row.itemFk && row.quantity) {
row.isNew = false;
}