From 132608ace2acbd84ab59c14691f01a42bc041c6b Mon Sep 17 00:00:00 2001 From: Thomas Fink <53316058+ThomasAFink@users.noreply.github.com> Date: Thu, 9 Jan 2025 11:57:24 +0100 Subject: [PATCH] Next into test (#758) * zms-2871-2874-minus-deletion-by-location-delete-and-orthography-mail-and-notification-buttons * fix(deps): update dependency phpoffice/phpspreadsheet to v1.29.6 (#738) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency squizlabs/php_codesniffer to v3.11.2 (#751) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency sass to v1.83.0 (#750) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency phpoffice/phpspreadsheet to v1.29.7 (#752) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency phpspec/prophecy-phpunit to v2.3.0 (#647) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(ZMS-3500) Differentiate between editing and booking a new appointment when selecting the date (#757) --------- Co-authored-by: matthias1996 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: MoDaae <90261750+MoDaae@users.noreply.github.com> --- zmsadmin/js/page/workstation/index.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/zmsadmin/js/page/workstation/index.js b/zmsadmin/js/page/workstation/index.js index 8efc94934..c7467f551 100644 --- a/zmsadmin/js/page/workstation/index.js +++ b/zmsadmin/js/page/workstation/index.js @@ -121,7 +121,13 @@ class View extends BaseView { if ('counter' == this.page) this.loadQueueInfo(); this.loadQueueTable(); - this.loadAppointmentForm(true, false); + if (this.selectedProcess) { + // Editing an existing appointment -> full reload + this.loadAppointmentForm(true, false); + } else { + // Creating a new appointment -> partial reload + this.loadAppointmentForm(true, true); + } } addFocusTrap(elem) { @@ -426,10 +432,10 @@ class View extends BaseView { onPrintProcessMail(event) { stopEvent(event); this.selectedProcess = $(event.currentTarget).data('id'); - + // URL for mail_confirmation.twig const url = `${this.includeUrl}/process/queue/?print=1&printType=mail&selectedprocess=${this.selectedProcess}`; - + // Ajax request to get content from mail_confirmation.twig $.ajax({ url: url,