diff --git a/src/pages/Customer/Notifications/CustomerNotifications.vue b/src/pages/Customer/Notifications/CustomerNotifications.vue index 211309dc1..d19b52c2c 100644 --- a/src/pages/Customer/Notifications/CustomerNotifications.vue +++ b/src/pages/Customer/Notifications/CustomerNotifications.vue @@ -1,10 +1,7 @@ @@ -117,8 +97,8 @@ const refreshData = async () => { - + + (rows = data)" @@ -133,15 +113,11 @@ const refreshData = async () => { - - {{ t('Campaign consumption') }} - + diff --git a/src/pages/Customer/Notifications/CustomerNotificationsCampaignConsumption.vue b/src/pages/Customer/Notifications/CustomerNotificationsCampaignConsumption.vue index 641cdb851..d168aed6c 100644 --- a/src/pages/Customer/Notifications/CustomerNotificationsCampaignConsumption.vue +++ b/src/pages/Customer/Notifications/CustomerNotificationsCampaignConsumption.vue @@ -2,7 +2,6 @@ import { ref, reactive } from 'vue'; import { useI18n } from 'vue-i18n'; import axios from 'axios'; -import { useDialogPluginComponent } from 'quasar'; import useNotify from 'src/composables/useNotify'; import { useValidator } from 'src/composables/useValidator'; import VnRow from 'components/ui/VnRow.vue'; @@ -19,23 +18,24 @@ const $props = defineProps({ type: Function, required: true, }, + selectedRows: { + type: Boolean, + }, }); -const { dialogRef } = useDialogPluginComponent(); const { notify } = useNotify(); const { t } = useI18n(); const validationsStore = useValidator(); const campaignParams = reactive({}); const moreFields = ref([]); -async function onSubmit() { +const onSubmit = async () => { try { const data = { - clients: $props.clients._value.map((item) => item.id), - from: this.campaignParams.from, - to: this.campaignParams.to, + clients: $props.clients.map((item) => item.id), + from: campaignParams.from, + to: campaignParams.to, }; - const params = JSON.stringify(data); await axios.post('ClientConsumptionQueues', { params }); @@ -43,7 +43,7 @@ async function onSubmit() { } catch (error) { notify(error.message, 'negative'); } -} +}; onMounted(async () => { const { models } = validationsStore; const properties = models.Item?.properties || {}; @@ -68,44 +68,41 @@ onMounted(async () => { :filter="{ fields: ['id', 'code', 'dated'], order: 'code ASC', limit: 30 }" auto-load /> - - - - - - {{ t('Campaign consumption') }} - - - - - - - - - - - - - - - - + + + + {{ t('Campaign consumption') }} + + + + + + + + + + + + + + {{ t('Campaign consumption') }} +