@hed-hog/lms 0.0.305 → 0.0.306

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.
@@ -32,9 +32,11 @@ export const MOCK_ENTERPRISE_ACCOUNTS: EnterpriseAccount[] = [
32
32
  usersCount: 120,
33
33
  studentsCount: 104,
34
34
  managersCount: 14,
35
+ adminsCount: 2,
35
36
  coursesCount: 8,
36
37
  classesCount: 3,
37
38
  licenseLimit: 150,
39
+ notes: null,
38
40
  createdAt: '2026-01-01T10:00:00Z',
39
41
  updatedAt: '2026-04-10T08:30:00Z',
40
42
  },
@@ -49,9 +51,11 @@ export const MOCK_ENTERPRISE_ACCOUNTS: EnterpriseAccount[] = [
49
51
  usersCount: 250,
50
52
  studentsCount: 220,
51
53
  managersCount: 28,
54
+ adminsCount: 2,
52
55
  coursesCount: 14,
53
56
  classesCount: 5,
54
57
  licenseLimit: 300,
58
+ notes: null,
55
59
  createdAt: '2026-02-01T09:00:00Z',
56
60
  updatedAt: '2026-04-15T11:00:00Z',
57
61
  },
@@ -66,9 +70,11 @@ export const MOCK_ENTERPRISE_ACCOUNTS: EnterpriseAccount[] = [
66
70
  usersCount: 60,
67
71
  studentsCount: 52,
68
72
  managersCount: 6,
73
+ adminsCount: 1,
69
74
  coursesCount: 4,
70
75
  classesCount: 2,
71
76
  licenseLimit: 80,
77
+ notes: null,
72
78
  createdAt: '2026-03-01T08:00:00Z',
73
79
  updatedAt: '2026-04-01T09:00:00Z',
74
80
  },
@@ -83,9 +89,11 @@ export const MOCK_ENTERPRISE_ACCOUNTS: EnterpriseAccount[] = [
83
89
  usersCount: 30,
84
90
  studentsCount: 28,
85
91
  managersCount: 2,
92
+ adminsCount: 1,
86
93
  coursesCount: 3,
87
94
  classesCount: 1,
88
95
  licenseLimit: 50,
96
+ notes: null,
89
97
  createdAt: '2026-04-01T11:00:00Z',
90
98
  updatedAt: '2026-04-18T14:00:00Z',
91
99
  },
@@ -100,9 +108,11 @@ export const MOCK_ENTERPRISE_ACCOUNTS: EnterpriseAccount[] = [
100
108
  usersCount: 0,
101
109
  studentsCount: 0,
102
110
  managersCount: 0,
111
+ adminsCount: 0,
103
112
  coursesCount: 0,
104
113
  classesCount: 0,
105
114
  licenseLimit: null,
115
+ notes: null,
106
116
  createdAt: '2025-09-01T14:00:00Z',
107
117
  updatedAt: '2026-02-28T18:00:00Z',
108
118
  },
@@ -117,9 +127,11 @@ export const MOCK_ENTERPRISE_ACCOUNTS: EnterpriseAccount[] = [
117
127
  usersCount: 100,
118
128
  studentsCount: 88,
119
129
  managersCount: 10,
130
+ adminsCount: 2,
120
131
  coursesCount: 6,
121
132
  classesCount: 2,
122
133
  licenseLimit: 120,
134
+ notes: null,
123
135
  createdAt: '2026-01-15T09:30:00Z',
124
136
  updatedAt: '2026-04-12T10:00:00Z',
125
137
  },
@@ -263,4 +275,3 @@ export const MOCK_ENTERPRISE_CLASSES: EnterpriseClass[] = [
263
275
  status: 'open',
264
276
  },
265
277
  ];
