6321_negative_tickets #1371

Merged
jsegarra merged 222 commits from 6321_negative_tickets into dev 2025-02-11 09:04:31 +00:00
2 changed files with 40 additions and 14 deletions
Showing only changes of commit db777bec72 - Show all commits

View File

@ -1,12 +1,19 @@
<script setup> <script setup>
import ItemProposal from './ItemProposal.vue'; import ItemProposal from './ItemProposal.vue';
import VnImg from 'src/components/ui/VnImg.vue';
import FetchedTags from 'components/ui/FetchedTags.vue';
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
import { ref } from 'vue'; import { ref } from 'vue';
const emit = defineEmits(['onDialogClosed', 'itemReplaced']);
const popupProxyRef = ref(null); const popupProxyRef = ref(null);
import { useDialogPluginComponent } from 'quasar';
const emit = defineEmits([
'onDialogClosed',
'itemReplaced',
'confirm',
'cancel',
...useDialogPluginComponent.emits,
]);
defineExpose({ show: () => dialogRef.value.show(), hide: () => dialogRef.value.hide() });
const { dialogRef, onDialogHide, onDialogOK, onDialogCancel } =
useDialogPluginComponent();
const $props = defineProps({ const $props = defineProps({
itemLack: { itemLack: {
type: Object, type: Object,
@ -26,14 +33,20 @@ const $props = defineProps({
}); });
</script> </script>
<template> <template>
<QPopupProxy ref="popupProxyRef"> <QDialog
ref="dialogRef"
full-width
transition-show="scale"
transition-hide="scale"
persistent
>
<QCard> <QCard>
<QCardSection class="row items-center q-pb-none"> <QCardSection class="row items-center q-pb-none">
<span class="text-h6 text-grey">{{ $t('Item proposal') }}</span> <span class="text-h6 text-grey">{{ $t('Item proposal') }}</span>
<QSpace /> <QSpace />
<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>
<!-- <VnImg :id="itemLack.id" class="rounded image-wrapper"></VnImg> <!-- <VnImg :id="itemLack.id" class="rounded image-wrapper"></VnImg>
<QBtn flat class="link text-blue"> <QBtn flat class="link text-blue">
{{ itemLack.longName }} {{ itemLack.longName }}
@ -54,5 +67,5 @@ const $props = defineProps({
></ItemProposal ></ItemProposal
></QCardSection> ></QCardSection>
</QCard> </QCard>
</QPopupProxy> </QDialog>
</template> </template>

View File

@ -16,6 +16,8 @@ import VnImg from 'src/components/ui/VnImg.vue';
import TicketLackTable from './TicketLackTable.vue'; import TicketLackTable from './TicketLackTable.vue';
import ItemProposalProxy from 'src/pages/Item/components/ItemProposalProxy.vue'; import ItemProposalProxy from 'src/pages/Item/components/ItemProposalProxy.vue';
import VnPopupProxy from 'src/components/common/VnPopupProxy.vue'; import VnPopupProxy from 'src/components/common/VnPopupProxy.vue';
import { useQuasar } from 'quasar';
const quasar = useQuasar();
const { t } = useI18n(); const { t } = useI18n();
const URL_KEY = 'Tickets/ItemLack'; const URL_KEY = 'Tickets/ItemLack';
@ -107,10 +109,17 @@ function onBuysFetched(data) {
function onTicketLackFetched(data) { function onTicketLackFetched(data) {
itemLack.value = data[0]; itemLack.value = data[0];
} }
const closeDialogs = (refs, evt) => { const showItemProposal = () => {
changeItemDialogRef.value.hide(); quasar
changeQuantityDialogRef.value.hide(); .dialog({
changeStateDialogRef.value.hide(); component: ItemProposalProxy,
componentProps: {
itemLack: itemLack.value,
replaceAction: true,
sales: selectedRows.value,
},
})
.onOk(itemProposalEvt);
}; };
</script> </script>
@ -198,14 +207,18 @@ const closeDialogs = (refs, evt) => {
@click="showProposalDialog = true" @click="showProposalDialog = true"
:disable="selectedRows.length < 1" :disable="selectedRows.length < 1"
> >
<QIcon name="import_export" class="rotate-90"></QIcon> <QIcon
<ItemProposalProxy name="import_export"
class="rotate-90"
@click="showItemProposal"
></QIcon>
<!-- <ItemProposalProxy
ref="proposalDialogRef" ref="proposalDialogRef"
:item-lack="itemLack" :item-lack="itemLack"
:replace-action="true" :replace-action="true"
:sales="selectedRows" :sales="selectedRows"
@item-replaced="itemProposalEvt" @item-replaced="itemProposalEvt"
></ItemProposalProxy> ></ItemProposalProxy> -->
<QTooltip bottom anchor="bottom right"> <QTooltip bottom anchor="bottom right">
{{ t('itemProposal') }} {{ t('itemProposal') }}
</QTooltip> </QTooltip>