analytica-frontend-lib 1.2.61 → 1.2.62
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 +6 -2
- package/dist/ActivitiesHistory/index.js.map +1 -1
- package/dist/ActivitiesHistory/index.mjs +6 -2
- package/dist/ActivitiesHistory/index.mjs.map +1 -1
- package/dist/ActivityDetails/index.d.ts +1 -1
- package/dist/ActivityDetails/index.d.ts.map +1 -1
- package/dist/ActivityDetails/index.js +131 -49
- package/dist/ActivityDetails/index.js.map +1 -1
- package/dist/ActivityDetails/index.mjs +131 -49
- package/dist/ActivityDetails/index.mjs.map +1 -1
- package/dist/CorrectActivityModal/index.d.ts +1 -1
- package/dist/CorrectActivityModal/index.d.ts.map +1 -1
- package/dist/CorrectActivityModal/index.js +122 -38
- package/dist/CorrectActivityModal/index.js.map +1 -1
- package/dist/CorrectActivityModal/index.mjs +122 -38
- package/dist/CorrectActivityModal/index.mjs.map +1 -1
- package/dist/hooks/useActivitiesHistory/index.d.ts +4 -56
- package/dist/hooks/useActivitiesHistory/index.d.ts.map +1 -1
- package/dist/hooks/useActivitiesHistory/index.js +6 -2
- package/dist/hooks/useActivitiesHistory/index.js.map +1 -1
- package/dist/hooks/useActivitiesHistory/index.mjs +6 -2
- package/dist/hooks/useActivitiesHistory/index.mjs.map +1 -1
- package/dist/hooks/useActivitiesHistory.d.ts +4 -56
- package/dist/hooks/useActivitiesHistory.d.ts.map +1 -1
- package/dist/index.js +137 -51
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +137 -51
- package/dist/index.mjs.map +1 -1
- package/dist/types/studentActivityCorrection.d.ts +5 -0
- package/dist/types/studentActivityCorrection.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ export interface ActivityDetailsProps {
|
|
|
10
10
|
/** Function to fetch activity details. Must be memoized (using useCallback) to prevent re-fetches on every render. */
|
|
11
11
|
fetchActivityDetails: (id: string, params?: ActivityDetailsQueryParams) => Promise<ActivityDetailsData>;
|
|
12
12
|
/** Function to fetch student correction data */
|
|
13
|
-
fetchStudentCorrection: (activityId: string, studentId: string) => Promise<StudentActivityCorrectionData>;
|
|
13
|
+
fetchStudentCorrection: (activityId: string, studentId: string, studentName: string) => Promise<StudentActivityCorrectionData>;
|
|
14
14
|
/** Function to submit observation */
|
|
15
15
|
submitObservation: (activityId: string, studentId: string, observation: string, files: File[]) => Promise<void>;
|
|
16
16
|
/** Callback when back button is clicked */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActivityDetails.d.ts","sourceRoot":"","sources":["../../../src/components/ActivityDetails/ActivityDetails.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;AAC3F,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAGhC,MAAM,6BAA6B,CAAC;AAQrC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,sHAAsH;IACtH,oBAAoB,EAAE,CACpB,EAAE,EAAE,MAAM,EACV,MAAM,CAAC,EAAE,0BAA0B,KAChC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAClC,gDAAgD;IAChD,sBAAsB,EAAE,CACtB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ActivityDetails.d.ts","sourceRoot":"","sources":["../../../src/components/ActivityDetails/ActivityDetails.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;AAC3F,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAGhC,MAAM,6BAA6B,CAAC;AAQrC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,sHAAsH;IACtH,oBAAoB,EAAE,CACpB,EAAE,EAAE,MAAM,EACV,MAAM,CAAC,EAAE,0BAA0B,KAChC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAClC,gDAAgD;IAChD,sBAAsB,EAAE,CACtB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,KAChB,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAC5C,qCAAqC;IACrC,iBAAiB,EAAE,CACjB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,IAAI,EAAE,KACV,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,oDAAoD;IACpD,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,4BAA4B;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kDAAkD;IAClD,oBAAoB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,WAAW,GAAG,IAAI,CAAC;CACpE;AA2HD;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,iJAS7B,oBAAoB,4CAsetB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -5493,7 +5493,9 @@ var generateFileId = () => {
|
|
|
5493
5493
|
var QUESTION_STATUS = {
|
|
5494
5494
|
CORRETA: "CORRETA",
|
|
5495
5495
|
INCORRETA: "INCORRETA",
|
|
5496
|
-
EM_BRANCO: "EM_BRANCO"
|
|
5496
|
+
EM_BRANCO: "EM_BRANCO",
|
|
5497
|
+
/** Reserved for future use - pending teacher evaluation for essay questions */
|
|
5498
|
+
PENDENTE: "PENDENTE"
|
|
5497
5499
|
};
|
|
5498
5500
|
var getQuestionStatusBadgeConfig = (status) => {
|
|
5499
5501
|
const configs = {
|
|
@@ -5511,6 +5513,11 @@ var getQuestionStatusBadgeConfig = (status) => {
|
|
|
5511
5513
|
label: "Em branco",
|
|
5512
5514
|
bgColor: "bg-gray-100",
|
|
5513
5515
|
textColor: "text-gray-600"
|
|
5516
|
+
},
|
|
5517
|
+
[QUESTION_STATUS.PENDENTE]: {
|
|
5518
|
+
label: "Pendente",
|
|
5519
|
+
bgColor: "bg-warning-background",
|
|
5520
|
+
textColor: "text-warning-800"
|
|
5514
5521
|
}
|
|
5515
5522
|
};
|
|
5516
5523
|
return configs[status];
|
|
@@ -5594,17 +5601,26 @@ var CorrectActivityModal = ({
|
|
|
5594
5601
|
const [savedObservation, setSavedObservation] = (0, import_react18.useState)("");
|
|
5595
5602
|
const [attachedFiles, setAttachedFiles] = (0, import_react18.useState)([]);
|
|
5596
5603
|
const [savedFiles, setSavedFiles] = (0, import_react18.useState)([]);
|
|
5604
|
+
const [existingAttachment, setExistingAttachment] = (0, import_react18.useState)(
|
|
5605
|
+
null
|
|
5606
|
+
);
|
|
5597
5607
|
const fileInputRef = (0, import_react18.useRef)(null);
|
|
5598
5608
|
(0, import_react18.useEffect)(() => {
|
|
5599
5609
|
if (isOpen) {
|
|
5600
5610
|
setObservation("");
|
|
5601
5611
|
setIsObservationExpanded(false);
|
|
5602
|
-
setIsObservationSaved(false);
|
|
5603
|
-
setSavedObservation("");
|
|
5604
5612
|
setAttachedFiles([]);
|
|
5605
5613
|
setSavedFiles([]);
|
|
5614
|
+
setExistingAttachment(data?.attachment ?? null);
|
|
5615
|
+
if (data?.observation || data?.attachment) {
|
|
5616
|
+
setIsObservationSaved(true);
|
|
5617
|
+
setSavedObservation(data.observation || "");
|
|
5618
|
+
} else {
|
|
5619
|
+
setIsObservationSaved(false);
|
|
5620
|
+
setSavedObservation("");
|
|
5621
|
+
}
|
|
5606
5622
|
}
|
|
5607
|
-
}, [isOpen, data?.studentId]);
|
|
5623
|
+
}, [isOpen, data?.studentId, data?.observation, data?.attachment]);
|
|
5608
5624
|
const handleOpenObservation = () => {
|
|
5609
5625
|
setIsObservationExpanded(true);
|
|
5610
5626
|
};
|
|
@@ -5618,12 +5634,16 @@ var CorrectActivityModal = ({
|
|
|
5618
5634
|
setAttachedFiles((prev) => prev.filter((f) => f.id !== id));
|
|
5619
5635
|
};
|
|
5620
5636
|
const handleSaveObservation = () => {
|
|
5621
|
-
if (observation.trim() || attachedFiles.length > 0) {
|
|
5637
|
+
if (observation.trim() || attachedFiles.length > 0 || existingAttachment) {
|
|
5638
|
+
if (!data?.studentId) {
|
|
5639
|
+
return;
|
|
5640
|
+
}
|
|
5622
5641
|
setSavedObservation(observation);
|
|
5623
5642
|
setSavedFiles([...attachedFiles]);
|
|
5624
5643
|
setIsObservationSaved(true);
|
|
5625
5644
|
setIsObservationExpanded(false);
|
|
5626
5645
|
onObservationSubmit?.(
|
|
5646
|
+
data.studentId,
|
|
5627
5647
|
observation,
|
|
5628
5648
|
attachedFiles.map((f) => f.file)
|
|
5629
5649
|
);
|
|
@@ -5637,9 +5657,80 @@ var CorrectActivityModal = ({
|
|
|
5637
5657
|
};
|
|
5638
5658
|
if (!data) return null;
|
|
5639
5659
|
const title = isViewOnly ? "Detalhes da atividade" : "Corrigir atividade";
|
|
5640
|
-
const formattedScore = data.score
|
|
5660
|
+
const formattedScore = data.score == null ? "-" : data.score.toFixed(1);
|
|
5641
5661
|
const renderObservationSection = () => {
|
|
5642
|
-
|
|
5662
|
+
const getFileNameFromUrl = (url) => {
|
|
5663
|
+
try {
|
|
5664
|
+
const urlObj = new URL(url);
|
|
5665
|
+
const urlPath = urlObj.pathname;
|
|
5666
|
+
return urlPath.split("/").pop() || "Anexo";
|
|
5667
|
+
} catch {
|
|
5668
|
+
return "Anexo";
|
|
5669
|
+
}
|
|
5670
|
+
};
|
|
5671
|
+
const renderAttachmentInput = () => {
|
|
5672
|
+
if (attachedFiles.length > 0) {
|
|
5673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center justify-center gap-2 px-5 h-10 bg-secondary-500 rounded-full min-w-0 max-w-[150px]", children: [
|
|
5674
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_phosphor_react13.Paperclip, { size: 18, className: "text-text-800 flex-shrink-0" }),
|
|
5675
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-base font-medium text-text-800 truncate", children: attachedFiles[0].file.name }),
|
|
5676
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
5677
|
+
"button",
|
|
5678
|
+
{
|
|
5679
|
+
type: "button",
|
|
5680
|
+
onClick: () => handleFileRemove(attachedFiles[0].id),
|
|
5681
|
+
className: "text-text-700 hover:text-text-800 flex-shrink-0",
|
|
5682
|
+
"aria-label": `Remover ${attachedFiles[0].file.name}`,
|
|
5683
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_phosphor_react13.X, { size: 18 })
|
|
5684
|
+
}
|
|
5685
|
+
)
|
|
5686
|
+
] });
|
|
5687
|
+
}
|
|
5688
|
+
if (existingAttachment) {
|
|
5689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
5690
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
5691
|
+
"a",
|
|
5692
|
+
{
|
|
5693
|
+
href: existingAttachment,
|
|
5694
|
+
target: "_blank",
|
|
5695
|
+
rel: "noopener noreferrer",
|
|
5696
|
+
className: "flex items-center gap-2 px-5 h-10 bg-secondary-500 rounded-full min-w-0 max-w-[150px] hover:bg-secondary-600 transition-colors",
|
|
5697
|
+
children: [
|
|
5698
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_phosphor_react13.Paperclip, { size: 18, className: "text-text-800 flex-shrink-0" }),
|
|
5699
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-base font-medium text-text-800 truncate", children: getFileNameFromUrl(existingAttachment) })
|
|
5700
|
+
]
|
|
5701
|
+
}
|
|
5702
|
+
),
|
|
5703
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
5704
|
+
Button_default,
|
|
5705
|
+
{
|
|
5706
|
+
type: "button",
|
|
5707
|
+
variant: "outline",
|
|
5708
|
+
size: "small",
|
|
5709
|
+
onClick: () => fileInputRef.current?.click(),
|
|
5710
|
+
className: "flex items-center gap-2",
|
|
5711
|
+
children: [
|
|
5712
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_phosphor_react13.Paperclip, { size: 18 }),
|
|
5713
|
+
"Trocar"
|
|
5714
|
+
]
|
|
5715
|
+
}
|
|
5716
|
+
)
|
|
5717
|
+
] });
|
|
5718
|
+
}
|
|
5719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
5720
|
+
Button_default,
|
|
5721
|
+
{
|
|
5722
|
+
type: "button",
|
|
5723
|
+
variant: "outline",
|
|
5724
|
+
size: "small",
|
|
5725
|
+
onClick: () => fileInputRef.current?.click(),
|
|
5726
|
+
className: "flex items-center gap-2",
|
|
5727
|
+
children: [
|
|
5728
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_phosphor_react13.Paperclip, { size: 18 }),
|
|
5729
|
+
"Anexar"
|
|
5730
|
+
]
|
|
5731
|
+
}
|
|
5732
|
+
);
|
|
5733
|
+
};
|
|
5643
5734
|
if (isObservationSaved) {
|
|
5644
5735
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "bg-background border border-border-100 rounded-lg p-4 space-y-2", children: [
|
|
5645
5736
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3", children: [
|
|
@@ -5655,6 +5746,25 @@ var CorrectActivityModal = ({
|
|
|
5655
5746
|
),
|
|
5656
5747
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-base font-medium text-text-800 truncate", children: savedFiles[0].file.name })
|
|
5657
5748
|
] }),
|
|
5749
|
+
savedFiles.length === 0 && existingAttachment && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
5750
|
+
"a",
|
|
5751
|
+
{
|
|
5752
|
+
href: existingAttachment,
|
|
5753
|
+
target: "_blank",
|
|
5754
|
+
rel: "noopener noreferrer",
|
|
5755
|
+
className: "flex items-center gap-2 px-5 h-10 bg-secondary-500 rounded-full min-w-0 max-w-[150px] hover:bg-secondary-600 transition-colors",
|
|
5756
|
+
children: [
|
|
5757
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
5758
|
+
import_phosphor_react13.Paperclip,
|
|
5759
|
+
{
|
|
5760
|
+
size: 18,
|
|
5761
|
+
className: "text-text-800 flex-shrink-0"
|
|
5762
|
+
}
|
|
5763
|
+
),
|
|
5764
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-base font-medium text-text-800 truncate", children: getFileNameFromUrl(existingAttachment) })
|
|
5765
|
+
]
|
|
5766
|
+
}
|
|
5767
|
+
),
|
|
5658
5768
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
5659
5769
|
Button_default,
|
|
5660
5770
|
{
|
|
@@ -5705,40 +5815,14 @@ var CorrectActivityModal = ({
|
|
|
5705
5815
|
}
|
|
5706
5816
|
),
|
|
5707
5817
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-col-reverse sm:flex-row gap-3 sm:justify-between", children: [
|
|
5708
|
-
|
|
5709
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_phosphor_react13.Paperclip, { size: 18, className: "text-text-800 flex-shrink-0" }),
|
|
5710
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-base font-medium text-text-800 truncate", children: attachedFiles[0].file.name }),
|
|
5711
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
5712
|
-
"button",
|
|
5713
|
-
{
|
|
5714
|
-
type: "button",
|
|
5715
|
-
onClick: () => handleFileRemove(attachedFiles[0].id),
|
|
5716
|
-
className: "text-text-700 hover:text-text-800 flex-shrink-0",
|
|
5717
|
-
"aria-label": `Remover ${attachedFiles[0].file.name}`,
|
|
5718
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_phosphor_react13.X, { size: 18 })
|
|
5719
|
-
}
|
|
5720
|
-
)
|
|
5721
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
5722
|
-
Button_default,
|
|
5723
|
-
{
|
|
5724
|
-
type: "button",
|
|
5725
|
-
variant: "outline",
|
|
5726
|
-
size: "small",
|
|
5727
|
-
onClick: () => fileInputRef.current?.click(),
|
|
5728
|
-
className: "flex items-center gap-2",
|
|
5729
|
-
children: [
|
|
5730
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_phosphor_react13.Paperclip, { size: 18 }),
|
|
5731
|
-
"Anexar"
|
|
5732
|
-
]
|
|
5733
|
-
}
|
|
5734
|
-
),
|
|
5818
|
+
renderAttachmentInput(),
|
|
5735
5819
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
5736
5820
|
Button_default,
|
|
5737
5821
|
{
|
|
5738
5822
|
type: "button",
|
|
5739
5823
|
size: "small",
|
|
5740
5824
|
onClick: handleSaveObservation,
|
|
5741
|
-
disabled: !observation.trim() && attachedFiles.length === 0,
|
|
5825
|
+
disabled: !observation.trim() && attachedFiles.length === 0 && !existingAttachment,
|
|
5742
5826
|
children: "Salvar"
|
|
5743
5827
|
}
|
|
5744
5828
|
)
|
|
@@ -5764,8 +5848,8 @@ var CorrectActivityModal = ({
|
|
|
5764
5848
|
contentClassName: "max-h-[80vh] overflow-y-auto",
|
|
5765
5849
|
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "space-y-6", children: [
|
|
5766
5850
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
5767
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "w-10 h-10 bg-primary-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text_default, { className: "text-lg font-semibold text-primary-700", children: data.studentName
|
|
5768
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text_default, { className: "text-lg font-medium text-text-950", children: data.studentName })
|
|
5851
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "w-10 h-10 bg-primary-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text_default, { className: "text-lg font-semibold text-primary-700", children: data.studentName?.charAt(0).toUpperCase() || "-" }) }),
|
|
5852
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text_default, { className: "text-lg font-medium text-text-950", children: data.studentName || "Aluno" })
|
|
5769
5853
|
] }),
|
|
5770
5854
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "grid grid-cols-3 gap-4", children: [
|
|
5771
5855
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(StatCard, { label: "Nota", value: formattedScore, variant: "score" }),
|
|
@@ -5789,7 +5873,7 @@ var CorrectActivityModal = ({
|
|
|
5789
5873
|
renderObservationSection(),
|
|
5790
5874
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "space-y-2", children: [
|
|
5791
5875
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text_default, { className: "text-sm font-bold text-text-950", children: "Respostas" }),
|
|
5792
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AccordionGroup, { type: "multiple", className: "space-y-2", children: data.questions
|
|
5876
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AccordionGroup, { type: "multiple", className: "space-y-2", children: data.questions?.map((question) => {
|
|
5793
5877
|
const badgeConfig = getQuestionStatusBadgeConfig(question.status);
|
|
5794
5878
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
5795
5879
|
CardAccordation,
|
|
@@ -7209,7 +7293,11 @@ var ActivityDetails = ({
|
|
|
7209
7293
|
setIsViewOnlyModal(isViewOnly);
|
|
7210
7294
|
setCorrectionError(null);
|
|
7211
7295
|
try {
|
|
7212
|
-
const correction = await fetchStudentCorrection(
|
|
7296
|
+
const correction = await fetchStudentCorrection(
|
|
7297
|
+
activityId,
|
|
7298
|
+
studentId,
|
|
7299
|
+
student.studentName || "Aluno"
|
|
7300
|
+
);
|
|
7213
7301
|
setCorrectionData(correction);
|
|
7214
7302
|
setIsModalOpen(true);
|
|
7215
7303
|
} catch (err) {
|
|
@@ -7225,21 +7313,15 @@ var ActivityDetails = ({
|
|
|
7225
7313
|
setIsModalOpen(false);
|
|
7226
7314
|
}, []);
|
|
7227
7315
|
const handleObservationSubmit = (0, import_react22.useCallback)(
|
|
7228
|
-
async (observation, files) => {
|
|
7229
|
-
if (!activityId || !
|
|
7316
|
+
async (studentId, observation, files) => {
|
|
7317
|
+
if (!activityId || !studentId) return;
|
|
7230
7318
|
try {
|
|
7231
|
-
await submitObservation(
|
|
7232
|
-
activityId,
|
|
7233
|
-
correctionData.studentId,
|
|
7234
|
-
observation,
|
|
7235
|
-
files
|
|
7236
|
-
);
|
|
7237
|
-
setIsModalOpen(false);
|
|
7319
|
+
await submitObservation(activityId, studentId, observation, files);
|
|
7238
7320
|
} catch (err) {
|
|
7239
7321
|
console.error("Failed to submit observation:", err);
|
|
7240
7322
|
}
|
|
7241
7323
|
},
|
|
7242
|
-
[activityId,
|
|
7324
|
+
[activityId, submitObservation]
|
|
7243
7325
|
);
|
|
7244
7326
|
const tableData = (0, import_react22.useMemo)(() => {
|
|
7245
7327
|
if (!data?.students) return [];
|