/** * Shared models for the reusable Credit Selection dialog. * * The dialog is generic and feature-agnostic: all display text is supplied by * the calling feature library (e.g. attendance, attendees) via MAT_DIALOG_DATA, * so this presentation-layer component never depends on any feature's constants. */ /** * A single selectable meeting option shown in the credit-selection dialog. * Represents either the prior (credit-holding) meeting or the target meeting * being attended, as returned per timeslot by the backend credit prompt. */ export interface CreditSelectionMeetingOption { meetingId: string; meetingName: string; } /** * A single timeslot the user must resolve credit for. Contains the prior * (credit-holding) meeting and the target meeting being attended. The user * picks exactly one of these two per timeslot. * Mirrors creditSelectionPrompt.timeslotOptions[] from the attendance log-in APIs. */ export interface CreditSelectionTimeslotOption { timeslotId: string; timeslotName: string; priorMeeting: CreditSelectionMeetingOption; targetMeeting: CreditSelectionMeetingOption; } /** * The creditSelectionPrompt object returned by Pass 1 of the attendance log-in * APIs. When present (non-null), the credit-selection dialog must be shown * before the attendance can be finalized (Pass 2). */ export interface CreditSelectionPrompt { eventId: string; timeslotOptions: CreditSelectionTimeslotOption[]; } /** * Data passed to the CreditSelectionComponent via MAT_DIALOG_DATA. * All text is provided by the caller so the component stays generic. */ export interface CreditSelectionData { /** Timeslots the user must resolve, each with prior/target meeting options. */ timeslotOptions: CreditSelectionTimeslotOption[]; /** Dialog title. */ title: string; /** First instruction paragraph (context — why credit must be chosen). */ messageLine1: string; /** Second instruction paragraph (the actual "please select" prompt). */ messageLine2: string; /** Save button label. */ saveLabel: string; /** Accessibility label for each timeslot's radio group. */ meetingOptionAriaLabel: string; } /** * One credit selection the user made — which meeting should receive credit for * a given timeslot. Sent in Pass 2 as creditSelections[]. */ export interface CreditSelectionEntry { timeslotId: string; creditedMeetingId: string; } /** * Result returned by CreditSelectionComponent when the user clicks Save. * Contains one entry per timeslot. */ export interface CreditSelectionResult { creditSelections: CreditSelectionEntry[]; }