From 3cd29e7d64422c28de82c18dc878c8a8b6e869b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= <14975046+skjnldsv@users.noreply.github.com> Date: Thu, 26 Nov 2026 22:09:03 +0100 Subject: [PATCH] fix(holidays): open on one's own region for HR too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Public holidays page opened on one's own days for everyone but HR, who always landed on all regions. HR members with a region code now open on their own days too; all regions are one pick away. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com> --- SPECIFICATION.md | 4 ++-- src/views/HolidaysView.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SPECIFICATION.md b/SPECIFICATION.md index 3d2c5702..fb2533d1 100644 --- a/SPECIFICATION.md +++ b/SPECIFICATION.md @@ -1084,8 +1084,8 @@ days; a country does not get its regions' days. Everyone can read the list. The page opens on the viewer's own days (their code, its country and `*`) when they have a region code, and says which those are; without one it -links to the profile to set it. HR, who keep the list for every region, open on all -regions with the rule itself. Days already past in the shown year are muted. +links to the profile to set it. HR, who keep the list for every region, open on their own +days as well when they have a code, and on all regions with the rule itself without one. Days already past in the shown year are muted. HR always edits the list, and HR or an admin can let every employee (§2.2) add, edit and delete single holidays, so HR does not become a bottleneck. That switch lives in the *Public holidays* section of the Settings page (§12); the *Public diff --git a/src/views/HolidaysView.vue b/src/views/HolidaysView.vue index c5b7fdc0..c256aa32 100644 --- a/src/views/HolidaysView.vue +++ b/src/views/HolidaysView.vue @@ -322,8 +322,8 @@ const mine = computed(() => (ownCode.value ? { id: 'mine', label: t('absence', 'Your holidays ({code})', { code: ownCode.value }), code: ownCode.value, mine: true } : null)) -// HR keeps the list for every region; everyone else opens on their own days -const region = shallowRef((!session.value.isHr && mine.value) || all) +// Opens on one's own days when a region is set, HR included: "All regions" is one pick away +const region = shallowRef(mine.value ?? all) const form = ref(null) const saving = ref(false) // The holiday whose deletion waits for a confirmation