analytica-frontend-lib 1.2.28 → 1.2.30
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/ActivityCardQuestionBanks/index.css +19293 -0
- package/dist/ActivityCardQuestionBanks/index.css.map +1 -0
- package/dist/ActivityCardQuestionBanks/index.d.ts +21 -0
- package/dist/ActivityCardQuestionBanks/index.d.ts.map +1 -0
- package/dist/ActivityCardQuestionBanks/index.js +1717 -0
- package/dist/ActivityCardQuestionBanks/index.js.map +1 -0
- package/dist/ActivityCardQuestionBanks/index.mjs +1701 -0
- package/dist/ActivityCardQuestionBanks/index.mjs.map +1 -0
- package/dist/ActivityDetails/index.js +33 -3
- package/dist/ActivityDetails/index.js.map +1 -1
- package/dist/ActivityDetails/index.mjs +33 -3
- package/dist/ActivityDetails/index.mjs.map +1 -1
- package/dist/ActivityFilters/index.js +33 -3
- package/dist/ActivityFilters/index.js.map +1 -1
- package/dist/ActivityFilters/index.mjs +33 -3
- package/dist/ActivityFilters/index.mjs.map +1 -1
- package/dist/AlertManager/index.js +33 -3
- package/dist/AlertManager/index.js.map +1 -1
- package/dist/AlertManager/index.mjs +33 -3
- package/dist/AlertManager/index.mjs.map +1 -1
- package/dist/TableProvider/index.js +33 -3
- package/dist/TableProvider/index.js.map +1 -1
- package/dist/TableProvider/index.mjs +33 -3
- package/dist/TableProvider/index.mjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +479 -267
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +434 -223
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -1188,7 +1188,10 @@ import { useEffect as useEffect2, useMemo, useRef as useRef3, useState as useSta
|
|
|
1188
1188
|
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1189
1189
|
var CheckboxGroup = ({
|
|
1190
1190
|
categories,
|
|
1191
|
-
onCategoriesChange
|
|
1191
|
+
onCategoriesChange,
|
|
1192
|
+
compactSingleItem = true,
|
|
1193
|
+
showDivider = true,
|
|
1194
|
+
showSingleItem = false
|
|
1192
1195
|
}) => {
|
|
1193
1196
|
const [openAccordion, setOpenAccordion] = useState3("");
|
|
1194
1197
|
const autoSelectionAppliedRef = useRef3(false);
|
|
@@ -1547,16 +1550,43 @@ var CheckboxGroup = ({
|
|
|
1547
1550
|
return `${selectedVisibleCount} de ${totalVisible} ${selectedVisibleCount === 1 ? "selecionado" : "selecionados"}`;
|
|
1548
1551
|
})() })
|
|
1549
1552
|
] });
|
|
1553
|
+
const renderCompactSingleItem = (category) => {
|
|
1554
|
+
const formattedItems = getFormattedItems(category.key);
|
|
1555
|
+
const allItems = formattedItems.flatMap((group) => group.itens || []);
|
|
1556
|
+
if (allItems.length !== 1) {
|
|
1557
|
+
return null;
|
|
1558
|
+
}
|
|
1559
|
+
const singleItem = allItems[0];
|
|
1560
|
+
return /* @__PURE__ */ jsxs9(
|
|
1561
|
+
"div",
|
|
1562
|
+
{
|
|
1563
|
+
className: "flex items-center justify-between w-full px-3 py-2",
|
|
1564
|
+
children: [
|
|
1565
|
+
/* @__PURE__ */ jsx13(Text_default, { size: "sm", weight: "bold", className: "text-text-800", children: category.label }),
|
|
1566
|
+
/* @__PURE__ */ jsx13(Text_default, { size: "sm", className: "text-text-950", children: singleItem.name })
|
|
1567
|
+
]
|
|
1568
|
+
},
|
|
1569
|
+
category.key
|
|
1570
|
+
);
|
|
1571
|
+
};
|
|
1550
1572
|
const renderCategoryAccordion = (category) => {
|
|
1551
1573
|
const isEnabled = !category.dependsOn || category.dependsOn.every((depKey) => {
|
|
1552
1574
|
const depCat = categories.find((c) => c.key === depKey);
|
|
1553
1575
|
return depCat?.selectedIds && depCat.selectedIds.length > 0;
|
|
1554
1576
|
});
|
|
1555
1577
|
const hasOnlyOneItem = category.itens?.length === 1;
|
|
1556
|
-
if (hasOnlyOneItem) {
|
|
1578
|
+
if (hasOnlyOneItem && !compactSingleItem && !showSingleItem) {
|
|
1557
1579
|
return null;
|
|
1558
1580
|
}
|
|
1559
1581
|
const formattedItems = getFormattedItems(category.key);
|
|
1582
|
+
const allItems = formattedItems.flatMap((group) => group.itens || []);
|
|
1583
|
+
const hasOnlyOneAvailableItem = allItems.length === 1;
|
|
1584
|
+
if (compactSingleItem && hasOnlyOneAvailableItem && isEnabled) {
|
|
1585
|
+
return /* @__PURE__ */ jsxs9("div", { children: [
|
|
1586
|
+
renderCompactSingleItem(category),
|
|
1587
|
+
showDivider && /* @__PURE__ */ jsx13(Divider_default, {})
|
|
1588
|
+
] }, category.key);
|
|
1589
|
+
}
|
|
1560
1590
|
const hasNoItems = formattedItems.every(
|
|
1561
1591
|
(group) => !group.itens || group.itens.length === 0
|
|
1562
1592
|
);
|
|
@@ -1576,7 +1606,7 @@ var CheckboxGroup = ({
|
|
|
1576
1606
|
) })
|
|
1577
1607
|
}
|
|
1578
1608
|
),
|
|
1579
|
-
openAccordion !== category.key && /* @__PURE__ */ jsx13(Divider_default, {})
|
|
1609
|
+
openAccordion !== category.key && showDivider && /* @__PURE__ */ jsx13(Divider_default, {})
|
|
1580
1610
|
] }, category.key);
|
|
1581
1611
|
};
|
|
1582
1612
|
useEffect2(() => {
|
|
@@ -16922,6 +16952,186 @@ function useAppContent(config) {
|
|
|
16922
16952
|
};
|
|
16923
16953
|
}
|
|
16924
16954
|
|
|
16955
|
+
// src/components/ActivityCardQuestionBanks/ActivityCardQuestionBanks.tsx
|
|
16956
|
+
import { Plus as Plus2, CheckCircle as CheckCircle7, XCircle as XCircle6 } from "phosphor-react";
|
|
16957
|
+
import { useMemo as useMemo18 } from "react";
|
|
16958
|
+
import { jsx as jsx73, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
16959
|
+
var ActivityCardQuestionBanks = ({
|
|
16960
|
+
question,
|
|
16961
|
+
questionType,
|
|
16962
|
+
iconName = "BookOpen",
|
|
16963
|
+
subjectColor = "#000000",
|
|
16964
|
+
isDark = false,
|
|
16965
|
+
onAddToActivity,
|
|
16966
|
+
assunto,
|
|
16967
|
+
enunciado
|
|
16968
|
+
} = {}) => {
|
|
16969
|
+
const alternatives = useMemo18(() => {
|
|
16970
|
+
if (!question?.options || questionType !== "ALTERNATIVA" /* ALTERNATIVA */)
|
|
16971
|
+
return [];
|
|
16972
|
+
const correctOptionIds2 = question.correctOptionIds || [];
|
|
16973
|
+
return question.options.map((option) => {
|
|
16974
|
+
const isCorrect = correctOptionIds2.includes(option.id);
|
|
16975
|
+
return {
|
|
16976
|
+
value: option.id,
|
|
16977
|
+
label: option.option,
|
|
16978
|
+
status: isCorrect ? "correct" : void 0,
|
|
16979
|
+
disabled: !isCorrect
|
|
16980
|
+
};
|
|
16981
|
+
});
|
|
16982
|
+
}, [question, questionType]);
|
|
16983
|
+
const correctOptionId = useMemo18(() => {
|
|
16984
|
+
if (!question?.correctOptionIds || question.correctOptionIds.length === 0) {
|
|
16985
|
+
return void 0;
|
|
16986
|
+
}
|
|
16987
|
+
return question.correctOptionIds[0];
|
|
16988
|
+
}, [question]);
|
|
16989
|
+
const multipleChoices = useMemo18(() => {
|
|
16990
|
+
if (!question?.options || questionType !== "MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */)
|
|
16991
|
+
return [];
|
|
16992
|
+
const correctOptionIds2 = question.correctOptionIds || [];
|
|
16993
|
+
return question.options.map((option) => {
|
|
16994
|
+
const isCorrect = correctOptionIds2.includes(option.id);
|
|
16995
|
+
return {
|
|
16996
|
+
value: option.id,
|
|
16997
|
+
label: option.option,
|
|
16998
|
+
status: isCorrect ? "correct" : void 0,
|
|
16999
|
+
disabled: !isCorrect
|
|
17000
|
+
};
|
|
17001
|
+
});
|
|
17002
|
+
}, [question, questionType]);
|
|
17003
|
+
const correctOptionIds = useMemo18(() => {
|
|
17004
|
+
return question?.correctOptionIds || [];
|
|
17005
|
+
}, [question]);
|
|
17006
|
+
const getStatusBadge2 = (status) => {
|
|
17007
|
+
switch (status) {
|
|
17008
|
+
case "correct":
|
|
17009
|
+
return /* @__PURE__ */ jsx73(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx73(CheckCircle7, {}), children: "Resposta correta" });
|
|
17010
|
+
case "incorrect":
|
|
17011
|
+
return /* @__PURE__ */ jsx73(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx73(XCircle6, {}), children: "Resposta incorreta" });
|
|
17012
|
+
}
|
|
17013
|
+
};
|
|
17014
|
+
const getStatusStyles2 = (status) => {
|
|
17015
|
+
switch (status) {
|
|
17016
|
+
case "correct":
|
|
17017
|
+
return "bg-success-background border-success-300";
|
|
17018
|
+
case "incorrect":
|
|
17019
|
+
return "bg-error-background border-error-300";
|
|
17020
|
+
}
|
|
17021
|
+
};
|
|
17022
|
+
const getLetterByIndex = (index) => String.fromCodePoint(97 + index);
|
|
17023
|
+
const renderAlternative = () => {
|
|
17024
|
+
if (!question || alternatives.length === 0) return null;
|
|
17025
|
+
return /* @__PURE__ */ jsx73("div", { className: "mt-4", children: /* @__PURE__ */ jsx73(
|
|
17026
|
+
AlternativesList,
|
|
17027
|
+
{
|
|
17028
|
+
alternatives,
|
|
17029
|
+
mode: "readonly",
|
|
17030
|
+
layout: "compact",
|
|
17031
|
+
selectedValue: correctOptionId,
|
|
17032
|
+
name: "teacher-question-view"
|
|
17033
|
+
}
|
|
17034
|
+
) });
|
|
17035
|
+
};
|
|
17036
|
+
const renderMultipleChoice = () => {
|
|
17037
|
+
if (!question || multipleChoices.length === 0) return null;
|
|
17038
|
+
return /* @__PURE__ */ jsx73("div", { className: "mt-4", children: /* @__PURE__ */ jsx73(
|
|
17039
|
+
MultipleChoiceList,
|
|
17040
|
+
{
|
|
17041
|
+
choices: multipleChoices,
|
|
17042
|
+
mode: "readonly",
|
|
17043
|
+
selectedValues: correctOptionIds,
|
|
17044
|
+
name: "teacher-question-view-multiple"
|
|
17045
|
+
}
|
|
17046
|
+
) });
|
|
17047
|
+
};
|
|
17048
|
+
const renderDissertative = () => {
|
|
17049
|
+
return /* @__PURE__ */ jsx73("div", { className: "mt-4 px-2 py-4", children: /* @__PURE__ */ jsx73(Text_default, { size: "sm", className: "text-text-600 italic", children: "Resposta do aluno" }) });
|
|
17050
|
+
};
|
|
17051
|
+
const renderTrueOrFalse = () => {
|
|
17052
|
+
if (!question || question.options.length === 0) return null;
|
|
17053
|
+
return /* @__PURE__ */ jsx73("div", { className: "mt-4", children: /* @__PURE__ */ jsx73("div", { className: "flex flex-col gap-3.5", children: question.options.map((option, index) => {
|
|
17054
|
+
const isCorrect = correctOptionIds.includes(option.id);
|
|
17055
|
+
const correctAnswer = isCorrect ? "Verdadeiro" : "Falso";
|
|
17056
|
+
const variantCorrect = "correct";
|
|
17057
|
+
return /* @__PURE__ */ jsx73("section", { className: "flex flex-col gap-2", children: /* @__PURE__ */ jsxs57(
|
|
17058
|
+
"div",
|
|
17059
|
+
{
|
|
17060
|
+
className: cn(
|
|
17061
|
+
"flex flex-row justify-between items-center gap-2 p-2 rounded-md border",
|
|
17062
|
+
getStatusStyles2(variantCorrect)
|
|
17063
|
+
),
|
|
17064
|
+
children: [
|
|
17065
|
+
/* @__PURE__ */ jsx73(Text_default, { size: "sm", className: "text-text-900", children: getLetterByIndex(index).concat(") ").concat(option.option) }),
|
|
17066
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex flex-row items-center gap-2 flex-shrink-0", children: [
|
|
17067
|
+
/* @__PURE__ */ jsxs57(Text_default, { size: "sm", className: "text-text-700", children: [
|
|
17068
|
+
"Resposta correta: ",
|
|
17069
|
+
correctAnswer
|
|
17070
|
+
] }),
|
|
17071
|
+
getStatusBadge2(variantCorrect)
|
|
17072
|
+
] })
|
|
17073
|
+
]
|
|
17074
|
+
}
|
|
17075
|
+
) }, option.id);
|
|
17076
|
+
}) }) });
|
|
17077
|
+
};
|
|
17078
|
+
const renderConnectDots = () => {
|
|
17079
|
+
return null;
|
|
17080
|
+
};
|
|
17081
|
+
const renderFill = () => {
|
|
17082
|
+
return null;
|
|
17083
|
+
};
|
|
17084
|
+
const renderImage = () => {
|
|
17085
|
+
return null;
|
|
17086
|
+
};
|
|
17087
|
+
const questionRenderers = {
|
|
17088
|
+
["ALTERNATIVA" /* ALTERNATIVA */]: renderAlternative,
|
|
17089
|
+
["MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */]: renderMultipleChoice,
|
|
17090
|
+
["DISSERTATIVA" /* DISSERTATIVA */]: renderDissertative,
|
|
17091
|
+
["VERDADEIRO_FALSO" /* VERDADEIRO_FALSO */]: renderTrueOrFalse,
|
|
17092
|
+
["LIGAR_PONTOS" /* LIGAR_PONTOS */]: renderConnectDots,
|
|
17093
|
+
["PREENCHER" /* PREENCHER */]: renderFill,
|
|
17094
|
+
["IMAGEM" /* IMAGEM */]: renderImage
|
|
17095
|
+
};
|
|
17096
|
+
const renderQuestionContent = () => {
|
|
17097
|
+
if (!questionType) return null;
|
|
17098
|
+
const renderer = questionRenderers[questionType];
|
|
17099
|
+
return renderer ? renderer() : null;
|
|
17100
|
+
};
|
|
17101
|
+
return /* @__PURE__ */ jsxs57("div", { className: "w-full flex flex-col gap-2 px-4 py-6", children: [
|
|
17102
|
+
/* @__PURE__ */ jsxs57("section", { className: "flex flex-row gap-2 text-text-650", children: [
|
|
17103
|
+
/* @__PURE__ */ jsxs57("div", { className: "py-1 px-2 flex flex-row items-center gap-1", children: [
|
|
17104
|
+
/* @__PURE__ */ jsx73(
|
|
17105
|
+
"span",
|
|
17106
|
+
{
|
|
17107
|
+
className: "size-4 rounded-sm flex items-center justify-center shrink-0 text-text-950",
|
|
17108
|
+
style: {
|
|
17109
|
+
backgroundColor: getSubjectColorWithOpacity(subjectColor, isDark)
|
|
17110
|
+
},
|
|
17111
|
+
children: /* @__PURE__ */ jsx73(IconRender_default, { iconName, size: 14, color: "currentColor" })
|
|
17112
|
+
}
|
|
17113
|
+
),
|
|
17114
|
+
/* @__PURE__ */ jsx73(Text_default, { size: "sm", children: assunto || "Assunto n\xE3o informado" })
|
|
17115
|
+
] }),
|
|
17116
|
+
/* @__PURE__ */ jsx73("div", { className: "py-1 px-2 flex flex-row items-center gap-1", children: /* @__PURE__ */ jsx73(Text_default, { size: "sm", className: "", children: questionType ? questionTypeLabels[questionType] : "Tipo de quest\xE3o" }) })
|
|
17117
|
+
] }),
|
|
17118
|
+
/* @__PURE__ */ jsxs57("section", { className: "flex flex-col gap-1", children: [
|
|
17119
|
+
/* @__PURE__ */ jsx73(Text_default, { size: "md", weight: "medium", className: "text-text-950 text-md", children: enunciado || "Enunciado n\xE3o informado" }),
|
|
17120
|
+
renderQuestionContent()
|
|
17121
|
+
] }),
|
|
17122
|
+
/* @__PURE__ */ jsx73("section", { children: /* @__PURE__ */ jsx73(
|
|
17123
|
+
Button_default,
|
|
17124
|
+
{
|
|
17125
|
+
size: "small",
|
|
17126
|
+
iconLeft: /* @__PURE__ */ jsx73(Plus2, {}),
|
|
17127
|
+
className: "w-full",
|
|
17128
|
+
onClick: onAddToActivity,
|
|
17129
|
+
children: "Adicionar \xE0 atividade"
|
|
17130
|
+
}
|
|
17131
|
+
) })
|
|
17132
|
+
] });
|
|
17133
|
+
};
|
|
17134
|
+
|
|
16925
17135
|
// src/types/activityDetails.ts
|
|
16926
17136
|
var STUDENT_ACTIVITY_STATUS = {
|
|
16927
17137
|
CONCLUIDO: "CONCLUIDO",
|
|
@@ -16973,9 +17183,9 @@ var formatDateToBrazilian = (dateString) => {
|
|
|
16973
17183
|
};
|
|
16974
17184
|
|
|
16975
17185
|
// src/components/ActivityDetails/ActivityDetails.tsx
|
|
16976
|
-
import { useState as useState34, useMemo as
|
|
17186
|
+
import { useState as useState34, useMemo as useMemo19, useCallback as useCallback12, useEffect as useEffect36 } from "react";
|
|
16977
17187
|
import { Medal as Medal2, Star as Star2, File as File2, CaretRight as CaretRight9, WarningCircle as WarningCircle7 } from "phosphor-react";
|
|
16978
|
-
import { Fragment as Fragment17, jsx as
|
|
17188
|
+
import { Fragment as Fragment17, jsx as jsx74, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
16979
17189
|
var createTableColumns = (onCorrectActivity) => [
|
|
16980
17190
|
{
|
|
16981
17191
|
key: "studentName",
|
|
@@ -16983,9 +17193,9 @@ var createTableColumns = (onCorrectActivity) => [
|
|
|
16983
17193
|
sortable: true,
|
|
16984
17194
|
render: (value) => {
|
|
16985
17195
|
const name = typeof value === "string" ? value : "";
|
|
16986
|
-
return /* @__PURE__ */
|
|
16987
|
-
/* @__PURE__ */
|
|
16988
|
-
/* @__PURE__ */
|
|
17196
|
+
return /* @__PURE__ */ jsxs58("div", { className: "flex items-center gap-3", children: [
|
|
17197
|
+
/* @__PURE__ */ jsx74("div", { className: "w-6 h-6 bg-blue-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsx74(Text_default, { className: "text-xs font-semibold text-primary-700", children: name.charAt(0).toUpperCase() }) }),
|
|
17198
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-sm font-normal text-text-950", children: name })
|
|
16989
17199
|
] });
|
|
16990
17200
|
}
|
|
16991
17201
|
},
|
|
@@ -16995,7 +17205,7 @@ var createTableColumns = (onCorrectActivity) => [
|
|
|
16995
17205
|
sortable: false,
|
|
16996
17206
|
render: (value) => {
|
|
16997
17207
|
const config = getStatusBadgeConfig(value);
|
|
16998
|
-
return /* @__PURE__ */
|
|
17208
|
+
return /* @__PURE__ */ jsx74(
|
|
16999
17209
|
Badge_default,
|
|
17000
17210
|
{
|
|
17001
17211
|
className: `${config.bgColor} ${config.textColor} text-xs px-2 py-1`,
|
|
@@ -17010,22 +17220,22 @@ var createTableColumns = (onCorrectActivity) => [
|
|
|
17010
17220
|
sortable: true,
|
|
17011
17221
|
render: (value) => {
|
|
17012
17222
|
if (!value || typeof value !== "string") {
|
|
17013
|
-
return /* @__PURE__ */
|
|
17223
|
+
return /* @__PURE__ */ jsx74(Text_default, { className: "text-sm text-text-400", children: "-" });
|
|
17014
17224
|
}
|
|
17015
|
-
return /* @__PURE__ */
|
|
17225
|
+
return /* @__PURE__ */ jsx74(Text_default, { className: "text-sm text-text-700", children: formatDateToBrazilian(value) });
|
|
17016
17226
|
}
|
|
17017
17227
|
},
|
|
17018
17228
|
{
|
|
17019
17229
|
key: "timeSpent",
|
|
17020
17230
|
label: "Dura\xE7\xE3o",
|
|
17021
17231
|
sortable: false,
|
|
17022
|
-
render: (value) => Number(value) > 0 ? /* @__PURE__ */
|
|
17232
|
+
render: (value) => Number(value) > 0 ? /* @__PURE__ */ jsx74(Text_default, { className: "text-sm text-text-700", children: formatTimeSpent(Number(value)) }) : /* @__PURE__ */ jsx74(Text_default, { className: "text-sm text-text-400", children: "-" })
|
|
17023
17233
|
},
|
|
17024
17234
|
{
|
|
17025
17235
|
key: "score",
|
|
17026
17236
|
label: "Nota",
|
|
17027
17237
|
sortable: true,
|
|
17028
|
-
render: (value) => value === null ? /* @__PURE__ */
|
|
17238
|
+
render: (value) => value === null ? /* @__PURE__ */ jsx74(Text_default, { className: "text-sm text-text-400", children: "-" }) : /* @__PURE__ */ jsx74(Text_default, { className: "text-sm font-semibold text-text-950", children: Number(value).toFixed(1) })
|
|
17029
17239
|
},
|
|
17030
17240
|
{
|
|
17031
17241
|
key: "actions",
|
|
@@ -17033,7 +17243,7 @@ var createTableColumns = (onCorrectActivity) => [
|
|
|
17033
17243
|
sortable: false,
|
|
17034
17244
|
render: (_value, row) => {
|
|
17035
17245
|
if (row.status === STUDENT_ACTIVITY_STATUS.AGUARDANDO_CORRECAO) {
|
|
17036
|
-
return /* @__PURE__ */
|
|
17246
|
+
return /* @__PURE__ */ jsx74(
|
|
17037
17247
|
Button_default,
|
|
17038
17248
|
{
|
|
17039
17249
|
variant: "outline",
|
|
@@ -17045,7 +17255,7 @@ var createTableColumns = (onCorrectActivity) => [
|
|
|
17045
17255
|
);
|
|
17046
17256
|
}
|
|
17047
17257
|
if (row.status === STUDENT_ACTIVITY_STATUS.CONCLUIDO || row.status === STUDENT_ACTIVITY_STATUS.NAO_ENTREGUE) {
|
|
17048
|
-
return /* @__PURE__ */
|
|
17258
|
+
return /* @__PURE__ */ jsx74(
|
|
17049
17259
|
Button_default,
|
|
17050
17260
|
{
|
|
17051
17261
|
variant: "link",
|
|
@@ -17147,7 +17357,7 @@ var ActivityDetails = ({
|
|
|
17147
17357
|
},
|
|
17148
17358
|
[activityId, correctionData?.studentId, submitObservation]
|
|
17149
17359
|
);
|
|
17150
|
-
const tableData =
|
|
17360
|
+
const tableData = useMemo19(() => {
|
|
17151
17361
|
if (!data?.students) return [];
|
|
17152
17362
|
return data.students.map((student) => ({
|
|
17153
17363
|
id: student.studentId,
|
|
@@ -17159,7 +17369,7 @@ var ActivityDetails = ({
|
|
|
17159
17369
|
score: student.score
|
|
17160
17370
|
}));
|
|
17161
17371
|
}, [data?.students]);
|
|
17162
|
-
const columns =
|
|
17372
|
+
const columns = useMemo19(
|
|
17163
17373
|
() => createTableColumns(handleCorrectActivity),
|
|
17164
17374
|
[handleCorrectActivity]
|
|
17165
17375
|
);
|
|
@@ -17191,10 +17401,10 @@ var ActivityDetails = ({
|
|
|
17191
17401
|
const subjectEnum = data?.activity.subjectName && mapSubjectNameToEnum ? mapSubjectNameToEnum(data.activity.subjectName) : null;
|
|
17192
17402
|
const subjectInfo = subjectEnum ? getSubjectInfo(subjectEnum) : null;
|
|
17193
17403
|
if (loading && !data) {
|
|
17194
|
-
return /* @__PURE__ */
|
|
17195
|
-
/* @__PURE__ */
|
|
17196
|
-
/* @__PURE__ */
|
|
17197
|
-
/* @__PURE__ */
|
|
17404
|
+
return /* @__PURE__ */ jsx74("div", { className: "flex flex-col w-full h-auto relative justify-center items-center mb-5 overflow-hidden", children: /* @__PURE__ */ jsxs58("div", { className: "flex flex-col w-full h-full max-w-[1150px] mx-auto z-10 lg:px-0 px-4 pt-4 gap-4", children: [
|
|
17405
|
+
/* @__PURE__ */ jsx74("div", { className: "flex items-center gap-2 py-4", children: /* @__PURE__ */ jsx74(SkeletonText, { width: 100, height: 14 }) }),
|
|
17406
|
+
/* @__PURE__ */ jsx74(SkeletonRounded, { className: "w-full h-[120px]" }),
|
|
17407
|
+
/* @__PURE__ */ jsx74(
|
|
17198
17408
|
"div",
|
|
17199
17409
|
{
|
|
17200
17410
|
className: cn(
|
|
@@ -17207,14 +17417,14 @@ var ActivityDetails = ({
|
|
|
17207
17417
|
"pending",
|
|
17208
17418
|
"avg-score",
|
|
17209
17419
|
"avg-time"
|
|
17210
|
-
].map((id) => /* @__PURE__ */
|
|
17420
|
+
].map((id) => /* @__PURE__ */ jsx74(SkeletonRounded, { className: "w-full h-[150px]" }, id))
|
|
17211
17421
|
}
|
|
17212
17422
|
),
|
|
17213
|
-
/* @__PURE__ */
|
|
17423
|
+
/* @__PURE__ */ jsx74("div", { className: "w-full bg-background rounded-xl p-6", children: /* @__PURE__ */ jsx74(SkeletonTable, { rows: 5, columns: 6, showHeader: true }) })
|
|
17214
17424
|
] }) });
|
|
17215
17425
|
}
|
|
17216
17426
|
if (error || !data) {
|
|
17217
|
-
return /* @__PURE__ */
|
|
17427
|
+
return /* @__PURE__ */ jsx74("div", { className: "flex flex-col w-full h-auto relative justify-center items-center mb-5", children: /* @__PURE__ */ jsx74("div", { className: "flex flex-col w-full h-full max-w-[1150px] mx-auto z-10 lg:px-0 px-4 pt-4", children: /* @__PURE__ */ jsx74(
|
|
17218
17428
|
EmptyState_default,
|
|
17219
17429
|
{
|
|
17220
17430
|
image: emptyStateImage,
|
|
@@ -17223,10 +17433,10 @@ var ActivityDetails = ({
|
|
|
17223
17433
|
}
|
|
17224
17434
|
) }) });
|
|
17225
17435
|
}
|
|
17226
|
-
return /* @__PURE__ */
|
|
17227
|
-
/* @__PURE__ */
|
|
17228
|
-
/* @__PURE__ */
|
|
17229
|
-
/* @__PURE__ */
|
|
17436
|
+
return /* @__PURE__ */ jsxs58("div", { className: "flex flex-col w-full h-auto relative justify-center items-center mb-5 overflow-hidden", children: [
|
|
17437
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex flex-col w-full h-full max-w-[1150px] mx-auto z-10 lg:px-0 px-4 pt-4 gap-4", children: [
|
|
17438
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex items-center gap-2 py-4", children: [
|
|
17439
|
+
/* @__PURE__ */ jsx74(
|
|
17230
17440
|
"button",
|
|
17231
17441
|
{
|
|
17232
17442
|
onClick: handleBack,
|
|
@@ -17234,31 +17444,31 @@ var ActivityDetails = ({
|
|
|
17234
17444
|
children: "Atividades"
|
|
17235
17445
|
}
|
|
17236
17446
|
),
|
|
17237
|
-
/* @__PURE__ */
|
|
17238
|
-
/* @__PURE__ */
|
|
17447
|
+
/* @__PURE__ */ jsx74(CaretRight9, { size: 16, className: "text-text-500" }),
|
|
17448
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-text-950 text-sm font-bold", children: data.activity.title })
|
|
17239
17449
|
] }),
|
|
17240
|
-
/* @__PURE__ */
|
|
17241
|
-
/* @__PURE__ */
|
|
17242
|
-
/* @__PURE__ */
|
|
17243
|
-
/* @__PURE__ */
|
|
17244
|
-
/* @__PURE__ */
|
|
17450
|
+
/* @__PURE__ */ jsx74("div", { className: "bg-background rounded-xl p-4 flex flex-col gap-2", children: /* @__PURE__ */ jsxs58("div", { className: "flex justify-between items-start", children: [
|
|
17451
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex flex-col gap-2", children: [
|
|
17452
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-2xl font-bold text-text-950", children: data.activity.title }),
|
|
17453
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
17454
|
+
/* @__PURE__ */ jsxs58(Text_default, { className: "text-sm text-text-500", children: [
|
|
17245
17455
|
"In\xEDcio",
|
|
17246
17456
|
" ",
|
|
17247
17457
|
data.activity.startDate ? formatDateToBrazilian(data.activity.startDate) : "00/00/0000"
|
|
17248
17458
|
] }),
|
|
17249
|
-
/* @__PURE__ */
|
|
17250
|
-
/* @__PURE__ */
|
|
17459
|
+
/* @__PURE__ */ jsx74("span", { className: "w-1 h-1 rounded-full bg-text-500" }),
|
|
17460
|
+
/* @__PURE__ */ jsxs58(Text_default, { className: "text-sm text-text-500", children: [
|
|
17251
17461
|
"Prazo final",
|
|
17252
17462
|
" ",
|
|
17253
17463
|
data.activity.finalDate ? formatDateToBrazilian(data.activity.finalDate) : "00/00/0000"
|
|
17254
17464
|
] }),
|
|
17255
|
-
/* @__PURE__ */
|
|
17256
|
-
/* @__PURE__ */
|
|
17257
|
-
/* @__PURE__ */
|
|
17258
|
-
/* @__PURE__ */
|
|
17259
|
-
/* @__PURE__ */
|
|
17260
|
-
subjectInfo ? /* @__PURE__ */
|
|
17261
|
-
/* @__PURE__ */
|
|
17465
|
+
/* @__PURE__ */ jsx74("span", { className: "w-1 h-1 rounded-full bg-text-500" }),
|
|
17466
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-sm text-text-500", children: data.activity.schoolName }),
|
|
17467
|
+
/* @__PURE__ */ jsx74("span", { className: "w-1 h-1 rounded-full bg-text-500" }),
|
|
17468
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-sm text-text-500", children: data.activity.year }),
|
|
17469
|
+
/* @__PURE__ */ jsx74("span", { className: "w-1 h-1 rounded-full bg-text-500" }),
|
|
17470
|
+
subjectInfo ? /* @__PURE__ */ jsxs58("div", { className: "flex items-center gap-1", children: [
|
|
17471
|
+
/* @__PURE__ */ jsx74(
|
|
17262
17472
|
"span",
|
|
17263
17473
|
{
|
|
17264
17474
|
className: cn(
|
|
@@ -17268,33 +17478,33 @@ var ActivityDetails = ({
|
|
|
17268
17478
|
children: subjectInfo.icon
|
|
17269
17479
|
}
|
|
17270
17480
|
),
|
|
17271
|
-
/* @__PURE__ */
|
|
17272
|
-
] }) : /* @__PURE__ */
|
|
17273
|
-
/* @__PURE__ */
|
|
17274
|
-
/* @__PURE__ */
|
|
17481
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-sm text-text-500", children: data.activity.subjectName })
|
|
17482
|
+
] }) : /* @__PURE__ */ jsx74(Text_default, { className: "text-sm text-text-500", children: data.activity.subjectName }),
|
|
17483
|
+
/* @__PURE__ */ jsx74("span", { className: "w-1 h-1 rounded-full bg-text-500" }),
|
|
17484
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-sm text-text-500", children: data.activity.className })
|
|
17275
17485
|
] })
|
|
17276
17486
|
] }),
|
|
17277
|
-
/* @__PURE__ */
|
|
17487
|
+
/* @__PURE__ */ jsxs58(
|
|
17278
17488
|
Button_default,
|
|
17279
17489
|
{
|
|
17280
17490
|
size: "small",
|
|
17281
17491
|
onClick: handleViewActivity,
|
|
17282
17492
|
className: "bg-primary-950 text-text gap-2",
|
|
17283
17493
|
children: [
|
|
17284
|
-
/* @__PURE__ */
|
|
17494
|
+
/* @__PURE__ */ jsx74(File2, { size: 16 }),
|
|
17285
17495
|
"Ver atividade"
|
|
17286
17496
|
]
|
|
17287
17497
|
}
|
|
17288
17498
|
)
|
|
17289
17499
|
] }) }),
|
|
17290
|
-
/* @__PURE__ */
|
|
17500
|
+
/* @__PURE__ */ jsxs58(
|
|
17291
17501
|
"div",
|
|
17292
17502
|
{
|
|
17293
17503
|
className: cn("grid gap-5", isMobile ? "grid-cols-2" : "grid-cols-5"),
|
|
17294
17504
|
children: [
|
|
17295
|
-
/* @__PURE__ */
|
|
17296
|
-
/* @__PURE__ */
|
|
17297
|
-
/* @__PURE__ */
|
|
17505
|
+
/* @__PURE__ */ jsx74("div", { className: "border border-border-50 rounded-xl py-4 px-0 flex flex-col items-center justify-center gap-2 bg-primary-50", children: /* @__PURE__ */ jsxs58("div", { className: "relative w-[90px] h-[90px]", children: [
|
|
17506
|
+
/* @__PURE__ */ jsxs58("svg", { className: "w-full h-full transform -rotate-90", children: [
|
|
17507
|
+
/* @__PURE__ */ jsx74(
|
|
17298
17508
|
"circle",
|
|
17299
17509
|
{
|
|
17300
17510
|
cx: "45",
|
|
@@ -17305,7 +17515,7 @@ var ActivityDetails = ({
|
|
|
17305
17515
|
fill: "none"
|
|
17306
17516
|
}
|
|
17307
17517
|
),
|
|
17308
|
-
/* @__PURE__ */
|
|
17518
|
+
/* @__PURE__ */ jsx74(
|
|
17309
17519
|
"circle",
|
|
17310
17520
|
{
|
|
17311
17521
|
cx: "45",
|
|
@@ -17319,26 +17529,26 @@ var ActivityDetails = ({
|
|
|
17319
17529
|
}
|
|
17320
17530
|
)
|
|
17321
17531
|
] }),
|
|
17322
|
-
/* @__PURE__ */
|
|
17323
|
-
/* @__PURE__ */
|
|
17532
|
+
/* @__PURE__ */ jsxs58("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
17533
|
+
/* @__PURE__ */ jsxs58(Text_default, { className: "text-xl font-medium text-primary-600", children: [
|
|
17324
17534
|
Math.round(data.generalStats.completionPercentage),
|
|
17325
17535
|
"%"
|
|
17326
17536
|
] }),
|
|
17327
|
-
/* @__PURE__ */
|
|
17537
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-2xs font-bold text-text-600 uppercase", children: "Conclu\xEDdo" })
|
|
17328
17538
|
] })
|
|
17329
17539
|
] }) }),
|
|
17330
|
-
/* @__PURE__ */
|
|
17331
|
-
/* @__PURE__ */
|
|
17332
|
-
/* @__PURE__ */
|
|
17333
|
-
/* @__PURE__ */
|
|
17540
|
+
/* @__PURE__ */ jsxs58("div", { className: "border border-border-50 rounded-xl py-4 px-3 flex flex-col items-center justify-center gap-1 bg-warning-background", children: [
|
|
17541
|
+
/* @__PURE__ */ jsx74("div", { className: "w-[30px] h-[30px] rounded-2xl flex items-center justify-center bg-warning-300", children: /* @__PURE__ */ jsx74(Star2, { size: 16, className: "text-white", weight: "regular" }) }),
|
|
17542
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-2xs font-bold uppercase text-center text-warning-600", children: "M\xE9dia da Turma" }),
|
|
17543
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-xl font-bold text-warning-600", children: data.generalStats.averageScore.toFixed(1) })
|
|
17334
17544
|
] }),
|
|
17335
|
-
/* @__PURE__ */
|
|
17336
|
-
/* @__PURE__ */
|
|
17337
|
-
/* @__PURE__ */
|
|
17338
|
-
/* @__PURE__ */
|
|
17545
|
+
/* @__PURE__ */ jsxs58("div", { className: "border border-border-50 rounded-xl py-2 px-3 flex flex-col items-center justify-center gap-1 bg-success-200", children: [
|
|
17546
|
+
/* @__PURE__ */ jsx74("div", { className: "w-[30px] h-[30px] rounded-2xl flex items-center justify-center bg-indicator-positive", children: /* @__PURE__ */ jsx74(Medal2, { size: 16, className: "text-text-950", weight: "regular" }) }),
|
|
17547
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-2xs font-bold uppercase text-center text-success-700", children: "Quest\xF5es com mais acertos" }),
|
|
17548
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-xl font-bold text-success-700", children: formatQuestionNumbers(data.questionStats.mostCorrect) })
|
|
17339
17549
|
] }),
|
|
17340
|
-
/* @__PURE__ */
|
|
17341
|
-
/* @__PURE__ */
|
|
17550
|
+
/* @__PURE__ */ jsxs58("div", { className: "border border-border-50 rounded-xl py-2 px-3 flex flex-col items-center justify-center gap-1 bg-error-100", children: [
|
|
17551
|
+
/* @__PURE__ */ jsx74("div", { className: "w-[30px] h-[30px] rounded-2xl flex items-center justify-center bg-indicator-negative", children: /* @__PURE__ */ jsx74(
|
|
17342
17552
|
WarningCircle7,
|
|
17343
17553
|
{
|
|
17344
17554
|
size: 16,
|
|
@@ -17346,11 +17556,11 @@ var ActivityDetails = ({
|
|
|
17346
17556
|
weight: "regular"
|
|
17347
17557
|
}
|
|
17348
17558
|
) }),
|
|
17349
|
-
/* @__PURE__ */
|
|
17350
|
-
/* @__PURE__ */
|
|
17559
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-2xs font-bold uppercase text-center text-error-700", children: "Quest\xF5es com mais erros" }),
|
|
17560
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-xl font-bold text-error-700", children: formatQuestionNumbers(data.questionStats.mostIncorrect) })
|
|
17351
17561
|
] }),
|
|
17352
|
-
/* @__PURE__ */
|
|
17353
|
-
/* @__PURE__ */
|
|
17562
|
+
/* @__PURE__ */ jsxs58("div", { className: "border border-border-50 rounded-xl py-2 px-3 flex flex-col items-center justify-center gap-1 bg-info-background", children: [
|
|
17563
|
+
/* @__PURE__ */ jsx74("div", { className: "w-[30px] h-[30px] rounded-2xl flex items-center justify-center bg-info-500", children: /* @__PURE__ */ jsx74(
|
|
17354
17564
|
WarningCircle7,
|
|
17355
17565
|
{
|
|
17356
17566
|
size: 16,
|
|
@@ -17358,17 +17568,17 @@ var ActivityDetails = ({
|
|
|
17358
17568
|
weight: "regular"
|
|
17359
17569
|
}
|
|
17360
17570
|
) }),
|
|
17361
|
-
/* @__PURE__ */
|
|
17362
|
-
/* @__PURE__ */
|
|
17571
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-2xs font-bold uppercase text-center text-info-700", children: "Quest\xF5es n\xE3o respondidas" }),
|
|
17572
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-xl font-bold text-info-700", children: formatQuestionNumbers(data.questionStats.notAnswered) })
|
|
17363
17573
|
] })
|
|
17364
17574
|
]
|
|
17365
17575
|
}
|
|
17366
17576
|
),
|
|
17367
|
-
correctionError && /* @__PURE__ */
|
|
17368
|
-
/* @__PURE__ */
|
|
17369
|
-
/* @__PURE__ */
|
|
17577
|
+
correctionError && /* @__PURE__ */ jsxs58("div", { className: "w-full bg-error-50 border border-error-200 rounded-xl p-4 flex items-center gap-3", children: [
|
|
17578
|
+
/* @__PURE__ */ jsx74(WarningCircle7, { size: 20, className: "text-error-600", weight: "fill" }),
|
|
17579
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-error-700 text-sm", children: correctionError })
|
|
17370
17580
|
] }),
|
|
17371
|
-
/* @__PURE__ */
|
|
17581
|
+
/* @__PURE__ */ jsx74("div", { className: "w-full bg-background rounded-xl p-6 space-y-4", children: /* @__PURE__ */ jsx74(
|
|
17372
17582
|
TableProvider,
|
|
17373
17583
|
{
|
|
17374
17584
|
data: tableData,
|
|
@@ -17385,7 +17595,7 @@ var ActivityDetails = ({
|
|
|
17385
17595
|
totalPages: data.pagination.totalPages
|
|
17386
17596
|
},
|
|
17387
17597
|
emptyState: {
|
|
17388
|
-
component: /* @__PURE__ */
|
|
17598
|
+
component: /* @__PURE__ */ jsx74(
|
|
17389
17599
|
EmptyState_default,
|
|
17390
17600
|
{
|
|
17391
17601
|
image: emptyStateImage,
|
|
@@ -17395,14 +17605,14 @@ var ActivityDetails = ({
|
|
|
17395
17605
|
)
|
|
17396
17606
|
},
|
|
17397
17607
|
onParamsChange: handleTableParamsChange,
|
|
17398
|
-
children: ({ table, pagination }) => /* @__PURE__ */
|
|
17608
|
+
children: ({ table, pagination }) => /* @__PURE__ */ jsxs58(Fragment17, { children: [
|
|
17399
17609
|
table,
|
|
17400
17610
|
pagination
|
|
17401
17611
|
] })
|
|
17402
17612
|
}
|
|
17403
17613
|
) })
|
|
17404
17614
|
] }),
|
|
17405
|
-
/* @__PURE__ */
|
|
17615
|
+
/* @__PURE__ */ jsx74(
|
|
17406
17616
|
CorrectActivityModal_default,
|
|
17407
17617
|
{
|
|
17408
17618
|
isOpen: isModalOpen,
|
|
@@ -17528,36 +17738,36 @@ var mapInternalStatusToApi = (internalStatus) => {
|
|
|
17528
17738
|
|
|
17529
17739
|
// src/components/Support/utils/supportUtils.tsx
|
|
17530
17740
|
import { KeyIcon, BugIcon, InfoIcon } from "@phosphor-icons/react";
|
|
17531
|
-
import { jsx as
|
|
17741
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
17532
17742
|
var getCategoryIcon = (category, size = 16) => {
|
|
17533
17743
|
if (!category) return null;
|
|
17534
17744
|
switch (category) {
|
|
17535
17745
|
case "acesso" /* ACESSO */:
|
|
17536
|
-
return /* @__PURE__ */
|
|
17746
|
+
return /* @__PURE__ */ jsx75(KeyIcon, { size });
|
|
17537
17747
|
case "tecnico" /* TECNICO */:
|
|
17538
|
-
return /* @__PURE__ */
|
|
17748
|
+
return /* @__PURE__ */ jsx75(BugIcon, { size });
|
|
17539
17749
|
case "outros" /* OUTROS */:
|
|
17540
|
-
return /* @__PURE__ */
|
|
17750
|
+
return /* @__PURE__ */ jsx75(InfoIcon, { size });
|
|
17541
17751
|
default:
|
|
17542
|
-
return /* @__PURE__ */
|
|
17752
|
+
return /* @__PURE__ */ jsx75(InfoIcon, { size });
|
|
17543
17753
|
}
|
|
17544
17754
|
};
|
|
17545
17755
|
|
|
17546
17756
|
// src/components/Support/components/TicketModal.tsx
|
|
17547
|
-
import { Fragment as Fragment18, jsx as
|
|
17757
|
+
import { Fragment as Fragment18, jsx as jsx76, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
17548
17758
|
dayjs.locale("pt-br");
|
|
17549
|
-
var AnswerSkeleton = () => /* @__PURE__ */
|
|
17550
|
-
/* @__PURE__ */
|
|
17551
|
-
/* @__PURE__ */
|
|
17552
|
-
/* @__PURE__ */
|
|
17759
|
+
var AnswerSkeleton = () => /* @__PURE__ */ jsxs59("div", { className: "bg-background p-4 space-y-6 rounded-xl", children: [
|
|
17760
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-center space-x-6", children: [
|
|
17761
|
+
/* @__PURE__ */ jsx76(SkeletonText, { width: "80px", height: 16 }),
|
|
17762
|
+
/* @__PURE__ */ jsx76(SkeletonText, { width: "200px", height: 16 })
|
|
17553
17763
|
] }),
|
|
17554
|
-
/* @__PURE__ */
|
|
17555
|
-
/* @__PURE__ */
|
|
17556
|
-
/* @__PURE__ */
|
|
17557
|
-
/* @__PURE__ */
|
|
17558
|
-
/* @__PURE__ */
|
|
17559
|
-
/* @__PURE__ */
|
|
17560
|
-
/* @__PURE__ */
|
|
17764
|
+
/* @__PURE__ */ jsx76(Divider_default, {}),
|
|
17765
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-start space-x-6", children: [
|
|
17766
|
+
/* @__PURE__ */ jsx76(SkeletonText, { width: "80px", height: 16 }),
|
|
17767
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex-1 space-y-2", children: [
|
|
17768
|
+
/* @__PURE__ */ jsx76(SkeletonText, { width: "100%", height: 16 }),
|
|
17769
|
+
/* @__PURE__ */ jsx76(SkeletonText, { width: "80%", height: 16 }),
|
|
17770
|
+
/* @__PURE__ */ jsx76(SkeletonText, { width: "60%", height: 16 })
|
|
17561
17771
|
] })
|
|
17562
17772
|
] })
|
|
17563
17773
|
] });
|
|
@@ -17630,8 +17840,8 @@ var TicketModal = ({
|
|
|
17630
17840
|
setAnswers([]);
|
|
17631
17841
|
}
|
|
17632
17842
|
}, [isOpen, fetchAnswers]);
|
|
17633
|
-
return /* @__PURE__ */
|
|
17634
|
-
/* @__PURE__ */
|
|
17843
|
+
return /* @__PURE__ */ jsxs59(Fragment18, { children: [
|
|
17844
|
+
/* @__PURE__ */ jsx76(
|
|
17635
17845
|
Modal_default,
|
|
17636
17846
|
{
|
|
17637
17847
|
isOpen,
|
|
@@ -17641,10 +17851,10 @@ var TicketModal = ({
|
|
|
17641
17851
|
hideCloseButton: false,
|
|
17642
17852
|
closeOnEscape: true,
|
|
17643
17853
|
"data-testid": "ticket-modal",
|
|
17644
|
-
children: /* @__PURE__ */
|
|
17645
|
-
/* @__PURE__ */
|
|
17646
|
-
/* @__PURE__ */
|
|
17647
|
-
canCloseTicket && /* @__PURE__ */
|
|
17854
|
+
children: /* @__PURE__ */ jsxs59("div", { className: "flex flex-col h-full max-h-[80vh]", children: [
|
|
17855
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex justify-between items-center mb-3", children: [
|
|
17856
|
+
/* @__PURE__ */ jsx76(Text_default, { size: "md", weight: "bold", className: "text-text-950", children: "Detalhes" }),
|
|
17857
|
+
canCloseTicket && /* @__PURE__ */ jsx76(
|
|
17648
17858
|
Button_default,
|
|
17649
17859
|
{
|
|
17650
17860
|
variant: "outline",
|
|
@@ -17655,10 +17865,10 @@ var TicketModal = ({
|
|
|
17655
17865
|
}
|
|
17656
17866
|
)
|
|
17657
17867
|
] }),
|
|
17658
|
-
/* @__PURE__ */
|
|
17659
|
-
/* @__PURE__ */
|
|
17660
|
-
/* @__PURE__ */
|
|
17661
|
-
/* @__PURE__ */
|
|
17868
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex-1 overflow-y-auto pr-2 space-y-6", children: [
|
|
17869
|
+
/* @__PURE__ */ jsxs59("div", { className: "bg-background p-4 space-y-6 rounded-xl", children: [
|
|
17870
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-center space-x-6", children: [
|
|
17871
|
+
/* @__PURE__ */ jsx76(
|
|
17662
17872
|
Text_default,
|
|
17663
17873
|
{
|
|
17664
17874
|
size: "md",
|
|
@@ -17667,10 +17877,10 @@ var TicketModal = ({
|
|
|
17667
17877
|
children: "ID"
|
|
17668
17878
|
}
|
|
17669
17879
|
),
|
|
17670
|
-
/* @__PURE__ */
|
|
17880
|
+
/* @__PURE__ */ jsx76(Text_default, { size: "md", weight: "normal", className: "text-text-600", children: ticket.id })
|
|
17671
17881
|
] }),
|
|
17672
|
-
/* @__PURE__ */
|
|
17673
|
-
/* @__PURE__ */
|
|
17882
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-center space-x-6", children: [
|
|
17883
|
+
/* @__PURE__ */ jsx76(
|
|
17674
17884
|
Text_default,
|
|
17675
17885
|
{
|
|
17676
17886
|
size: "md",
|
|
@@ -17679,10 +17889,10 @@ var TicketModal = ({
|
|
|
17679
17889
|
children: "Aberto em"
|
|
17680
17890
|
}
|
|
17681
17891
|
),
|
|
17682
|
-
/* @__PURE__ */
|
|
17892
|
+
/* @__PURE__ */ jsx76(Text_default, { size: "md", weight: "normal", className: "text-text-600", children: dayjs(ticket.createdAt).format("DD MMMM YYYY, [\xE0s] HH[h]") })
|
|
17683
17893
|
] }),
|
|
17684
|
-
/* @__PURE__ */
|
|
17685
|
-
/* @__PURE__ */
|
|
17894
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-center space-x-6", children: [
|
|
17895
|
+
/* @__PURE__ */ jsx76(
|
|
17686
17896
|
Text_default,
|
|
17687
17897
|
{
|
|
17688
17898
|
size: "md",
|
|
@@ -17691,7 +17901,7 @@ var TicketModal = ({
|
|
|
17691
17901
|
children: "Status"
|
|
17692
17902
|
}
|
|
17693
17903
|
),
|
|
17694
|
-
/* @__PURE__ */
|
|
17904
|
+
/* @__PURE__ */ jsx76(
|
|
17695
17905
|
Badge_default,
|
|
17696
17906
|
{
|
|
17697
17907
|
variant: "solid",
|
|
@@ -17702,8 +17912,8 @@ var TicketModal = ({
|
|
|
17702
17912
|
}
|
|
17703
17913
|
)
|
|
17704
17914
|
] }),
|
|
17705
|
-
/* @__PURE__ */
|
|
17706
|
-
/* @__PURE__ */
|
|
17915
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-center space-x-6", children: [
|
|
17916
|
+
/* @__PURE__ */ jsx76(
|
|
17707
17917
|
Text_default,
|
|
17708
17918
|
{
|
|
17709
17919
|
size: "md",
|
|
@@ -17712,7 +17922,7 @@ var TicketModal = ({
|
|
|
17712
17922
|
children: "Tipo"
|
|
17713
17923
|
}
|
|
17714
17924
|
),
|
|
17715
|
-
/* @__PURE__ */
|
|
17925
|
+
/* @__PURE__ */ jsxs59(
|
|
17716
17926
|
Badge_default,
|
|
17717
17927
|
{
|
|
17718
17928
|
variant: "solid",
|
|
@@ -17726,9 +17936,9 @@ var TicketModal = ({
|
|
|
17726
17936
|
}
|
|
17727
17937
|
)
|
|
17728
17938
|
] }),
|
|
17729
|
-
/* @__PURE__ */
|
|
17730
|
-
/* @__PURE__ */
|
|
17731
|
-
/* @__PURE__ */
|
|
17939
|
+
/* @__PURE__ */ jsx76(Divider_default, {}),
|
|
17940
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-start space-x-6", children: [
|
|
17941
|
+
/* @__PURE__ */ jsx76(
|
|
17732
17942
|
Text_default,
|
|
17733
17943
|
{
|
|
17734
17944
|
size: "md",
|
|
@@ -17737,24 +17947,24 @@ var TicketModal = ({
|
|
|
17737
17947
|
children: "Descri\xE7\xE3o"
|
|
17738
17948
|
}
|
|
17739
17949
|
),
|
|
17740
|
-
ticket.description && /* @__PURE__ */
|
|
17950
|
+
ticket.description && /* @__PURE__ */ jsx76(Text_default, { size: "md", weight: "normal", className: "text-text-600", children: ticket.description })
|
|
17741
17951
|
] })
|
|
17742
17952
|
] }),
|
|
17743
|
-
ticket.status === "respondido" /* RESPONDIDO */ && isLoadingAnswers && /* @__PURE__ */
|
|
17744
|
-
/* @__PURE__ */
|
|
17745
|
-
/* @__PURE__ */
|
|
17953
|
+
ticket.status === "respondido" /* RESPONDIDO */ && isLoadingAnswers && /* @__PURE__ */ jsxs59(Fragment18, { children: [
|
|
17954
|
+
/* @__PURE__ */ jsx76(Text_default, { size: "md", weight: "bold", className: "text-text-950 my-6", children: "Resposta de Suporte T\xE9cnico" }),
|
|
17955
|
+
/* @__PURE__ */ jsx76(AnswerSkeleton, {})
|
|
17746
17956
|
] }),
|
|
17747
|
-
!isLoadingAnswers && answers.some((answer) => answer.userId !== userId) && /* @__PURE__ */
|
|
17748
|
-
/* @__PURE__ */
|
|
17957
|
+
!isLoadingAnswers && answers.some((answer) => answer.userId !== userId) && /* @__PURE__ */ jsxs59(Fragment18, { children: [
|
|
17958
|
+
/* @__PURE__ */ jsx76(Text_default, { size: "md", weight: "bold", className: "text-text-950 my-6", children: "Resposta de Suporte T\xE9cnico" }),
|
|
17749
17959
|
answers.filter((answer) => answer.userId !== userId).sort(
|
|
17750
17960
|
(a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()
|
|
17751
|
-
).slice(0, 1).map((answer) => /* @__PURE__ */
|
|
17961
|
+
).slice(0, 1).map((answer) => /* @__PURE__ */ jsxs59(
|
|
17752
17962
|
"div",
|
|
17753
17963
|
{
|
|
17754
17964
|
className: "bg-background p-4 space-y-6 rounded-xl",
|
|
17755
17965
|
children: [
|
|
17756
|
-
/* @__PURE__ */
|
|
17757
|
-
/* @__PURE__ */
|
|
17966
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-center space-x-6", children: [
|
|
17967
|
+
/* @__PURE__ */ jsx76(
|
|
17758
17968
|
Text_default,
|
|
17759
17969
|
{
|
|
17760
17970
|
size: "md",
|
|
@@ -17763,7 +17973,7 @@ var TicketModal = ({
|
|
|
17763
17973
|
children: "Recebido"
|
|
17764
17974
|
}
|
|
17765
17975
|
),
|
|
17766
|
-
/* @__PURE__ */
|
|
17976
|
+
/* @__PURE__ */ jsx76(
|
|
17767
17977
|
Text_default,
|
|
17768
17978
|
{
|
|
17769
17979
|
size: "md",
|
|
@@ -17775,9 +17985,9 @@ var TicketModal = ({
|
|
|
17775
17985
|
}
|
|
17776
17986
|
)
|
|
17777
17987
|
] }),
|
|
17778
|
-
/* @__PURE__ */
|
|
17779
|
-
/* @__PURE__ */
|
|
17780
|
-
/* @__PURE__ */
|
|
17988
|
+
/* @__PURE__ */ jsx76(Divider_default, {}),
|
|
17989
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-start space-x-6", children: [
|
|
17990
|
+
/* @__PURE__ */ jsx76(
|
|
17781
17991
|
Text_default,
|
|
17782
17992
|
{
|
|
17783
17993
|
size: "md",
|
|
@@ -17786,7 +17996,7 @@ var TicketModal = ({
|
|
|
17786
17996
|
children: "Resposta"
|
|
17787
17997
|
}
|
|
17788
17998
|
),
|
|
17789
|
-
/* @__PURE__ */
|
|
17999
|
+
/* @__PURE__ */ jsx76(
|
|
17790
18000
|
Text_default,
|
|
17791
18001
|
{
|
|
17792
18002
|
size: "md",
|
|
@@ -17801,17 +18011,17 @@ var TicketModal = ({
|
|
|
17801
18011
|
answer.id
|
|
17802
18012
|
))
|
|
17803
18013
|
] }),
|
|
17804
|
-
!isLoadingAnswers && answers.some((answer) => answer.userId === userId) && /* @__PURE__ */
|
|
17805
|
-
/* @__PURE__ */
|
|
18014
|
+
!isLoadingAnswers && answers.some((answer) => answer.userId === userId) && /* @__PURE__ */ jsxs59(Fragment18, { children: [
|
|
18015
|
+
/* @__PURE__ */ jsx76(Text_default, { size: "md", weight: "bold", className: "text-text-950 my-6", children: "Resposta enviada" }),
|
|
17806
18016
|
answers.filter((answer) => answer.userId === userId).sort(
|
|
17807
18017
|
(a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()
|
|
17808
|
-
).slice(0, 1).map((answer) => /* @__PURE__ */
|
|
18018
|
+
).slice(0, 1).map((answer) => /* @__PURE__ */ jsxs59(
|
|
17809
18019
|
"div",
|
|
17810
18020
|
{
|
|
17811
18021
|
className: "bg-background p-4 space-y-6 rounded-xl",
|
|
17812
18022
|
children: [
|
|
17813
|
-
/* @__PURE__ */
|
|
17814
|
-
/* @__PURE__ */
|
|
18023
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-center space-x-6", children: [
|
|
18024
|
+
/* @__PURE__ */ jsx76(
|
|
17815
18025
|
Text_default,
|
|
17816
18026
|
{
|
|
17817
18027
|
size: "md",
|
|
@@ -17820,7 +18030,7 @@ var TicketModal = ({
|
|
|
17820
18030
|
children: "Enviada"
|
|
17821
18031
|
}
|
|
17822
18032
|
),
|
|
17823
|
-
/* @__PURE__ */
|
|
18033
|
+
/* @__PURE__ */ jsx76(
|
|
17824
18034
|
Text_default,
|
|
17825
18035
|
{
|
|
17826
18036
|
size: "md",
|
|
@@ -17832,9 +18042,9 @@ var TicketModal = ({
|
|
|
17832
18042
|
}
|
|
17833
18043
|
)
|
|
17834
18044
|
] }),
|
|
17835
|
-
/* @__PURE__ */
|
|
17836
|
-
/* @__PURE__ */
|
|
17837
|
-
/* @__PURE__ */
|
|
18045
|
+
/* @__PURE__ */ jsx76(Divider_default, {}),
|
|
18046
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-start space-x-6", children: [
|
|
18047
|
+
/* @__PURE__ */ jsx76(
|
|
17838
18048
|
Text_default,
|
|
17839
18049
|
{
|
|
17840
18050
|
size: "md",
|
|
@@ -17843,7 +18053,7 @@ var TicketModal = ({
|
|
|
17843
18053
|
children: "Resposta"
|
|
17844
18054
|
}
|
|
17845
18055
|
),
|
|
17846
|
-
/* @__PURE__ */
|
|
18056
|
+
/* @__PURE__ */ jsx76(
|
|
17847
18057
|
Text_default,
|
|
17848
18058
|
{
|
|
17849
18059
|
size: "md",
|
|
@@ -17858,10 +18068,10 @@ var TicketModal = ({
|
|
|
17858
18068
|
answer.id
|
|
17859
18069
|
))
|
|
17860
18070
|
] }),
|
|
17861
|
-
!isLoadingAnswers && answers.some((answer) => answer.userId !== userId) && /* @__PURE__ */
|
|
17862
|
-
/* @__PURE__ */
|
|
17863
|
-
/* @__PURE__ */
|
|
17864
|
-
/* @__PURE__ */
|
|
18071
|
+
!isLoadingAnswers && answers.some((answer) => answer.userId !== userId) && /* @__PURE__ */ jsxs59(Fragment18, { children: [
|
|
18072
|
+
/* @__PURE__ */ jsx76(Text_default, { size: "lg", weight: "bold", className: "text-text-950 my-6", children: "Responder" }),
|
|
18073
|
+
/* @__PURE__ */ jsxs59("div", { className: "space-y-4", children: [
|
|
18074
|
+
/* @__PURE__ */ jsx76(
|
|
17865
18075
|
TextArea_default,
|
|
17866
18076
|
{
|
|
17867
18077
|
placeholder: "Detalhe o problema aqui.",
|
|
@@ -17871,7 +18081,7 @@ var TicketModal = ({
|
|
|
17871
18081
|
onChange: (e) => setResponseText(e.target.value)
|
|
17872
18082
|
}
|
|
17873
18083
|
),
|
|
17874
|
-
responseText.trim().length > 0 && /* @__PURE__ */
|
|
18084
|
+
responseText.trim().length > 0 && /* @__PURE__ */ jsx76("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx76(
|
|
17875
18085
|
Button_default,
|
|
17876
18086
|
{
|
|
17877
18087
|
variant: "solid",
|
|
@@ -17887,7 +18097,7 @@ var TicketModal = ({
|
|
|
17887
18097
|
] })
|
|
17888
18098
|
}
|
|
17889
18099
|
),
|
|
17890
|
-
/* @__PURE__ */
|
|
18100
|
+
/* @__PURE__ */ jsx76(
|
|
17891
18101
|
Modal_default,
|
|
17892
18102
|
{
|
|
17893
18103
|
isOpen: showCloseConfirmation,
|
|
@@ -17897,10 +18107,10 @@ var TicketModal = ({
|
|
|
17897
18107
|
hideCloseButton: false,
|
|
17898
18108
|
closeOnEscape: true,
|
|
17899
18109
|
"data-testid": "close-ticket-modal",
|
|
17900
|
-
children: /* @__PURE__ */
|
|
17901
|
-
/* @__PURE__ */
|
|
17902
|
-
/* @__PURE__ */
|
|
17903
|
-
/* @__PURE__ */
|
|
18110
|
+
children: /* @__PURE__ */ jsxs59("div", { className: "space-y-6", children: [
|
|
18111
|
+
/* @__PURE__ */ jsx76(Text_default, { size: "sm", weight: "normal", className: "text-text-700", children: "Ao encerrar este pedido, ele ser\xE1 fechado e n\xE3o poder\xE1 mais ser atualizado." }),
|
|
18112
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex gap-3 justify-end", children: [
|
|
18113
|
+
/* @__PURE__ */ jsx76(
|
|
17904
18114
|
Button_default,
|
|
17905
18115
|
{
|
|
17906
18116
|
variant: "outline",
|
|
@@ -17909,7 +18119,7 @@ var TicketModal = ({
|
|
|
17909
18119
|
children: "Cancelar"
|
|
17910
18120
|
}
|
|
17911
18121
|
),
|
|
17912
|
-
/* @__PURE__ */
|
|
18122
|
+
/* @__PURE__ */ jsx76(
|
|
17913
18123
|
Button_default,
|
|
17914
18124
|
{
|
|
17915
18125
|
variant: "solid",
|
|
@@ -17930,20 +18140,20 @@ var TicketModal = ({
|
|
|
17930
18140
|
var suporthistory_default = "./suporthistory-W5LBGAUP.png";
|
|
17931
18141
|
|
|
17932
18142
|
// src/components/Support/Support.tsx
|
|
17933
|
-
import { jsx as
|
|
18143
|
+
import { jsx as jsx77, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
17934
18144
|
var TicketCard = ({
|
|
17935
18145
|
ticket,
|
|
17936
18146
|
onTicketClick
|
|
17937
|
-
}) => /* @__PURE__ */
|
|
18147
|
+
}) => /* @__PURE__ */ jsxs60(
|
|
17938
18148
|
"button",
|
|
17939
18149
|
{
|
|
17940
18150
|
type: "button",
|
|
17941
18151
|
className: "flex items-center justify-between p-4 bg-background rounded-xl cursor-pointer w-full text-left hover:bg-background-50 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2",
|
|
17942
18152
|
onClick: () => onTicketClick(ticket),
|
|
17943
18153
|
children: [
|
|
17944
|
-
/* @__PURE__ */
|
|
17945
|
-
/* @__PURE__ */
|
|
17946
|
-
/* @__PURE__ */
|
|
18154
|
+
/* @__PURE__ */ jsx77("div", { className: "flex flex-col", children: /* @__PURE__ */ jsx77(Text_default, { size: "xs", weight: "bold", className: "text-text-900", children: ticket.title }) }),
|
|
18155
|
+
/* @__PURE__ */ jsxs60("div", { className: "flex items-center gap-3", children: [
|
|
18156
|
+
/* @__PURE__ */ jsx77(
|
|
17947
18157
|
Badge_default,
|
|
17948
18158
|
{
|
|
17949
18159
|
variant: "solid",
|
|
@@ -17952,11 +18162,11 @@ var TicketCard = ({
|
|
|
17952
18162
|
children: getStatusText(ticket.status)
|
|
17953
18163
|
}
|
|
17954
18164
|
),
|
|
17955
|
-
/* @__PURE__ */
|
|
18165
|
+
/* @__PURE__ */ jsxs60(Badge_default, { variant: "solid", className: "flex items-center gap-1", action: "muted", children: [
|
|
17956
18166
|
getCategoryIcon(ticket.category, 18),
|
|
17957
18167
|
getCategoryText(ticket.category)
|
|
17958
18168
|
] }),
|
|
17959
|
-
/* @__PURE__ */
|
|
18169
|
+
/* @__PURE__ */ jsx77(CaretRightIcon, { size: 24, className: "text-text-800" })
|
|
17960
18170
|
] })
|
|
17961
18171
|
]
|
|
17962
18172
|
},
|
|
@@ -17966,9 +18176,9 @@ var TicketGroup = ({
|
|
|
17966
18176
|
date,
|
|
17967
18177
|
tickets,
|
|
17968
18178
|
onTicketClick
|
|
17969
|
-
}) => /* @__PURE__ */
|
|
17970
|
-
/* @__PURE__ */
|
|
17971
|
-
/* @__PURE__ */
|
|
18179
|
+
}) => /* @__PURE__ */ jsxs60("div", { className: "space-y-4", children: [
|
|
18180
|
+
/* @__PURE__ */ jsx77(Text_default, { size: "md", weight: "bold", className: "text-text-900", children: dayjs2(date).format("DD MMM YYYY") }),
|
|
18181
|
+
/* @__PURE__ */ jsx77("div", { className: "space-y-3", children: tickets.map((ticket) => /* @__PURE__ */ jsx77(
|
|
17972
18182
|
TicketCard,
|
|
17973
18183
|
{
|
|
17974
18184
|
ticket,
|
|
@@ -17977,13 +18187,13 @@ var TicketGroup = ({
|
|
|
17977
18187
|
ticket.id
|
|
17978
18188
|
)) })
|
|
17979
18189
|
] }, date);
|
|
17980
|
-
var EmptyState2 = ({ imageSrc }) => /* @__PURE__ */
|
|
17981
|
-
imageSrc && /* @__PURE__ */
|
|
17982
|
-
/* @__PURE__ */
|
|
18190
|
+
var EmptyState2 = ({ imageSrc }) => /* @__PURE__ */ jsxs60("div", { className: "flex flex-row justify-center items-center mt-48", children: [
|
|
18191
|
+
imageSrc && /* @__PURE__ */ jsx77("img", { src: imageSrc, alt: "Imagem de suporte" }),
|
|
18192
|
+
/* @__PURE__ */ jsx77(Text_default, { size: "3xl", weight: "semibold", children: "Nenhum pedido encontrado." })
|
|
17983
18193
|
] });
|
|
17984
|
-
var TicketSkeleton = () => /* @__PURE__ */
|
|
17985
|
-
/* @__PURE__ */
|
|
17986
|
-
/* @__PURE__ */
|
|
18194
|
+
var TicketSkeleton = () => /* @__PURE__ */ jsx77("div", { className: "space-y-6", children: [0, 1].map((groupIndex) => /* @__PURE__ */ jsxs60("div", { className: "space-y-4", children: [
|
|
18195
|
+
/* @__PURE__ */ jsx77(SkeletonText, { width: "150px", height: 20 }),
|
|
18196
|
+
/* @__PURE__ */ jsx77("div", { className: "space-y-3", children: [0, 1].map((ticketIndex) => /* @__PURE__ */ jsx77(
|
|
17987
18197
|
SkeletonRounded,
|
|
17988
18198
|
{
|
|
17989
18199
|
width: "100%",
|
|
@@ -18164,25 +18374,25 @@ var Support = ({
|
|
|
18164
18374
|
{
|
|
18165
18375
|
id: "tecnico" /* TECNICO */,
|
|
18166
18376
|
title: "T\xE9cnico",
|
|
18167
|
-
icon: /* @__PURE__ */
|
|
18377
|
+
icon: /* @__PURE__ */ jsx77(BugIcon2, { size: 24 })
|
|
18168
18378
|
},
|
|
18169
18379
|
{
|
|
18170
18380
|
id: "acesso" /* ACESSO */,
|
|
18171
18381
|
title: "Acesso",
|
|
18172
|
-
icon: /* @__PURE__ */
|
|
18382
|
+
icon: /* @__PURE__ */ jsx77(KeyIcon2, { size: 24 })
|
|
18173
18383
|
},
|
|
18174
18384
|
{
|
|
18175
18385
|
id: "outros" /* OUTROS */,
|
|
18176
18386
|
title: "Outros",
|
|
18177
|
-
icon: /* @__PURE__ */
|
|
18387
|
+
icon: /* @__PURE__ */ jsx77(InfoIcon2, { size: 24 })
|
|
18178
18388
|
}
|
|
18179
18389
|
];
|
|
18180
18390
|
const emptyImage = emptyStateImage || suporthistory_default;
|
|
18181
|
-
return /* @__PURE__ */
|
|
18182
|
-
/* @__PURE__ */
|
|
18183
|
-
/* @__PURE__ */
|
|
18184
|
-
/* @__PURE__ */
|
|
18185
|
-
/* @__PURE__ */
|
|
18391
|
+
return /* @__PURE__ */ jsxs60("div", { className: "flex flex-col w-full h-full relative justify-start items-center mb-5 overflow-y-auto", children: [
|
|
18392
|
+
/* @__PURE__ */ jsx77("div", { className: "flex flex-col w-full h-full max-w-[992px] z-10 lg:px-0 px-4", children: /* @__PURE__ */ jsxs60("div", { className: "space-y-4", children: [
|
|
18393
|
+
/* @__PURE__ */ jsxs60("div", { className: "flex w-full mb-4 flex-row items-center justify-between not-lg:gap-4 lg:gap-6", children: [
|
|
18394
|
+
/* @__PURE__ */ jsx77("h1", { className: "font-bold leading-[28px] tracking-[0.2px] text-text-950 text-xl mt-4 sm:text-2xl sm:flex-1 sm:self-end sm:mt-0", children: title }),
|
|
18395
|
+
/* @__PURE__ */ jsx77("div", { className: "sm:flex-shrink-0 sm:self-end", children: /* @__PURE__ */ jsx77(
|
|
18186
18396
|
Menu_default,
|
|
18187
18397
|
{
|
|
18188
18398
|
value: activeTab,
|
|
@@ -18190,8 +18400,8 @@ var Support = ({
|
|
|
18190
18400
|
variant: "menu2",
|
|
18191
18401
|
onValueChange: (value) => setActiveTab(value),
|
|
18192
18402
|
className: "bg-transparent shadow-none px-0",
|
|
18193
|
-
children: /* @__PURE__ */
|
|
18194
|
-
/* @__PURE__ */
|
|
18403
|
+
children: /* @__PURE__ */ jsxs60(MenuContent, { variant: "menu2", children: [
|
|
18404
|
+
/* @__PURE__ */ jsx77(
|
|
18195
18405
|
MenuItem,
|
|
18196
18406
|
{
|
|
18197
18407
|
variant: "menu2",
|
|
@@ -18200,7 +18410,7 @@ var Support = ({
|
|
|
18200
18410
|
children: "Criar Pedido"
|
|
18201
18411
|
}
|
|
18202
18412
|
),
|
|
18203
|
-
/* @__PURE__ */
|
|
18413
|
+
/* @__PURE__ */ jsx77(
|
|
18204
18414
|
MenuItem,
|
|
18205
18415
|
{
|
|
18206
18416
|
variant: "menu2",
|
|
@@ -18213,9 +18423,9 @@ var Support = ({
|
|
|
18213
18423
|
}
|
|
18214
18424
|
) })
|
|
18215
18425
|
] }),
|
|
18216
|
-
activeTab === "criar-pedido" && /* @__PURE__ */
|
|
18217
|
-
/* @__PURE__ */
|
|
18218
|
-
/* @__PURE__ */
|
|
18426
|
+
activeTab === "criar-pedido" && /* @__PURE__ */ jsxs60("div", { className: "space-y-2", children: [
|
|
18427
|
+
/* @__PURE__ */ jsx77(Text_default, { as: "h2", size: "md", weight: "bold", className: "text-text-900", children: "Selecione o tipo de problema" }),
|
|
18428
|
+
/* @__PURE__ */ jsx77("div", { className: "flex flex-col sm:flex-row gap-2 sm:gap-4", children: problemTypes.map((type) => /* @__PURE__ */ jsx77(
|
|
18219
18429
|
SelectionButton_default,
|
|
18220
18430
|
{
|
|
18221
18431
|
icon: type.icon,
|
|
@@ -18226,10 +18436,10 @@ var Support = ({
|
|
|
18226
18436
|
},
|
|
18227
18437
|
type.id
|
|
18228
18438
|
)) }),
|
|
18229
|
-
errors.problemType && /* @__PURE__ */
|
|
18439
|
+
errors.problemType && /* @__PURE__ */ jsx77(Text_default, { size: "sm", className: "text-red-500 mt-1", children: errors.problemType.message })
|
|
18230
18440
|
] }),
|
|
18231
|
-
selectedProblem && activeTab === "criar-pedido" && /* @__PURE__ */
|
|
18232
|
-
/* @__PURE__ */
|
|
18441
|
+
selectedProblem && activeTab === "criar-pedido" && /* @__PURE__ */ jsxs60("form", { onSubmit: handleSubmit(onSubmit), className: "space-y-4", children: [
|
|
18442
|
+
/* @__PURE__ */ jsx77("div", { className: "space-y-1", children: /* @__PURE__ */ jsx77(
|
|
18233
18443
|
Input_default,
|
|
18234
18444
|
{
|
|
18235
18445
|
size: "large",
|
|
@@ -18240,7 +18450,7 @@ var Support = ({
|
|
|
18240
18450
|
errorMessage: errors.title?.message
|
|
18241
18451
|
}
|
|
18242
18452
|
) }),
|
|
18243
|
-
/* @__PURE__ */
|
|
18453
|
+
/* @__PURE__ */ jsx77("div", { className: "space-y-1", children: /* @__PURE__ */ jsx77(
|
|
18244
18454
|
TextArea_default,
|
|
18245
18455
|
{
|
|
18246
18456
|
size: "large",
|
|
@@ -18250,7 +18460,7 @@ var Support = ({
|
|
|
18250
18460
|
errorMessage: errors.description?.message
|
|
18251
18461
|
}
|
|
18252
18462
|
) }),
|
|
18253
|
-
/* @__PURE__ */
|
|
18463
|
+
/* @__PURE__ */ jsx77(
|
|
18254
18464
|
Button_default,
|
|
18255
18465
|
{
|
|
18256
18466
|
size: "large",
|
|
@@ -18260,11 +18470,11 @@ var Support = ({
|
|
|
18260
18470
|
children: isSubmitting ? "Enviando..." : "Enviar Pedido"
|
|
18261
18471
|
}
|
|
18262
18472
|
),
|
|
18263
|
-
submitError && /* @__PURE__ */
|
|
18473
|
+
submitError && /* @__PURE__ */ jsx77("div", { className: "mt-4 p-4 bg-red-100 border border-red-400 text-red-700 rounded", children: /* @__PURE__ */ jsx77(Text_default, { size: "sm", className: "text-red-700", children: submitError }) })
|
|
18264
18474
|
] }),
|
|
18265
|
-
activeTab === "historico" && /* @__PURE__ */
|
|
18266
|
-
/* @__PURE__ */
|
|
18267
|
-
/* @__PURE__ */
|
|
18475
|
+
activeTab === "historico" && /* @__PURE__ */ jsxs60("div", { className: "space-y-6", children: [
|
|
18476
|
+
/* @__PURE__ */ jsxs60("div", { className: "flex gap-4", children: [
|
|
18477
|
+
/* @__PURE__ */ jsx77("div", { className: "flex flex-col flex-1/2 space-y-1", children: /* @__PURE__ */ jsxs60(
|
|
18268
18478
|
Select_default,
|
|
18269
18479
|
{
|
|
18270
18480
|
label: "Status",
|
|
@@ -18272,17 +18482,17 @@ var Support = ({
|
|
|
18272
18482
|
value: statusFilter,
|
|
18273
18483
|
onValueChange: setStatusFilter,
|
|
18274
18484
|
children: [
|
|
18275
|
-
/* @__PURE__ */
|
|
18276
|
-
/* @__PURE__ */
|
|
18277
|
-
/* @__PURE__ */
|
|
18278
|
-
/* @__PURE__ */
|
|
18279
|
-
/* @__PURE__ */
|
|
18280
|
-
/* @__PURE__ */
|
|
18485
|
+
/* @__PURE__ */ jsx77(SelectTrigger, { variant: "rounded", className: "", children: /* @__PURE__ */ jsx77(SelectValue, { placeholder: "Todos" }) }),
|
|
18486
|
+
/* @__PURE__ */ jsxs60(SelectContent, { children: [
|
|
18487
|
+
/* @__PURE__ */ jsx77(SelectItem, { value: "todos", children: "Todos" }),
|
|
18488
|
+
/* @__PURE__ */ jsx77(SelectItem, { value: "aberto" /* ABERTO */, children: "Aberto" }),
|
|
18489
|
+
/* @__PURE__ */ jsx77(SelectItem, { value: "respondido" /* RESPONDIDO */, children: "Respondido" }),
|
|
18490
|
+
/* @__PURE__ */ jsx77(SelectItem, { value: "encerrado" /* ENCERRADO */, children: "Encerrado" })
|
|
18281
18491
|
] })
|
|
18282
18492
|
]
|
|
18283
18493
|
}
|
|
18284
18494
|
) }),
|
|
18285
|
-
/* @__PURE__ */
|
|
18495
|
+
/* @__PURE__ */ jsx77("div", { className: "flex flex-col flex-1/2 space-y-1", children: /* @__PURE__ */ jsxs60(
|
|
18286
18496
|
Select_default,
|
|
18287
18497
|
{
|
|
18288
18498
|
label: "Tipo",
|
|
@@ -18290,19 +18500,19 @@ var Support = ({
|
|
|
18290
18500
|
value: categoryFilter,
|
|
18291
18501
|
onValueChange: setCategoryFilter,
|
|
18292
18502
|
children: [
|
|
18293
|
-
/* @__PURE__ */
|
|
18294
|
-
/* @__PURE__ */
|
|
18295
|
-
/* @__PURE__ */
|
|
18296
|
-
/* @__PURE__ */
|
|
18297
|
-
/* @__PURE__ */
|
|
18503
|
+
/* @__PURE__ */ jsx77(SelectTrigger, { variant: "rounded", className: "", children: /* @__PURE__ */ jsx77(SelectValue, { placeholder: "Todos" }) }),
|
|
18504
|
+
/* @__PURE__ */ jsxs60(SelectContent, { children: [
|
|
18505
|
+
/* @__PURE__ */ jsx77(SelectItem, { value: "todos", children: "Todos" }),
|
|
18506
|
+
/* @__PURE__ */ jsxs60(SelectItem, { value: "tecnico" /* TECNICO */, children: [
|
|
18507
|
+
/* @__PURE__ */ jsx77(BugIcon2, { size: 16 }),
|
|
18298
18508
|
" T\xE9cnico"
|
|
18299
18509
|
] }),
|
|
18300
|
-
/* @__PURE__ */
|
|
18301
|
-
/* @__PURE__ */
|
|
18510
|
+
/* @__PURE__ */ jsxs60(SelectItem, { value: "acesso" /* ACESSO */, children: [
|
|
18511
|
+
/* @__PURE__ */ jsx77(KeyIcon2, { size: 16 }),
|
|
18302
18512
|
" Acesso"
|
|
18303
18513
|
] }),
|
|
18304
|
-
/* @__PURE__ */
|
|
18305
|
-
/* @__PURE__ */
|
|
18514
|
+
/* @__PURE__ */ jsxs60(SelectItem, { value: "outros" /* OUTROS */, children: [
|
|
18515
|
+
/* @__PURE__ */ jsx77(InfoIcon2, { size: 16 }),
|
|
18306
18516
|
" Outros"
|
|
18307
18517
|
] })
|
|
18308
18518
|
] })
|
|
@@ -18312,14 +18522,14 @@ var Support = ({
|
|
|
18312
18522
|
] }),
|
|
18313
18523
|
(() => {
|
|
18314
18524
|
if (loadingTickets) {
|
|
18315
|
-
return /* @__PURE__ */
|
|
18525
|
+
return /* @__PURE__ */ jsx77(TicketSkeleton, {});
|
|
18316
18526
|
}
|
|
18317
18527
|
if (Object.keys(groupedTickets).length === 0) {
|
|
18318
|
-
return /* @__PURE__ */
|
|
18528
|
+
return /* @__PURE__ */ jsx77(EmptyState2, { imageSrc: emptyImage });
|
|
18319
18529
|
}
|
|
18320
|
-
return /* @__PURE__ */
|
|
18530
|
+
return /* @__PURE__ */ jsx77("div", { className: "space-y-6", children: Object.entries(groupedTickets).sort(
|
|
18321
18531
|
([a], [b]) => new Date(b).getTime() - new Date(a).getTime()
|
|
18322
|
-
).map(([date, tickets]) => /* @__PURE__ */
|
|
18532
|
+
).map(([date, tickets]) => /* @__PURE__ */ jsx77(
|
|
18323
18533
|
TicketGroup,
|
|
18324
18534
|
{
|
|
18325
18535
|
date,
|
|
@@ -18329,8 +18539,8 @@ var Support = ({
|
|
|
18329
18539
|
date
|
|
18330
18540
|
)) });
|
|
18331
18541
|
})(),
|
|
18332
|
-
!loadingTickets && totalPages > 1 && /* @__PURE__ */
|
|
18333
|
-
/* @__PURE__ */
|
|
18542
|
+
!loadingTickets && totalPages > 1 && /* @__PURE__ */ jsxs60("div", { className: "flex justify-center items-center gap-4 mt-6", children: [
|
|
18543
|
+
/* @__PURE__ */ jsx77(
|
|
18334
18544
|
Button_default,
|
|
18335
18545
|
{
|
|
18336
18546
|
variant: "outline",
|
|
@@ -18340,13 +18550,13 @@ var Support = ({
|
|
|
18340
18550
|
children: "Anterior"
|
|
18341
18551
|
}
|
|
18342
18552
|
),
|
|
18343
|
-
/* @__PURE__ */
|
|
18553
|
+
/* @__PURE__ */ jsxs60(Text_default, { size: "sm", className: "text-text-600", children: [
|
|
18344
18554
|
"P\xE1gina ",
|
|
18345
18555
|
currentPage,
|
|
18346
18556
|
" de ",
|
|
18347
18557
|
totalPages
|
|
18348
18558
|
] }),
|
|
18349
|
-
/* @__PURE__ */
|
|
18559
|
+
/* @__PURE__ */ jsx77(
|
|
18350
18560
|
Button_default,
|
|
18351
18561
|
{
|
|
18352
18562
|
variant: "outline",
|
|
@@ -18359,7 +18569,7 @@ var Support = ({
|
|
|
18359
18569
|
] })
|
|
18360
18570
|
] })
|
|
18361
18571
|
] }) }),
|
|
18362
|
-
selectedTicket && /* @__PURE__ */
|
|
18572
|
+
selectedTicket && /* @__PURE__ */ jsx77(
|
|
18363
18573
|
TicketModal,
|
|
18364
18574
|
{
|
|
18365
18575
|
ticket: selectedTicket,
|
|
@@ -18370,7 +18580,7 @@ var Support = ({
|
|
|
18370
18580
|
userId
|
|
18371
18581
|
}
|
|
18372
18582
|
),
|
|
18373
|
-
showSuccessToast && /* @__PURE__ */
|
|
18583
|
+
showSuccessToast && /* @__PURE__ */ jsx77("div", { className: "fixed top-4 left-1/2 transform -translate-x-1/2 z-50", children: /* @__PURE__ */ jsx77(
|
|
18374
18584
|
Toast_default,
|
|
18375
18585
|
{
|
|
18376
18586
|
title: "Pedido enviado!",
|
|
@@ -18379,7 +18589,7 @@ var Support = ({
|
|
|
18379
18589
|
onClose: () => setShowSuccessToast(false)
|
|
18380
18590
|
}
|
|
18381
18591
|
) }),
|
|
18382
|
-
showCloseSuccessToast && /* @__PURE__ */
|
|
18592
|
+
showCloseSuccessToast && /* @__PURE__ */ jsx77("div", { className: "fixed top-4 left-1/2 transform -translate-x-1/2 z-50", children: /* @__PURE__ */ jsx77(
|
|
18383
18593
|
Toast_default,
|
|
18384
18594
|
{
|
|
18385
18595
|
title: "Pedido encerrado!",
|
|
@@ -18388,7 +18598,7 @@ var Support = ({
|
|
|
18388
18598
|
onClose: () => setShowCloseSuccessToast(false)
|
|
18389
18599
|
}
|
|
18390
18600
|
) }),
|
|
18391
|
-
showCloseErrorToast && /* @__PURE__ */
|
|
18601
|
+
showCloseErrorToast && /* @__PURE__ */ jsx77("div", { className: "fixed top-4 left-1/2 transform -translate-x-1/2 z-50", children: /* @__PURE__ */ jsx77(
|
|
18392
18602
|
Toast_default,
|
|
18393
18603
|
{
|
|
18394
18604
|
title: "Erro ao encerrar pedido",
|
|
@@ -18404,6 +18614,7 @@ var Support_default = Support;
|
|
|
18404
18614
|
export {
|
|
18405
18615
|
ANSWER_STATUS,
|
|
18406
18616
|
AccordionGroup,
|
|
18617
|
+
ActivityCardQuestionBanks,
|
|
18407
18618
|
ActivityDetails,
|
|
18408
18619
|
ActivityFilters,
|
|
18409
18620
|
ActivityFiltersPopover,
|