@hed-hog/lms 0.0.320 → 0.0.322

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.
@@ -180,11 +180,11 @@ export declare class ClassGroupController {
180
180
  created_at: Date;
181
181
  updated_at: Date;
182
182
  status: import("@prisma/client").$Enums.course_enrollment_status_22007f5947_enum;
183
+ completed_at: Date | null;
184
+ person_id: number;
183
185
  course_id: number;
184
186
  course_class_group_id: number | null;
185
- completed_at: Date | null;
186
187
  final_score: number | null;
187
- person_id: number;
188
188
  enrolled_at: Date;
189
189
  progress_percent: number;
190
190
  }>;
@@ -333,11 +333,11 @@ export declare class ClassGroupController {
333
333
  description: string | null;
334
334
  created_at: Date;
335
335
  updated_at: Date;
336
+ file_id: number | null;
336
337
  course_class_group_id: number;
337
338
  title: string;
338
339
  course_class_session_id: number | null;
339
340
  material_type: import("@prisma/client").$Enums.course_class_group_material_material_type_6e6c399501_enum;
340
- file_id: number | null;
341
341
  url: string | null;
342
342
  sort_order: number;
343
343
  })[]>;
@@ -353,11 +353,11 @@ export declare class ClassGroupController {
353
353
  description: string | null;
354
354
  created_at: Date;
355
355
  updated_at: Date;
356
+ file_id: number | null;
356
357
  course_class_group_id: number;
357
358
  title: string;
358
359
  course_class_session_id: number | null;
359
360
  material_type: import("@prisma/client").$Enums.course_class_group_material_material_type_6e6c399501_enum;
360
- file_id: number | null;
361
361
  url: string | null;
362
362
  sort_order: number;
363
363
  }>;
@@ -202,11 +202,11 @@ export declare class ClassGroupService {
202
202
  created_at: Date;
203
203
  updated_at: Date;
204
204
  status: import("@prisma/client").$Enums.course_enrollment_status_22007f5947_enum;
205
+ completed_at: Date | null;
206
+ person_id: number;
205
207
  course_id: number;
206
208
  course_class_group_id: number | null;
207
- completed_at: Date | null;
208
209
  final_score: number | null;
209
- person_id: number;
210
210
  enrolled_at: Date;
211
211
  progress_percent: number;
212
212
  }>;
@@ -382,11 +382,11 @@ export declare class ClassGroupService {
382
382
  description: string | null;
383
383
  created_at: Date;
384
384
  updated_at: Date;
385
+ file_id: number | null;
385
386
  course_class_group_id: number;
386
387
  title: string;
387
388
  course_class_session_id: number | null;
388
389
  material_type: import("@prisma/client").$Enums.course_class_group_material_material_type_6e6c399501_enum;
389
- file_id: number | null;
390
390
  url: string | null;
391
391
  sort_order: number;
392
392
  })[]>;
@@ -402,11 +402,11 @@ export declare class ClassGroupService {
402
402
  description: string | null;
403
403
  created_at: Date;
404
404
  updated_at: Date;
405
+ file_id: number | null;
405
406
  course_class_group_id: number;
406
407
  title: string;
407
408
  course_class_session_id: number | null;
408
409
  material_type: import("@prisma/client").$Enums.course_class_group_material_material_type_6e6c399501_enum;
409
- file_id: number | null;
410
410
  url: string | null;
411
411
  sort_order: number;
412
412
  }>;
@@ -265,11 +265,11 @@ export declare class TrainingAdminController {
265
265
  created_at: Date;
266
266
  updated_at: Date;
267
267
  status: import("@prisma/client").$Enums.course_enrollment_status_22007f5947_enum;
268
+ completed_at: Date | null;
269
+ person_id: number;
268
270
  course_id: number;
269
271
  course_class_group_id: number | null;
270
- completed_at: Date | null;
271
272
  final_score: number | null;
272
- person_id: number;
273
273
  enrolled_at: Date;
274
274
  progress_percent: number;
275
275
  }>;
@@ -282,11 +282,11 @@ export declare class TrainingAdminController {
282
282
  created_at: Date;
283
283
  updated_at: Date;
284
284
  status: import("@prisma/client").$Enums.course_enrollment_status_22007f5947_enum;
285
+ completed_at: Date | null;
286
+ person_id: number;
285
287
  course_id: number;
286
288
  course_class_group_id: number | null;
287
- completed_at: Date | null;
288
289
  final_score: number | null;
289
- person_id: number;
290
290
  enrolled_at: Date;
291
291
  progress_percent: number;
292
292
  }>;
