Commit ad050a5
feat(training): add enrolled trainings tab with ongoing and completed sections (#418)
* docs(training): add enrolled trainings tab design spec
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
* docs(training): align enrolled trainings spec with codebase patterns
- Add shared constants (TRAINING_PRODUCT_TYPE, CERTIFICATION_PRODUCT_TYPE,
CONTINUE_LEARNING_URL) to avoid inline string literals
- Fix frontend service to use HttpParams pattern (matching project.service.ts)
- Fix controller query param extraction to match events.controller.ts pattern
- Fix component inputs to use input()/input.required() (not InputSignal<T>)
- Add computed signals section with private init functions
- Clarify toSignal() usage without initialValue for loading state detection
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
* docs: add enrolled trainings tab implementation plan
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
* feat(training): add training constants to shared package
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
* feat(training): add EnrollmentRow, TrainingEnrollment; extend Certification and CertificateRow with level
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
* feat(training): add getEnrollments; add productType filter and LEVEL to getCertifications
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
* feat(training): add getEnrollments endpoint; add productType query param to getCertifications
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
* feat(training): add getEnrollments and productType param to frontend training service
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
* feat(training): add TrainingCardComponent for ongoing and completed trainings
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
* feat(training): add enrollments and completedTrainings signals to dashboard; filter certifications by product type
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
* feat(training): implement enrolled trainings tab with ongoing and completed sections
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
* style: apply formatting
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
* chore: remove plan doc from tracking (keep local only)
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
* chore: remove design spec from tracking (keep local only)
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
* fix(styles): apply Roboto Slab to h1 and Inter to body
h1 headings should use the display (Roboto Slab) font per the design
system. Body was missing an explicit Inter declaration causing fallback
to browser default sans-serif.
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
* fix(trainings): add separator line below section headings
Add border-b to 'Ongoing trainings' and 'Completed trainings' section
headings to match the reference design. LFXV2-enrolled-trainings-tab
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
* fix(trainings): remove unused fields and clean up SQL formatting
- Remove PRODUCT_TYPE from CertificateRow and EnrollmentRow — the field
is not selected in the Snowflake queries
- Remove USER_NAME from EnrollmentRow — not selected in query
- Fix SQL query string concatenation producing double spaces
- Add comment clarifying variant/type contract in TrainingCardComponent
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
* fix(training): correct EnrollmentRow nullable fields to match Snowflake nullability
LFXV2-enrolled-trainings-tab
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
* fix(training): address reviewer feedback on training tab implementation
- Use CSS variables (--font-inter, --font-display) instead of hardcoded font strings in styles.scss
- Parameterize ENROLLMENTS_QUERY with TRAINING_PRODUCT_TYPE constant instead of hardcoded string
- Rename 'Continue Learning' to 'Go to Training Portal' to set correct expectations; add TODO for course-specific URL
- Replace ! non-null assertions with ?. safe access in enrolled trainings template
- Use [ngClass] binding instead of {{ }} interpolation for levelClasses
- Inline trivial computed signals (hasImage, isOngoing, dateLabel) per component-organization conventions
- Add TODO comments for !important button size overrides
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
* fix(training): use production ANALYTICS schema in SQL queries
Replace ANALYTICS_DEV.LF_MICHAL_platinum_lfx_one.* with
ANALYTICS.PLATINUM_LFX_ONE.* for both certificates and enrollments queries.
LFXV2-2095
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
* feat(training): link ongoing training cards to specific course pages
Add COURSE_SLUG to EnrollmentRow and TrainingEnrollment interfaces and
include it in the ENROLLMENTS_QUERY SELECT. The training card now computes
a course-specific URL (COURSE_URL_PREFIX + courseSlug) when the slug is
available, falling back to the generic training portal dashboard URL.
Button label restored to 'Continue Learning'.
LFXV2-2095
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
* fix(styles): scope Roboto Slab to training page, restore h1 defaults
Global h1 Roboto Slab font-family had no ticket backing and affected
every unstyled h1 across the app. Reverted to pre-PR default
(text-xl font-semibold) and applied font-display class directly on
the training page h1 instead.
LFXV2-1328
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
---------
Signed-off-by: Michal Lehotsky <mlehotsky@linuxfoundation.org>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 6c47635 commit ad050a5
12 files changed
Lines changed: 388 additions & 26 deletions
File tree
- apps/lfx-one/src
- app
- modules/trainings
- components/training-card
- trainings-dashboard
- server
- controllers
- routes
- services
Lines changed: 82 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
Lines changed: 69 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
Lines changed: 60 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
75 | 85 | | |
76 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
77 | 129 | | |
78 | 130 | | |
79 | 131 | | |
| |||
Lines changed: 15 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | | - | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| 58 | + | |
| 59 | + | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| |||
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
64 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
65 | 77 | | |
66 | 78 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
19 | 27 | | |
20 | 28 | | |
Lines changed: 34 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
45 | 77 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
0 commit comments