From 468ce507cadb7cedd3ef410e8bc618b3959ce3c7 Mon Sep 17 00:00:00 2001 From: Okke Harsta Date: Fri, 5 Apr 2024 17:00:22 +0200 Subject: [PATCH] Change error handling and screen --- client/src/icons/undraw_access_denied_422.svg | 48 +++++++++++++++++++ client/src/locale/en.js | 21 ++++---- client/src/locale/nl.js | 27 +++++------ client/src/routes/Intake.svelte | 34 +++++++------ client/src/routes/Offering.svelte | 32 ++++++++----- client/src/routes/PlayGround.svelte | 2 +- client/src/utils/forms.js | 18 +++++++ .../java/broker/api/BrokerController.java | 2 +- 8 files changed, 131 insertions(+), 53 deletions(-) create mode 100644 client/src/icons/undraw_access_denied_422.svg create mode 100644 client/src/utils/forms.js diff --git a/client/src/icons/undraw_access_denied_422.svg b/client/src/icons/undraw_access_denied_422.svg new file mode 100644 index 0000000..b80de7c --- /dev/null +++ b/client/src/icons/undraw_access_denied_422.svg @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/client/src/locale/en.js b/client/src/locale/en.js index d84712a..9c294ec 100644 --- a/client/src/locale/en.js +++ b/client/src/locale/en.js @@ -45,9 +45,6 @@ I18n.translations.en = { error: "Something went wrong...", errorTitle: "Provided details from {{abbreviation}}", noResultErrorMessage: "No details were disclosed.", - notFoundResultErrorMessage: "Your personal information could not be retrieved from {{institution}}", - conflictResultErrorMessage: "Your session was lost. Please try again.", - timeOutResultErrorMessage: "Institution {{institution}} took too long to respond. Please check if you received a confirmation of your registration via email within 10 minutes. If not, please try registering again later. If the problem persists, please check the information on your university's minor website on what to do.", almost: "Almost there, one more thing!", questions: "There are some extra questions", questionsDetail: "To finalise your enrolment for this specific course, some extra questions need to be answered", @@ -89,19 +86,21 @@ I18n.translations.en = { surfLink: "See eduXchange for help.", expired: "The enrollment has expired", offering: "The course information could not be retrieved from {{name}}", - 400: "Backend error",//Invalid guest or home schachome - 404: "Your personal information could not be found at {{name}}",//404 person endpoint - 409: "The queue-session validation failed",//queue-it validation error - 412: "Your session was lost. Please try again",//invalid enrollmentRequest - 417: "Your session was lost. Please try again",//tokenrequest failed + 400: "Backend error.",//Invalid guest or home schachome + 404: "Your personal information could not be retrieved from {{homeInstitution}}.",//404 person endpoint + 407: "The queue-session validation failed",//queue-it validation error + 408: "Institution {{guestInstitution}} t ok too long to respond. Please check if you received a confirmation of your registration via email within 10 minutes. If not, please try registering again later. If the problem persists, please check the information on your university's minor website on what to do.", + 409: "Your session was lost. Please try again.",//conflict + 412: "Your session was lost. Please try again.",//invalid enrollmentRequest + 417: "Your session was lost. Please try again.",//tokenrequest failed 419: "Backend error",//eduID not present in the ARP - 422: "There is an administrative reason why you can not be enrolled", + 422: "There is an administrative reason why you can not be enrolled.", reference: "Your reference number is {{reference}}.", unknown: "", supportLink: "https://eduxchange.nl/all/help", generic: "Please try again later. If the problem persists, " + - " contact the student administration for more information", - noRetry: "You can contact the student administration for more information" + " contact the student administration for more information.", + noRetry: "You can contact the student administration for more information." }, explanation: { title: "How does enrolling work?", diff --git a/client/src/locale/nl.js b/client/src/locale/nl.js index 14fd275..b50dc76 100644 --- a/client/src/locale/nl.js +++ b/client/src/locale/nl.js @@ -45,9 +45,6 @@ I18n.translations.nl = { error: "Er is iets fout gegaan...", errorTitle: "Details van {{abbreviation}}", noResultErrorMessage: "Er is helaas niet meer informatie.", - notFoundResultErrorMessage: "Jouw persoonlijke gegevens konden niet worden opgehaald bij {{institution}}", - conflictResultErrorMessage: "Je sessie is verloren gegaan. Probeer het nogmaals.", - timeOutResultErrorMessage: "De server van {{institution}} deed er te lang over om te reageren. Check of je binnen 10 minuten een bevestiging van je aanmelding via e-mail hebt ontvangen. Zo niet, probeer je dan later opnieuw aan te melden. Als het probleem aanhoudt, kijk dan op de minorwebsite van je universiteit wat je moet doen. ", almost: "Bijna klaar, nog één ding!", questions: "Er zijn extra vragen", questionsDetail: "Om je inschrijving definitief te maken, moet je nog wat extra vragen beantwoorden", @@ -87,21 +84,23 @@ I18n.translations.nl = { info: "Er is een onverwachte fout opgetreden.", subInfo: " De informatie die we op dit moment met je kunnen delen is:", surfLink: "Ga naar eduXchange voor hulp.", - expired: "De aanmelding is verlopen", - offering: "De informatie kon niet opgehaald worden bij {{name}}", - 400: "Backend error",//Invalid guest or home schachome - 404: "Je gegevens zijn niet gevonden worden bij {{name}}",//404 person endpoint - 409: "De wachtrij sessie validatie is mislukt",//queue-it validation error - 412: "Je sessie is verloren gegaan. Probeer het opnieuw",//invalid enrollmentRequest - 417: "Je sessie is verloren gegaan. Probeer het opnieuw",//tokenrequest failed - 419: "Backend error",//eduID not present in the ARP - 422: "Er is een administratieve reden waarom je niet kon worden ingeschreven", + expired: "De aanmelding is verlopen.", + offering: "De informatie kon niet opgehaald worden bij {{name}}.", + 400: "Backend error.",//Invalid guest or home schachome + 404: "Jouw persoonlijke gegevens konden niet worden opgehaald bij {{homeInstitution}}.",//404 person endpoint + 407: "De wachtrij sessie validatie is mislukt.",//queue-it validation error + 408: "De server van {{institution}} deed er te lang over om te reageren. Check of je binnen 10 minuten een bevestiging van je aanmelding via e-mail hebt ontvangen. Zo niet, probeer je dan later opnieuw aan te melden. Als het probleem aanhoudt, kijk dan op de minorwebsite van je universiteit wat je moet doen.", + 409: "Je sessie is verloren gegaan. Probeer het nogmaals.", + 412: "Je sessie is verloren gegaan. Probeer het opnieuw.",//invalid enrollmentRequest + 417: "Je sessie is verloren gegaan. Probeer het opnieuw.",//tokenrequest failed + 419: "Backend error.",//eduID not present in the ARP + 422: "Er is een administratieve reden waarom je niet kon worden ingeschreven.", reference: "Je referentienummer is {{reference}}.", unknown: "", supportLink: "https://eduxchange.nl/nl/all/help", generic: "Probeer het nogmaals. Als het probleem zich voor blijft doen, " + - " neem contact op met de student administratie voor meer informatie", - noRetry: "Je kan contact opnemen met de student administratie voor meer informatie" + " neem contact op met de student administratie voor meer informatie.", + noRetry: "Je kan contact opnemen met de student administratie voor meer informatie." }, explanation: { title: "Hoe werkt aanmelden?", diff --git a/client/src/routes/Intake.svelte b/client/src/routes/Intake.svelte index eb74025..5e459b9 100644 --- a/client/src/routes/Intake.svelte +++ b/client/src/routes/Intake.svelte @@ -1,22 +1,28 @@