feat: refs #8606 adapt module to VnCatdBeta
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:
parent
eab18e4d14
commit
705ca0402a
|
@ -33,6 +33,10 @@ const props = defineProps({
|
|||
type: String,
|
||||
default: '',
|
||||
},
|
||||
userFilter: {
|
||||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
filter: {
|
||||
type: Object,
|
||||
default: null,
|
||||
|
|
|
@ -148,8 +148,7 @@ export function useArrayData(key, userOptions) {
|
|||
}
|
||||
|
||||
async function applyFilter({ filter, params }, fetchOptions = {}) {
|
||||
if (filter) store.userFilter = filter;
|
||||
store.filter = {};
|
||||
if (filter) store.filter = filter;
|
||||
if (params) store.userParams = { ...params };
|
||||
|
||||
const response = await fetch(fetchOptions);
|
||||
|
|
|
@ -337,5 +337,5 @@ input::-webkit-inner-spin-button {
|
|||
}
|
||||
|
||||
.containerShrinked {
|
||||
width: 80%;
|
||||
width: 70%;
|
||||
}
|
||||
|
|
|
@ -1,38 +1,7 @@
|
|||
<script setup>
|
||||
import { useRoute } from 'vue-router';
|
||||
import { computed } from 'vue';
|
||||
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import VnCardBeta from 'src/components/common/VnCardBeta.vue';
|
||||
import ZoneDescriptor from './ZoneDescriptor.vue';
|
||||
import ZoneFilterPanel from '../ZoneFilterPanel.vue';
|
||||
import filter from './ZoneFilter.js';
|
||||
|
||||
const route = useRoute();
|
||||
const routeName = computed(() => route.name);
|
||||
|
||||
function notIsLocations(ifIsFalse, ifIsTrue) {
|
||||
if (routeName.value != 'ZoneLocations') return ifIsFalse;
|
||||
return ifIsTrue;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnCard
|
||||
data-key="Zone"
|
||||
:url="notIsLocations('Zones', undefined)"
|
||||
:descriptor="ZoneDescriptor"
|
||||
:filter="filter"
|
||||
:filter-panel="notIsLocations(ZoneFilterPanel, undefined)"
|
||||
:search-data-key="notIsLocations('ZoneList', undefined)"
|
||||
:searchbar-props="{
|
||||
url: notIsLocations('Zones', 'ZoneLocations'),
|
||||
label: notIsLocations($t('list.searchZone'), $t('list.searchLocation')),
|
||||
info: $t('list.searchInfo'),
|
||||
whereFilter: notIsLocations((value) => {
|
||||
return /^\d+$/.test(value)
|
||||
? { id: value }
|
||||
: { name: { like: `%${value}%` } };
|
||||
}),
|
||||
}"
|
||||
/>
|
||||
<VnCardBeta data-key="Zone" url="Zones" :descriptor="ZoneDescriptor" />
|
||||
</template>
|
||||
|
|
|
@ -1,18 +1,14 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { ref, reactive } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import ZoneEventsPanel from './ZoneEventsPanel.vue';
|
||||
import ZoneCalendarGrid from '../ZoneCalendarGrid.vue';
|
||||
import ZoneEventInclusionForm from './ZoneEventInclusionForm.vue';
|
||||
import ZoneEventExclusionForm from './ZoneEventExclusionForm.vue';
|
||||
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { reactive } from 'vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const stateStore = useStateStore();
|
||||
|
||||
const firstDay = ref();
|
||||
const lastDay = ref();
|
||||
|
||||
|
@ -43,14 +39,16 @@ const onZoneEventFormClose = () => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<Teleport to="#right-panel" v-if="stateStore.isHeaderMounted()">
|
||||
<ZoneEventsPanel
|
||||
:first-day="firstDay"
|
||||
:last-day="lastDay"
|
||||
:events="events"
|
||||
v-model:formModeName="formModeName"
|
||||
/>
|
||||
</Teleport>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<ZoneEventsPanel
|
||||
:first-day="firstDay"
|
||||
:last-day="lastDay"
|
||||
:events="events"
|
||||
v-model:formModeName="formModeName"
|
||||
/>
|
||||
</template>
|
||||
</RightMenu>
|
||||
<QPage class="q-pa-md flex justify-center">
|
||||
<ZoneCalendarGrid
|
||||
v-model:events="events"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<script setup>
|
||||
import { onMounted, ref, computed, watch, onUnmounted } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import { useState } from 'src/composables/useState';
|
||||
import axios from 'axios';
|
||||
|
@ -30,7 +31,7 @@ const emit = defineEmits(['update:tickedNodes']);
|
|||
|
||||
const route = useRoute();
|
||||
const state = useState();
|
||||
|
||||
const stateStore = useStateStore();
|
||||
const treeRef = ref();
|
||||
const expanded = ref([]);
|
||||
|
||||
|
@ -82,7 +83,7 @@ const onNodeExpanded = async (nodeKeysArray) => {
|
|||
await fetchNodeLeaves(lastNodeKey, true);
|
||||
} else {
|
||||
const difference = new Set(
|
||||
[...previousExpandedNodes.value].filter((x) => !nodeKeysSet.has(x))
|
||||
[...previousExpandedNodes.value].filter((x) => !nodeKeysSet.has(x)),
|
||||
);
|
||||
const collapsedNode = Array.from(difference).pop();
|
||||
const node = treeRef.value?.getNodeByKey(collapsedNode);
|
||||
|
@ -135,7 +136,7 @@ watch(
|
|||
}
|
||||
previousExpandedNodes.value = new Set(expanded.value);
|
||||
},
|
||||
{ immediate: true }
|
||||
{ immediate: true },
|
||||
);
|
||||
|
||||
const reFetch = async () => {
|
||||
|
@ -153,6 +154,16 @@ onUnmounted(() => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<Teleport to="#section-searchbar" v-if="stateStore.isHeaderMounted()">
|
||||
<VnSearchbar
|
||||
v-if="!showSearchBar"
|
||||
:data-key="datakey"
|
||||
:url="url"
|
||||
:redirect="false"
|
||||
:search-remove-params="false"
|
||||
:label="$t('Search locations')"
|
||||
/>
|
||||
</Teleport>
|
||||
<VnInput
|
||||
v-if="showSearchBar"
|
||||
v-model="store.userParams.search"
|
||||
|
@ -163,13 +174,6 @@ onUnmounted(() => {
|
|||
<QBtn color="primary" icon="search" dense flat @click="reFetch()" />
|
||||
</template>
|
||||
</VnInput>
|
||||
<VnSearchbar
|
||||
v-if="!showSearchBar"
|
||||
:data-key="datakey"
|
||||
:url="url"
|
||||
:redirect="false"
|
||||
:search-remove-params="false"
|
||||
/>
|
||||
<QTree
|
||||
ref="treeRef"
|
||||
:nodes="nodes"
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
import VnLog from 'src/components/common/VnLog.vue';
|
||||
</script>
|
||||
<template>
|
||||
<VnLog model="Zone" url="/ZoneLogs"></VnLog>
|
||||
<VnLog model="Zone" />
|
||||
</template>
|
||||
|
|
|
@ -1,74 +0,0 @@
|
|||
<script setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const exprBuilder = (param, value) => {
|
||||
switch (param) {
|
||||
case 'name':
|
||||
return {
|
||||
name: { like: `%${value}%` },
|
||||
};
|
||||
case 'code':
|
||||
return {
|
||||
code: { like: `%${value}%` },
|
||||
};
|
||||
case 'agencyModeFk':
|
||||
return {
|
||||
agencyModeFk: value,
|
||||
};
|
||||
case 'search':
|
||||
return /^\d+$/.test(value) ? { id: value } : { name: { like: `%${value}%` } };
|
||||
}
|
||||
};
|
||||
|
||||
const tableFilter = {
|
||||
include: [
|
||||
{
|
||||
relation: 'agencyMode',
|
||||
scope: {
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
{
|
||||
relation: 'address',
|
||||
scope: {
|
||||
fields: ['id', 'nickname', 'provinceFk', 'postalCode'],
|
||||
include: [
|
||||
{
|
||||
relation: 'province',
|
||||
scope: {
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
{
|
||||
relation: 'postcode',
|
||||
scope: {
|
||||
fields: ['code', 'townFk'],
|
||||
include: {
|
||||
relation: 'town',
|
||||
scope: {
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnSearchbar
|
||||
data-key="ZonesList"
|
||||
url="Zones"
|
||||
:filter="tableFilter"
|
||||
:expr-builder="exprBuilder"
|
||||
:label="t('list.searchZone')"
|
||||
:info="t('list.searchInfo')"
|
||||
custom-route-redirect-name="ZoneSummary"
|
||||
/>
|
||||
</template>
|
|
@ -60,10 +60,11 @@ onMounted(async () => {
|
|||
|
||||
<template>
|
||||
<CardSummary
|
||||
data-key="Zone"
|
||||
data-key="ZoneSummary"
|
||||
ref="summary"
|
||||
:url="`Zones/${entityId}`"
|
||||
:filter="filter"
|
||||
:entity-id="entityId"
|
||||
>
|
||||
<template #header="{ entity }">
|
||||
<div>#{{ entity.id }} - {{ entity.name }}</div>
|
||||
|
|
|
@ -3,7 +3,6 @@ import { ref } from 'vue';
|
|||
import ZoneDeliveryPanel from './ZoneDeliveryPanel.vue';
|
||||
import ZoneCalendarGrid from './ZoneCalendarGrid.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import ZoneSearchbar from './Card/ZoneSearchbar.vue';
|
||||
|
||||
const firstDay = ref(null);
|
||||
const lastDay = ref(null);
|
||||
|
@ -11,7 +10,6 @@ const events = ref([]);
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<ZoneSearchbar />
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<ZoneDeliveryPanel />
|
||||
|
|
|
@ -63,6 +63,15 @@ const agencies = ref([]);
|
|||
</VnSelect>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
:label="t('list.price')"
|
||||
v-model="params.price"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnFilterPanel>
|
||||
</template>
|
||||
|
|
|
@ -14,9 +14,8 @@ import VnTable from 'src/components/VnTable/VnTable.vue';
|
|||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnInputTime from 'src/components/common/VnInputTime.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
import ZoneFilterPanel from './ZoneFilterPanel.vue';
|
||||
import ZoneSearchbar from './Card/ZoneSearchbar.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
|
@ -25,7 +24,7 @@ const { viewSummary } = useSummaryDialog();
|
|||
const { openConfirmationModal } = useVnConfirm();
|
||||
const tableRef = ref();
|
||||
const warehouseOptions = ref([]);
|
||||
|
||||
const dataKey = 'ZoneList';
|
||||
const tableFilter = {
|
||||
include: [
|
||||
{
|
||||
|
@ -115,7 +114,6 @@ const columns = computed(() => [
|
|||
inWhere: true,
|
||||
},
|
||||
columnClass: 'shrink-column',
|
||||
component: 'number',
|
||||
},
|
||||
{
|
||||
align: 'center',
|
||||
|
@ -171,82 +169,113 @@ function formatRow(row) {
|
|||
return dashIfEmpty(`${row?.address?.nickname},
|
||||
${row?.address?.postcode?.town?.name} (${row?.address?.province?.name})`);
|
||||
}
|
||||
|
||||
const exprBuilder = (param, value) => {
|
||||
switch (param) {
|
||||
case 'name':
|
||||
return {
|
||||
name: { like: `%${value}%` },
|
||||
};
|
||||
case 'code':
|
||||
return {
|
||||
code: { like: `%${value}%` },
|
||||
};
|
||||
case 'agencyModeFk':
|
||||
return {
|
||||
agencyModeFk: value,
|
||||
};
|
||||
case 'search':
|
||||
return /^\d+$/.test(value) ? { id: value } : { name: { like: `%${value}%` } };
|
||||
case 'price':
|
||||
return {
|
||||
price: value,
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ZoneSearchbar />
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<ZoneFilterPanel data-key="ZonesList" />
|
||||
<VnSection
|
||||
:data-key="dataKey"
|
||||
:columns="columns"
|
||||
prefix="zone"
|
||||
:array-data-props="{
|
||||
url: 'Zones',
|
||||
order: ['id ASC'],
|
||||
userFilter: tableFilter,
|
||||
exprBuilder,
|
||||
}"
|
||||
>
|
||||
<template #advanced-menu>
|
||||
<ZoneFilterPanel :data-key="dataKey" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<div class="table-container">
|
||||
<div class="column items-center">
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="ZonesList"
|
||||
url="Zones"
|
||||
:create="{
|
||||
urlCreate: 'Zones',
|
||||
title: t('list.createZone'),
|
||||
onDataSaved: ({ id }) => tableRef.redirect(`${id}/location`),
|
||||
formInitialData: {},
|
||||
}"
|
||||
:user-filter="tableFilter"
|
||||
:columns="columns"
|
||||
redirect="zone"
|
||||
:right-search="false"
|
||||
table-height="85vh"
|
||||
order="id ASC"
|
||||
>
|
||||
<template #column-addressFk="{ row }">
|
||||
{{ dashIfEmpty(formatRow(row)) }}
|
||||
</template>
|
||||
<template #more-create-dialog="{ data }">
|
||||
<VnSelect
|
||||
url="AgencyModes"
|
||||
v-model="data.agencyModeFk"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
:label="t('list.agency')"
|
||||
/>
|
||||
<VnInput
|
||||
v-model="data.price"
|
||||
:label="t('list.price')"
|
||||
min="0"
|
||||
type="number"
|
||||
required="true"
|
||||
/>
|
||||
<VnInput
|
||||
v-model="data.bonus"
|
||||
:label="t('zone.bonus')"
|
||||
min="0"
|
||||
type="number"
|
||||
/>
|
||||
<VnInput
|
||||
v-model="data.travelingDays"
|
||||
:label="t('zone.travelingDays')"
|
||||
type="number"
|
||||
min="0"
|
||||
/>
|
||||
<VnInputTime v-model="data.hour" :label="t('list.close')" />
|
||||
<VnSelect
|
||||
url="Warehouses"
|
||||
v-model="data.warehouseFK"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
:label="t('list.warehouse')"
|
||||
:options="warehouseOptions"
|
||||
/>
|
||||
<QCheckbox
|
||||
v-model="data.isVolumetric"
|
||||
:label="t('list.isVolumetric')"
|
||||
:toggle-indeterminate="false"
|
||||
/>
|
||||
</template>
|
||||
</VnTable>
|
||||
</div>
|
||||
</div>
|
||||
<template #body>
|
||||
<div class="table-container">
|
||||
<div class="column items-center">
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
:data-key="dataKey"
|
||||
:columns="columns"
|
||||
:right-search="false"
|
||||
redirect="Zone"
|
||||
:create="{
|
||||
urlCreate: 'Zones',
|
||||
title: t('list.createZone'),
|
||||
onDataSaved: ({ id }) => tableRef.redirect(`${id}/location`),
|
||||
formInitialData: {},
|
||||
}"
|
||||
table-height="85vh"
|
||||
>
|
||||
<template #column-addressFk="{ row }">
|
||||
{{ dashIfEmpty(formatRow(row)) }}
|
||||
</template>
|
||||
<template #more-create-dialog="{ data }">
|
||||
<VnSelect
|
||||
url="AgencyModes"
|
||||
v-model="data.agencyModeFk"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
:label="t('list.agency')"
|
||||
/>
|
||||
<VnInput
|
||||
v-model="data.price"
|
||||
:label="t('list.price')"
|
||||
min="0"
|
||||
type="number"
|
||||
required="true"
|
||||
/>
|
||||
<VnInput
|
||||
v-model="data.bonus"
|
||||
:label="t('zone.bonus')"
|
||||
min="0"
|
||||
type="number"
|
||||
/>
|
||||
<VnInput
|
||||
v-model="data.travelingDays"
|
||||
:label="t('zone.travelingDays')"
|
||||
type="number"
|
||||
min="0"
|
||||
/>
|
||||
<VnInputTime v-model="data.hour" :label="t('list.close')" />
|
||||
<VnSelect
|
||||
url="Warehouses"
|
||||
v-model="data.warehouseFK"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
:label="t('list.warehouse')"
|
||||
:options="warehouseOptions"
|
||||
/>
|
||||
<QCheckbox
|
||||
v-model="data.isVolumetric"
|
||||
:label="t('list.isVolumetric')"
|
||||
:toggle-indeterminate="false"
|
||||
/>
|
||||
</template>
|
||||
</VnTable>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</VnSection>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
|
|
|
@ -7,7 +7,6 @@ import FetchData from 'components/FetchData.vue';
|
|||
|
||||
import { toDateFormat } from 'src/filters/date.js';
|
||||
import { useWeekdayStore } from 'src/stores/useWeekdayStore';
|
||||
import ZoneSearchbar from './Card/ZoneSearchbar.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const weekdayStore = useWeekdayStore();
|
||||
|
@ -53,7 +52,6 @@ onMounted(() => weekdayStore.initStore());
|
|||
@on-fetch="(data) => (details = data)"
|
||||
auto-load
|
||||
/>
|
||||
<ZoneSearchbar />
|
||||
<VnSubToolbar />
|
||||
<QPage class="column items-center q-pa-md">
|
||||
<QCard class="containerShrinked q-pa-md">
|
||||
|
|
|
@ -15,6 +15,8 @@ zone:
|
|||
bonus: Bonus
|
||||
closing: Closing
|
||||
travelingDays: Traveling days
|
||||
search: Search zone
|
||||
searchInfo: Search zone by id or name
|
||||
list:
|
||||
clone: Clone
|
||||
id: Id
|
||||
|
|
|
@ -15,6 +15,8 @@ zone:
|
|||
bonus: Bonificación
|
||||
closing: Cierre
|
||||
travelingDays: Días de viaje
|
||||
search: Buscar zona
|
||||
searchInfo: Buscar zona por Id o nombre
|
||||
list:
|
||||
clone: Clonar
|
||||
id: Id
|
||||
|
|
|
@ -1,24 +1,12 @@
|
|||
import { RouterView } from 'vue-router';
|
||||
|
||||
export default {
|
||||
path: '/zone',
|
||||
name: 'Zone',
|
||||
const zoneCard = {
|
||||
name: 'ZoneCard',
|
||||
path: ':id',
|
||||
component: () => import('src/pages/Zone/Card/ZoneCard.vue'),
|
||||
redirect: { name: 'ZoneSummary' },
|
||||
meta: {
|
||||
title: 'zones',
|
||||
icon: 'vn:zone',
|
||||
moduleName: 'Zone',
|
||||
keyBinding: 'z',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'ZoneMain' },
|
||||
menus: {
|
||||
main: [
|
||||
'ZoneList',
|
||||
'ZoneDeliveryDays',
|
||||
'ZoneUpcomingList',
|
||||
'ZoneUpcomingDeliveries',
|
||||
],
|
||||
card: [
|
||||
menu: [
|
||||
'ZoneBasicData',
|
||||
'ZoneWarehouses',
|
||||
'ZoneHistory',
|
||||
|
@ -28,17 +16,109 @@ export default {
|
|||
},
|
||||
children: [
|
||||
{
|
||||
path: '/zone',
|
||||
name: 'ZoneSummary',
|
||||
path: 'summary',
|
||||
meta: {
|
||||
title: 'summary',
|
||||
icon: 'launch',
|
||||
},
|
||||
component: () => import('src/pages/Zone/Card/ZoneSummary.vue'),
|
||||
},
|
||||
{
|
||||
path: 'basic-data',
|
||||
name: 'ZoneBasicData',
|
||||
meta: {
|
||||
title: 'basicData',
|
||||
icon: 'vn:settings',
|
||||
},
|
||||
component: () => import('src/pages/Zone/Card/ZoneBasicData.vue'),
|
||||
},
|
||||
{
|
||||
path: 'location',
|
||||
name: 'ZoneLocations',
|
||||
meta: {
|
||||
title: 'locations',
|
||||
icon: 'my_location',
|
||||
},
|
||||
component: () => import('src/pages/Zone/Card/ZoneLocations.vue'),
|
||||
},
|
||||
{
|
||||
path: 'warehouses',
|
||||
name: 'ZoneWarehouses',
|
||||
meta: {
|
||||
title: 'warehouses',
|
||||
icon: 'home',
|
||||
},
|
||||
component: () => import('src/pages/Zone/Card/ZoneWarehouses.vue'),
|
||||
},
|
||||
{
|
||||
path: 'log',
|
||||
name: 'ZoneHistory',
|
||||
meta: {
|
||||
title: 'log',
|
||||
icon: 'history',
|
||||
},
|
||||
component: () => import('src/pages/Zone/Card/ZoneLog.vue'),
|
||||
},
|
||||
{
|
||||
path: 'events',
|
||||
name: 'ZoneEvents',
|
||||
meta: {
|
||||
title: 'calendar',
|
||||
icon: 'vn:calendar',
|
||||
},
|
||||
component: () => import('src/pages/Zone/Card/ZoneEvents.vue'),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default {
|
||||
name: 'Zone',
|
||||
path: '/zone',
|
||||
meta: {
|
||||
title: 'zones',
|
||||
icon: 'vn:zone',
|
||||
moduleName: 'Zone',
|
||||
keyBinding: 'z',
|
||||
menu: [
|
||||
'ZoneList',
|
||||
'ZoneDeliveryDays',
|
||||
'ZoneUpcomingList',
|
||||
'ZoneUpcomingDeliveries',
|
||||
],
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'ZoneMain' },
|
||||
children: [
|
||||
{
|
||||
name: 'ZoneMain',
|
||||
path: '',
|
||||
component: () => import('src/components/common/VnModule.vue'),
|
||||
redirect: { name: 'ZoneList' },
|
||||
redirect: { name: 'ZoneIndexMain' },
|
||||
children: [
|
||||
{
|
||||
path: 'list',
|
||||
name: 'ZoneList',
|
||||
path: '',
|
||||
name: 'ZoneIndexMain',
|
||||
redirect: { name: 'ZoneList' },
|
||||
component: () => import('src/pages/Zone/ZoneList.vue'),
|
||||
children: [
|
||||
{
|
||||
name: 'ZoneList',
|
||||
path: 'list',
|
||||
meta: {
|
||||
title: 'list',
|
||||
icon: 'view_list',
|
||||
},
|
||||
},
|
||||
zoneCard,
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
name: 'ZoneCreate',
|
||||
meta: {
|
||||
title: 'zonesList',
|
||||
icon: 'view_list',
|
||||
title: 'zoneCreate',
|
||||
icon: 'add',
|
||||
},
|
||||
component: () => import('src/pages/Zone/ZoneList.vue'),
|
||||
},
|
||||
|
@ -62,67 +142,5 @@ export default {
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'ZoneCard',
|
||||
path: ':id',
|
||||
component: () => import('src/pages/Zone/Card/ZoneCard.vue'),
|
||||
redirect: { name: 'ZoneSummary' },
|
||||
children: [
|
||||
{
|
||||
name: 'ZoneSummary',
|
||||
path: 'summary',
|
||||
meta: {
|
||||
title: 'summary',
|
||||
icon: 'launch',
|
||||
},
|
||||
component: () => import('src/pages/Zone/Card/ZoneSummary.vue'),
|
||||
},
|
||||
{
|
||||
name: 'ZoneBasicData',
|
||||
path: 'basic-data',
|
||||
meta: {
|
||||
title: 'basicData',
|
||||
icon: 'vn:settings',
|
||||
},
|
||||
component: () => import('src/pages/Zone/Card/ZoneBasicData.vue'),
|
||||
},
|
||||
{
|
||||
name: 'ZoneLocations',
|
||||
path: 'location',
|
||||
meta: {
|
||||
title: 'locations',
|
||||
icon: 'my_location',
|
||||
},
|
||||
component: () => import('src/pages/Zone/Card/ZoneLocations.vue'),
|
||||
},
|
||||
{
|
||||
name: 'ZoneWarehouses',
|
||||
path: 'warehouses',
|
||||
meta: {
|
||||
title: 'warehouses',
|
||||
icon: 'home',
|
||||
},
|
||||
component: () => import('src/pages/Zone/Card/ZoneWarehouses.vue'),
|
||||
},
|
||||
{
|
||||
name: 'ZoneHistory',
|
||||
path: 'log',
|
||||
meta: {
|
||||
title: 'log',
|
||||
icon: 'history',
|
||||
},
|
||||
component: () => import('src/pages/Zone/Card/ZoneLog.vue'),
|
||||
},
|
||||
{
|
||||
name: 'ZoneEvents',
|
||||
path: 'events',
|
||||
meta: {
|
||||
title: 'calendar',
|
||||
icon: 'vn:calendar',
|
||||
},
|
||||
component: () => import('src/pages/Zone/Card/ZoneEvents.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue