forked from verdnatura/salix-front
Merge branch 'dev' of https: refs #7353//gitea.verdnatura.es/verdnatura/salix-front into 7353-fineTunningMonitor
This commit is contained in:
commit
a8fc5a8d73
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onBeforeMount, onMounted, computed, watch, useAttrs } from 'vue';
|
import { ref, onBeforeMount, onMounted, computed, watch } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
|
@ -107,9 +107,8 @@ const orders = ref(parseOrder(routeQuery.filter?.order));
|
||||||
const CrudModelRef = ref({});
|
const CrudModelRef = ref({});
|
||||||
const showForm = ref(false);
|
const showForm = ref(false);
|
||||||
const splittedColumns = ref({ columns: [] });
|
const splittedColumns = ref({ columns: [] });
|
||||||
const columnsVisibilitySkiped = ref();
|
const columnsVisibilitySkipped = ref();
|
||||||
const createForm = ref();
|
const createForm = ref();
|
||||||
const defaultClass = useAttrs().class ?? 'q-px-md';
|
|
||||||
|
|
||||||
const tableModes = [
|
const tableModes = [
|
||||||
{
|
{
|
||||||
|
@ -136,7 +135,7 @@ onMounted(() => {
|
||||||
? CARD_MODE
|
? CARD_MODE
|
||||||
: $props.defaultMode;
|
: $props.defaultMode;
|
||||||
stateStore.rightDrawer = true;
|
stateStore.rightDrawer = true;
|
||||||
columnsVisibilitySkiped.value = [
|
columnsVisibilitySkipped.value = [
|
||||||
...splittedColumns.value.columns
|
...splittedColumns.value.columns
|
||||||
.filter((c) => c.visible == false)
|
.filter((c) => c.visible == false)
|
||||||
.map((c) => c.name),
|
.map((c) => c.name),
|
||||||
|
@ -333,8 +332,10 @@ defineExpose({
|
||||||
</QScrollArea>
|
</QScrollArea>
|
||||||
</QDrawer>
|
</QDrawer>
|
||||||
<!-- class in div to fix warn-->
|
<!-- class in div to fix warn-->
|
||||||
|
|
||||||
<CrudModel
|
<CrudModel
|
||||||
v-bind="{ ...$attrs, ...{ class: defaultClass } }"
|
v-bind="$attrs"
|
||||||
|
:class="$attrs['class'] ?? 'q-px-md'"
|
||||||
:limit="20"
|
:limit="20"
|
||||||
ref="CrudModelRef"
|
ref="CrudModelRef"
|
||||||
@on-fetch="(...args) => emit('onFetch', ...args)"
|
@on-fetch="(...args) => emit('onFetch', ...args)"
|
||||||
|
@ -376,14 +377,14 @@ defineExpose({
|
||||||
v-if="isTableMode"
|
v-if="isTableMode"
|
||||||
v-model="splittedColumns.columns"
|
v-model="splittedColumns.columns"
|
||||||
:table-code="tableCode ?? route.name"
|
:table-code="tableCode ?? route.name"
|
||||||
:skip="columnsVisibilitySkiped"
|
:skip="columnsVisibilitySkipped"
|
||||||
/>
|
/>
|
||||||
<QBtnToggle
|
<QBtnToggle
|
||||||
v-model="mode"
|
v-model="mode"
|
||||||
toggle-color="primary"
|
toggle-color="primary"
|
||||||
class="bg-vn-section-color"
|
class="bg-vn-section-color"
|
||||||
dense
|
dense
|
||||||
:options="tableModes"
|
:options="tableModes.filter((mode) => !mode.disable)"
|
||||||
/>
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
v-if="$props.rightSearch"
|
v-if="$props.rightSearch"
|
||||||
|
@ -401,6 +402,7 @@ defineExpose({
|
||||||
:style="$props.columnSearch ? 'height: 75px' : ''"
|
:style="$props.columnSearch ? 'height: 75px' : ''"
|
||||||
>
|
>
|
||||||
<div class="row items-center no-wrap" style="height: 30px">
|
<div class="row items-center no-wrap" style="height: 30px">
|
||||||
|
<QTooltip v-if="col.toolTip">{{ col.toolTip }}</QTooltip>
|
||||||
<VnTableOrder
|
<VnTableOrder
|
||||||
v-model="orders[col.orderBy ?? col.name]"
|
v-model="orders[col.orderBy ?? col.name]"
|
||||||
:name="col.orderBy ?? col.name"
|
:name="col.orderBy ?? col.name"
|
||||||
|
@ -667,14 +669,12 @@ es:
|
||||||
color: var(--vn-text-color);
|
color: var(--vn-text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.q-table--dark {
|
.q-table--dark .q-table__bottom,
|
||||||
&__bottom,
|
.q-table--dark thead,
|
||||||
thead,
|
.q-table--dark tr,
|
||||||
tr,
|
.q-table--dark th,
|
||||||
th,
|
.q-table--dark td {
|
||||||
td {
|
border-color: var(--vn-section-color);
|
||||||
border-color: black;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.q-table__container > div:first-child {
|
.q-table__container > div:first-child {
|
||||||
|
|
|
@ -7,5 +7,5 @@ export function getDateQBadgeColor(date) {
|
||||||
let comparation = today - timeTicket;
|
let comparation = today - timeTicket;
|
||||||
|
|
||||||
if (comparation == 0) return 'warning';
|
if (comparation == 0) return 'warning';
|
||||||
if (comparation < 0) return 'negative';
|
if (comparation < 0) return 'success';
|
||||||
}
|
}
|
||||||
|
|
|
@ -459,6 +459,7 @@ entry:
|
||||||
travelFk: Travel
|
travelFk: Travel
|
||||||
isExcludedFromAvailable: Inventory
|
isExcludedFromAvailable: Inventory
|
||||||
isRaid: Raid
|
isRaid: Raid
|
||||||
|
invoiceAmount: Import
|
||||||
summary:
|
summary:
|
||||||
commission: Commission
|
commission: Commission
|
||||||
currency: Currency
|
currency: Currency
|
||||||
|
@ -1127,9 +1128,12 @@ travel:
|
||||||
agency: Agency
|
agency: Agency
|
||||||
shipped: Shipped
|
shipped: Shipped
|
||||||
landed: Landed
|
landed: Landed
|
||||||
|
shipHour: Shipment Hour
|
||||||
|
landHour: Landing Hour
|
||||||
warehouseIn: Warehouse in
|
warehouseIn: Warehouse in
|
||||||
warehouseOut: Warehouse out
|
warehouseOut: Warehouse out
|
||||||
totalEntries: Total entries
|
totalEntries: Total entries
|
||||||
|
totalEntriesTooltip: Total entries
|
||||||
summary:
|
summary:
|
||||||
confirmed: Confirmed
|
confirmed: Confirmed
|
||||||
entryId: Entry Id
|
entryId: Entry Id
|
||||||
|
|
|
@ -458,6 +458,7 @@ entry:
|
||||||
travelFk: Envio
|
travelFk: Envio
|
||||||
isExcludedFromAvailable: Inventario
|
isExcludedFromAvailable: Inventario
|
||||||
isRaid: Redada
|
isRaid: Redada
|
||||||
|
invoiceAmount: Importe
|
||||||
summary:
|
summary:
|
||||||
commission: Comisión
|
commission: Comisión
|
||||||
currency: Moneda
|
currency: Moneda
|
||||||
|
@ -1104,11 +1105,14 @@ travel:
|
||||||
id: Id
|
id: Id
|
||||||
ref: Referencia
|
ref: Referencia
|
||||||
agency: Agencia
|
agency: Agencia
|
||||||
shipped: Enviado
|
shipped: F.envío
|
||||||
landed: Llegada
|
shipHour: Hora de envío
|
||||||
warehouseIn: Almacén de salida
|
landHour: Hora de llegada
|
||||||
warehouseOut: Almacén de entrada
|
landed: F.entrega
|
||||||
totalEntries: Total de entradas
|
warehouseIn: Alm.salida
|
||||||
|
warehouseOut: Alm.entrada
|
||||||
|
totalEntries: ∑
|
||||||
|
totalEntriesTooltip: Entradas totales
|
||||||
summary:
|
summary:
|
||||||
confirmed: Confirmado
|
confirmed: Confirmado
|
||||||
entryId: Id entrada
|
entryId: Id entrada
|
||||||
|
@ -1273,6 +1277,7 @@ components:
|
||||||
clone: Clonar
|
clone: Clonar
|
||||||
openCard: Ficha
|
openCard: Ficha
|
||||||
openSummary: Detalles
|
openSummary: Detalles
|
||||||
|
viewSummary: Vista previa
|
||||||
cardDescriptor:
|
cardDescriptor:
|
||||||
mainList: Listado principal
|
mainList: Listado principal
|
||||||
summary: Resumen
|
summary: Resumen
|
||||||
|
|
|
@ -141,6 +141,7 @@ const deleteAcl = async ({ id }) => {
|
||||||
formInitialData: {},
|
formInitialData: {},
|
||||||
}"
|
}"
|
||||||
order="id DESC"
|
order="id DESC"
|
||||||
|
:disable-option="{ card: true }"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
default-mode="table"
|
default-mode="table"
|
||||||
:right-search="true"
|
:right-search="true"
|
||||||
|
|
|
@ -21,24 +21,21 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'id',
|
name: 'id',
|
||||||
label: t('id'),
|
label: t('Id'),
|
||||||
isId: true,
|
isId: true,
|
||||||
field: 'id',
|
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'alias',
|
name: 'alias',
|
||||||
label: t('alias'),
|
label: t('Alias'),
|
||||||
field: 'alias',
|
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'description',
|
name: 'description',
|
||||||
label: t('description'),
|
label: t('Description'),
|
||||||
field: 'description',
|
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
|
@ -69,9 +66,17 @@ const columns = computed(() => [
|
||||||
}"
|
}"
|
||||||
order="id DESC"
|
order="id DESC"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
|
:disable-option="{ card: true }"
|
||||||
default-mode="table"
|
default-mode="table"
|
||||||
redirect="account/alias"
|
redirect="account/alias"
|
||||||
:is-editable="true"
|
:is-editable="true"
|
||||||
:use-model="true"
|
:use-model="true"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Id: Id
|
||||||
|
Alias: Alias
|
||||||
|
Description: Descripción
|
||||||
|
</i18n>
|
||||||
|
|
|
@ -14,15 +14,23 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'id',
|
name: 'id',
|
||||||
label: t('id'),
|
label: t('Id'),
|
||||||
isId: true,
|
isId: true,
|
||||||
field: 'id',
|
field: 'id',
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
|
columnFilter: {
|
||||||
|
component: 'select',
|
||||||
|
name: 'search',
|
||||||
|
attrs: {
|
||||||
|
url: 'VnUsers/preview',
|
||||||
|
fields: ['id', 'name'],
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'username',
|
name: 'username',
|
||||||
label: t('nickname'),
|
label: t('Nickname'),
|
||||||
isTitle: true,
|
isTitle: true,
|
||||||
component: 'input',
|
component: 'input',
|
||||||
columnField: {
|
columnField: {
|
||||||
|
@ -37,7 +45,7 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'name',
|
name: 'name',
|
||||||
label: t('name'),
|
label: t('Name'),
|
||||||
component: 'input',
|
component: 'input',
|
||||||
columnField: {
|
columnField: {
|
||||||
component: null,
|
component: null,
|
||||||
|
@ -65,6 +73,7 @@ const columns = computed(() => [
|
||||||
title: t('View Summary'),
|
title: t('View Summary'),
|
||||||
icon: 'preview',
|
icon: 'preview',
|
||||||
action: (row) => viewSummary(row.id, AccountSummary),
|
action: (row) => viewSummary(row.id, AccountSummary),
|
||||||
|
isPrimary: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -108,3 +117,10 @@ const exprBuilder = (param, value) => {
|
||||||
:use-model="true"
|
:use-model="true"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Id: Id
|
||||||
|
Nickname: Nickname
|
||||||
|
Name: Nombre
|
||||||
|
</i18n>
|
||||||
|
|
|
@ -15,7 +15,6 @@ const { t } = useI18n();
|
||||||
url: 'VnUsers/preview',
|
url: 'VnUsers/preview',
|
||||||
label: t('account.search'),
|
label: t('account.search'),
|
||||||
info: t('account.searchInfo'),
|
info: t('account.searchInfo'),
|
||||||
searchUrl: 'table',
|
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -21,24 +21,30 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'id',
|
name: 'id',
|
||||||
label: t('id'),
|
label: t('Id'),
|
||||||
isId: true,
|
isId: true,
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
inWhere: true,
|
inWhere: true,
|
||||||
|
component: 'select',
|
||||||
|
name: 'search',
|
||||||
|
attrs: {
|
||||||
|
url: 'VnRoles',
|
||||||
|
fields: ['id', 'name'],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'name',
|
name: 'name',
|
||||||
label: t('name'),
|
label: t('Name'),
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'description',
|
name: 'description',
|
||||||
label: t('description'),
|
label: t('Description'),
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
|
@ -51,6 +57,7 @@ const columns = computed(() => [
|
||||||
title: t('View Summary'),
|
title: t('View Summary'),
|
||||||
icon: 'preview',
|
icon: 'preview',
|
||||||
action: (row) => viewSummary(row.id, RoleSummary),
|
action: (row) => viewSummary(row.id, RoleSummary),
|
||||||
|
isPrimary: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -93,8 +100,16 @@ const exprBuilder = (param, value) => {
|
||||||
},
|
},
|
||||||
}"
|
}"
|
||||||
order="id ASC"
|
order="id ASC"
|
||||||
|
:disable-option="{ card: true }"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
default-mode="table"
|
default-mode="table"
|
||||||
redirect="account/role"
|
redirect="account/role"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Id: Id
|
||||||
|
Description: Descripción
|
||||||
|
Name: Nombre
|
||||||
|
</i18n>
|
||||||
|
|
|
@ -79,7 +79,7 @@ const columns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('claim.state'),
|
label: t('claim.state'),
|
||||||
format: ({ stateCode }) =>
|
format: ({ stateCode }) =>
|
||||||
claimFilterRef.value?.states.find(({code}) => code === stateCode)
|
claimFilterRef.value?.states.find(({ code }) => code === stateCode)
|
||||||
?.description,
|
?.description,
|
||||||
name: 'stateCode',
|
name: 'stateCode',
|
||||||
chip: {
|
chip: {
|
||||||
|
@ -100,7 +100,7 @@ const columns = computed(() => [
|
||||||
name: 'tableActions',
|
name: 'tableActions',
|
||||||
actions: [
|
actions: [
|
||||||
{
|
{
|
||||||
title: t('Client ticket list'),
|
title: t('components.smartCard.viewSummary'),
|
||||||
icon: 'preview',
|
icon: 'preview',
|
||||||
action: (row) => viewSummary(row.id, ClaimSummary),
|
action: (row) => viewSummary(row.id, ClaimSummary),
|
||||||
},
|
},
|
||||||
|
|
|
@ -357,7 +357,7 @@ const columns = computed(() => [
|
||||||
isPrimary: true,
|
isPrimary: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('Client ticket list'),
|
title: t('components.smartCard.viewSummary'),
|
||||||
icon: 'preview',
|
icon: 'preview',
|
||||||
action: (row) => viewSummary(row.id, CustomerSummary),
|
action: (row) => viewSummary(row.id, CustomerSummary),
|
||||||
},
|
},
|
||||||
|
|
|
@ -7,11 +7,19 @@ import { useStateStore } from 'stores/useStateStore';
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
import { toDate } from 'src/filters';
|
import { toDate } from 'src/filters';
|
||||||
|
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||||
|
import EntrySummary from './Card/EntrySummary.vue';
|
||||||
|
import VnUserLink from 'components/ui/VnUserLink.vue';
|
||||||
|
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
|
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
|
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
||||||
|
import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue';
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
|
|
||||||
|
const { viewSummary } = useSummaryDialog();
|
||||||
const entryFilter = {
|
const entryFilter = {
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
|
@ -142,6 +150,12 @@ const columns = computed(() => [
|
||||||
create: true,
|
create: true,
|
||||||
format: (row, dashIfEmpty) => dashIfEmpty(row.travelRef),
|
format: (row, dashIfEmpty) => dashIfEmpty(row.travelRef),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
label: t('entry.list.tableVisibleColumns.invoiceAmount'),
|
||||||
|
name: 'invoiceAmount',
|
||||||
|
cardVisible: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('entry.list.tableVisibleColumns.isExcludedFromAvailable'),
|
label: t('entry.list.tableVisibleColumns.isExcludedFromAvailable'),
|
||||||
|
@ -168,6 +182,18 @@ const columns = computed(() => [
|
||||||
inWhere: true,
|
inWhere: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
align: 'right',
|
||||||
|
name: 'tableActions',
|
||||||
|
actions: [
|
||||||
|
{
|
||||||
|
title: t('components.smartCard.viewSummary'),
|
||||||
|
icon: 'preview',
|
||||||
|
action: (row) => viewSummary(row.id, EntrySummary),
|
||||||
|
isPrimary: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
]);
|
]);
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
stateStore.rightDrawer = true;
|
stateStore.rightDrawer = true;
|
||||||
|
@ -201,7 +227,20 @@ onMounted(async () => {
|
||||||
redirect="entry"
|
redirect="entry"
|
||||||
auto-load
|
auto-load
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
/>
|
>
|
||||||
|
<template #column-supplierFk="{ row }">
|
||||||
|
<span class="link" @click.stop>
|
||||||
|
{{ row.supplierName }}
|
||||||
|
<SupplierDescriptorProxy :id="row.supplierFk" />
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template #column-travelFk="{ row }">
|
||||||
|
<span class="link" @click.stop>
|
||||||
|
{{ row.travelRef }}
|
||||||
|
<TravelDescriptorProxy :id="row.travelFk" />
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</VnTable>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
|
|
|
@ -122,7 +122,7 @@ const columns = computed(() => [
|
||||||
name: 'tableActions',
|
name: 'tableActions',
|
||||||
actions: [
|
actions: [
|
||||||
{
|
{
|
||||||
title: t('InvoiceOutSummary'),
|
title: t('components.smartCard.viewSummary'),
|
||||||
icon: 'preview',
|
icon: 'preview',
|
||||||
action: (row) => viewSummary(row.id, InvoiceOutSummary),
|
action: (row) => viewSummary(row.id, InvoiceOutSummary),
|
||||||
},
|
},
|
||||||
|
|
|
@ -185,7 +185,7 @@ const columns = computed(() => [
|
||||||
action: (row) => openTicketsDialog(row?.id),
|
action: (row) => openTicketsDialog(row?.id),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('Preview'),
|
title: t('components.smartCard.viewSummary'),
|
||||||
icon: 'preview',
|
icon: 'preview',
|
||||||
action: (row) => viewSummary(row?.id, RouteSummary),
|
action: (row) => viewSummary(row?.id, RouteSummary),
|
||||||
},
|
},
|
||||||
|
|
|
@ -10,6 +10,7 @@ import { computed } from 'vue';
|
||||||
import TravelSummary from './Card/TravelSummary.vue';
|
import TravelSummary from './Card/TravelSummary.vue';
|
||||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||||
import { toDate } from 'src/filters';
|
import { toDate } from 'src/filters';
|
||||||
|
import { getDateQBadgeColor } from 'src/composables/getDateQBadgeColor.js';
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -46,14 +47,12 @@ const columns = computed(() => [
|
||||||
name: 'id',
|
name: 'id',
|
||||||
label: t('travel.travelList.tableVisibleColumns.id'),
|
label: t('travel.travelList.tableVisibleColumns.id'),
|
||||||
isId: true,
|
isId: true,
|
||||||
field: 'id',
|
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'ref',
|
name: 'ref',
|
||||||
label: t('travel.travelList.tableVisibleColumns.ref'),
|
label: t('travel.travelList.tableVisibleColumns.ref'),
|
||||||
field: 'ref',
|
|
||||||
component: 'input',
|
component: 'input',
|
||||||
columnField: {
|
columnField: {
|
||||||
component: null,
|
component: null,
|
||||||
|
@ -65,7 +64,6 @@ const columns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'agencyModeFk',
|
name: 'agencyModeFk',
|
||||||
label: t('travel.travelList.tableVisibleColumns.agency'),
|
label: t('travel.travelList.tableVisibleColumns.agency'),
|
||||||
field: 'agencyModeFk',
|
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'agencyModes',
|
url: 'agencyModes',
|
||||||
|
@ -78,37 +76,10 @@ const columns = computed(() => [
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
align: 'left',
|
|
||||||
name: 'shipped',
|
|
||||||
label: t('travel.travelList.tableVisibleColumns.shipped'),
|
|
||||||
field: 'shipped',
|
|
||||||
component: 'date',
|
|
||||||
columnField: {
|
|
||||||
component: null,
|
|
||||||
},
|
|
||||||
cardVisible: true,
|
|
||||||
create: true,
|
|
||||||
format: (row, dashIfEmpty) => dashIfEmpty(toDate(row.shipped)),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: 'left',
|
|
||||||
name: 'landed',
|
|
||||||
label: t('travel.travelList.tableVisibleColumns.landed'),
|
|
||||||
field: 'landed',
|
|
||||||
component: 'date',
|
|
||||||
columnField: {
|
|
||||||
component: null,
|
|
||||||
},
|
|
||||||
cardVisible: true,
|
|
||||||
create: true,
|
|
||||||
format: (row, dashIfEmpty) => dashIfEmpty(toDate(row.landed)),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'warehouseInFk',
|
name: 'warehouseInFk',
|
||||||
label: t('travel.travelList.tableVisibleColumns.warehouseIn'),
|
label: t('travel.travelList.tableVisibleColumns.warehouseIn'),
|
||||||
field: 'warehouseInFk',
|
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'warehouses',
|
url: 'warehouses',
|
||||||
|
@ -123,11 +94,28 @@ const columns = computed(() => [
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'shipped',
|
||||||
|
label: t('travel.travelList.tableVisibleColumns.shipped'),
|
||||||
|
component: 'date',
|
||||||
|
columnField: {
|
||||||
|
component: null,
|
||||||
|
},
|
||||||
|
cardVisible: true,
|
||||||
|
create: true,
|
||||||
|
format: (row, dashIfEmpty) => dashIfEmpty(toDate(row.shipped)),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'shipmentHour',
|
||||||
|
label: t('travel.travelList.tableVisibleColumns.shipHour'),
|
||||||
|
cardVisible: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'warehouseOutFk',
|
name: 'warehouseOutFk',
|
||||||
label: t('travel.travelList.tableVisibleColumns.warehouseOut'),
|
label: t('travel.travelList.tableVisibleColumns.warehouseOut'),
|
||||||
field: 'warehouseOutFk',
|
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'warehouses',
|
url: 'warehouses',
|
||||||
|
@ -140,12 +128,30 @@ const columns = computed(() => [
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'landed',
|
||||||
|
label: t('travel.travelList.tableVisibleColumns.landed'),
|
||||||
|
component: 'date',
|
||||||
|
columnField: {
|
||||||
|
component: null,
|
||||||
|
},
|
||||||
|
cardVisible: true,
|
||||||
|
create: true,
|
||||||
|
format: (row, dashIfEmpty) => dashIfEmpty(toDate(row.landed)),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'landingHour',
|
||||||
|
label: t('travel.travelList.tableVisibleColumns.landHour'),
|
||||||
|
cardVisible: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'totalEntries',
|
name: 'totalEntries',
|
||||||
label: t('travel.travelList.tableVisibleColumns.totalEntries'),
|
label: t('travel.travelList.tableVisibleColumns.totalEntries'),
|
||||||
field: 'totalEntries',
|
|
||||||
component: 'input',
|
component: 'input',
|
||||||
|
toolTip: t('travel.travelList.tableVisibleColumns.totalEntriesTooltip'),
|
||||||
columnField: {
|
columnField: {
|
||||||
component: null,
|
component: null,
|
||||||
},
|
},
|
||||||
|
@ -165,13 +171,15 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('Add entry'),
|
title: t('Add entry'),
|
||||||
icon: 'contact_support',
|
icon: 'vn:ticket',
|
||||||
action: redirectCreateEntryView,
|
action: redirectCreateEntryView,
|
||||||
|
isPrimary: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('View Summary'),
|
title: t('components.smartCard.viewSummary'),
|
||||||
icon: 'preview',
|
icon: 'preview',
|
||||||
action: (row) => viewSummary(row.id, TravelSummary),
|
action: (row) => viewSummary(row.id, TravelSummary),
|
||||||
|
isPrimary: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -202,12 +210,43 @@ const columns = computed(() => [
|
||||||
redirect="travel"
|
redirect="travel"
|
||||||
:is-editable="false"
|
:is-editable="false"
|
||||||
:use-model="true"
|
:use-model="true"
|
||||||
|
>
|
||||||
|
<template #column-shipped="{ row }">
|
||||||
|
<QBadge
|
||||||
|
text-color="black"
|
||||||
|
v-if="getDateQBadgeColor(row.shipped)"
|
||||||
|
:color="getDateQBadgeColor(row.shipped)"
|
||||||
|
>
|
||||||
|
{{ toDate(row.shipped) }}
|
||||||
|
</QBadge>
|
||||||
|
<span v-else>{{ toDate(row.shipped) }}</span>
|
||||||
|
<QIcon
|
||||||
|
name="flight_takeoff"
|
||||||
|
size="sm"
|
||||||
|
:class="{ 'is-active': row.isDelivered }"
|
||||||
/>
|
/>
|
||||||
|
</template>
|
||||||
|
<template #column-landed="{ row }">
|
||||||
|
<QBadge
|
||||||
|
text-color="black"
|
||||||
|
v-if="getDateQBadgeColor(row.landed)"
|
||||||
|
:color="getDateQBadgeColor(row.landed)"
|
||||||
|
>
|
||||||
|
{{ toDate(row.landed) }}
|
||||||
|
</QBadge>
|
||||||
|
<span v-else>{{ toDate(row.landed) }}</span>
|
||||||
|
<QIcon
|
||||||
|
name="flight_land"
|
||||||
|
size="sm"
|
||||||
|
:class="{ 'is-active': row.isReceived }"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</VnTable>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
en:
|
en:
|
||||||
addEntry: Add entry
|
Add entry: Add entry
|
||||||
searchByIdOrReference: Search by ID or reference
|
searchByIdOrReference: Search by ID or reference
|
||||||
|
|
||||||
es:
|
es:
|
||||||
|
@ -215,4 +254,12 @@ es:
|
||||||
searchByIdOrReference: Buscar por ID o por referencia
|
searchByIdOrReference: Buscar por ID o por referencia
|
||||||
You can search by travel id or name: Buscar por envio por id o nombre
|
You can search by travel id or name: Buscar por envio por id o nombre
|
||||||
Search travel: Buscar envio
|
Search travel: Buscar envio
|
||||||
|
Clone: Clonar
|
||||||
|
Add entry: Añadir Entrada
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.is-active {
|
||||||
|
color: #c8e484;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -77,7 +77,7 @@ const columns = computed(() => [
|
||||||
name: 'tableActions',
|
name: 'tableActions',
|
||||||
actions: [
|
actions: [
|
||||||
{
|
{
|
||||||
title: t('InvoiceOutSummary'),
|
title: t('components.smartCard.viewSummary'),
|
||||||
icon: 'preview',
|
icon: 'preview',
|
||||||
action: (row) => viewSummary(row.id, WorkerSummary),
|
action: (row) => viewSummary(row.id, WorkerSummary),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue