forked from verdnatura/salix-front
refactor: refs #8316 used VnSection and VnCardBeta
This commit is contained in:
parent
93047ab179
commit
89cf61a750
|
@ -550,6 +550,8 @@ shelving:
|
|||
newShelving: New Shelving
|
||||
summary:
|
||||
recyclable: Recyclable
|
||||
search: Search shelving
|
||||
searchInfo: You can search by shelving reference
|
||||
parking:
|
||||
pickingOrder: Picking order
|
||||
sector: Sector
|
||||
|
@ -558,6 +560,8 @@ parking:
|
|||
searchBar:
|
||||
info: You can search by parking code
|
||||
label: Search parking...
|
||||
search: Search parking
|
||||
searchInfo: You can search by parking code
|
||||
order:
|
||||
field:
|
||||
salesPersonFk: Sales Person
|
||||
|
|
|
@ -575,6 +575,8 @@ shelving:
|
|||
newShelving: Nuevo Carro
|
||||
summary:
|
||||
recyclable: Reciclable
|
||||
search: Buscar carro
|
||||
searchInfo: Puedes buscar por referencia del carro
|
||||
parking:
|
||||
pickingOrder: Orden de recogida
|
||||
row: Fila
|
||||
|
@ -582,6 +584,8 @@ parking:
|
|||
searchBar:
|
||||
info: Puedes buscar por código de parking
|
||||
label: Buscar parking...
|
||||
search: Buscar parking
|
||||
searchInfo: Puedes buscar por código de 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,58 +37,54 @@ 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'],
|
||||
exprBuilder,
|
||||
}"
|
||||
>
|
||||
<template #rightMenu>
|
||||
<ParkingFilter data-key="ParkingList" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<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"
|
||||
>
|
||||
<template #body="{ rows }">
|
||||
<CardList
|
||||
v-for="row of rows"
|
||||
:key="row.id"
|
||||
:id="row.id"
|
||||
:title="row.code"
|
||||
@click="push({ path: `/parking/${row.id}` })"
|
||||
<template #body>
|
||||
<QPage class="column items-center q-pa-md">
|
||||
<div class="vn-card-list">
|
||||
<VnPaginate
|
||||
:data-key="dataKey"
|
||||
:user-filter="filter"
|
||||
:expr-builder="exprBuilder"
|
||||
:limit="20"
|
||||
>
|
||||
<template #list-items>
|
||||
<VnLv label="Sector" :value="row.sector?.description" />
|
||||
<VnLv
|
||||
:label="t('parking.pickingOrder')"
|
||||
:value="row.pickingOrder"
|
||||
/>
|
||||
<template #body="{ rows }">
|
||||
<CardList
|
||||
v-for="row of rows"
|
||||
:key="row.id"
|
||||
:id="row.id"
|
||||
:title="row.code"
|
||||
@click="push({ path: `/parking/${row.id}` })"
|
||||
>
|
||||
<template #list-items>
|
||||
<VnLv label="Sector" :value="row.sector?.description" />
|
||||
<VnLv
|
||||
:label="t('parking.pickingOrder')"
|
||||
:value="row.pickingOrder"
|
||||
/>
|
||||
</template>
|
||||
<template #actions>
|
||||
<QBtn
|
||||
:label="t('components.smartCard.openSummary')"
|
||||
@click.stop="viewSummary(row.id, ParkingSummary)"
|
||||
color="primary"
|
||||
/>
|
||||
</template>
|
||||
</CardList>
|
||||
</template>
|
||||
<template #actions>
|
||||
<QBtn
|
||||
:label="t('components.smartCard.openSummary')"
|
||||
@click.stop="viewSummary(row.id, ParkingSummary)"
|
||||
color="primary"
|
||||
/>
|
||||
</template>
|
||||
</CardList>
|
||||
</template>
|
||||
</VnPaginate>
|
||||
</div>
|
||||
</QPage>
|
||||
</VnPaginate>
|
||||
</div>
|
||||
</QPage>
|
||||
</template>
|
||||
</VnSection>
|
||||
</template>
|
||||
<i18n>
|
||||
es:
|
||||
Search parking: Buscar parking
|
||||
You can search by parking code: Puede buscar por el código del parking
|
||||
</i18n>
|
||||
|
|
|
@ -1,54 +1,65 @@
|
|||
import { RouterView } from 'vue-router';
|
||||
|
||||
const parkingCard = {
|
||||
name: 'ParkingCard',
|
||||
path: ':id',
|
||||
component: () => import('src/pages/Parking/Card/ParkingCard.vue'),
|
||||
redirect: { name: 'ParkingSummary' },
|
||||
meta: {
|
||||
menu: [
|
||||
'ParkingBasicData',
|
||||
'ParkingLog'
|
||||
],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'summary',
|
||||
name: 'ParkingSummary',
|
||||
meta: {
|
||||
title: 'summary',
|
||||
icon: 'launch',
|
||||
},
|
||||
component: () => import('src/pages/Parking/Card/ParkingSummary.vue'),
|
||||
},
|
||||
{
|
||||
path: 'basic-data',
|
||||
name: 'ParkingBasicData',
|
||||
meta: {
|
||||
title: 'basicData',
|
||||
icon: 'vn:settings',
|
||||
},
|
||||
component: () => import('src/pages/Parking/Card/ParkingBasicData.vue'),
|
||||
},
|
||||
{
|
||||
path: 'log',
|
||||
name: 'ParkingLog',
|
||||
meta: {
|
||||
title: 'log',
|
||||
icon: 'history',
|
||||
},
|
||||
component: () => import('src/pages/Parking/Card/ParkingLog.vue'),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default {
|
||||
path: '/parking',
|
||||
name: 'Parking',
|
||||
path: '/parking',
|
||||
meta: {
|
||||
title: 'parking',
|
||||
icon: 'garage_home',
|
||||
moduleName: 'Parking',
|
||||
menu: [],
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'ParkingCard' },
|
||||
menus: {
|
||||
main: [],
|
||||
card: ['ParkingBasicData', 'ParkingLog'],
|
||||
},
|
||||
redirect: { name: 'ParkingMain' },
|
||||
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'),
|
||||
},
|
||||
],
|
||||
name: 'ParkingMain',
|
||||
path: '',
|
||||
component: () => import('src/components/common/VnModule.vue'),
|
||||
redirect: { name: 'ParkingIndexMain' },
|
||||
children: [ parkingCard ],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue