user's event save is fixed.

This commit is contained in:
2026-03-28 21:45:32 -04:00
parent 36e1be8f40
commit f4dfa6eeca
2 changed files with 11 additions and 1 deletions

View File

@@ -555,7 +555,8 @@ function EventForm({ event, userGroups, eventTypes, selectedDate, onSave, onCanc
const [desc,setDesc]=useState(event?.description||'');
const [pub,setPub]=useState(event?!!event.is_public:!!isToolManager);
const [track,setTrack]=useState(!!event?.track_availability);
const [grps,setGrps]=useState(new Set((event?.user_groups||[]).map(g=>g.id)));
const accessibleGroupIds = new Set(userGroups.map(g=>g.id));
const [grps,setGrps]=useState(new Set((event?.user_groups||[]).map(g=>g.id).filter(id=>isToolManager||accessibleGroupIds.has(id))));
const [saving,setSaving]=useState(false);
const [showTypeForm,setShowTypeForm]=useState(false);
const [localTypes,setLocalTypes]=useState(eventTypes);