analytica-frontend-lib 1.2.83 → 1.2.84
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 +156 -147
- package/dist/ActivitiesHistory/index.js.map +1 -1
- package/dist/ActivitiesHistory/index.mjs +155 -146
- package/dist/ActivitiesHistory/index.mjs.map +1 -1
- package/dist/ActivityCardQuestionBanks/index.d.ts +6 -4
- package/dist/ActivityCardQuestionBanks/index.d.ts.map +1 -1
- package/dist/ActivityCardQuestionBanks/index.js.map +1 -1
- package/dist/ActivityCardQuestionBanks/index.mjs.map +1 -1
- package/dist/RecommendedLessonsHistory/index.js +129 -127
- package/dist/RecommendedLessonsHistory/index.js.map +1 -1
- package/dist/RecommendedLessonsHistory/index.mjs +128 -126
- 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/useActivityModels/index.d.ts +1 -1
- package/dist/hooks/useActivityModels/index.d.ts.map +1 -1
- package/dist/hooks/useActivityModels/index.js +13 -2
- package/dist/hooks/useActivityModels/index.js.map +1 -1
- package/dist/hooks/useActivityModels/index.mjs +13 -2
- package/dist/hooks/useActivityModels/index.mjs.map +1 -1
- package/dist/hooks/useActivityModels.d.ts +1 -1
- package/dist/hooks/useActivityModels.d.ts.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2045 -1057
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1994 -1008
- package/dist/index.mjs.map +1 -1
- package/dist/types/activitiesHistory/index.d.ts +11 -1
- package/dist/types/activitiesHistory/index.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/activitiesHistory.d.ts +11 -1
- package/dist/types/activitiesHistory.d.ts.map +1 -1
- package/dist/types/questions.d.ts +1 -0
- package/dist/types/questions.d.ts.map +1 -1
- package/package.json +3 -1
|
@@ -5471,6 +5471,120 @@ var getSubjectInfo = (subject) => {
|
|
|
5471
5471
|
};
|
|
5472
5472
|
};
|
|
5473
5473
|
|
|
5474
|
+
// src/components/shared/ModelsTabBase/createModelsTableColumnsBase.tsx
|
|
5475
|
+
var import_phosphor_react14 = require("phosphor-react");
|
|
5476
|
+
|
|
5477
|
+
// src/utils/renderSubjectCell.tsx
|
|
5478
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
5479
|
+
var renderSubjectCell = (subjectName, mapSubjectNameToEnum, showEmptyDash = false) => {
|
|
5480
|
+
if (!subjectName) {
|
|
5481
|
+
return showEmptyDash ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text_default, { size: "sm", color: "text-text-400", children: "-" }) : null;
|
|
5482
|
+
}
|
|
5483
|
+
const subjectEnum = mapSubjectNameToEnum?.(subjectName);
|
|
5484
|
+
if (!subjectEnum) {
|
|
5485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text_default, { size: "sm", className: "truncate", title: subjectName, children: subjectName });
|
|
5486
|
+
}
|
|
5487
|
+
const subjectInfo = getSubjectInfo(subjectEnum);
|
|
5488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-2", title: subjectName, children: [
|
|
5489
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5490
|
+
"span",
|
|
5491
|
+
{
|
|
5492
|
+
className: cn(
|
|
5493
|
+
"w-[21px] h-[21px] flex items-center justify-center rounded-sm text-text-950 shrink-0",
|
|
5494
|
+
subjectInfo.colorClass
|
|
5495
|
+
),
|
|
5496
|
+
children: subjectInfo.icon
|
|
5497
|
+
}
|
|
5498
|
+
),
|
|
5499
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text_default, { size: "sm", className: "truncate", children: subjectName })
|
|
5500
|
+
] });
|
|
5501
|
+
};
|
|
5502
|
+
|
|
5503
|
+
// src/components/shared/ModelsTabBase/createModelsTableColumnsBase.tsx
|
|
5504
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
5505
|
+
var createModelsTableColumnsBase = (mapSubjectNameToEnum, onSend, onEdit, onDelete, config) => [
|
|
5506
|
+
{
|
|
5507
|
+
key: "title",
|
|
5508
|
+
label: "T\xEDtulo",
|
|
5509
|
+
sortable: true,
|
|
5510
|
+
className: "max-w-[400px]",
|
|
5511
|
+
render: (value) => {
|
|
5512
|
+
const title = typeof value === "string" ? value : "";
|
|
5513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text_default, { size: "sm", title, className: "truncate block", children: title });
|
|
5514
|
+
}
|
|
5515
|
+
},
|
|
5516
|
+
{
|
|
5517
|
+
key: "savedAt",
|
|
5518
|
+
label: "Salvo em",
|
|
5519
|
+
sortable: true,
|
|
5520
|
+
className: "w-[120px]"
|
|
5521
|
+
},
|
|
5522
|
+
{
|
|
5523
|
+
key: "subject",
|
|
5524
|
+
label: "Mat\xE9ria",
|
|
5525
|
+
sortable: true,
|
|
5526
|
+
className: "max-w-[160px]",
|
|
5527
|
+
render: (value) => {
|
|
5528
|
+
const subjectName = typeof value === "string" ? value : "";
|
|
5529
|
+
return renderSubjectCell(subjectName, mapSubjectNameToEnum, true);
|
|
5530
|
+
}
|
|
5531
|
+
},
|
|
5532
|
+
{
|
|
5533
|
+
key: "actions",
|
|
5534
|
+
label: "",
|
|
5535
|
+
sortable: false,
|
|
5536
|
+
className: "w-[220px]",
|
|
5537
|
+
render: (_value, row) => {
|
|
5538
|
+
const handleSend = (e) => {
|
|
5539
|
+
e.stopPropagation();
|
|
5540
|
+
onSend?.(row);
|
|
5541
|
+
};
|
|
5542
|
+
const handleEdit = (e) => {
|
|
5543
|
+
e.stopPropagation();
|
|
5544
|
+
onEdit?.(row);
|
|
5545
|
+
};
|
|
5546
|
+
const handleDelete = (e) => {
|
|
5547
|
+
e.stopPropagation();
|
|
5548
|
+
onDelete(row);
|
|
5549
|
+
};
|
|
5550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-2 justify-end", children: [
|
|
5551
|
+
onSend && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5552
|
+
Button_default,
|
|
5553
|
+
{
|
|
5554
|
+
variant: "outline",
|
|
5555
|
+
action: "primary",
|
|
5556
|
+
size: "small",
|
|
5557
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_phosphor_react14.PaperPlaneTilt, { size: 16 }),
|
|
5558
|
+
onClick: handleSend,
|
|
5559
|
+
"aria-label": config.sendButtonAriaLabel,
|
|
5560
|
+
children: config.sendButtonLabel
|
|
5561
|
+
}
|
|
5562
|
+
),
|
|
5563
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5564
|
+
IconButton_default,
|
|
5565
|
+
{
|
|
5566
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_phosphor_react14.Trash, { size: 20 }),
|
|
5567
|
+
size: "md",
|
|
5568
|
+
onClick: handleDelete,
|
|
5569
|
+
"aria-label": config.deleteButtonAriaLabel,
|
|
5570
|
+
className: "text-text-600 hover:text-error-500 hover:bg-transparent"
|
|
5571
|
+
}
|
|
5572
|
+
),
|
|
5573
|
+
onEdit && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5574
|
+
IconButton_default,
|
|
5575
|
+
{
|
|
5576
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_phosphor_react14.PencilSimple, { size: 20 }),
|
|
5577
|
+
size: "md",
|
|
5578
|
+
onClick: handleEdit,
|
|
5579
|
+
"aria-label": config.editButtonAriaLabel,
|
|
5580
|
+
className: "text-text-600 hover:text-primary-700 hover:bg-transparent"
|
|
5581
|
+
}
|
|
5582
|
+
)
|
|
5583
|
+
] });
|
|
5584
|
+
}
|
|
5585
|
+
}
|
|
5586
|
+
];
|
|
5587
|
+
|
|
5474
5588
|
// src/types/common.ts
|
|
5475
5589
|
var GenericApiStatus = /* @__PURE__ */ ((GenericApiStatus2) => {
|
|
5476
5590
|
GenericApiStatus2["A_VENCER"] = "A_VENCER";
|
|
@@ -5495,16 +5609,30 @@ var mapApiStatusToDisplay = (apiStatus) => {
|
|
|
5495
5609
|
return statusMap[apiStatus];
|
|
5496
5610
|
};
|
|
5497
5611
|
|
|
5612
|
+
// src/types/activitiesHistory.ts
|
|
5613
|
+
var ActivityDraftType = /* @__PURE__ */ ((ActivityDraftType2) => {
|
|
5614
|
+
ActivityDraftType2["MODELO"] = "MODELO";
|
|
5615
|
+
ActivityDraftType2["RASCUNHO"] = "RASCUNHO";
|
|
5616
|
+
return ActivityDraftType2;
|
|
5617
|
+
})(ActivityDraftType || {});
|
|
5618
|
+
var getActivityStatusBadgeAction = (status) => getStatusBadgeAction(status);
|
|
5619
|
+
var ACTIVITY_FILTER_STATUS_OPTIONS = [
|
|
5620
|
+
{ id: "A_VENCER" /* A_VENCER */, name: "A Vencer" },
|
|
5621
|
+
{ id: "VENCIDA" /* VENCIDA */, name: "Vencida" },
|
|
5622
|
+
{ id: "CONCLUIDA" /* CONCLUIDA */, name: "Conclu\xEDda" }
|
|
5623
|
+
];
|
|
5624
|
+
var mapActivityStatusToDisplay = (apiStatus) => mapApiStatusToDisplay(apiStatus);
|
|
5625
|
+
|
|
5498
5626
|
// src/components/shared/ModelsTabBase/ModelsTabBase.tsx
|
|
5499
5627
|
var import_react18 = require("react");
|
|
5500
|
-
var
|
|
5628
|
+
var import_phosphor_react15 = require("phosphor-react");
|
|
5501
5629
|
|
|
5502
5630
|
// src/components/ActivitiesHistory/components/ErrorDisplay.tsx
|
|
5503
|
-
var
|
|
5504
|
-
var ErrorDisplay = ({ error }) => /* @__PURE__ */ (0,
|
|
5631
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
5632
|
+
var ErrorDisplay = ({ error }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex items-center justify-center bg-background rounded-xl w-full min-h-[705px]", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text_default, { size: "lg", color: "text-error-500", children: error }) });
|
|
5505
5633
|
|
|
5506
5634
|
// src/components/shared/ModelsTabBase/ModelsTabBase.tsx
|
|
5507
|
-
var
|
|
5635
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
5508
5636
|
var ModelsTabBase = ({
|
|
5509
5637
|
fetchModels: fetchModelsProp,
|
|
5510
5638
|
deleteModel: deleteModelProp,
|
|
@@ -5596,9 +5724,9 @@ var ModelsTabBase = ({
|
|
|
5596
5724
|
setDeleteDialogOpen(false);
|
|
5597
5725
|
setModelToDelete(null);
|
|
5598
5726
|
}, []);
|
|
5599
|
-
return /* @__PURE__ */ (0,
|
|
5600
|
-
/* @__PURE__ */ (0,
|
|
5601
|
-
modelsError ? /* @__PURE__ */ (0,
|
|
5727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
5728
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Toaster_default, {}),
|
|
5729
|
+
modelsError ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ErrorDisplay, { error: modelsError }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "w-full", "data-testid": config.testId, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5602
5730
|
TableProvider,
|
|
5603
5731
|
{
|
|
5604
5732
|
data: models,
|
|
@@ -5622,14 +5750,14 @@ var ModelsTabBase = ({
|
|
|
5622
5750
|
image: noSearchImage
|
|
5623
5751
|
},
|
|
5624
5752
|
emptyState: {
|
|
5625
|
-
component: /* @__PURE__ */ (0,
|
|
5753
|
+
component: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5626
5754
|
EmptyState_default,
|
|
5627
5755
|
{
|
|
5628
5756
|
image: emptyStateImage,
|
|
5629
5757
|
title: config.emptyStateTitle,
|
|
5630
5758
|
description: config.emptyStateDescription,
|
|
5631
5759
|
buttonText: "Criar modelo",
|
|
5632
|
-
buttonIcon: /* @__PURE__ */ (0,
|
|
5760
|
+
buttonIcon: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_phosphor_react15.Plus, { size: 18 }),
|
|
5633
5761
|
buttonVariant: "outline",
|
|
5634
5762
|
buttonAction: "primary",
|
|
5635
5763
|
onButtonClick: onCreateModel
|
|
@@ -5643,22 +5771,22 @@ var ModelsTabBase = ({
|
|
|
5643
5771
|
table,
|
|
5644
5772
|
pagination: paginationComponent
|
|
5645
5773
|
} = renderProps;
|
|
5646
|
-
return /* @__PURE__ */ (0,
|
|
5647
|
-
/* @__PURE__ */ (0,
|
|
5648
|
-
/* @__PURE__ */ (0,
|
|
5774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "space-y-4", children: [
|
|
5775
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
5776
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5649
5777
|
Button_default,
|
|
5650
5778
|
{
|
|
5651
5779
|
variant: "solid",
|
|
5652
5780
|
action: "primary",
|
|
5653
5781
|
size: "medium",
|
|
5654
5782
|
onClick: onCreateModel,
|
|
5655
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
5783
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_phosphor_react15.Plus, { size: 18, weight: "bold" }),
|
|
5656
5784
|
children: "Criar modelo"
|
|
5657
5785
|
}
|
|
5658
5786
|
),
|
|
5659
5787
|
controls
|
|
5660
5788
|
] }),
|
|
5661
|
-
/* @__PURE__ */ (0,
|
|
5789
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "bg-background rounded-xl p-6 space-y-4", children: [
|
|
5662
5790
|
table,
|
|
5663
5791
|
paginationComponent
|
|
5664
5792
|
] })
|
|
@@ -5666,7 +5794,7 @@ var ModelsTabBase = ({
|
|
|
5666
5794
|
}
|
|
5667
5795
|
}
|
|
5668
5796
|
) }),
|
|
5669
|
-
/* @__PURE__ */ (0,
|
|
5797
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5670
5798
|
AlertDialog,
|
|
5671
5799
|
{
|
|
5672
5800
|
isOpen: deleteDialogOpen,
|
|
@@ -5682,120 +5810,6 @@ var ModelsTabBase = ({
|
|
|
5682
5810
|
] });
|
|
5683
5811
|
};
|
|
5684
5812
|
|
|
5685
|
-
// src/components/shared/ModelsTabBase/createModelsTableColumnsBase.tsx
|
|
5686
|
-
var import_phosphor_react15 = require("phosphor-react");
|
|
5687
|
-
|
|
5688
|
-
// src/utils/renderSubjectCell.tsx
|
|
5689
|
-
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
5690
|
-
var renderSubjectCell = (subjectName, mapSubjectNameToEnum, showEmptyDash = false) => {
|
|
5691
|
-
if (!subjectName) {
|
|
5692
|
-
return showEmptyDash ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text_default, { size: "sm", color: "text-text-400", children: "-" }) : null;
|
|
5693
|
-
}
|
|
5694
|
-
const subjectEnum = mapSubjectNameToEnum?.(subjectName);
|
|
5695
|
-
if (!subjectEnum) {
|
|
5696
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text_default, { size: "sm", className: "truncate", title: subjectName, children: subjectName });
|
|
5697
|
-
}
|
|
5698
|
-
const subjectInfo = getSubjectInfo(subjectEnum);
|
|
5699
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-2", title: subjectName, children: [
|
|
5700
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5701
|
-
"span",
|
|
5702
|
-
{
|
|
5703
|
-
className: cn(
|
|
5704
|
-
"w-[21px] h-[21px] flex items-center justify-center rounded-sm text-text-950 shrink-0",
|
|
5705
|
-
subjectInfo.colorClass
|
|
5706
|
-
),
|
|
5707
|
-
children: subjectInfo.icon
|
|
5708
|
-
}
|
|
5709
|
-
),
|
|
5710
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text_default, { size: "sm", className: "truncate", children: subjectName })
|
|
5711
|
-
] });
|
|
5712
|
-
};
|
|
5713
|
-
|
|
5714
|
-
// src/components/shared/ModelsTabBase/createModelsTableColumnsBase.tsx
|
|
5715
|
-
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
5716
|
-
var createModelsTableColumnsBase = (mapSubjectNameToEnum, onSend, onEdit, onDelete, config) => [
|
|
5717
|
-
{
|
|
5718
|
-
key: "title",
|
|
5719
|
-
label: "T\xEDtulo",
|
|
5720
|
-
sortable: true,
|
|
5721
|
-
className: "max-w-[400px]",
|
|
5722
|
-
render: (value) => {
|
|
5723
|
-
const title = typeof value === "string" ? value : "";
|
|
5724
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text_default, { size: "sm", title, className: "truncate block", children: title });
|
|
5725
|
-
}
|
|
5726
|
-
},
|
|
5727
|
-
{
|
|
5728
|
-
key: "savedAt",
|
|
5729
|
-
label: "Salvo em",
|
|
5730
|
-
sortable: true,
|
|
5731
|
-
className: "w-[120px]"
|
|
5732
|
-
},
|
|
5733
|
-
{
|
|
5734
|
-
key: "subject",
|
|
5735
|
-
label: "Mat\xE9ria",
|
|
5736
|
-
sortable: true,
|
|
5737
|
-
className: "max-w-[160px]",
|
|
5738
|
-
render: (value) => {
|
|
5739
|
-
const subjectName = typeof value === "string" ? value : "";
|
|
5740
|
-
return renderSubjectCell(subjectName, mapSubjectNameToEnum, true);
|
|
5741
|
-
}
|
|
5742
|
-
},
|
|
5743
|
-
{
|
|
5744
|
-
key: "actions",
|
|
5745
|
-
label: "",
|
|
5746
|
-
sortable: false,
|
|
5747
|
-
className: "w-[220px]",
|
|
5748
|
-
render: (_value, row) => {
|
|
5749
|
-
const handleSend = (e) => {
|
|
5750
|
-
e.stopPropagation();
|
|
5751
|
-
onSend?.(row);
|
|
5752
|
-
};
|
|
5753
|
-
const handleEdit = (e) => {
|
|
5754
|
-
e.stopPropagation();
|
|
5755
|
-
onEdit?.(row);
|
|
5756
|
-
};
|
|
5757
|
-
const handleDelete = (e) => {
|
|
5758
|
-
e.stopPropagation();
|
|
5759
|
-
onDelete(row);
|
|
5760
|
-
};
|
|
5761
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center gap-2 justify-end", children: [
|
|
5762
|
-
onSend && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5763
|
-
Button_default,
|
|
5764
|
-
{
|
|
5765
|
-
variant: "outline",
|
|
5766
|
-
action: "primary",
|
|
5767
|
-
size: "small",
|
|
5768
|
-
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_phosphor_react15.PaperPlaneTilt, { size: 16 }),
|
|
5769
|
-
onClick: handleSend,
|
|
5770
|
-
"aria-label": config.sendButtonAriaLabel,
|
|
5771
|
-
children: config.sendButtonLabel
|
|
5772
|
-
}
|
|
5773
|
-
),
|
|
5774
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5775
|
-
IconButton_default,
|
|
5776
|
-
{
|
|
5777
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_phosphor_react15.Trash, { size: 20 }),
|
|
5778
|
-
size: "md",
|
|
5779
|
-
onClick: handleDelete,
|
|
5780
|
-
"aria-label": config.deleteButtonAriaLabel,
|
|
5781
|
-
className: "text-text-600 hover:text-error-500 hover:bg-transparent"
|
|
5782
|
-
}
|
|
5783
|
-
),
|
|
5784
|
-
onEdit && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5785
|
-
IconButton_default,
|
|
5786
|
-
{
|
|
5787
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_phosphor_react15.PencilSimple, { size: 20 }),
|
|
5788
|
-
size: "md",
|
|
5789
|
-
onClick: handleEdit,
|
|
5790
|
-
"aria-label": config.editButtonAriaLabel,
|
|
5791
|
-
className: "text-text-600 hover:text-primary-700 hover:bg-transparent"
|
|
5792
|
-
}
|
|
5793
|
-
)
|
|
5794
|
-
] });
|
|
5795
|
-
}
|
|
5796
|
-
}
|
|
5797
|
-
];
|
|
5798
|
-
|
|
5799
5813
|
// src/utils/hookErrorHandler.ts
|
|
5800
5814
|
var import_zod = require("zod");
|
|
5801
5815
|
var createFetchErrorHandler = (validationErrorMessage, genericErrorMessage) => (error) => {
|
|
@@ -5811,22 +5825,6 @@ var createFetchErrorHandler = (validationErrorMessage, genericErrorMessage) => (
|
|
|
5811
5825
|
var import_react19 = require("react");
|
|
5812
5826
|
var import_zod2 = require("zod");
|
|
5813
5827
|
var import_dayjs = __toESM(require("dayjs"));
|
|
5814
|
-
|
|
5815
|
-
// src/types/activitiesHistory.ts
|
|
5816
|
-
var ActivityDraftType = /* @__PURE__ */ ((ActivityDraftType2) => {
|
|
5817
|
-
ActivityDraftType2["MODELO"] = "MODELO";
|
|
5818
|
-
ActivityDraftType2["RASCUNHO"] = "RASCUNHO";
|
|
5819
|
-
return ActivityDraftType2;
|
|
5820
|
-
})(ActivityDraftType || {});
|
|
5821
|
-
var getActivityStatusBadgeAction = (status) => getStatusBadgeAction(status);
|
|
5822
|
-
var ACTIVITY_FILTER_STATUS_OPTIONS = [
|
|
5823
|
-
{ id: "A_VENCER" /* A_VENCER */, name: "A Vencer" },
|
|
5824
|
-
{ id: "VENCIDA" /* VENCIDA */, name: "Vencida" },
|
|
5825
|
-
{ id: "CONCLUIDA" /* CONCLUIDA */, name: "Conclu\xEDda" }
|
|
5826
|
-
];
|
|
5827
|
-
var mapActivityStatusToDisplay = (apiStatus) => mapApiStatusToDisplay(apiStatus);
|
|
5828
|
-
|
|
5829
|
-
// src/hooks/useActivitiesHistory.ts
|
|
5830
5828
|
var activityHistoryResponseSchema = import_zod2.z.object({
|
|
5831
5829
|
id: import_zod2.z.string().uuid(),
|
|
5832
5830
|
title: import_zod2.z.string(),
|
|
@@ -5958,12 +5956,23 @@ var DEFAULT_MODELS_PAGINATION = {
|
|
|
5958
5956
|
totalPages: 0
|
|
5959
5957
|
};
|
|
5960
5958
|
var transformModelToTableItem = (model, subjectsMap) => {
|
|
5961
|
-
|
|
5959
|
+
let subject = model.subject;
|
|
5960
|
+
if (!subject && model.subjectId && subjectsMap) {
|
|
5961
|
+
const subjectName = subjectsMap.get(model.subjectId);
|
|
5962
|
+
if (subjectName) {
|
|
5963
|
+
subject = {
|
|
5964
|
+
id: model.subjectId,
|
|
5965
|
+
subjectName,
|
|
5966
|
+
subjectIcon: "BookOpen",
|
|
5967
|
+
subjectColor: "#6B7280"
|
|
5968
|
+
};
|
|
5969
|
+
}
|
|
5970
|
+
}
|
|
5962
5971
|
return {
|
|
5963
5972
|
id: model.id,
|
|
5964
5973
|
title: model.title || "Sem t\xEDtulo",
|
|
5965
5974
|
savedAt: (0, import_dayjs2.default)(model.createdAt).format("DD/MM/YYYY"),
|
|
5966
|
-
subject:
|
|
5975
|
+
subject: subject || null,
|
|
5967
5976
|
subjectId: model.subjectId
|
|
5968
5977
|
};
|
|
5969
5978
|
};
|