feat: refs #8322 added RouteRoadmap and Agency
This commit is contained in:
parent
c8bbb7c08b
commit
f01ed28d95
|
@ -2,11 +2,12 @@
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
|
import VnSection from 'src/components/common/VnSection.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const dataKey = 'AgencyList';
|
||||||
function navigate(id) {
|
function navigate(id) {
|
||||||
router.push({ path: `/agency/${id}` });
|
router.push({ path: `/agency/${id}` });
|
||||||
}
|
}
|
||||||
|
@ -67,18 +68,22 @@ const columns = computed(() => [
|
||||||
]);
|
]);
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnSearchbar
|
<VnSection
|
||||||
:info="t('You can search by name')"
|
:data-key="dataKey"
|
||||||
:label="t('Search agency')"
|
:columns="columns"
|
||||||
data-key="AgencyList"
|
prefix="agency"
|
||||||
:expr-builder="exprBuilder"
|
:right-filter="false"
|
||||||
/>
|
:array-data-props="{
|
||||||
|
url: 'Agencies',
|
||||||
|
order: 'name',
|
||||||
|
exprBuilder,
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<template #body>
|
||||||
<div class="list-container">
|
<div class="list-container">
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<VnTable
|
<VnTable
|
||||||
data-key="AgencyList"
|
:data-key="dataKey"
|
||||||
url="Agencies"
|
|
||||||
order="name"
|
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
:use-model="true"
|
:use-model="true"
|
||||||
|
@ -88,6 +93,8 @@ const columns = computed(() => [
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
</VnSection>
|
||||||
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.list {
|
.list {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -104,8 +111,6 @@ const columns = computed(() => [
|
||||||
es:
|
es:
|
||||||
isOwn: Tiene propietario
|
isOwn: Tiene propietario
|
||||||
isAnyVolumeAllowed: Permite cualquier volumen
|
isAnyVolumeAllowed: Permite cualquier volumen
|
||||||
Search agency: Buscar agencia
|
|
||||||
You can search by name: Puedes buscar por nombre
|
|
||||||
en:
|
en:
|
||||||
isOwn: Has owner
|
isOwn: Has owner
|
||||||
isAnyVolumeAllowed: Allows any volume
|
isAnyVolumeAllowed: Allows any volume
|
||||||
|
|
|
@ -1,17 +1,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import AgencyDescriptor from 'pages/Route/Agency/Card/AgencyDescriptor.vue';
|
import AgencyDescriptor from 'pages/Route/Agency/Card/AgencyDescriptor.vue';
|
||||||
import VnCard from 'components/common/VnCard.vue';
|
import VnCardBeta from 'src/components/common/VnCardBeta.vue';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCard
|
<VnCardBeta data-key="Agency" base-url="Agencies" :descriptor="AgencyDescriptor" />
|
||||||
data-key="Agency"
|
|
||||||
base-url="Agencies"
|
|
||||||
:descriptor="AgencyDescriptor"
|
|
||||||
search-data-key="AgencyList"
|
|
||||||
:searchbar-props="{
|
|
||||||
url: 'Agencies',
|
|
||||||
label: 'agency.searchBar.label',
|
|
||||||
info: 'agency.searchBar.info',
|
|
||||||
}"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
agency:
|
agency:
|
||||||
|
search: Search agency
|
||||||
|
searchInfo: You can search by name
|
||||||
isOwn: Own
|
isOwn: Own
|
||||||
isAnyVolumeAllowed: Any volume allowed
|
isAnyVolumeAllowed: Any volume allowed
|
||||||
notification:
|
notification:
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
agency:
|
agency:
|
||||||
|
search: Buscar agencia
|
||||||
|
searchInfo: Puedes buscar por nombre
|
||||||
isOwn: Propio
|
isOwn: Propio
|
||||||
isAnyVolumeAllowed: Cualquier volumen
|
isAnyVolumeAllowed: Cualquier volumen
|
||||||
removeItem: Agencia eliminada correctamente
|
removeItem: Agencia eliminada correctamente
|
||||||
|
|
|
@ -1,19 +1,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCard from 'components/common/VnCard.vue';
|
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
||||||
import RoadmapDescriptor from 'pages/Route/Roadmap/RoadmapDescriptor.vue';
|
import RoadmapDescriptor from 'pages/Route/Roadmap/RoadmapDescriptor.vue';
|
||||||
import RoadmapFilter from 'pages/Route/Roadmap/RoadmapFilter.vue';
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCard
|
<VnCardBeta data-key="Roadmap" base-url="Roadmaps" :descriptor="RoadmapDescriptor" />
|
||||||
data-key="Roadmap"
|
|
||||||
base-url="Roadmaps"
|
|
||||||
:descriptor="RoadmapDescriptor"
|
|
||||||
:filter-panel="RoadmapFilter"
|
|
||||||
search-data-key="RoadmapList"
|
|
||||||
:searchbar-props="{
|
|
||||||
url: 'Roadmaps',
|
|
||||||
label: 'Search roadmap',
|
|
||||||
info: 'You can search by roadmap id or customer name',
|
|
||||||
}"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -15,11 +15,13 @@ import RoadmapSummary from 'pages/Route/Roadmap/RoadmapSummary.vue';
|
||||||
import VnConfirm from 'components/ui/VnConfirm.vue';
|
import VnConfirm from 'components/ui/VnConfirm.vue';
|
||||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
import VnInputTime from 'src/components/common/VnInputTime.vue';
|
import VnInputTime from 'src/components/common/VnInputTime.vue';
|
||||||
|
import VnSection from 'src/components/common/VnSection.vue';
|
||||||
|
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
const selectedRows = ref([]);
|
const selectedRows = ref([]);
|
||||||
|
const dataKey = 'RoadmapList';
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -112,7 +114,7 @@ const removeSelection = async () => {
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
selectedRows.value.map((roadmap) => {
|
selectedRows.value.map((roadmap) => {
|
||||||
axios.delete(`Roadmaps/${roadmap.id}`);
|
axios.delete(`Roadmaps/${roadmap.id}`);
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -131,11 +133,6 @@ function confirmRemove() {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnSearchbar
|
|
||||||
data-key="RoadmapList"
|
|
||||||
:label="t('Search roadmaps')"
|
|
||||||
:info="t('You can search by roadmap reference')"
|
|
||||||
/>
|
|
||||||
<QDialog v-model="isCloneDialogOpen">
|
<QDialog v-model="isCloneDialogOpen">
|
||||||
<QCard style="min-width: 350px">
|
<QCard style="min-width: 350px">
|
||||||
<QCardSection>
|
<QCardSection>
|
||||||
|
@ -177,10 +174,18 @@ function confirmRemove() {
|
||||||
</QBtn>
|
</QBtn>
|
||||||
</template>
|
</template>
|
||||||
</VnSubToolbar>
|
</VnSubToolbar>
|
||||||
|
<VnSection
|
||||||
|
:data-key="dataKey"
|
||||||
|
:columns="columns"
|
||||||
|
prefix="route.roadmap"
|
||||||
|
:array-data-props="{
|
||||||
|
url: 'roadmaps',
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<template #body>
|
||||||
<VnTable
|
<VnTable
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data-key="RoadmapList"
|
:data-key="dataKey"
|
||||||
url="roadmaps"
|
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:right-search="true"
|
:right-search="true"
|
||||||
:use-model="true"
|
:use-model="true"
|
||||||
|
@ -211,6 +216,8 @@ function confirmRemove() {
|
||||||
</template>
|
</template>
|
||||||
</VnTable>
|
</VnTable>
|
||||||
</template>
|
</template>
|
||||||
|
</VnSection>
|
||||||
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.route-list {
|
.route-list {
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
route:
|
route:
|
||||||
|
roadmap:
|
||||||
|
search: Search roadmap
|
||||||
|
searchInfo: You can search by roadmap reference
|
||||||
params:
|
params:
|
||||||
etd: ETD
|
etd: ETD
|
||||||
tractorPlate: Plate
|
tractorPlate: Plate
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
route:
|
route:
|
||||||
|
roadmap:
|
||||||
|
search: Buscar troncales
|
||||||
|
searchInfo: Puedes buscar por referencia del troncal
|
||||||
params:
|
params:
|
||||||
agencyModeName: Agencia Ruta
|
agencyModeName: Agencia Ruta
|
||||||
agencyAgreement: Agencia Acuerdo
|
agencyAgreement: Agencia Acuerdo
|
||||||
|
|
|
@ -1,25 +1,13 @@
|
||||||
import { RouterView } from 'vue-router';
|
import { RouterView } from 'vue-router';
|
||||||
|
|
||||||
export default {
|
const agencyCard = {
|
||||||
path: '/agency',
|
path: ':id',
|
||||||
name: 'Agency',
|
|
||||||
meta: {
|
|
||||||
title: 'agency',
|
|
||||||
icon: 'garage_home',
|
|
||||||
moduleName: 'Agency',
|
|
||||||
},
|
|
||||||
component: RouterView,
|
|
||||||
redirect: { name: 'AgencyCard' },
|
|
||||||
menus: {
|
|
||||||
main: [],
|
|
||||||
card: ['AgencyBasicData', 'AgencyModes', 'AgencyWorkCenters', 'AgencyLog'],
|
|
||||||
},
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: '/agency/:id',
|
|
||||||
name: 'AgencyCard',
|
name: 'AgencyCard',
|
||||||
component: () => import('src/pages/Route/Agency/Card/AgencyCard.vue'),
|
component: () => import('src/pages/Route/Agency/Card/AgencyCard.vue'),
|
||||||
redirect: { name: 'AgencySummary' },
|
redirect: { name: 'AgencySummary' },
|
||||||
|
meta: {
|
||||||
|
menu: ['AgencyBasicData', 'AgencyModes', 'AgencyWorkCenters', 'AgencyLog'],
|
||||||
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
name: 'AgencySummary',
|
name: 'AgencySummary',
|
||||||
|
@ -28,8 +16,7 @@ export default {
|
||||||
title: 'summary',
|
title: 'summary',
|
||||||
icon: 'view_list',
|
icon: 'view_list',
|
||||||
},
|
},
|
||||||
component: () =>
|
component: () => import('src/pages/Route/Agency/Card/AgencySummary.vue'),
|
||||||
import('src/pages/Route/Agency/Card/AgencySummary.vue'),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'AgencyBasicData',
|
name: 'AgencyBasicData',
|
||||||
|
@ -38,8 +25,7 @@ export default {
|
||||||
title: 'basicData',
|
title: 'basicData',
|
||||||
icon: 'vn:settings',
|
icon: 'vn:settings',
|
||||||
},
|
},
|
||||||
component: () =>
|
component: () => import('pages/Route/Agency/Card/AgencyBasicData.vue'),
|
||||||
import('pages/Route/Agency/Card/AgencyBasicData.vue'),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'workCenter',
|
path: 'workCenter',
|
||||||
|
@ -54,9 +40,7 @@ export default {
|
||||||
title: 'workCenters',
|
title: 'workCenters',
|
||||||
},
|
},
|
||||||
component: () =>
|
component: () =>
|
||||||
import(
|
import('src/pages/Route/Agency/Card/AgencyWorkcenter.vue'),
|
||||||
'src/pages/Route/Agency/Card/AgencyWorkcenter.vue'
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -87,6 +71,43 @@ export default {
|
||||||
component: () => import('src/pages/Route/Agency/Card/AgencyLog.vue'),
|
component: () => import('src/pages/Route/Agency/Card/AgencyLog.vue'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Agency',
|
||||||
|
path: '/agency',
|
||||||
|
meta: {
|
||||||
|
title: 'agency',
|
||||||
|
icon: 'garage_home',
|
||||||
|
moduleName: 'Agency',
|
||||||
|
},
|
||||||
|
component: RouterView,
|
||||||
|
redirect: { name: 'RouteMain' },
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: 'AgencyMain',
|
||||||
|
path: '',
|
||||||
|
component: () => import('src/components/common/VnModule.vue'),
|
||||||
|
redirect: { name: 'AgencyIndexMain' },
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: 'AgencyIndexMain',
|
||||||
|
path: '',
|
||||||
|
redirect: { name: 'AgencyList' },
|
||||||
|
component: () => import('src/pages/Route/Agency/AgencyList.vue'),
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: 'AgencyList',
|
||||||
|
path: 'list',
|
||||||
|
meta: {
|
||||||
|
title: 'list',
|
||||||
|
icon: 'view_list',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
agencyCard,
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,24 +1,13 @@
|
||||||
import { RouterView } from 'vue-router';
|
import { RouterView } from 'vue-router';
|
||||||
|
|
||||||
export default {
|
const roadmapCard = {
|
||||||
path: '/route/roadmap',
|
|
||||||
name: 'Roadmap',
|
|
||||||
meta: {
|
|
||||||
title: 'roadmap',
|
|
||||||
icon: 'vn:troncales',
|
|
||||||
moduleName: 'Roadmap',
|
|
||||||
},
|
|
||||||
component: RouterView,
|
|
||||||
redirect: { name: 'RouteMain' },
|
|
||||||
menus: {
|
|
||||||
card: ['RoadmapBasicData', 'RoadmapStops'],
|
|
||||||
},
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
name: 'RouteRoadmapCard',
|
|
||||||
path: ':id',
|
path: ':id',
|
||||||
|
name: 'RoadmapCard',
|
||||||
component: () => import('src/pages/Route/Roadmap/RoadmapCard.vue'),
|
component: () => import('src/pages/Route/Roadmap/RoadmapCard.vue'),
|
||||||
redirect: { name: 'RoadmapSummary' },
|
redirect: { name: 'RoadmapSummary' },
|
||||||
|
meta: {
|
||||||
|
menu: ['RoadmapBasicData', 'RoadmapStops'],
|
||||||
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
name: 'RoadmapSummary',
|
name: 'RoadmapSummary',
|
||||||
|
@ -48,6 +37,43 @@ export default {
|
||||||
component: () => import('pages/Route/Roadmap/RoadmapStops.vue'),
|
component: () => import('pages/Route/Roadmap/RoadmapStops.vue'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
path: '/route/roadmap',
|
||||||
|
name: 'Roadmap',
|
||||||
|
meta: {
|
||||||
|
title: 'roadmap',
|
||||||
|
icon: 'vn:troncales',
|
||||||
|
moduleName: 'Roadmap',
|
||||||
|
},
|
||||||
|
component: RouterView,
|
||||||
|
redirect: { name: 'RoadmapMain' },
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: 'RoadmapMain',
|
||||||
|
path: '',
|
||||||
|
component: () => import('src/components/common/VnModule.vue'),
|
||||||
|
redirect: { name: 'RoadmapIndexMain' },
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: 'RoadmapIndexMain',
|
||||||
|
path: '',
|
||||||
|
redirect: { name: 'RoadmapList' },
|
||||||
|
component: () => import('src/pages/Route/RouteRoadmap.vue'),
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: 'RoadmapList',
|
||||||
|
path: 'list',
|
||||||
|
meta: {
|
||||||
|
title: 'roadmapList',
|
||||||
|
icon: 'view_list',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
roadmapCard,
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue