Merge pull request 'refactor: refs #8317 disable action buttons when no rows are selected in ItemFixedPrice' (!1174) from 8317-buttonsToRightOnItemFixedPrice into dev
gitea/salix-front/pipeline/head This commit looks good Details

Reviewed-on: #1174
Reviewed-by: Jorge Penadés <jorgep@verdnatura.es>
Reviewed-by: Jon Elias <jon@verdnatura.es>
This commit is contained in:
Jose Antonio Tubau 2025-01-08 06:09:55 +00:00
commit 666cdc7674
1 changed files with 4 additions and 3 deletions

View File

@ -35,6 +35,7 @@ const editTableCellDialogRef = ref(null);
const user = state.getUser(); const user = state.getUser();
const fixedPrices = ref([]); const fixedPrices = ref([]);
const warehousesOptions = ref([]); const warehousesOptions = ref([]);
const hasSelectedRows = computed(() => rowsSelected.value.length > 0);
const rowsSelected = ref([]); const rowsSelected = ref([]);
const itemFixedPriceFilterRef = ref(); const itemFixedPriceFilterRef = ref();
@ -368,9 +369,9 @@ function handleOnDataSave({ CrudModelRef }) {
</template> </template>
</RightMenu> </RightMenu>
<VnSubToolbar> <VnSubToolbar>
<template #st-data> <template #st-actions>
<QBtn <QBtn
v-if="rowsSelected.length" :disable="!hasSelectedRows"
@click="openEditTableCellDialog()" @click="openEditTableCellDialog()"
color="primary" color="primary"
icon="edit" icon="edit"
@ -380,13 +381,13 @@ function handleOnDataSave({ CrudModelRef }) {
</QTooltip> </QTooltip>
</QBtn> </QBtn>
<QBtn <QBtn
:disable="!hasSelectedRows"
:label="tMobile('globals.remove')" :label="tMobile('globals.remove')"
color="primary" color="primary"
icon="delete" icon="delete"
flat flat
@click="(row) => confirmRemove(row, true)" @click="(row) => confirmRemove(row, true)"
:title="t('globals.remove')" :title="t('globals.remove')"
v-if="rowsSelected.length"
/> />
</template> </template>
</VnSubToolbar> </VnSubToolbar>