#5186 create parking section #197

Merged
jorgep merged 29 commits from 5186-CreateParkingSection into dev 2024-03-27 08:42:33 +00:00
10 changed files with 32 additions and 75 deletions
Showing only changes of commit ebbe38a14e - Show all commits

View File

@ -30,29 +30,23 @@ const filter = {
<VnSubToolbar />
<FormModel :url="`Parkings/${parkingId}`" model="parking" :filter="filter">
<template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md">
<div class="col">
<VnInput v-model="data.code" :label="t('parking.basicData.code')" />
</div>
<div class="col">
<VnInput
v-model="data.pickingOrder"
:label="t('parking.basicData.pickingOrder')"
/>
</div>
<VnRow>
<VnInput v-model="data.code" :label="t('parking.basicData.code')" />
<VnInput
v-model="data.pickingOrder"
:label="t('parking.basicData.pickingOrder')"
/>
</VnRow>
<VnRow>
<div class="col">
<VnSelectFilter
v-model="data.sectorFk"
option-value="id"
option-label="description"
:label="t('parking.basicData.sector')"
:options="sectors"
use-input
input-debounce="0"
/>
</div>
<VnSelectFilter
v-model="data.sectorFk"
option-value="id"
option-label="description"
jorgep marked this conversation as resolved Outdated

El campo debería ser requerido si al enviar nulo da error.

O cambiar el mensaje de error en salix para que sea mas informativo al usuario y no de pie a pensar que algo está hecho mal.

El campo debería ser requerido si al enviar nulo da error. O cambiar el mensaje de error en salix para que sea mas informativo al usuario y no de pie a pensar que algo está hecho mal.

Esto habría que aplicarlo a nivel de FormModel, actualmente pasa en cualquier sección que inserte un campo que es obligatorio en bd, yo crearía tarea para hacer refactor de formModel. De momento, lo soluciono con la prop is-clearable="false". Pero que baraje @alexm y @jgallego si crear tarea.

Esto habría que aplicarlo a nivel de FormModel, actualmente pasa en cualquier sección que inserte un campo que es obligatorio en bd, yo crearía tarea para hacer refactor de formModel. De momento, lo soluciono con la prop is-clearable="false". Pero que baraje @alexm y @jgallego si crear tarea.
:label="t('parking.basicData.sector')"
jorgep marked this conversation as resolved Outdated
Outdated
Review

Al final un VnRow con un unico elemento se veia bien?

Al final un VnRow con un unico elemento se veia bien?

sí, te aplica el flex 1, ocupando todo el ancho

sí, te aplica el flex 1, ocupando todo el ancho
:options="sectors"
use-input
input-debounce="0"
/>
</VnRow>
</template>
</FormModel>

View File

@ -6,7 +6,7 @@ import { useStateStore } from 'stores/useStateStore';
import { useArrayData } from 'src/composables/useArrayData';
import LeftMenu from 'components/LeftMenu.vue';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
import ParkingDescriptor from 'pages/Shelving/Parking/Card/ParkingDescriptor.vue';
import ParkingDescriptor from 'pages/Parking/Card/ParkingDescriptor.vue';
const stateStore = useStateStore();
const { t } = useI18n();

View File

@ -1,17 +0,0 @@
<script setup>
import { useStateStore } from 'stores/useStateStore';
import LeftMenu from 'src/components/LeftMenu.vue';
const stateStore = useStateStore();
</script>
<template>
<QDrawer v-model="stateStore.leftDrawer" show-if-above :width="256">
<QScrollArea class="fit text-grey-8">
<LeftMenu />
</QScrollArea>
</QDrawer>
<QPageContainer>
<RouterView></RouterView>
</QPageContainer>
</template>

View File

@ -8,33 +8,16 @@ export default {
icon: 'garage_home',
},
component: RouterView,
redirect: { name: 'ParkingMain' },
redirect: { name: 'ParkingCard' },
menus: {
main: ['ParkingList'],
main: [],
card: ['ParkingBasicData', 'ParkingLog'],
},
children: [
{
path: '',
name: 'ParkingMain',
component: () => import('src/pages/Shelving/Parking/ParkingMain.vue'),
redirect: { name: 'ParkingList' },
children: [
{
path: 'list',
name: 'ParkingList',
meta: {
title: 'parkingList',
icon: 'view_list',
},
component: () => import('src/pages/Shelving/Parking/ParkingList.vue'),
},
],
},
{
path: ':id',
path: '/parking/:id',
name: 'ParkingCard',
component: () => import('src/pages/Shelving/Parking/Card/ParkingCard.vue'),
component: () => import('src/pages/Parking/Card/ParkingCard.vue'),
redirect: { name: 'ParkingSummary' },
children: [
{
@ -44,8 +27,7 @@ export default {
title: 'summary',
icon: 'view_list',
},
component: () =>
import('src/pages/Shelving/Parking/Card/ParkingSummary.vue'),
component: () => import('src/pages/Parking/Card/ParkingSummary.vue'),
},
{
name: 'ParkingBasicData',
@ -54,8 +36,7 @@ export default {
title: 'basicData',
icon: 'vn:settings',
},
component: () =>
import('pages/Shelving/Parking/Card/ParkingBasicData.vue'),
component: () => import('pages/Parking/Card/ParkingBasicData.vue'),
},
{
name: 'ParkingLog',
@ -64,8 +45,7 @@ export default {
title: 'log',
icon: 'history',
},
component: () =>
import('src/pages/Shelving/Parking/Card/ParkingLog.vue'),
component: () => import('src/pages/Parking/Card/ParkingLog.vue'),
},
],
},

View File

@ -37,6 +37,15 @@ export default {
},
component: () => import('src/pages/Shelving/Card/ShelvingForm.vue'),
},
{
path: '/parking',
name: 'ParkingList',
meta: {
title: 'parkingList',
icon: 'view_list',
},
component: () => import('src/pages/Parking/ParkingList.vue'),
},
],
},
{
@ -74,14 +83,5 @@ export default {
},
],
},
{
path: 'parking',
name: 'ParkingList',
meta: {
title: 'parkingList',
icon: 'view_list',
},
component: () => import('src/pages/Shelving/Parking/ParkingMain.vue'),
},
],
};