0
0
Fork 0

Improvements WIP

This commit is contained in:
William Buezas 2024-01-29 10:57:43 -03:00
parent 8cc92f127c
commit 7eda82bf82
4 changed files with 77 additions and 9 deletions

View File

@ -81,6 +81,7 @@ function viewSummary(id) {
<div class="descriptor">
<template v-if="entity">
<div class="header bg-primary q-pa-sm justify-between">
<slot name="header-extra-action" />
<QBtn
@click.stop="viewSummary(entity.id)"
round
@ -118,7 +119,7 @@ function viewSummary(id) {
icon="more_vert"
round
size="md"
v-if="slots.menu"
:class="{ invisible: !slots.menu }"
>
<QTooltip>
{{ t('components.cardDescriptor.moreOptions') }}

View File

@ -66,6 +66,22 @@ const setData = (entity) => {
@on-fetch="setData"
data-key="travelData"
>
<template #header-extra-action>
<QBtn
round
flat
dense
size="md"
icon="local_airport"
color="white"
class="link"
:to="{ name: 'TravelList' }"
>
<QTooltip>
{{ t('Go to module index') }}
</QTooltip>
</QBtn>
</template>
<template #body="{ entity }">
<VnLv :label="t('globals.wareHouseIn')" :value="entity.warehouseIn.name" />
<VnLv :label="t('globals.wareHouseOut')" :value="entity.warehouseOut.name" />
@ -75,6 +91,8 @@ const setData = (entity) => {
</template>
</CardDescriptor>
</template>
<i18n>
<i18n>
es:
Go to module index: Ir al índice del módulo
</i18n>

View File

@ -62,25 +62,29 @@ const entriesTableColumns = computed(() => {
label: t('travel.summary.confirmed'),
field: 'isConfirmed',
name: 'isConfirmed',
align: 'left',
align: 'center',
showValue: false,
},
{
label: t('travel.summary.entryId'),
field: 'id',
name: 'id',
align: 'left',
align: 'center',
showValue: false,
},
{
label: t('supplier.pageTitles.supplier'),
field: 'supplierName',
name: 'supplierName',
align: 'left',
showValue: true,
},
{
label: t('globals.reference'),
field: 'reference',
name: 'reference',
align: 'left',
showValue: true,
},
{
label: t('travel.summary.freight'),
@ -90,6 +94,7 @@ const entriesTableColumns = computed(() => {
format: (val) => {
return toCurrency(val);
},
showValue: true,
},
{
label: t('travel.summary.package'),
@ -99,16 +104,24 @@ const entriesTableColumns = computed(() => {
format: (val) => {
return toCurrency(val);
},
showValue: true,
},
{ label: 'CC', field: 'cc', name: 'cc', align: 'left' },
{ label: 'Pallet', field: 'pallet', name: 'pallet', align: 'left' },
{ label: 'm³', field: 'm3', name: 'm3', align: 'left' },
{ label: 'CC', field: 'cc', name: 'cc', align: 'left', showValue: true },
{
label: 'Pallet',
field: 'pallet',
name: 'pallet',
align: 'left',
showValue: true,
},
{ label: 'm³', field: 'm3', name: 'm3', align: 'left', showValue: true },
{
label: '',
field: 'observation',
name: 'observation',
align: 'left',
toolTip: 'Observation three',
showValue: false,
},
];
});
@ -212,7 +225,7 @@ const redirectToCreateView = (queryParams) => {
row-key="id"
class="full-width q-mt-md"
>
<template #body-cell-isConfirmed="{ row }">
<!-- <template #body-cell-isConfirmed="{ row }">
<QTd auto-width>
<QIcon
:name="row.isConfirmed ? 'check' : 'close'"
@ -238,6 +251,40 @@ const redirectToCreateView = (queryParams) => {
size="sm"
/>
</QTd>
</template> -->
<!-- <template #body="props">
<QTr :props="props" :key="`m_${props.row.index}`">
<QTd v-for="col in props.cols" :key="col.name" :props="props">
<template v-if="col.showValue">{{ col.value }}</template>
</QTd>
</QTr>
<QTr
:props="props"
:key="`e_${props.row.index}`"
class="q-virtual-scroll--with-prev"
>
<QTd colspan="100%">
<div class="text-left">
This is the second row generated from the same data:
</div>
</QTd>
</QTr>
</template> -->
<template #body-cell="props">
<QTd :props="props">
<QTr :props="props" :key="`m_${props.row.index}`">
<template v-if="props.col.showValue">
{{ props.value }}
</template>
</QTr>
</QTd>
<QTd :props="props">
<QTr :props="props" :key="`m_${props.row.index}`">
<template v-if="props.col.showValue">
{{ props.value }}
</template>
</QTr>
</QTd>
</template>
</QTable>
</QCard>

View File

@ -137,8 +137,9 @@ const removeThermograph = async (id) => {
<QTable
:rows="rows"
:columns="TableColumns"
:no-data-label="t('No results')"
:rows-per-page-options="[0]"
row-key="id"
hide-bottom
class="full-width q-mt-md"
>
<template #body-cell-downloadFile="{ row }">
@ -204,4 +205,5 @@ es:
Remove thermograph: Eliminar termógrafo
Thermograph removed: Termógrafo eliminado
Are you sure you want to remove the thermograph?: ¿Seguro que quieres quitar el termógrafo?
No results: Sin resultados
</i18n>