v0.9.80 filter fixes

This commit is contained in:
2026-03-18 15:59:14 -04:00
parent 58e0607e4c
commit de22432cc5
5 changed files with 9 additions and 11 deletions

View File

@@ -10,7 +10,7 @@
PROJECT_NAME=jama PROJECT_NAME=jama
# Image version to run (set by build.sh, or use 'latest') # Image version to run (set by build.sh, or use 'latest')
JAMA_VERSION=0.9.79 JAMA_VERSION=0.9.80
# App port — the host port Docker maps to the container # App port — the host port Docker maps to the container
PORT=3000 PORT=3000

View File

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

View File

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

View File

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

View File

@@ -712,12 +712,10 @@ 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; const hasFilters = terms.length > 0 || !!filterTypeId;
// Always show from today forward (desktop and mobile). // No filters: show selected month only (desktop and mobile — month nav arrows control the month).
// Desktop: when no filters, restrict to selected month for browsing context. // Filters active: show today + all future on both platforms.
// Mobile: always from today forward regardless of filters. const from = hasFilters ? today : new Date(y,m,1);
// With any filter active: always today+future on both platforms. const to = hasFilters ? new Date(9999,11,31) : new Date(y,m+1,0,23,59,59);
const from = (hasFilters || isMobile) ? today : new Date(y,m,1);
const to = (hasFilters || isMobile) ? new Date(9999,11,31) : new Date(y,m+1,0,23,59,59);
const filtered=events.filter(e=>{ const filtered=events.filter(e=>{
const s=new Date(e.start_at); const s=new Date(e.start_at);
if(s<from||s>to) return false; if(s<from||s>to) return false;
@@ -728,7 +726,7 @@ function ScheduleView({ events, selectedDate, onSelect, filterKeyword='', filter
} }
return true; return true;
}); });
const emptyMsg = hasFilters ? 'No events match your filters' : isMobile ? 'No upcoming events' : `No events in ${MONTHS[m]} ${y}`; const emptyMsg = hasFilters ? 'No events match your filters' : `No events in ${MONTHS[m]} ${y}`;
if(!filtered.length) return <div style={{textAlign:'center',padding:'60px 20px',color:'var(--text-tertiary)',fontSize:14}}>{emptyMsg}</div>; if(!filtered.length) return <div style={{textAlign:'center',padding:'60px 20px',color:'var(--text-tertiary)',fontSize:14}}>{emptyMsg}</div>;
return <>{filtered.map(e=>{const s=new Date(e.start_at);const col=e.event_type?.colour||'#9ca3af'; return <>{filtered.map(e=>{const s=new Date(e.start_at);const col=e.event_type?.colour||'#9ca3af';
// Desktop: original pre-v0.9.64 sizes. Mobile: compact sizes from v0.9.64 // Desktop: original pre-v0.9.64 sizes. Mobile: compact sizes from v0.9.64