feat: #6321 new route
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javier Segarra 2024-04-22 14:24:23 +02:00
parent 5779d37bbd
commit cc241c6a4e
4 changed files with 54 additions and 44 deletions

View File

@ -1,6 +1,6 @@
<script setup> <script setup>
import { toRefs, ref } from 'vue'; import { toRefs, ref } from 'vue';
import TicketLackDialog from './TicketLackDialog.vue'; import TicketLackDetail from './TicketLackDetail.vue';
import { useSession } from 'src/composables/useSession'; import { useSession } from 'src/composables/useSession';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
@ -28,11 +28,6 @@ async function splitSelected() {
} }
</script> </script>
<template> <template>
<QDialog
ref="dialogLackRef"
full-width
@before-show="() => (hasRowsSelected = false)"
>
<QCard class="q-pa-sm"> <QCard class="q-pa-sm">
<QCardSection class="row items-center q-pb-none"> <QCardSection class="row items-center q-pb-none">
<QImg <QImg
@ -60,11 +55,11 @@ async function splitSelected() {
<QBtn icon="close" flat round dense v-close-popup /> <QBtn icon="close" flat round dense v-close-popup />
</QCardSection> </QCardSection>
<QCardSection class="row items-center"> <QCardSection class="row items-center">
<TicketLackDialog <TicketLackDetail
ref="ticketRef" ref="ticketRef"
:id="ticket.itemFk" :id="ticket.itemFk"
@selection="(rows) => (hasRowsSelected = rows.length > 0)" @selection="(rows) => (hasRowsSelected = rows.length > 0)"
/> </QCardSection></QCard /> </QCardSection
></QDialog> ></QCard>
</template> </template>
<i18n> </i18n> <i18n> </i18n>

View File

@ -4,7 +4,7 @@ import { useI18n } from 'vue-i18n';
import { useStateStore } from 'stores/useStateStore'; import { useStateStore } from 'stores/useStateStore';
import VnPaginate from 'components/ui/VnPaginate.vue'; import VnPaginate from 'components/ui/VnPaginate.vue';
import TicketLackFilter from 'pages/Ticket/Negative/TicketLackFilter.vue'; import TicketLackFilter from 'pages/Ticket/Negative/TicketLackFilter.vue';
import TicketLackDialogProxy from 'src/pages/Ticket/Negative/TicketLackDialogProxy.vue'; // import TicketLackDialogProxy from 'src/pages/Ticket/Negative/TicketLackDialogProxy.vue';
import NegativeOriginDialog from 'pages/Ticket/Negative/NegativeOriginDialog.vue'; import NegativeOriginDialog from 'pages/Ticket/Negative/NegativeOriginDialog.vue';
import TotalNegativeOriginDialog from 'pages/Ticket/Negative/TotalNegativeOriginDialog.vue'; import TotalNegativeOriginDialog from 'pages/Ticket/Negative/TotalNegativeOriginDialog.vue';
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue'; import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
@ -19,10 +19,17 @@ const showNegativeOriginDialog = ref(false);
const showTotalNegativeOriginDialog = ref(false); const showTotalNegativeOriginDialog = ref(false);
const currentRow = ref(null); const currentRow = ref(null);
const { dialogRef, onDialogHide } = useDialogPluginComponent(); const { dialogRef, onDialogHide } = useDialogPluginComponent();
import { useRoute, useRouter } from 'vue-router';
const viewSummary = (value) => { const route = useRoute();
showTicketDialog.value = true; const router = useRouter();
currentRow.value = value; const viewSummary = ({ itemFk: id }) => {
router.push({
name: 'TicketLackCard',
params: {
id: '1',
},
});
}; };
const originDialogRef = ref(); const originDialogRef = ref();
const totalNegativeDialogRef = ref(); const totalNegativeDialogRef = ref();
@ -199,12 +206,12 @@ const columns = computed(() => [
</template> </template>
</VnPaginate> </VnPaginate>
</div> </div>
<!--
<TicketLackDialogProxy <TicketLackDialogProxy
ref="dialogRef" ref="dialogRef"
v-model="showTicketDialog" v-model="showTicketDialog"
:ticket="currentRow" :ticket="currentRow"
></TicketLackDialogProxy> ></TicketLackDialogProxy> -->
<TotalNegativeOriginDialog <TotalNegativeOriginDialog
ref="totalNegativeDialogRef" ref="totalNegativeDialogRef"
v-model="showTotalNegativeOriginDialog" v-model="showTotalNegativeOriginDialog"

View File

@ -39,6 +39,14 @@ export default {
}, },
component: () => component: () =>
import('src/pages/Ticket/Negative/TicketLackList.vue'), import('src/pages/Ticket/Negative/TicketLackList.vue'),
children: [
{
name: 'TicketLackCard',
path: ':id/edit',
component: () =>
import('src/pages/Ticket/Negative/TicketLackDetail.vue'),
},
],
}, },
{ {
name: 'TicketCreate', name: 'TicketCreate',