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 { useRouter } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
const dataKey = 'AgencyList';
|
||||
function navigate(id) {
|
||||
router.push({ path: `/agency/${id}` });
|
||||
}
|
||||
|
@ -67,26 +68,32 @@ const columns = computed(() => [
|
|||
]);
|
||||
</script>
|
||||
<template>
|
||||
<VnSearchbar
|
||||
:info="t('You can search by name')"
|
||||
:label="t('Search agency')"
|
||||
data-key="AgencyList"
|
||||
:expr-builder="exprBuilder"
|
||||
/>
|
||||
<div class="list-container">
|
||||
<div class="list">
|
||||
<VnTable
|
||||
data-key="AgencyList"
|
||||
url="Agencies"
|
||||
order="name"
|
||||
:columns="columns"
|
||||
:right-search="false"
|
||||
:use-model="true"
|
||||
redirect="agency"
|
||||
default-mode="card"
|
||||
/>
|
||||
<VnSection
|
||||
:data-key="dataKey"
|
||||
:columns="columns"
|
||||
prefix="agency"
|
||||
:right-filter="false"
|
||||
:array-data-props="{
|
||||
url: 'Agencies',
|
||||
order: 'name',
|
||||
exprBuilder,
|
||||
}"
|
||||
>
|
||||
<template #body>
|
||||
<div class="list-container">
|
||||
<div class="list">
|
||||
<VnTable
|
||||
:data-key="dataKey"
|
||||
:columns="columns"
|
||||
:right-search="false"
|
||||
:use-model="true"
|
||||
redirect="agency"
|
||||
default-mode="card"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</VnSection>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.list {
|
||||
|
@ -104,8 +111,6 @@ const columns = computed(() => [
|
|||
es:
|
||||
isOwn: Tiene propietario
|
||||
isAnyVolumeAllowed: Permite cualquier volumen
|
||||
Search agency: Buscar agencia
|
||||
You can search by name: Puedes buscar por nombre
|
||||
en:
|
||||
isOwn: Has owner
|
||||
isAnyVolumeAllowed: Allows any volume
|
||||
|
|
|
@ -1,17 +1,7 @@
|
|||
<script setup>
|
||||
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>
|
||||
<template>
|
||||
<VnCard
|
||||
data-key="Agency"
|
||||
base-url="Agencies"
|
||||
:descriptor="AgencyDescriptor"
|
||||
search-data-key="AgencyList"
|
||||
:searchbar-props="{
|
||||
url: 'Agencies',
|
||||
label: 'agency.searchBar.label',
|
||||
info: 'agency.searchBar.info',
|
||||
}"
|
||||
/>
|
||||
<VnCardBeta data-key="Agency" base-url="Agencies" :descriptor="AgencyDescriptor" />
|
||||
</template>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
agency:
|
||||
search: Search agency
|
||||
searchInfo: You can search by name
|
||||
isOwn: Own
|
||||
isAnyVolumeAllowed: Any volume allowed
|
||||
notification:
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
agency:
|
||||
search: Buscar agencia
|
||||
searchInfo: Puedes buscar por nombre
|
||||
isOwn: Propio
|
||||
isAnyVolumeAllowed: Cualquier volumen
|
||||
removeItem: Agencia eliminada correctamente
|
||||
|
|
|
@ -1,19 +1,7 @@
|
|||
<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 RoadmapFilter from 'pages/Route/Roadmap/RoadmapFilter.vue';
|
||||
</script>
|
||||
<template>
|
||||
<VnCard
|
||||
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',
|
||||
}"
|
||||
/>
|
||||
<VnCardBeta data-key="Roadmap" base-url="Roadmaps" :descriptor="RoadmapDescriptor" />
|
||||
</template>
|
||||
|
|
|
@ -15,11 +15,13 @@ import RoadmapSummary from 'pages/Route/Roadmap/RoadmapSummary.vue';
|
|||
import VnConfirm from 'components/ui/VnConfirm.vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
import VnInputTime from 'src/components/common/VnInputTime.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const { t } = useI18n();
|
||||
const quasar = useQuasar();
|
||||
const selectedRows = ref([]);
|
||||
const dataKey = 'RoadmapList';
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -112,7 +114,7 @@ const removeSelection = async () => {
|
|||
await Promise.all(
|
||||
selectedRows.value.map((roadmap) => {
|
||||
axios.delete(`Roadmaps/${roadmap.id}`);
|
||||
})
|
||||
}),
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -131,11 +133,6 @@ function confirmRemove() {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<VnSearchbar
|
||||
data-key="RoadmapList"
|
||||
:label="t('Search roadmaps')"
|
||||
:info="t('You can search by roadmap reference')"
|
||||
/>
|
||||
<QDialog v-model="isCloneDialogOpen">
|
||||
<QCard style="min-width: 350px">
|
||||
<QCardSection>
|
||||
|
@ -177,39 +174,49 @@ function confirmRemove() {
|
|||
</QBtn>
|
||||
</template>
|
||||
</VnSubToolbar>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="RoadmapList"
|
||||
url="roadmaps"
|
||||
<VnSection
|
||||
:data-key="dataKey"
|
||||
:columns="columns"
|
||||
:right-search="true"
|
||||
:use-model="true"
|
||||
default-mode="table"
|
||||
v-model:selected="selectedRows"
|
||||
table-height="85vh"
|
||||
:table="{
|
||||
selection: 'multiple',
|
||||
prefix="route.roadmap"
|
||||
:array-data-props="{
|
||||
url: 'roadmaps',
|
||||
}"
|
||||
redirect="route/roadmap"
|
||||
:create="{
|
||||
urlCreate: 'Roadmaps',
|
||||
title: t('Create routemap'),
|
||||
onDataSaved: ({ id }) => tableRef.redirect(id),
|
||||
formInitialData: {},
|
||||
}"
|
||||
:disable-option="{ card: true }"
|
||||
>
|
||||
<template #column-etd="{ row }">
|
||||
{{ toDateHourMin(row.etd) }}
|
||||
<template #body>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
:data-key="dataKey"
|
||||
:columns="columns"
|
||||
:right-search="true"
|
||||
:use-model="true"
|
||||
default-mode="table"
|
||||
v-model:selected="selectedRows"
|
||||
table-height="85vh"
|
||||
:table="{
|
||||
selection: 'multiple',
|
||||
}"
|
||||
redirect="route/roadmap"
|
||||
:create="{
|
||||
urlCreate: 'Roadmaps',
|
||||
title: t('Create routemap'),
|
||||
onDataSaved: ({ id }) => tableRef.redirect(id),
|
||||
formInitialData: {},
|
||||
}"
|
||||
:disable-option="{ card: true }"
|
||||
>
|
||||
<template #column-etd="{ row }">
|
||||
{{ toDateHourMin(row.etd) }}
|
||||
</template>
|
||||
<template #column-supplierFk="{ row }">
|
||||
{{ row.supplierFk }}
|
||||
</template>
|
||||
<template #more-create-dialog="{ data }">
|
||||
<VnInputDate v-model="data.etd" />
|
||||
<VnInputTime v-model="data.etd" />
|
||||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
<template #column-supplierFk="{ row }">
|
||||
{{ row.supplierFk }}
|
||||
</template>
|
||||
<template #more-create-dialog="{ data }">
|
||||
<VnInputDate v-model="data.etd" />
|
||||
<VnInputTime v-model="data.etd" />
|
||||
</template>
|
||||
</VnTable>
|
||||
</VnSection>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
route:
|
||||
roadmap:
|
||||
search: Search roadmap
|
||||
searchInfo: You can search by roadmap reference
|
||||
params:
|
||||
etd: ETD
|
||||
tractorPlate: Plate
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
route:
|
||||
roadmap:
|
||||
search: Buscar troncales
|
||||
searchInfo: Puedes buscar por referencia del troncal
|
||||
params:
|
||||
agencyModeName: Agencia Ruta
|
||||
agencyAgreement: Agencia Acuerdo
|
||||
|
|
|
@ -1,91 +1,112 @@
|
|||
import { RouterView } from 'vue-router';
|
||||
|
||||
const agencyCard = {
|
||||
path: ':id',
|
||||
name: 'AgencyCard',
|
||||
component: () => import('src/pages/Route/Agency/Card/AgencyCard.vue'),
|
||||
redirect: { name: 'AgencySummary' },
|
||||
meta: {
|
||||
menu: ['AgencyBasicData', 'AgencyModes', 'AgencyWorkCenters', 'AgencyLog'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'AgencySummary',
|
||||
path: 'summary',
|
||||
meta: {
|
||||
title: 'summary',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () => import('src/pages/Route/Agency/Card/AgencySummary.vue'),
|
||||
},
|
||||
{
|
||||
name: 'AgencyBasicData',
|
||||
path: 'basic-data',
|
||||
meta: {
|
||||
title: 'basicData',
|
||||
icon: 'vn:settings',
|
||||
},
|
||||
component: () => import('pages/Route/Agency/Card/AgencyBasicData.vue'),
|
||||
},
|
||||
{
|
||||
path: 'workCenter',
|
||||
name: 'AgencyWorkCenterCard',
|
||||
redirect: { name: 'AgencyWorkCenters' },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'AgencyWorkCenters',
|
||||
meta: {
|
||||
icon: 'apartment',
|
||||
title: 'workCenters',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Route/Agency/Card/AgencyWorkcenter.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'modes',
|
||||
name: 'AgencyModesCard',
|
||||
redirect: { name: 'AgencyModes' },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'AgencyModes',
|
||||
meta: {
|
||||
icon: 'format_list_bulleted',
|
||||
title: 'modes',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Route/Agency/Card/AgencyModes.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'AgencyLog',
|
||||
path: 'log',
|
||||
meta: {
|
||||
title: 'log',
|
||||
icon: 'history',
|
||||
},
|
||||
component: () => import('src/pages/Route/Agency/Card/AgencyLog.vue'),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default {
|
||||
path: '/agency',
|
||||
name: 'Agency',
|
||||
path: '/agency',
|
||||
meta: {
|
||||
title: 'agency',
|
||||
icon: 'garage_home',
|
||||
moduleName: 'Agency',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'AgencyCard' },
|
||||
menus: {
|
||||
main: [],
|
||||
card: ['AgencyBasicData', 'AgencyModes', 'AgencyWorkCenters', 'AgencyLog'],
|
||||
},
|
||||
redirect: { name: 'RouteMain' },
|
||||
children: [
|
||||
{
|
||||
path: '/agency/:id',
|
||||
name: 'AgencyCard',
|
||||
component: () => import('src/pages/Route/Agency/Card/AgencyCard.vue'),
|
||||
redirect: { name: 'AgencySummary' },
|
||||
name: 'AgencyMain',
|
||||
path: '',
|
||||
component: () => import('src/components/common/VnModule.vue'),
|
||||
redirect: { name: 'AgencyIndexMain' },
|
||||
children: [
|
||||
{
|
||||
name: 'AgencySummary',
|
||||
path: 'summary',
|
||||
meta: {
|
||||
title: 'summary',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Route/Agency/Card/AgencySummary.vue'),
|
||||
},
|
||||
{
|
||||
name: 'AgencyBasicData',
|
||||
path: 'basic-data',
|
||||
meta: {
|
||||
title: 'basicData',
|
||||
icon: 'vn:settings',
|
||||
},
|
||||
component: () =>
|
||||
import('pages/Route/Agency/Card/AgencyBasicData.vue'),
|
||||
},
|
||||
{
|
||||
path: 'workCenter',
|
||||
name: 'AgencyWorkCenterCard',
|
||||
redirect: { name: 'AgencyWorkCenters' },
|
||||
name: 'AgencyIndexMain',
|
||||
path: '',
|
||||
redirect: { name: 'AgencyList' },
|
||||
component: () => import('src/pages/Route/Agency/AgencyList.vue'),
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'AgencyWorkCenters',
|
||||
name: 'AgencyList',
|
||||
path: 'list',
|
||||
meta: {
|
||||
icon: 'apartment',
|
||||
title: 'workCenters',
|
||||
title: 'list',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () =>
|
||||
import(
|
||||
'src/pages/Route/Agency/Card/AgencyWorkcenter.vue'
|
||||
),
|
||||
},
|
||||
agencyCard,
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'modes',
|
||||
name: 'AgencyModesCard',
|
||||
redirect: { name: 'AgencyModes' },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'AgencyModes',
|
||||
meta: {
|
||||
icon: 'format_list_bulleted',
|
||||
title: 'modes',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Route/Agency/Card/AgencyModes.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'AgencyLog',
|
||||
path: 'log',
|
||||
meta: {
|
||||
title: 'log',
|
||||
icon: 'history',
|
||||
},
|
||||
component: () => import('src/pages/Route/Agency/Card/AgencyLog.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
|
|
@ -1,5 +1,44 @@
|
|||
import { RouterView } from 'vue-router';
|
||||
|
||||
const roadmapCard = {
|
||||
path: ':id',
|
||||
name: 'RoadmapCard',
|
||||
component: () => import('src/pages/Route/Roadmap/RoadmapCard.vue'),
|
||||
redirect: { name: 'RoadmapSummary' },
|
||||
meta: {
|
||||
menu: ['RoadmapBasicData', 'RoadmapStops'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'RoadmapSummary',
|
||||
path: 'summary',
|
||||
meta: {
|
||||
title: 'summary',
|
||||
icon: 'open_in_new',
|
||||
},
|
||||
component: () => import('pages/Route/Roadmap/RoadmapSummary.vue'),
|
||||
},
|
||||
{
|
||||
name: 'RoadmapBasicData',
|
||||
path: 'basic-data',
|
||||
meta: {
|
||||
title: 'basicData',
|
||||
icon: 'vn:settings',
|
||||
},
|
||||
component: () => import('pages/Route/Roadmap/RoadmapBasicData.vue'),
|
||||
},
|
||||
{
|
||||
name: 'RoadmapStops',
|
||||
path: 'stops',
|
||||
meta: {
|
||||
title: 'stops',
|
||||
icon: 'vn:lines',
|
||||
},
|
||||
component: () => import('pages/Route/Roadmap/RoadmapStops.vue'),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default {
|
||||
path: '/route/roadmap',
|
||||
name: 'Roadmap',
|
||||
|
@ -9,43 +48,30 @@ export default {
|
|||
moduleName: 'Roadmap',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'RouteMain' },
|
||||
menus: {
|
||||
card: ['RoadmapBasicData', 'RoadmapStops'],
|
||||
},
|
||||
redirect: { name: 'RoadmapMain' },
|
||||
children: [
|
||||
{
|
||||
name: 'RouteRoadmapCard',
|
||||
path: ':id',
|
||||
component: () => import('src/pages/Route/Roadmap/RoadmapCard.vue'),
|
||||
redirect: { name: 'RoadmapSummary' },
|
||||
name: 'RoadmapMain',
|
||||
path: '',
|
||||
component: () => import('src/components/common/VnModule.vue'),
|
||||
redirect: { name: 'RoadmapIndexMain' },
|
||||
children: [
|
||||
{
|
||||
name: 'RoadmapSummary',
|
||||
path: 'summary',
|
||||
meta: {
|
||||
title: 'summary',
|
||||
icon: 'open_in_new',
|
||||
},
|
||||
component: () => import('pages/Route/Roadmap/RoadmapSummary.vue'),
|
||||
},
|
||||
{
|
||||
name: 'RoadmapBasicData',
|
||||
path: 'basic-data',
|
||||
meta: {
|
||||
title: 'basicData',
|
||||
icon: 'vn:settings',
|
||||
},
|
||||
component: () => import('pages/Route/Roadmap/RoadmapBasicData.vue'),
|
||||
},
|
||||
{
|
||||
name: 'RoadmapStops',
|
||||
path: 'stops',
|
||||
meta: {
|
||||
title: 'stops',
|
||||
icon: 'vn:lines',
|
||||
},
|
||||
component: () => import('pages/Route/Roadmap/RoadmapStops.vue'),
|
||||
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