feat: update slot types and enhance TypeBadge display
Co-authored-by: Stephan Charles <[email protected]> Co-authored-by: Amelia Hernandez <[email protected]> Co-authored-by: Markus Franz <[email protected]> Co-authored-by: Sabrina Hota <[email protected]> Co-authored-by: Nilüfer Doğan <[email protected]>
This commit is contained in:
1 parent
5f8ded56f6
commit
fad978e9f4
4 files changed
+22
-16
No files matched your search
@@ -11,7 +11,7 @@ import {
|
||||
setPreference,
|
||||
uploadSessionMaterial,
|
||||
} from '../lib/api';
|
||||
import { fmtRange, slotStatus } from '../lib/time';
|
||||
import { capWords, fmtRange, slotStatus } from '../lib/time';
|
||||
import type { Preference, Session } from '../lib/types';
|
||||
import { Sheet, Spinner } from '../components/ui';
|
||||
import { useToast } from '../context/ToastContext';
|
||||
@@ -149,7 +149,7 @@ export function Agenda({ openFeedback }: { openFeedback: (sessionId: string) =>
|
||||
<div className="slot-head">
|
||||
<div className="grow">
|
||||
<div className="name">
|
||||
{slot.name} <span className={`pill slot-type-${slot.type}`}>{slot.type.replace('_', ' ')}</span>
|
||||
{slot.name} <span className={`pill slot-type-${slot.type}`}>{capWords(slot.type)}</span>
|
||||
</div>
|
||||
<div className="time">{fmtRange(slot)}</div>
|
||||
</div>
|
||||
@@ -160,6 +160,7 @@ export function Agenda({ openFeedback }: { openFeedback: (sessionId: string) =>
|
||||
{sessions.map((s) => {
|
||||
const picked = pickFor(slot.id) === s.id;
|
||||
const isMySession = mySpeakerSessions.includes(s.id);
|
||||
const isService = slot.type === 'service_session';
|
||||
return (
|
||||
<button key={s.id} className={`sess ${picked ? 'picked' : ''}`} onClick={() => setSelected(s)}>
|
||||
<div className="grow">
|
||||
@@ -172,7 +173,7 @@ export function Agenda({ openFeedback }: { openFeedback: (sessionId: string) =>
|
||||
{s.material_path && <span style={{ marginLeft: 6 }}>📎</span>}
|
||||
</div>
|
||||
</div>
|
||||
<span className="check">✓</span>
|
||||
{!isService && <span className="check">✓</span>}
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
@@ -224,12 +225,18 @@ export function Agenda({ openFeedback }: { openFeedback: (sessionId: string) =>
|
||||
You weren’t checked in to this session.
|
||||
</div>
|
||||
)}
|
||||
<button
|
||||
className={`btn ${pickFor(selected.slot_id) === selected.id ? 'danger' : 'primary'}`}
|
||||
onClick={() => togglePick(selected.slot_id, selected.id)}
|
||||
>
|
||||
{pickFor(selected.slot_id) === selected.id ? 'Remove my pick' : 'Pick this session'}
|
||||
</button>
|
||||
{selSlot.type === 'service_session' ? (
|
||||
<div className="muted small" style={{ textAlign: 'center' }}>
|
||||
No pick needed for this slot.
|
||||
</div>
|
||||
) : (
|
||||
<button
|
||||
className={`btn ${pickFor(selected.slot_id) === selected.id ? 'danger' : 'primary'}`}
|
||||
onClick={() => togglePick(selected.slot_id, selected.id)}
|
||||
>
|
||||
{pickFor(selected.slot_id) === selected.id ? 'Remove my pick' : 'Pick this session'}
|
||||
</button>
|
||||
)}
|
||||
{/* Material download (all attendees) — pinned to the bottom. */}
|
||||
{selected.material_path && (
|
||||
<a className="btn primary" href={sessionMaterialUrl(selected.material_path)} target="_blank" rel="noreferrer">
|
||||
|
||||
Reference in new issue
Block a user