@hed-hog/lms 0.0.310 → 0.0.311

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.
@@ -944,7 +944,7 @@ export function ClassFormSheet({
944
944
  setCustomRecurrenceDialogOpen(false);
945
945
  }
946
946
 
947
- const handleProfessorCreated = async (instructor: {
947
+ const handleProfessorCreated = (instructor: {
948
948
  id: number;
949
949
  personId: number;
950
950
  name: string;
@@ -960,7 +960,6 @@ export function ClassFormSheet({
960
960
  shouldTouch: true,
961
961
  shouldValidate: true,
962
962
  });
963
- await refetchProfessorOptions();
964
963
  };
965
964
 
966
965
  async function onSubmitCourse(data: CourseSheetFormValues) {
@@ -475,17 +475,14 @@ export function EditorLesson({ lessonId }: EditorLessonProps) {
475
475
  try {
476
476
  const results = await Promise.allSettled(
477
477
  files.map((f) =>
478
- uploadFile(request, f).then(
479
- (res) =>
480
- ({
481
- id: String(res.id),
482
- name: f.name,
483
- size: formatFileSize(f.size),
484
- type: f.type || f.name.split('.').pop() || 'file',
485
- public: false,
486
- url: undefined,
487
- }) satisfies Resource
488
- )
478
+ uploadFile(request, f).then<Resource>((res) => ({
479
+ id: String(res.id),
480
+ name: f.name,
481
+ size: formatFileSize(f.size),
482
+ type: f.type || f.name.split('.').pop() || 'file',
483
+ public: false,
484
+ url: undefined,
485
+ }))
489
486
  )
490
487
  );
491
488
  const succeeded = results
@@ -25,6 +25,7 @@ import type {
25
25
  export const MOCK_COURSE: Course = {
26
26
  id: 'course-1',
27
27
  code: 'REACT-ADV',
28
+ name: 'React Avancado',
28
29
  title: 'React Avancado',
29
30
  description:
30
31
  'Domine os conceitos avancados do React: hooks, patterns, performance e gerenciamento de estado moderno.',
@@ -258,6 +258,7 @@ export const useStructureStore = create<StructureState>((set, get) => ({
258
258
  courseId: '',
259
259
  course: {
260
260
  id: '',
261
+ code: '',
261
262
  name: '',
262
263
  title: 'Carregando...',
263
264
  description: '',
@@ -19,6 +19,7 @@ export type Visibility = 'publico' | 'privado' | 'restrito';
19
19
 
20
20
  export interface Course {
21
21
  id: string;
22
+ code: string;
22
23
  name: string;
23
24
  title: string;
24
25
  description: string;
@@ -91,6 +91,7 @@ function normalizeResource(raw: ApiLessonResource): Resource {
91
91
  export function normalizeCourse(raw: ApiCourse): Course {
92
92
  return {
93
93
  id: raw.id,
94
+ code: raw.slug || raw.id,
94
95
  name: raw.name ?? raw.slug,
95
96
  title: raw.titulo,
96
97
  description: raw.descricao,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hed-hog/lms",
3
- "version": "0.0.310",
3
+ "version": "0.0.311",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "dependencies": {
@@ -9,15 +9,15 @@
9
9
  "@nestjs/core": "^11",
10
10
  "@nestjs/jwt": "^11",
11
11
  "@nestjs/mapped-types": "*",
12
- "@hed-hog/api-types": "0.0.1",
13
- "@hed-hog/api-prisma": "0.0.6",
12
+ "@hed-hog/contact": "0.0.311",
14
13
  "@hed-hog/api-pagination": "0.0.7",
14
+ "@hed-hog/api-types": "0.0.1",
15
15
  "@hed-hog/api": "0.0.6",
16
- "@hed-hog/contact": "0.0.310",
17
16
  "@hed-hog/api-locale": "0.0.14",
18
- "@hed-hog/finance": "0.0.310",
19
- "@hed-hog/core": "0.0.310",
20
- "@hed-hog/category": "0.0.310"
17
+ "@hed-hog/finance": "0.0.311",
18
+ "@hed-hog/category": "0.0.311",
19
+ "@hed-hog/core": "0.0.311",
20
+ "@hed-hog/api-prisma": "0.0.6"
21
21
  },
22
22
  "exports": {
23
23
  ".": {