diff --git a/zmscitizenview/src/components/Appointment/AppointmentView.vue b/zmscitizenview/src/components/Appointment/AppointmentView.vue index 910e894221..f54df370f1 100644 --- a/zmscitizenview/src/components/Appointment/AppointmentView.vue +++ b/zmscitizenview/src/components/Appointment/AppointmentView.vue @@ -9,40 +9,70 @@ :active-item="activeStep" @change-step="changeStep" /> - - - - -
- - - - - +
+ +
+
+ +
+ + + + + +
+
+
+ +
+
+ + +
+ + + + + +
+
+ + + + + +
(0); const customerData = ref(new CustomerData("", "", "", "", "")); const appointment = ref(); +const appointmentNotAvailableError = ref(false); const updateAppointmentError = ref(false); +const tooManyAppointmentsWithSameMailError = ref(false); const confirmAppointmentSuccess = ref(false); const confirmAppointmentError = ref(false); @@ -221,7 +254,6 @@ const setServices = () => { }; const nextReserveAppointment = () => { - increaseCurrentView(); reserveAppointment( selectedTimeslot.value, Array.from(selectedServiceMap.value.keys()), @@ -230,8 +262,11 @@ const nextReserveAppointment = () => { ).then((data) => { if ((data as AppointmentDTO).processId !== undefined) { appointment.value = data as AppointmentDTO; + increaseCurrentView(); } else { - // error.value = true; + if ((data as ErrorDTO).errorCode === "appointmentNotAvailable") { + appointmentNotAvailableError.value = true; + } } }); }; @@ -252,7 +287,13 @@ const nextUpdateAppointment = () => { if ((data as AppointmentDTO).processId !== undefined) { appointment.value = data as AppointmentDTO; } else { - updateAppointmentError.value = true; + if ( + (data as ErrorDTO).errorCode === "tooManyAppointmentsWithSameMail" + ) { + tooManyAppointmentsWithSameMailError.value = true; + } else { + updateAppointmentError.value = true; + } } increaseCurrentView(); }); diff --git a/zmscitizenview/src/utils/de-DE.json b/zmscitizenview/src/utils/de-DE.json index e5489d5a2e..fbf9605081 100644 --- a/zmscitizenview/src/utils/de-DE.json +++ b/zmscitizenview/src/utils/de-DE.json @@ -38,11 +38,15 @@ "remarks": "Bemerkungen", "remarkCompletionInstructions": "Sie möchten uns zu Ihrem Termin noch etwas mitteilen? Geben Sie hier an, wenn Sie Hilfe benötigen, auf Übersetzungen angewiesen sind oder sonstige Anliegen haben.", "selectedAppointment": "Ausgewählter Termin", + "selectedDateNoLongerAvailableHeader": "Ihr gewählter Termin ist nicht mehr verfügbar.", + "selectedDateNoLongerAvailableText": "Leider hat inzwischen eine andere Person Ihren gewünschten Termin gebucht. Bitte wählen Sie einen neuen Termin aus.", "service": "Leistung", "serviceSearch": "Bürgerservice-Suche", "telephoneNumber": "Telefonnummer", "termsOfUse": "Einwilligungen", "time": "Zeit", + "tooManyAppointmentsWithSameMailErrorHeader": "Sie haben bereits zu viele Termine gebucht.", + "tooManyAppointmentsWithSameMailErrorText": "Sie können mit Ihrer E-Mail-Adresse höchstens drei Termine auf einmal vereinbaren. Bitte sagen Sie einen anderen Termin ab, bevor Sie einen neuen Termin buchen.", "updateAppointmentErrorHeader": "Terminupdate fehlgeschlagen", "updateAppointmentErrorText": "Terminupdate fehlgeschlagen.", "your": "Ihr", diff --git a/zmscitizenview/src/utils/en-US.json b/zmscitizenview/src/utils/en-US.json index 2d02e5c8cb..97e61e143a 100644 --- a/zmscitizenview/src/utils/en-US.json +++ b/zmscitizenview/src/utils/en-US.json @@ -38,11 +38,15 @@ "remarks": "Remarks", "remarkCompletionInstructions": "Would you like to tell us something else about your appointment? Please indicate here if you need help, require translations or have any other concerns.", "selectedAppointment": "Selected Appointment", + "selectedDateNoLongerAvailableHeader": "Your selected date is no longer available.", + "selectedDateNoLongerAvailableText": "Unfortunately, another person has now booked your desired appointment. Please select a new date.", "service": "Service", "serviceSearch": "Search for citizen services", "telephoneNumber": "Telephone number", "termsOfUse": "Terms of Use", "time": "Zeit", + "tooManyAppointmentsWithSameMailErrorHeader": "You have already booked too many appointments.", + "tooManyAppointmentsWithSameMailErrorText": "You can book a maximum of three appointments at once with your e-mail address. Please cancel another appointment before you book a new one.", "updateAppointmentErrorHeader": "Appointment update failed.", "updateAppointmentErrorText": "Appointment update failed.", "your": "Ihr",