feat: message to grant access
gitea/salix-front/pipeline/pr-dev This commit looks good Details

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,
};
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,
},
}
);
}
},
},
],