8315-devToTest #1094

Merged
alexm merged 253 commits from 8315-devToTest into test 2024-12-18 10:31:55 +00:00
1 changed files with 18 additions and 10 deletions
Showing only changes of commit a5d032f022 - Show all commits

View File

@ -5,12 +5,10 @@ import qFormMixin from './qformMixin';
import keyShortcut from './keyShortcut'; import keyShortcut from './keyShortcut';
import { i18n } from './i18n'; import { i18n } from './i18n';
import useNotify from 'src/composables/useNotify.js'; import useNotify from 'src/composables/useNotify.js';
import { useStateQueryStore } from 'src/stores/useStateQueryStore';
import VnInput from 'src/components/common/VnInput.vue'; import VnInput from 'src/components/common/VnInput.vue';
import { useVnConfirm } from 'src/composables/useVnConfirm'; import { useVnConfirm } from 'src/composables/useVnConfirm';
const { notify } = useNotify(); const { notify } = useNotify();
const stateQuery = useStateQueryStore();
const { openConfirmationModal } = useVnConfirm(); const { openConfirmationModal } = useVnConfirm();
export default boot(({ app }) => { export default boot(({ app }) => {
@ -53,13 +51,25 @@ export default boot(({ app }) => {
message = 'Duplicate request'; message = 'Duplicate request';
} }
const { config, headers, request, status, statusText, data } = response || {};
const { params, url, method, signal, headers: confHeaders } = config || {};
const { message: resMessage, code, name } = data?.error || {};
const additionalData = { const additionalData = {
frontPath: '', path: location.href,
backError: { message: resMessage,
config: error.config, code,
data: error, request: request?.responseURL,
status,
name,
statusText: statusText,
config: {
url,
method,
params,
headers: confHeaders,
aborted: signal.aborted,
version: headers?.['salix-version'],
}, },
httpRequest: error.request.response,
}; };
const opts = { const opts = {
actions: [ actions: [
@ -72,9 +82,7 @@ export default boot(({ app }) => {
handler: async () => { handler: async () => {
const locale = i18n.global.t; const locale = i18n.global.t;
const reason = ref( const reason = ref(
response.data.error.code == 'ACCESS_DENIED' code == 'ACCESS_DENIED' ? locale('cau.askPrivileges') : ''
? locale('cau.askPrivileges')
: ''
); );
openConfirmationModal( openConfirmationModal(
locale('cau.title'), locale('cau.title'),