From df911e02102d5bdc0575abc8edb3a96658ab8a80 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 14 May 2024 09:55:36 +0200 Subject: [PATCH] feat: itemProposal selection --- src/pages/Item/components/ItemProposal.vue | 24 +++++++++++++++------- src/pages/Item/locale/en.yml | 1 + src/pages/Item/locale/es.yml | 1 + src/pages/Ticket/locale/en.yml | 8 ++++++++ 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/src/pages/Item/components/ItemProposal.vue b/src/pages/Item/components/ItemProposal.vue index c9195376a..51a9ba721 100644 --- a/src/pages/Item/components/ItemProposal.vue +++ b/src/pages/Item/components/ItemProposal.vue @@ -2,6 +2,7 @@ import { ref, computed } from 'vue'; import { useI18n } from 'vue-i18n'; import VnPaginate from 'components/ui/VnPaginate.vue'; +import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue'; const { t } = useI18n(); @@ -11,6 +12,8 @@ const $props = defineProps({ default: () => {}, }, }); +const proposalSelected = ref([]); + const showProposalDialog = ref(false); const defaultColumnAttrs = { align: 'left', @@ -46,7 +49,8 @@ const columns = computed(() => [ field: statusConditionalValue, }, { - ...defaultColumnAttrs, + align: 'center', + sortable: true, label: t('proposal.longName'), name: 'longName', field: 'longName', @@ -116,9 +120,7 @@ const columns = computed(() => [ - {{ - t('negative.modalOrigin.title') - }} + {{ t('proposal.title') }} @@ -139,10 +141,11 @@ const columns = computed(() => [ :rows="rows" :columns="columns" row-key="id" - selection="multiple" + selection="single" :pagination="{ rowsPerPage: 0 }" class="full-width q-mt-md" :no-data-label="t('globals.noResults')" + v-model:selected="proposalSelected" :dense="$q.screen.lt.md" flat :grid="$q.screen.lt.md" @@ -169,7 +172,12 @@ const columns = computed(() => [ - + + + diff --git a/src/pages/Item/locale/en.yml b/src/pages/Item/locale/en.yml index fc83a77ff..188011d17 100644 --- a/src/pages/Item/locale/en.yml +++ b/src/pages/Item/locale/en.yml @@ -79,6 +79,7 @@ itemTags: value: Value relevancy: Relevancy proposal: + title: Items proposal itemFk: Item longName: Name subName: Producer diff --git a/src/pages/Item/locale/es.yml b/src/pages/Item/locale/es.yml index 4eea05b66..d998496a2 100644 --- a/src/pages/Item/locale/es.yml +++ b/src/pages/Item/locale/es.yml @@ -79,6 +79,7 @@ itemTags: value: Valor relevancy: Relevancia proposal: + title: Items de sustituciĆ³n itemFk: Item longName: Nombre subName: Productor diff --git a/src/pages/Ticket/locale/en.yml b/src/pages/Ticket/locale/en.yml index ea84480f4..55ecb6da7 100644 --- a/src/pages/Ticket/locale/en.yml +++ b/src/pages/Ticket/locale/en.yml @@ -40,3 +40,11 @@ negative: peticionCompra: 'Ticket request' isRookie: 'Is rookie' turno: 'Turn line' + showFree: Show Free lines + modal: + changeState: + title: Update tickets state + placeholder: New state + changeQuantity: + title: Update tickets quantity + placeholder: New quantity