0
0
Fork 0

feat: message to grant access

This commit is contained in:
Jorge Penadés 2024-11-05 09:33:16 +01:00
parent 3ca26a97dc
commit f6d200405c
1 changed files with 30 additions and 22 deletions

View File

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