v0.11.23 filter schedule list bug fix

This commit is contained in:
2026-03-22 15:17:26 -04:00
parent ca470f1bb6
commit b72ce57544
4 changed files with 10 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "jama-backend",
"version": "0.11.22",
"version": "0.11.23",
"description": "TeamChat backend server",
"main": "src/index.js",
"scripts": {

View File

@@ -13,7 +13,7 @@
# ─────────────────────────────────────────────────────────────
set -euo pipefail
VERSION="${1:-0.11.22}"
VERSION="${1:-0.11.23}"
ACTION="${2:-}"
REGISTRY="${REGISTRY:-}"
IMAGE_NAME="jama"

View File

@@ -1,6 +1,6 @@
{
"name": "jama-frontend",
"version": "0.11.22",
"version": "0.11.23",
"private": true,
"scripts": {
"dev": "vite",

View File

@@ -856,6 +856,9 @@ function ScheduleView({ events, selectedDate, onSelect, filterKeyword='', filter
const today=new Date(); today.setHours(0,0,0,0);
const terms=parseKeywords(filterKeyword);
const hasFilters = terms.length > 0 || !!filterTypeId || filterAvailability;
// Only keyword/availability filters should shift the date window to today-onwards.
// Type filter is for browsing within the current time window, not jumping to future-only.
const hasDateShiftingFilters = terms.length > 0 || filterAvailability;
// Expand recurring events over a wide range (2 years forward)
const farFuture = new Date(today); farFuture.setFullYear(farFuture.getFullYear()+2);
const expandedEvents = expandEvents(events, new Date(y,m,1), farFuture);
@@ -863,14 +866,15 @@ function ScheduleView({ events, selectedDate, onSelect, filterKeyword='', filter
const isCurrentMonth = y === today.getFullYear() && m === today.getMonth();
// from/to logic:
// - filterFromDate set (mini-calendar click): show from that date to end of its month
// - hasFilters (keyword/type/avail): show from today to far future
// - month nav (no filterFromDate, no filters): show full month, including past events in grey
// - keyword/availability filters: show from today to far future (find upcoming matches)
// - type filter only: use normal month window (same events, just filtered by type)
// - no filters: show full month, including past events in grey
let from, to;
if (filterFromDate) {
const fd = new Date(filterFromDate); fd.setHours(0,0,0,0);
from = fd;
to = new Date(fd.getFullYear(), fd.getMonth()+1, 0, 23, 59, 59);
} else if (hasFilters) {
} else if (hasDateShiftingFilters) {
from = today;
to = new Date(9999,11,31);
} else {