feat: itemProposal selection
This commit is contained in:
parent
ad64ee4755
commit
df911e0210
|
@ -2,6 +2,7 @@
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import VnPaginate from 'components/ui/VnPaginate.vue';
|
import VnPaginate from 'components/ui/VnPaginate.vue';
|
||||||
|
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
@ -11,6 +12,8 @@ const $props = defineProps({
|
||||||
default: () => {},
|
default: () => {},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
const proposalSelected = ref([]);
|
||||||
|
|
||||||
const showProposalDialog = ref(false);
|
const showProposalDialog = ref(false);
|
||||||
const defaultColumnAttrs = {
|
const defaultColumnAttrs = {
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -46,7 +49,8 @@ const columns = computed(() => [
|
||||||
field: statusConditionalValue,
|
field: statusConditionalValue,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
...defaultColumnAttrs,
|
align: 'center',
|
||||||
|
sortable: true,
|
||||||
label: t('proposal.longName'),
|
label: t('proposal.longName'),
|
||||||
name: 'longName',
|
name: 'longName',
|
||||||
field: 'longName',
|
field: 'longName',
|
||||||
|
@ -116,9 +120,7 @@ const columns = computed(() => [
|
||||||
<QDialog ref="dialogRef" @hide="onDialogHide" v-model="showProposalDialog" full-width>
|
<QDialog ref="dialogRef" @hide="onDialogHide" v-model="showProposalDialog" full-width>
|
||||||
<QCard class="q-pa-lg">
|
<QCard class="q-pa-lg">
|
||||||
<QCardSection class="row items-center q-pb-none">
|
<QCardSection class="row items-center q-pb-none">
|
||||||
<span class="text-h6 text-grey">{{
|
<span class="text-h6 text-grey">{{ t('proposal.title') }}</span>
|
||||||
t('negative.modalOrigin.title')
|
|
||||||
}}</span>
|
|
||||||
<QSpace />
|
<QSpace />
|
||||||
<QBtn icon="close" flat round dense v-close-popup />
|
<QBtn icon="close" flat round dense v-close-popup />
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
|
@ -139,10 +141,11 @@ const columns = computed(() => [
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
selection="multiple"
|
selection="single"
|
||||||
:pagination="{ rowsPerPage: 0 }"
|
:pagination="{ rowsPerPage: 0 }"
|
||||||
class="full-width q-mt-md"
|
class="full-width q-mt-md"
|
||||||
:no-data-label="t('globals.noResults')"
|
:no-data-label="t('globals.noResults')"
|
||||||
|
v-model:selected="proposalSelected"
|
||||||
:dense="$q.screen.lt.md"
|
:dense="$q.screen.lt.md"
|
||||||
flat
|
flat
|
||||||
:grid="$q.screen.lt.md"
|
:grid="$q.screen.lt.md"
|
||||||
|
@ -169,7 +172,12 @@ const columns = computed(() => [
|
||||||
</QTd>
|
</QTd>
|
||||||
</QTr>
|
</QTr>
|
||||||
</template>
|
</template>
|
||||||
|
<template #body-cell-longName="{ row, value }">
|
||||||
|
<QTd align="right" class="text-primary">
|
||||||
|
<QBtn flat color="blue" dense>{{ value }}</QBtn>
|
||||||
|
<ItemDescriptorProxy :id="row.id" />
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
<template #body-cell-status="{ value }">
|
<template #body-cell-status="{ value }">
|
||||||
<QTd class="col" align="center">
|
<QTd class="col" align="center">
|
||||||
<div
|
<div
|
||||||
|
@ -177,7 +185,9 @@ const columns = computed(() => [
|
||||||
style="height: 10px"
|
style="height: 10px"
|
||||||
></div>
|
></div>
|
||||||
</QTd>
|
</QTd>
|
||||||
</template> </QTable></template></VnPaginate
|
</template>
|
||||||
|
</QTable>
|
||||||
|
</template> </VnPaginate
|
||||||
></QCardSection>
|
></QCardSection>
|
||||||
</QCard>
|
</QCard>
|
||||||
</QDialog>
|
</QDialog>
|
||||||
|
|
|
@ -79,6 +79,7 @@ itemTags:
|
||||||
value: Value
|
value: Value
|
||||||
relevancy: Relevancy
|
relevancy: Relevancy
|
||||||
proposal:
|
proposal:
|
||||||
|
title: Items proposal
|
||||||
itemFk: Item
|
itemFk: Item
|
||||||
longName: Name
|
longName: Name
|
||||||
subName: Producer
|
subName: Producer
|
||||||
|
|
|
@ -79,6 +79,7 @@ itemTags:
|
||||||
value: Valor
|
value: Valor
|
||||||
relevancy: Relevancia
|
relevancy: Relevancia
|
||||||
proposal:
|
proposal:
|
||||||
|
title: Items de sustitución
|
||||||
itemFk: Item
|
itemFk: Item
|
||||||
longName: Nombre
|
longName: Nombre
|
||||||
subName: Productor
|
subName: Productor
|
||||||
|
|
|
@ -40,3 +40,11 @@ negative:
|
||||||
peticionCompra: 'Ticket request'
|
peticionCompra: 'Ticket request'
|
||||||
isRookie: 'Is rookie'
|
isRookie: 'Is rookie'
|
||||||
turno: 'Turn line'
|
turno: 'Turn line'
|
||||||
|
showFree: Show Free lines
|
||||||
|
modal:
|
||||||
|
changeState:
|
||||||
|
title: Update tickets state
|
||||||
|
placeholder: New state
|
||||||
|
changeQuantity:
|
||||||
|
title: Update tickets quantity
|
||||||
|
placeholder: New quantity
|
||||||
|
|
Loading…
Reference in New Issue