analytica-frontend-lib 1.2.86 → 1.2.87
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.
- package/dist/ActivitiesHistory/index.js.map +1 -1
- package/dist/ActivitiesHistory/index.mjs.map +1 -1
- package/dist/NotificationCard/index.js +1 -1
- package/dist/NotificationCard/index.js.map +1 -1
- package/dist/NotificationCard/index.mjs +1 -1
- package/dist/NotificationCard/index.mjs.map +1 -1
- package/dist/RecommendedLessonsHistory/index.d.ts +1 -1
- package/dist/RecommendedLessonsHistory/index.d.ts.map +1 -1
- package/dist/RecommendedLessonsHistory/index.js +148 -142
- package/dist/RecommendedLessonsHistory/index.js.map +1 -1
- package/dist/RecommendedLessonsHistory/index.mjs +147 -141
- package/dist/RecommendedLessonsHistory/index.mjs.map +1 -1
- package/dist/hooks/useActivitiesHistory/index.js.map +1 -1
- package/dist/hooks/useActivitiesHistory/index.mjs.map +1 -1
- package/dist/hooks/useNotifications.d.ts +2 -2
- package/dist/hooks/useNotifications.d.ts.map +1 -1
- package/dist/hooks/useRecommendedClassDrafts/index.d.ts +57 -0
- package/dist/hooks/useRecommendedClassDrafts/index.d.ts.map +1 -0
- package/dist/hooks/{useGoalDrafts → useRecommendedClassDrafts}/index.js +40 -40
- package/dist/hooks/useRecommendedClassDrafts/index.js.map +1 -0
- package/dist/hooks/{useGoalDrafts → useRecommendedClassDrafts}/index.mjs +33 -33
- package/dist/hooks/useRecommendedClassDrafts/index.mjs.map +1 -0
- package/dist/hooks/useRecommendedClassDrafts.d.ts +57 -0
- package/dist/hooks/useRecommendedClassDrafts.d.ts.map +1 -0
- package/dist/hooks/{useGoalModels.d.ts → useRecommendedClassModels.d.ts} +32 -32
- package/dist/hooks/useRecommendedClassModels.d.ts.map +1 -0
- package/dist/hooks/useRecommendedLessonDetails.d.ts +44 -44
- package/dist/hooks/useRecommendedLessonDetails.d.ts.map +1 -1
- package/dist/hooks/useRecommendedLessons/index.d.ts +35 -35
- package/dist/hooks/useRecommendedLessons/index.d.ts.map +1 -1
- package/dist/hooks/useRecommendedLessons/index.js +41 -41
- package/dist/hooks/useRecommendedLessons/index.js.map +1 -1
- package/dist/hooks/useRecommendedLessons/index.mjs +37 -37
- package/dist/hooks/useRecommendedLessons/index.mjs.map +1 -1
- package/dist/hooks/useRecommendedLessons.d.ts +35 -35
- package/dist/hooks/useRecommendedLessons.d.ts.map +1 -1
- package/dist/hooks/useRecommendedLessonsPage/index.d.ts +21 -21
- package/dist/hooks/useRecommendedLessonsPage/index.d.ts.map +1 -1
- package/dist/hooks/useRecommendedLessonsPage/index.js +39 -33
- package/dist/hooks/useRecommendedLessonsPage/index.js.map +1 -1
- package/dist/hooks/useRecommendedLessonsPage/index.mjs +39 -33
- package/dist/hooks/useRecommendedLessonsPage/index.mjs.map +1 -1
- package/dist/hooks/useRecommendedLessonsPage.d.ts +21 -21
- package/dist/hooks/useRecommendedLessonsPage.d.ts.map +1 -1
- package/dist/index.d.ts +11 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +304 -288
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +278 -262
- package/dist/index.mjs.map +1 -1
- package/dist/store/notificationStore.d.ts.map +1 -1
- package/dist/types/activitiesHistory/index.js.map +1 -1
- package/dist/types/activitiesHistory/index.mjs.map +1 -1
- package/dist/types/common.d.ts +2 -2
- package/dist/types/notifications.d.ts +5 -5
- package/dist/types/notifications.d.ts.map +1 -1
- package/dist/types/recommendedLessons/index.d.ts +112 -112
- package/dist/types/recommendedLessons/index.d.ts.map +1 -1
- package/dist/types/recommendedLessons/index.js +25 -25
- package/dist/types/recommendedLessons/index.js.map +1 -1
- package/dist/types/recommendedLessons/index.mjs +17 -17
- package/dist/types/recommendedLessons/index.mjs.map +1 -1
- package/dist/types/recommendedLessons.d.ts +112 -112
- package/dist/types/recommendedLessons.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/hooks/useGoalDrafts/index.d.ts +0 -57
- package/dist/hooks/useGoalDrafts/index.d.ts.map +0 -1
- package/dist/hooks/useGoalDrafts/index.js.map +0 -1
- package/dist/hooks/useGoalDrafts/index.mjs.map +0 -1
- package/dist/hooks/useGoalDrafts.d.ts +0 -57
- package/dist/hooks/useGoalDrafts.d.ts.map +0 -1
- package/dist/hooks/useGoalModels.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -85,9 +85,9 @@ __export(src_exports, {
|
|
|
85
85
|
CorrectActivityModal: () => CorrectActivityModal_default,
|
|
86
86
|
CreateActivity: () => CreateActivity,
|
|
87
87
|
DEFAULT_ACTIVITIES_PAGINATION: () => DEFAULT_ACTIVITIES_PAGINATION,
|
|
88
|
-
DEFAULT_GOAL_DRAFTS_PAGINATION: () => DEFAULT_GOAL_DRAFTS_PAGINATION,
|
|
89
|
-
DEFAULT_GOAL_MODELS_PAGINATION: () => DEFAULT_GOAL_MODELS_PAGINATION,
|
|
90
88
|
DEFAULT_MODELS_PAGINATION: () => DEFAULT_MODELS_PAGINATION,
|
|
89
|
+
DEFAULT_RECOMMENDED_CLASS_DRAFTS_PAGINATION: () => DEFAULT_RECOMMENDED_CLASS_DRAFTS_PAGINATION,
|
|
90
|
+
DEFAULT_RECOMMENDED_CLASS_MODELS_PAGINATION: () => DEFAULT_RECOMMENDED_CLASS_MODELS_PAGINATION,
|
|
91
91
|
DIFFICULTY_LEVEL_ENUM: () => DIFFICULTY_LEVEL_ENUM,
|
|
92
92
|
DateTimeInput: () => DateTimeInput_default,
|
|
93
93
|
Divider: () => Divider_default,
|
|
@@ -101,16 +101,7 @@ __export(src_exports, {
|
|
|
101
101
|
EmptyState: () => EmptyState_default,
|
|
102
102
|
FileAttachment: () => FileAttachment_default,
|
|
103
103
|
FilterModal: () => FilterModal,
|
|
104
|
-
GOAL_ACTIVITY_STATUS: () => GOAL_ACTIVITY_STATUS,
|
|
105
|
-
GOAL_FILTER_STATUS_OPTIONS: () => GOAL_FILTER_STATUS_OPTIONS,
|
|
106
|
-
GOAL_STATUS_OPTIONS: () => GOAL_STATUS_OPTIONS,
|
|
107
104
|
GeneralActivityStatus: () => ActivityStatus2,
|
|
108
|
-
GoalApiStatus: () => GenericApiStatus,
|
|
109
|
-
GoalBadgeActionType: () => BadgeActionType,
|
|
110
|
-
GoalDisplayStatus: () => GenericDisplayStatus,
|
|
111
|
-
GoalDraftType: () => GoalDraftType,
|
|
112
|
-
GoalDraftsTab: () => GoalDraftsTab,
|
|
113
|
-
GoalPageTab: () => GoalPageTab,
|
|
114
105
|
IconButton: () => IconButton_default,
|
|
115
106
|
IconRender: () => IconRender_default,
|
|
116
107
|
IconRoundedButton: () => IconRoundedButton_default,
|
|
@@ -170,10 +161,19 @@ __export(src_exports, {
|
|
|
170
161
|
QuizResultTitle: () => QuizResultTitle,
|
|
171
162
|
QuizTitle: () => QuizTitle,
|
|
172
163
|
QuizTrueOrFalse: () => QuizTrueOrFalse,
|
|
164
|
+
RECOMMENDED_CLASS_ACTIVITY_STATUS: () => RECOMMENDED_CLASS_ACTIVITY_STATUS,
|
|
165
|
+
RECOMMENDED_CLASS_FILTER_STATUS_OPTIONS: () => RECOMMENDED_CLASS_FILTER_STATUS_OPTIONS,
|
|
166
|
+
RECOMMENDED_CLASS_STATUS_OPTIONS: () => RECOMMENDED_CLASS_STATUS_OPTIONS,
|
|
173
167
|
Radio: () => Radio_default,
|
|
174
168
|
RadioGroup: () => RadioGroup,
|
|
175
169
|
RadioGroupItem: () => RadioGroupItem,
|
|
176
170
|
RankingCard: () => RankingCard,
|
|
171
|
+
RecommendedClassApiStatus: () => GenericApiStatus,
|
|
172
|
+
RecommendedClassBadgeActionType: () => BadgeActionType,
|
|
173
|
+
RecommendedClassDisplayStatus: () => GenericDisplayStatus,
|
|
174
|
+
RecommendedClassDraftType: () => RecommendedClassDraftType,
|
|
175
|
+
RecommendedClassDraftsTab: () => RecommendedClassDraftsTab,
|
|
176
|
+
RecommendedClassPageTab: () => RecommendedClassPageTab,
|
|
177
177
|
RecommendedLessonDetails: () => RecommendedLessonDetails_default,
|
|
178
178
|
RecommendedLessonsHistory: () => RecommendedLessonsHistory,
|
|
179
179
|
STUDENT_ACTIVITY_STATUS: () => STUDENT_ACTIVITY_STATUS,
|
|
@@ -233,11 +233,11 @@ __export(src_exports, {
|
|
|
233
233
|
createActivitiesHistoryHook: () => createActivitiesHistoryHook,
|
|
234
234
|
createActivityFiltersDataHook: () => createActivityFiltersDataHook,
|
|
235
235
|
createActivityModelsHook: () => createActivityModelsHook,
|
|
236
|
-
createGoalDraftsHook: () => createGoalDraftsHook,
|
|
237
|
-
createGoalModelsHook: () => createGoalModelsHook,
|
|
238
236
|
createNotificationStore: () => createNotificationStore,
|
|
239
237
|
createNotificationsHook: () => createNotificationsHook,
|
|
240
238
|
createQuestionsListHook: () => createQuestionsListHook,
|
|
239
|
+
createRecommendedClassDraftsHook: () => createRecommendedClassDraftsHook,
|
|
240
|
+
createRecommendedClassModelsHook: () => createRecommendedClassModelsHook,
|
|
241
241
|
createRecommendedLessonDetailsHook: () => createRecommendedLessonDetailsHook,
|
|
242
242
|
createRecommendedLessonsHistoryHook: () => createRecommendedLessonsHistoryHook,
|
|
243
243
|
createRecommendedLessonsPageHook: () => createRecommendedLessonsPageHook,
|
|
@@ -246,17 +246,17 @@ __export(src_exports, {
|
|
|
246
246
|
createUseActivityModels: () => createUseActivityModels,
|
|
247
247
|
createUseChat: () => createUseChat,
|
|
248
248
|
createUseChatRooms: () => createUseChatRooms,
|
|
249
|
-
createUseGoalDrafts: () => createUseGoalDrafts,
|
|
250
|
-
createUseGoalModels: () => createUseGoalModels,
|
|
251
249
|
createUseNotificationStore: () => createUseNotificationStore,
|
|
252
250
|
createUseNotifications: () => createUseNotifications,
|
|
253
251
|
createUseQuestionsList: () => createUseQuestionsList,
|
|
252
|
+
createUseRecommendedClassDrafts: () => createUseRecommendedClassDrafts,
|
|
253
|
+
createUseRecommendedClassModels: () => createUseRecommendedClassModels,
|
|
254
254
|
createUseRecommendedLessonDetails: () => createUseRecommendedLessonDetails,
|
|
255
255
|
createUseRecommendedLessonsHistory: () => createUseRecommendedLessonsHistory,
|
|
256
256
|
createUseRecommendedLessonsPage: () => createUseRecommendedLessonsPage,
|
|
257
257
|
createZustandAuthAdapter: () => createZustandAuthAdapter,
|
|
258
258
|
deriveStudentStatus: () => deriveStudentStatus,
|
|
259
|
-
|
|
259
|
+
determineRecommendedClassStatus: () => determineRecommendedClassStatus,
|
|
260
260
|
formatDateToBrazilian: () => formatDateToBrazilian,
|
|
261
261
|
formatDaysToComplete: () => formatDaysToComplete,
|
|
262
262
|
formatFileSize: () => formatFileSize,
|
|
@@ -271,8 +271,8 @@ __export(src_exports, {
|
|
|
271
271
|
getChatWsUrl: () => getChatWsUrl,
|
|
272
272
|
getClassOptionsFromUserData: () => getClassOptionsFromUserData,
|
|
273
273
|
getDeviceType: () => getDeviceType,
|
|
274
|
-
getGoalStatusBadgeAction: () => getGoalStatusBadgeAction,
|
|
275
274
|
getQuestionStatusBadgeConfig: () => getQuestionStatusBadgeConfig,
|
|
275
|
+
getRecommendedClassStatusBadgeAction: () => getRecommendedClassStatusBadgeAction,
|
|
276
276
|
getRootDomain: () => getRootDomain,
|
|
277
277
|
getSchoolOptionsFromUserData: () => getSchoolOptionsFromUserData,
|
|
278
278
|
getSchoolYearOptionsFromUserData: () => getSchoolYearOptionsFromUserData,
|
|
@@ -288,16 +288,12 @@ __export(src_exports, {
|
|
|
288
288
|
getSubjectInfo: () => getSubjectInfo,
|
|
289
289
|
getSubjectName: () => getSubjectName,
|
|
290
290
|
getSubjectOptionsFromUserData: () => getSubjectOptionsFromUserData,
|
|
291
|
-
goalApiResponseSchema: () => goalApiResponseSchema,
|
|
292
|
-
goalDetailsApiResponseSchema: () => goalDetailsApiResponseSchema,
|
|
293
|
-
goalModelsApiResponseSchema: () => goalModelsApiResponseSchema,
|
|
294
|
-
goalsHistoryApiResponseSchema: () => goalsHistoryApiResponseSchema,
|
|
295
291
|
handleActivityFetchError: () => handleActivityFetchError,
|
|
296
|
-
handleGoalDraftFetchError: () => handleGoalDraftFetchError,
|
|
297
|
-
handleGoalFetchError: () => handleGoalFetchError,
|
|
298
|
-
handleGoalModelFetchError: () => handleGoalModelFetchError,
|
|
299
292
|
handleLessonDetailsFetchError: () => handleLessonDetailsFetchError,
|
|
300
293
|
handleModelFetchError: () => handleModelFetchError,
|
|
294
|
+
handleRecommendedClassDraftFetchError: () => handleRecommendedClassDraftFetchError,
|
|
295
|
+
handleRecommendedClassFetchError: () => handleRecommendedClassFetchError,
|
|
296
|
+
handleRecommendedClassModelFetchError: () => handleRecommendedClassModelFetchError,
|
|
301
297
|
historyApiResponseSchema: () => historyApiResponseSchema,
|
|
302
298
|
isChatUserInfoValid: () => isChatUserInfoValid,
|
|
303
299
|
isDeadlinePassed: () => isDeadlinePassed,
|
|
@@ -313,6 +309,10 @@ __export(src_exports, {
|
|
|
313
309
|
mapSubjectEnumToName: () => mapSubjectEnumToName,
|
|
314
310
|
mapSubjectNameToEnum: () => mapSubjectNameToEnum,
|
|
315
311
|
questionTypeLabels: () => questionTypeLabels,
|
|
312
|
+
recommendedClassApiResponseSchema: () => recommendedClassApiResponseSchema,
|
|
313
|
+
recommendedClassDetailsApiResponseSchema: () => recommendedClassDetailsApiResponseSchema,
|
|
314
|
+
recommendedClassHistoryApiResponseSchema: () => recommendedClassHistoryApiResponseSchema,
|
|
315
|
+
recommendedClassModelsApiResponseSchema: () => recommendedClassModelsApiResponseSchema,
|
|
316
316
|
renderSubjectCell: () => renderSubjectCell,
|
|
317
317
|
studentActivityStatusSchema: () => studentActivityStatusSchema,
|
|
318
318
|
supportSchema: () => supportSchema,
|
|
@@ -320,9 +320,9 @@ __export(src_exports, {
|
|
|
320
320
|
toggleArrayItem: () => toggleArrayItem,
|
|
321
321
|
toggleSingleValue: () => toggleSingleValue,
|
|
322
322
|
transformActivityToTableItem: () => transformActivityToTableItem,
|
|
323
|
-
transformGoalModelToTableItem: () => transformGoalModelToTableItem,
|
|
324
|
-
transformGoalToTableItem: () => transformGoalToTableItem,
|
|
325
323
|
transformModelToTableItem: () => transformModelToTableItem,
|
|
324
|
+
transformRecommendedClassModelToTableItem: () => transformRecommendedClassModelToTableItem,
|
|
325
|
+
transformRecommendedClassToTableItem: () => transformRecommendedClassToTableItem,
|
|
326
326
|
useActivityDetails: () => useActivityDetails,
|
|
327
327
|
useAlertFormStore: () => useAlertFormStore,
|
|
328
328
|
useApiConfig: () => useApiConfig,
|
|
@@ -12974,7 +12974,7 @@ var import_middleware3 = require("zustand/middleware");
|
|
|
12974
12974
|
var NotificationEntityType = /* @__PURE__ */ ((NotificationEntityType2) => {
|
|
12975
12975
|
NotificationEntityType2["ACTIVITY"] = "ACTIVITY";
|
|
12976
12976
|
NotificationEntityType2["TRAIL"] = "TRAIL";
|
|
12977
|
-
NotificationEntityType2["
|
|
12977
|
+
NotificationEntityType2["RECOMMENDEDCLASS"] = "RECOMMENDEDCLASS";
|
|
12978
12978
|
return NotificationEntityType2;
|
|
12979
12979
|
})(NotificationEntityType || {});
|
|
12980
12980
|
|
|
@@ -12983,8 +12983,7 @@ var mapBackendNotification = (backendNotification) => {
|
|
|
12983
12983
|
let type = "GENERAL";
|
|
12984
12984
|
let entityType = null;
|
|
12985
12985
|
if (backendNotification.entityType) {
|
|
12986
|
-
|
|
12987
|
-
switch (backendEntityType) {
|
|
12986
|
+
switch (backendNotification.entityType.toUpperCase()) {
|
|
12988
12987
|
case "ACTIVITY" /* ACTIVITY */:
|
|
12989
12988
|
type = "ACTIVITY";
|
|
12990
12989
|
entityType = "ACTIVITY" /* ACTIVITY */;
|
|
@@ -12993,9 +12992,9 @@ var mapBackendNotification = (backendNotification) => {
|
|
|
12993
12992
|
type = "TRAIL";
|
|
12994
12993
|
entityType = "TRAIL" /* TRAIL */;
|
|
12995
12994
|
break;
|
|
12996
|
-
case "
|
|
12997
|
-
type = "
|
|
12998
|
-
entityType = "
|
|
12995
|
+
case "RECOMMENDEDCLASS" /* RECOMMENDEDCLASS */:
|
|
12996
|
+
type = "RECOMMENDEDCLASS";
|
|
12997
|
+
entityType = "RECOMMENDEDCLASS" /* RECOMMENDEDCLASS */;
|
|
12999
12998
|
break;
|
|
13000
12999
|
default:
|
|
13001
13000
|
break;
|
|
@@ -13012,7 +13011,7 @@ var mapBackendNotification = (backendNotification) => {
|
|
|
13012
13011
|
entityId: backendNotification.entityId,
|
|
13013
13012
|
sender: backendNotification.sender,
|
|
13014
13013
|
activity: backendNotification.activity,
|
|
13015
|
-
|
|
13014
|
+
recommendedClass: backendNotification.recommendedClass,
|
|
13016
13015
|
actionLink: backendNotification.actionLink ?? null
|
|
13017
13016
|
};
|
|
13018
13017
|
};
|
|
@@ -13388,7 +13387,7 @@ var NotificationList = ({
|
|
|
13388
13387
|
groupedNotifications.map((group, idx) => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex flex-col", children: [
|
|
13389
13388
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "flex items-end px-4 py-6 pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("h4", { className: "text-lg font-bold text-text-500 flex-grow", children: group.label }) }),
|
|
13390
13389
|
group.notifications.map((notification) => {
|
|
13391
|
-
const isGlobalNotification = !notification.entityType && !notification.entityId && !notification.activity && !notification.
|
|
13390
|
+
const isGlobalNotification = !notification.entityType && !notification.entityId && !notification.activity && !notification.recommendedClass;
|
|
13392
13391
|
let navigationHandler;
|
|
13393
13392
|
if (isGlobalNotification) {
|
|
13394
13393
|
navigationHandler = () => handleGlobalNotificationClick(notification);
|
|
@@ -13926,7 +13925,8 @@ var createUseNotifications = (apiClient) => {
|
|
|
13926
13925
|
case "ACTIVITY" /* ACTIVITY */:
|
|
13927
13926
|
window.location.href = `/atividades/${entityId}`;
|
|
13928
13927
|
break;
|
|
13929
|
-
case "
|
|
13928
|
+
case "RECOMMENDEDCLASS" /* RECOMMENDEDCLASS */:
|
|
13929
|
+
case "RECOMMENDEDCLASS":
|
|
13930
13930
|
window.location.href = `/painel/trilhas/${entityId}`;
|
|
13931
13931
|
break;
|
|
13932
13932
|
default:
|
|
@@ -13943,7 +13943,8 @@ var createUseNotifications = (apiClient) => {
|
|
|
13943
13943
|
switch (entityType.toUpperCase()) {
|
|
13944
13944
|
case "ACTIVITY" /* ACTIVITY */:
|
|
13945
13945
|
return "Ver atividade";
|
|
13946
|
-
case "
|
|
13946
|
+
case "RECOMMENDEDCLASS" /* RECOMMENDEDCLASS */:
|
|
13947
|
+
case "RECOMMENDEDCLASS":
|
|
13947
13948
|
return "Ver meta";
|
|
13948
13949
|
default:
|
|
13949
13950
|
return void 0;
|
|
@@ -26281,12 +26282,12 @@ var import_react83 = require("react");
|
|
|
26281
26282
|
var import_phosphor_react52 = require("phosphor-react");
|
|
26282
26283
|
|
|
26283
26284
|
// src/types/recommendedLessons.ts
|
|
26284
|
-
var
|
|
26285
|
-
var
|
|
26285
|
+
var getRecommendedClassStatusBadgeAction = (status) => getStatusBadgeAction(status);
|
|
26286
|
+
var RECOMMENDED_CLASS_FILTER_STATUS_OPTIONS = [
|
|
26286
26287
|
{ id: "VENCIDA" /* VENCIDA */, name: "Vencida" },
|
|
26287
26288
|
{ id: "A_VENCER" /* A_VENCER */, name: "Ativa" }
|
|
26288
26289
|
];
|
|
26289
|
-
var
|
|
26290
|
+
var RECOMMENDED_CLASS_STATUS_OPTIONS = [
|
|
26290
26291
|
{ id: "A_VENCER" /* A_VENCER */, name: "A Vencer" },
|
|
26291
26292
|
{ id: "VENCIDA" /* VENCIDA */, name: "Vencida" },
|
|
26292
26293
|
{ id: "CONCLUIDA" /* CONCLUIDA */, name: "Conclu\xEDda" }
|
|
@@ -26326,35 +26327,35 @@ var formatDaysToComplete = (daysToComplete) => {
|
|
|
26326
26327
|
if (daysToComplete === 1) return "1 dia";
|
|
26327
26328
|
return `${daysToComplete} dias`;
|
|
26328
26329
|
};
|
|
26329
|
-
var
|
|
26330
|
+
var RECOMMENDED_CLASS_ACTIVITY_STATUS = {
|
|
26330
26331
|
PENDENTE: "PENDENTE",
|
|
26331
26332
|
CONCLUIDA: "CONCLUIDA",
|
|
26332
26333
|
EXPIRADA: "EXPIRADA"
|
|
26333
26334
|
};
|
|
26334
|
-
var
|
|
26335
|
-
|
|
26336
|
-
|
|
26337
|
-
return
|
|
26338
|
-
})(
|
|
26335
|
+
var RecommendedClassDraftType = /* @__PURE__ */ ((RecommendedClassDraftType2) => {
|
|
26336
|
+
RecommendedClassDraftType2["MODELO"] = "MODELO";
|
|
26337
|
+
RecommendedClassDraftType2["RASCUNHO"] = "RASCUNHO";
|
|
26338
|
+
return RecommendedClassDraftType2;
|
|
26339
|
+
})(RecommendedClassDraftType || {});
|
|
26339
26340
|
|
|
26340
26341
|
// src/hooks/useRecommendedLessons.ts
|
|
26341
26342
|
var import_react79 = require("react");
|
|
26342
26343
|
var import_zod5 = require("zod");
|
|
26343
26344
|
var import_dayjs4 = __toESM(require("dayjs"));
|
|
26344
|
-
var
|
|
26345
|
+
var recommendedClassSubjectSchema = import_zod5.z.object({
|
|
26345
26346
|
id: import_zod5.z.string().uuid(),
|
|
26346
26347
|
name: import_zod5.z.string()
|
|
26347
26348
|
}).nullable();
|
|
26348
|
-
var
|
|
26349
|
+
var recommendedClassCreatorSchema = import_zod5.z.object({
|
|
26349
26350
|
id: import_zod5.z.string().uuid(),
|
|
26350
26351
|
name: import_zod5.z.string()
|
|
26351
26352
|
}).nullable();
|
|
26352
|
-
var
|
|
26353
|
+
var recommendedClassStatsSchema = import_zod5.z.object({
|
|
26353
26354
|
totalStudents: import_zod5.z.number(),
|
|
26354
26355
|
completedCount: import_zod5.z.number(),
|
|
26355
26356
|
completionPercentage: import_zod5.z.number()
|
|
26356
26357
|
});
|
|
26357
|
-
var
|
|
26358
|
+
var recommendedClassBreakdownSchema = import_zod5.z.object({
|
|
26358
26359
|
classId: import_zod5.z.string().uuid(),
|
|
26359
26360
|
className: import_zod5.z.string(),
|
|
26360
26361
|
schoolId: import_zod5.z.string(),
|
|
@@ -26362,7 +26363,7 @@ var goalBreakdownSchema = import_zod5.z.object({
|
|
|
26362
26363
|
studentCount: import_zod5.z.number(),
|
|
26363
26364
|
completedCount: import_zod5.z.number()
|
|
26364
26365
|
});
|
|
26365
|
-
var
|
|
26366
|
+
var recommendedClassDataSchema = import_zod5.z.object({
|
|
26366
26367
|
id: import_zod5.z.string().uuid(),
|
|
26367
26368
|
title: import_zod5.z.string(),
|
|
26368
26369
|
startDate: import_zod5.z.string().nullable(),
|
|
@@ -26371,21 +26372,21 @@ var goalDataSchema = import_zod5.z.object({
|
|
|
26371
26372
|
progress: import_zod5.z.number(),
|
|
26372
26373
|
totalLessons: import_zod5.z.number()
|
|
26373
26374
|
});
|
|
26374
|
-
var
|
|
26375
|
-
|
|
26376
|
-
subject:
|
|
26377
|
-
creator:
|
|
26378
|
-
stats:
|
|
26379
|
-
breakdown: import_zod5.z.array(
|
|
26375
|
+
var recommendedClassHistoryItemSchema = import_zod5.z.object({
|
|
26376
|
+
recommendedClass: recommendedClassDataSchema,
|
|
26377
|
+
subject: recommendedClassSubjectSchema,
|
|
26378
|
+
creator: recommendedClassCreatorSchema,
|
|
26379
|
+
stats: recommendedClassStatsSchema,
|
|
26380
|
+
breakdown: import_zod5.z.array(recommendedClassBreakdownSchema)
|
|
26380
26381
|
});
|
|
26381
|
-
var
|
|
26382
|
+
var recommendedClassHistoryApiResponseSchema = import_zod5.z.object({
|
|
26382
26383
|
message: import_zod5.z.string(),
|
|
26383
26384
|
data: import_zod5.z.object({
|
|
26384
|
-
|
|
26385
|
+
recommendedClass: import_zod5.z.array(recommendedClassHistoryItemSchema),
|
|
26385
26386
|
total: import_zod5.z.number()
|
|
26386
26387
|
})
|
|
26387
26388
|
});
|
|
26388
|
-
var
|
|
26389
|
+
var determineRecommendedClassStatus = (finalDate, completionPercentage) => {
|
|
26389
26390
|
if (completionPercentage === 100) {
|
|
26390
26391
|
return "CONCLU\xCDDA" /* CONCLUIDA */;
|
|
26391
26392
|
}
|
|
@@ -26398,29 +26399,29 @@ var determineGoalStatus = (finalDate, completionPercentage) => {
|
|
|
26398
26399
|
}
|
|
26399
26400
|
return "ATIVA" /* ATIVA */;
|
|
26400
26401
|
};
|
|
26401
|
-
var
|
|
26402
|
+
var transformRecommendedClassToTableItem = (item) => {
|
|
26402
26403
|
const firstBreakdown = item.breakdown[0];
|
|
26403
26404
|
const schoolName = firstBreakdown?.schoolName || "-";
|
|
26404
26405
|
const className = firstBreakdown?.className || "-";
|
|
26405
26406
|
const classDisplay = item.breakdown.length > 1 ? `${item.breakdown.length} turmas` : className;
|
|
26406
26407
|
return {
|
|
26407
|
-
id: item.
|
|
26408
|
-
startDate: item.
|
|
26409
|
-
deadline: item.
|
|
26410
|
-
title: item.
|
|
26408
|
+
id: item.recommendedClass.id,
|
|
26409
|
+
startDate: item.recommendedClass.startDate ? (0, import_dayjs4.default)(item.recommendedClass.startDate).format("DD/MM") : "-",
|
|
26410
|
+
deadline: item.recommendedClass.finalDate ? (0, import_dayjs4.default)(item.recommendedClass.finalDate).format("DD/MM") : "-",
|
|
26411
|
+
title: item.recommendedClass.title,
|
|
26411
26412
|
school: schoolName,
|
|
26412
26413
|
year: "-",
|
|
26413
26414
|
// API doesn't provide year directly
|
|
26414
26415
|
subject: item.subject?.name || "-",
|
|
26415
26416
|
class: classDisplay,
|
|
26416
|
-
status:
|
|
26417
|
-
item.
|
|
26417
|
+
status: determineRecommendedClassStatus(
|
|
26418
|
+
item.recommendedClass.finalDate,
|
|
26418
26419
|
item.stats.completionPercentage
|
|
26419
26420
|
),
|
|
26420
26421
|
completionPercentage: item.stats.completionPercentage
|
|
26421
26422
|
};
|
|
26422
26423
|
};
|
|
26423
|
-
var
|
|
26424
|
+
var handleRecommendedClassFetchError = (error) => {
|
|
26424
26425
|
if (error instanceof import_zod5.z.ZodError) {
|
|
26425
26426
|
console.error("Erro ao validar dados de hist\xF3rico de aulas:", error);
|
|
26426
26427
|
return "Erro ao validar dados de hist\xF3rico de aulas";
|
|
@@ -26428,10 +26429,10 @@ var handleGoalFetchError = (error) => {
|
|
|
26428
26429
|
console.error("Erro ao carregar hist\xF3rico de aulas:", error);
|
|
26429
26430
|
return "Erro ao carregar hist\xF3rico de aulas";
|
|
26430
26431
|
};
|
|
26431
|
-
var createUseRecommendedLessonsHistory = (
|
|
26432
|
+
var createUseRecommendedLessonsHistory = (fetchRecommendedClassHistory) => {
|
|
26432
26433
|
return () => {
|
|
26433
26434
|
const [state, setState] = (0, import_react79.useState)({
|
|
26434
|
-
|
|
26435
|
+
recommendedClass: [],
|
|
26435
26436
|
loading: false,
|
|
26436
26437
|
error: null,
|
|
26437
26438
|
pagination: {
|
|
@@ -26441,21 +26442,21 @@ var createUseRecommendedLessonsHistory = (fetchGoalsHistory) => {
|
|
|
26441
26442
|
totalPages: 0
|
|
26442
26443
|
}
|
|
26443
26444
|
});
|
|
26444
|
-
const
|
|
26445
|
+
const fetchRecommendedClass = (0, import_react79.useCallback)(
|
|
26445
26446
|
async (filters) => {
|
|
26446
26447
|
setState((prev) => ({ ...prev, loading: true, error: null }));
|
|
26447
26448
|
try {
|
|
26448
|
-
const responseData = await
|
|
26449
|
-
const validatedData =
|
|
26450
|
-
const tableItems = validatedData.data.
|
|
26451
|
-
|
|
26449
|
+
const responseData = await fetchRecommendedClassHistory(filters);
|
|
26450
|
+
const validatedData = recommendedClassHistoryApiResponseSchema.parse(responseData);
|
|
26451
|
+
const tableItems = validatedData.data.recommendedClass.map(
|
|
26452
|
+
transformRecommendedClassToTableItem
|
|
26452
26453
|
);
|
|
26453
26454
|
const page = filters?.page || 1;
|
|
26454
26455
|
const limit = filters?.limit || 10;
|
|
26455
26456
|
const total = validatedData.data.total;
|
|
26456
26457
|
const totalPages = Math.ceil(total / limit);
|
|
26457
26458
|
setState({
|
|
26458
|
-
|
|
26459
|
+
recommendedClass: tableItems,
|
|
26459
26460
|
loading: false,
|
|
26460
26461
|
error: null,
|
|
26461
26462
|
pagination: {
|
|
@@ -26466,7 +26467,7 @@ var createUseRecommendedLessonsHistory = (fetchGoalsHistory) => {
|
|
|
26466
26467
|
}
|
|
26467
26468
|
});
|
|
26468
26469
|
} catch (error) {
|
|
26469
|
-
const errorMessage =
|
|
26470
|
+
const errorMessage = handleRecommendedClassFetchError(error);
|
|
26470
26471
|
setState((prev) => ({
|
|
26471
26472
|
...prev,
|
|
26472
26473
|
loading: false,
|
|
@@ -26474,11 +26475,11 @@ var createUseRecommendedLessonsHistory = (fetchGoalsHistory) => {
|
|
|
26474
26475
|
}));
|
|
26475
26476
|
}
|
|
26476
26477
|
},
|
|
26477
|
-
[
|
|
26478
|
+
[fetchRecommendedClassHistory]
|
|
26478
26479
|
);
|
|
26479
26480
|
return {
|
|
26480
26481
|
...state,
|
|
26481
|
-
|
|
26482
|
+
fetchRecommendedClass
|
|
26482
26483
|
};
|
|
26483
26484
|
};
|
|
26484
26485
|
};
|
|
@@ -26679,7 +26680,7 @@ var getSubjectOptions = (data) => {
|
|
|
26679
26680
|
name: subject.name
|
|
26680
26681
|
}));
|
|
26681
26682
|
};
|
|
26682
|
-
var
|
|
26683
|
+
var createRecommendedClassModelsFiltersConfig = (userData) => [
|
|
26683
26684
|
{
|
|
26684
26685
|
key: "content",
|
|
26685
26686
|
label: "CONTE\xDADO",
|
|
@@ -26695,7 +26696,7 @@ var createGoalModelsFiltersConfig = (userData) => [
|
|
|
26695
26696
|
];
|
|
26696
26697
|
|
|
26697
26698
|
// src/components/RecommendedLessonsHistory/utils/filterBuilders.ts
|
|
26698
|
-
var
|
|
26699
|
+
var buildRecommendedClassModelsFiltersFromParams = (params) => {
|
|
26699
26700
|
const filters = {
|
|
26700
26701
|
page: params.page,
|
|
26701
26702
|
limit: params.limit
|
|
@@ -26709,7 +26710,7 @@ var buildGoalModelsFiltersFromParams = (params) => {
|
|
|
26709
26710
|
return filters;
|
|
26710
26711
|
};
|
|
26711
26712
|
|
|
26712
|
-
// src/hooks/
|
|
26713
|
+
// src/hooks/useRecommendedClassModels.ts
|
|
26713
26714
|
var import_react81 = require("react");
|
|
26714
26715
|
var import_zod7 = require("zod");
|
|
26715
26716
|
var import_dayjs5 = __toESM(require("dayjs"));
|
|
@@ -26725,10 +26726,10 @@ var createFetchErrorHandler = (validationErrorMessage, genericErrorMessage) => (
|
|
|
26725
26726
|
return genericErrorMessage;
|
|
26726
26727
|
};
|
|
26727
26728
|
|
|
26728
|
-
// src/hooks/
|
|
26729
|
-
var
|
|
26729
|
+
// src/hooks/useRecommendedClassModels.ts
|
|
26730
|
+
var recommendedClassModelResponseSchema = import_zod7.z.object({
|
|
26730
26731
|
id: import_zod7.z.string().uuid(),
|
|
26731
|
-
type: import_zod7.z.nativeEnum(
|
|
26732
|
+
type: import_zod7.z.nativeEnum(RecommendedClassDraftType),
|
|
26732
26733
|
title: import_zod7.z.string(),
|
|
26733
26734
|
description: import_zod7.z.string().nullable(),
|
|
26734
26735
|
creatorUserInstitutionId: import_zod7.z.string().uuid(),
|
|
@@ -26738,20 +26739,20 @@ var goalModelResponseSchema = import_zod7.z.object({
|
|
|
26738
26739
|
createdAt: import_zod7.z.string(),
|
|
26739
26740
|
updatedAt: import_zod7.z.string()
|
|
26740
26741
|
});
|
|
26741
|
-
var
|
|
26742
|
+
var recommendedClassModelsApiResponseSchema = import_zod7.z.object({
|
|
26742
26743
|
message: import_zod7.z.string(),
|
|
26743
26744
|
data: import_zod7.z.object({
|
|
26744
|
-
drafts: import_zod7.z.array(
|
|
26745
|
+
drafts: import_zod7.z.array(recommendedClassModelResponseSchema),
|
|
26745
26746
|
total: import_zod7.z.number()
|
|
26746
26747
|
})
|
|
26747
26748
|
});
|
|
26748
|
-
var
|
|
26749
|
+
var DEFAULT_RECOMMENDED_CLASS_MODELS_PAGINATION = {
|
|
26749
26750
|
total: 0,
|
|
26750
26751
|
page: 1,
|
|
26751
26752
|
limit: 10,
|
|
26752
26753
|
totalPages: 0
|
|
26753
26754
|
};
|
|
26754
|
-
var
|
|
26755
|
+
var transformRecommendedClassModelToTableItem = (model, subjectsMap) => {
|
|
26755
26756
|
const subjectName = model.subjectId ? subjectsMap?.get(model.subjectId) || "" : "";
|
|
26756
26757
|
return {
|
|
26757
26758
|
id: model.id,
|
|
@@ -26761,26 +26762,26 @@ var transformGoalModelToTableItem = (model, subjectsMap) => {
|
|
|
26761
26762
|
subjectId: model.subjectId
|
|
26762
26763
|
};
|
|
26763
26764
|
};
|
|
26764
|
-
var
|
|
26765
|
+
var handleRecommendedClassModelFetchError = createFetchErrorHandler(
|
|
26765
26766
|
"Erro ao validar dados de modelos de aulas",
|
|
26766
26767
|
"Erro ao carregar modelos de aulas"
|
|
26767
26768
|
);
|
|
26768
|
-
var
|
|
26769
|
+
var createUseRecommendedClassModels = (fetchRecommendedClassModels, deleteRecommendedClassModel) => {
|
|
26769
26770
|
return () => {
|
|
26770
26771
|
const [state, setState] = (0, import_react81.useState)({
|
|
26771
26772
|
models: [],
|
|
26772
26773
|
loading: false,
|
|
26773
26774
|
error: null,
|
|
26774
|
-
pagination:
|
|
26775
|
+
pagination: DEFAULT_RECOMMENDED_CLASS_MODELS_PAGINATION
|
|
26775
26776
|
});
|
|
26776
26777
|
const fetchModels = (0, import_react81.useCallback)(
|
|
26777
26778
|
async (filters, subjectsMap) => {
|
|
26778
26779
|
setState((prev) => ({ ...prev, loading: true, error: null }));
|
|
26779
26780
|
try {
|
|
26780
|
-
const responseData = await
|
|
26781
|
-
const validatedData =
|
|
26781
|
+
const responseData = await fetchRecommendedClassModels(filters);
|
|
26782
|
+
const validatedData = recommendedClassModelsApiResponseSchema.parse(responseData);
|
|
26782
26783
|
const tableItems = validatedData.data.drafts.map(
|
|
26783
|
-
(model) =>
|
|
26784
|
+
(model) => transformRecommendedClassModelToTableItem(model, subjectsMap)
|
|
26784
26785
|
);
|
|
26785
26786
|
const limit = filters?.limit || 10;
|
|
26786
26787
|
const page = filters?.page || 1;
|
|
@@ -26798,7 +26799,7 @@ var createUseGoalModels = (fetchGoalModels, deleteGoalModel) => {
|
|
|
26798
26799
|
}
|
|
26799
26800
|
});
|
|
26800
26801
|
} catch (error) {
|
|
26801
|
-
const errorMessage =
|
|
26802
|
+
const errorMessage = handleRecommendedClassModelFetchError(error);
|
|
26802
26803
|
setState((prev) => ({
|
|
26803
26804
|
...prev,
|
|
26804
26805
|
loading: false,
|
|
@@ -26806,19 +26807,19 @@ var createUseGoalModels = (fetchGoalModels, deleteGoalModel) => {
|
|
|
26806
26807
|
}));
|
|
26807
26808
|
}
|
|
26808
26809
|
},
|
|
26809
|
-
[
|
|
26810
|
+
[fetchRecommendedClassModels]
|
|
26810
26811
|
);
|
|
26811
26812
|
const deleteModel = (0, import_react81.useCallback)(
|
|
26812
26813
|
async (id) => {
|
|
26813
26814
|
try {
|
|
26814
|
-
await
|
|
26815
|
+
await deleteRecommendedClassModel(id);
|
|
26815
26816
|
return true;
|
|
26816
26817
|
} catch (error) {
|
|
26817
26818
|
console.error("Erro ao deletar modelo:", error);
|
|
26818
26819
|
return false;
|
|
26819
26820
|
}
|
|
26820
26821
|
},
|
|
26821
|
-
[
|
|
26822
|
+
[deleteRecommendedClassModel]
|
|
26822
26823
|
);
|
|
26823
26824
|
return {
|
|
26824
26825
|
...state,
|
|
@@ -26827,27 +26828,27 @@ var createUseGoalModels = (fetchGoalModels, deleteGoalModel) => {
|
|
|
26827
26828
|
};
|
|
26828
26829
|
};
|
|
26829
26830
|
};
|
|
26830
|
-
var
|
|
26831
|
+
var createRecommendedClassModelsHook = createUseRecommendedClassModels;
|
|
26831
26832
|
|
|
26832
26833
|
// src/components/RecommendedLessonsHistory/tabs/ModelsTab.tsx
|
|
26833
26834
|
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
26834
|
-
var
|
|
26835
|
+
var RECOMMENDED_CLASS_MODELS_CONFIG = {
|
|
26835
26836
|
entityName: "aula",
|
|
26836
26837
|
entityNamePlural: "aulas",
|
|
26837
|
-
testId: "
|
|
26838
|
+
testId: "recommendedClass-models-tab",
|
|
26838
26839
|
emptyStateTitle: "Crie modelos para agilizar suas aulas",
|
|
26839
26840
|
emptyStateDescription: "Salve modelos de aulas recomendadas para reutilizar e enviar rapidamente para suas turmas!",
|
|
26840
26841
|
searchPlaceholder: "Buscar modelo"
|
|
26841
26842
|
};
|
|
26842
|
-
var
|
|
26843
|
+
var RECOMMENDED_CLASS_COLUMNS_CONFIG = {
|
|
26843
26844
|
sendButtonLabel: "Enviar aula",
|
|
26844
26845
|
sendButtonAriaLabel: "Enviar aula",
|
|
26845
26846
|
deleteButtonAriaLabel: "Deletar modelo",
|
|
26846
26847
|
editButtonAriaLabel: "Editar modelo"
|
|
26847
26848
|
};
|
|
26848
|
-
var
|
|
26849
|
-
|
|
26850
|
-
|
|
26849
|
+
var RecommendedClassModelsTab = ({
|
|
26850
|
+
fetchRecommendedClassModels,
|
|
26851
|
+
deleteRecommendedClassModel,
|
|
26851
26852
|
onCreateModel,
|
|
26852
26853
|
onSendLesson,
|
|
26853
26854
|
onEditModel,
|
|
@@ -26859,8 +26860,8 @@ var GoalModelsTab = ({
|
|
|
26859
26860
|
}) => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
26860
26861
|
ModelsTabBase,
|
|
26861
26862
|
{
|
|
26862
|
-
fetchModels:
|
|
26863
|
-
deleteModel:
|
|
26863
|
+
fetchModels: fetchRecommendedClassModels,
|
|
26864
|
+
deleteModel: deleteRecommendedClassModel,
|
|
26864
26865
|
onCreateModel,
|
|
26865
26866
|
onSend: onSendLesson,
|
|
26866
26867
|
onEditModel,
|
|
@@ -26869,17 +26870,17 @@ var GoalModelsTab = ({
|
|
|
26869
26870
|
mapSubjectNameToEnum: mapSubjectNameToEnum2,
|
|
26870
26871
|
userFilterData,
|
|
26871
26872
|
subjectsMap,
|
|
26872
|
-
config:
|
|
26873
|
+
config: RECOMMENDED_CLASS_MODELS_CONFIG,
|
|
26873
26874
|
createTableColumns: (mapSubject, send, edit, del) => createModelsTableColumnsBase(
|
|
26874
26875
|
mapSubject,
|
|
26875
26876
|
send,
|
|
26876
26877
|
edit,
|
|
26877
26878
|
del,
|
|
26878
|
-
|
|
26879
|
+
RECOMMENDED_CLASS_COLUMNS_CONFIG
|
|
26879
26880
|
),
|
|
26880
|
-
createFiltersConfig:
|
|
26881
|
-
buildFiltersFromParams:
|
|
26882
|
-
createUseModels:
|
|
26881
|
+
createFiltersConfig: createRecommendedClassModelsFiltersConfig,
|
|
26882
|
+
buildFiltersFromParams: buildRecommendedClassModelsFiltersFromParams,
|
|
26883
|
+
createUseModels: createUseRecommendedClassModels
|
|
26883
26884
|
}
|
|
26884
26885
|
);
|
|
26885
26886
|
|
|
@@ -26891,7 +26892,7 @@ var getSubjectOptions2 = (data) => {
|
|
|
26891
26892
|
name: subject.name
|
|
26892
26893
|
}));
|
|
26893
26894
|
};
|
|
26894
|
-
var
|
|
26895
|
+
var createRecommendedClassDraftsFiltersConfig = (userData) => [
|
|
26895
26896
|
{
|
|
26896
26897
|
key: "content",
|
|
26897
26898
|
label: "CONTE\xDADO",
|
|
@@ -26906,34 +26907,34 @@ var createGoalDraftsFiltersConfig = (userData) => [
|
|
|
26906
26907
|
}
|
|
26907
26908
|
];
|
|
26908
26909
|
|
|
26909
|
-
// src/hooks/
|
|
26910
|
+
// src/hooks/useRecommendedClassDrafts.ts
|
|
26910
26911
|
var import_react82 = require("react");
|
|
26911
|
-
var
|
|
26912
|
+
var DEFAULT_RECOMMENDED_CLASS_DRAFTS_PAGINATION = {
|
|
26912
26913
|
total: 0,
|
|
26913
26914
|
page: 1,
|
|
26914
26915
|
limit: 10,
|
|
26915
26916
|
totalPages: 0
|
|
26916
26917
|
};
|
|
26917
|
-
var
|
|
26918
|
+
var handleRecommendedClassDraftFetchError = createFetchErrorHandler(
|
|
26918
26919
|
"Erro ao validar dados de rascunhos de aulas",
|
|
26919
26920
|
"Erro ao carregar rascunhos de aulas"
|
|
26920
26921
|
);
|
|
26921
|
-
var
|
|
26922
|
+
var createUseRecommendedClassDrafts = (fetchRecommendedClassDrafts, deleteRecommendedClassDraft) => {
|
|
26922
26923
|
return () => {
|
|
26923
26924
|
const [state, setState] = (0, import_react82.useState)({
|
|
26924
26925
|
models: [],
|
|
26925
26926
|
loading: false,
|
|
26926
26927
|
error: null,
|
|
26927
|
-
pagination:
|
|
26928
|
+
pagination: DEFAULT_RECOMMENDED_CLASS_DRAFTS_PAGINATION
|
|
26928
26929
|
});
|
|
26929
26930
|
const fetchModels = (0, import_react82.useCallback)(
|
|
26930
26931
|
async (filters, subjectsMap) => {
|
|
26931
26932
|
setState((prev) => ({ ...prev, loading: true, error: null }));
|
|
26932
26933
|
try {
|
|
26933
|
-
const responseData = await
|
|
26934
|
-
const validatedData =
|
|
26934
|
+
const responseData = await fetchRecommendedClassDrafts(filters);
|
|
26935
|
+
const validatedData = recommendedClassModelsApiResponseSchema.parse(responseData);
|
|
26935
26936
|
const tableItems = validatedData.data.drafts.map(
|
|
26936
|
-
(draft) =>
|
|
26937
|
+
(draft) => transformRecommendedClassModelToTableItem(draft, subjectsMap)
|
|
26937
26938
|
);
|
|
26938
26939
|
const limit = filters?.limit || 10;
|
|
26939
26940
|
const page = filters?.page || 1;
|
|
@@ -26951,7 +26952,7 @@ var createUseGoalDrafts = (fetchGoalDrafts, deleteGoalDraft) => {
|
|
|
26951
26952
|
}
|
|
26952
26953
|
});
|
|
26953
26954
|
} catch (error) {
|
|
26954
|
-
const errorMessage =
|
|
26955
|
+
const errorMessage = handleRecommendedClassDraftFetchError(error);
|
|
26955
26956
|
setState((prev) => ({
|
|
26956
26957
|
...prev,
|
|
26957
26958
|
loading: false,
|
|
@@ -26959,19 +26960,19 @@ var createUseGoalDrafts = (fetchGoalDrafts, deleteGoalDraft) => {
|
|
|
26959
26960
|
}));
|
|
26960
26961
|
}
|
|
26961
26962
|
},
|
|
26962
|
-
[
|
|
26963
|
+
[fetchRecommendedClassDrafts]
|
|
26963
26964
|
);
|
|
26964
26965
|
const deleteModel = (0, import_react82.useCallback)(
|
|
26965
26966
|
async (id) => {
|
|
26966
26967
|
try {
|
|
26967
|
-
await
|
|
26968
|
+
await deleteRecommendedClassDraft(id);
|
|
26968
26969
|
return true;
|
|
26969
26970
|
} catch (error) {
|
|
26970
26971
|
console.error("Erro ao deletar rascunho:", error);
|
|
26971
26972
|
return false;
|
|
26972
26973
|
}
|
|
26973
26974
|
},
|
|
26974
|
-
[
|
|
26975
|
+
[deleteRecommendedClassDraft]
|
|
26975
26976
|
);
|
|
26976
26977
|
return {
|
|
26977
26978
|
...state,
|
|
@@ -26980,27 +26981,27 @@ var createUseGoalDrafts = (fetchGoalDrafts, deleteGoalDraft) => {
|
|
|
26980
26981
|
};
|
|
26981
26982
|
};
|
|
26982
26983
|
};
|
|
26983
|
-
var
|
|
26984
|
+
var createRecommendedClassDraftsHook = createUseRecommendedClassDrafts;
|
|
26984
26985
|
|
|
26985
26986
|
// src/components/RecommendedLessonsHistory/tabs/DraftsTab.tsx
|
|
26986
26987
|
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
26987
|
-
var
|
|
26988
|
+
var RECOMMENDED_CLASS_DRAFTS_CONFIG = {
|
|
26988
26989
|
entityName: "rascunho",
|
|
26989
26990
|
entityNamePlural: "rascunhos",
|
|
26990
|
-
testId: "
|
|
26991
|
+
testId: "recommendedClass-drafts-tab",
|
|
26991
26992
|
emptyStateTitle: "Voc\xEA n\xE3o tem aulas recomendadas em rascunho",
|
|
26992
26993
|
emptyStateDescription: "As aulas recomendadas que voc\xEA come\xE7ar a criar, aparecer\xE3o aqui automaticamente como rascunhos. Tudo \xE9 salvo enquanto voc\xEA cria, continue de onde parou quando quiser!",
|
|
26993
26994
|
searchPlaceholder: "Buscar rascunho"
|
|
26994
26995
|
};
|
|
26995
|
-
var
|
|
26996
|
+
var RECOMMENDED_CLASS_DRAFTS_COLUMNS_CONFIG = {
|
|
26996
26997
|
sendButtonLabel: "Enviar aula",
|
|
26997
26998
|
sendButtonAriaLabel: "Enviar rascunho",
|
|
26998
26999
|
deleteButtonAriaLabel: "Deletar rascunho",
|
|
26999
27000
|
editButtonAriaLabel: "Editar rascunho"
|
|
27000
27001
|
};
|
|
27001
|
-
var
|
|
27002
|
-
|
|
27003
|
-
|
|
27002
|
+
var RecommendedClassDraftsTab = ({
|
|
27003
|
+
fetchRecommendedClassDrafts,
|
|
27004
|
+
deleteRecommendedClassDraft,
|
|
27004
27005
|
onCreateDraft,
|
|
27005
27006
|
onSendDraft,
|
|
27006
27007
|
onEditDraft,
|
|
@@ -27012,8 +27013,8 @@ var GoalDraftsTab = ({
|
|
|
27012
27013
|
}) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
27013
27014
|
ModelsTabBase,
|
|
27014
27015
|
{
|
|
27015
|
-
fetchModels:
|
|
27016
|
-
deleteModel:
|
|
27016
|
+
fetchModels: fetchRecommendedClassDrafts,
|
|
27017
|
+
deleteModel: deleteRecommendedClassDraft,
|
|
27017
27018
|
onCreateModel: onCreateDraft,
|
|
27018
27019
|
onSend: onSendDraft,
|
|
27019
27020
|
onEditModel: onEditDraft,
|
|
@@ -27022,28 +27023,28 @@ var GoalDraftsTab = ({
|
|
|
27022
27023
|
mapSubjectNameToEnum: mapSubjectNameToEnum2,
|
|
27023
27024
|
userFilterData,
|
|
27024
27025
|
subjectsMap,
|
|
27025
|
-
config:
|
|
27026
|
+
config: RECOMMENDED_CLASS_DRAFTS_CONFIG,
|
|
27026
27027
|
createTableColumns: (mapSubject, send, edit, del) => createModelsTableColumnsBase(
|
|
27027
27028
|
mapSubject,
|
|
27028
27029
|
send,
|
|
27029
27030
|
edit,
|
|
27030
27031
|
del,
|
|
27031
|
-
|
|
27032
|
+
RECOMMENDED_CLASS_DRAFTS_COLUMNS_CONFIG
|
|
27032
27033
|
),
|
|
27033
|
-
createFiltersConfig:
|
|
27034
|
-
buildFiltersFromParams:
|
|
27035
|
-
createUseModels:
|
|
27034
|
+
createFiltersConfig: createRecommendedClassDraftsFiltersConfig,
|
|
27035
|
+
buildFiltersFromParams: buildRecommendedClassModelsFiltersFromParams,
|
|
27036
|
+
createUseModels: createUseRecommendedClassDrafts
|
|
27036
27037
|
}
|
|
27037
27038
|
);
|
|
27038
27039
|
|
|
27039
27040
|
// src/components/RecommendedLessonsHistory/RecommendedLessonsHistory.tsx
|
|
27040
27041
|
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
27041
|
-
var
|
|
27042
|
-
|
|
27043
|
-
|
|
27044
|
-
|
|
27045
|
-
return
|
|
27046
|
-
})(
|
|
27042
|
+
var RecommendedClassPageTab = /* @__PURE__ */ ((RecommendedClassPageTab2) => {
|
|
27043
|
+
RecommendedClassPageTab2["HISTORY"] = "history";
|
|
27044
|
+
RecommendedClassPageTab2["DRAFTS"] = "drafts";
|
|
27045
|
+
RecommendedClassPageTab2["MODELS"] = "models";
|
|
27046
|
+
return RecommendedClassPageTab2;
|
|
27047
|
+
})(RecommendedClassPageTab || {});
|
|
27047
27048
|
var extractFilterValue = (param) => {
|
|
27048
27049
|
if (!Array.isArray(param) || param.length === 0) return {};
|
|
27049
27050
|
return param.length === 1 ? { single: param[0] } : { multiple: param };
|
|
@@ -27104,7 +27105,7 @@ var getClassOptions = (data) => {
|
|
|
27104
27105
|
name: cls.name
|
|
27105
27106
|
}));
|
|
27106
27107
|
};
|
|
27107
|
-
var
|
|
27108
|
+
var createRecommendedClassFiltersConfig = (userData) => [
|
|
27108
27109
|
{
|
|
27109
27110
|
key: "academic",
|
|
27110
27111
|
label: "DADOS ACAD\xCAMICOS",
|
|
@@ -27179,12 +27180,12 @@ var createGoalFiltersConfig = (userData) => [
|
|
|
27179
27180
|
key: "status",
|
|
27180
27181
|
label: "Status",
|
|
27181
27182
|
selectedIds: [],
|
|
27182
|
-
itens:
|
|
27183
|
+
itens: RECOMMENDED_CLASS_FILTER_STATUS_OPTIONS
|
|
27183
27184
|
}
|
|
27184
27185
|
]
|
|
27185
27186
|
}
|
|
27186
27187
|
];
|
|
27187
|
-
var createTableColumns2 = (mapSubjectNameToEnum2,
|
|
27188
|
+
var createTableColumns2 = (mapSubjectNameToEnum2, onDeleteRecommendedClass, onEditRecommendedClass) => [
|
|
27188
27189
|
{
|
|
27189
27190
|
key: "startDate",
|
|
27190
27191
|
label: "In\xEDcio",
|
|
@@ -27265,7 +27266,9 @@ var createTableColumns2 = (mapSubjectNameToEnum2, onDeleteGoal, onEditGoal) => [
|
|
|
27265
27266
|
Badge_default,
|
|
27266
27267
|
{
|
|
27267
27268
|
variant: "solid",
|
|
27268
|
-
action:
|
|
27269
|
+
action: getRecommendedClassStatusBadgeAction(
|
|
27270
|
+
status
|
|
27271
|
+
),
|
|
27269
27272
|
size: "small",
|
|
27270
27273
|
children: status
|
|
27271
27274
|
}
|
|
@@ -27296,11 +27299,11 @@ var createTableColumns2 = (mapSubjectNameToEnum2, onDeleteGoal, onEditGoal) => [
|
|
|
27296
27299
|
render: (_value, row) => {
|
|
27297
27300
|
const handleDelete = (e) => {
|
|
27298
27301
|
e.stopPropagation();
|
|
27299
|
-
|
|
27302
|
+
onDeleteRecommendedClass?.(row.id);
|
|
27300
27303
|
};
|
|
27301
27304
|
const handleEdit = (e) => {
|
|
27302
27305
|
e.stopPropagation();
|
|
27303
|
-
|
|
27306
|
+
onEditRecommendedClass?.(row.id);
|
|
27304
27307
|
};
|
|
27305
27308
|
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "flex justify-center gap-2", children: [
|
|
27306
27309
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
@@ -27333,11 +27336,11 @@ var createTableColumns2 = (mapSubjectNameToEnum2, onDeleteGoal, onEditGoal) => [
|
|
|
27333
27336
|
}
|
|
27334
27337
|
];
|
|
27335
27338
|
var RecommendedLessonsHistory = ({
|
|
27336
|
-
|
|
27339
|
+
fetchRecommendedClassHistory,
|
|
27337
27340
|
onCreateLesson,
|
|
27338
27341
|
onRowClick,
|
|
27339
|
-
|
|
27340
|
-
|
|
27342
|
+
onDeleteRecommendedClass,
|
|
27343
|
+
onEditRecommendedClass,
|
|
27341
27344
|
emptyStateImage,
|
|
27342
27345
|
noSearchImage,
|
|
27343
27346
|
mapSubjectNameToEnum: mapSubjectNameToEnum2,
|
|
@@ -27345,14 +27348,14 @@ var RecommendedLessonsHistory = ({
|
|
|
27345
27348
|
title = "Hist\xF3rico de aulas recomendadas",
|
|
27346
27349
|
createButtonText = "Criar aula",
|
|
27347
27350
|
searchPlaceholder = "Buscar aula",
|
|
27348
|
-
|
|
27349
|
-
|
|
27351
|
+
fetchRecommendedClassModels,
|
|
27352
|
+
deleteRecommendedClassModel,
|
|
27350
27353
|
onCreateModel,
|
|
27351
27354
|
onSendLesson,
|
|
27352
27355
|
onEditModel,
|
|
27353
27356
|
subjectsMap,
|
|
27354
|
-
|
|
27355
|
-
|
|
27357
|
+
fetchRecommendedClassDrafts,
|
|
27358
|
+
deleteRecommendedClassDraft,
|
|
27356
27359
|
onSendDraft,
|
|
27357
27360
|
onEditDraft,
|
|
27358
27361
|
defaultTab,
|
|
@@ -27374,35 +27377,39 @@ var RecommendedLessonsHistory = ({
|
|
|
27374
27377
|
},
|
|
27375
27378
|
[onTabChange]
|
|
27376
27379
|
);
|
|
27377
|
-
const
|
|
27378
|
-
|
|
27379
|
-
const
|
|
27380
|
+
const fetchRecommendedClassHistoryRef = (0, import_react83.useRef)(fetchRecommendedClassHistory);
|
|
27381
|
+
fetchRecommendedClassHistoryRef.current = fetchRecommendedClassHistory;
|
|
27382
|
+
const useRecommendedClassHistory = (0, import_react83.useMemo)(
|
|
27380
27383
|
() => createUseRecommendedLessonsHistory(
|
|
27381
|
-
(filters) =>
|
|
27384
|
+
(filters) => fetchRecommendedClassHistoryRef.current(filters)
|
|
27382
27385
|
),
|
|
27383
27386
|
[]
|
|
27384
27387
|
);
|
|
27385
27388
|
const {
|
|
27386
|
-
|
|
27389
|
+
recommendedClass,
|
|
27387
27390
|
loading,
|
|
27388
27391
|
error,
|
|
27389
27392
|
pagination,
|
|
27390
|
-
|
|
27391
|
-
} =
|
|
27393
|
+
fetchRecommendedClass
|
|
27394
|
+
} = useRecommendedClassHistory();
|
|
27392
27395
|
const initialFilterConfigs = (0, import_react83.useMemo)(
|
|
27393
|
-
() =>
|
|
27396
|
+
() => createRecommendedClassFiltersConfig(userFilterData),
|
|
27394
27397
|
[userFilterData]
|
|
27395
27398
|
);
|
|
27396
27399
|
const tableColumns = (0, import_react83.useMemo)(
|
|
27397
|
-
() => createTableColumns2(
|
|
27398
|
-
|
|
27400
|
+
() => createTableColumns2(
|
|
27401
|
+
mapSubjectNameToEnum2,
|
|
27402
|
+
onDeleteRecommendedClass,
|
|
27403
|
+
onEditRecommendedClass
|
|
27404
|
+
),
|
|
27405
|
+
[mapSubjectNameToEnum2, onDeleteRecommendedClass, onEditRecommendedClass]
|
|
27399
27406
|
);
|
|
27400
27407
|
const handleParamsChange = (0, import_react83.useCallback)(
|
|
27401
27408
|
(params) => {
|
|
27402
27409
|
const filters = buildFiltersFromParams(params);
|
|
27403
|
-
|
|
27410
|
+
fetchRecommendedClass(filters);
|
|
27404
27411
|
},
|
|
27405
|
-
[
|
|
27412
|
+
[fetchRecommendedClass]
|
|
27406
27413
|
);
|
|
27407
27414
|
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
27408
27415
|
"div",
|
|
@@ -27476,7 +27483,7 @@ var RecommendedLessonsHistory = ({
|
|
|
27476
27483
|
activeTab === "history" /* HISTORY */ && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_jsx_runtime120.Fragment, { children: error ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "flex items-center justify-center bg-background rounded-xl w-full min-h-[705px]", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Text_default, { size: "lg", color: "text-error-500", children: error }) }) : /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
27477
27484
|
TableProvider,
|
|
27478
27485
|
{
|
|
27479
|
-
data:
|
|
27486
|
+
data: recommendedClass,
|
|
27480
27487
|
headers: tableColumns,
|
|
27481
27488
|
loading,
|
|
27482
27489
|
variant: "borderless",
|
|
@@ -27543,11 +27550,11 @@ var RecommendedLessonsHistory = ({
|
|
|
27543
27550
|
}
|
|
27544
27551
|
}
|
|
27545
27552
|
) }) }),
|
|
27546
|
-
activeTab === "drafts" /* DRAFTS */ &&
|
|
27547
|
-
|
|
27553
|
+
activeTab === "drafts" /* DRAFTS */ && fetchRecommendedClassDrafts && deleteRecommendedClassDraft && onCreateLesson && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
27554
|
+
RecommendedClassDraftsTab,
|
|
27548
27555
|
{
|
|
27549
|
-
|
|
27550
|
-
|
|
27556
|
+
fetchRecommendedClassDrafts,
|
|
27557
|
+
deleteRecommendedClassDraft,
|
|
27551
27558
|
onCreateDraft: onCreateLesson,
|
|
27552
27559
|
onSendDraft,
|
|
27553
27560
|
onEditDraft,
|
|
@@ -27558,11 +27565,11 @@ var RecommendedLessonsHistory = ({
|
|
|
27558
27565
|
subjectsMap
|
|
27559
27566
|
}
|
|
27560
27567
|
),
|
|
27561
|
-
activeTab === "models" /* MODELS */ &&
|
|
27562
|
-
|
|
27568
|
+
activeTab === "models" /* MODELS */ && fetchRecommendedClassModels && deleteRecommendedClassModel && onCreateModel && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
27569
|
+
RecommendedClassModelsTab,
|
|
27563
27570
|
{
|
|
27564
|
-
|
|
27565
|
-
|
|
27571
|
+
fetchRecommendedClassModels,
|
|
27572
|
+
deleteRecommendedClassModel,
|
|
27566
27573
|
onCreateModel,
|
|
27567
27574
|
onSendLesson,
|
|
27568
27575
|
onEditModel,
|
|
@@ -27637,8 +27644,8 @@ var LessonHeader = ({
|
|
|
27637
27644
|
mapSubjectNameToEnum: mapSubjectNameToEnum2,
|
|
27638
27645
|
viewLessonLabel
|
|
27639
27646
|
}) => {
|
|
27640
|
-
const {
|
|
27641
|
-
const subjectName =
|
|
27647
|
+
const { recommendedClass, breakdown } = data;
|
|
27648
|
+
const subjectName = recommendedClass.lessons[0]?.supLessonsProgress?.lesson?.subject?.name || "";
|
|
27642
27649
|
const subjectEnum = mapSubjectNameToEnum2?.(subjectName);
|
|
27643
27650
|
const subjectInfo = subjectEnum ? getSubjectInfo(subjectEnum) : null;
|
|
27644
27651
|
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { className: "bg-background rounded-xl border border-border-50 p-6", children: /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { className: "flex flex-col lg:flex-row lg:items-start lg:justify-between gap-4", children: [
|
|
@@ -27650,18 +27657,18 @@ var LessonHeader = ({
|
|
|
27650
27657
|
size: "xl",
|
|
27651
27658
|
weight: "bold",
|
|
27652
27659
|
className: "text-text-950 lg:text-2xl",
|
|
27653
|
-
children:
|
|
27660
|
+
children: recommendedClass.title
|
|
27654
27661
|
}
|
|
27655
27662
|
),
|
|
27656
27663
|
/* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { className: "flex flex-wrap items-center gap-2 text-sm text-text-600", children: [
|
|
27657
27664
|
/* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(Text_default, { as: "span", size: "sm", className: "text-text-600", children: [
|
|
27658
27665
|
"In\xEDcio em ",
|
|
27659
|
-
formatDate(
|
|
27666
|
+
formatDate(recommendedClass.startDate)
|
|
27660
27667
|
] }),
|
|
27661
27668
|
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Text_default, { as: "span", size: "sm", className: "text-text-400", children: "\u2022" }),
|
|
27662
27669
|
/* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(Text_default, { as: "span", size: "sm", className: "text-text-600", children: [
|
|
27663
27670
|
"Prazo final ",
|
|
27664
|
-
formatDate(
|
|
27671
|
+
formatDate(recommendedClass.finalDate)
|
|
27665
27672
|
] }),
|
|
27666
27673
|
breakdown?.schoolName && /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(import_jsx_runtime122.Fragment, { children: [
|
|
27667
27674
|
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Text_default, { as: "span", size: "sm", className: "text-text-400", children: "\u2022" }),
|
|
@@ -28210,7 +28217,7 @@ var StudentPerformanceModal = ({
|
|
|
28210
28217
|
// src/components/RecommendedLessonDetails/RecommendedLessonDetails.tsx
|
|
28211
28218
|
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
28212
28219
|
var RecommendedLessonDetails = ({
|
|
28213
|
-
|
|
28220
|
+
recommendedClassId,
|
|
28214
28221
|
data,
|
|
28215
28222
|
loading = false,
|
|
28216
28223
|
error = null,
|
|
@@ -28232,13 +28239,16 @@ var RecommendedLessonDetails = ({
|
|
|
28232
28239
|
const [performanceError, setPerformanceError] = (0, import_react91.useState)(null);
|
|
28233
28240
|
const handleViewStudentPerformance = (0, import_react91.useCallback)(
|
|
28234
28241
|
async (studentId) => {
|
|
28235
|
-
if (!fetchStudentPerformance || !
|
|
28242
|
+
if (!fetchStudentPerformance || !recommendedClassId) return;
|
|
28236
28243
|
setPerformanceModalOpen(true);
|
|
28237
28244
|
setPerformanceLoading(true);
|
|
28238
28245
|
setPerformanceData(null);
|
|
28239
28246
|
setPerformanceError(null);
|
|
28240
28247
|
try {
|
|
28241
|
-
const result = await fetchStudentPerformance(
|
|
28248
|
+
const result = await fetchStudentPerformance(
|
|
28249
|
+
recommendedClassId,
|
|
28250
|
+
studentId
|
|
28251
|
+
);
|
|
28242
28252
|
setPerformanceData(result);
|
|
28243
28253
|
} catch (err) {
|
|
28244
28254
|
console.error("Error fetching student performance:", err);
|
|
@@ -28249,7 +28259,7 @@ var RecommendedLessonDetails = ({
|
|
|
28249
28259
|
setPerformanceLoading(false);
|
|
28250
28260
|
}
|
|
28251
28261
|
},
|
|
28252
|
-
[fetchStudentPerformance,
|
|
28262
|
+
[fetchStudentPerformance, recommendedClassId]
|
|
28253
28263
|
);
|
|
28254
28264
|
const handleClosePerformanceModal = (0, import_react91.useCallback)(() => {
|
|
28255
28265
|
setPerformanceModalOpen(false);
|
|
@@ -28259,18 +28269,18 @@ var RecommendedLessonDetails = ({
|
|
|
28259
28269
|
const defaultBreadcrumbs = (0, import_react91.useMemo)(
|
|
28260
28270
|
() => [
|
|
28261
28271
|
{ label: "Aulas recomendadas", path: "/aulas-recomendadas" },
|
|
28262
|
-
{ label: data?.
|
|
28272
|
+
{ label: data?.recommendedClass.title || "Detalhes" }
|
|
28263
28273
|
],
|
|
28264
|
-
[data?.
|
|
28274
|
+
[data?.recommendedClass.title]
|
|
28265
28275
|
);
|
|
28266
28276
|
const breadcrumbItems = breadcrumbs || defaultBreadcrumbs;
|
|
28267
28277
|
const displayStudents = (0, import_react91.useMemo)(() => {
|
|
28268
28278
|
if (!data?.details.students) return [];
|
|
28269
|
-
const deadline = data?.
|
|
28279
|
+
const deadline = data?.recommendedClass.finalDate;
|
|
28270
28280
|
return data.details.students.map(
|
|
28271
28281
|
(student) => transformStudentForDisplay(student, deadline)
|
|
28272
28282
|
);
|
|
28273
|
-
}, [data?.details.students, data?.
|
|
28283
|
+
}, [data?.details.students, data?.recommendedClass.finalDate]);
|
|
28274
28284
|
if (loading) {
|
|
28275
28285
|
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
28276
28286
|
"div",
|
|
@@ -28398,7 +28408,7 @@ var createUseRecommendedLessonsPage = (config) => {
|
|
|
28398
28408
|
mapSubjectNameToEnum: mapSubjectNameToEnum2
|
|
28399
28409
|
} = config;
|
|
28400
28410
|
return () => {
|
|
28401
|
-
const
|
|
28411
|
+
const recommendedClassMapRef = (0, import_react92.useRef)(/* @__PURE__ */ new Map());
|
|
28402
28412
|
const [sendModalOpen, setSendModalOpen] = (0, import_react92.useState)(false);
|
|
28403
28413
|
const [selectedModel, setSelectedModel] = (0, import_react92.useState)(null);
|
|
28404
28414
|
const [sendModalLoading, setSendModalLoading] = (0, import_react92.useState)(false);
|
|
@@ -28417,60 +28427,63 @@ var createUseRecommendedLessonsPage = (config) => {
|
|
|
28417
28427
|
subjects.forEach((s) => map.set(s.id, s.name));
|
|
28418
28428
|
return map;
|
|
28419
28429
|
}, [userData]);
|
|
28420
|
-
const
|
|
28430
|
+
const fetchRecommendedClassHistory = (0, import_react92.useCallback)(
|
|
28421
28431
|
async (filters) => {
|
|
28422
28432
|
const params = buildQueryParams2(filters);
|
|
28423
28433
|
const response = await api.get(
|
|
28424
|
-
endpoints.
|
|
28434
|
+
endpoints.recommendedClassHistory,
|
|
28425
28435
|
{ params }
|
|
28426
28436
|
);
|
|
28427
|
-
const
|
|
28428
|
-
|
|
28429
|
-
|
|
28437
|
+
const recommendedClass = response.data.data.recommendedClass;
|
|
28438
|
+
recommendedClass.forEach((recommendedClass2) => {
|
|
28439
|
+
recommendedClassMapRef.current.set(
|
|
28440
|
+
recommendedClass2.recommendedClass.id,
|
|
28441
|
+
recommendedClass2
|
|
28442
|
+
);
|
|
28430
28443
|
});
|
|
28431
28444
|
return response.data;
|
|
28432
28445
|
},
|
|
28433
|
-
[api, endpoints.
|
|
28446
|
+
[api, endpoints.recommendedClassHistory]
|
|
28434
28447
|
);
|
|
28435
|
-
const
|
|
28448
|
+
const fetchRecommendedClassModels = (0, import_react92.useCallback)(
|
|
28436
28449
|
async (filters) => {
|
|
28437
28450
|
const params = buildQueryParams2({
|
|
28438
28451
|
...filters,
|
|
28439
28452
|
type: "MODELO" /* MODELO */
|
|
28440
28453
|
});
|
|
28441
28454
|
const response = await api.get(
|
|
28442
|
-
endpoints.
|
|
28455
|
+
endpoints.recommendedClassDrafts,
|
|
28443
28456
|
{ params }
|
|
28444
28457
|
);
|
|
28445
28458
|
return response.data;
|
|
28446
28459
|
},
|
|
28447
|
-
[api, endpoints.
|
|
28460
|
+
[api, endpoints.recommendedClassDrafts]
|
|
28448
28461
|
);
|
|
28449
|
-
const
|
|
28462
|
+
const deleteRecommendedClassModel = (0, import_react92.useCallback)(
|
|
28450
28463
|
async (id) => {
|
|
28451
|
-
await api.delete(`${endpoints.
|
|
28464
|
+
await api.delete(`${endpoints.recommendedClassDrafts}/${id}`);
|
|
28452
28465
|
},
|
|
28453
|
-
[api, endpoints.
|
|
28466
|
+
[api, endpoints.recommendedClassDrafts]
|
|
28454
28467
|
);
|
|
28455
|
-
const
|
|
28468
|
+
const fetchRecommendedClassDrafts = (0, import_react92.useCallback)(
|
|
28456
28469
|
async (filters) => {
|
|
28457
28470
|
const params = buildQueryParams2({
|
|
28458
28471
|
...filters,
|
|
28459
28472
|
type: "RASCUNHO" /* RASCUNHO */
|
|
28460
28473
|
});
|
|
28461
28474
|
const response = await api.get(
|
|
28462
|
-
endpoints.
|
|
28475
|
+
endpoints.recommendedClassDrafts,
|
|
28463
28476
|
{ params }
|
|
28464
28477
|
);
|
|
28465
28478
|
return response.data;
|
|
28466
28479
|
},
|
|
28467
|
-
[api, endpoints.
|
|
28480
|
+
[api, endpoints.recommendedClassDrafts]
|
|
28468
28481
|
);
|
|
28469
|
-
const
|
|
28482
|
+
const deleteRecommendedClassDraft = (0, import_react92.useCallback)(
|
|
28470
28483
|
async (id) => {
|
|
28471
|
-
await api.delete(`${endpoints.
|
|
28484
|
+
await api.delete(`${endpoints.recommendedClassDrafts}/${id}`);
|
|
28472
28485
|
},
|
|
28473
|
-
[api, endpoints.
|
|
28486
|
+
[api, endpoints.recommendedClassDrafts]
|
|
28474
28487
|
);
|
|
28475
28488
|
const handleCreateLesson = (0, import_react92.useCallback)(() => {
|
|
28476
28489
|
navigate(paths.createLesson);
|
|
@@ -28479,17 +28492,20 @@ var createUseRecommendedLessonsPage = (config) => {
|
|
|
28479
28492
|
navigate(paths.createModel);
|
|
28480
28493
|
}, []);
|
|
28481
28494
|
const handleRowClick = (0, import_react92.useCallback)((row) => {
|
|
28482
|
-
const originalData =
|
|
28495
|
+
const originalData = recommendedClassMapRef.current.get(row.id);
|
|
28483
28496
|
navigate(`${paths.lessonDetails}/${row.id}`, {
|
|
28484
|
-
state: {
|
|
28497
|
+
state: { recommendedClassData: originalData }
|
|
28485
28498
|
});
|
|
28486
28499
|
}, []);
|
|
28487
|
-
const
|
|
28500
|
+
const handleEditRecommendedClass = (0, import_react92.useCallback)((id) => {
|
|
28488
28501
|
navigate(`${paths.editLesson}/${id}/editar`);
|
|
28489
28502
|
}, []);
|
|
28490
|
-
const handleEditModel = (0, import_react92.useCallback)(
|
|
28491
|
-
|
|
28492
|
-
|
|
28503
|
+
const handleEditModel = (0, import_react92.useCallback)(
|
|
28504
|
+
(model) => {
|
|
28505
|
+
navigate(`${paths.editModel}${model.id}`);
|
|
28506
|
+
},
|
|
28507
|
+
[]
|
|
28508
|
+
);
|
|
28493
28509
|
const handleSendLesson = (0, import_react92.useCallback)(
|
|
28494
28510
|
(model) => {
|
|
28495
28511
|
setSelectedModel(model);
|
|
@@ -28518,7 +28534,7 @@ var createUseRecommendedLessonsPage = (config) => {
|
|
|
28518
28534
|
if (!selectedModel) return;
|
|
28519
28535
|
setSendModalLoading(true);
|
|
28520
28536
|
try {
|
|
28521
|
-
await api.post(endpoints.
|
|
28537
|
+
await api.post(endpoints.submitRecommendedClass, {
|
|
28522
28538
|
draftId: selectedModel.id,
|
|
28523
28539
|
students: formData.students,
|
|
28524
28540
|
startDate: `${formData.startDate}T${formData.startTime}:00`,
|
|
@@ -28530,7 +28546,7 @@ var createUseRecommendedLessonsPage = (config) => {
|
|
|
28530
28546
|
setSendModalLoading(false);
|
|
28531
28547
|
}
|
|
28532
28548
|
},
|
|
28533
|
-
[api, endpoints.
|
|
28549
|
+
[api, endpoints.submitRecommendedClass, selectedModel]
|
|
28534
28550
|
);
|
|
28535
28551
|
const handleSendModalClose = (0, import_react92.useCallback)(() => {
|
|
28536
28552
|
setSendModalOpen(false);
|
|
@@ -28544,17 +28560,17 @@ var createUseRecommendedLessonsPage = (config) => {
|
|
|
28544
28560
|
);
|
|
28545
28561
|
return {
|
|
28546
28562
|
historyProps: {
|
|
28547
|
-
|
|
28548
|
-
|
|
28549
|
-
|
|
28563
|
+
fetchRecommendedClassHistory,
|
|
28564
|
+
fetchRecommendedClassModels,
|
|
28565
|
+
deleteRecommendedClassModel,
|
|
28550
28566
|
onCreateLesson: handleCreateLesson,
|
|
28551
28567
|
onCreateModel: handleCreateModel,
|
|
28552
28568
|
onRowClick: handleRowClick,
|
|
28553
|
-
|
|
28569
|
+
onEditRecommendedClass: handleEditRecommendedClass,
|
|
28554
28570
|
onEditModel: handleEditModel,
|
|
28555
28571
|
onSendLesson: handleSendLesson,
|
|
28556
|
-
|
|
28557
|
-
|
|
28572
|
+
fetchRecommendedClassDrafts,
|
|
28573
|
+
deleteRecommendedClassDraft,
|
|
28558
28574
|
onSendDraft: handleSendLesson,
|
|
28559
28575
|
onEditDraft: handleEditModel,
|
|
28560
28576
|
emptyStateImage,
|
|
@@ -28584,7 +28600,7 @@ var createRecommendedLessonsPageHook = createUseRecommendedLessonsPage;
|
|
|
28584
28600
|
// src/hooks/useRecommendedLessonDetails.ts
|
|
28585
28601
|
var import_react93 = require("react");
|
|
28586
28602
|
var import_zod8 = require("zod");
|
|
28587
|
-
var
|
|
28603
|
+
var recommendedClassLessonSubjectSchema = import_zod8.z.object({
|
|
28588
28604
|
id: import_zod8.z.string(),
|
|
28589
28605
|
name: import_zod8.z.string(),
|
|
28590
28606
|
color: import_zod8.z.string(),
|
|
@@ -28594,38 +28610,38 @@ var lessonContentSchema = import_zod8.z.object({
|
|
|
28594
28610
|
id: import_zod8.z.string(),
|
|
28595
28611
|
name: import_zod8.z.string()
|
|
28596
28612
|
});
|
|
28597
|
-
var
|
|
28613
|
+
var recommendedClassLessonSchema = import_zod8.z.object({
|
|
28598
28614
|
id: import_zod8.z.string(),
|
|
28599
28615
|
content: lessonContentSchema,
|
|
28600
28616
|
subtopic: lessonContentSchema,
|
|
28601
28617
|
topic: lessonContentSchema,
|
|
28602
|
-
subject:
|
|
28618
|
+
subject: recommendedClassLessonSubjectSchema
|
|
28603
28619
|
});
|
|
28604
|
-
var
|
|
28620
|
+
var recommendedClassLessonProgressSchema = import_zod8.z.object({
|
|
28605
28621
|
id: import_zod8.z.string(),
|
|
28606
28622
|
userId: import_zod8.z.string(),
|
|
28607
28623
|
lessonId: import_zod8.z.string(),
|
|
28608
28624
|
progress: import_zod8.z.number(),
|
|
28609
|
-
lesson:
|
|
28625
|
+
lesson: recommendedClassLessonSchema
|
|
28610
28626
|
});
|
|
28611
|
-
var
|
|
28612
|
-
|
|
28627
|
+
var recommendedClassLessonsItemSchema = import_zod8.z.object({
|
|
28628
|
+
recommendedClassId: import_zod8.z.string(),
|
|
28613
28629
|
supLessonsProgressId: import_zod8.z.string(),
|
|
28614
|
-
supLessonsProgress:
|
|
28630
|
+
supLessonsProgress: recommendedClassLessonProgressSchema
|
|
28615
28631
|
});
|
|
28616
|
-
var
|
|
28632
|
+
var recommendedClassMetadataSchema = import_zod8.z.object({
|
|
28617
28633
|
id: import_zod8.z.string(),
|
|
28618
28634
|
title: import_zod8.z.string(),
|
|
28619
28635
|
startDate: import_zod8.z.string(),
|
|
28620
28636
|
finalDate: import_zod8.z.string(),
|
|
28621
28637
|
progress: import_zod8.z.number(),
|
|
28622
|
-
|
|
28638
|
+
lessons: import_zod8.z.array(recommendedClassLessonsItemSchema)
|
|
28623
28639
|
});
|
|
28624
|
-
var
|
|
28640
|
+
var recommendedClassApiResponseSchema = import_zod8.z.object({
|
|
28625
28641
|
message: import_zod8.z.string(),
|
|
28626
|
-
data:
|
|
28642
|
+
data: recommendedClassMetadataSchema
|
|
28627
28643
|
});
|
|
28628
|
-
var
|
|
28644
|
+
var recommendedClassDetailStudentSchema = import_zod8.z.object({
|
|
28629
28645
|
userInstitutionId: import_zod8.z.string(),
|
|
28630
28646
|
userId: import_zod8.z.string(),
|
|
28631
28647
|
name: import_zod8.z.string(),
|
|
@@ -28634,29 +28650,29 @@ var goalDetailStudentSchema = import_zod8.z.object({
|
|
|
28634
28650
|
avgScore: import_zod8.z.number().nullable(),
|
|
28635
28651
|
daysToComplete: import_zod8.z.number().nullable()
|
|
28636
28652
|
});
|
|
28637
|
-
var
|
|
28653
|
+
var recommendedClassDetailAggregatedSchema = import_zod8.z.object({
|
|
28638
28654
|
completionPercentage: import_zod8.z.number(),
|
|
28639
28655
|
avgScore: import_zod8.z.number().nullable()
|
|
28640
28656
|
});
|
|
28641
|
-
var
|
|
28657
|
+
var recommendedClassDetailContentPerformanceItemSchema = import_zod8.z.object({
|
|
28642
28658
|
contentId: import_zod8.z.string(),
|
|
28643
28659
|
contentName: import_zod8.z.string(),
|
|
28644
28660
|
rate: import_zod8.z.number()
|
|
28645
28661
|
}).nullable();
|
|
28646
|
-
var
|
|
28647
|
-
best:
|
|
28648
|
-
worst:
|
|
28662
|
+
var recommendedClassDetailContentPerformanceSchema = import_zod8.z.object({
|
|
28663
|
+
best: recommendedClassDetailContentPerformanceItemSchema,
|
|
28664
|
+
worst: recommendedClassDetailContentPerformanceItemSchema
|
|
28649
28665
|
});
|
|
28650
|
-
var
|
|
28651
|
-
students: import_zod8.z.array(
|
|
28652
|
-
aggregated:
|
|
28653
|
-
contentPerformance:
|
|
28666
|
+
var recommendedClassDetailsDataSchema = import_zod8.z.object({
|
|
28667
|
+
students: import_zod8.z.array(recommendedClassDetailStudentSchema),
|
|
28668
|
+
aggregated: recommendedClassDetailAggregatedSchema,
|
|
28669
|
+
contentPerformance: recommendedClassDetailContentPerformanceSchema
|
|
28654
28670
|
});
|
|
28655
|
-
var
|
|
28671
|
+
var recommendedClassDetailsApiResponseSchema = import_zod8.z.object({
|
|
28656
28672
|
message: import_zod8.z.string(),
|
|
28657
|
-
data:
|
|
28673
|
+
data: recommendedClassDetailsDataSchema
|
|
28658
28674
|
});
|
|
28659
|
-
var
|
|
28675
|
+
var recommendedClassBreakdownSchema2 = import_zod8.z.object({
|
|
28660
28676
|
classId: import_zod8.z.string().uuid(),
|
|
28661
28677
|
className: import_zod8.z.string(),
|
|
28662
28678
|
schoolId: import_zod8.z.string(),
|
|
@@ -28664,14 +28680,14 @@ var goalBreakdownSchema2 = import_zod8.z.object({
|
|
|
28664
28680
|
studentCount: import_zod8.z.number(),
|
|
28665
28681
|
completedCount: import_zod8.z.number()
|
|
28666
28682
|
});
|
|
28667
|
-
var
|
|
28668
|
-
|
|
28669
|
-
breakdown: import_zod8.z.array(
|
|
28683
|
+
var historyRecommendedClassItemSchema = import_zod8.z.object({
|
|
28684
|
+
recommendedClass: import_zod8.z.object({ id: import_zod8.z.string().uuid() }),
|
|
28685
|
+
breakdown: import_zod8.z.array(recommendedClassBreakdownSchema2)
|
|
28670
28686
|
});
|
|
28671
28687
|
var historyApiResponseSchema = import_zod8.z.object({
|
|
28672
28688
|
message: import_zod8.z.string(),
|
|
28673
28689
|
data: import_zod8.z.object({
|
|
28674
|
-
|
|
28690
|
+
recommendedClass: import_zod8.z.array(historyRecommendedClassItemSchema),
|
|
28675
28691
|
total: import_zod8.z.number()
|
|
28676
28692
|
})
|
|
28677
28693
|
});
|
|
@@ -28702,23 +28718,23 @@ var createUseRecommendedLessonDetails = (apiClient) => {
|
|
|
28702
28718
|
setState((prev) => ({ ...prev, loading: true, error: null }));
|
|
28703
28719
|
try {
|
|
28704
28720
|
const promises = [
|
|
28705
|
-
apiClient.
|
|
28706
|
-
apiClient.
|
|
28721
|
+
apiClient.fetchRecommendedClass(lessonId),
|
|
28722
|
+
apiClient.fetchRecommendedClassDetails(lessonId),
|
|
28707
28723
|
apiClient.fetchBreakdown ? apiClient.fetchBreakdown(lessonId) : Promise.resolve(null)
|
|
28708
28724
|
];
|
|
28709
|
-
const [
|
|
28710
|
-
const
|
|
28711
|
-
const validatedDetails =
|
|
28725
|
+
const [recommendedClassResponse, detailsResponse, historyResponse] = await Promise.all(promises);
|
|
28726
|
+
const validatedRecommendedClass = recommendedClassApiResponseSchema.parse(recommendedClassResponse);
|
|
28727
|
+
const validatedDetails = recommendedClassDetailsApiResponseSchema.parse(detailsResponse);
|
|
28712
28728
|
let breakdown;
|
|
28713
28729
|
if (historyResponse) {
|
|
28714
28730
|
const validatedHistory = historyApiResponseSchema.parse(historyResponse);
|
|
28715
|
-
const historyItem = validatedHistory.data.
|
|
28716
|
-
(g) => g.
|
|
28731
|
+
const historyItem = validatedHistory.data.recommendedClass.find(
|
|
28732
|
+
(g) => g.recommendedClass.id === lessonId
|
|
28717
28733
|
);
|
|
28718
28734
|
breakdown = historyItem?.breakdown[0];
|
|
28719
28735
|
}
|
|
28720
28736
|
const lessonData = {
|
|
28721
|
-
|
|
28737
|
+
recommendedClass: validatedRecommendedClass.data,
|
|
28722
28738
|
details: validatedDetails.data,
|
|
28723
28739
|
breakdown
|
|
28724
28740
|
};
|
|
@@ -30651,9 +30667,9 @@ function useSendActivity(config) {
|
|
|
30651
30667
|
CorrectActivityModal,
|
|
30652
30668
|
CreateActivity,
|
|
30653
30669
|
DEFAULT_ACTIVITIES_PAGINATION,
|
|
30654
|
-
DEFAULT_GOAL_DRAFTS_PAGINATION,
|
|
30655
|
-
DEFAULT_GOAL_MODELS_PAGINATION,
|
|
30656
30670
|
DEFAULT_MODELS_PAGINATION,
|
|
30671
|
+
DEFAULT_RECOMMENDED_CLASS_DRAFTS_PAGINATION,
|
|
30672
|
+
DEFAULT_RECOMMENDED_CLASS_MODELS_PAGINATION,
|
|
30657
30673
|
DIFFICULTY_LEVEL_ENUM,
|
|
30658
30674
|
DateTimeInput,
|
|
30659
30675
|
Divider,
|
|
@@ -30667,16 +30683,7 @@ function useSendActivity(config) {
|
|
|
30667
30683
|
EmptyState,
|
|
30668
30684
|
FileAttachment,
|
|
30669
30685
|
FilterModal,
|
|
30670
|
-
GOAL_ACTIVITY_STATUS,
|
|
30671
|
-
GOAL_FILTER_STATUS_OPTIONS,
|
|
30672
|
-
GOAL_STATUS_OPTIONS,
|
|
30673
30686
|
GeneralActivityStatus,
|
|
30674
|
-
GoalApiStatus,
|
|
30675
|
-
GoalBadgeActionType,
|
|
30676
|
-
GoalDisplayStatus,
|
|
30677
|
-
GoalDraftType,
|
|
30678
|
-
GoalDraftsTab,
|
|
30679
|
-
GoalPageTab,
|
|
30680
30687
|
IconButton,
|
|
30681
30688
|
IconRender,
|
|
30682
30689
|
IconRoundedButton,
|
|
@@ -30736,10 +30743,19 @@ function useSendActivity(config) {
|
|
|
30736
30743
|
QuizResultTitle,
|
|
30737
30744
|
QuizTitle,
|
|
30738
30745
|
QuizTrueOrFalse,
|
|
30746
|
+
RECOMMENDED_CLASS_ACTIVITY_STATUS,
|
|
30747
|
+
RECOMMENDED_CLASS_FILTER_STATUS_OPTIONS,
|
|
30748
|
+
RECOMMENDED_CLASS_STATUS_OPTIONS,
|
|
30739
30749
|
Radio,
|
|
30740
30750
|
RadioGroup,
|
|
30741
30751
|
RadioGroupItem,
|
|
30742
30752
|
RankingCard,
|
|
30753
|
+
RecommendedClassApiStatus,
|
|
30754
|
+
RecommendedClassBadgeActionType,
|
|
30755
|
+
RecommendedClassDisplayStatus,
|
|
30756
|
+
RecommendedClassDraftType,
|
|
30757
|
+
RecommendedClassDraftsTab,
|
|
30758
|
+
RecommendedClassPageTab,
|
|
30743
30759
|
RecommendedLessonDetails,
|
|
30744
30760
|
RecommendedLessonsHistory,
|
|
30745
30761
|
STUDENT_ACTIVITY_STATUS,
|
|
@@ -30799,11 +30815,11 @@ function useSendActivity(config) {
|
|
|
30799
30815
|
createActivitiesHistoryHook,
|
|
30800
30816
|
createActivityFiltersDataHook,
|
|
30801
30817
|
createActivityModelsHook,
|
|
30802
|
-
createGoalDraftsHook,
|
|
30803
|
-
createGoalModelsHook,
|
|
30804
30818
|
createNotificationStore,
|
|
30805
30819
|
createNotificationsHook,
|
|
30806
30820
|
createQuestionsListHook,
|
|
30821
|
+
createRecommendedClassDraftsHook,
|
|
30822
|
+
createRecommendedClassModelsHook,
|
|
30807
30823
|
createRecommendedLessonDetailsHook,
|
|
30808
30824
|
createRecommendedLessonsHistoryHook,
|
|
30809
30825
|
createRecommendedLessonsPageHook,
|
|
@@ -30812,17 +30828,17 @@ function useSendActivity(config) {
|
|
|
30812
30828
|
createUseActivityModels,
|
|
30813
30829
|
createUseChat,
|
|
30814
30830
|
createUseChatRooms,
|
|
30815
|
-
createUseGoalDrafts,
|
|
30816
|
-
createUseGoalModels,
|
|
30817
30831
|
createUseNotificationStore,
|
|
30818
30832
|
createUseNotifications,
|
|
30819
30833
|
createUseQuestionsList,
|
|
30834
|
+
createUseRecommendedClassDrafts,
|
|
30835
|
+
createUseRecommendedClassModels,
|
|
30820
30836
|
createUseRecommendedLessonDetails,
|
|
30821
30837
|
createUseRecommendedLessonsHistory,
|
|
30822
30838
|
createUseRecommendedLessonsPage,
|
|
30823
30839
|
createZustandAuthAdapter,
|
|
30824
30840
|
deriveStudentStatus,
|
|
30825
|
-
|
|
30841
|
+
determineRecommendedClassStatus,
|
|
30826
30842
|
formatDateToBrazilian,
|
|
30827
30843
|
formatDaysToComplete,
|
|
30828
30844
|
formatFileSize,
|
|
@@ -30837,8 +30853,8 @@ function useSendActivity(config) {
|
|
|
30837
30853
|
getChatWsUrl,
|
|
30838
30854
|
getClassOptionsFromUserData,
|
|
30839
30855
|
getDeviceType,
|
|
30840
|
-
getGoalStatusBadgeAction,
|
|
30841
30856
|
getQuestionStatusBadgeConfig,
|
|
30857
|
+
getRecommendedClassStatusBadgeAction,
|
|
30842
30858
|
getRootDomain,
|
|
30843
30859
|
getSchoolOptionsFromUserData,
|
|
30844
30860
|
getSchoolYearOptionsFromUserData,
|
|
@@ -30854,16 +30870,12 @@ function useSendActivity(config) {
|
|
|
30854
30870
|
getSubjectInfo,
|
|
30855
30871
|
getSubjectName,
|
|
30856
30872
|
getSubjectOptionsFromUserData,
|
|
30857
|
-
goalApiResponseSchema,
|
|
30858
|
-
goalDetailsApiResponseSchema,
|
|
30859
|
-
goalModelsApiResponseSchema,
|
|
30860
|
-
goalsHistoryApiResponseSchema,
|
|
30861
30873
|
handleActivityFetchError,
|
|
30862
|
-
handleGoalDraftFetchError,
|
|
30863
|
-
handleGoalFetchError,
|
|
30864
|
-
handleGoalModelFetchError,
|
|
30865
30874
|
handleLessonDetailsFetchError,
|
|
30866
30875
|
handleModelFetchError,
|
|
30876
|
+
handleRecommendedClassDraftFetchError,
|
|
30877
|
+
handleRecommendedClassFetchError,
|
|
30878
|
+
handleRecommendedClassModelFetchError,
|
|
30867
30879
|
historyApiResponseSchema,
|
|
30868
30880
|
isChatUserInfoValid,
|
|
30869
30881
|
isDeadlinePassed,
|
|
@@ -30879,6 +30891,10 @@ function useSendActivity(config) {
|
|
|
30879
30891
|
mapSubjectEnumToName,
|
|
30880
30892
|
mapSubjectNameToEnum,
|
|
30881
30893
|
questionTypeLabels,
|
|
30894
|
+
recommendedClassApiResponseSchema,
|
|
30895
|
+
recommendedClassDetailsApiResponseSchema,
|
|
30896
|
+
recommendedClassHistoryApiResponseSchema,
|
|
30897
|
+
recommendedClassModelsApiResponseSchema,
|
|
30882
30898
|
renderSubjectCell,
|
|
30883
30899
|
studentActivityStatusSchema,
|
|
30884
30900
|
supportSchema,
|
|
@@ -30886,9 +30902,9 @@ function useSendActivity(config) {
|
|
|
30886
30902
|
toggleArrayItem,
|
|
30887
30903
|
toggleSingleValue,
|
|
30888
30904
|
transformActivityToTableItem,
|
|
30889
|
-
transformGoalModelToTableItem,
|
|
30890
|
-
transformGoalToTableItem,
|
|
30891
30905
|
transformModelToTableItem,
|
|
30906
|
+
transformRecommendedClassModelToTableItem,
|
|
30907
|
+
transformRecommendedClassToTableItem,
|
|
30892
30908
|
useActivityDetails,
|
|
30893
30909
|
useAlertFormStore,
|
|
30894
30910
|
useApiConfig,
|