diff --git a/src/pages/Item/components/ItemProposal.vue b/src/pages/Item/components/ItemProposal.vue index d326a7d98..8206c0fa9 100644 --- a/src/pages/Item/components/ItemProposal.vue +++ b/src/pages/Item/components/ItemProposal.vue @@ -8,6 +8,7 @@ import { useSession } from 'src/composables/useSession'; import VnLv from 'src/components/ui/VnLv.vue'; import { toCurrency } from 'filters/index'; import VnStockValueDisplay from 'src/components/ui/VnStockValueDisplay.vue'; +import { useDialogPluginComponent } from 'quasar'; const MATCH_VALUES = [5, 6, 7, 8]; const { t } = useI18n(); @@ -156,8 +157,7 @@ const columns = computed(() => [ }, ]); async function confirm() { - console.log(''); - quantity.value = 0; + // console.log(''); // const response = { address: address.value }; // if (props.promise) { // isLoading.value = true; @@ -170,7 +170,18 @@ async function confirm() { // isLoading.value = false; // } // } - // onDialogOK(response); + // onDialogOK({ data: true }); + dialogRef.value.hide({ type: 'refresh', itemProposal: proposalSelected.value[0] }); +} +const { dialogRef, onDialogOK, onDialogCancel } = useDialogPluginComponent(); + +// Definir el emisor de eventos +const emit = defineEmits(['dialogClosed']); + +function onDialogClose() { + console.log('Dialog has been closed'); + // Emitir el evento personalizado + emit('dialogClosed', { data: true }); }