@hed-hog/lms 0.0.320 → 0.0.321

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
+ person_id: number;
183
184
  course_id: number;
184
185
  course_class_group_id: number | null;
185
186
  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
  }>;
@@ -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
+ person_id: number;
205
206
  course_id: number;
206
207
  course_class_group_id: number | null;
207
208
  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
  }>;
@@ -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
+ person_id: number;
268
269
  course_id: number;
269
270
  course_class_group_id: number | null;
270
271
  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
+ person_id: number;
285
286
  course_id: number;
286
287
  course_class_group_id: number | null;
287
288
  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
+ person_id: number;
211
212
  course_id: number;
212
213
  course_class_group_id: number | null;
213
214
  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
+ person_id: number;
228
229
  course_id: number;
229
230
  course_class_group_id: number | null;
230
231
  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
  }>;
@@ -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'