This commit is contained in:
parent
485d9203c2
commit
11848a1cd7
|
@ -6,6 +6,8 @@ import VnLv from 'components/ui/VnLv.vue';
|
|||
import { dashIfEmpty, toDate } from 'src/filters';
|
||||
import RouteDescriptorMenu from 'pages/Route/Card/RouteDescriptorMenu.vue';
|
||||
import filter from './RouteFilter.js';
|
||||
import useCardDescription from 'src/composables/useCardDescription';
|
||||
import axios from 'axios';
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
|
@ -16,7 +18,6 @@ const $props = defineProps({
|
|||
});
|
||||
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
const zone = ref();
|
||||
const zoneId = ref();
|
||||
const entityId = computed(() => {
|
||||
|
@ -50,9 +51,9 @@ onMounted(async () => {
|
|||
width="lg-width"
|
||||
>
|
||||
<template #body="{ entity }">
|
||||
<VnLv :label="t('Date')" :value="toDate(entity?.dated)" />
|
||||
<VnLv :label="t('Agency')" :value="entity?.agencyMode?.name" />
|
||||
<VnLv :label="t('Zone')" :value="zone" />
|
||||
<VnLv :label="$t('Date')" :value="toDate(entity?.dated)" />
|
||||
<VnLv :label="$t('Agency')" :value="entity?.agencyMode?.name" />
|
||||
<VnLv :label="$t('Zone')" :value="zone" />
|
||||
<VnLv
|
||||
:label="$t('Volume')"
|
||||
:value="`${dashIfEmpty(entity?.m3)} / ${dashIfEmpty(
|
||||
|
|
|
@ -14,7 +14,6 @@ export default {
|
|||
'started',
|
||||
'finished',
|
||||
'cost',
|
||||
'zoneFk',
|
||||
'isOk',
|
||||
],
|
||||
include: [
|
||||
|
@ -23,7 +22,6 @@ export default {
|
|||
relation: 'vehicle',
|
||||
scope: { fields: ['id', 'm3'] },
|
||||
},
|
||||
{ relation: 'zone', scope: { fields: ['id', 'name'] } },
|
||||
{
|
||||
relation: 'worker',
|
||||
scope: {
|
||||
|
|
|
@ -28,52 +28,6 @@ const defaultInitialData = {
|
|||
isOk: false,
|
||||
};
|
||||
const maxDistance = ref();
|
||||
|
||||
const routeFilter = {
|
||||
fields: [
|
||||
'id',
|
||||
'workerFk',
|
||||
'agencyModeFk',
|
||||
'dated',
|
||||
'm3',
|
||||
'warehouseFk',
|
||||
'description',
|
||||
'vehicleFk',
|
||||
'kmStart',
|
||||
'kmEnd',
|
||||
'started',
|
||||
'finished',
|
||||
'cost',
|
||||
'isOk',
|
||||
],
|
||||
include: [
|
||||
{ relation: 'agencyMode', scope: { fields: ['id', 'name'] } },
|
||||
{
|
||||
relation: 'vehicle',
|
||||
scope: { fields: ['id', 'm3'] },
|
||||
},
|
||||
{
|
||||
relation: 'ticket',
|
||||
scope: {
|
||||
fields: ['id', 'name', 'zoneFk'],
|
||||
include: { relation: 'zone', scope: { fields: ['id', 'name'] } },
|
||||
},
|
||||
},
|
||||
{
|
||||
relation: 'worker',
|
||||
scope: {
|
||||
fields: ['id'],
|
||||
include: {
|
||||
relation: 'user',
|
||||
scope: {
|
||||
fields: ['id'],
|
||||
include: { relation: 'emailUser', scope: { fields: ['email'] } },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
const onSave = (data, response) => {
|
||||
if (isNew) {
|
||||
axios.post(`Routes/${response?.id}/updateWorkCenter`);
|
||||
|
|
Loading…
Reference in New Issue