Add a nice cleanup of holidayUtils.js

This commit is contained in:
Zachary
2024-11-22 20:16:01 +01:00
parent f9dc40a857
commit 44762113e8
3 changed files with 134 additions and 286 deletions
+11 -11
View File
@@ -253,6 +253,7 @@
$: visibleHolidaysCount = holidays.filter(h => !h.hidden).length;
function toggleWeekendDay(dayNumber: number) {
console.log('Toggling weekend day:', dayNumber);
if (weekendDays.includes(dayNumber)) {
weekendDays = weekendDays.filter(d => d !== dayNumber);
} else {
@@ -554,7 +555,6 @@
.content-box li {
display: flex;
align-items: center;
margin-bottom: 10px;
}
.content-box button {
@@ -603,7 +603,7 @@
justify-content: space-between;
padding: 8px;
border-radius: 4px;
gap: 10px;
gap: 5px;
}
.holidays-list li:hover {
@@ -710,15 +710,6 @@
<div class="content-box" id="calendar">
<div class="calendar-key">
<div class="key-item">
<div class="key-label">
<span class="color-box weekend"></span>
<span>Weekend</span>
</div>
<a href="#" on:click|preventDefault={() => showWeekendSettings = !showWeekendSettings} class="edit-link">
(edit)
</a>
</div>
<div class="key-item">
<div class="key-label">
<span class="color-box optimized"></span>
@@ -736,6 +727,15 @@
</a>
{/if}
</div>
<div class="key-item">
<div class="key-label">
<span class="color-box weekend"></span>
<span>Weekend</span>
</div>
<a href="#" on:click|preventDefault={() => showWeekendSettings = !showWeekendSettings} class="edit-link">
(edit)
</a>
</div>
</div>
{#if showHolidaysList || showWeekendSettings}