@@ -208,11 +208,11 @@ export declare class TrainingAdminService {
208
208
  created_at: Date;
209
209
  updated_at: Date;
210
210
  status: import("@prisma/client").$Enums.course_enrollment_status_22007f5947_enum;
211
+ completed_at: Date | null;
212
+ person_id: number;
211
213
  course_id: number;
212
214
  course_class_group_id: number | null;
213
- completed_at: Date | null;
214
215
  final_score: number | null;
215
- person_id: number;
216
216
  enrolled_at: Date;
217
217
  progress_percent: number;
218
218
  }>;
@@ -225,11 +225,11 @@ export declare class TrainingAdminService {
225
225
  created_at: Date;
226
226
  updated_at: Date;
227
227
  status: import("@prisma/client").$Enums.course_enrollment_status_22007f5947_enum;
228
+ completed_at: Date | null;
229
+ person_id: number;
228
230
  course_id: number;
229
231
  course_class_group_id: number | null;
230
- completed_at: Date | null;
231
232
  final_score: number | null;
232
- person_id: number;
233
233
  enrolled_at: Date;
234
234
  progress_percent: number;
235
235
  }>;
@@ -52,13 +52,13 @@ export declare class EvaluationController {
52
52
  description: string | null;
53
53
  created_at: Date;
54
54
  updated_at: Date;
55
+ target_type: import("@prisma/client").$Enums.evaluation_topic_target_type_d1e6ae34ec_enum;
56
+ is_active: boolean;
55
57
  course_id: number | null;
56
58
  exam_id: number | null;
57
59
  course_class_session_id: number | null;
58
60
  course_lesson_id: number | null;
59
61
  question_id: number | null;
60
- target_type: import("@prisma/client").$Enums.evaluation_topic_target_type_d1e6ae34ec_enum;
61
- is_active: boolean;
62
62
  }>;
