From 0ffdb5cc0eb3357ac279c16a686e80c711e5fb75 Mon Sep 17 00:00:00 2001 From: Sam MacLennan Date: Tue, 12 Dec 2023 11:02:50 +1100 Subject: [PATCH 1/4] Fix getBlockPrefix function to resolve Overtime_by_user view --- Form/OvertimeByUserForm.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Form/OvertimeByUserForm.php b/Form/OvertimeByUserForm.php index afb6777..f813a96 100644 --- a/Form/OvertimeByUserForm.php +++ b/Form/OvertimeByUserForm.php @@ -19,12 +19,10 @@ class OvertimeByUserForm extends AbstractType { /** * Simplify cross linking between pages by removing the block prefix. - * - * @return null|string */ public function getBlockPrefix(): string { - return null; + return ''; } /** From 9a9622b08b4532a22e1cc11d2982116683286bbf Mon Sep 17 00:00:00 2001 From: Sam MacLennan Date: Tue, 12 Dec 2023 11:44:00 +1100 Subject: [PATCH 2/4] Add translations for some nonexistant labels --- Resources/translations/messages.de.xliff | 12 ++++++++++++ Resources/translations/messages.en.xliff | 12 ++++++++++++ Resources/translations/messages.hr.xliff | 12 ++++++++++++ 3 files changed, 36 insertions(+) diff --git a/Resources/translations/messages.de.xliff b/Resources/translations/messages.de.xliff index 4dfb8bd..c4a86d4 100644 --- a/Resources/translations/messages.de.xliff +++ b/Resources/translations/messages.de.xliff @@ -477,6 +477,18 @@ label.overtime Überstunden + + label.user + Benutzer + + + label.date + Datum + + + label.duration + Dauer + description.overtime_history diff --git a/Resources/translations/messages.en.xliff b/Resources/translations/messages.en.xliff index af22b65..30126ef 100644 --- a/Resources/translations/messages.en.xliff +++ b/Resources/translations/messages.en.xliff @@ -477,6 +477,18 @@ label.overtime Overtime + + label.user + User + + + label.date + User + + + label.duration + Duration + description.overtime_history diff --git a/Resources/translations/messages.hr.xliff b/Resources/translations/messages.hr.xliff index 18818ad..d816e99 100644 --- a/Resources/translations/messages.hr.xliff +++ b/Resources/translations/messages.hr.xliff @@ -469,6 +469,18 @@ label.overtime Tijekom vremena + + label.user + Korisnik + + + label.date + Datum + + + label.duration + Trajanje + description.overtime_history From 4f42c15651184e35839f6f71b7d9c81c7f14f11c Mon Sep 17 00:00:00 2001 From: Sam MacLennan Date: Tue, 12 Dec 2023 12:37:13 +1100 Subject: [PATCH 3/4] Fix 'Reject' button having no action --- Resources/views/report_by_user.html.twig | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Resources/views/report_by_user.html.twig b/Resources/views/report_by_user.html.twig index b79ec04..6023c6f 100644 --- a/Resources/views/report_by_user.html.twig +++ b/Resources/views/report_by_user.html.twig @@ -316,12 +316,22 @@ window.location.href = '{{ path('not_approved',{'approveId':approveId,'user':user.id,'date':current|date('Y-m-d')}) }}'.replace(/&/g,'&'); } } + function denyAction() { + if (confirm('{{ 'label.undoMessage'|trans }}'.replace(/"/g,'"')) === true) { + window.location.href = '{{ path('denied',{'approveId':approveId,'user':user.id,'date':current|date('Y-m-d')}) }}'.replace(/&/g,'&'); + } + } let undoButton = document.getElementById("undoButton"); if (undoButton) { undoButton.addEventListener("click", undoAction); } + let deniedButton = document.getElementById("deniedButton"); + if (deniedButton) { + deniedButton.addEventListener("click", denyAction); + } + {% endblock %} From 15a02405fbc223fb681a2ffa18cb822c43b988c0 Mon Sep 17 00:00:00 2001 From: Sam MacLennan Date: Tue, 12 Dec 2023 13:16:33 +1100 Subject: [PATCH 4/4] Fix 'Delete' button in overtime & workday adjustements view having no action --- Resources/views/settings_overtime_history.html.twig | 4 ++-- Resources/views/settings_workday_history.html.twig | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Resources/views/settings_overtime_history.html.twig b/Resources/views/settings_overtime_history.html.twig index 1cbd9e9..35db4ed 100644 --- a/Resources/views/settings_overtime_history.html.twig +++ b/Resources/views/settings_overtime_history.html.twig @@ -35,7 +35,7 @@ {% set deleteLinkPath = path('delete_overtime_history', {'entryId': entry.id }) %} @@ -81,7 +81,7 @@ $("#deleteMessage").hide(); } }); - }); + }); {% endblock %} diff --git a/Resources/views/settings_workday_history.html.twig b/Resources/views/settings_workday_history.html.twig index fd061ad..9ac2ee4 100644 --- a/Resources/views/settings_workday_history.html.twig +++ b/Resources/views/settings_workday_history.html.twig @@ -56,7 +56,7 @@ {% set deleteLinkPath = path('delete_workday_history', {'entryId': entry.id }) %}