From f7c9da6ad156d6b4f374c4228202e23d1ae3d331 Mon Sep 17 00:00:00 2001 From: joan Date: Thu, 9 Mar 2023 14:59:10 +0100 Subject: [PATCH] Updated SMS component --- src/App.vue | 5 + src/components/common/VnSmsDialog.vue | 91 +++++++-- src/components/ui/CardDescriptor.vue | 6 +- src/pages/Ticket/Card/TicketDescriptor.vue | 33 +++- .../Ticket/Card/TicketDescriptorMenu.vue | 179 ++++++++++-------- 5 files changed, 212 insertions(+), 102 deletions(-) diff --git a/src/App.vue b/src/App.vue index 4f1394559..b928491a3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -44,6 +44,11 @@ function responseError(error) { let message = error.message; let logOut = false; + const response = error.response; + if (response && response.data.error) { + message = response.data.error.message; + } + switch (error.response?.status) { case 401: message = 'login.loginError'; diff --git a/src/components/common/VnSmsDialog.vue b/src/components/common/VnSmsDialog.vue index f0a782489..acfb704d6 100644 --- a/src/components/common/VnSmsDialog.vue +++ b/src/components/common/VnSmsDialog.vue @@ -1,5 +1,5 @@