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