feat(Entry): add DescriptorMenu
gitea/salix-front/pipeline/pr-test This commit looks good
Details
gitea/salix-front/pipeline/pr-test This commit looks good
Details
This commit is contained in:
parent
ed3ad310c5
commit
34e00653f5
|
@ -10,6 +10,7 @@ import { toDate } from 'src/filters';
|
|||
import { usePrintService } from 'composables/usePrintService';
|
||||
import { getUrl } from 'src/composables/getUrl';
|
||||
import filter from './EntryFilter.js';
|
||||
import EntryDescriptorMenu from './EntryDescriptorMenu.vue';
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
|
@ -68,9 +69,7 @@ const showEntryReport = () => {
|
|||
data-key="Entry"
|
||||
>
|
||||
<template #menu="{ entity }">
|
||||
<QItem v-ripple clickable @click="showEntryReport(entity)">
|
||||
<QItemSection>{{ t('Show entry report') }}</QItemSection>
|
||||
</QItem>
|
||||
<EntryDescriptorMenu :id="entity.id" />
|
||||
</template>
|
||||
<template #body="{ entity }">
|
||||
<VnLv :label="t('globals.agency')" :value="entity.travel?.agency?.name" />
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<script setup>
|
||||
import { usePrintService } from 'composables/usePrintService';
|
||||
|
||||
const { openReport } = usePrintService();
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
function showEntryReport() {
|
||||
openReport(`Entries/${$props.id}/entry-order-pdf`);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<QItem v-ripple clickable @click="showEntryReport">
|
||||
<QItemSection>{{ $t('Show entry report') }}</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
|
@ -12,6 +12,7 @@ import { getUrl } from 'src/composables/getUrl';
|
|||
import axios from 'axios';
|
||||
import FetchedTags from 'src/components/ui/FetchedTags.vue';
|
||||
import VnToSummary from 'src/components/ui/VnToSummary.vue';
|
||||
import EntryDescriptorMenu from './EntryDescriptorMenu.vue';
|
||||
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
@ -147,9 +148,8 @@ async function setEntryData(data) {
|
|||
}
|
||||
|
||||
const fetchEntryBuys = async () => {
|
||||
const { data } = await axios.get(`Entries/${entry.value.id}/getBuys`);
|
||||
if (data) entryBuys.value = data;
|
||||
|
||||
const { data } = await axios.get(`Entries/${entry.value.id}/getBuys`);
|
||||
if (data) entryBuys.value = data;
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -171,6 +171,9 @@ const fetchEntryBuys = async () => {
|
|||
<template #header>
|
||||
<span>{{ entry.id }} - {{ entry.supplier.nickname }}</span>
|
||||
</template>
|
||||
<template #menu="{ entity }">
|
||||
<EntryDescriptorMenu :id="entity.id" />
|
||||
</template>
|
||||
<template #body>
|
||||
<QCard class="vn-one">
|
||||
<router-link
|
||||
|
|
Loading…
Reference in New Issue