Merge branch 'dev' into update_readme
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
77543ff690
|
@ -152,6 +152,10 @@ const value = computed({
|
|||
},
|
||||
});
|
||||
|
||||
const computedSortBy = computed(() => {
|
||||
return $props.sortBy || $props.optionLabel + ' ASC';
|
||||
});
|
||||
|
||||
watch(options, (newValue) => {
|
||||
setOptions(newValue);
|
||||
});
|
||||
|
@ -186,7 +190,7 @@ function findKeyInOptions() {
|
|||
}
|
||||
|
||||
function setOptions(data) {
|
||||
data = dataByOrder(data, $props.sortBy);
|
||||
data = dataByOrder(data, computedSortBy.value);
|
||||
myOptions.value = JSON.parse(JSON.stringify(data));
|
||||
myOptionsOriginal.value = JSON.parse(JSON.stringify(data));
|
||||
emit('update:options', data);
|
||||
|
@ -216,7 +220,8 @@ function filter(val, options) {
|
|||
async function fetchFilter(val) {
|
||||
if (!$props.url) return;
|
||||
|
||||
const { fields, include, sortBy, limit } = $props;
|
||||
const { fields, include, limit } = $props;
|
||||
const sortBy = computedSortBy.value;
|
||||
const key =
|
||||
optionFilterValue.value ??
|
||||
(new RegExp(/\d/g).test(val)
|
||||
|
|
|
@ -201,6 +201,29 @@ async function fetch() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.vn-card-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.vn-card-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
text-overflow: ellipsis;
|
||||
> div {
|
||||
max-height: 70px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1010px) {
|
||||
.vn-card-group {
|
||||
flex-direction: row;
|
||||
}
|
||||
.vn-card-content {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.summaryHeader .vn-label-value {
|
||||
|
|
|
@ -35,6 +35,7 @@ const val = computed(() => $props.value);
|
|||
:label="label"
|
||||
disable
|
||||
dense
|
||||
size="sm"
|
||||
/>
|
||||
<template v-else>
|
||||
<div v-if="label || $slots.label" class="label">
|
||||
|
@ -44,7 +45,7 @@ const val = computed(() => $props.value);
|
|||
</div>
|
||||
<div class="value">
|
||||
<slot name="value">
|
||||
<span :title="value">
|
||||
<span :title="value" style="text-overflow: ellipsis">
|
||||
{{ dash ? dashIfEmpty(value) : value }}
|
||||
</span>
|
||||
</slot>
|
||||
|
|
|
@ -214,109 +214,106 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
<InvoiceInDescriptorMenu :invoice="entity" />
|
||||
</template>
|
||||
<template #body="{ entity }">
|
||||
<!--Basic Data-->
|
||||
<QCard class="vn-one">
|
||||
<QCardSection class="q-pa-none">
|
||||
<VnTitle
|
||||
:url="getLink('basic-data')"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
</QCardSection>
|
||||
<VnLv
|
||||
:label="t('invoiceIn.list.supplier')"
|
||||
:value="entity.supplier?.name"
|
||||
>
|
||||
<template #value>
|
||||
<span class="link" data-cy="invoiceInSummary_supplier">
|
||||
{{ entity.supplier?.name }}
|
||||
<SupplierDescriptorProxy :id="entity.supplierFk" />
|
||||
</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :label="t('invoiceIn.supplierRef')" :value="entity.supplierRef" />
|
||||
<VnLv
|
||||
:label="t('invoiceIn.summary.currency')"
|
||||
:value="entity.currency?.code"
|
||||
<QCard class="max-width">
|
||||
<VnTitle
|
||||
:url="getLink('basic-data')"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
<VnLv :label="t('invoiceIn.serial')" :value="`${entity.serial}`" />
|
||||
<VnLv
|
||||
:label="t('globals.country')"
|
||||
:value="entity.supplier?.country?.code"
|
||||
/>
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<QCardSection class="q-pa-none">
|
||||
<VnTitle
|
||||
:url="getLink('basic-data')"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
</QCardSection>
|
||||
<VnLv
|
||||
:ellipsis-value="false"
|
||||
:label="t('invoiceIn.summary.issued')"
|
||||
:value="toDate(entity.issued)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoiceIn.summary.operated')"
|
||||
:value="toDate(entity.operated)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoiceIn.summary.bookEntried')"
|
||||
:value="toDate(entity.bookEntried)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoiceIn.summary.bookedDate')"
|
||||
:value="toDate(entity.booked)"
|
||||
/>
|
||||
<VnLv :label="t('globals.isVies')" :value="entity.supplier?.isVies" />
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<QCardSection class="q-pa-none">
|
||||
<VnTitle
|
||||
:url="getLink('basic-data')"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
</QCardSection>
|
||||
<VnLv
|
||||
:label="t('invoiceIn.summary.sage')"
|
||||
:value="entity.sageWithholding?.withholding"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoiceIn.card.company')"
|
||||
:value="entity.company?.code"
|
||||
/>
|
||||
<VnLv :label="t('invoiceIn.isBooked')" :value="invoiceIn?.isBooked" />
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<QCardSection class="q-pa-none">
|
||||
<VnTitle
|
||||
:url="getLink('basic-data')"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
</QCardSection>
|
||||
<QCardSection class="q-pa-none">
|
||||
<VnLv
|
||||
:label="t('invoiceIn.summary.taxableBase')"
|
||||
:value="toCurrency(entity.totals.totalTaxableBase)"
|
||||
/>
|
||||
<VnLv label="Total" :value="toCurrency(entity.totals.totalVat)" />
|
||||
<VnLv :label="t('invoiceIn.summary.dueTotal')">
|
||||
<template #value>
|
||||
<QChip
|
||||
dense
|
||||
class="q-pa-xs"
|
||||
:color="amountsNotMatch ? 'negative' : 'transparent'"
|
||||
:title="
|
||||
amountsNotMatch
|
||||
? t('invoiceIn.summary.noMatch')
|
||||
: t('invoiceIn.summary.dueTotal')
|
||||
"
|
||||
>
|
||||
{{ toCurrency(entity.totals.totalDueDay) }}
|
||||
</QChip>
|
||||
</template>
|
||||
</VnLv>
|
||||
</QCardSection>
|
||||
<div class="vn-card-group">
|
||||
<div class="vn-card-content">
|
||||
<VnLv
|
||||
:label="t('invoiceIn.list.supplier')"
|
||||
:value="entity.supplier?.name"
|
||||
>
|
||||
<template #value>
|
||||
<span class="link" data-cy="invoiceInSummary_supplier">
|
||||
{{ entity.supplier?.name }}
|
||||
<SupplierDescriptorProxy :id="entity.supplierFk" />
|
||||
</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv
|
||||
:label="t('invoiceIn.supplierRef')"
|
||||
:value="entity.supplierRef"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoiceIn.summary.currency')"
|
||||
:value="entity.currency?.code"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoiceIn.serial')"
|
||||
:value="`${entity.serial}`"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('globals.country')"
|
||||
:value="entity.supplier?.country?.code"
|
||||
/>
|
||||
</div>
|
||||
<div class="vn-card-content">
|
||||
<VnLv
|
||||
:ellipsis-value="false"
|
||||
:label="t('invoiceIn.summary.issued')"
|
||||
:value="toDate(entity.issued)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoiceIn.summary.operated')"
|
||||
:value="toDate(entity.operated)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoiceIn.summary.bookEntried')"
|
||||
:value="toDate(entity.bookEntried)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoiceIn.summary.bookedDate')"
|
||||
:value="toDate(entity.booked)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('globals.isVies')"
|
||||
:value="entity.supplier?.isVies"
|
||||
/>
|
||||
</div>
|
||||
<div class="vn-card-content">
|
||||
<VnLv
|
||||
:label="t('invoiceIn.summary.sage')"
|
||||
:value="entity.sageWithholding?.withholding"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoiceIn.summary.vat')"
|
||||
:value="entity.expenseDeductible?.name"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoiceIn.card.company')"
|
||||
:value="entity.company?.code"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoiceIn.isBooked')"
|
||||
:value="invoiceIn?.isBooked"
|
||||
/>
|
||||
</div>
|
||||
<div class="vn-card-content">
|
||||
<VnLv
|
||||
:label="t('invoiceIn.summary.taxableBase')"
|
||||
:value="toCurrency(entity.totals.totalTaxableBase)"
|
||||
/>
|
||||
<VnLv label="Total" :value="toCurrency(entity.totals.totalVat)" />
|
||||
<VnLv :label="t('invoiceIn.summary.dueTotal')">
|
||||
<template #value>
|
||||
<QChip
|
||||
dense
|
||||
class="q-pa-xs"
|
||||
:color="amountsNotMatch ? 'negative' : 'transparent'"
|
||||
:title="
|
||||
amountsNotMatch
|
||||
? t('invoiceIn.summary.noMatch')
|
||||
: t('invoiceIn.summary.dueTotal')
|
||||
"
|
||||
>
|
||||
{{ toCurrency(entity.totals.totalDueDay) }}
|
||||
</QChip>
|
||||
</template>
|
||||
</VnLv>
|
||||
</div>
|
||||
</div>
|
||||
</QCard>
|
||||
<!--Vat-->
|
||||
<QCard v-if="entity.invoiceInTax.length" class="vat">
|
||||
|
|
|
@ -119,7 +119,7 @@ const cols = computed(() => [
|
|||
icon: 'preview',
|
||||
type: 'submit',
|
||||
isPrimary: true,
|
||||
action: (row) => viewSummary(row.id, InvoiceInSummary),
|
||||
action: (row) => viewSummary(row.id, InvoiceInSummary, 'lg-width'),
|
||||
},
|
||||
{
|
||||
title: t('globals.download'),
|
||||
|
|
|
@ -71,180 +71,174 @@ async function handleConfirm() {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div class="q-pa-md">
|
||||
<CardSummary
|
||||
ref="summary"
|
||||
:url="`Orders/${entityId}/summary`"
|
||||
data-key="OrderSummary"
|
||||
>
|
||||
<template #header="{ entity }">
|
||||
{{ t('order.summary.basket') }} #{{ entity?.id }} -
|
||||
{{ entity?.client?.name }} ({{ entity?.clientFk }})
|
||||
</template>
|
||||
<template #header-right>
|
||||
<QBtn
|
||||
flat
|
||||
text-color="white"
|
||||
:disabled="isConfirmed"
|
||||
:label="t('order.summary.confirm')"
|
||||
@click="handleConfirm()"
|
||||
>
|
||||
<QTooltip>{{ t('order.summary.confirmLines') }}</QTooltip>
|
||||
</QBtn>
|
||||
</template>
|
||||
<template #menu="{ entity }">
|
||||
<OrderDescriptorMenu :order="entity" />
|
||||
</template>
|
||||
<template #body="{ entity }">
|
||||
<QCard class="vn-one">
|
||||
<VnTitle
|
||||
:url="`#/order/${entity.id}/basic-data`"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
<VnLv label="ID" :value="entity.id" />
|
||||
<VnLv :label="t('globals.alias')" dash>
|
||||
<template #value>
|
||||
<span class="link">
|
||||
{{ dashIfEmpty(entity?.address?.nickname) }}
|
||||
<CustomerDescriptorProxy :id="entity?.clientFk" />
|
||||
</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv
|
||||
:label="t('globals.company')"
|
||||
:value="entity?.address?.companyFk"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('globals.confirmed')"
|
||||
:value="Boolean(entity?.isConfirmed)"
|
||||
/>
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<VnTitle
|
||||
:url="`#/order/${entity.id}/basic-data`"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('order.summary.created')"
|
||||
:value="toDateHourMinSec(entity?.created)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('globals.confirmed')"
|
||||
:value="toDateHourMinSec(entity?.confirmed)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('globals.landed')"
|
||||
:value="toDateHourMinSec(entity?.landed)"
|
||||
/>
|
||||
<VnLv :label="t('globals.phone')">
|
||||
<template #value>
|
||||
{{ dashIfEmpty(entity?.address?.phone) }}
|
||||
<a
|
||||
v-if="entity?.address?.phone"
|
||||
:href="`tel:${entity?.address?.phone}`"
|
||||
class="text-primary"
|
||||
>
|
||||
<QIcon name="phone" />
|
||||
</a>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv
|
||||
:label="t('order.summary.createdFrom')"
|
||||
:value="entity?.sourceApp"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('order.summary.address')"
|
||||
:value="`${entity?.address?.street} - ${entity?.address?.city} (${entity?.address?.province?.name})`"
|
||||
class="order-summary-address"
|
||||
/>
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<VnTitle :text="t('globals.pageTitles.notes')" />
|
||||
<p v-if="entity?.note" class="no-margin">
|
||||
{{ entity?.note }}
|
||||
</p>
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<VnTitle :text="t('order.summary.total')" />
|
||||
<VnLv>
|
||||
<template #label>
|
||||
<span class="text-h6">{{ t('globals.subtotal') }}</span>
|
||||
</template>
|
||||
<template #value>
|
||||
<span class="text-h6">{{
|
||||
toCurrency(entity?.subTotal)
|
||||
}}</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv>
|
||||
<template #label>
|
||||
<span class="text-h6">{{ t('globals.vat') }}</span>
|
||||
</template>
|
||||
<template #value>
|
||||
<span class="text-h6">{{ toCurrency(entity?.VAT) }}</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv>
|
||||
<template #label>
|
||||
<span class="text-h6">{{ t('order.summary.total') }}</span>
|
||||
</template>
|
||||
<template #value>
|
||||
<span class="text-h6">{{ toCurrency(entity?.total) }}</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
</QCard>
|
||||
<QCard>
|
||||
<VnTitle :text="t('globals.details')" />
|
||||
<QTable :columns="detailsColumns" :rows="entity?.rows" flat>
|
||||
<template #header="props">
|
||||
<QTr :props="props">
|
||||
<QTh auto-width>{{ t('globals.item') }}</QTh>
|
||||
<QTh>{{ t('globals.description') }}</QTh>
|
||||
<QTh auto-width>{{ t('globals.quantity') }}</QTh>
|
||||
<QTh auto-width>{{ t('globals.price') }}</QTh>
|
||||
<QTh auto-width>{{ t('order.summary.amount') }}</QTh>
|
||||
</QTr>
|
||||
</template>
|
||||
<template #body="props">
|
||||
<QTr :props="props">
|
||||
<QTd key="item" :props="props" class="item">
|
||||
<span class="link">
|
||||
{{ props.row.item?.id }}
|
||||
<ItemDescriptorProxy :id="props.row.item?.id" />
|
||||
</span>
|
||||
</QTd>
|
||||
<QTd key="description" :props="props">
|
||||
<div class="description">
|
||||
<div class="name">
|
||||
{{ props.row.item.name }}
|
||||
<span
|
||||
v-if="props.row.item.subName"
|
||||
class="subName"
|
||||
>
|
||||
{{ props.row.item.subName }}
|
||||
</span>
|
||||
</div>
|
||||
<CardSummary
|
||||
ref="summary"
|
||||
:url="`Orders/${entityId}/summary`"
|
||||
data-key="OrderSummary"
|
||||
>
|
||||
<template #header="{ entity }">
|
||||
{{ t('order.summary.basket') }} #{{ entity?.id }} -
|
||||
{{ entity?.client?.name }} ({{ entity?.clientFk }})
|
||||
</template>
|
||||
<template #header-right>
|
||||
<QBtn
|
||||
flat
|
||||
text-color="white"
|
||||
:disabled="isConfirmed"
|
||||
:label="t('order.summary.confirm')"
|
||||
@click="handleConfirm()"
|
||||
>
|
||||
<QTooltip>{{ t('order.summary.confirmLines') }}</QTooltip>
|
||||
</QBtn>
|
||||
</template>
|
||||
<template #menu="{ entity }">
|
||||
<OrderDescriptorMenu :order="entity" />
|
||||
</template>
|
||||
<template #body="{ entity }">
|
||||
<QCard class="vn-two">
|
||||
<VnTitle
|
||||
:url="`#/order/${entity.id}/basic-data`"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
<div class="vn-card-group">
|
||||
<div class="vn-card-content">
|
||||
<VnLv label="ID" :value="entity.id" />
|
||||
<VnLv :label="t('globals.alias')" dash>
|
||||
<template #value>
|
||||
<span class="link">
|
||||
{{ dashIfEmpty(entity?.address?.nickname) }}
|
||||
<CustomerDescriptorProxy :id="entity?.clientFk" />
|
||||
</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv
|
||||
:label="t('globals.company')"
|
||||
:value="entity?.address?.companyFk"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('globals.confirmed')"
|
||||
:value="Boolean(entity?.isConfirmed)"
|
||||
/>
|
||||
</div>
|
||||
<div class="vn-card-content">
|
||||
<VnLv
|
||||
:label="t('order.summary.created')"
|
||||
:value="toDateHourMinSec(entity?.created)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('globals.confirmed')"
|
||||
:value="toDateHourMinSec(entity?.confirmed)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('globals.landed')"
|
||||
:value="toDateHourMinSec(entity?.landed)"
|
||||
/>
|
||||
<VnLv :label="t('globals.phone')">
|
||||
<template #value>
|
||||
{{ dashIfEmpty(entity?.address?.phone) }}
|
||||
<a
|
||||
v-if="entity?.address?.phone"
|
||||
:href="`tel:${entity?.address?.phone}`"
|
||||
class="text-primary"
|
||||
>
|
||||
<QIcon name="phone" />
|
||||
</a>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv
|
||||
:label="t('order.summary.createdFrom')"
|
||||
:value="entity?.sourceApp"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('order.summary.address')"
|
||||
:value="`${entity?.address?.street} - ${entity?.address?.city} (${entity?.address?.province?.name})`"
|
||||
class="order-summary-address"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<VnTitle :text="t('globals.pageTitles.notes')" />
|
||||
<p v-if="entity?.note" class="no-margin">
|
||||
{{ entity?.note }}
|
||||
</p>
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<VnTitle :text="t('order.summary.total')" />
|
||||
<VnLv>
|
||||
<template #label>
|
||||
<span class="text-h6">{{ t('globals.subtotal') }}</span>
|
||||
</template>
|
||||
<template #value>
|
||||
<span class="text-h6">{{ toCurrency(entity?.subTotal) }}</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv>
|
||||
<template #label>
|
||||
<span class="text-h6">{{ t('globals.vat') }}</span>
|
||||
</template>
|
||||
<template #value>
|
||||
<span class="text-h6">{{ toCurrency(entity?.VAT) }}</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv>
|
||||
<template #label>
|
||||
<span class="text-h6">{{ t('order.summary.total') }}</span>
|
||||
</template>
|
||||
<template #value>
|
||||
<span class="text-h6">{{ toCurrency(entity?.total) }}</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
</QCard>
|
||||
<QCard>
|
||||
<VnTitle :text="t('globals.details')" />
|
||||
<QTable :columns="detailsColumns" :rows="entity?.rows" flat>
|
||||
<template #header="props">
|
||||
<QTr :props="props">
|
||||
<QTh auto-width>{{ t('globals.item') }}</QTh>
|
||||
<QTh>{{ t('globals.description') }}</QTh>
|
||||
<QTh auto-width>{{ t('globals.quantity') }}</QTh>
|
||||
<QTh auto-width>{{ t('globals.price') }}</QTh>
|
||||
<QTh auto-width>{{ t('order.summary.amount') }}</QTh>
|
||||
</QTr>
|
||||
</template>
|
||||
<template #body="props">
|
||||
<QTr :props="props">
|
||||
<QTd key="item" :props="props" class="item">
|
||||
<span class="link">
|
||||
{{ props.row.item?.id }}
|
||||
<ItemDescriptorProxy :id="props.row.item?.id" />
|
||||
</span>
|
||||
</QTd>
|
||||
<QTd key="description" :props="props">
|
||||
<div class="description">
|
||||
<div class="name">
|
||||
{{ props.row.item.name }}
|
||||
<span
|
||||
v-if="props.row.item.subName"
|
||||
class="subName"
|
||||
>
|
||||
{{ props.row.item.subName }}
|
||||
</span>
|
||||
</div>
|
||||
<FetchedTags :item="props.row.item" :columns="3" />
|
||||
</QTd>
|
||||
<QTd key="quantity" :props="props">
|
||||
{{ props.row.quantity }}
|
||||
</QTd>
|
||||
<QTd key="price" :props="props">
|
||||
{{ toCurrency(props.row.price) }}
|
||||
</QTd>
|
||||
<QTd key="amount" :props="props">
|
||||
{{
|
||||
toCurrency(props.row?.quantity * props.row?.price)
|
||||
}}
|
||||
</QTd>
|
||||
</QTr>
|
||||
</template>
|
||||
</QTable>
|
||||
</QCard>
|
||||
</template>
|
||||
</CardSummary>
|
||||
</div>
|
||||
</div>
|
||||
<FetchedTags :item="props.row.item" :columns="3" />
|
||||
</QTd>
|
||||
<QTd key="quantity" :props="props">
|
||||
{{ props.row.quantity }}
|
||||
</QTd>
|
||||
<QTd key="price" :props="props">
|
||||
{{ toCurrency(props.row.price) }}
|
||||
</QTd>
|
||||
<QTd key="amount" :props="props">
|
||||
{{ toCurrency(props.row?.quantity * props.row?.price) }}
|
||||
</QTd>
|
||||
</QTr>
|
||||
</template>
|
||||
</QTable>
|
||||
</QCard>
|
||||
</template>
|
||||
</CardSummary>
|
||||
</template>
|
||||
<style lang="scss">
|
||||
.cardSummary .summaryBody .vn-label-value.order-summary-address {
|
||||
|
|
|
@ -141,7 +141,7 @@ const columns = computed(() => [
|
|||
{
|
||||
title: t('globals.pageTitles.summary'),
|
||||
icon: 'preview',
|
||||
action: (row) => viewSummary(row.id, OrderSummary),
|
||||
action: (row) => viewSummary(row.id, OrderSummary, 'lg-width'),
|
||||
isPrimary: true,
|
||||
},
|
||||
],
|
||||
|
|
|
@ -138,74 +138,79 @@ const ticketColumns = ref([
|
|||
:url="`#/${route.meta.moduleName.toLowerCase()}/${entityId}/basic-data`"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
</QCard>
|
||||
|
||||
<QCard class="vn-one">
|
||||
<VnLv
|
||||
:label="t('route.summary.date')"
|
||||
:value="toDate(entity?.route.dated)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('route.summary.agency')"
|
||||
:value="entity?.route?.agencyMode?.name"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('route.summary.vehicle')"
|
||||
:value="entity.route?.vehicle?.numberPlate"
|
||||
/>
|
||||
<VnLv :label="t('route.summary.driver')">
|
||||
<template #value>
|
||||
<span class="link">
|
||||
{{ dashIfEmpty(entity?.route?.worker?.user?.name) }}
|
||||
<WorkerDescriptorProxy :id="entity.route?.workerFk" />
|
||||
</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv
|
||||
:label="t('route.summary.cost')"
|
||||
:value="toCurrency(entity.route?.cost)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('route.summary.volume')"
|
||||
:value="`${dashIfEmpty(entity?.route?.m3)} / ${dashIfEmpty(
|
||||
entity?.route?.vehicle?.m3,
|
||||
)} m³`"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('route.summary.packages')"
|
||||
:value="getTotalPackages(entity.tickets)"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="
|
||||
entity.route.isOk
|
||||
? t('route.summary.closed')
|
||||
: t('route.summary.open')
|
||||
"
|
||||
v-model="entity.route.isOk"
|
||||
:disable="true"
|
||||
/>
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<VnLv
|
||||
:label="t('route.summary.started')"
|
||||
:value="toHour(entity?.route.started)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('route.summary.finished')"
|
||||
:value="toHour(entity?.route.finished)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('route.summary.kmStart')"
|
||||
:value="dashIfEmpty(entity?.route?.kmStart)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('route.summary.kmEnd')"
|
||||
:value="dashIfEmpty(entity?.route?.kmEnd)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('globals.description')"
|
||||
:value="dashIfEmpty(entity?.route?.description)"
|
||||
/>
|
||||
<div class="vn-card-group">
|
||||
<div class="vn-card-content">
|
||||
<VnLv
|
||||
:label="t('route.summary.date')"
|
||||
:value="toDate(entity?.route.dated)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('route.summary.agency')"
|
||||
:value="entity?.route?.agencyMode?.name"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('route.summary.vehicle')"
|
||||
:value="entity.route?.vehicle?.numberPlate"
|
||||
/>
|
||||
<VnLv :label="t('route.summary.driver')">
|
||||
<template #value>
|
||||
<span class="link">
|
||||
{{
|
||||
dashIfEmpty(entity?.route?.worker?.user?.name)
|
||||
}}
|
||||
<WorkerDescriptorProxy
|
||||
:id="entity.route?.workerFk"
|
||||
/>
|
||||
</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv
|
||||
:label="t('route.summary.cost')"
|
||||
:value="toCurrency(entity.route?.cost)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('route.summary.volume')"
|
||||
:value="`${dashIfEmpty(entity?.route?.m3)} / ${dashIfEmpty(
|
||||
entity?.route?.vehicle?.m3,
|
||||
)} m³`"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('route.summary.packages')"
|
||||
:value="getTotalPackages(entity.tickets)"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="
|
||||
entity.route.isOk
|
||||
? t('route.summary.closed')
|
||||
: t('route.summary.open')
|
||||
"
|
||||
v-model="entity.route.isOk"
|
||||
:disable="true"
|
||||
/>
|
||||
</div>
|
||||
<div class="vn-card-content">
|
||||
<VnLv
|
||||
:label="t('route.summary.started')"
|
||||
:value="toHour(entity?.route.started)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('route.summary.finished')"
|
||||
:value="toHour(entity?.route.finished)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('route.summary.kmStart')"
|
||||
:value="dashIfEmpty(entity?.route?.kmStart)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('route.summary.kmEnd')"
|
||||
:value="dashIfEmpty(entity?.route?.kmEnd)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('globals.description')"
|
||||
:value="dashIfEmpty(entity?.route?.description)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</QCard>
|
||||
<QCard class="vn-max">
|
||||
<VnTitle
|
||||
|
|
|
@ -137,120 +137,132 @@ onMounted(async () => {
|
|||
<TicketDescriptorMenu :ticket="entity" />
|
||||
</template>
|
||||
<template #body="{ entity }">
|
||||
<QCard class="vn-one">
|
||||
<QCard class="vn-two">
|
||||
<VnTitle
|
||||
:url="toTicketUrl('basic-data')"
|
||||
:text="t('globals.summary.basicData')"
|
||||
/>
|
||||
<VnLv v-if="entity.ticketState" :label="t('globals.state')">
|
||||
<template #value>
|
||||
<QBadge
|
||||
text-color="black"
|
||||
:color="entity.ticketState.state.classColor"
|
||||
<div class="vn-card-group">
|
||||
<div class="vn-card-content">
|
||||
<VnLv v-if="entity.ticketState" :label="t('globals.state')">
|
||||
<template #value>
|
||||
<QBadge
|
||||
text-color="black"
|
||||
:color="entity.ticketState.state.classColor"
|
||||
>
|
||||
{{ entity.ticketState.state.name }}
|
||||
</QBadge>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :label="t('customer.summary.team')">
|
||||
<template #value>
|
||||
<span class="link">
|
||||
{{ entity?.client?.department?.name || '-' }}
|
||||
<DepartmentDescriptorProxy
|
||||
:id="entity?.client?.departmentFk"
|
||||
/>
|
||||
</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv
|
||||
:label="t('globals.agency')"
|
||||
:value="entity.agencyMode?.name"
|
||||
/>
|
||||
<VnLv :label="t('ticket.summary.zone')">
|
||||
<template #value>
|
||||
<span class="link" @click.stop>
|
||||
{{ entity?.zone?.name }}
|
||||
<ZoneDescriptorProxy :id="entity.zoneFk" />
|
||||
</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv
|
||||
:label="t('globals.warehouse')"
|
||||
:value="entity.warehouse?.name"
|
||||
/>
|
||||
<VnLv
|
||||
v-if="ticket?.ticketCollections?.length > 0"
|
||||
:label="t('ticket.summary.collection')"
|
||||
:value="ticket?.ticketCollections[0]?.collectionFk"
|
||||
>
|
||||
{{ entity.ticketState.state.name }}
|
||||
</QBadge>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :label="t('customer.summary.team')">
|
||||
<template #value>
|
||||
<span class="link">
|
||||
{{ entity?.client?.department?.name || '-' }}
|
||||
<DepartmentDescriptorProxy
|
||||
:id="entity?.client?.departmentFk"
|
||||
/>
|
||||
</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :label="t('globals.agency')" :value="entity.agencyMode?.name" />
|
||||
<VnLv :label="t('ticket.summary.zone')">
|
||||
<template #value>
|
||||
<span class="link" @click.stop>
|
||||
{{ entity?.zone?.name }}
|
||||
<ZoneDescriptorProxy :id="entity.zoneFk" />
|
||||
</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :label="t('globals.warehouse')" :value="entity.warehouse?.name" />
|
||||
<VnLv
|
||||
v-if="ticket?.ticketCollections?.length > 0"
|
||||
:label="t('ticket.summary.collection')"
|
||||
:value="ticket?.ticketCollections[0]?.collectionFk"
|
||||
>
|
||||
<template #value>
|
||||
<a
|
||||
:href="`${grafanaUrl}/d/d552ab74-85b4-4e7f-a279-fab7cd9c6124/control-de-expediciones?orgId=1&var-collectionFk=${entity.ticketCollections[0]?.collectionFk}`"
|
||||
target="_blank"
|
||||
class="grafana"
|
||||
>
|
||||
{{ entity.ticketCollections[0]?.collectionFk }}
|
||||
</a>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :label="t('ticket.summary.route')">
|
||||
<template #value>
|
||||
<span class="link">
|
||||
{{ entity.routeFk }}
|
||||
<RouteDescriptorProxy :id="entity.routeFk" />
|
||||
</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :label="t('ticket.summary.invoice')">
|
||||
<template #value>
|
||||
<span :class="{ link: entity.refFk }">
|
||||
{{ dashIfEmpty(entity.refFk) }}
|
||||
<InvoiceOutDescriptorProxy
|
||||
:id="entity.invoiceOut.id"
|
||||
v-if="entity.refFk"
|
||||
/>
|
||||
</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :label="t('globals.weight')" :value="dashIfEmpty(entity.weight)" />
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<VnTitle
|
||||
:url="toTicketUrl('basic-data')"
|
||||
:text="t('globals.summary.basicData')"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('ticket.summary.shipped')"
|
||||
:value="toDate(entity.shipped)"
|
||||
/>
|
||||
<VnLv :label="t('globals.landed')" :value="toDate(entity.landed)" />
|
||||
<VnLv :label="t('globals.packages')" :value="entity.packages" />
|
||||
<VnLv :value="entity.address.phone">
|
||||
<template #label>
|
||||
{{ t('ticket.summary.consigneePhone') }}
|
||||
<VnLinkPhone :phone-number="entity.address.phone" />
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :value="entity.address.mobile">
|
||||
<template #label>
|
||||
{{ t('ticket.summary.consigneeMobile') }}
|
||||
<VnLinkPhone :phone-number="entity.address.mobile" />
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :value="entity.client.phone">
|
||||
<template #label>
|
||||
{{ t('ticket.summary.clientPhone') }}
|
||||
<VnLinkPhone :phone-number="entity.client.phone" />
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :value="entity.client.mobile">
|
||||
<template #label>
|
||||
{{ t('ticket.summary.clientMobile') }}
|
||||
<VnLinkPhone :phone-number="entity.client.mobile" />
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv
|
||||
:label="t('ticket.summary.consignee')"
|
||||
:value="`${entity.address?.nickname} #${entity.address?.id}`"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('ticket.summary.consigneeStreet')"
|
||||
:value="formattedAddress"
|
||||
/>
|
||||
<template #value>
|
||||
<a
|
||||
:href="`${grafanaUrl}/d/d552ab74-85b4-4e7f-a279-fab7cd9c6124/control-de-expediciones?orgId=1&var-collectionFk=${entity.ticketCollections[0]?.collectionFk}`"
|
||||
target="_blank"
|
||||
class="grafana"
|
||||
>
|
||||
{{ entity.ticketCollections[0]?.collectionFk }}
|
||||
</a>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :label="t('ticket.summary.route')">
|
||||
<template #value>
|
||||
<span class="link">
|
||||
{{ entity.routeFk }}
|
||||
<RouteDescriptorProxy :id="entity.routeFk" />
|
||||
</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :label="t('ticket.summary.invoice')">
|
||||
<template #value>
|
||||
<span :class="{ link: entity.refFk }">
|
||||
{{ dashIfEmpty(entity.refFk) }}
|
||||
<InvoiceOutDescriptorProxy
|
||||
:id="entity.invoiceOut.id"
|
||||
v-if="entity.refFk"
|
||||
/>
|
||||
</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv
|
||||
:label="t('globals.weight')"
|
||||
:value="dashIfEmpty(entity.weight)"
|
||||
/>
|
||||
</div>
|
||||
<div class="vn-card-content">
|
||||
<VnLv
|
||||
:label="t('ticket.summary.shipped')"
|
||||
:value="toDate(entity.shipped)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('globals.landed')"
|
||||
:value="toDate(entity.landed)"
|
||||
/>
|
||||
<VnLv :label="t('globals.packages')" :value="entity.packages" />
|
||||
<VnLv :value="entity.address.phone">
|
||||
<template #label>
|
||||
{{ t('ticket.summary.consigneePhone') }}
|
||||
<VnLinkPhone :phone-number="entity.address.phone" />
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :value="entity.address.mobile">
|
||||
<template #label>
|
||||
{{ t('ticket.summary.consigneeMobile') }}
|
||||
<VnLinkPhone :phone-number="entity.address.mobile" />
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :value="entity.client.phone">
|
||||
<template #label>
|
||||
{{ t('ticket.summary.clientPhone') }}
|
||||
<VnLinkPhone :phone-number="entity.client.phone" />
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :value="entity.client.mobile">
|
||||
<template #label>
|
||||
{{ t('ticket.summary.clientMobile') }}
|
||||
<VnLinkPhone :phone-number="entity.client.mobile" />
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv
|
||||
:label="t('ticket.summary.consignee')"
|
||||
:value="`${entity.address?.nickname} #${entity.address?.id}`"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('ticket.summary.consigneeStreet')"
|
||||
:value="formattedAddress"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</QCard>
|
||||
<QCard class="vn-one" v-if="entity.notes.length">
|
||||
<VnTitle
|
||||
|
|
|
@ -248,7 +248,7 @@ const columns = computed(() => [
|
|||
name: 'TicketCard',
|
||||
}).href;
|
||||
window.open(url, '_blank');
|
||||
} else viewSummary(row.id, TicketSummary);
|
||||
} else viewSummary(row.id, TicketSummary, 'lg-width');
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { ref, computed, onMounted } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
|
@ -7,8 +7,6 @@ import CardSummary from 'components/ui/CardSummary.vue';
|
|||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||
import EntryDescriptorProxy from 'src/pages/Entry/Card/EntryDescriptorProxy.vue';
|
||||
import FetchData from 'src/components/FetchData.vue';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import { toDate, toCurrency, toCelsius } from 'src/filters';
|
||||
import { toDateTimeFormat } from 'src/filters/date.js';
|
||||
import { dashIfEmpty } from 'src/filters';
|
||||
|
@ -252,16 +250,16 @@ async function setTravelData(travelData) {
|
|||
}
|
||||
|
||||
const getLink = (param) => `#/travel/${entityId.value}/${param}`;
|
||||
|
||||
onMounted(async () => {
|
||||
const { data } = await axios.get('Warehouses', {
|
||||
params: { fields: ['id', 'name'] },
|
||||
});
|
||||
warehouses.value = data;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
url="Warehouses"
|
||||
:filter="{ fields: ['id', 'name'] }"
|
||||
order="name"
|
||||
@on-fetch="(data) => (warehouses = data)"
|
||||
auto-load
|
||||
/>
|
||||
<CardSummary
|
||||
ref="summaryRef"
|
||||
:url="`Travels/${entityId}/getTravel`"
|
||||
|
@ -275,72 +273,68 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
|
|||
<TravelDescriptorMenuItems :travel="entity" />
|
||||
</template>
|
||||
<template #body>
|
||||
<QCard class="vn-one">
|
||||
<QCardSection class="q-pa-none">
|
||||
<VnTitle
|
||||
:url="getLink('basic-data')"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
</QCardSection>
|
||||
<VnLv :label="t('globals.shipped')" :value="toDate(travel.shipped)" />
|
||||
<VnLv
|
||||
:label="t('globals.warehouseOut')"
|
||||
:value="travel.warehouseOut?.name"
|
||||
/>
|
||||
<VnRow>
|
||||
<QCheckbox
|
||||
:label="t('travel.basicData.isRaid')"
|
||||
v-model="travel.isRaid"
|
||||
:disable="true"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<QCheckbox
|
||||
:label="t('travel.summary.delivered')"
|
||||
v-model="travel.isDelivered"
|
||||
:disable="true"
|
||||
/>
|
||||
</VnRow>
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<QCardSection class="q-pa-none">
|
||||
<VnTitle
|
||||
:url="getLink('basic-data')"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
</QCardSection>
|
||||
<VnLv :label="t('globals.landed')" :value="toDate(travel.landed)" />
|
||||
<VnLv
|
||||
:label="t('globals.warehouseIn')"
|
||||
:value="travel.warehouseIn?.name"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('travel.basicData.daysInForward')"
|
||||
:value="travel?.daysInForward"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('travel.summary.received')"
|
||||
v-model="travel.isReceived"
|
||||
:disable="true"
|
||||
/>
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<QCardSection class="q-pa-none">
|
||||
<VnTitle
|
||||
:url="getLink('basic-data')"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
</QCardSection>
|
||||
<VnLv :label="t('globals.agency')" :value="travel.agency?.name" />
|
||||
<VnLv :label="t('globals.reference')" :value="travel.ref" />
|
||||
<VnLv label="m³" :value="travel.m3" />
|
||||
<VnLv :label="t('globals.totalEntries')" :value="travel.totalEntries" />
|
||||
<VnLv
|
||||
:label="t('travel.summary.availabled')"
|
||||
:value="
|
||||
dashIfEmpty(toDateTimeFormat(travel.availabled))
|
||||
"
|
||||
<QCard class="full-width">
|
||||
<VnTitle
|
||||
:url="getLink('basic-data')"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
<div class="vn-card-group">
|
||||
<div class="vn-card-content">
|
||||
<VnLv
|
||||
:label="t('globals.shipped')"
|
||||
:value="toDate(travel.shipped)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('globals.warehouseOut')"
|
||||
:value="travel.warehouseOut?.name"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('travel.basicData.isRaid')"
|
||||
v-model="travel.isRaid"
|
||||
:disable="true"
|
||||
size="sm"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('travel.summary.delivered')"
|
||||
v-model="travel.isDelivered"
|
||||
:disable="true"
|
||||
size="sm"
|
||||
/>
|
||||
</div>
|
||||
<div class="vn-card-content">
|
||||
<VnLv
|
||||
:label="t('globals.landed')"
|
||||
:value="toDate(travel.landed)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('globals.warehouseIn')"
|
||||
:value="travel.warehouseIn?.name"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('travel.basicData.daysInForward')"
|
||||
:value="travel?.daysInForward"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('travel.summary.received')"
|
||||
v-model="travel.isReceived"
|
||||
:disable="true"
|
||||
size="sm"
|
||||
/>
|
||||
</div>
|
||||
<div class="vn-card-content">
|
||||
<VnLv :label="t('globals.agency')" :value="travel.agency?.name" />
|
||||
<VnLv :label="t('globals.reference')" :value="travel.ref" />
|
||||
<VnLv label="m³" :value="travel.m3" />
|
||||
<VnLv
|
||||
:label="t('globals.totalEntries')"
|
||||
:value="travel.totalEntries"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('travel.summary.availabled')"
|
||||
:value="dashIfEmpty(toDateTimeFormat(travel.availabled))"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</QCard>
|
||||
<QCard class="full-width">
|
||||
<VnTitle :text="t('travel.summary.entries')" />
|
||||
|
|
|
@ -201,7 +201,7 @@ const columns = computed(() => [
|
|||
{
|
||||
title: t('components.smartCard.viewSummary'),
|
||||
icon: 'preview',
|
||||
action: (row) => viewSummary(row.id, TravelSummary),
|
||||
action: (row) => viewSummary(row.id, TravelSummary, 'lg-width'),
|
||||
isPrimary: true,
|
||||
},
|
||||
],
|
||||
|
|
|
@ -48,77 +48,88 @@ onBeforeMount(async () => {
|
|||
<WorkerDescriptorMenu :worker="entity" :is-excluded="workerExcluded" />
|
||||
</template>
|
||||
<template #body="{ entity: worker }">
|
||||
<QCard class="vn-one">
|
||||
<QCard class="vn-two">
|
||||
<VnTitle :url="basicDataUrl" :text="t('globals.summary.basicData')" />
|
||||
<VnLv :label="t('globals.name')" :value="worker.user?.nickname" />
|
||||
<VnLv :label="t('globals.department')">
|
||||
<template #value>
|
||||
<span class="link" v-text="worker.department?.department?.name" />
|
||||
<DepartmentDescriptorProxy
|
||||
:id="worker.department?.department?.id"
|
||||
<div class="vn-card-group">
|
||||
<div class="vn-card-content">
|
||||
<VnLv :label="t('globals.name')" :value="worker.user?.nickname" />
|
||||
<VnLv :label="t('globals.department')">
|
||||
<template #value>
|
||||
<span
|
||||
class="link"
|
||||
v-text="worker.department?.department?.name"
|
||||
/>
|
||||
<DepartmentDescriptorProxy
|
||||
:id="worker.department?.department?.id"
|
||||
/>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :label="t('worker.summary.boss')" link>
|
||||
<template #value>
|
||||
<VnUserLink
|
||||
v-if="worker.boss"
|
||||
:name="dashIfEmpty(worker.boss?.name)"
|
||||
:worker-id="worker.bossFk"
|
||||
/>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :value="worker.mobileExtension">
|
||||
<template #label>
|
||||
{{ t('worker.summary.phoneExtension') }}
|
||||
<VnLinkPhone :phone-number="worker.mobileExtension" />
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :value="worker.phone">
|
||||
<template #label>
|
||||
{{ t('worker.summary.entPhone') }}
|
||||
<VnLinkPhone :phone-number="worker.phone" />
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :value="advancedSummary?.client?.phone">
|
||||
<template #label>
|
||||
{{ t('worker.summary.personalPhone') }}
|
||||
<VnLinkPhone
|
||||
:phone-number="advancedSummary?.client?.phone"
|
||||
/>
|
||||
</template>
|
||||
</VnLv>
|
||||
</div>
|
||||
<div class="vn-card-content">
|
||||
<VnLv
|
||||
:label="t('worker.summary.fiDueDate')"
|
||||
:value="toDate(advancedSummary.fiDueDate)"
|
||||
/>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :label="t('worker.summary.boss')" link>
|
||||
<template #value>
|
||||
<VnUserLink
|
||||
v-if="worker.boss"
|
||||
:name="dashIfEmpty(worker.boss?.name)"
|
||||
:worker-id="worker.bossFk"
|
||||
<VnLv :label="t('worker.summary.sex')" :value="worker.sex" />
|
||||
<VnLv
|
||||
:label="t('worker.summary.seniority')"
|
||||
:value="toDate(advancedSummary.seniority)"
|
||||
/>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :value="worker.mobileExtension">
|
||||
<template #label>
|
||||
{{ t('worker.summary.phoneExtension') }}
|
||||
<VnLinkPhone :phone-number="worker.mobileExtension" />
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :value="worker.phone">
|
||||
<template #label>
|
||||
{{ t('worker.summary.entPhone') }}
|
||||
<VnLinkPhone :phone-number="worker.phone" />
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :value="advancedSummary?.client?.phone">
|
||||
<template #label>
|
||||
{{ t('worker.summary.personalPhone') }}
|
||||
<VnLinkPhone :phone-number="advancedSummary?.client?.phone" />
|
||||
</template>
|
||||
</VnLv>
|
||||
</QCard>
|
||||
<QCard class="vn-one" v-if="advancedSummary">
|
||||
<VnTitle :url="basicDataUrl" :text="t('globals.summary.basicData')" />
|
||||
<VnLv
|
||||
:label="t('worker.summary.fiDueDate')"
|
||||
:value="toDate(advancedSummary.fiDueDate)"
|
||||
/>
|
||||
<VnLv :label="t('worker.summary.sex')" :value="worker.sex" />
|
||||
<VnLv
|
||||
:label="t('worker.summary.seniority')"
|
||||
:value="toDate(advancedSummary.seniority)"
|
||||
/>
|
||||
<VnLv :label="t('worker.summary.fi')" :value="advancedSummary.fi" />
|
||||
<VnLv
|
||||
:label="t('worker.summary.birth')"
|
||||
:value="toDate(advancedSummary.birth)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('worker.summary.isFreelance')"
|
||||
:value="advancedSummary.isFreelance"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('worker.summary.isSsDiscounted')"
|
||||
:value="advancedSummary.isSsDiscounted"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('worker.summary.hasMachineryAuthorized')"
|
||||
:value="advancedSummary.hasMachineryAuthorized"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('worker.summary.isDisable')"
|
||||
:value="advancedSummary.isDisable"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('worker.summary.fi')"
|
||||
:value="advancedSummary.fi"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('worker.summary.birth')"
|
||||
:value="toDate(advancedSummary.birth)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('worker.summary.isFreelance')"
|
||||
:value="advancedSummary.isFreelance"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('worker.summary.isSsDiscounted')"
|
||||
:value="advancedSummary.isSsDiscounted"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('worker.summary.hasMachineryAuthorized')"
|
||||
:value="advancedSummary.hasMachineryAuthorized"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('worker.summary.isDisable')"
|
||||
:value="advancedSummary.isDisable"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<VnTitle :text="t('worker.summary.userData')" />
|
||||
|
|
|
@ -105,7 +105,7 @@ const columns = computed(() => [
|
|||
{
|
||||
title: t('components.smartCard.viewSummary'),
|
||||
icon: 'preview',
|
||||
action: (row) => viewSummary(row.id, WorkerSummary),
|
||||
action: (row) => viewSummary(row.id, WorkerSummary, 'lg-width'),
|
||||
isPrimary: true,
|
||||
},
|
||||
],
|
||||
|
|
|
@ -75,21 +75,30 @@ onMounted(async () => {
|
|||
<template #body="{ entity: zone }">
|
||||
<QCard class="vn-one">
|
||||
<VnTitle :url="zoneUrl + `basic-data`" :text="t('summary.basicData')" />
|
||||
<VnLv :label="t('list.agency')" :value="zone.agencyMode?.name" />
|
||||
<VnLv :label="t('list.price')" :value="toCurrency(zone.price)" />
|
||||
<VnLv :label="t('zone.bonus')" :value="toCurrency(zone.bonus)" />
|
||||
<div class="card-group">
|
||||
<div class="card-content">
|
||||
<VnLv :label="t('list.agency')" :value="zone.agencyMode?.name" />
|
||||
<VnLv :label="t('list.price')" :value="toCurrency(zone.price)" />
|
||||
<VnLv :label="t('zone.bonus')" :value="toCurrency(zone.bonus)" />
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<VnLv
|
||||
:label="t('summary.closeHour')"
|
||||
:value="toTimeFormat(zone.hour)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('zone.travelingDays')"
|
||||
:value="zone.travelingDays"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('zone.volumetric')"
|
||||
v-model="zone.isVolumetric"
|
||||
:disable="true"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<VnTitle :url="zoneUrl + `basic-data`" :text="t('summary.basicData')" />
|
||||
<VnLv :label="t('summary.closeHour')" :value="toTimeFormat(zone.hour)" />
|
||||
<VnLv :label="t('zone.travelingDays')" :value="zone.travelingDays" />
|
||||
<QCheckbox
|
||||
:label="t('zone.volumetric')"
|
||||
v-model="zone.isVolumetric"
|
||||
:disable="true"
|
||||
/>
|
||||
</QCard>
|
||||
<QCard class="full-width">
|
||||
<VnTitle :url="zoneUrl + `warehouses`" :text="t('list.warehouse')" />
|
||||
<QTable
|
||||
:columns="columns"
|
||||
|
@ -100,3 +109,15 @@ onMounted(async () => {
|
|||
</template>
|
||||
</CardSummary>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.card-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.card-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -4,7 +4,7 @@ describe('InvoiceInList', () => {
|
|||
const firstRow = 'tbody.q-virtual-scroll__content tr:nth-child(1)';
|
||||
const firstId = `${firstRow} > td:nth-child(2) span`;
|
||||
const firstDetailBtn = `${firstRow} .q-btn:nth-child(1)`;
|
||||
const summaryHeaders = '.summaryBody .header-link';
|
||||
const summaryHeaders = (opt) => `.summaryBody > .${opt} > .q-pb-lg > .header-link`;
|
||||
const mockInvoiceRef = `createMockInvoice${Math.floor(Math.random() * 100)}`;
|
||||
const mock = {
|
||||
vnSupplierSelect: { val: 'farmer king', type: 'select' },
|
||||
|
@ -32,8 +32,8 @@ describe('InvoiceInList', () => {
|
|||
|
||||
it('should open the details', () => {
|
||||
cy.get(firstDetailBtn).click();
|
||||
cy.get(summaryHeaders).eq(1).contains('Basic data');
|
||||
cy.get(summaryHeaders).eq(4).contains('Vat');
|
||||
cy.get(summaryHeaders('max-width')).contains('Basic data');
|
||||
cy.get(summaryHeaders('vat')).contains('Vat');
|
||||
});
|
||||
|
||||
it('should create a new Invoice', () => {
|
||||
|
|
|
@ -3,10 +3,10 @@ describe('Ticket descriptor', () => {
|
|||
const listItem = '[role="menu"] .q-list .q-item';
|
||||
const toCloneOpt = 'To clone ticket';
|
||||
const setWeightOpt = 'Set weight';
|
||||
const warehouseValue = ':nth-child(1) > :nth-child(6) > .value > span';
|
||||
const warehouseValue = ':nth-child(1) > [data-cy="vnLvWarehouse"]';
|
||||
const summaryHeader = '.summaryHeader > div';
|
||||
const weight = 25;
|
||||
const weightValue = '.summaryBody.row :nth-child(1) > :nth-child(9) > .value > span';
|
||||
const weightValue = '[data-cy="vnLvWeight"]';
|
||||
beforeEach(() => {
|
||||
cy.login('developer');
|
||||
cy.viewport(1920, 1080);
|
||||
|
|
|
@ -39,11 +39,11 @@ describe('UserPanel', () => {
|
|||
cy.get(userCompany).should('have.value', 'Warehouse One').click();
|
||||
|
||||
//Actualizo la opción
|
||||
cy.getOption(2);
|
||||
cy.getOption(3);
|
||||
|
||||
//Compruebo la notificación
|
||||
cy.get('.q-notification').should('be.visible');
|
||||
cy.get(userCompany).should('have.value', 'Warehouse Two');
|
||||
cy.get(userCompany).should('have.value', 'TestingWarehouse');
|
||||
|
||||
//Restauro el valor
|
||||
cy.get(userCompany).click();
|
||||
|
|
|
@ -20,7 +20,7 @@ describe('VnLog', () => {
|
|||
it('should filter by entity', () => {
|
||||
cy.selectOption('.q-drawer--right .q-item > .q-select', 'Claim');
|
||||
cy.get('.q-page').click();
|
||||
cy.validateContent(chips[0], 'Claim');
|
||||
cy.validateContent(chips[0], 'Beginning');
|
||||
});
|
||||
|
||||
it('should show claimDescriptor', () => {
|
||||
|
|
|
@ -1,27 +1,25 @@
|
|||
describe('WorkerSummary', () => {
|
||||
const departmentDescriptor = ':nth-child(1) > :nth-child(3) > .value > .link';
|
||||
const roleDescriptor = ':nth-child(3) > :nth-child(4) > .value > .link';
|
||||
const department = ':nth-child(1) > [data-cy="vnLvDepartment"] > .value';
|
||||
const role = '[data-cy="vnLvRole"] > .value';
|
||||
beforeEach(() => {
|
||||
cy.viewport(1280, 720);
|
||||
cy.login('developer');
|
||||
cy.visit('/#/worker/19/summary');
|
||||
});
|
||||
|
||||
it('should load worker summary', () => {
|
||||
it('should load worker summary and show the department', () => {
|
||||
cy.waitForElement('.summaryHeader');
|
||||
cy.get('.summaryHeader > div').should('have.text', '19 - salesboss salesboss');
|
||||
cy.get(':nth-child(1) > :nth-child(2) > .value > span').should(
|
||||
'have.text',
|
||||
'salesBossNick',
|
||||
);
|
||||
cy.get(department).should('have.text', 'VENTAS');
|
||||
});
|
||||
|
||||
it('should try descriptors', () => {
|
||||
cy.waitForElement('.summaryHeader');
|
||||
cy.get(departmentDescriptor).click();
|
||||
cy.get(department).click();
|
||||
cy.get('.descriptor').should('be.visible');
|
||||
cy.get('.q-item > .q-item__label').should('include.text', '43');
|
||||
cy.get(roleDescriptor).click();
|
||||
cy.get('.summaryBody').click();
|
||||
cy.get(role).click();
|
||||
cy.get('.descriptor').should('be.visible');
|
||||
cy.get('.q-item > .q-item__label').should('include.text', '19');
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue