Merge pull request 'feature/TravelExtraCommunityCorrections' (!188) from hyervoni/salix-front-mindshore:feature/TravelExtraCommunityCorrections into dev
gitea/salix-front/pipeline/head This commit looks good Details
gitea/salix-front/pipeline/pr-dev This commit looks good Details

Reviewed-on: #188
Reviewed-by: JAVIER SEGARRA MARTINEZ <jsegarra@verdnatura.es>
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
Alex Moreno 2024-02-12 12:39:32 +00:00
commit f38b5845ff
3 changed files with 54 additions and 51 deletions

View File

@ -67,6 +67,14 @@ body.body--dark {
max-width: 60em; max-width: 60em;
} }
.bg-vn-primary-row {
background-color: var(--vn-dark);
}
.bg-vn-secondary-row {
background-color: var(--vn-light-gray);
}
/* Estilo para el asterisco en campos requeridos */ /* Estilo para el asterisco en campos requeridos */
.q-field.required .q-field__label:after { .q-field.required .q-field__label:after {
content: ' *'; content: ' *';

View File

@ -51,57 +51,55 @@ const rows = computed(() => arrayData.store.data || []);
const tableColumnComponents = { const tableColumnComponents = {
id: { id: {
component: QBtn, component: QBtn,
attrs: () => ({ flat: true, color: 'blue', class: 'col-content' }), attrs: { flat: true, color: 'primary' },
}, },
cargoSupplierNickname: { cargoSupplierNickname: {
component: QBtn, component: QBtn,
attrs: () => ({ flat: true, color: 'blue', class: 'col-content' }), attrs: { flat: true, color: 'primary', dense: true },
}, },
agencyModeName: { agencyModeName: {
component: 'span', component: 'span',
attrs: () => ({ class: 'col-content' }), attrs: {},
}, },
invoiceAmount: { invoiceAmount: {
component: 'span', component: 'span',
attrs: () => ({ attrs: {},
class: 'col-content',
}),
}, },
ref: { ref: {
component: QField, component: QField,
attrs: () => ({ readonly: true, dense: true }), attrs: { readonly: true, dense: true, class: 'cursor-pointer' },
}, },
stickers: { stickers: {
component: 'span', component: 'span',
attrs: () => ({ class: 'col-content' }), attrs: {},
}, },
kg: { kg: {
component: 'span', component: QField,
attrs: () => ({ class: 'col-content' }), attrs: { readonly: true, dense: true, class: 'cursor-pointer' },
}, },
loadedKg: { loadedKg: {
component: 'span', component: 'span',
attrs: () => ({ class: 'col-content' }), attrs: {},
}, },
volumeKg: { volumeKg: {
component: 'span', component: 'span',
attrs: () => ({ class: 'col-content' }), attrs: {},
}, },
warehouseOutName: { warehouseOutName: {
component: 'span', component: 'span',
attrs: () => ({ class: 'col-content' }), attrs: {},
}, },
shipped: { shipped: {
component: 'span', component: 'span',
attrs: () => ({ class: 'col-content' }), attrs: {},
}, },
warehouseInName: { warehouseInName: {
component: 'span', component: 'span',
attrs: () => ({ class: 'col-content' }), attrs: {},
}, },
landed: { landed: {
component: 'span', component: 'span',
attrs: () => ({ class: 'col-content' }), attrs: {},
}, },
}; };
@ -110,8 +108,9 @@ const columns = computed(() => [
label: 'id', label: 'id',
field: 'id', field: 'id',
name: 'id', name: 'id',
align: 'left', align: 'center',
showValue: true, showValue: true,
sortable: true,
}, },
{ {
label: t('supplier.pageTitles.supplier'), label: t('supplier.pageTitles.supplier'),
@ -119,6 +118,7 @@ const columns = computed(() => [
name: 'cargoSupplierNickname', name: 'cargoSupplierNickname',
align: 'left', align: 'left',
showValue: true, showValue: true,
sortable: true,
}, },
{ {
label: t('globals.agency'), label: t('globals.agency'),
@ -126,6 +126,7 @@ const columns = computed(() => [
name: 'agencyModeName', name: 'agencyModeName',
align: 'left', align: 'left',
showValue: true, showValue: true,
sortable: true,
}, },
{ {
label: t('globals.amount'), label: t('globals.amount'),
@ -133,6 +134,7 @@ const columns = computed(() => [
field: 'entries', field: 'entries',
align: 'left', align: 'left',
showValue: true, showValue: true,
sortable: true,
format: (value) => format: (value) =>
toCurrency( toCurrency(
value value
@ -148,6 +150,7 @@ const columns = computed(() => [
name: 'ref', name: 'ref',
align: 'left', align: 'left',
showValue: false, showValue: false,
sortable: true,
}, },
{ {
label: t('globals.packages'), label: t('globals.packages'),
@ -155,13 +158,15 @@ const columns = computed(() => [
name: 'stickers', name: 'stickers',
align: 'left', align: 'left',
showValue: true, showValue: true,
sortable: true,
}, },
{ {
label: t('kg'), label: t('kg'),
field: 'kg', field: 'kg',
name: 'kg', name: 'kg',
align: 'left', align: 'left',
showValue: true, showValue: false,
sortable: true,
}, },
{ {
label: t('physicKg'), label: t('physicKg'),
@ -169,6 +174,7 @@ const columns = computed(() => [
name: 'loadedKg', name: 'loadedKg',
align: 'left', align: 'left',
showValue: true, showValue: true,
sortable: true,
}, },
{ {
label: 'KG Vol.', label: 'KG Vol.',
@ -176,6 +182,7 @@ const columns = computed(() => [
name: 'volumeKg', name: 'volumeKg',
align: 'left', align: 'left',
showValue: true, showValue: true,
sortable: true,
}, },
{ {
label: t('globals.wareHouseOut'), label: t('globals.wareHouseOut'),
@ -183,14 +190,16 @@ const columns = computed(() => [
name: 'warehouseOutName', name: 'warehouseOutName',
align: 'left', align: 'left',
showValue: true, showValue: true,
sortable: true,
}, },
{ {
label: t('shipped'), label: t('shipped'),
field: 'shipped', field: 'shipped',
name: 'shipped', name: 'shipped',
align: 'left', align: 'left',
format: (value) => toDate(value.substring(0, 10)),
showValue: true, showValue: true,
sortable: true,
format: (value) => toDate(value.substring(0, 10)),
}, },
{ {
label: t('globals.wareHouseIn'), label: t('globals.wareHouseIn'),
@ -198,14 +207,16 @@ const columns = computed(() => [
name: 'warehouseInName', name: 'warehouseInName',
align: 'left', align: 'left',
showValue: true, showValue: true,
sortable: true,
}, },
{ {
label: t('landed'), label: t('landed'),
field: 'landed', field: 'landed',
name: 'landed', name: 'landed',
align: 'left', align: 'left',
format: (value) => toDate(value.substring(0, 10)),
showValue: true, showValue: true,
sortable: true,
format: (value) => toDate(value.substring(0, 10)),
}, },
]); ]);
@ -237,7 +248,7 @@ const navigateToTravelId = (id) => {
}; };
const stopEventPropagation = (event, col) => { const stopEventPropagation = (event, col) => {
if (!['ref', 'id', 'cargoSupplierNickname'].includes(col.name)) return; if (!['ref', 'id', 'cargoSupplierNickname', 'kg'].includes(col.name)) return;
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();
}; };
@ -290,13 +301,13 @@ onMounted(async () => {
hide-bottom hide-bottom
row-key="clientId" row-key="clientId"
:pagination="{ rowsPerPage: 0 }" :pagination="{ rowsPerPage: 0 }"
class="full-width q-mt-md" class="full-width"
> >
<template #body="props"> <template #body="props">
<QTr <QTr
:props="props" :props="props"
@click="navigateToTravelId(props.row.id)" @click="navigateToTravelId(props.row.id)"
class="cursor-pointer" class="cursor-pointer bg-vn-primary-row"
> >
<QTd <QTd
v-for="col in props.cols" v-for="col in props.cols"
@ -306,8 +317,7 @@ onMounted(async () => {
> >
<component <component
:is="tableColumnComponents[col.name].component" :is="tableColumnComponents[col.name].component"
class="col-content" v-bind="tableColumnComponents[col.name].attrs"
v-bind="tableColumnComponents[col.name].attrs(props)"
> >
<!-- Editable 'ref' and 'kg' QField slot --> <!-- Editable 'ref' and 'kg' QField slot -->
<template <template
@ -361,36 +371,32 @@ onMounted(async () => {
v-for="entry in props.row.entries" v-for="entry in props.row.entries"
:key="entry.id" :key="entry.id"
:props="props" :props="props"
class="secondary-row" class="bg-vn-secondary-row"
> >
<QTd> <QTd class="row justify-center">
<QBtn flat color="blue" class="col-content">{{ entry.id }} </QBtn> <QBtn flat color="primary">{{ entry.id }} </QBtn>
<EntryDescriptorProxy :id="entry.id" /> <EntryDescriptorProxy :id="entry.id" />
</QTd> </QTd>
<QTd <QTd>
><QBtn flat color="blue" class="col-content">{{ <QBtn flat color="primary" dense>{{ entry.supplierName }}</QBtn>
entry.supplierName
}}</QBtn>
<SupplierDescriptorProxy :id="entry.supplierFk" /> <SupplierDescriptorProxy :id="entry.supplierFk" />
</QTd> </QTd>
<QTd></QTd> <QTd></QTd>
<QTd <QTd
><span class="col-content">{{ ><span>{{ toCurrency(entry.invoiceAmount) }}</span></QTd
toCurrency(entry.invoiceAmount)
}}</span></QTd
> >
<QTd <QTd
><span class="col-content">{{ entry.reference }}</span></QTd ><span>{{ entry.reference }}</span></QTd
> >
<QTd <QTd
><span class="col-content">{{ entry.stickers }}</span></QTd ><span>{{ entry.stickers }}</span></QTd
> >
<QTd></QTd> <QTd></QTd>
<QTd <QTd
><span class="col-content">{{ entry.loadedkg }}</span></QTd ><span>{{ entry.loadedkg }}</span></QTd
> >
<QTd <QTd
><span class="col-content">{{ entry.volumeKg }}</span></QTd ><span>{{ entry.volumeKg }}</span></QTd
> >
<QTd></QTd> <QTd></QTd>
<QTd></QTd> <QTd></QTd>
@ -402,17 +408,6 @@ onMounted(async () => {
</QPage> </QPage>
</template> </template>
<style lang="scss" scoped>
.col-content {
border-radius: 4px;
padding: 6px;
}
.secondary-row {
background-color: var(--vn-gray);
}
</style>
<i18n> <i18n>
en: en:
searchExtraCommunity: Search for extra community shipping searchExtraCommunity: Search for extra community shipping

View File

@ -34,7 +34,7 @@ export default {
name: 'ExtraCommunity', name: 'ExtraCommunity',
meta: { meta: {
title: 'extraCommunity', title: 'extraCommunity',
icon: 'vn:shipment-01', icon: 'vn:shipment',
}, },
component: () => import('src/pages/Travel/ExtraCommunity.vue'), component: () => import('src/pages/Travel/ExtraCommunity.vue'),
}, },