266
-
@@ -117,17 +117,54 @@ export function RelatedTabToolbar<TOption extends object>({
117
117
  <div className="flex flex-wrap items-center gap-2">
118
118
  <EntityPicker<TOption & Record<string, unknown>>
119
119
  value={pickerValue}
120
- onChange={onPickerChange}
120
+ onChange={
121
+ onPickerChange as (
122
+ v: EntityPickerValue,
123
+ o: (TOption & Record<string, unknown>) | null
124
+ ) => void
125
+ }
121
126
  placeholder={pickerPlaceholder}
122
127
  entityLabel={pickerEntityLabel}
123
128
  showCreateButton={false}
124
129
  clearable
125
- loadOptions={loadPickerOptions}
126
- options={pickerOptions}
127
- getOptionValue={getPickerOptionValue}
128
- getOptionLabel={getPickerOptionLabel}
129
- getOptionDescription={getPickerOptionDescription}
130
- renderOption={renderPickerOption}
130
+ loadOptions={
131
+ loadPickerOptions as
132
+ | ((args: {
133
+ page: number;
134
+ pageSize: number;
135
+ search: string;
136
+ }) => Promise<
137
+ | EntityPickerLoadResult<TOption & Record<string, unknown>>
138
+ | (TOption & Record<string, unknown>)[]
139
+ >)
140
+ | undefined
141
+ }
142
+ options={
143
+ pickerOptions as (TOption & Record<string, unknown>)[] | undefined
144
+ }
145
+ getOptionValue={
146
+ getPickerOptionValue as (
147
+ o: TOption & Record<string, unknown>
148
+ ) => string | number | null | undefined
149
+ }
150
+ getOptionLabel={
151
+ getPickerOptionLabel as (
152
+ o: TOption & Record<string, unknown>
153
+ ) => string
154
+ }
155
+ getOptionDescription={
156
+ getPickerOptionDescription as
157
+ | ((o: TOption & Record<string, unknown>) => string | undefined)
158
+ | undefined
159
+ }
160
+ renderOption={
161
+ renderPickerOption as
162
+ | ((args: {
163
+ option: TOption & Record<string, unknown>;
164
+ isSelected: boolean;
165
+ }) => ReactNode)
166
+ | undefined
167
+ }
131
168
  buttonClassName="min-w-52 max-w-64"
132
169
  />
133
170
 
@@ -1,96 +1,96 @@
1
- // ── Primitive union types ──────────────────────────────────────────────────────
2
-
3
- export type EnterpriseStatus = 'active' | 'inactive' | 'suspended' | 'trial';
4
-
5
- export type EnterpriseUserRole =
6
- | 'hr_manager'
7
- | 'enterprise_admin'
8
- | 'viewer'
9
- | 'student';
10
-
11
- export type EnterpriseUserStatus = 'active' | 'inactive' | 'pending';
12
-
13
- // ── View models ────────────────────────────────────────────────────────────────
14
-
15
- export interface EnterpriseCrmAccount {
16
- id: number;
17
- name: string;
18
- tradeName: string | null;
19
- industry: string | null;
20
- website: string | null;
21
- lifecycleStage: string | null;
22
- }
23
-
24
- export interface EnterpriseAccount {
25
- id: number;
26
- name: string;
27
- slug: string;
28
- status: EnterpriseStatus;
29
- crmAccountId: number | null;
30
- crmAccountName: string | null;
31
- crmAccount?: EnterpriseCrmAccount | null;
32
- portalEnabled: boolean;
33
- usersCount: number;
34
- studentsCount: number;
35
- managersCount: number;
36
- adminsCount: number;
37
- coursesCount: number;
38
- classesCount: number;
39
- licenseLimit: number | null;
40
- notes: string | null;
41
- createdAt: string;
42
- updatedAt: string;
43
- }
44
-
45
- export interface EnterpriseUser {
46
- id: number;
47
- userId: number;
48
- name: string;
49
- email: string;
50
- role: EnterpriseUserRole;
51
- status: EnterpriseUserStatus;
52
- lastAccessAt: string | null;
53
- }
54
-
55
- export interface EnterpriseStudent {
56
- id: number;
57
- personId: number;
58
- name: string | null;
59
- email: string | null;
60
- status: EnterpriseUserStatus;
61
- createdAt: string | null;
62
- }
63
-
64
- export type EnterpriseCourseStatus = 'published' | 'draft' | 'archived';
65
- export type EnterpriseClassStatus =
66
- | 'open'
67
- | 'ongoing'
68
- | 'completed'
69
- | 'cancelled';
70
-
71
- export interface EnterpriseCourse {
72
- id: number;
73
- courseId?: number;
74
- title: string;
75
- slug: string | null;
76
- status: EnterpriseCourseStatus;
77
- level?: string | null;
78
- modality?: string;
79
- contractedAt?: string | null;
80
- enrolledCount: number;
81
- completionRate: number;
82
- }
83
-
84
- export interface EnterpriseClass {
85
- id: number;
86
- courseClassGroupId?: number;
87
- code: string | null;
88
- title?: string | null;
89
- courseTitle: string | null;
90
- startDate: string | null;
91
- endDate: string | null;
92
- capacity: number | null;
93
- enrolledCount: number;
94
- status: EnterpriseClassStatus;
95
- deliveryMode?: string | null;
96
- }
1
+ // ── Primitive union types ──────────────────────────────────────────────────────
2
+
3
+ export type EnterpriseStatus = 'active' | 'inactive' | 'suspended' | 'trial';
4
+
5
+ export type EnterpriseUserRole =
6
+ | 'hr_manager'
7
+ | 'enterprise_admin'
8
+ | 'viewer'
9
+ | 'student';
10
+
11
+ export type EnterpriseUserStatus = 'active' | 'inactive' | 'pending';
12
+
13
+ // ── View models ────────────────────────────────────────────────────────────────
14
+
15
+ export interface EnterpriseCrmAccount {
16
+ id: number;
17
+ name: string;
18
+ tradeName: string | null;
19
+ industry: string | null;
20
+ website: string | null;
21
+ lifecycleStage: string | null;
22
+ }
23
+
24
+ export interface EnterpriseAccount {
25
+ id: number;
26
+ name: string;
27
+ slug: string;
28
+ status: EnterpriseStatus;
29
+ crmAccountId: number | null;
30
+ crmAccountName: string | null;
31
+ crmAccount?: EnterpriseCrmAccount | null;
32
+ portalEnabled: boolean;
33
+ usersCount: number;
34
+ studentsCount: number;
35
+ managersCount: number;
36
+ adminsCount: number;
37
+ coursesCount: number;
38
+ classesCount: number;
39
+ licenseLimit: number | null;
40
+ notes: string | null;
41
+ createdAt: string;
42
+ updatedAt: string;
43
+ }
44
+
45
+ export interface EnterpriseUser {
46
+ id: number;
47
+ userId: number;
48
+ name: string;
49
+ email: string;
50
+ role: EnterpriseUserRole;
51
+ status: EnterpriseUserStatus;
52
+ lastAccessAt: string | null;
53
+ }
54
+
55
+ export interface EnterpriseStudent {
56
+ id: number;
57
+ personId: number;
58
+ name: string | null;
59
+ email: string | null;
60
+ status: EnterpriseUserStatus;
61
+ createdAt: string | null;
62
+ }
63
+
64
+ export type EnterpriseCourseStatus = 'published' | 'draft' | 'archived';
65
+ export type EnterpriseClassStatus =
66
+ | 'open'
67
+ | 'ongoing'
68
+ | 'completed'
69
+ | 'cancelled';
70
+
71
+ export interface EnterpriseCourse {
72
+ id: number;
73
+ courseId?: number;
74
+ title: string;
75
+ slug: string | null;
76
+ status: EnterpriseCourseStatus;
77
+ level?: string | null;
78
+ modality?: string;
79
+ contractedAt?: string | null;
80
+ enrolledCount: number;
81
+ completionRate: number;
82
+ }
83
+
84
+ export interface EnterpriseClass {
85
+ id: number;
86
+ courseClassGroupId?: number;
87
+ code: string | null;
88
+ title?: string | null;
89
+ courseTitle: string | null;
90
+ startDate: string | null;
91
+ endDate: string | null;
92
+ capacity: number | null;
93
+ enrolledCount: number;
94
+ status: EnterpriseClassStatus;
95
+ deliveryMode?: string | null;
96
+ }
@@ -1,5 +1,5 @@
1
- import { redirect } from 'next/navigation';
2
-
3
- export default function LmsPage() {
4
- redirect('/lms/courses');
5
- }
1
+ import { redirect } from 'next/navigation';
2
+
3
+ export default function LmsPage() {
4
+ redirect('/lms/courses');
5
+ }
@@ -24,18 +24,18 @@ columns:
24
24
  - name: duration_hours
25
25
  type: int
26
26
  default: 0
27
- - name: status
28
- type: enum
29
- values: [draft, published, archived]
30
- default: draft
31
- - name: offering_type
32
- type: enum
33
- values: [scheduled, on_demand, blended]
34
- default: on_demand
35
- - name: primary_color
36
- type: varchar
37
- length: 9
38
- isNullable: true
27
+ - name: status
28
+ type: enum
29
+ values: [draft, published, archived]
30
+ default: draft
31
+ - name: offering_type
32
+ type: enum
33
+ values: [scheduled, on_demand, blended]
34
+ default: on_demand
35
+ - name: primary_color
36
+ type: varchar
37
+ length: 9
38
+ isNullable: true
39
39
  - name: primary_contrast_color
40
40
  type: varchar
41
41
  length: 9
@@ -82,6 +82,6 @@ columns:
82
82
  indices:
83
83
  - columns: [slug]
84
84
  isUnique: true
85
- - columns: [certificate_template_id]
86
- - columns: [status]
87
- - columns: [offering_type]
85
+ - columns: [certificate_template_id]
86
+ - columns: [status]
87
+ - columns: [offering_type]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hed-hog/lms",
3
- "version": "0.0.305",
3
+ "version": "0.0.306",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "dependencies": {
@@ -10,14 +10,14 @@
10
10
  "@nestjs/jwt": "^11",
11
11
  "@nestjs/mapped-types": "*",
12
12
  "@hed-hog/api-prisma": "0.0.6",
13
- "@hed-hog/api-types": "0.0.1",
13
+ "@hed-hog/contact": "0.0.306",
14
14
  "@hed-hog/api-pagination": "0.0.7",
15
- "@hed-hog/core": "0.0.305",
16
- "@hed-hog/finance": "0.0.305",
17
- "@hed-hog/category": "0.0.305",
18
- "@hed-hog/api": "0.0.6",
15
+ "@hed-hog/core": "0.0.306",
19
16
  "@hed-hog/api-locale": "0.0.14",
20
- "@hed-hog/contact": "0.0.305"
17
+ "@hed-hog/api-types": "0.0.1",
18
+ "@hed-hog/finance": "0.0.306",
19
+ "@hed-hog/category": "0.0.306",
20
+ "@hed-hog/api": "0.0.6"
21
21
  },
22
22
  "exports": {
23
23
  ".": {