analytica-frontend-lib 1.2.29 → 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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +446 -264
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +401 -220
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -32,6 +32,7 @@ var src_exports = {};
|
|
|
32
32
|
__export(src_exports, {
|
|
33
33
|
ANSWER_STATUS: () => ANSWER_STATUS,
|
|
34
34
|
AccordionGroup: () => AccordionGroup,
|
|
35
|
+
ActivityCardQuestionBanks: () => ActivityCardQuestionBanks,
|
|
35
36
|
ActivityDetails: () => ActivityDetails,
|
|
36
37
|
ActivityFilters: () => ActivityFilters,
|
|
37
38
|
ActivityFiltersPopover: () => ActivityFiltersPopover,
|
|
@@ -17011,6 +17012,186 @@ function useAppContent(config) {
|
|
|
17011
17012
|
};
|
|
17012
17013
|
}
|
|
17013
17014
|
|
|
17015
|
+
// src/components/ActivityCardQuestionBanks/ActivityCardQuestionBanks.tsx
|
|
17016
|
+
var import_phosphor_react37 = require("phosphor-react");
|
|
17017
|
+
var import_react55 = require("react");
|
|
17018
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
17019
|
+
var ActivityCardQuestionBanks = ({
|
|
17020
|
+
question,
|
|
17021
|
+
questionType,
|
|
17022
|
+
iconName = "BookOpen",
|
|
17023
|
+
subjectColor = "#000000",
|
|
17024
|
+
isDark = false,
|
|
17025
|
+
onAddToActivity,
|
|
17026
|
+
assunto,
|
|
17027
|
+
enunciado
|
|
17028
|
+
} = {}) => {
|
|
17029
|
+
const alternatives = (0, import_react55.useMemo)(() => {
|
|
17030
|
+
if (!question?.options || questionType !== "ALTERNATIVA" /* ALTERNATIVA */)
|
|
17031
|
+
return [];
|
|
17032
|
+
const correctOptionIds2 = question.correctOptionIds || [];
|
|
17033
|
+
return question.options.map((option) => {
|
|
17034
|
+
const isCorrect = correctOptionIds2.includes(option.id);
|
|
17035
|
+
return {
|
|
17036
|
+
value: option.id,
|
|
17037
|
+
label: option.option,
|
|
17038
|
+
status: isCorrect ? "correct" : void 0,
|
|
17039
|
+
disabled: !isCorrect
|
|
17040
|
+
};
|
|
17041
|
+
});
|
|
17042
|
+
}, [question, questionType]);
|
|
17043
|
+
const correctOptionId = (0, import_react55.useMemo)(() => {
|
|
17044
|
+
if (!question?.correctOptionIds || question.correctOptionIds.length === 0) {
|
|
17045
|
+
return void 0;
|
|
17046
|
+
}
|
|
17047
|
+
return question.correctOptionIds[0];
|
|
17048
|
+
}, [question]);
|
|
17049
|
+
const multipleChoices = (0, import_react55.useMemo)(() => {
|
|
17050
|
+
if (!question?.options || questionType !== "MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */)
|
|
17051
|
+
return [];
|
|
17052
|
+
const correctOptionIds2 = question.correctOptionIds || [];
|
|
17053
|
+
return question.options.map((option) => {
|
|
17054
|
+
const isCorrect = correctOptionIds2.includes(option.id);
|
|
17055
|
+
return {
|
|
17056
|
+
value: option.id,
|
|
17057
|
+
label: option.option,
|
|
17058
|
+
status: isCorrect ? "correct" : void 0,
|
|
17059
|
+
disabled: !isCorrect
|
|
17060
|
+
};
|
|
17061
|
+
});
|
|
17062
|
+
}, [question, questionType]);
|
|
17063
|
+
const correctOptionIds = (0, import_react55.useMemo)(() => {
|
|
17064
|
+
return question?.correctOptionIds || [];
|
|
17065
|
+
}, [question]);
|
|
17066
|
+
const getStatusBadge2 = (status) => {
|
|
17067
|
+
switch (status) {
|
|
17068
|
+
case "correct":
|
|
17069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_phosphor_react37.CheckCircle, {}), children: "Resposta correta" });
|
|
17070
|
+
case "incorrect":
|
|
17071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_phosphor_react37.XCircle, {}), children: "Resposta incorreta" });
|
|
17072
|
+
}
|
|
17073
|
+
};
|
|
17074
|
+
const getStatusStyles2 = (status) => {
|
|
17075
|
+
switch (status) {
|
|
17076
|
+
case "correct":
|
|
17077
|
+
return "bg-success-background border-success-300";
|
|
17078
|
+
case "incorrect":
|
|
17079
|
+
return "bg-error-background border-error-300";
|
|
17080
|
+
}
|
|
17081
|
+
};
|
|
17082
|
+
const getLetterByIndex = (index) => String.fromCodePoint(97 + index);
|
|
17083
|
+
const renderAlternative = () => {
|
|
17084
|
+
if (!question || alternatives.length === 0) return null;
|
|
17085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
17086
|
+
AlternativesList,
|
|
17087
|
+
{
|
|
17088
|
+
alternatives,
|
|
17089
|
+
mode: "readonly",
|
|
17090
|
+
layout: "compact",
|
|
17091
|
+
selectedValue: correctOptionId,
|
|
17092
|
+
name: "teacher-question-view"
|
|
17093
|
+
}
|
|
17094
|
+
) });
|
|
17095
|
+
};
|
|
17096
|
+
const renderMultipleChoice = () => {
|
|
17097
|
+
if (!question || multipleChoices.length === 0) return null;
|
|
17098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
17099
|
+
MultipleChoiceList,
|
|
17100
|
+
{
|
|
17101
|
+
choices: multipleChoices,
|
|
17102
|
+
mode: "readonly",
|
|
17103
|
+
selectedValues: correctOptionIds,
|
|
17104
|
+
name: "teacher-question-view-multiple"
|
|
17105
|
+
}
|
|
17106
|
+
) });
|
|
17107
|
+
};
|
|
17108
|
+
const renderDissertative = () => {
|
|
17109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "mt-4 px-2 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text_default, { size: "sm", className: "text-text-600 italic", children: "Resposta do aluno" }) });
|
|
17110
|
+
};
|
|
17111
|
+
const renderTrueOrFalse = () => {
|
|
17112
|
+
if (!question || question.options.length === 0) return null;
|
|
17113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "flex flex-col gap-3.5", children: question.options.map((option, index) => {
|
|
17114
|
+
const isCorrect = correctOptionIds.includes(option.id);
|
|
17115
|
+
const correctAnswer = isCorrect ? "Verdadeiro" : "Falso";
|
|
17116
|
+
const variantCorrect = "correct";
|
|
17117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("section", { className: "flex flex-col gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
17118
|
+
"div",
|
|
17119
|
+
{
|
|
17120
|
+
className: cn(
|
|
17121
|
+
"flex flex-row justify-between items-center gap-2 p-2 rounded-md border",
|
|
17122
|
+
getStatusStyles2(variantCorrect)
|
|
17123
|
+
),
|
|
17124
|
+
children: [
|
|
17125
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text_default, { size: "sm", className: "text-text-900", children: getLetterByIndex(index).concat(") ").concat(option.option) }),
|
|
17126
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex flex-row items-center gap-2 flex-shrink-0", children: [
|
|
17127
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Text_default, { size: "sm", className: "text-text-700", children: [
|
|
17128
|
+
"Resposta correta: ",
|
|
17129
|
+
correctAnswer
|
|
17130
|
+
] }),
|
|
17131
|
+
getStatusBadge2(variantCorrect)
|
|
17132
|
+
] })
|
|
17133
|
+
]
|
|
17134
|
+
}
|
|
17135
|
+
) }, option.id);
|
|
17136
|
+
}) }) });
|
|
17137
|
+
};
|
|
17138
|
+
const renderConnectDots = () => {
|
|
17139
|
+
return null;
|
|
17140
|
+
};
|
|
17141
|
+
const renderFill = () => {
|
|
17142
|
+
return null;
|
|
17143
|
+
};
|
|
17144
|
+
const renderImage = () => {
|
|
17145
|
+
return null;
|
|
17146
|
+
};
|
|
17147
|
+
const questionRenderers = {
|
|
17148
|
+
["ALTERNATIVA" /* ALTERNATIVA */]: renderAlternative,
|
|
17149
|
+
["MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */]: renderMultipleChoice,
|
|
17150
|
+
["DISSERTATIVA" /* DISSERTATIVA */]: renderDissertative,
|
|
17151
|
+
["VERDADEIRO_FALSO" /* VERDADEIRO_FALSO */]: renderTrueOrFalse,
|
|
17152
|
+
["LIGAR_PONTOS" /* LIGAR_PONTOS */]: renderConnectDots,
|
|
17153
|
+
["PREENCHER" /* PREENCHER */]: renderFill,
|
|
17154
|
+
["IMAGEM" /* IMAGEM */]: renderImage
|
|
17155
|
+
};
|
|
17156
|
+
const renderQuestionContent = () => {
|
|
17157
|
+
if (!questionType) return null;
|
|
17158
|
+
const renderer = questionRenderers[questionType];
|
|
17159
|
+
return renderer ? renderer() : null;
|
|
17160
|
+
};
|
|
17161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "w-full flex flex-col gap-2 px-4 py-6", children: [
|
|
17162
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("section", { className: "flex flex-row gap-2 text-text-650", children: [
|
|
17163
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "py-1 px-2 flex flex-row items-center gap-1", children: [
|
|
17164
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
17165
|
+
"span",
|
|
17166
|
+
{
|
|
17167
|
+
className: "size-4 rounded-sm flex items-center justify-center shrink-0 text-text-950",
|
|
17168
|
+
style: {
|
|
17169
|
+
backgroundColor: getSubjectColorWithOpacity(subjectColor, isDark)
|
|
17170
|
+
},
|
|
17171
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(IconRender_default, { iconName, size: 14, color: "currentColor" })
|
|
17172
|
+
}
|
|
17173
|
+
),
|
|
17174
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text_default, { size: "sm", children: assunto || "Assunto n\xE3o informado" })
|
|
17175
|
+
] }),
|
|
17176
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "py-1 px-2 flex flex-row items-center gap-1", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text_default, { size: "sm", className: "", children: questionType ? questionTypeLabels[questionType] : "Tipo de quest\xE3o" }) })
|
|
17177
|
+
] }),
|
|
17178
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("section", { className: "flex flex-col gap-1", children: [
|
|
17179
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text_default, { size: "md", weight: "medium", className: "text-text-950 text-md", children: enunciado || "Enunciado n\xE3o informado" }),
|
|
17180
|
+
renderQuestionContent()
|
|
17181
|
+
] }),
|
|
17182
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("section", { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
17183
|
+
Button_default,
|
|
17184
|
+
{
|
|
17185
|
+
size: "small",
|
|
17186
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_phosphor_react37.Plus, {}),
|
|
17187
|
+
className: "w-full",
|
|
17188
|
+
onClick: onAddToActivity,
|
|
17189
|
+
children: "Adicionar \xE0 atividade"
|
|
17190
|
+
}
|
|
17191
|
+
) })
|
|
17192
|
+
] });
|
|
17193
|
+
};
|
|
17194
|
+
|
|
17014
17195
|
// src/types/activityDetails.ts
|
|
17015
17196
|
var STUDENT_ACTIVITY_STATUS = {
|
|
17016
17197
|
CONCLUIDO: "CONCLUIDO",
|
|
@@ -17062,9 +17243,9 @@ var formatDateToBrazilian = (dateString) => {
|
|
|
17062
17243
|
};
|
|
17063
17244
|
|
|
17064
17245
|
// src/components/ActivityDetails/ActivityDetails.tsx
|
|
17065
|
-
var
|
|
17066
|
-
var
|
|
17067
|
-
var
|
|
17246
|
+
var import_react56 = require("react");
|
|
17247
|
+
var import_phosphor_react38 = require("phosphor-react");
|
|
17248
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
17068
17249
|
var createTableColumns = (onCorrectActivity) => [
|
|
17069
17250
|
{
|
|
17070
17251
|
key: "studentName",
|
|
@@ -17072,9 +17253,9 @@ var createTableColumns = (onCorrectActivity) => [
|
|
|
17072
17253
|
sortable: true,
|
|
17073
17254
|
render: (value) => {
|
|
17074
17255
|
const name = typeof value === "string" ? value : "";
|
|
17075
|
-
return /* @__PURE__ */ (0,
|
|
17076
|
-
/* @__PURE__ */ (0,
|
|
17077
|
-
/* @__PURE__ */ (0,
|
|
17256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
17257
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "w-6 h-6 bg-blue-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-xs font-semibold text-primary-700", children: name.charAt(0).toUpperCase() }) }),
|
|
17258
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-sm font-normal text-text-950", children: name })
|
|
17078
17259
|
] });
|
|
17079
17260
|
}
|
|
17080
17261
|
},
|
|
@@ -17084,7 +17265,7 @@ var createTableColumns = (onCorrectActivity) => [
|
|
|
17084
17265
|
sortable: false,
|
|
17085
17266
|
render: (value) => {
|
|
17086
17267
|
const config = getStatusBadgeConfig(value);
|
|
17087
|
-
return /* @__PURE__ */ (0,
|
|
17268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
17088
17269
|
Badge_default,
|
|
17089
17270
|
{
|
|
17090
17271
|
className: `${config.bgColor} ${config.textColor} text-xs px-2 py-1`,
|
|
@@ -17099,22 +17280,22 @@ var createTableColumns = (onCorrectActivity) => [
|
|
|
17099
17280
|
sortable: true,
|
|
17100
17281
|
render: (value) => {
|
|
17101
17282
|
if (!value || typeof value !== "string") {
|
|
17102
|
-
return /* @__PURE__ */ (0,
|
|
17283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-sm text-text-400", children: "-" });
|
|
17103
17284
|
}
|
|
17104
|
-
return /* @__PURE__ */ (0,
|
|
17285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-sm text-text-700", children: formatDateToBrazilian(value) });
|
|
17105
17286
|
}
|
|
17106
17287
|
},
|
|
17107
17288
|
{
|
|
17108
17289
|
key: "timeSpent",
|
|
17109
17290
|
label: "Dura\xE7\xE3o",
|
|
17110
17291
|
sortable: false,
|
|
17111
|
-
render: (value) => Number(value) > 0 ? /* @__PURE__ */ (0,
|
|
17292
|
+
render: (value) => Number(value) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-sm text-text-700", children: formatTimeSpent(Number(value)) }) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-sm text-text-400", children: "-" })
|
|
17112
17293
|
},
|
|
17113
17294
|
{
|
|
17114
17295
|
key: "score",
|
|
17115
17296
|
label: "Nota",
|
|
17116
17297
|
sortable: true,
|
|
17117
|
-
render: (value) => value === null ? /* @__PURE__ */ (0,
|
|
17298
|
+
render: (value) => value === null ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-sm text-text-400", children: "-" }) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-sm font-semibold text-text-950", children: Number(value).toFixed(1) })
|
|
17118
17299
|
},
|
|
17119
17300
|
{
|
|
17120
17301
|
key: "actions",
|
|
@@ -17122,7 +17303,7 @@ var createTableColumns = (onCorrectActivity) => [
|
|
|
17122
17303
|
sortable: false,
|
|
17123
17304
|
render: (_value, row) => {
|
|
17124
17305
|
if (row.status === STUDENT_ACTIVITY_STATUS.AGUARDANDO_CORRECAO) {
|
|
17125
|
-
return /* @__PURE__ */ (0,
|
|
17306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
17126
17307
|
Button_default,
|
|
17127
17308
|
{
|
|
17128
17309
|
variant: "outline",
|
|
@@ -17134,7 +17315,7 @@ var createTableColumns = (onCorrectActivity) => [
|
|
|
17134
17315
|
);
|
|
17135
17316
|
}
|
|
17136
17317
|
if (row.status === STUDENT_ACTIVITY_STATUS.CONCLUIDO || row.status === STUDENT_ACTIVITY_STATUS.NAO_ENTREGUE) {
|
|
17137
|
-
return /* @__PURE__ */ (0,
|
|
17318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
17138
17319
|
Button_default,
|
|
17139
17320
|
{
|
|
17140
17321
|
variant: "link",
|
|
@@ -17160,20 +17341,20 @@ var ActivityDetails = ({
|
|
|
17160
17341
|
mapSubjectNameToEnum
|
|
17161
17342
|
}) => {
|
|
17162
17343
|
const { isMobile } = useMobile();
|
|
17163
|
-
const [page, setPage] = (0,
|
|
17164
|
-
const [limit, setLimit] = (0,
|
|
17165
|
-
const [sortBy, setSortBy] = (0,
|
|
17166
|
-
const [sortOrder, setSortOrder] = (0,
|
|
17344
|
+
const [page, setPage] = (0, import_react56.useState)(1);
|
|
17345
|
+
const [limit, setLimit] = (0, import_react56.useState)(10);
|
|
17346
|
+
const [sortBy, setSortBy] = (0, import_react56.useState)(void 0);
|
|
17347
|
+
const [sortOrder, setSortOrder] = (0, import_react56.useState)(
|
|
17167
17348
|
void 0
|
|
17168
17349
|
);
|
|
17169
|
-
const [data, setData] = (0,
|
|
17170
|
-
const [correctionData, setCorrectionData] = (0,
|
|
17171
|
-
const [loading, setLoading] = (0,
|
|
17172
|
-
const [error, setError] = (0,
|
|
17173
|
-
const [isModalOpen, setIsModalOpen] = (0,
|
|
17174
|
-
const [isViewOnlyModal, setIsViewOnlyModal] = (0,
|
|
17175
|
-
const [correctionError, setCorrectionError] = (0,
|
|
17176
|
-
(0,
|
|
17350
|
+
const [data, setData] = (0, import_react56.useState)(null);
|
|
17351
|
+
const [correctionData, setCorrectionData] = (0, import_react56.useState)(null);
|
|
17352
|
+
const [loading, setLoading] = (0, import_react56.useState)(true);
|
|
17353
|
+
const [error, setError] = (0, import_react56.useState)(null);
|
|
17354
|
+
const [isModalOpen, setIsModalOpen] = (0, import_react56.useState)(false);
|
|
17355
|
+
const [isViewOnlyModal, setIsViewOnlyModal] = (0, import_react56.useState)(false);
|
|
17356
|
+
const [correctionError, setCorrectionError] = (0, import_react56.useState)(null);
|
|
17357
|
+
(0, import_react56.useEffect)(() => {
|
|
17177
17358
|
const loadData = async () => {
|
|
17178
17359
|
if (!activityId) return;
|
|
17179
17360
|
setLoading(true);
|
|
@@ -17196,7 +17377,7 @@ var ActivityDetails = ({
|
|
|
17196
17377
|
};
|
|
17197
17378
|
loadData();
|
|
17198
17379
|
}, [activityId, page, limit, sortBy, sortOrder, fetchActivityDetails]);
|
|
17199
|
-
const handleCorrectActivity = (0,
|
|
17380
|
+
const handleCorrectActivity = (0, import_react56.useCallback)(
|
|
17200
17381
|
async (studentId) => {
|
|
17201
17382
|
const student = data?.students.find((s) => s.studentId === studentId);
|
|
17202
17383
|
if (!student || !activityId) return;
|
|
@@ -17216,10 +17397,10 @@ var ActivityDetails = ({
|
|
|
17216
17397
|
},
|
|
17217
17398
|
[data?.students, activityId, fetchStudentCorrection]
|
|
17218
17399
|
);
|
|
17219
|
-
const handleCloseModal = (0,
|
|
17400
|
+
const handleCloseModal = (0, import_react56.useCallback)(() => {
|
|
17220
17401
|
setIsModalOpen(false);
|
|
17221
17402
|
}, []);
|
|
17222
|
-
const handleObservationSubmit = (0,
|
|
17403
|
+
const handleObservationSubmit = (0, import_react56.useCallback)(
|
|
17223
17404
|
async (observation, files) => {
|
|
17224
17405
|
if (!activityId || !correctionData?.studentId) return;
|
|
17225
17406
|
try {
|
|
@@ -17236,7 +17417,7 @@ var ActivityDetails = ({
|
|
|
17236
17417
|
},
|
|
17237
17418
|
[activityId, correctionData?.studentId, submitObservation]
|
|
17238
17419
|
);
|
|
17239
|
-
const tableData = (0,
|
|
17420
|
+
const tableData = (0, import_react56.useMemo)(() => {
|
|
17240
17421
|
if (!data?.students) return [];
|
|
17241
17422
|
return data.students.map((student) => ({
|
|
17242
17423
|
id: student.studentId,
|
|
@@ -17248,7 +17429,7 @@ var ActivityDetails = ({
|
|
|
17248
17429
|
score: student.score
|
|
17249
17430
|
}));
|
|
17250
17431
|
}, [data?.students]);
|
|
17251
|
-
const columns = (0,
|
|
17432
|
+
const columns = (0, import_react56.useMemo)(
|
|
17252
17433
|
() => createTableColumns(handleCorrectActivity),
|
|
17253
17434
|
[handleCorrectActivity]
|
|
17254
17435
|
);
|
|
@@ -17280,10 +17461,10 @@ var ActivityDetails = ({
|
|
|
17280
17461
|
const subjectEnum = data?.activity.subjectName && mapSubjectNameToEnum ? mapSubjectNameToEnum(data.activity.subjectName) : null;
|
|
17281
17462
|
const subjectInfo = subjectEnum ? getSubjectInfo(subjectEnum) : null;
|
|
17282
17463
|
if (loading && !data) {
|
|
17283
|
-
return /* @__PURE__ */ (0,
|
|
17284
|
-
/* @__PURE__ */ (0,
|
|
17285
|
-
/* @__PURE__ */ (0,
|
|
17286
|
-
/* @__PURE__ */ (0,
|
|
17464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "flex flex-col w-full h-auto relative justify-center items-center mb-5 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("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: [
|
|
17465
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "flex items-center gap-2 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(SkeletonText, { width: 100, height: 14 }) }),
|
|
17466
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(SkeletonRounded, { className: "w-full h-[120px]" }),
|
|
17467
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
17287
17468
|
"div",
|
|
17288
17469
|
{
|
|
17289
17470
|
className: cn(
|
|
@@ -17296,14 +17477,14 @@ var ActivityDetails = ({
|
|
|
17296
17477
|
"pending",
|
|
17297
17478
|
"avg-score",
|
|
17298
17479
|
"avg-time"
|
|
17299
|
-
].map((id) => /* @__PURE__ */ (0,
|
|
17480
|
+
].map((id) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(SkeletonRounded, { className: "w-full h-[150px]" }, id))
|
|
17300
17481
|
}
|
|
17301
17482
|
),
|
|
17302
|
-
/* @__PURE__ */ (0,
|
|
17483
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "w-full bg-background rounded-xl p-6", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(SkeletonTable, { rows: 5, columns: 6, showHeader: true }) })
|
|
17303
17484
|
] }) });
|
|
17304
17485
|
}
|
|
17305
17486
|
if (error || !data) {
|
|
17306
|
-
return /* @__PURE__ */ (0,
|
|
17487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "flex flex-col w-full h-auto relative justify-center items-center mb-5", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("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__ */ (0, import_jsx_runtime74.jsx)(
|
|
17307
17488
|
EmptyState_default,
|
|
17308
17489
|
{
|
|
17309
17490
|
image: emptyStateImage,
|
|
@@ -17312,10 +17493,10 @@ var ActivityDetails = ({
|
|
|
17312
17493
|
}
|
|
17313
17494
|
) }) });
|
|
17314
17495
|
}
|
|
17315
|
-
return /* @__PURE__ */ (0,
|
|
17316
|
-
/* @__PURE__ */ (0,
|
|
17317
|
-
/* @__PURE__ */ (0,
|
|
17318
|
-
/* @__PURE__ */ (0,
|
|
17496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex flex-col w-full h-auto relative justify-center items-center mb-5 overflow-hidden", children: [
|
|
17497
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("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: [
|
|
17498
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex items-center gap-2 py-4", children: [
|
|
17499
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
17319
17500
|
"button",
|
|
17320
17501
|
{
|
|
17321
17502
|
onClick: handleBack,
|
|
@@ -17323,31 +17504,31 @@ var ActivityDetails = ({
|
|
|
17323
17504
|
children: "Atividades"
|
|
17324
17505
|
}
|
|
17325
17506
|
),
|
|
17326
|
-
/* @__PURE__ */ (0,
|
|
17327
|
-
/* @__PURE__ */ (0,
|
|
17507
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_phosphor_react38.CaretRight, { size: 16, className: "text-text-500" }),
|
|
17508
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-text-950 text-sm font-bold", children: data.activity.title })
|
|
17328
17509
|
] }),
|
|
17329
|
-
/* @__PURE__ */ (0,
|
|
17330
|
-
/* @__PURE__ */ (0,
|
|
17331
|
-
/* @__PURE__ */ (0,
|
|
17332
|
-
/* @__PURE__ */ (0,
|
|
17333
|
-
/* @__PURE__ */ (0,
|
|
17510
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "bg-background rounded-xl p-4 flex flex-col gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex justify-between items-start", children: [
|
|
17511
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
17512
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-2xl font-bold text-text-950", children: data.activity.title }),
|
|
17513
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
17514
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(Text_default, { className: "text-sm text-text-500", children: [
|
|
17334
17515
|
"In\xEDcio",
|
|
17335
17516
|
" ",
|
|
17336
17517
|
data.activity.startDate ? formatDateToBrazilian(data.activity.startDate) : "00/00/0000"
|
|
17337
17518
|
] }),
|
|
17338
|
-
/* @__PURE__ */ (0,
|
|
17339
|
-
/* @__PURE__ */ (0,
|
|
17519
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "w-1 h-1 rounded-full bg-text-500" }),
|
|
17520
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(Text_default, { className: "text-sm text-text-500", children: [
|
|
17340
17521
|
"Prazo final",
|
|
17341
17522
|
" ",
|
|
17342
17523
|
data.activity.finalDate ? formatDateToBrazilian(data.activity.finalDate) : "00/00/0000"
|
|
17343
17524
|
] }),
|
|
17344
|
-
/* @__PURE__ */ (0,
|
|
17345
|
-
/* @__PURE__ */ (0,
|
|
17346
|
-
/* @__PURE__ */ (0,
|
|
17347
|
-
/* @__PURE__ */ (0,
|
|
17348
|
-
/* @__PURE__ */ (0,
|
|
17349
|
-
subjectInfo ? /* @__PURE__ */ (0,
|
|
17350
|
-
/* @__PURE__ */ (0,
|
|
17525
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "w-1 h-1 rounded-full bg-text-500" }),
|
|
17526
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-sm text-text-500", children: data.activity.schoolName }),
|
|
17527
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "w-1 h-1 rounded-full bg-text-500" }),
|
|
17528
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-sm text-text-500", children: data.activity.year }),
|
|
17529
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "w-1 h-1 rounded-full bg-text-500" }),
|
|
17530
|
+
subjectInfo ? /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
17531
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
17351
17532
|
"span",
|
|
17352
17533
|
{
|
|
17353
17534
|
className: cn(
|
|
@@ -17357,33 +17538,33 @@ var ActivityDetails = ({
|
|
|
17357
17538
|
children: subjectInfo.icon
|
|
17358
17539
|
}
|
|
17359
17540
|
),
|
|
17360
|
-
/* @__PURE__ */ (0,
|
|
17361
|
-
] }) : /* @__PURE__ */ (0,
|
|
17362
|
-
/* @__PURE__ */ (0,
|
|
17363
|
-
/* @__PURE__ */ (0,
|
|
17541
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-sm text-text-500", children: data.activity.subjectName })
|
|
17542
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-sm text-text-500", children: data.activity.subjectName }),
|
|
17543
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "w-1 h-1 rounded-full bg-text-500" }),
|
|
17544
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-sm text-text-500", children: data.activity.className })
|
|
17364
17545
|
] })
|
|
17365
17546
|
] }),
|
|
17366
|
-
/* @__PURE__ */ (0,
|
|
17547
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
17367
17548
|
Button_default,
|
|
17368
17549
|
{
|
|
17369
17550
|
size: "small",
|
|
17370
17551
|
onClick: handleViewActivity,
|
|
17371
17552
|
className: "bg-primary-950 text-text gap-2",
|
|
17372
17553
|
children: [
|
|
17373
|
-
/* @__PURE__ */ (0,
|
|
17554
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_phosphor_react38.File, { size: 16 }),
|
|
17374
17555
|
"Ver atividade"
|
|
17375
17556
|
]
|
|
17376
17557
|
}
|
|
17377
17558
|
)
|
|
17378
17559
|
] }) }),
|
|
17379
|
-
/* @__PURE__ */ (0,
|
|
17560
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
17380
17561
|
"div",
|
|
17381
17562
|
{
|
|
17382
17563
|
className: cn("grid gap-5", isMobile ? "grid-cols-2" : "grid-cols-5"),
|
|
17383
17564
|
children: [
|
|
17384
|
-
/* @__PURE__ */ (0,
|
|
17385
|
-
/* @__PURE__ */ (0,
|
|
17386
|
-
/* @__PURE__ */ (0,
|
|
17565
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("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__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "relative w-[90px] h-[90px]", children: [
|
|
17566
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("svg", { className: "w-full h-full transform -rotate-90", children: [
|
|
17567
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
17387
17568
|
"circle",
|
|
17388
17569
|
{
|
|
17389
17570
|
cx: "45",
|
|
@@ -17394,7 +17575,7 @@ var ActivityDetails = ({
|
|
|
17394
17575
|
fill: "none"
|
|
17395
17576
|
}
|
|
17396
17577
|
),
|
|
17397
|
-
/* @__PURE__ */ (0,
|
|
17578
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
17398
17579
|
"circle",
|
|
17399
17580
|
{
|
|
17400
17581
|
cx: "45",
|
|
@@ -17408,56 +17589,56 @@ var ActivityDetails = ({
|
|
|
17408
17589
|
}
|
|
17409
17590
|
)
|
|
17410
17591
|
] }),
|
|
17411
|
-
/* @__PURE__ */ (0,
|
|
17412
|
-
/* @__PURE__ */ (0,
|
|
17592
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
17593
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(Text_default, { className: "text-xl font-medium text-primary-600", children: [
|
|
17413
17594
|
Math.round(data.generalStats.completionPercentage),
|
|
17414
17595
|
"%"
|
|
17415
17596
|
] }),
|
|
17416
|
-
/* @__PURE__ */ (0,
|
|
17597
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-2xs font-bold text-text-600 uppercase", children: "Conclu\xEDdo" })
|
|
17417
17598
|
] })
|
|
17418
17599
|
] }) }),
|
|
17419
|
-
/* @__PURE__ */ (0,
|
|
17420
|
-
/* @__PURE__ */ (0,
|
|
17421
|
-
/* @__PURE__ */ (0,
|
|
17422
|
-
/* @__PURE__ */ (0,
|
|
17600
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("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: [
|
|
17601
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "w-[30px] h-[30px] rounded-2xl flex items-center justify-center bg-warning-300", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_phosphor_react38.Star, { size: 16, className: "text-white", weight: "regular" }) }),
|
|
17602
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-2xs font-bold uppercase text-center text-warning-600", children: "M\xE9dia da Turma" }),
|
|
17603
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-xl font-bold text-warning-600", children: data.generalStats.averageScore.toFixed(1) })
|
|
17423
17604
|
] }),
|
|
17424
|
-
/* @__PURE__ */ (0,
|
|
17425
|
-
/* @__PURE__ */ (0,
|
|
17426
|
-
/* @__PURE__ */ (0,
|
|
17427
|
-
/* @__PURE__ */ (0,
|
|
17605
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("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: [
|
|
17606
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "w-[30px] h-[30px] rounded-2xl flex items-center justify-center bg-indicator-positive", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_phosphor_react38.Medal, { size: 16, className: "text-text-950", weight: "regular" }) }),
|
|
17607
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-2xs font-bold uppercase text-center text-success-700", children: "Quest\xF5es com mais acertos" }),
|
|
17608
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-xl font-bold text-success-700", children: formatQuestionNumbers(data.questionStats.mostCorrect) })
|
|
17428
17609
|
] }),
|
|
17429
|
-
/* @__PURE__ */ (0,
|
|
17430
|
-
/* @__PURE__ */ (0,
|
|
17431
|
-
|
|
17610
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("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: [
|
|
17611
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "w-[30px] h-[30px] rounded-2xl flex items-center justify-center bg-indicator-negative", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
17612
|
+
import_phosphor_react38.WarningCircle,
|
|
17432
17613
|
{
|
|
17433
17614
|
size: 16,
|
|
17434
17615
|
className: "text-white",
|
|
17435
17616
|
weight: "regular"
|
|
17436
17617
|
}
|
|
17437
17618
|
) }),
|
|
17438
|
-
/* @__PURE__ */ (0,
|
|
17439
|
-
/* @__PURE__ */ (0,
|
|
17619
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-2xs font-bold uppercase text-center text-error-700", children: "Quest\xF5es com mais erros" }),
|
|
17620
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-xl font-bold text-error-700", children: formatQuestionNumbers(data.questionStats.mostIncorrect) })
|
|
17440
17621
|
] }),
|
|
17441
|
-
/* @__PURE__ */ (0,
|
|
17442
|
-
/* @__PURE__ */ (0,
|
|
17443
|
-
|
|
17622
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("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: [
|
|
17623
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "w-[30px] h-[30px] rounded-2xl flex items-center justify-center bg-info-500", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
17624
|
+
import_phosphor_react38.WarningCircle,
|
|
17444
17625
|
{
|
|
17445
17626
|
size: 16,
|
|
17446
17627
|
className: "text-white",
|
|
17447
17628
|
weight: "regular"
|
|
17448
17629
|
}
|
|
17449
17630
|
) }),
|
|
17450
|
-
/* @__PURE__ */ (0,
|
|
17451
|
-
/* @__PURE__ */ (0,
|
|
17631
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-2xs font-bold uppercase text-center text-info-700", children: "Quest\xF5es n\xE3o respondidas" }),
|
|
17632
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-xl font-bold text-info-700", children: formatQuestionNumbers(data.questionStats.notAnswered) })
|
|
17452
17633
|
] })
|
|
17453
17634
|
]
|
|
17454
17635
|
}
|
|
17455
17636
|
),
|
|
17456
|
-
correctionError && /* @__PURE__ */ (0,
|
|
17457
|
-
/* @__PURE__ */ (0,
|
|
17458
|
-
/* @__PURE__ */ (0,
|
|
17637
|
+
correctionError && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "w-full bg-error-50 border border-error-200 rounded-xl p-4 flex items-center gap-3", children: [
|
|
17638
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_phosphor_react38.WarningCircle, { size: 20, className: "text-error-600", weight: "fill" }),
|
|
17639
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text_default, { className: "text-error-700 text-sm", children: correctionError })
|
|
17459
17640
|
] }),
|
|
17460
|
-
/* @__PURE__ */ (0,
|
|
17641
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "w-full bg-background rounded-xl p-6 space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
17461
17642
|
TableProvider,
|
|
17462
17643
|
{
|
|
17463
17644
|
data: tableData,
|
|
@@ -17474,7 +17655,7 @@ var ActivityDetails = ({
|
|
|
17474
17655
|
totalPages: data.pagination.totalPages
|
|
17475
17656
|
},
|
|
17476
17657
|
emptyState: {
|
|
17477
|
-
component: /* @__PURE__ */ (0,
|
|
17658
|
+
component: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
17478
17659
|
EmptyState_default,
|
|
17479
17660
|
{
|
|
17480
17661
|
image: emptyStateImage,
|
|
@@ -17484,14 +17665,14 @@ var ActivityDetails = ({
|
|
|
17484
17665
|
)
|
|
17485
17666
|
},
|
|
17486
17667
|
onParamsChange: handleTableParamsChange,
|
|
17487
|
-
children: ({ table, pagination }) => /* @__PURE__ */ (0,
|
|
17668
|
+
children: ({ table, pagination }) => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
|
|
17488
17669
|
table,
|
|
17489
17670
|
pagination
|
|
17490
17671
|
] })
|
|
17491
17672
|
}
|
|
17492
17673
|
) })
|
|
17493
17674
|
] }),
|
|
17494
|
-
/* @__PURE__ */ (0,
|
|
17675
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
17495
17676
|
CorrectActivityModal_default,
|
|
17496
17677
|
{
|
|
17497
17678
|
isOpen: isModalOpen,
|
|
@@ -17505,10 +17686,10 @@ var ActivityDetails = ({
|
|
|
17505
17686
|
};
|
|
17506
17687
|
|
|
17507
17688
|
// src/components/Support/Support.tsx
|
|
17508
|
-
var
|
|
17689
|
+
var import_react59 = require("react");
|
|
17509
17690
|
var import_react_hook_form = require("react-hook-form");
|
|
17510
17691
|
var import_zod2 = require("@hookform/resolvers/zod");
|
|
17511
|
-
var
|
|
17692
|
+
var import_react60 = require("@phosphor-icons/react");
|
|
17512
17693
|
var import_dayjs2 = __toESM(require("dayjs"));
|
|
17513
17694
|
|
|
17514
17695
|
// src/components/Support/schema/index.ts
|
|
@@ -17531,7 +17712,7 @@ var supportSchema = import_zod.z.object({
|
|
|
17531
17712
|
});
|
|
17532
17713
|
|
|
17533
17714
|
// src/components/Support/components/TicketModal.tsx
|
|
17534
|
-
var
|
|
17715
|
+
var import_react58 = require("react");
|
|
17535
17716
|
var import_dayjs = __toESM(require("dayjs"));
|
|
17536
17717
|
var import_pt_br = require("dayjs/locale/pt-br");
|
|
17537
17718
|
|
|
@@ -17611,37 +17792,37 @@ var mapInternalStatusToApi = (internalStatus) => {
|
|
|
17611
17792
|
};
|
|
17612
17793
|
|
|
17613
17794
|
// src/components/Support/utils/supportUtils.tsx
|
|
17614
|
-
var
|
|
17615
|
-
var
|
|
17795
|
+
var import_react57 = require("@phosphor-icons/react");
|
|
17796
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
17616
17797
|
var getCategoryIcon = (category, size = 16) => {
|
|
17617
17798
|
if (!category) return null;
|
|
17618
17799
|
switch (category) {
|
|
17619
17800
|
case "acesso" /* ACESSO */:
|
|
17620
|
-
return /* @__PURE__ */ (0,
|
|
17801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react57.KeyIcon, { size });
|
|
17621
17802
|
case "tecnico" /* TECNICO */:
|
|
17622
|
-
return /* @__PURE__ */ (0,
|
|
17803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react57.BugIcon, { size });
|
|
17623
17804
|
case "outros" /* OUTROS */:
|
|
17624
|
-
return /* @__PURE__ */ (0,
|
|
17805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react57.InfoIcon, { size });
|
|
17625
17806
|
default:
|
|
17626
|
-
return /* @__PURE__ */ (0,
|
|
17807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react57.InfoIcon, { size });
|
|
17627
17808
|
}
|
|
17628
17809
|
};
|
|
17629
17810
|
|
|
17630
17811
|
// src/components/Support/components/TicketModal.tsx
|
|
17631
|
-
var
|
|
17812
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
17632
17813
|
import_dayjs.default.locale("pt-br");
|
|
17633
|
-
var AnswerSkeleton = () => /* @__PURE__ */ (0,
|
|
17634
|
-
/* @__PURE__ */ (0,
|
|
17635
|
-
/* @__PURE__ */ (0,
|
|
17636
|
-
/* @__PURE__ */ (0,
|
|
17814
|
+
var AnswerSkeleton = () => /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "bg-background p-4 space-y-6 rounded-xl", children: [
|
|
17815
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex items-center space-x-6", children: [
|
|
17816
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(SkeletonText, { width: "80px", height: 16 }),
|
|
17817
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(SkeletonText, { width: "200px", height: 16 })
|
|
17637
17818
|
] }),
|
|
17638
|
-
/* @__PURE__ */ (0,
|
|
17639
|
-
/* @__PURE__ */ (0,
|
|
17640
|
-
/* @__PURE__ */ (0,
|
|
17641
|
-
/* @__PURE__ */ (0,
|
|
17642
|
-
/* @__PURE__ */ (0,
|
|
17643
|
-
/* @__PURE__ */ (0,
|
|
17644
|
-
/* @__PURE__ */ (0,
|
|
17819
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Divider_default, {}),
|
|
17820
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex items-start space-x-6", children: [
|
|
17821
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(SkeletonText, { width: "80px", height: 16 }),
|
|
17822
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
17823
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(SkeletonText, { width: "100%", height: 16 }),
|
|
17824
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(SkeletonText, { width: "80%", height: 16 }),
|
|
17825
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(SkeletonText, { width: "60%", height: 16 })
|
|
17645
17826
|
] })
|
|
17646
17827
|
] })
|
|
17647
17828
|
] });
|
|
@@ -17653,17 +17834,17 @@ var TicketModal = ({
|
|
|
17653
17834
|
apiClient,
|
|
17654
17835
|
userId
|
|
17655
17836
|
}) => {
|
|
17656
|
-
const [showCloseConfirmation, setShowCloseConfirmation] = (0,
|
|
17657
|
-
const [responseText, setResponseText] = (0,
|
|
17658
|
-
const [answers, setAnswers] = (0,
|
|
17659
|
-
const [isSubmittingAnswer, setIsSubmittingAnswer] = (0,
|
|
17660
|
-
const [isLoadingAnswers, setIsLoadingAnswers] = (0,
|
|
17837
|
+
const [showCloseConfirmation, setShowCloseConfirmation] = (0, import_react58.useState)(false);
|
|
17838
|
+
const [responseText, setResponseText] = (0, import_react58.useState)("");
|
|
17839
|
+
const [answers, setAnswers] = (0, import_react58.useState)([]);
|
|
17840
|
+
const [isSubmittingAnswer, setIsSubmittingAnswer] = (0, import_react58.useState)(false);
|
|
17841
|
+
const [isLoadingAnswers, setIsLoadingAnswers] = (0, import_react58.useState)(false);
|
|
17661
17842
|
const handleCloseTicket = () => {
|
|
17662
17843
|
onTicketClose?.(ticket.id);
|
|
17663
17844
|
setShowCloseConfirmation(false);
|
|
17664
17845
|
onClose();
|
|
17665
17846
|
};
|
|
17666
|
-
const fetchAnswers = (0,
|
|
17847
|
+
const fetchAnswers = (0, import_react58.useCallback)(async () => {
|
|
17667
17848
|
if (!ticket.id || ticket.status !== "respondido" /* RESPONDIDO */) return;
|
|
17668
17849
|
setIsLoadingAnswers(true);
|
|
17669
17850
|
try {
|
|
@@ -17702,7 +17883,7 @@ var TicketModal = ({
|
|
|
17702
17883
|
}
|
|
17703
17884
|
};
|
|
17704
17885
|
const canCloseTicket = ticket.status !== "encerrado" /* ENCERRADO */;
|
|
17705
|
-
(0,
|
|
17886
|
+
(0, import_react58.useEffect)(() => {
|
|
17706
17887
|
if (isOpen) {
|
|
17707
17888
|
setResponseText("");
|
|
17708
17889
|
(async () => {
|
|
@@ -17714,8 +17895,8 @@ var TicketModal = ({
|
|
|
17714
17895
|
setAnswers([]);
|
|
17715
17896
|
}
|
|
17716
17897
|
}, [isOpen, fetchAnswers]);
|
|
17717
|
-
return /* @__PURE__ */ (0,
|
|
17718
|
-
/* @__PURE__ */ (0,
|
|
17898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
|
|
17899
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17719
17900
|
Modal_default,
|
|
17720
17901
|
{
|
|
17721
17902
|
isOpen,
|
|
@@ -17725,10 +17906,10 @@ var TicketModal = ({
|
|
|
17725
17906
|
hideCloseButton: false,
|
|
17726
17907
|
closeOnEscape: true,
|
|
17727
17908
|
"data-testid": "ticket-modal",
|
|
17728
|
-
children: /* @__PURE__ */ (0,
|
|
17729
|
-
/* @__PURE__ */ (0,
|
|
17730
|
-
/* @__PURE__ */ (0,
|
|
17731
|
-
canCloseTicket && /* @__PURE__ */ (0,
|
|
17909
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex flex-col h-full max-h-[80vh]", children: [
|
|
17910
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex justify-between items-center mb-3", children: [
|
|
17911
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Text_default, { size: "md", weight: "bold", className: "text-text-950", children: "Detalhes" }),
|
|
17912
|
+
canCloseTicket && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17732
17913
|
Button_default,
|
|
17733
17914
|
{
|
|
17734
17915
|
variant: "outline",
|
|
@@ -17739,10 +17920,10 @@ var TicketModal = ({
|
|
|
17739
17920
|
}
|
|
17740
17921
|
)
|
|
17741
17922
|
] }),
|
|
17742
|
-
/* @__PURE__ */ (0,
|
|
17743
|
-
/* @__PURE__ */ (0,
|
|
17744
|
-
/* @__PURE__ */ (0,
|
|
17745
|
-
/* @__PURE__ */ (0,
|
|
17923
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex-1 overflow-y-auto pr-2 space-y-6", children: [
|
|
17924
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "bg-background p-4 space-y-6 rounded-xl", children: [
|
|
17925
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex items-center space-x-6", children: [
|
|
17926
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17746
17927
|
Text_default,
|
|
17747
17928
|
{
|
|
17748
17929
|
size: "md",
|
|
@@ -17751,10 +17932,10 @@ var TicketModal = ({
|
|
|
17751
17932
|
children: "ID"
|
|
17752
17933
|
}
|
|
17753
17934
|
),
|
|
17754
|
-
/* @__PURE__ */ (0,
|
|
17935
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Text_default, { size: "md", weight: "normal", className: "text-text-600", children: ticket.id })
|
|
17755
17936
|
] }),
|
|
17756
|
-
/* @__PURE__ */ (0,
|
|
17757
|
-
/* @__PURE__ */ (0,
|
|
17937
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex items-center space-x-6", children: [
|
|
17938
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17758
17939
|
Text_default,
|
|
17759
17940
|
{
|
|
17760
17941
|
size: "md",
|
|
@@ -17763,10 +17944,10 @@ var TicketModal = ({
|
|
|
17763
17944
|
children: "Aberto em"
|
|
17764
17945
|
}
|
|
17765
17946
|
),
|
|
17766
|
-
/* @__PURE__ */ (0,
|
|
17947
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Text_default, { size: "md", weight: "normal", className: "text-text-600", children: (0, import_dayjs.default)(ticket.createdAt).format("DD MMMM YYYY, [\xE0s] HH[h]") })
|
|
17767
17948
|
] }),
|
|
17768
|
-
/* @__PURE__ */ (0,
|
|
17769
|
-
/* @__PURE__ */ (0,
|
|
17949
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex items-center space-x-6", children: [
|
|
17950
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17770
17951
|
Text_default,
|
|
17771
17952
|
{
|
|
17772
17953
|
size: "md",
|
|
@@ -17775,7 +17956,7 @@ var TicketModal = ({
|
|
|
17775
17956
|
children: "Status"
|
|
17776
17957
|
}
|
|
17777
17958
|
),
|
|
17778
|
-
/* @__PURE__ */ (0,
|
|
17959
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17779
17960
|
Badge_default,
|
|
17780
17961
|
{
|
|
17781
17962
|
variant: "solid",
|
|
@@ -17786,8 +17967,8 @@ var TicketModal = ({
|
|
|
17786
17967
|
}
|
|
17787
17968
|
)
|
|
17788
17969
|
] }),
|
|
17789
|
-
/* @__PURE__ */ (0,
|
|
17790
|
-
/* @__PURE__ */ (0,
|
|
17970
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex items-center space-x-6", children: [
|
|
17971
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17791
17972
|
Text_default,
|
|
17792
17973
|
{
|
|
17793
17974
|
size: "md",
|
|
@@ -17796,7 +17977,7 @@ var TicketModal = ({
|
|
|
17796
17977
|
children: "Tipo"
|
|
17797
17978
|
}
|
|
17798
17979
|
),
|
|
17799
|
-
/* @__PURE__ */ (0,
|
|
17980
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
17800
17981
|
Badge_default,
|
|
17801
17982
|
{
|
|
17802
17983
|
variant: "solid",
|
|
@@ -17810,9 +17991,9 @@ var TicketModal = ({
|
|
|
17810
17991
|
}
|
|
17811
17992
|
)
|
|
17812
17993
|
] }),
|
|
17813
|
-
/* @__PURE__ */ (0,
|
|
17814
|
-
/* @__PURE__ */ (0,
|
|
17815
|
-
/* @__PURE__ */ (0,
|
|
17994
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Divider_default, {}),
|
|
17995
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex items-start space-x-6", children: [
|
|
17996
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17816
17997
|
Text_default,
|
|
17817
17998
|
{
|
|
17818
17999
|
size: "md",
|
|
@@ -17821,24 +18002,24 @@ var TicketModal = ({
|
|
|
17821
18002
|
children: "Descri\xE7\xE3o"
|
|
17822
18003
|
}
|
|
17823
18004
|
),
|
|
17824
|
-
ticket.description && /* @__PURE__ */ (0,
|
|
18005
|
+
ticket.description && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Text_default, { size: "md", weight: "normal", className: "text-text-600", children: ticket.description })
|
|
17825
18006
|
] })
|
|
17826
18007
|
] }),
|
|
17827
|
-
ticket.status === "respondido" /* RESPONDIDO */ && isLoadingAnswers && /* @__PURE__ */ (0,
|
|
17828
|
-
/* @__PURE__ */ (0,
|
|
17829
|
-
/* @__PURE__ */ (0,
|
|
18008
|
+
ticket.status === "respondido" /* RESPONDIDO */ && isLoadingAnswers && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
|
|
18009
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Text_default, { size: "md", weight: "bold", className: "text-text-950 my-6", children: "Resposta de Suporte T\xE9cnico" }),
|
|
18010
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(AnswerSkeleton, {})
|
|
17830
18011
|
] }),
|
|
17831
|
-
!isLoadingAnswers && answers.some((answer) => answer.userId !== userId) && /* @__PURE__ */ (0,
|
|
17832
|
-
/* @__PURE__ */ (0,
|
|
18012
|
+
!isLoadingAnswers && answers.some((answer) => answer.userId !== userId) && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
|
|
18013
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Text_default, { size: "md", weight: "bold", className: "text-text-950 my-6", children: "Resposta de Suporte T\xE9cnico" }),
|
|
17833
18014
|
answers.filter((answer) => answer.userId !== userId).sort(
|
|
17834
18015
|
(a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()
|
|
17835
|
-
).slice(0, 1).map((answer) => /* @__PURE__ */ (0,
|
|
18016
|
+
).slice(0, 1).map((answer) => /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
17836
18017
|
"div",
|
|
17837
18018
|
{
|
|
17838
18019
|
className: "bg-background p-4 space-y-6 rounded-xl",
|
|
17839
18020
|
children: [
|
|
17840
|
-
/* @__PURE__ */ (0,
|
|
17841
|
-
/* @__PURE__ */ (0,
|
|
18021
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex items-center space-x-6", children: [
|
|
18022
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17842
18023
|
Text_default,
|
|
17843
18024
|
{
|
|
17844
18025
|
size: "md",
|
|
@@ -17847,7 +18028,7 @@ var TicketModal = ({
|
|
|
17847
18028
|
children: "Recebido"
|
|
17848
18029
|
}
|
|
17849
18030
|
),
|
|
17850
|
-
/* @__PURE__ */ (0,
|
|
18031
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17851
18032
|
Text_default,
|
|
17852
18033
|
{
|
|
17853
18034
|
size: "md",
|
|
@@ -17859,9 +18040,9 @@ var TicketModal = ({
|
|
|
17859
18040
|
}
|
|
17860
18041
|
)
|
|
17861
18042
|
] }),
|
|
17862
|
-
/* @__PURE__ */ (0,
|
|
17863
|
-
/* @__PURE__ */ (0,
|
|
17864
|
-
/* @__PURE__ */ (0,
|
|
18043
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Divider_default, {}),
|
|
18044
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex items-start space-x-6", children: [
|
|
18045
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17865
18046
|
Text_default,
|
|
17866
18047
|
{
|
|
17867
18048
|
size: "md",
|
|
@@ -17870,7 +18051,7 @@ var TicketModal = ({
|
|
|
17870
18051
|
children: "Resposta"
|
|
17871
18052
|
}
|
|
17872
18053
|
),
|
|
17873
|
-
/* @__PURE__ */ (0,
|
|
18054
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17874
18055
|
Text_default,
|
|
17875
18056
|
{
|
|
17876
18057
|
size: "md",
|
|
@@ -17885,17 +18066,17 @@ var TicketModal = ({
|
|
|
17885
18066
|
answer.id
|
|
17886
18067
|
))
|
|
17887
18068
|
] }),
|
|
17888
|
-
!isLoadingAnswers && answers.some((answer) => answer.userId === userId) && /* @__PURE__ */ (0,
|
|
17889
|
-
/* @__PURE__ */ (0,
|
|
18069
|
+
!isLoadingAnswers && answers.some((answer) => answer.userId === userId) && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
|
|
18070
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Text_default, { size: "md", weight: "bold", className: "text-text-950 my-6", children: "Resposta enviada" }),
|
|
17890
18071
|
answers.filter((answer) => answer.userId === userId).sort(
|
|
17891
18072
|
(a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()
|
|
17892
|
-
).slice(0, 1).map((answer) => /* @__PURE__ */ (0,
|
|
18073
|
+
).slice(0, 1).map((answer) => /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
17893
18074
|
"div",
|
|
17894
18075
|
{
|
|
17895
18076
|
className: "bg-background p-4 space-y-6 rounded-xl",
|
|
17896
18077
|
children: [
|
|
17897
|
-
/* @__PURE__ */ (0,
|
|
17898
|
-
/* @__PURE__ */ (0,
|
|
18078
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex items-center space-x-6", children: [
|
|
18079
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17899
18080
|
Text_default,
|
|
17900
18081
|
{
|
|
17901
18082
|
size: "md",
|
|
@@ -17904,7 +18085,7 @@ var TicketModal = ({
|
|
|
17904
18085
|
children: "Enviada"
|
|
17905
18086
|
}
|
|
17906
18087
|
),
|
|
17907
|
-
/* @__PURE__ */ (0,
|
|
18088
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17908
18089
|
Text_default,
|
|
17909
18090
|
{
|
|
17910
18091
|
size: "md",
|
|
@@ -17916,9 +18097,9 @@ var TicketModal = ({
|
|
|
17916
18097
|
}
|
|
17917
18098
|
)
|
|
17918
18099
|
] }),
|
|
17919
|
-
/* @__PURE__ */ (0,
|
|
17920
|
-
/* @__PURE__ */ (0,
|
|
17921
|
-
/* @__PURE__ */ (0,
|
|
18100
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Divider_default, {}),
|
|
18101
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex items-start space-x-6", children: [
|
|
18102
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17922
18103
|
Text_default,
|
|
17923
18104
|
{
|
|
17924
18105
|
size: "md",
|
|
@@ -17927,7 +18108,7 @@ var TicketModal = ({
|
|
|
17927
18108
|
children: "Resposta"
|
|
17928
18109
|
}
|
|
17929
18110
|
),
|
|
17930
|
-
/* @__PURE__ */ (0,
|
|
18111
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17931
18112
|
Text_default,
|
|
17932
18113
|
{
|
|
17933
18114
|
size: "md",
|
|
@@ -17942,10 +18123,10 @@ var TicketModal = ({
|
|
|
17942
18123
|
answer.id
|
|
17943
18124
|
))
|
|
17944
18125
|
] }),
|
|
17945
|
-
!isLoadingAnswers && answers.some((answer) => answer.userId !== userId) && /* @__PURE__ */ (0,
|
|
17946
|
-
/* @__PURE__ */ (0,
|
|
17947
|
-
/* @__PURE__ */ (0,
|
|
17948
|
-
/* @__PURE__ */ (0,
|
|
18126
|
+
!isLoadingAnswers && answers.some((answer) => answer.userId !== userId) && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
|
|
18127
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Text_default, { size: "lg", weight: "bold", className: "text-text-950 my-6", children: "Responder" }),
|
|
18128
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "space-y-4", children: [
|
|
18129
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17949
18130
|
TextArea_default,
|
|
17950
18131
|
{
|
|
17951
18132
|
placeholder: "Detalhe o problema aqui.",
|
|
@@ -17955,7 +18136,7 @@ var TicketModal = ({
|
|
|
17955
18136
|
onChange: (e) => setResponseText(e.target.value)
|
|
17956
18137
|
}
|
|
17957
18138
|
),
|
|
17958
|
-
responseText.trim().length > 0 && /* @__PURE__ */ (0,
|
|
18139
|
+
responseText.trim().length > 0 && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17959
18140
|
Button_default,
|
|
17960
18141
|
{
|
|
17961
18142
|
variant: "solid",
|
|
@@ -17971,7 +18152,7 @@ var TicketModal = ({
|
|
|
17971
18152
|
] })
|
|
17972
18153
|
}
|
|
17973
18154
|
),
|
|
17974
|
-
/* @__PURE__ */ (0,
|
|
18155
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17975
18156
|
Modal_default,
|
|
17976
18157
|
{
|
|
17977
18158
|
isOpen: showCloseConfirmation,
|
|
@@ -17981,10 +18162,10 @@ var TicketModal = ({
|
|
|
17981
18162
|
hideCloseButton: false,
|
|
17982
18163
|
closeOnEscape: true,
|
|
17983
18164
|
"data-testid": "close-ticket-modal",
|
|
17984
|
-
children: /* @__PURE__ */ (0,
|
|
17985
|
-
/* @__PURE__ */ (0,
|
|
17986
|
-
/* @__PURE__ */ (0,
|
|
17987
|
-
/* @__PURE__ */ (0,
|
|
18165
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "space-y-6", children: [
|
|
18166
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(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." }),
|
|
18167
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex gap-3 justify-end", children: [
|
|
18168
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17988
18169
|
Button_default,
|
|
17989
18170
|
{
|
|
17990
18171
|
variant: "outline",
|
|
@@ -17993,7 +18174,7 @@ var TicketModal = ({
|
|
|
17993
18174
|
children: "Cancelar"
|
|
17994
18175
|
}
|
|
17995
18176
|
),
|
|
17996
|
-
/* @__PURE__ */ (0,
|
|
18177
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17997
18178
|
Button_default,
|
|
17998
18179
|
{
|
|
17999
18180
|
variant: "solid",
|
|
@@ -18014,20 +18195,20 @@ var TicketModal = ({
|
|
|
18014
18195
|
var suporthistory_default = "./suporthistory-W5LBGAUP.png";
|
|
18015
18196
|
|
|
18016
18197
|
// src/components/Support/Support.tsx
|
|
18017
|
-
var
|
|
18198
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
18018
18199
|
var TicketCard = ({
|
|
18019
18200
|
ticket,
|
|
18020
18201
|
onTicketClick
|
|
18021
|
-
}) => /* @__PURE__ */ (0,
|
|
18202
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
18022
18203
|
"button",
|
|
18023
18204
|
{
|
|
18024
18205
|
type: "button",
|
|
18025
18206
|
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",
|
|
18026
18207
|
onClick: () => onTicketClick(ticket),
|
|
18027
18208
|
children: [
|
|
18028
|
-
/* @__PURE__ */ (0,
|
|
18029
|
-
/* @__PURE__ */ (0,
|
|
18030
|
-
/* @__PURE__ */ (0,
|
|
18209
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Text_default, { size: "xs", weight: "bold", className: "text-text-900", children: ticket.title }) }),
|
|
18210
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
18211
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
18031
18212
|
Badge_default,
|
|
18032
18213
|
{
|
|
18033
18214
|
variant: "solid",
|
|
@@ -18036,11 +18217,11 @@ var TicketCard = ({
|
|
|
18036
18217
|
children: getStatusText(ticket.status)
|
|
18037
18218
|
}
|
|
18038
18219
|
),
|
|
18039
|
-
/* @__PURE__ */ (0,
|
|
18220
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(Badge_default, { variant: "solid", className: "flex items-center gap-1", action: "muted", children: [
|
|
18040
18221
|
getCategoryIcon(ticket.category, 18),
|
|
18041
18222
|
getCategoryText(ticket.category)
|
|
18042
18223
|
] }),
|
|
18043
|
-
/* @__PURE__ */ (0,
|
|
18224
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react60.CaretRightIcon, { size: 24, className: "text-text-800" })
|
|
18044
18225
|
] })
|
|
18045
18226
|
]
|
|
18046
18227
|
},
|
|
@@ -18050,9 +18231,9 @@ var TicketGroup = ({
|
|
|
18050
18231
|
date,
|
|
18051
18232
|
tickets,
|
|
18052
18233
|
onTicketClick
|
|
18053
|
-
}) => /* @__PURE__ */ (0,
|
|
18054
|
-
/* @__PURE__ */ (0,
|
|
18055
|
-
/* @__PURE__ */ (0,
|
|
18234
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "space-y-4", children: [
|
|
18235
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Text_default, { size: "md", weight: "bold", className: "text-text-900", children: (0, import_dayjs2.default)(date).format("DD MMM YYYY") }),
|
|
18236
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "space-y-3", children: tickets.map((ticket) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
18056
18237
|
TicketCard,
|
|
18057
18238
|
{
|
|
18058
18239
|
ticket,
|
|
@@ -18061,13 +18242,13 @@ var TicketGroup = ({
|
|
|
18061
18242
|
ticket.id
|
|
18062
18243
|
)) })
|
|
18063
18244
|
] }, date);
|
|
18064
|
-
var EmptyState2 = ({ imageSrc }) => /* @__PURE__ */ (0,
|
|
18065
|
-
imageSrc && /* @__PURE__ */ (0,
|
|
18066
|
-
/* @__PURE__ */ (0,
|
|
18245
|
+
var EmptyState2 = ({ imageSrc }) => /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex flex-row justify-center items-center mt-48", children: [
|
|
18246
|
+
imageSrc && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("img", { src: imageSrc, alt: "Imagem de suporte" }),
|
|
18247
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Text_default, { size: "3xl", weight: "semibold", children: "Nenhum pedido encontrado." })
|
|
18067
18248
|
] });
|
|
18068
|
-
var TicketSkeleton = () => /* @__PURE__ */ (0,
|
|
18069
|
-
/* @__PURE__ */ (0,
|
|
18070
|
-
/* @__PURE__ */ (0,
|
|
18249
|
+
var TicketSkeleton = () => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "space-y-6", children: [0, 1].map((groupIndex) => /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "space-y-4", children: [
|
|
18250
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SkeletonText, { width: "150px", height: 20 }),
|
|
18251
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "space-y-3", children: [0, 1].map((ticketIndex) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
18071
18252
|
SkeletonRounded,
|
|
18072
18253
|
{
|
|
18073
18254
|
width: "100%",
|
|
@@ -18085,21 +18266,21 @@ var Support = ({
|
|
|
18085
18266
|
onTicketCreated,
|
|
18086
18267
|
onTicketClosed
|
|
18087
18268
|
}) => {
|
|
18088
|
-
const [activeTab, setActiveTab] = (0,
|
|
18089
|
-
const [selectedProblem, setSelectedProblem] = (0,
|
|
18090
|
-
const [statusFilter, setStatusFilter] = (0,
|
|
18091
|
-
const [categoryFilter, setCategoryFilter] = (0,
|
|
18092
|
-
const [selectedTicket, setSelectedTicket] = (0,
|
|
18269
|
+
const [activeTab, setActiveTab] = (0, import_react59.useState)("criar-pedido");
|
|
18270
|
+
const [selectedProblem, setSelectedProblem] = (0, import_react59.useState)(null);
|
|
18271
|
+
const [statusFilter, setStatusFilter] = (0, import_react59.useState)("todos");
|
|
18272
|
+
const [categoryFilter, setCategoryFilter] = (0, import_react59.useState)("todos");
|
|
18273
|
+
const [selectedTicket, setSelectedTicket] = (0, import_react59.useState)(
|
|
18093
18274
|
null
|
|
18094
18275
|
);
|
|
18095
|
-
const [isModalOpen, setIsModalOpen] = (0,
|
|
18096
|
-
const [submitError, setSubmitError] = (0,
|
|
18097
|
-
const [showSuccessToast, setShowSuccessToast] = (0,
|
|
18098
|
-
const [showCloseSuccessToast, setShowCloseSuccessToast] = (0,
|
|
18099
|
-
const [showCloseErrorToast, setShowCloseErrorToast] = (0,
|
|
18100
|
-
const [allTickets, setAllTickets] = (0,
|
|
18101
|
-
const [loadingTickets, setLoadingTickets] = (0,
|
|
18102
|
-
const [currentPage, setCurrentPage] = (0,
|
|
18276
|
+
const [isModalOpen, setIsModalOpen] = (0, import_react59.useState)(false);
|
|
18277
|
+
const [submitError, setSubmitError] = (0, import_react59.useState)(null);
|
|
18278
|
+
const [showSuccessToast, setShowSuccessToast] = (0, import_react59.useState)(false);
|
|
18279
|
+
const [showCloseSuccessToast, setShowCloseSuccessToast] = (0, import_react59.useState)(false);
|
|
18280
|
+
const [showCloseErrorToast, setShowCloseErrorToast] = (0, import_react59.useState)(false);
|
|
18281
|
+
const [allTickets, setAllTickets] = (0, import_react59.useState)([]);
|
|
18282
|
+
const [loadingTickets, setLoadingTickets] = (0, import_react59.useState)(false);
|
|
18283
|
+
const [currentPage, setCurrentPage] = (0, import_react59.useState)(1);
|
|
18103
18284
|
const ITEMS_PER_PAGE = 10;
|
|
18104
18285
|
const handlePrevPage = () => {
|
|
18105
18286
|
if (currentPage > 1) {
|
|
@@ -18112,13 +18293,13 @@ var Support = ({
|
|
|
18112
18293
|
setCurrentPage(currentPage + 1);
|
|
18113
18294
|
}
|
|
18114
18295
|
};
|
|
18115
|
-
(0,
|
|
18296
|
+
(0, import_react59.useEffect)(() => {
|
|
18116
18297
|
if (activeTab === "historico") {
|
|
18117
18298
|
fetchTickets(statusFilter);
|
|
18118
18299
|
setCurrentPage(1);
|
|
18119
18300
|
}
|
|
18120
18301
|
}, [activeTab, statusFilter]);
|
|
18121
|
-
(0,
|
|
18302
|
+
(0, import_react59.useEffect)(() => {
|
|
18122
18303
|
setCurrentPage(1);
|
|
18123
18304
|
}, [categoryFilter]);
|
|
18124
18305
|
const convertApiTicketToComponent = (apiTicket) => {
|
|
@@ -18248,25 +18429,25 @@ var Support = ({
|
|
|
18248
18429
|
{
|
|
18249
18430
|
id: "tecnico" /* TECNICO */,
|
|
18250
18431
|
title: "T\xE9cnico",
|
|
18251
|
-
icon: /* @__PURE__ */ (0,
|
|
18432
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react60.BugIcon, { size: 24 })
|
|
18252
18433
|
},
|
|
18253
18434
|
{
|
|
18254
18435
|
id: "acesso" /* ACESSO */,
|
|
18255
18436
|
title: "Acesso",
|
|
18256
|
-
icon: /* @__PURE__ */ (0,
|
|
18437
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react60.KeyIcon, { size: 24 })
|
|
18257
18438
|
},
|
|
18258
18439
|
{
|
|
18259
18440
|
id: "outros" /* OUTROS */,
|
|
18260
18441
|
title: "Outros",
|
|
18261
|
-
icon: /* @__PURE__ */ (0,
|
|
18442
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react60.InfoIcon, { size: 24 })
|
|
18262
18443
|
}
|
|
18263
18444
|
];
|
|
18264
18445
|
const emptyImage = emptyStateImage || suporthistory_default;
|
|
18265
|
-
return /* @__PURE__ */ (0,
|
|
18266
|
-
/* @__PURE__ */ (0,
|
|
18267
|
-
/* @__PURE__ */ (0,
|
|
18268
|
-
/* @__PURE__ */ (0,
|
|
18269
|
-
/* @__PURE__ */ (0,
|
|
18446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex flex-col w-full h-full relative justify-start items-center mb-5 overflow-y-auto", children: [
|
|
18447
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "flex flex-col w-full h-full max-w-[992px] z-10 lg:px-0 px-4", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "space-y-4", children: [
|
|
18448
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex w-full mb-4 flex-row items-center justify-between not-lg:gap-4 lg:gap-6", children: [
|
|
18449
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("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 }),
|
|
18450
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "sm:flex-shrink-0 sm:self-end", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
18270
18451
|
Menu_default,
|
|
18271
18452
|
{
|
|
18272
18453
|
value: activeTab,
|
|
@@ -18274,8 +18455,8 @@ var Support = ({
|
|
|
18274
18455
|
variant: "menu2",
|
|
18275
18456
|
onValueChange: (value) => setActiveTab(value),
|
|
18276
18457
|
className: "bg-transparent shadow-none px-0",
|
|
18277
|
-
children: /* @__PURE__ */ (0,
|
|
18278
|
-
/* @__PURE__ */ (0,
|
|
18458
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(MenuContent, { variant: "menu2", children: [
|
|
18459
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
18279
18460
|
MenuItem,
|
|
18280
18461
|
{
|
|
18281
18462
|
variant: "menu2",
|
|
@@ -18284,7 +18465,7 @@ var Support = ({
|
|
|
18284
18465
|
children: "Criar Pedido"
|
|
18285
18466
|
}
|
|
18286
18467
|
),
|
|
18287
|
-
/* @__PURE__ */ (0,
|
|
18468
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
18288
18469
|
MenuItem,
|
|
18289
18470
|
{
|
|
18290
18471
|
variant: "menu2",
|
|
@@ -18297,9 +18478,9 @@ var Support = ({
|
|
|
18297
18478
|
}
|
|
18298
18479
|
) })
|
|
18299
18480
|
] }),
|
|
18300
|
-
activeTab === "criar-pedido" && /* @__PURE__ */ (0,
|
|
18301
|
-
/* @__PURE__ */ (0,
|
|
18302
|
-
/* @__PURE__ */ (0,
|
|
18481
|
+
activeTab === "criar-pedido" && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "space-y-2", children: [
|
|
18482
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Text_default, { as: "h2", size: "md", weight: "bold", className: "text-text-900", children: "Selecione o tipo de problema" }),
|
|
18483
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "flex flex-col sm:flex-row gap-2 sm:gap-4", children: problemTypes.map((type) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
18303
18484
|
SelectionButton_default,
|
|
18304
18485
|
{
|
|
18305
18486
|
icon: type.icon,
|
|
@@ -18310,10 +18491,10 @@ var Support = ({
|
|
|
18310
18491
|
},
|
|
18311
18492
|
type.id
|
|
18312
18493
|
)) }),
|
|
18313
|
-
errors.problemType && /* @__PURE__ */ (0,
|
|
18494
|
+
errors.problemType && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Text_default, { size: "sm", className: "text-red-500 mt-1", children: errors.problemType.message })
|
|
18314
18495
|
] }),
|
|
18315
|
-
selectedProblem && activeTab === "criar-pedido" && /* @__PURE__ */ (0,
|
|
18316
|
-
/* @__PURE__ */ (0,
|
|
18496
|
+
selectedProblem && activeTab === "criar-pedido" && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("form", { onSubmit: handleSubmit(onSubmit), className: "space-y-4", children: [
|
|
18497
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
18317
18498
|
Input_default,
|
|
18318
18499
|
{
|
|
18319
18500
|
size: "large",
|
|
@@ -18324,7 +18505,7 @@ var Support = ({
|
|
|
18324
18505
|
errorMessage: errors.title?.message
|
|
18325
18506
|
}
|
|
18326
18507
|
) }),
|
|
18327
|
-
/* @__PURE__ */ (0,
|
|
18508
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
18328
18509
|
TextArea_default,
|
|
18329
18510
|
{
|
|
18330
18511
|
size: "large",
|
|
@@ -18334,7 +18515,7 @@ var Support = ({
|
|
|
18334
18515
|
errorMessage: errors.description?.message
|
|
18335
18516
|
}
|
|
18336
18517
|
) }),
|
|
18337
|
-
/* @__PURE__ */ (0,
|
|
18518
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
18338
18519
|
Button_default,
|
|
18339
18520
|
{
|
|
18340
18521
|
size: "large",
|
|
@@ -18344,11 +18525,11 @@ var Support = ({
|
|
|
18344
18525
|
children: isSubmitting ? "Enviando..." : "Enviar Pedido"
|
|
18345
18526
|
}
|
|
18346
18527
|
),
|
|
18347
|
-
submitError && /* @__PURE__ */ (0,
|
|
18528
|
+
submitError && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "mt-4 p-4 bg-red-100 border border-red-400 text-red-700 rounded", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Text_default, { size: "sm", className: "text-red-700", children: submitError }) })
|
|
18348
18529
|
] }),
|
|
18349
|
-
activeTab === "historico" && /* @__PURE__ */ (0,
|
|
18350
|
-
/* @__PURE__ */ (0,
|
|
18351
|
-
/* @__PURE__ */ (0,
|
|
18530
|
+
activeTab === "historico" && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "space-y-6", children: [
|
|
18531
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex gap-4", children: [
|
|
18532
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "flex flex-col flex-1/2 space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
18352
18533
|
Select_default,
|
|
18353
18534
|
{
|
|
18354
18535
|
label: "Status",
|
|
@@ -18356,17 +18537,17 @@ var Support = ({
|
|
|
18356
18537
|
value: statusFilter,
|
|
18357
18538
|
onValueChange: setStatusFilter,
|
|
18358
18539
|
children: [
|
|
18359
|
-
/* @__PURE__ */ (0,
|
|
18360
|
-
/* @__PURE__ */ (0,
|
|
18361
|
-
/* @__PURE__ */ (0,
|
|
18362
|
-
/* @__PURE__ */ (0,
|
|
18363
|
-
/* @__PURE__ */ (0,
|
|
18364
|
-
/* @__PURE__ */ (0,
|
|
18540
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SelectTrigger, { variant: "rounded", className: "", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SelectValue, { placeholder: "Todos" }) }),
|
|
18541
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(SelectContent, { children: [
|
|
18542
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SelectItem, { value: "todos", children: "Todos" }),
|
|
18543
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SelectItem, { value: "aberto" /* ABERTO */, children: "Aberto" }),
|
|
18544
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SelectItem, { value: "respondido" /* RESPONDIDO */, children: "Respondido" }),
|
|
18545
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SelectItem, { value: "encerrado" /* ENCERRADO */, children: "Encerrado" })
|
|
18365
18546
|
] })
|
|
18366
18547
|
]
|
|
18367
18548
|
}
|
|
18368
18549
|
) }),
|
|
18369
|
-
/* @__PURE__ */ (0,
|
|
18550
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "flex flex-col flex-1/2 space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
18370
18551
|
Select_default,
|
|
18371
18552
|
{
|
|
18372
18553
|
label: "Tipo",
|
|
@@ -18374,19 +18555,19 @@ var Support = ({
|
|
|
18374
18555
|
value: categoryFilter,
|
|
18375
18556
|
onValueChange: setCategoryFilter,
|
|
18376
18557
|
children: [
|
|
18377
|
-
/* @__PURE__ */ (0,
|
|
18378
|
-
/* @__PURE__ */ (0,
|
|
18379
|
-
/* @__PURE__ */ (0,
|
|
18380
|
-
/* @__PURE__ */ (0,
|
|
18381
|
-
/* @__PURE__ */ (0,
|
|
18558
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SelectTrigger, { variant: "rounded", className: "", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SelectValue, { placeholder: "Todos" }) }),
|
|
18559
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(SelectContent, { children: [
|
|
18560
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SelectItem, { value: "todos", children: "Todos" }),
|
|
18561
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(SelectItem, { value: "tecnico" /* TECNICO */, children: [
|
|
18562
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react60.BugIcon, { size: 16 }),
|
|
18382
18563
|
" T\xE9cnico"
|
|
18383
18564
|
] }),
|
|
18384
|
-
/* @__PURE__ */ (0,
|
|
18385
|
-
/* @__PURE__ */ (0,
|
|
18565
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(SelectItem, { value: "acesso" /* ACESSO */, children: [
|
|
18566
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react60.KeyIcon, { size: 16 }),
|
|
18386
18567
|
" Acesso"
|
|
18387
18568
|
] }),
|
|
18388
|
-
/* @__PURE__ */ (0,
|
|
18389
|
-
/* @__PURE__ */ (0,
|
|
18569
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(SelectItem, { value: "outros" /* OUTROS */, children: [
|
|
18570
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react60.InfoIcon, { size: 16 }),
|
|
18390
18571
|
" Outros"
|
|
18391
18572
|
] })
|
|
18392
18573
|
] })
|
|
@@ -18396,14 +18577,14 @@ var Support = ({
|
|
|
18396
18577
|
] }),
|
|
18397
18578
|
(() => {
|
|
18398
18579
|
if (loadingTickets) {
|
|
18399
|
-
return /* @__PURE__ */ (0,
|
|
18580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(TicketSkeleton, {});
|
|
18400
18581
|
}
|
|
18401
18582
|
if (Object.keys(groupedTickets).length === 0) {
|
|
18402
|
-
return /* @__PURE__ */ (0,
|
|
18583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(EmptyState2, { imageSrc: emptyImage });
|
|
18403
18584
|
}
|
|
18404
|
-
return /* @__PURE__ */ (0,
|
|
18585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "space-y-6", children: Object.entries(groupedTickets).sort(
|
|
18405
18586
|
([a], [b]) => new Date(b).getTime() - new Date(a).getTime()
|
|
18406
|
-
).map(([date, tickets]) => /* @__PURE__ */ (0,
|
|
18587
|
+
).map(([date, tickets]) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
18407
18588
|
TicketGroup,
|
|
18408
18589
|
{
|
|
18409
18590
|
date,
|
|
@@ -18413,8 +18594,8 @@ var Support = ({
|
|
|
18413
18594
|
date
|
|
18414
18595
|
)) });
|
|
18415
18596
|
})(),
|
|
18416
|
-
!loadingTickets && totalPages > 1 && /* @__PURE__ */ (0,
|
|
18417
|
-
/* @__PURE__ */ (0,
|
|
18597
|
+
!loadingTickets && totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex justify-center items-center gap-4 mt-6", children: [
|
|
18598
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
18418
18599
|
Button_default,
|
|
18419
18600
|
{
|
|
18420
18601
|
variant: "outline",
|
|
@@ -18424,13 +18605,13 @@ var Support = ({
|
|
|
18424
18605
|
children: "Anterior"
|
|
18425
18606
|
}
|
|
18426
18607
|
),
|
|
18427
|
-
/* @__PURE__ */ (0,
|
|
18608
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(Text_default, { size: "sm", className: "text-text-600", children: [
|
|
18428
18609
|
"P\xE1gina ",
|
|
18429
18610
|
currentPage,
|
|
18430
18611
|
" de ",
|
|
18431
18612
|
totalPages
|
|
18432
18613
|
] }),
|
|
18433
|
-
/* @__PURE__ */ (0,
|
|
18614
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
18434
18615
|
Button_default,
|
|
18435
18616
|
{
|
|
18436
18617
|
variant: "outline",
|
|
@@ -18443,7 +18624,7 @@ var Support = ({
|
|
|
18443
18624
|
] })
|
|
18444
18625
|
] })
|
|
18445
18626
|
] }) }),
|
|
18446
|
-
selectedTicket && /* @__PURE__ */ (0,
|
|
18627
|
+
selectedTicket && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
18447
18628
|
TicketModal,
|
|
18448
18629
|
{
|
|
18449
18630
|
ticket: selectedTicket,
|
|
@@ -18454,7 +18635,7 @@ var Support = ({
|
|
|
18454
18635
|
userId
|
|
18455
18636
|
}
|
|
18456
18637
|
),
|
|
18457
|
-
showSuccessToast && /* @__PURE__ */ (0,
|
|
18638
|
+
showSuccessToast && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "fixed top-4 left-1/2 transform -translate-x-1/2 z-50", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
18458
18639
|
Toast_default,
|
|
18459
18640
|
{
|
|
18460
18641
|
title: "Pedido enviado!",
|
|
@@ -18463,7 +18644,7 @@ var Support = ({
|
|
|
18463
18644
|
onClose: () => setShowSuccessToast(false)
|
|
18464
18645
|
}
|
|
18465
18646
|
) }),
|
|
18466
|
-
showCloseSuccessToast && /* @__PURE__ */ (0,
|
|
18647
|
+
showCloseSuccessToast && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "fixed top-4 left-1/2 transform -translate-x-1/2 z-50", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
18467
18648
|
Toast_default,
|
|
18468
18649
|
{
|
|
18469
18650
|
title: "Pedido encerrado!",
|
|
@@ -18472,7 +18653,7 @@ var Support = ({
|
|
|
18472
18653
|
onClose: () => setShowCloseSuccessToast(false)
|
|
18473
18654
|
}
|
|
18474
18655
|
) }),
|
|
18475
|
-
showCloseErrorToast && /* @__PURE__ */ (0,
|
|
18656
|
+
showCloseErrorToast && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "fixed top-4 left-1/2 transform -translate-x-1/2 z-50", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
18476
18657
|
Toast_default,
|
|
18477
18658
|
{
|
|
18478
18659
|
title: "Erro ao encerrar pedido",
|
|
@@ -18489,6 +18670,7 @@ var Support_default = Support;
|
|
|
18489
18670
|
0 && (module.exports = {
|
|
18490
18671
|
ANSWER_STATUS,
|
|
18491
18672
|
AccordionGroup,
|
|
18673
|
+
ActivityCardQuestionBanks,
|
|
18492
18674
|
ActivityDetails,
|
|
18493
18675
|
ActivityFilters,
|
|
18494
18676
|
ActivityFiltersPopover,
|