v0.11.23 filter schedule list bug fix
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jama-backend",
|
"name": "jama-backend",
|
||||||
"version": "0.11.22",
|
"version": "0.11.23",
|
||||||
"description": "TeamChat backend server",
|
"description": "TeamChat backend server",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
2
build.sh
2
build.sh
@@ -13,7 +13,7 @@
|
|||||||
# ─────────────────────────────────────────────────────────────
|
# ─────────────────────────────────────────────────────────────
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
VERSION="${1:-0.11.22}"
|
VERSION="${1:-0.11.23}"
|
||||||
ACTION="${2:-}"
|
ACTION="${2:-}"
|
||||||
REGISTRY="${REGISTRY:-}"
|
REGISTRY="${REGISTRY:-}"
|
||||||
IMAGE_NAME="jama"
|
IMAGE_NAME="jama"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jama-frontend",
|
"name": "jama-frontend",
|
||||||
"version": "0.11.22",
|
"version": "0.11.23",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -856,6 +856,9 @@ function ScheduleView({ events, selectedDate, onSelect, filterKeyword='', filter
|
|||||||
const today=new Date(); today.setHours(0,0,0,0);
|
const today=new Date(); today.setHours(0,0,0,0);
|
||||||
const terms=parseKeywords(filterKeyword);
|
const terms=parseKeywords(filterKeyword);
|
||||||
const hasFilters = terms.length > 0 || !!filterTypeId || filterAvailability;
|
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)
|
// Expand recurring events over a wide range (2 years forward)
|
||||||
const farFuture = new Date(today); farFuture.setFullYear(farFuture.getFullYear()+2);
|
const farFuture = new Date(today); farFuture.setFullYear(farFuture.getFullYear()+2);
|
||||||
const expandedEvents = expandEvents(events, new Date(y,m,1), farFuture);
|
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();
|
const isCurrentMonth = y === today.getFullYear() && m === today.getMonth();
|
||||||
// from/to logic:
|
// from/to logic:
|
||||||
// - filterFromDate set (mini-calendar click): show from that date to end of its month
|
// - filterFromDate set (mini-calendar click): show from that date to end of its month
|
||||||
// - hasFilters (keyword/type/avail): show from today to far future
|
// - keyword/availability filters: show from today to far future (find upcoming matches)
|
||||||
// - month nav (no filterFromDate, no filters): show full month, including past events in grey
|
// - 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;
|
let from, to;
|
||||||
if (filterFromDate) {
|
if (filterFromDate) {
|
||||||
const fd = new Date(filterFromDate); fd.setHours(0,0,0,0);
|
const fd = new Date(filterFromDate); fd.setHours(0,0,0,0);
|
||||||
from = fd;
|
from = fd;
|
||||||
to = new Date(fd.getFullYear(), fd.getMonth()+1, 0, 23, 59, 59);
|
to = new Date(fd.getFullYear(), fd.getMonth()+1, 0, 23, 59, 59);
|
||||||
} else if (hasFilters) {
|
} else if (hasDateShiftingFilters) {
|
||||||
from = today;
|
from = today;
|
||||||
to = new Date(9999,11,31);
|
to = new Date(9999,11,31);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user