63
63
  getTopicById(id: number): Promise<{
64
64
  id: number;
@@ -81,13 +81,13 @@ export declare class EvaluationController {
81
81
  description: string | null;
82
82
  created_at: Date;
83
83
  updated_at: Date;
84
+ target_type: import("@prisma/client").$Enums.evaluation_topic_target_type_d1e6ae34ec_enum;
85
+ is_active: boolean;
84
86
  course_id: number | null;
85
87
  exam_id: number | null;
86
88
  course_class_session_id: number | null;
87
89
  course_lesson_id: number | null;
88
90
  question_id: number | null;
89
- target_type: import("@prisma/client").$Enums.evaluation_topic_target_type_d1e6ae34ec_enum;
90
- is_active: boolean;
91
91
  }>;
92
92
  deleteTopic(id: number): Promise<{
93
93
  deleted: boolean;
@@ -105,13 +105,13 @@ export declare class EvaluationService {
105
105
  description: string | null;
106
106
  created_at: Date;
107
107
  updated_at: Date;
108
+ target_type: import("@prisma/client").$Enums.evaluation_topic_target_type_d1e6ae34ec_enum;
109
+ is_active: boolean;
108
110
  course_id: number | null;
109
111
  exam_id: number | null;
110
112
  course_class_session_id: number | null;
111
113
  course_lesson_id: number | null;
112
114
  question_id: number | null;
113
- target_type: import("@prisma/client").$Enums.evaluation_topic_target_type_d1e6ae34ec_enum;
114
- is_active: boolean;
115
115
  }>;
116
116
  updateTopic(id: number, dto: UpdateEvaluationTopicDto): Promise<{
117
117
  name: string;
@@ -120,13 +120,13 @@ export declare class EvaluationService {
120
120
  description: string | null;
121
121
  created_at: Date;
122
122
  updated_at: Date;
123
+ target_type: import("@prisma/client").$Enums.evaluation_topic_target_type_d1e6ae34ec_enum;
124
+ is_active: boolean;
123
125
  course_id: number | null;
124
126
  exam_id: number | null;
125
127
  course_class_session_id: number | null;
126
128
  course_lesson_id: number | null;
127
129
  question_id: number | null;
128
- target_type: import("@prisma/client").$Enums.evaluation_topic_target_type_d1e6ae34ec_enum;
129
- is_active: boolean;
130
130
  }>;
131
131
  reorderTopics(ids: number[]): Promise<{
132
132
  reordered: number;
@@ -1,8 +1,8 @@
1
- 'use client';
2
-
3
- import { cn } from '@/lib/utils';
4
- import { BookOpen } from 'lucide-react';
5
- import { useState } from 'react';
1
+ 'use client';
2
+
3
+ import { cn } from '@/lib/utils';
4
+ import { BookOpen } from 'lucide-react';
5
+ import { useState } from 'react';
6
6
 
7
7
  type CourseAvatarProps = {
8
8
  fileId?: number | null;
@@ -14,28 +14,28 @@ type CourseAvatarProps = {
14
14
  export function CourseAvatar({
15
15
  fileId,
16
16
  title,
17
- className,
18
- iconSize = 'size-6',
19
- }: CourseAvatarProps) {
20
- const [failedFileId, setFailedFileId] = useState<number | null>(null);
21
-
22
- const apiBaseUrl = String(process.env.NEXT_PUBLIC_API_BASE_URL || '').replace(
23
- /\/$/,
24
- ''
25
- );
26
- const url = fileId && apiBaseUrl ? `${apiBaseUrl}/file/open/${fileId}` : null;
27
- const imageFailed = !!fileId && failedFileId === fileId;
28
-
29
- if (url && !imageFailed) {
30
- return (
31
- <img
32
- src={url}
33
- alt={title}
34
- className={cn('shrink-0 object-cover', className)}
35
- onError={() => setFailedFileId(fileId ?? null)}
36
- />
37
- );
38
- }
17
+ className,
18
+ iconSize = 'size-6',
19
+ }: CourseAvatarProps) {
20
+ const [failedFileId, setFailedFileId] = useState<number | null>(null);
21
+
22
+ const apiBaseUrl = String(process.env.NEXT_PUBLIC_API_BASE_URL || '').replace(
23
+ /\/$/,
24
+ ''
25
+ );
26
+ const url = fileId && apiBaseUrl ? `${apiBaseUrl}/file/open/${fileId}` : null;
27
+ const imageFailed = !!fileId && failedFileId === fileId;
28
+
29
+ if (url && !imageFailed) {
30
+ return (
31
+ <img
32
+ src={url}
33
+ alt={title}
34
+ className={cn('shrink-0 object-cover', className)}
35
+ onError={() => setFailedFileId(fileId ?? null)}
36
+ />
37
+ );
38
+ }
39
39
 
40
40
  return (
41
41
  <div
@@ -183,11 +183,11 @@ export function EventSummaryPopover({
183
183
  <>
184
184
  <div className="fixed inset-0 z-40" onClick={handleClose} />
185
185
 
186
- <div
187
- className="fixed z-50 w-105 max-h-[calc(100vh-24px)] overflow-y-auto rounded-lg border border-border bg-card p-4 text-card-foreground shadow-lg outline-none"
188
- style={{ top: pos.top, left: pos.left }}
189
- onClick={(mouseEvent) => mouseEvent.stopPropagation()}
190
- >
186
+ <div
187
+ className="fixed z-50 w-105 max-h-[calc(100vh-24px)] overflow-y-auto rounded-lg border border-border bg-card p-4 text-card-foreground shadow-lg outline-none"
188
+ style={{ top: pos.top, left: pos.left }}
189
+ onClick={(mouseEvent) => mouseEvent.stopPropagation()}
190
+ >
191
191
  <div className="mb-3 flex items-center justify-between gap-2">
192
192
  <Badge variant={event.tipo === 'online' ? 'secondary' : 'outline'}>
193
193
  {tClasses(`type.${event.tipo}`)}
@@ -234,10 +234,10 @@ export function EventSummaryPopover({
234
234
  ) : null}
235
235
  </div>
236
236
 
237
- <div className="rounded-md border border-border bg-muted/30 p-3 text-sm">
238
- {loadingAttendance ? (
239
- <div className="flex items-center gap-2 text-muted-foreground">
240
- <Loader2 className="size-4 animate-spin" />
237
+ <div className="rounded-md border border-border bg-muted/30 p-3 text-sm">
238
+ {loadingAttendance ? (
239
+ <div className="flex items-center gap-2 text-muted-foreground">
240
+ <Loader2 className="size-4 animate-spin" />
241
241
  {t('attendance.loading')}
242
242
  </div>
243
243
  ) : hasAttendance ? (
@@ -247,12 +247,12 @@ export function EventSummaryPopover({
247
247
  total: attendanceSummary?.total ?? 0,
248
248
  })}
249
249
  </p>
250
- ) : (
251
- <div className="space-y-2">
252
- <div className="flex items-start gap-2 text-amber-700 dark:text-amber-300">
253
- <AlertTriangle className="mt-0.5 size-4" />
254
- <p className="text-sm">{t('attendance.missing')}</p>
255
- </div>
250
+ ) : (
251
+ <div className="space-y-2">
252
+ <div className="flex items-start gap-2 text-amber-700 dark:text-amber-300">
253
+ <AlertTriangle className="mt-0.5 size-4" />
254
+ <p className="text-sm">{t('attendance.missing')}</p>
255
+ </div>
256
256
  <Button
257
257
  type="button"
258
258
  variant="outline"
@@ -555,11 +555,11 @@ export function QuickCreateSessionPopover({
555
555
  <>
556
556
  <div className="fixed inset-0 z-40" onClick={handleClose} />
557
557
 
558
- <div
559
- className="fixed z-50 w-90 max-h-[calc(100vh-24px)] overflow-y-auto rounded-lg border border-border bg-card p-4 text-card-foreground shadow-lg outline-none"
560
- style={{ top: pos.top, left: pos.left }}
561
- onClick={(event) => event.stopPropagation()}
562
- >
558
+ <div
559
+ className="fixed z-50 w-90 max-h-[calc(100vh-24px)] overflow-y-auto rounded-lg border border-border bg-card p-4 text-card-foreground shadow-lg outline-none"
560
+ style={{ top: pos.top, left: pos.left }}
561
+ onClick={(event) => event.stopPropagation()}
562
+ >
563
563
  <div className="mb-3 flex items-center justify-between">
564
564
  <div className="flex items-center gap-2">
565
565
  <CalendarPlus className="size-4 text-muted-foreground" />
@@ -40,9 +40,9 @@ import {
40
40
  ShortcutsHelpTrigger,
41
41
  } from './structure/_components/shortcuts-help';
42
42
  import { useStructureStore } from './structure/_components/store';
43
- import { TreeDisplaySettingsPopover } from './structure/_components/tree-display-settings-popover';
44
- import { useCourseStructureShortcuts } from './structure/_components/use-course-structure-shortcuts';
45
- import { CourseAvatar } from '../../_components/course-avatar';
43
+ import { TreeDisplaySettingsPopover } from './structure/_components/tree-display-settings-popover';
44
+ import { useCourseStructureShortcuts } from './structure/_components/use-course-structure-shortcuts';
45
+ import { CourseAvatar } from '../../_components/course-avatar';
46
46
  import {
47
47
  useDuplicateLessonMutation,
48
48
  useDuplicateSessionMutation,
@@ -55,13 +55,13 @@ interface Props {
55
55
  params: Promise<{ id: string }>;
56
56
  }
57
57
 
58
- type ApiCourseSummary = {
59
- name?: string;
60
- title?: string;
61
- logoFileId?: number | null;
62
- enrollmentCount?: number;
63
- averageCompletion?: number;
64
- lessonCount?: number;
58
+ type ApiCourseSummary = {
59
+ name?: string;
60
+ title?: string;
61
+ logoFileId?: number | null;
62
+ enrollmentCount?: number;
63
+ averageCompletion?: number;
64
+ lessonCount?: number;
65
65
  sessionCount?: number;
66
66
  };
67
67
 
@@ -263,17 +263,17 @@ export default function CourseStructurePage({ params }: Props) {
263
263
  { label: 'Cursos', href: '/lms/courses' },
264
264
  { label: course.name },
265
265
  ]}
266
- title={
267
- <span className="flex min-w-0 items-center gap-3">
268
- <CourseAvatar
269
- fileId={courseSummary?.logoFileId}
270
- title={courseSummary?.title ?? course.name}
271
- className="size-10 rounded-lg"
272
- iconSize="size-5"
273
- />
274
- <span className="min-w-0 truncate">{course.name}</span>
275
- </span>
276
- }
266
+ title={
267
+ <span className="flex min-w-0 items-center gap-3">
268
+ <CourseAvatar
269
+ fileId={courseSummary?.logoFileId}
270
+ title={courseSummary?.title ?? course.name}
271
+ className="size-10 rounded-lg"
272
+ iconSize="size-5"
273
+ />
274
+ <span className="min-w-0 truncate">{course.name}</span>
275
+ </span>
276
+ }
277
277
  extraContent={metricsBadges}
278
278
  actions={
279
279
  <>
@@ -843,16 +843,16 @@ export function EditorCourse() {
843
843
  onValueChange={setActiveTab}
844
844
  className="flex flex-col flex-1 min-h-0"
845
845
  >
846
- <TabsList className="mx-3 mt-3 h-auto shrink-0 grid w-[calc(100%-1.5rem)] grid-cols-4 rounded-lg bg-muted/80 p-1">
847
- {(['estrutura', 'sobre', 'midia', 'extra'] as const).map((tab) => (
848
- <TabsTrigger
849
- key={tab}
850
- value={tab}
851
- className="h-8 px-2 text-xs font-medium"
852
- >
853
- {tab === 'estrutura'
854
- ? 'Estrutura'
855
- : tab === 'sobre'
846
+ <TabsList className="mx-3 mt-3 h-auto shrink-0 grid w-[calc(100%-1.5rem)] grid-cols-4 rounded-lg bg-muted/80 p-1">
847
+ {(['estrutura', 'sobre', 'midia', 'extra'] as const).map((tab) => (
848
+ <TabsTrigger
849
+ key={tab}
850
+ value={tab}
851
+ className="h-8 px-2 text-xs font-medium"
852
+ >
853
+ {tab === 'estrutura'
854
+ ? 'Estrutura'
855
+ : tab === 'sobre'
856
856
  ? 'Sobre'
857
857
  : tab === 'midia'
858
858
  ? 'Mídia'