Merge pull request 'refactor: refs #8316 used VnSection and VnCardBeta' (!1150) from 8316-parkingCardWithVnCardBeta into dev
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
Reviewed-on: #1150 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
cbf7ef7ccf
|
@ -492,21 +492,6 @@ invoiceOut:
|
|||
comercial: Comercial
|
||||
errors:
|
||||
downloadCsvFailed: CSV download failed
|
||||
shelving:
|
||||
list:
|
||||
parking: Parking
|
||||
priority: Priority
|
||||
newShelving: New Shelving
|
||||
summary:
|
||||
recyclable: Recyclable
|
||||
parking:
|
||||
pickingOrder: Picking order
|
||||
sector: Sector
|
||||
row: Row
|
||||
column: Column
|
||||
searchBar:
|
||||
info: You can search by parking code
|
||||
label: Search parking...
|
||||
department:
|
||||
chat: Chat
|
||||
bossDepartment: Boss Department
|
||||
|
|
|
@ -491,20 +491,6 @@ invoiceOut:
|
|||
comercial: Comercial
|
||||
errors:
|
||||
downloadCsvFailed: Error al descargar CSV
|
||||
shelving:
|
||||
list:
|
||||
parking: Parking
|
||||
priority: Prioridad
|
||||
newShelving: Nuevo Carro
|
||||
summary:
|
||||
recyclable: Reciclable
|
||||
parking:
|
||||
pickingOrder: Orden de recogida
|
||||
row: Fila
|
||||
column: Columna
|
||||
searchBar:
|
||||
info: Puedes buscar por código de parking
|
||||
label: Buscar parking...
|
||||
department:
|
||||
chat: Chat
|
||||
bossDepartment: Jefe de departamento
|
||||
|
|
|
@ -1,19 +1,12 @@
|
|||
<script setup>
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
||||
import ParkingDescriptor from 'pages/Parking/Card/ParkingDescriptor.vue';
|
||||
import ParkingFilter from 'pages/Parking/ParkingFilter.vue';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnCard
|
||||
<VnCardBeta
|
||||
data-key="Parking"
|
||||
base-url="Parkings"
|
||||
:descriptor="ParkingDescriptor"
|
||||
:filter-panel="ParkingFilter"
|
||||
search-data-key="ParkingList"
|
||||
:searchbar-props="{
|
||||
url: 'Parkings',
|
||||
label: 'parking.searchBar.label',
|
||||
info: 'parking.searchBar.info',
|
||||
}"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -5,17 +5,17 @@ import { useI18n } from 'vue-i18n';
|
|||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import VnPaginate from 'components/ui/VnPaginate.vue';
|
||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||
import CardList from 'components/ui/CardList.vue';
|
||||
import VnLv from 'components/ui/VnLv.vue';
|
||||
import ParkingFilter from './ParkingFilter.vue';
|
||||
import ParkingSummary from './Card/ParkingSummary.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
|
||||
const stateStore = useStateStore();
|
||||
const { push } = useRouter();
|
||||
const { t } = useI18n();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const dataKey = 'ParkingList';
|
||||
|
||||
onMounted(() => (stateStore.rightDrawer = true));
|
||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
||||
|
@ -37,38 +37,38 @@ function exprBuilder(param, value) {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<template>
|
||||
<VnSearchbar
|
||||
data-key="ParkingList"
|
||||
:label="t('Search parking')"
|
||||
:info="t('You can search by parking code')"
|
||||
/>
|
||||
</template>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<VnSection
|
||||
:data-key="dataKey"
|
||||
prefix="parking"
|
||||
:array-data-props="{
|
||||
url: 'Parkings',
|
||||
order: ['code'],
|
||||
userFilter: filter,
|
||||
exprBuilder,
|
||||
}"
|
||||
>
|
||||
<template #advanced-menu>
|
||||
<ParkingFilter data-key="ParkingList" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<template #body>
|
||||
<QPage class="column items-center q-pa-md">
|
||||
<div class="vn-card-list">
|
||||
<VnPaginate
|
||||
data-key="ParkingList"
|
||||
url="Parkings"
|
||||
:user-filter="filter"
|
||||
:expr-builder="exprBuilder"
|
||||
:limit="20"
|
||||
order="code"
|
||||
>
|
||||
<VnPaginate :data-key="dataKey">
|
||||
<template #body="{ rows }">
|
||||
<CardList
|
||||
v-for="row of rows"
|
||||
:key="row.id"
|
||||
:id="row.id"
|
||||
:title="row.code"
|
||||
@click="push({ path: `/parking/${row.id}` })"
|
||||
@click="
|
||||
push({ path: `/shelving/parking/${row.id}/summary` })
|
||||
"
|
||||
>
|
||||
<template #list-items>
|
||||
<VnLv label="Sector" :value="row.sector?.description" />
|
||||
<VnLv
|
||||
label="Sector"
|
||||
:value="row.sector?.description"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('parking.pickingOrder')"
|
||||
:value="row.pickingOrder"
|
||||
|
@ -87,8 +87,5 @@ function exprBuilder(param, value) {
|
|||
</div>
|
||||
</QPage>
|
||||
</template>
|
||||
<i18n>
|
||||
es:
|
||||
Search parking: Buscar parking
|
||||
You can search by parking code: Puede buscar por el código del parking
|
||||
</i18n>
|
||||
</VnSection>
|
||||
</template>
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
parking:
|
||||
pickingOrder: Picking order
|
||||
sector: Sector
|
||||
row: Row
|
||||
column: Column
|
||||
search: Search parking
|
||||
searchInfo: You can search by parking code
|
|
@ -0,0 +1,7 @@
|
|||
parking:
|
||||
pickingOrder: Orden de recogida
|
||||
row: Fila
|
||||
sector: Sector
|
||||
column: Columna
|
||||
search: Buscar parking
|
||||
searchInfo: Puedes buscar por código de parking
|
|
@ -1,19 +1,12 @@
|
|||
<script setup>
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
||||
import ShelvingDescriptor from 'pages/Shelving/Card/ShelvingDescriptor.vue';
|
||||
import ShelvingFilter from './ShelvingFilter.vue';
|
||||
import ShelvingSearchbar from './ShelvingSearchbar.vue';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnCard
|
||||
<VnCardBeta
|
||||
data-key="Shelving"
|
||||
base-url="Shelvings"
|
||||
:descriptor="ShelvingDescriptor"
|
||||
:filter-panel="ShelvingFilter"
|
||||
search-data-key="ShelvingList"
|
||||
>
|
||||
<template #searchbar>
|
||||
<ShelvingSearchbar />
|
||||
</template>
|
||||
</VnCard>
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -6,13 +6,14 @@ import VnLv from 'components/ui/VnLv.vue';
|
|||
import { useRouter } from 'vue-router';
|
||||
import ShelvingFilter from 'pages/Shelving/Card/ShelvingFilter.vue';
|
||||
import ShelvingSummary from 'pages/Shelving/Card/ShelvingSummary.vue';
|
||||
import ShelvingSearchbar from 'pages/Shelving/Card/ShelvingSearchbar.vue';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const dataKey = 'ShelvingList';
|
||||
|
||||
const filter = {
|
||||
include: [{ relation: 'parking' }],
|
||||
};
|
||||
|
@ -34,21 +35,23 @@ function exprBuilder(param, value) {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<ShelvingSearchbar />
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<VnSection
|
||||
:data-key="dataKey"
|
||||
prefix="shelving"
|
||||
:array-data-props="{
|
||||
url: 'Shelvings',
|
||||
order: ['code'],
|
||||
userFilter: filter,
|
||||
exprBuilder,
|
||||
}"
|
||||
>
|
||||
<template #advanced-menu>
|
||||
<ShelvingFilter data-key="ShelvingList" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<template #body>
|
||||
<QPage class="column items-center q-pa-md">
|
||||
<div class="vn-card-list">
|
||||
<VnPaginate
|
||||
data-key="ShelvingList"
|
||||
url="Shelvings"
|
||||
:filter="filter"
|
||||
:expr-builder="exprBuilder"
|
||||
:limit="20"
|
||||
>
|
||||
<VnPaginate :data-key="dataKey">
|
||||
<template #body="{ rows }">
|
||||
<CardList
|
||||
v-for="row of rows"
|
||||
|
@ -89,3 +92,5 @@ function exprBuilder(param, value) {
|
|||
</QPageSticky>
|
||||
</QPage>
|
||||
</template>
|
||||
</VnSection>
|
||||
</template>
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
shelving:
|
||||
list:
|
||||
parking: Parking
|
||||
priority: Priority
|
||||
newShelving: New Shelving
|
||||
summary:
|
||||
recyclable: Recyclable
|
||||
search: Search shelving
|
||||
searchInfo: You can search by shelving reference
|
|
@ -0,0 +1,9 @@
|
|||
shelving:
|
||||
list:
|
||||
parking: Parking
|
||||
priority: Prioridad
|
||||
newShelving: Nuevo Carro
|
||||
summary:
|
||||
recyclable: Reciclable
|
||||
search: Buscar carro
|
||||
searchInfo: Puedes buscar por referencia del carro
|
|
@ -13,7 +13,6 @@ import Travel from './travel';
|
|||
import Order from './order';
|
||||
import Entry from './entry';
|
||||
import roadmap from './roadmap';
|
||||
import Parking from './parking';
|
||||
import Agency from './agency';
|
||||
import Zone from './zone';
|
||||
import Account from './account';
|
||||
|
@ -35,7 +34,6 @@ export default [
|
|||
invoiceIn,
|
||||
Entry,
|
||||
roadmap,
|
||||
Parking,
|
||||
Agency,
|
||||
Zone,
|
||||
Account,
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
import { RouterView } from 'vue-router';
|
||||
|
||||
export default {
|
||||
path: '/parking',
|
||||
name: 'Parking',
|
||||
meta: {
|
||||
title: 'parking',
|
||||
icon: 'garage_home',
|
||||
moduleName: 'Parking',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'ParkingCard' },
|
||||
menus: {
|
||||
main: [],
|
||||
card: ['ParkingBasicData', 'ParkingLog'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '/parking/:id',
|
||||
name: 'ParkingCard',
|
||||
component: () => import('src/pages/Parking/Card/ParkingCard.vue'),
|
||||
redirect: { name: 'ParkingSummary' },
|
||||
children: [
|
||||
{
|
||||
name: 'ParkingSummary',
|
||||
path: 'summary',
|
||||
meta: {
|
||||
title: 'summary',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () => import('src/pages/Parking/Card/ParkingSummary.vue'),
|
||||
},
|
||||
{
|
||||
name: 'ParkingBasicData',
|
||||
path: 'basic-data',
|
||||
meta: {
|
||||
title: 'basicData',
|
||||
icon: 'vn:settings',
|
||||
},
|
||||
component: () => import('pages/Parking/Card/ParkingBasicData.vue'),
|
||||
},
|
||||
{
|
||||
name: 'ParkingLog',
|
||||
path: 'log',
|
||||
meta: {
|
||||
title: 'log',
|
||||
icon: 'history',
|
||||
},
|
||||
component: () => import('src/pages/Parking/Card/ParkingLog.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,62 +1,45 @@
|
|||
import { RouterView } from 'vue-router';
|
||||
|
||||
export default {
|
||||
path: '/shelving',
|
||||
name: 'Shelving',
|
||||
const parkingCard = {
|
||||
name: 'ParkingCard',
|
||||
path: ':id',
|
||||
component: () => import('src/pages/Parking/Card/ParkingCard.vue'),
|
||||
redirect: { name: 'ParkingSummary' },
|
||||
meta: {
|
||||
title: 'shelving',
|
||||
icon: 'vn:inventory',
|
||||
moduleName: 'Shelving',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'ShelvingMain' },
|
||||
menus: {
|
||||
main: ['ShelvingList', 'ParkingList'],
|
||||
card: ['ShelvingBasicData', 'ShelvingLog'],
|
||||
menu: ['ParkingBasicData', 'ParkingLog'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'ShelvingMain',
|
||||
component: () => import('src/components/common/VnModule.vue'),
|
||||
redirect: { name: 'ShelvingList' },
|
||||
children: [
|
||||
{
|
||||
path: 'list',
|
||||
name: 'ShelvingList',
|
||||
path: 'summary',
|
||||
name: 'ParkingSummary',
|
||||
meta: {
|
||||
title: 'list',
|
||||
icon: 'view_list',
|
||||
title: 'summary',
|
||||
icon: 'launch',
|
||||
},
|
||||
component: () => import('src/pages/Shelving/ShelvingList.vue'),
|
||||
component: () => import('src/pages/Parking/Card/ParkingSummary.vue'),
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
name: 'ShelvingCreate',
|
||||
path: 'basic-data',
|
||||
name: 'ParkingBasicData',
|
||||
meta: {
|
||||
title: 'shelvingCreate',
|
||||
icon: 'add',
|
||||
title: 'basicData',
|
||||
icon: 'vn:settings',
|
||||
},
|
||||
component: () => import('src/pages/Shelving/Card/ShelvingForm.vue'),
|
||||
component: () => import('src/pages/Parking/Card/ParkingBasicData.vue'),
|
||||
},
|
||||
{
|
||||
path: '/parking',
|
||||
redirect: { name: 'ParkingList' },
|
||||
children: [
|
||||
{
|
||||
path: 'list',
|
||||
name: 'ParkingList',
|
||||
path: 'log',
|
||||
name: 'ParkingLog',
|
||||
meta: {
|
||||
title: 'parkingList',
|
||||
icon: 'view_list',
|
||||
title: 'log',
|
||||
icon: 'history',
|
||||
},
|
||||
component: () => import('src/pages/Parking/ParkingList.vue'),
|
||||
component: () => import('src/pages/Parking/Card/ParkingLog.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
};
|
||||
|
||||
const shelvingCard = {
|
||||
name: 'ShelvingLayout',
|
||||
path: ':id',
|
||||
component: () => import('pages/Shelving/Card/ShelvingCard.vue'),
|
||||
|
@ -89,6 +72,73 @@ export default {
|
|||
component: () => import('src/pages/Shelving/Card/ShelvingLog.vue'),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default {
|
||||
path: '/shelving',
|
||||
name: 'Shelving',
|
||||
meta: {
|
||||
title: 'shelving',
|
||||
icon: 'vn:inventory',
|
||||
moduleName: 'Shelving',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'ShelvingMain' },
|
||||
menus: {
|
||||
main: ['ShelvingList', 'ParkingMain'],
|
||||
card: ['ShelvingBasicData', 'ShelvingLog'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'ShelvingMain',
|
||||
component: () => import('src/components/common/VnModule.vue'),
|
||||
redirect: { name: 'ShelvingSection' },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'ShelvingSection',
|
||||
redirect: { name: 'ShelvingList' },
|
||||
component: () => import('src/pages/Shelving/ShelvingList.vue'),
|
||||
children: [
|
||||
{
|
||||
path: 'list',
|
||||
name: 'ShelvingList',
|
||||
meta: {
|
||||
title: 'list',
|
||||
icon: 'view_list',
|
||||
},
|
||||
},
|
||||
shelvingCard,
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
name: 'ShelvingCreate',
|
||||
meta: {
|
||||
title: 'shelvingCreate',
|
||||
icon: 'add',
|
||||
},
|
||||
component: () => import('src/pages/Shelving/Card/ShelvingForm.vue'),
|
||||
},
|
||||
{
|
||||
path: 'parking',
|
||||
name: 'ParkingMain',
|
||||
redirect: { name: 'ParkingList' },
|
||||
meta: {
|
||||
title: 'parkingList',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () => import('src/pages/Parking/ParkingList.vue'),
|
||||
children: [
|
||||
{
|
||||
path: 'list',
|
||||
name: 'ParkingList',
|
||||
},
|
||||
parkingCard,
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
@ -13,7 +13,6 @@ import shelving from 'src/router/modules/shelving';
|
|||
import order from 'src/router/modules/order';
|
||||
import entry from 'src/router/modules/entry';
|
||||
import roadmap from 'src/router/modules/roadmap';
|
||||
import parking from 'src/router/modules/parking';
|
||||
import agency from 'src/router/modules/agency';
|
||||
import zone from 'src/router/modules/zone';
|
||||
import account from './modules/account';
|
||||
|
@ -85,7 +84,6 @@ const routes = [
|
|||
travel,
|
||||
roadmap,
|
||||
entry,
|
||||
parking,
|
||||
agency,
|
||||
zone,
|
||||
account,
|
||||
|
|
Loading…
Reference in New Issue