zmiany w sablonach i poprawki w ocr

This commit is contained in:
Mateusz Gruszczyński
2025-07-25 10:42:07 +02:00
parent 34205f0e65
commit 0d5b170cac
6 changed files with 173 additions and 148 deletions

View File

@@ -354,7 +354,7 @@ function renderItem(item, isShare = window.IS_SHARE, showEditOnly = false) {
if (item.added_by && item.owner_id && item.added_by_id && item.added_by_id !== item.owner_id) {
const infoEl = document.createElement('small');
infoEl.className = 'text-info ms-4';
infoEl.innerHTML = `[Dodane przez: <b>${item.added_by}</b>]`;
infoEl.innerHTML = `[Dodał/a: <b>${item.added_by}</b>]`;
li.querySelector('.d-flex.align-items-center')?.appendChild(infoEl);
}

View File

@@ -101,3 +101,28 @@ document.addEventListener('DOMContentLoaded', () => {
});
}
});
document.addEventListener("DOMContentLoaded", function () {
const toggleBtn = document.getElementById("toggleAllCheckboxes");
let allChecked = false;
toggleBtn?.addEventListener("click", () => {
const checkboxes = document.querySelectorAll(".list-checkbox");
allChecked = !allChecked;
checkboxes.forEach(cb => {
cb.checked = allChecked;
});
toggleBtn.textContent = allChecked ? "🚫 Odznacz wszystkie" : "✅ Zaznacz wszystkie";
});
});
document.getElementById("applyCustomRange")?.addEventListener("click", () => {
const start = document.getElementById("customStart")?.value;
const end = document.getElementById("customEnd")?.value;
if (start && end) {
const url = `/user_expenses?start_date=${start}&end_date=${end}`;
window.location.href = url;
}
});