feat: itemProposal table
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javier Segarra 2024-04-30 15:23:49 +02:00
parent 0988936884
commit 1929545e5b
3 changed files with 101 additions and 19 deletions

View File

@ -65,34 +65,85 @@ const defaultColumnFilter = {
}, },
}; };
const conditionalValue = (tag) => (tag === 1 ? 'redd' : 'blackd');
const columns = computed(() => [ const columns = computed(() => [
{ {
label: t('item.fixedPrice.itemId'),
name: 'itemId',
field: 'itemFk',
...defaultColumnAttrs, ...defaultColumnAttrs,
columnFilter: { label: t('proposal.itemFk'),
...defaultColumnFilter, name: 'id',
}, field: 'id',
},
{
...defaultColumnAttrs,
label: t('proposal.longName'),
name: 'longName',
field: 'longName',
},
{
...defaultColumnAttrs,
label: t('proposal.subName'),
name: 'subName',
field: 'subName',
},
{
...defaultColumnAttrs,
label: t('proposal.value5'),
name: 'value5',
field: 'value5',
classes: ({ match5 }) => conditionalValue(match5),
},
{
...defaultColumnAttrs,
label: t('proposal.value6'),
name: 'value6',
field: 'value6',
classes: ({ match6 }) => conditionalValue(match6),
},
{
...defaultColumnAttrs,
label: t('proposal.value7'),
name: 'value7',
field: 'value7',
classes: ({ match7 }) => conditionalValue(match7),
},
{
...defaultColumnAttrs,
label: t('proposal.value8'),
name: 'value8',
field: 'value8',
classes: ({ match8 }) => conditionalValue(match8),
},
{
...defaultColumnAttrs,
label: t('proposal.available'),
name: 'available',
field: 'available',
},
{
...defaultColumnAttrs,
label: t('proposal.minQuantity'),
name: 'minQuantity',
field: 'minQuantity',
},
{
...defaultColumnAttrs,
label: t('proposal.price2'),
name: 'price2',
field: 'price2',
},
{
...defaultColumnAttrs,
label: t('proposal.located'),
name: 'located',
field: 'located',
}, },
]); ]);
// const editTableFieldsOptions = [
// {
// field: 'rate2',
// label: t('item.fixedPrice.groupingPrice'),
// component: 'input',
// attrs: {
// type: 'number',
// },
// },
// ];
</script> </script>
<template> <template>
<QDialog ref="dialogRef" @hide="onDialogHide" v-model="showProposalDialog"> <QDialog ref="dialogRef" @hide="onDialogHide" v-model="showProposalDialog">
<QCard class="q-pa-sm"> <QCard class="q-pa-sm">
<QCardSection class="row items-center q-pb-none"> <QCardSection class="row items-center q-pb-none">
{{ $props.item }} <!-- {{ $props.item }} -->
<span class="text-h6 text-grey">{{ <span class="text-h6 text-grey">{{
t('negative.modalOrigin.title') t('negative.modalOrigin.title')
}}</span> }}</span>
@ -149,7 +200,14 @@ const columns = computed(() => [
</QCard> </QCard>
</QDialog> </QDialog>
</template> </template>
<style lang="scss" scoped></style> <style lang="scss">
.redd {
background-color: red;
}
.blackd {
color: black;
}
</style>
<i18n> <i18n>
es: es:

View File

@ -0,0 +1,12 @@
proposal:
itemFk: itemFk
longName: longName
subName: subName
value5: value5
value6: value6
value7: value7
value8: value8
available: available
minQuantity: minQuantity
price2: price2
located: located

View File

@ -0,0 +1,12 @@
proposal:
itemFk: itemFk
longName: longName
subName: subName
value5: value5
value6: value6
value7: value7
value8: value8
available: available
minQuantity: minQuantity
price2: price2
located: located