refactor: refs #8197 rename VnSectionMain to VnModule and VnCardMain to VnSection
gitea/salix-front/pipeline/pr-beta This commit looks good Details

This commit is contained in:
Alex Moreno 2024-12-18 13:42:57 +01:00
parent 8c3c318099
commit fccca9ea47
24 changed files with 98 additions and 98 deletions

View File

@ -5,6 +5,8 @@ import { useArrayData } from 'src/composables/useArrayData';
import { useStateStore } from 'stores/useStateStore'; import { useStateStore } from 'stores/useStateStore';
import useCardSize from 'src/composables/useCardSize'; import useCardSize from 'src/composables/useCardSize';
import LeftMenu from 'components/LeftMenu.vue'; import LeftMenu from 'components/LeftMenu.vue';
import VnSubToolbar from '../ui/VnSubToolbar.vue';
const props = defineProps({ const props = defineProps({
dataKey: { type: String, required: true }, dataKey: { type: String, required: true },
baseUrl: { type: String, default: undefined }, baseUrl: { type: String, default: undefined },

View File

@ -9,7 +9,7 @@ import VnTable from 'components/VnTable/VnTable.vue';
import VnConfirm from 'components/ui/VnConfirm.vue'; import VnConfirm from 'components/ui/VnConfirm.vue';
import FetchData from 'src/components/FetchData.vue'; import FetchData from 'src/components/FetchData.vue';
import { useValidator } from 'src/composables/useValidator'; import { useValidator } from 'src/composables/useValidator';
import VnCardMain from 'src/components/common/VnCardMain.vue'; import VnSection from 'src/components/common/VnSection.vue';
defineProps({ defineProps({
id: { id: {
@ -138,7 +138,7 @@ const deleteAcl = async ({ id }) => {
auto-load auto-load
@on-fetch="(data) => (roles = data)" @on-fetch="(data) => (roles = data)"
/> />
<VnCardMain <VnSection
:data-key="dataKey" :data-key="dataKey"
:columns="columns" :columns="columns"
prefix="acls" prefix="acls"
@ -166,7 +166,7 @@ const deleteAcl = async ({ id }) => {
:use-model="true" :use-model="true"
/> />
</template> </template>
</VnCardMain> </VnSection>
</template> </template>
<i18n> <i18n>

View File

@ -2,7 +2,7 @@
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { ref, computed } from 'vue'; import { ref, computed } from 'vue';
import VnTable from 'components/VnTable/VnTable.vue'; import VnTable from 'components/VnTable/VnTable.vue';
import VnCardMain from 'src/components/common/VnCardMain.vue'; import VnSection from 'src/components/common/VnSection.vue';
const tableRef = ref(); const tableRef = ref();
const { t } = useI18n(); const { t } = useI18n();
@ -43,7 +43,7 @@ const exprBuilder = (param, value) => {
</script> </script>
<template> <template>
<VnCardMain <VnSection
:data-key="dataKey" :data-key="dataKey"
:columns="columns" :columns="columns"
prefix="mailAlias" prefix="mailAlias"
@ -68,7 +68,7 @@ const exprBuilder = (param, value) => {
:right-search="false" :right-search="false"
/> />
</template> </template>
</VnCardMain> </VnSection>
</template> </template>
<i18n> <i18n>
es: es:

View File

@ -4,7 +4,7 @@ import { computed } from 'vue';
import VnTable from 'components/VnTable/VnTable.vue'; import VnTable from 'components/VnTable/VnTable.vue';
import AccountSummary from './Card/AccountSummary.vue'; import AccountSummary from './Card/AccountSummary.vue';
import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import VnCardMain from 'src/components/common/VnCardMain.vue'; import VnSection from 'src/components/common/VnSection.vue';
const { t } = useI18n(); const { t } = useI18n();
const { viewSummary } = useSummaryDialog(); const { viewSummary } = useSummaryDialog();
@ -103,7 +103,7 @@ function exprBuilder(param, value) {
</script> </script>
<template> <template>
<VnCardMain <VnSection
:data-key="dataKey" :data-key="dataKey"
:columns="columns" :columns="columns"
prefix="account" prefix="account"
@ -124,7 +124,7 @@ function exprBuilder(param, value) {
:right-search="false" :right-search="false"
/> />
</template> </template>
</VnCardMain> </VnSection>
</template> </template>
<i18n> <i18n>

View File

@ -5,7 +5,7 @@ import VnTable from 'components/VnTable/VnTable.vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import RoleSummary from './Card/RoleSummary.vue'; import RoleSummary from './Card/RoleSummary.vue';
import VnCardMain from 'src/components/common/VnCardMain.vue'; import VnSection from 'src/components/common/VnSection.vue';
const route = useRoute(); const route = useRoute();
const { t } = useI18n(); const { t } = useI18n();
@ -85,7 +85,7 @@ const exprBuilder = (param, value) => {
</script> </script>
<template> <template>
<VnCardMain <VnSection
:data-key="dataKey" :data-key="dataKey"
:columns="columns" :columns="columns"
prefix="role" prefix="role"
@ -110,7 +110,7 @@ const exprBuilder = (param, value) => {
:right-search="false" :right-search="false"
/> />
</template> </template>
</VnCardMain> </VnSection>
</template> </template>
<i18n> <i18n>

View File

@ -1,15 +1,18 @@
<script setup> <script setup>
import axios from 'axios'; import axios from 'axios';
import { date, useQuasar } from 'quasar'; import { date, useQuasar } from 'quasar';
import { computed, onMounted, reactive, ref } from 'vue'; import { computed, onMounted, onUnmounted, reactive, ref } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { useStateStore } from 'stores/useStateStore';
const router = useRouter(); const router = useRouter();
const stateStore = useStateStore();
const { t } = useI18n(); const { t } = useI18n();
const quasar = useQuasar(); const quasar = useQuasar();
onMounted(async () => { onMounted(async () => {
stateStore.rightDrawer = true;
await fetch(); await fetch();
}); });
@ -84,74 +87,69 @@ async function getVideoList(expeditionId, timed) {
</script> </script>
<template> <template>
<QDrawer show-if-above side="right"> <Teleport to="#right-panel" v-if="stateStore.isHeaderMounted()">
<QScrollArea class="fit"> <QList bordered separator style="max-width: 318px">
<QList bordered separator style="max-width: 318px"> <QItem v-if="lastExpedition && videoList.length">
<QItem v-if="lastExpedition && videoList.length"> <QItemSection>
<QItemSection> <QItemLabel class="text-h6">
<QItemLabel class="text-h6"> {{ t('ticket.boxing.selectTime') }} ({{ time.min }}-{{
{{ t('ticket.boxing.selectTime') }} ({{ time.min }}-{{ time.max
time.max }})
}}) </QItemLabel>
</QItemLabel> <QRange
<QRange v-model="time"
v-model="time" @change="getVideoList(lastExpedition, time)"
@change="getVideoList(lastExpedition, time)" :min="0"
:min="0" :max="24"
:max="24" :step="1"
:step="1" :left-label-value="time.min + ':00'"
:left-label-value="time.min + ':00'" :right-label-value="time.max + ':00'"
:right-label-value="time.max + ':00'" label
label markers
markers snap
snap color="primary"
color="primary" />
/> </QItemSection>
</QItemSection> </QItem>
</QItem> <QItem v-if="lastExpedition && videoList.length">
<QItem v-if="lastExpedition && videoList.length"> <QItemSection>
<QItemSection> <QSelect
<QSelect color="primary"
color="primary" v-model="slide"
v-model="slide" :options="videoList"
:options="videoList" :label="t('ticket.boxing.selectVideo')"
:label="t('ticket.boxing.selectVideo')" emit-value
emit-value map-options
map-options >
> <template #prepend>
<template #prepend> <QIcon name="schedule" />
<QIcon name="schedule" /> </template>
</template> </QSelect>
</QSelect> </QItemSection>
</QItemSection> </QItem>
</QItem> <QItem
<QItem v-for="expedition in expeditions"
v-for="expedition in expeditions" :key="expedition.id"
:key="expedition.id" @click="getVideoList(expedition.id)"
@click="getVideoList(expedition.id)" clickable
clickable v-ripple
v-ripple >
> <QItemSection>
<QItemSection> <QItemLabel class="text-h6">#{{ expedition.id }}</QItemLabel>
<QItemLabel class="text-h6">#{{ expedition.id }}</QItemLabel> </QItemSection>
</QItemSection> <QItemSection>
<QItemSection> <QItemLabel caption>{{ t('globals.created') }}</QItemLabel>
<QItemLabel caption>{{ t('globals.created') }}</QItemLabel> <QItemLabel>
<QItemLabel> {{ date.formatDate(expedition.created, 'YYYY-MM-DD HH:mm:ss') }}
{{ </QItemLabel>
date.formatDate(expedition.created, 'YYYY-MM-DD HH:mm:ss') <QItemLabel caption>{{ t('globals.item') }}</QItemLabel>
}} <QItemLabel>{{ expedition.packagingItemFk }}</QItemLabel>
</QItemLabel> <QItemLabel caption>{{ t('ticket.boxing.worker') }}</QItemLabel>
<QItemLabel caption>{{ t('globals.item') }}</QItemLabel> <QItemLabel>{{ expedition.userName }}</QItemLabel>
<QItemLabel>{{ expedition.packagingItemFk }}</QItemLabel> </QItemSection>
<QItemLabel caption>{{ t('ticket.boxing.worker') }}</QItemLabel> </QItem>
<QItemLabel>{{ expedition.userName }}</QItemLabel> </QList>
</QItemSection> </Teleport>
</QItem>
</QList>
</QScrollArea>
</QDrawer>
<QCard> <QCard>
<QCarousel animated v-model="slide" height="max-content"> <QCarousel animated v-model="slide" height="max-content">
<QCarouselSlide <QCarouselSlide

View File

@ -28,7 +28,7 @@ export default {
{ {
path: '', path: '',
name: 'AccountMain', name: 'AccountMain',
component: () => import('src/components/common/VnSectionMain.vue'), component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'AccountIndexMain' }, redirect: { name: 'AccountIndexMain' },
children: [ children: [
{ {

View File

@ -27,7 +27,7 @@ export default {
{ {
name: 'ClaimMain', name: 'ClaimMain',
path: '', path: '',
component: () => import('src/components/common/VnSectionMain.vue'), component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'ClaimList' }, redirect: { name: 'ClaimList' },
children: [ children: [
{ {

View File

@ -39,7 +39,7 @@ export default {
{ {
path: '', path: '',
name: 'CustomerMain', name: 'CustomerMain',
component: () => import('src/components/common/VnSectionMain.vue'), component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'CustomerList' }, redirect: { name: 'CustomerList' },
children: [ children: [
{ {

View File

@ -25,7 +25,7 @@ export default {
{ {
path: '', path: '',
name: 'EntryMain', name: 'EntryMain',
component: () => import('src/components/common/VnSectionMain.vue'), component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'EntryList' }, redirect: { name: 'EntryList' },
children: [ children: [
{ {

View File

@ -25,7 +25,7 @@ export default {
{ {
path: '', path: '',
name: 'InvoiceInMain', name: 'InvoiceInMain',
component: () => import('src/components/common/VnSectionMain.vue'), component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'InvoiceInList' }, redirect: { name: 'InvoiceInList' },
children: [ children: [
{ {

View File

@ -18,7 +18,7 @@ export default {
{ {
path: '', path: '',
name: 'InvoiceOutMain', name: 'InvoiceOutMain',
component: () => import('src/components/common/VnSectionMain.vue'), component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'InvoiceOutList' }, redirect: { name: 'InvoiceOutList' },
children: [ children: [
{ {

View File

@ -36,7 +36,7 @@ export default {
{ {
path: '', path: '',
name: 'ItemMain', name: 'ItemMain',
component: () => import('src/components/common/VnSectionMain.vue'), component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'ItemList' }, redirect: { name: 'ItemList' },
children: [ children: [
{ {

View File

@ -19,7 +19,7 @@ export default {
{ {
path: '', path: '',
name: 'MonitorMain', name: 'MonitorMain',
component: () => import('src/components/common/VnSectionMain.vue'), component: () => import('src/components/common/VnModule.vue'),
props: (route) => ({ leftDrawer: route.name === 'MonitorClientsActions' }), props: (route) => ({ leftDrawer: route.name === 'MonitorClientsActions' }),
redirect: { name: 'MonitorTickets' }, redirect: { name: 'MonitorTickets' },
children: [ children: [

View File

@ -19,7 +19,7 @@ export default {
{ {
path: '', path: '',
name: 'OrderMain', name: 'OrderMain',
component: () => import('src/components/common/VnSectionMain.vue'), component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'OrderList' }, redirect: { name: 'OrderList' },
children: [ children: [
{ {

View File

@ -25,7 +25,7 @@ export default {
{ {
path: '/route', path: '/route',
name: 'RouteMain', name: 'RouteMain',
component: () => import('src/components/common/VnSectionMain.vue'), component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'RouteList' }, redirect: { name: 'RouteList' },
children: [ children: [
{ {

View File

@ -18,7 +18,7 @@ export default {
{ {
path: '', path: '',
name: 'ShelvingMain', name: 'ShelvingMain',
component: () => import('src/components/common/VnSectionMain.vue'), component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'ShelvingList' }, redirect: { name: 'ShelvingList' },
children: [ children: [
{ {

View File

@ -30,7 +30,7 @@ export default {
{ {
path: '', path: '',
name: 'SupplierMain', name: 'SupplierMain',
component: () => import('src/components/common/VnSectionMain.vue'), component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'SupplierList' }, redirect: { name: 'SupplierList' },
children: [ children: [
{ {

View File

@ -18,7 +18,7 @@ export default {
{ {
path: '', path: '',
name: 'TravelMain', name: 'TravelMain',
component: () => import('src/components/common/VnSectionMain.vue'), component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'TravelList' }, redirect: { name: 'TravelList' },
children: [ children: [
{ {

View File

@ -18,7 +18,7 @@ export default {
{ {
path: '/wagon', path: '/wagon',
name: 'WagonMain', name: 'WagonMain',
component: () => import('src/components/common/VnSectionMain.vue'), component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'WagonList' }, redirect: { name: 'WagonList' },
children: [ children: [
{ {
@ -62,7 +62,7 @@ export default {
{ {
path: '/wagon/type', path: '/wagon/type',
name: 'WagonTypeMain', name: 'WagonTypeMain',
component: () => import('src/components/common/VnSectionMain.vue'), component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'WagonTypeList' }, redirect: { name: 'WagonTypeList' },
children: [ children: [
{ {

View File

@ -35,7 +35,7 @@ export default {
{ {
path: '', path: '',
name: 'WorkerMain', name: 'WorkerMain',
component: () => import('src/components/common/VnSectionMain.vue'), component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'WorkerList' }, redirect: { name: 'WorkerList' },
children: [ children: [
{ {

View File

@ -30,7 +30,7 @@ export default {
{ {
path: '/zone', path: '/zone',
name: 'ZoneMain', name: 'ZoneMain',
component: () => import('src/components/common/VnSectionMain.vue'), component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'ZoneList' }, redirect: { name: 'ZoneList' },
children: [ children: [
{ {