0
0
Fork 0

Merge branch '6897-EntryMigration' of https://gitea.verdnatura.es/verdnatura/salix-front into 6897-EntryMigration

This commit is contained in:
Carlos Satorres 2024-06-18 07:18:47 +02:00
commit 0940872625
3 changed files with 28 additions and 16 deletions

View File

@ -396,6 +396,7 @@ entry:
type: Type
color: Color
id: ID
printedStickers: Printed stickers
notes:
observationType: Observation type
descriptor:

View File

@ -394,6 +394,7 @@ entry:
type: Tipo
color: Color
id: ID
printedStickers: Etiquetas impresas
notes:
observationType: Tipo de observación
descriptor:

View File

@ -82,6 +82,16 @@ const tableColumnComponents = computed(() => ({
},
event: getInputEvents,
},
printedStickers: {
component: VnInput,
props: {
type: 'number',
min: 0,
class: 'input-number',
dense: true,
},
event: getInputEvents,
},
weight: {
component: VnInput,
props: {
@ -147,7 +157,7 @@ const entriesTableColumns = computed(() => {
return [
{
label: t('entry.summary.item'),
field: 'id',
field: 'itemFk',
name: 'item',
align: 'left',
},
@ -169,6 +179,12 @@ const entriesTableColumns = computed(() => {
name: 'stickers',
align: 'left',
},
{
label: t('entry.buys.printedStickers'),
field: 'printedStickers',
name: 'printedStickers',
align: 'left',
},
{
label: t('entry.summary.weight'),
field: 'weight',
@ -216,7 +232,6 @@ const entriesTableColumns = computed(() => {
});
const copyOriginalRowsData = (rows) => {
// el objetivo de esto es guardar los valores iniciales de todas las rows para evitar guardar cambios si la data no cambió al disparar los eventos
originalRowDataCopy.value = JSON.parse(JSON.stringify(rows));
};
@ -386,19 +401,16 @@ const lockIconType = (groupingMode, mode) => {
</template>
<ItemDescriptorProxy
v-if="col.name === 'item'"
:id="props.row.id"
:id="props.row.item.id"
/>
</component>
</QTd>
</QTr>
<QTr no-hover>
<QTr no-hover class="full-width infoRow" style="column-span: all">
<QTd />
<QTd>
<QTd cols>
<span>{{ props.row.item.itemType.code }}</span>
</QTd>
<QTd>
<span>{{ props.row.item.id }}</span>
</QTd>
<QTd>
<span>{{ props.row.item.size }}</span>
</QTd>
@ -413,10 +425,6 @@ const lockIconType = (groupingMode, mode) => {
<FetchedTags :item="props.row.item" :max-length="5" />
</QTd>
</QTr>
<!-- Esta última row es utilizada para agregar un espaciado y así marcar una diferencia visual entre los diferentes buys -->
<QTr v-if="props.rowIndex !== rows.length - 1" class="separation-row">
<QTd colspan="12" class="vn-table-separation-row" />
</QTr>
</template>
<template #item="props">
<div class="q-pa-xs col-xs-12 col-sm-6 grid-style-transition">
@ -466,11 +474,13 @@ const lockIconType = (groupingMode, mode) => {
</template>
<style lang="scss" scoped>
.separation-row {
background-color: var(--vn-section-color) !important;
.q-table--horizontal-separator tbody tr:nth-child(odd) > td {
border-bottom-width: 0px;
border-top-width: 2px;
border-color: var(--vn-text-color);
}
.grid-style-transition {
transition: transform 0.28s, background-color 0.28s;
.infoRow > td {
color: var(--vn-label-color);
}
</style>