diff --git a/src/boot/quasar.js b/src/boot/quasar.js index a1991d9a4..b3fb62ee7 100644 --- a/src/boot/quasar.js +++ b/src/boot/quasar.js @@ -62,6 +62,8 @@ export default boot(({ app }) => { httpRequest: error.request.response, }; + const isErrorPrivaleges = response?.code == 'ACCESS_DENIED'; + const opts = { actions: [ { @@ -70,30 +72,36 @@ export default boot(({ app }) => { dense: true, flat: false, round: true, - noDismiss: true, + noDismiss: isErrorPrivaleges, handler: async () => { - const reason = ref(); - openConfirmationModal( - i18n.global.t('globals.sendCau'), - false, - async () => { - await axios.post('OsTickets/send-to-support', { - reason: reason.value, - additionalData, - }); - }, - null, - { - component: VnInput, - props: { - modelValue: reason, - 'onUpdate:modelValue': (val) => (reason.value = val), - label: i18n.global.t('globals.ExplainReason'), - class: 'full-width', - required: true, + if (isErrorPrivaleges) { + // Create message and send to support + console.log('QUIERO ACCEDER!!!'); + } else { + const reason = ref(); + openConfirmationModal( + i18n.global.t('globals.sendCau'), + false, + async () => { + await axios.post('OsTickets/send-to-support', { + reason: reason.value, + additionalData, + }); }, - } - ); + null, + { + component: VnInput, + props: { + modelValue: reason, + 'onUpdate:modelValue': (val) => + (reason.value = val), + label: i18n.global.t('globals.ExplainReason'), + class: 'full-width', + required: true, + }, + } + ); + } }, }, ],