@ieeesa-npm/dashboard 0.0.0-stage → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -3
- package/esm2022/ieeesa-npm-dashboard.mjs +5 -0
- package/esm2022/lib/assets/constants.json +158 -0
- package/esm2022/lib/assets/dashboard-mock.mjs +221 -0
- package/esm2022/lib/assets/dashboard-route-paths.mock.mjs +14 -0
- package/esm2022/lib/assets/dashboard-user-permissions.mock.mjs +23 -0
- package/esm2022/lib/assets/date-formats.mjs +28 -0
- package/esm2022/lib/components/event-group-card/event-group-card.component.mjs +414 -0
- package/esm2022/lib/components/meeting-attendance-row/meeting-attendance-row.component.mjs +182 -0
- package/esm2022/lib/components/member-level-badge/member-level-badge.component.mjs +79 -0
- package/esm2022/lib/components/upcoming-meetings-events/upcoming-meetings-events.component.mjs +261 -0
- package/esm2022/lib/components/welcome-header/dashboard-welcome-header.component.mjs +151 -0
- package/esm2022/lib/components/your-groups/your-groups.component.mjs +243 -0
- package/esm2022/lib/dashboard.component.mjs +417 -0
- package/esm2022/lib/dashboard.module.mjs +16 -0
- package/esm2022/lib/dashboard.routes.mjs +7 -0
- package/esm2022/lib/models/attendance-action-permissions.model.mjs +2 -0
- package/esm2022/lib/models/attendance-state.model.mjs +7 -0
- package/esm2022/lib/models/dashboard-list-response.model.mjs +2 -0
- package/esm2022/lib/models/dashboard-route-config.model.mjs +2 -0
- package/esm2022/lib/models/dashboard-section-state.model.mjs +9 -0
- package/esm2022/lib/models/dashboard-user-info.model.mjs +2 -0
- package/esm2022/lib/models/event-meeting-list-item.model.mjs +2 -0
- package/esm2022/lib/models/event-meeting-list-payload.model.mjs +8 -0
- package/esm2022/lib/models/group-row.model.mjs +2 -0
- package/esm2022/lib/models/meeting-row.model.mjs +2 -0
- package/esm2022/lib/models/my-groups-view.model.mjs +2 -0
- package/esm2022/lib/models/page-change.model.mjs +2 -0
- package/esm2022/lib/models/upcoming-event.model.mjs +13 -0
- package/esm2022/lib/services/attendance-reducers.mjs +54 -0
- package/esm2022/lib/services/dashboard.service.mjs +402 -0
- package/esm2022/lib/services/user-permissions.service.mjs +50 -0
- package/esm2022/lib/utils/attendance-action.util.mjs +53 -0
- package/esm2022/lib/utils/date-format.util.mjs +110 -0
- package/esm2022/lib/utils/event-meeting-mapper.util.mjs +96 -0
- package/esm2022/public-api.mjs +36 -0
- package/fesm2022/ieeesa-npm-dashboard.mjs +2981 -0
- package/fesm2022/ieeesa-npm-dashboard.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/assets/dashboard-mock.d.ts +31 -0
- package/lib/assets/dashboard-route-paths.mock.d.ts +2 -0
- package/lib/assets/dashboard-user-permissions.mock.d.ts +2 -0
- package/lib/assets/date-formats.d.ts +27 -0
- package/lib/components/event-group-card/event-group-card.component.d.ts +268 -0
- package/lib/components/meeting-attendance-row/meeting-attendance-row.component.d.ts +115 -0
- package/lib/components/member-level-badge/member-level-badge.component.d.ts +177 -0
- package/lib/components/upcoming-meetings-events/upcoming-meetings-events.component.d.ts +175 -0
- package/lib/components/welcome-header/dashboard-welcome-header.component.d.ts +98 -0
- package/lib/components/your-groups/your-groups.component.d.ts +159 -0
- package/lib/dashboard.component.d.ts +414 -0
- package/lib/dashboard.module.d.ts +7 -0
- package/lib/dashboard.routes.d.ts +2 -0
- package/lib/models/attendance-action-permissions.model.d.ts +4 -0
- package/lib/models/attendance-state.model.d.ts +4 -0
- package/lib/models/dashboard-list-response.model.d.ts +5 -0
- package/lib/models/dashboard-route-config.model.d.ts +7 -0
- package/lib/models/dashboard-section-state.model.d.ts +6 -0
- package/lib/models/dashboard-user-info.model.d.ts +5 -0
- package/lib/models/event-meeting-list-item.model.d.ts +107 -0
- package/lib/models/event-meeting-list-payload.model.d.ts +40 -0
- package/lib/models/group-row.model.d.ts +33 -0
- package/lib/models/meeting-row.model.d.ts +28 -0
- package/lib/models/my-groups-view.model.d.ts +56 -0
- package/lib/models/page-change.model.d.ts +4 -0
- package/lib/models/upcoming-event.model.d.ts +51 -0
- package/lib/services/attendance-reducers.d.ts +43 -0
- package/lib/services/dashboard.service.d.ts +202 -0
- package/lib/services/user-permissions.service.d.ts +31 -0
- package/lib/utils/attendance-action.util.d.ts +38 -0
- package/lib/utils/date-format.util.d.ts +60 -0
- package/lib/utils/event-meeting-mapper.util.d.ts +50 -0
- package/package.json +30 -3
- package/public-api.d.ts +26 -0
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { BreakpointObserverService } from '@ieeesa-npm/presentation';
|
|
3
|
+
import { UserPermission } from '@ieeesa-npm/models';
|
|
4
|
+
import { AlertsService } from '@ieeesa-npm/utility';
|
|
5
|
+
import { AttendanceActionPermissions } from './models/attendance-action-permissions.model';
|
|
6
|
+
import { AttendanceState } from './models/attendance-state.model';
|
|
7
|
+
import { DashboardRouteConfig } from './models/dashboard-route-config.model';
|
|
8
|
+
import { DashboardSectionState } from './models/dashboard-section-state.model';
|
|
9
|
+
import { DashboardUserInfo } from './models/dashboard-user-info.model';
|
|
10
|
+
import { GroupRow } from './models/group-row.model';
|
|
11
|
+
import { PageChange } from './models/page-change.model';
|
|
12
|
+
import { UpcomingEvent } from './models/upcoming-event.model';
|
|
13
|
+
import { DashboardService } from './services/dashboard.service';
|
|
14
|
+
import { UserPermissionsService } from './services/user-permissions.service';
|
|
15
|
+
import { DashboardJumpTarget } from './components/welcome-header/dashboard-welcome-header.component';
|
|
16
|
+
import * as i0 from "@angular/core";
|
|
17
|
+
/**
|
|
18
|
+
* A navigation intent emitted by {@link DashboardComponent} for the host
|
|
19
|
+
* application to act on. The library never performs navigation itself; it emits
|
|
20
|
+
* the resolved target `path` (from the {@link DashboardRouteConfig}) together
|
|
21
|
+
* with the triggering identifier so the host can route accordingly (Req 11.1).
|
|
22
|
+
*/
|
|
23
|
+
export interface DashboardNavigationIntent {
|
|
24
|
+
/** The resolved target route path from the active {@link DashboardRouteConfig}. */
|
|
25
|
+
path: string;
|
|
26
|
+
/** The identifier that triggered the navigation (event/meeting/group id), when applicable. */
|
|
27
|
+
id?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Dashboard (`ieeesa-dashboard`) is the root container and single host entry
|
|
31
|
+
* point for the "NESC Revision Cycle" dashboard landing page. It owns the
|
|
32
|
+
* host-supplied configuration (`routePaths`, `apiBaseURL`, `userInfo`,
|
|
33
|
+
* `userPermissions`), composes the four regions — welcome header, upcoming
|
|
34
|
+
* meetings & events, your groups, and footer — and orchestrates data loading
|
|
35
|
+
* and attendance actions through the {@link DashboardService}.
|
|
36
|
+
*
|
|
37
|
+
* The component is composition-first and host-agnostic: it subscribes to the
|
|
38
|
+
* service observables (`upcomingEvents$`, `groups$`, the per-section states, the
|
|
39
|
+
* attendance-state map, and the in-flight set) with `takeUntil(destroy$)` and
|
|
40
|
+
* tracks `isMobileView` from the Presentation_Library
|
|
41
|
+
* {@link BreakpointObserverService} (Req 13.1, 13.2, 13.5, 15.1, 15.2). Child
|
|
42
|
+
* navigation `@Output()`s are composed into a single {@link dashboardNavigate}
|
|
43
|
+
* stream of `{ path, id }` intents resolved from `routePaths` (falling back to
|
|
44
|
+
* the default route configuration in `constants.json` when `routePaths` is
|
|
45
|
+
* omitted) (Req 5.2, 6.4, 7.4, 8.2, 8.7, 11.1, 11.5). Attendance `@Output()`s
|
|
46
|
+
* are delegated to the service, and on failure the attendance-action error
|
|
47
|
+
* message from `constants.json` is surfaced via the shared {@link AlertsService}
|
|
48
|
+
* (Req 7.7, 7.8, 13.7). Per-row {@link AttendanceActionPermissions} are computed
|
|
49
|
+
* from `userPermissions` and passed down to the rows (Req 12.3).
|
|
50
|
+
* @export
|
|
51
|
+
* @class DashboardComponent
|
|
52
|
+
*/
|
|
53
|
+
export declare class DashboardComponent implements OnInit, OnDestroy {
|
|
54
|
+
private dashboardService;
|
|
55
|
+
private userPermissionsService;
|
|
56
|
+
private breakpointObserverService;
|
|
57
|
+
private alertService;
|
|
58
|
+
/** User-facing strings and the default route config sourced from `constants.json`. */
|
|
59
|
+
constants: {
|
|
60
|
+
welcomeHeader: {
|
|
61
|
+
greeting: string;
|
|
62
|
+
fallbackGreeting: string;
|
|
63
|
+
helperText: string;
|
|
64
|
+
jumpToLabel: string;
|
|
65
|
+
shortcuts: {
|
|
66
|
+
meetings: {
|
|
67
|
+
label: string;
|
|
68
|
+
iconUrl: string;
|
|
69
|
+
ariaLabel: string;
|
|
70
|
+
};
|
|
71
|
+
groups: {
|
|
72
|
+
label: string;
|
|
73
|
+
iconUrl: string;
|
|
74
|
+
ariaLabel: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
upcomingSection: {
|
|
79
|
+
title: string;
|
|
80
|
+
viewAllLabel: string;
|
|
81
|
+
expandLabel: string;
|
|
82
|
+
collapseLabel: string;
|
|
83
|
+
ariaLabel: {
|
|
84
|
+
viewAll: string;
|
|
85
|
+
toggle: string;
|
|
86
|
+
};
|
|
87
|
+
emptyMessage: string;
|
|
88
|
+
errorMessage: string;
|
|
89
|
+
paginator: {
|
|
90
|
+
rangeTemplate: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
eventGroupCard: {
|
|
94
|
+
eventBadge: string;
|
|
95
|
+
standaloneBadge: string;
|
|
96
|
+
viewLabel: string;
|
|
97
|
+
viewEventLabel: string;
|
|
98
|
+
eventDatesLabel: string;
|
|
99
|
+
meetingDateLabel: string;
|
|
100
|
+
timeTimezoneLabel: string;
|
|
101
|
+
meetingsLabel: string;
|
|
102
|
+
openForAttendanceTemplate: string;
|
|
103
|
+
meetingListToggle: {
|
|
104
|
+
showLabel: string;
|
|
105
|
+
showLabelPrefix: string;
|
|
106
|
+
showLabelSuffix: string;
|
|
107
|
+
hideLabel: string;
|
|
108
|
+
};
|
|
109
|
+
ariaLabel: {
|
|
110
|
+
view: string;
|
|
111
|
+
viewEvent: string;
|
|
112
|
+
meetingListToggle: string; /** The resolved target route path from the active {@link DashboardRouteConfig}. */
|
|
113
|
+
};
|
|
114
|
+
paginator: {
|
|
115
|
+
rangeTemplate: string;
|
|
116
|
+
totalTemplate: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
meetingRow: {
|
|
120
|
+
emptyFieldPlaceholder: string;
|
|
121
|
+
timeTimezoneLabel: string;
|
|
122
|
+
viewLabel: string;
|
|
123
|
+
currentlyAttendingIndicator: string;
|
|
124
|
+
logAttendanceLabel: string;
|
|
125
|
+
leaveMeetingLabel: string;
|
|
126
|
+
ariaLabel: {
|
|
127
|
+
meetingNameLink: string;
|
|
128
|
+
logAttendance: string;
|
|
129
|
+
leaveMeeting: string;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
groupsSection: {
|
|
133
|
+
title: string;
|
|
134
|
+
viewAllLabel: string;
|
|
135
|
+
expandLabel: string;
|
|
136
|
+
collapseLabel: string;
|
|
137
|
+
countSuffix: string;
|
|
138
|
+
emptyValue: string;
|
|
139
|
+
unassignedMemberLevel: string;
|
|
140
|
+
itemsPerPageLabel: string;
|
|
141
|
+
ariaLabel: {
|
|
142
|
+
viewAll: string;
|
|
143
|
+
toggle: string;
|
|
144
|
+
groupLink: string;
|
|
145
|
+
};
|
|
146
|
+
columns: {
|
|
147
|
+
group: string;
|
|
148
|
+
type: string;
|
|
149
|
+
officerRole: string;
|
|
150
|
+
affiliation: string;
|
|
151
|
+
memberLevel: string;
|
|
152
|
+
};
|
|
153
|
+
paginator: {
|
|
154
|
+
rangeTemplate: string;
|
|
155
|
+
totalTemplate: string;
|
|
156
|
+
};
|
|
157
|
+
memberLevelBadge: {
|
|
158
|
+
success: string;
|
|
159
|
+
warning: string;
|
|
160
|
+
};
|
|
161
|
+
emptyMessage: string;
|
|
162
|
+
errorMessage: string;
|
|
163
|
+
};
|
|
164
|
+
memberLevel: {
|
|
165
|
+
colorMap: {
|
|
166
|
+
"Voting Member": string;
|
|
167
|
+
Observer: string;
|
|
168
|
+
"Associate Member": string;
|
|
169
|
+
Member: string;
|
|
170
|
+
default: string;
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
attendance: {
|
|
174
|
+
errorMessage: string;
|
|
175
|
+
};
|
|
176
|
+
footer: {
|
|
177
|
+
links: {
|
|
178
|
+
label: string;
|
|
179
|
+
target: string;
|
|
180
|
+
}[];
|
|
181
|
+
copyright: string;
|
|
182
|
+
};
|
|
183
|
+
defaultRouteConfig: {
|
|
184
|
+
eventDetail: string;
|
|
185
|
+
meetingDetail: string;
|
|
186
|
+
groupDetail: string;
|
|
187
|
+
viewAllEvents: string;
|
|
188
|
+
viewAllGroups: string;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
/** Host navigation paths; falls back to the `constants.json` default when omitted (Req 11.1, 11.5). */
|
|
192
|
+
routePaths?: DashboardRouteConfig;
|
|
193
|
+
/** The host application's API base URL, forwarded to the service (Req 11.2). */
|
|
194
|
+
apiBaseURL: string;
|
|
195
|
+
/** The signed-in user's info used by the welcome header greeting (Req 11.3, 4.1). */
|
|
196
|
+
userInfo: DashboardUserInfo;
|
|
197
|
+
/** The signed-in user's permissions used to gate attendance actions (Req 11.4, 12.3). */
|
|
198
|
+
userPermissions: UserPermission[];
|
|
199
|
+
/** Emits a resolved navigation intent for the host to act on (Req 5.2, 6.4, 7.4, 8.2, 8.7, 11.1). */
|
|
200
|
+
dashboardNavigate: EventEmitter<DashboardNavigationIntent>;
|
|
201
|
+
/** The user's upcoming events, bound to the upcoming section (Req 13.1, 13.2). */
|
|
202
|
+
upcomingEvents: UpcomingEvent[];
|
|
203
|
+
/** The user's groups, bound to the groups section (Req 13.1, 13.2). */
|
|
204
|
+
groups: GroupRow[];
|
|
205
|
+
/** The upcoming-events section's load/empty/error state (Req 13.1, 13.2, 13.5). */
|
|
206
|
+
upcomingState: DashboardSectionState;
|
|
207
|
+
/** The groups section's load/empty/error state (Req 13.1, 13.2, 13.5). */
|
|
208
|
+
groupsState: DashboardSectionState;
|
|
209
|
+
/** The per-meeting attendance-state map passed down to the rows. */
|
|
210
|
+
attendanceStates: Record<string, AttendanceState>;
|
|
211
|
+
/** The set of meeting ids with an attendance action awaiting resolution. */
|
|
212
|
+
inFlightMeetingIds: ReadonlySet<string>;
|
|
213
|
+
/** The per-row attendance-action permissions derived from `userPermissions` (Req 12.3). */
|
|
214
|
+
attendancePermissions: AttendanceActionPermissions;
|
|
215
|
+
/** Whether the viewport is at/below the mobile breakpoint (Req 15.1, 15.2). */
|
|
216
|
+
isMobileView: boolean;
|
|
217
|
+
/** Whether the Upcoming Meetings & Events card is expanded. Starts collapsed. */
|
|
218
|
+
meetingsExpanded: boolean;
|
|
219
|
+
/** Whether the Your Groups card is expanded. Starts collapsed. */
|
|
220
|
+
groupsExpanded: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* Section host elements used to scroll a "Jump to" target into view. Read as
|
|
223
|
+
* ElementRef (not the component instance) so the native element is available
|
|
224
|
+
* for scrollIntoView.
|
|
225
|
+
*/
|
|
226
|
+
upcomingSection?: ElementRef<HTMLElement>;
|
|
227
|
+
groupsSection?: ElementRef<HTMLElement>;
|
|
228
|
+
/**
|
|
229
|
+
* Total number of meetings across the loaded upcoming events, shown in the
|
|
230
|
+
* welcome header's "Upcoming Meetings & Events" shortcut badge.
|
|
231
|
+
* @readonly
|
|
232
|
+
* @memberof DashboardComponent
|
|
233
|
+
*/
|
|
234
|
+
get meetingsCount(): number;
|
|
235
|
+
/**
|
|
236
|
+
* Number of loaded groups, shown in the welcome header's "Your Groups"
|
|
237
|
+
* shortcut badge.
|
|
238
|
+
* @readonly
|
|
239
|
+
* @memberof DashboardComponent
|
|
240
|
+
*/
|
|
241
|
+
get groupsCount(): number;
|
|
242
|
+
/** The current zero-based page index of the groups table. */
|
|
243
|
+
groupsPageIndex: number;
|
|
244
|
+
/** The current page size of the groups table (5 rows per page per the design). */
|
|
245
|
+
groupsPageSize: number;
|
|
246
|
+
/** Completes on destroy to tear down all subscriptions (Req 2.4, 2.5). */
|
|
247
|
+
private readonly destroy$;
|
|
248
|
+
constructor(dashboardService: DashboardService, userPermissionsService: UserPermissionsService, breakpointObserverService: BreakpointObserverService, alertService: AlertsService);
|
|
249
|
+
/**
|
|
250
|
+
* Initializes the dashboard: forwards the host config to the service, derives
|
|
251
|
+
* the per-row attendance permissions, kicks off the upcoming-events and groups
|
|
252
|
+
* loads, and wires up subscriptions to the service state observables and the
|
|
253
|
+
* breakpoint observer — all cleaned up via `takeUntil(destroy$)` (Req 11.2,
|
|
254
|
+
* 11.4, 12.3, 13.1, 13.2, 13.5, 15.1, 15.2).
|
|
255
|
+
* @return {void}
|
|
256
|
+
* @memberof DashboardComponent
|
|
257
|
+
*/
|
|
258
|
+
ngOnInit(): void;
|
|
259
|
+
/**
|
|
260
|
+
* Tears down all subscriptions on destroy (Req 2.4, 2.5).
|
|
261
|
+
* @return {void}
|
|
262
|
+
* @memberof DashboardComponent
|
|
263
|
+
*/
|
|
264
|
+
ngOnDestroy(): void;
|
|
265
|
+
/**
|
|
266
|
+
* Handles the welcome-header "Jump to" date selection. The dashboard currently
|
|
267
|
+
* has no date-scoped data load, so the selection is accepted without side
|
|
268
|
+
* effects; the hook keeps the header's contract satisfied for future filtering.
|
|
269
|
+
* @return {void}
|
|
270
|
+
* @memberof DashboardComponent
|
|
271
|
+
*/
|
|
272
|
+
onJumpToDateSelected(): void;
|
|
273
|
+
/**
|
|
274
|
+
* Handles a welcome-header "Jump to" shortcut: opens the matching section's
|
|
275
|
+
* card (so its content is visible) and smoothly scrolls it into view. It does
|
|
276
|
+
* NOT navigate away — the shortcut is an in-page jump to the section.
|
|
277
|
+
* @param {DashboardJumpTarget} target - The selected shortcut target.
|
|
278
|
+
* @return {void}
|
|
279
|
+
* @memberof DashboardComponent
|
|
280
|
+
*/
|
|
281
|
+
onJumpToShortcut(target: DashboardJumpTarget): void;
|
|
282
|
+
/**
|
|
283
|
+
* Emits the "View All" upcoming-events navigation intent, targeting the
|
|
284
|
+
* `viewAllEvents` route with no id (Req 5.2, 11.1).
|
|
285
|
+
* @return {void}
|
|
286
|
+
* @memberof DashboardComponent
|
|
287
|
+
*/
|
|
288
|
+
onViewAllEvents(): void;
|
|
289
|
+
/**
|
|
290
|
+
* Emits the "View Event" navigation intent, targeting the `eventDetail` route
|
|
291
|
+
* with the event id (Req 6.4, 11.1).
|
|
292
|
+
* @param {string} eventId - The id of the event to view.
|
|
293
|
+
* @return {void}
|
|
294
|
+
* @memberof DashboardComponent
|
|
295
|
+
*/
|
|
296
|
+
onViewEvent(eventId: string): void;
|
|
297
|
+
/**
|
|
298
|
+
* Emits the open-meeting navigation intent, targeting the `meetingDetail`
|
|
299
|
+
* route with the meeting id (Req 7.4, 11.1).
|
|
300
|
+
* @param {string} meetingId - The id of the meeting to open.
|
|
301
|
+
* @return {void}
|
|
302
|
+
* @memberof DashboardComponent
|
|
303
|
+
*/
|
|
304
|
+
onOpenMeeting(meetingId: string): void;
|
|
305
|
+
/**
|
|
306
|
+
* Emits the "View All" groups navigation intent, targeting the
|
|
307
|
+
* `viewAllGroups` route with no id (Req 8.2, 11.1).
|
|
308
|
+
* @return {void}
|
|
309
|
+
* @memberof DashboardComponent
|
|
310
|
+
*/
|
|
311
|
+
onViewAllGroups(): void;
|
|
312
|
+
/**
|
|
313
|
+
* Emits the group-detail navigation intent, targeting the `groupDetail` route
|
|
314
|
+
* with the group id (Req 8.7, 11.1).
|
|
315
|
+
* @param {string} groupId - The id of the selected group.
|
|
316
|
+
* @return {void}
|
|
317
|
+
* @memberof DashboardComponent
|
|
318
|
+
*/
|
|
319
|
+
onGroupSelected(groupId: string): void;
|
|
320
|
+
/**
|
|
321
|
+
* Updates the groups table paging state in response to a paginator change so
|
|
322
|
+
* the groups section reflects the requested page (Req 8.10).
|
|
323
|
+
* @param {PageChange} page - The requested page index and size.
|
|
324
|
+
* @return {void}
|
|
325
|
+
* @memberof DashboardComponent
|
|
326
|
+
*/
|
|
327
|
+
onGroupsPageChange(page: PageChange): void;
|
|
328
|
+
/**
|
|
329
|
+
* Lazily loads (or paginates) the child meetings of an expanded EVENT card via
|
|
330
|
+
* the service, surfacing the attendance error message on failure. Each event
|
|
331
|
+
* paginates independently.
|
|
332
|
+
* @param {{ eventId: string; page: number }} request - The event id and one-based page to load.
|
|
333
|
+
* @return {void}
|
|
334
|
+
* @memberof DashboardComponent
|
|
335
|
+
*/
|
|
336
|
+
onLoadEventMeetings(request: {
|
|
337
|
+
eventId: string;
|
|
338
|
+
page: number;
|
|
339
|
+
}): void;
|
|
340
|
+
/**
|
|
341
|
+
* Delegates a log-attendance request to the service, surfacing the
|
|
342
|
+
* attendance-action error message via the shared {@link AlertsService} on
|
|
343
|
+
* failure while the service retains the prior displayed state (Req 7.7, 13.7).
|
|
344
|
+
* @param {string} meetingId - The meeting to log attendance for.
|
|
345
|
+
* @return {void}
|
|
346
|
+
* @memberof DashboardComponent
|
|
347
|
+
*/
|
|
348
|
+
onLogAttendance(meetingId: string): void;
|
|
349
|
+
/**
|
|
350
|
+
* Delegates a leave-meeting request to the service, surfacing the
|
|
351
|
+
* attendance-action error message via the shared {@link AlertsService} on
|
|
352
|
+
* failure while the service retains the prior displayed state (Req 7.8, 13.7).
|
|
353
|
+
* @param {string} meetingId - The meeting to leave.
|
|
354
|
+
* @return {void}
|
|
355
|
+
* @memberof DashboardComponent
|
|
356
|
+
*/
|
|
357
|
+
onLeaveMeeting(meetingId: string): void;
|
|
358
|
+
/**
|
|
359
|
+
* The route configuration in effect: the host-supplied `routePaths` when
|
|
360
|
+
* provided, otherwise the default route config from `constants.json` so
|
|
361
|
+
* navigation intents always carry valid targets (Req 11.1, 11.5).
|
|
362
|
+
* @return {DashboardRouteConfig} The active route configuration.
|
|
363
|
+
* @memberof DashboardComponent
|
|
364
|
+
*/
|
|
365
|
+
private get activeRouteConfig();
|
|
366
|
+
/**
|
|
367
|
+
* Subscribes to the service's state observables, mirroring each into a local
|
|
368
|
+
* field for the template to bind. All subscriptions are torn down via
|
|
369
|
+
* `takeUntil(destroy$)` (Req 13.1, 13.2, 13.5).
|
|
370
|
+
* @return {void}
|
|
371
|
+
* @memberof DashboardComponent
|
|
372
|
+
*/
|
|
373
|
+
private subscribeToServiceState;
|
|
374
|
+
/**
|
|
375
|
+
* Subscribes to the Presentation_Library breakpoint observer to keep
|
|
376
|
+
* `isMobileView` in sync with the viewport (Req 15.1, 15.2).
|
|
377
|
+
* @return {void}
|
|
378
|
+
* @memberof DashboardComponent
|
|
379
|
+
*/
|
|
380
|
+
private subscribeToBreakpoint;
|
|
381
|
+
/**
|
|
382
|
+
* Triggers the upcoming-events load, setting the section to `ERROR` on failure
|
|
383
|
+
* so only the section error region renders (Req 13.1, 13.2, 13.5).
|
|
384
|
+
* @return {void}
|
|
385
|
+
* @memberof DashboardComponent
|
|
386
|
+
*/
|
|
387
|
+
private loadUpcomingEvents;
|
|
388
|
+
/**
|
|
389
|
+
* Triggers the groups load, setting the section to `ERROR` on failure so only
|
|
390
|
+
* the section error region renders. Isolated from the upcoming-events load so
|
|
391
|
+
* one failing does not affect the other (Req 13.1, 13.2, 13.5).
|
|
392
|
+
* @return {void}
|
|
393
|
+
* @memberof DashboardComponent
|
|
394
|
+
*/
|
|
395
|
+
private loadGroups;
|
|
396
|
+
/**
|
|
397
|
+
* Composes and emits a {@link DashboardNavigationIntent} for the host from the
|
|
398
|
+
* resolved target path and an optional triggering id (Req 11.1).
|
|
399
|
+
* @param {string} path - The resolved target route path.
|
|
400
|
+
* @param {string} [id] - The triggering identifier, when applicable.
|
|
401
|
+
* @return {void}
|
|
402
|
+
* @memberof DashboardComponent
|
|
403
|
+
*/
|
|
404
|
+
private emitNavigation;
|
|
405
|
+
/**
|
|
406
|
+
* Surfaces the attendance-action error message from `constants.json` via the
|
|
407
|
+
* shared {@link AlertsService} (Req 13.7).
|
|
408
|
+
* @return {void}
|
|
409
|
+
* @memberof DashboardComponent
|
|
410
|
+
*/
|
|
411
|
+
private showAttendanceError;
|
|
412
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DashboardComponent, never>;
|
|
413
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DashboardComponent, "ieeesa-dashboard", never, { "routePaths": { "alias": "routePaths"; "required": false; }; "apiBaseURL": { "alias": "apiBaseURL"; "required": false; }; "userInfo": { "alias": "userInfo"; "required": false; }; "userPermissions": { "alias": "userPermissions"; "required": false; }; }, { "dashboardNavigate": "dashboardNavigate"; }, never, never, true, never>;
|
|
414
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./dashboard.component";
|
|
3
|
+
export declare class DashboardModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DashboardModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DashboardModule, never, [typeof i1.DashboardComponent], [typeof i1.DashboardComponent]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DashboardModule>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Raw list item returned by the real "events & meetings" backend
|
|
3
|
+
* (`POST {apiBaseUrl}/meetings/eventsAndMeetings`). A single list may contain
|
|
4
|
+
* both EVENT rows (`isMeetingEvent === true` / `hasChildren === true`, which own
|
|
5
|
+
* child meetings) and STANDALONE MEETING rows (`isMeetingEvent === false`).
|
|
6
|
+
*
|
|
7
|
+
* Dates are epoch milliseconds (not ISO strings) and must be formatted with
|
|
8
|
+
* luxon `DateTime.fromMillis`. This shape mirrors the `events-and-meetings`
|
|
9
|
+
* library's `EventsAndMeetings` list model so the dashboard reuses the exact
|
|
10
|
+
* backend contract referenced by the existing
|
|
11
|
+
* `view-events-meetings-list` screen.
|
|
12
|
+
*/
|
|
13
|
+
export interface EventMeetingListItem {
|
|
14
|
+
/** Stable identifier of the event or standalone meeting. */
|
|
15
|
+
id: string;
|
|
16
|
+
/** Event / meeting display name. */
|
|
17
|
+
name: string;
|
|
18
|
+
/** Start date-time as an ISO-8601 string (or epoch ms for legacy fixtures). */
|
|
19
|
+
startDateTime: string | number;
|
|
20
|
+
/** End date-time as an ISO-8601 string (or epoch ms for legacy fixtures). */
|
|
21
|
+
endDateTime: string | number;
|
|
22
|
+
/** IANA / offset-prefixed timezone string, e.g. "(UTC+05:30) Asia/Kolkata". */
|
|
23
|
+
timeZone: string;
|
|
24
|
+
/** Owning group id. */
|
|
25
|
+
groupId?: string;
|
|
26
|
+
/** Owning group display name. */
|
|
27
|
+
groupName?: string;
|
|
28
|
+
/** Owning group acronym, when provided. */
|
|
29
|
+
groupAcronym?: string;
|
|
30
|
+
/** Room / location text, when provided. */
|
|
31
|
+
meetingLocation?: string | null;
|
|
32
|
+
/** True when this row is an EVENT that owns child meetings. */
|
|
33
|
+
hasChildren?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* True when the row represents an EVENT (vs. a standalone meeting). Combined
|
|
36
|
+
* with {@link hasChildren} this is the EVENT-vs-STANDALONE discriminator.
|
|
37
|
+
*/
|
|
38
|
+
isMeetingEvent?: boolean;
|
|
39
|
+
/** Lifecycle status, e.g. "In Progress", "Upcoming", "Starts Soon". */
|
|
40
|
+
status?: string;
|
|
41
|
+
/** True when the signed-in user is a member of the owning group. */
|
|
42
|
+
isMemberOfGroup?: boolean;
|
|
43
|
+
/** True when the current user is currently attending (drives the pill). */
|
|
44
|
+
isCurrentlyAttending?: boolean;
|
|
45
|
+
/** True when the row is open for attendance logging. */
|
|
46
|
+
isOpenForAttendance?: boolean;
|
|
47
|
+
/** Event id a standalone/child meeting belongs to, when applicable. */
|
|
48
|
+
eventId?: string;
|
|
49
|
+
/** Meeting id, when the row is a meeting. */
|
|
50
|
+
meetingId?: string;
|
|
51
|
+
/** Alternate name key some payloads use for meetings. */
|
|
52
|
+
meetingTitle?: string;
|
|
53
|
+
/** Alternate status key (the list screen copies status here). */
|
|
54
|
+
contentUnderLink?: string;
|
|
55
|
+
/** Alternate location key used by some meeting payloads. */
|
|
56
|
+
room?: string | null;
|
|
57
|
+
/** Count of child meetings for an event, when the backend provides it. */
|
|
58
|
+
meetingCount?: number;
|
|
59
|
+
/** Count of child meetings open for attendance, when provided. */
|
|
60
|
+
openForAttendanceCount?: number;
|
|
61
|
+
/** "Day X of Y" indicator string, when the backend provides it. */
|
|
62
|
+
dayIndicator?: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Response envelope for the dashboard events-&-meetings list endpoint, matching
|
|
66
|
+
* the `events-and-meetings` library's `GetEventsAndMeetingsResponse` body shape.
|
|
67
|
+
*/
|
|
68
|
+
export interface EventMeetingListResponse {
|
|
69
|
+
status: boolean;
|
|
70
|
+
message?: string;
|
|
71
|
+
body: {
|
|
72
|
+
totalRecords: number;
|
|
73
|
+
eventMeetingList: EventMeetingListItem[];
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Child-meeting list item returned by the per-event expand endpoint
|
|
78
|
+
* (`POST {apiBaseUrl}/meetings/meetingsDetails`). Dates are epoch milliseconds.
|
|
79
|
+
* Mirrors the `events-and-meetings` library's `Meeting` model.
|
|
80
|
+
*/
|
|
81
|
+
export interface EventMeetingDetailItem {
|
|
82
|
+
meetingId: string;
|
|
83
|
+
meetingTitle: string;
|
|
84
|
+
meetingStDate: string | number;
|
|
85
|
+
meetingEdDate: string | number;
|
|
86
|
+
meetingLocation?: string;
|
|
87
|
+
groupId?: string;
|
|
88
|
+
groupName?: string;
|
|
89
|
+
groupAcronym?: string;
|
|
90
|
+
timeZone?: string;
|
|
91
|
+
status?: string;
|
|
92
|
+
isMemberOfGroup?: boolean;
|
|
93
|
+
isCurrentlyAttending?: boolean;
|
|
94
|
+
isOpenForAttendance?: boolean;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Response envelope for the per-event child-meetings expand endpoint, matching
|
|
98
|
+
* the `events-and-meetings` library's `GetMeetingsByEventIdResponse` body shape.
|
|
99
|
+
*/
|
|
100
|
+
export interface EventMeetingDetailResponse {
|
|
101
|
+
status: boolean;
|
|
102
|
+
message?: string;
|
|
103
|
+
body: {
|
|
104
|
+
totalRecords: number;
|
|
105
|
+
meetings: EventMeetingDetailItem[];
|
|
106
|
+
};
|
|
107
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request payloads for the dashboard "events & meetings" backend calls. These
|
|
3
|
+
* mirror the `events-and-meetings` library's `GetEventsAndMeetingsPayload` /
|
|
4
|
+
* `GetMeetingsByEventIdPayload` so the dashboard reuses the exact contract the
|
|
5
|
+
* existing `view-events-meetings-list` screen posts.
|
|
6
|
+
*/
|
|
7
|
+
/** Filter block shared by the list and expand payloads. */
|
|
8
|
+
export interface EventMeetingFilter {
|
|
9
|
+
/** Lifecycle statuses to include, e.g. ["In Progress", "Upcoming"]. */
|
|
10
|
+
status: string[];
|
|
11
|
+
/** Whether every meeting (regardless of membership) should be returned. */
|
|
12
|
+
isAllMeetingSelected: boolean;
|
|
13
|
+
/** Optional group-id scope. */
|
|
14
|
+
groupIds?: string[];
|
|
15
|
+
}
|
|
16
|
+
/** Payload for `POST {apiBaseUrl}/meetings/eventsAndMeetings` (the section list). */
|
|
17
|
+
export interface EventMeetingListPayload {
|
|
18
|
+
payload: {
|
|
19
|
+
/** Null for the top-level list; an event id when scoping to one event. */
|
|
20
|
+
eventId: string | null;
|
|
21
|
+
sortColumn: string;
|
|
22
|
+
ascendingOrder: boolean;
|
|
23
|
+
page: number;
|
|
24
|
+
size: number;
|
|
25
|
+
searchTerm?: string | null;
|
|
26
|
+
filter: EventMeetingFilter;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/** Payload for `POST {apiBaseUrl}/meetings/meetingsDetails` (per-event expand). */
|
|
30
|
+
export interface EventMeetingDetailPayload {
|
|
31
|
+
payload: {
|
|
32
|
+
eventId: string;
|
|
33
|
+
sortColumn: string;
|
|
34
|
+
ascendingOrder: boolean;
|
|
35
|
+
page: number;
|
|
36
|
+
size: number;
|
|
37
|
+
searchTerm?: string | null;
|
|
38
|
+
filter: EventMeetingFilter;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A single node in a group's ancestor hierarchy (root→leaf), as returned by
|
|
3
|
+
* GET /v1/groups/my-groups. Used to render the expandable hierarchy rows in the
|
|
4
|
+
* Your Groups table.
|
|
5
|
+
*/
|
|
6
|
+
export interface GroupHierarchyNode {
|
|
7
|
+
groupId: string;
|
|
8
|
+
groupName: string;
|
|
9
|
+
groupShortName?: string;
|
|
10
|
+
groupAcronym?: string;
|
|
11
|
+
groupLevel?: number;
|
|
12
|
+
groupParentId?: string | null;
|
|
13
|
+
groupType?: string;
|
|
14
|
+
groupTypeName?: string | null;
|
|
15
|
+
groupDesc?: string | null;
|
|
16
|
+
hasChildren?: boolean | null;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Table-facing view of a group in the Your Groups section. The display fields
|
|
20
|
+
* are mapped from the backend; `hierarchy` carries the group's ancestor path so
|
|
21
|
+
* the row can expand to show the hierarchy (matching the My Profile Find Groups
|
|
22
|
+
* tree).
|
|
23
|
+
*/
|
|
24
|
+
export interface GroupRow {
|
|
25
|
+
groupId: string;
|
|
26
|
+
group: string;
|
|
27
|
+
type?: string;
|
|
28
|
+
officerRole?: string;
|
|
29
|
+
affiliation?: string;
|
|
30
|
+
memberLevel: string;
|
|
31
|
+
/** Ancestor hierarchy (root→leaf) for the expandable hierarchy rows. */
|
|
32
|
+
hierarchy?: GroupHierarchyNode[];
|
|
33
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AttendanceState } from './attendance-state.model';
|
|
2
|
+
/**
|
|
3
|
+
* View model for a single meeting row, used both for an event's expanded child
|
|
4
|
+
* meetings and (via {@link UpcomingEvent}) for standalone meeting cards.
|
|
5
|
+
*
|
|
6
|
+
* `startEpochMs` / `endEpochMs` carry the raw epoch-milliseconds values from the
|
|
7
|
+
* backend and are formatted with luxon `DateTime.fromMillis`. The legacy ISO
|
|
8
|
+
* `meetingDate` / `meetingTime` fields are retained for existing fixtures/tests.
|
|
9
|
+
*/
|
|
10
|
+
export interface MeetingRow {
|
|
11
|
+
meetingId: string;
|
|
12
|
+
meetingName: string;
|
|
13
|
+
groupOrCommittee?: string;
|
|
14
|
+
roomOrLocation?: string;
|
|
15
|
+
/** Start date-time as an ISO-8601 string (or epoch ms for fixtures). */
|
|
16
|
+
startDateTime?: string | number;
|
|
17
|
+
/** End date-time as an ISO-8601 string (or epoch ms for fixtures). */
|
|
18
|
+
endDateTime?: string | number;
|
|
19
|
+
/** Legacy ISO meeting date, retained for fixtures/tests. */
|
|
20
|
+
meetingDate?: string;
|
|
21
|
+
/** Legacy ISO meeting time, retained for fixtures/tests. */
|
|
22
|
+
meetingTime?: string;
|
|
23
|
+
timezone: string;
|
|
24
|
+
status?: string;
|
|
25
|
+
isMemberOfGroup?: boolean;
|
|
26
|
+
isOpenForAttendance?: boolean;
|
|
27
|
+
attendanceState?: AttendanceState;
|
|
28
|
+
}
|