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.mjs
CHANGED
|
@@ -16952,6 +16952,186 @@ function useAppContent(config) {
|
|
|
16952
16952
|
};
|
|
16953
16953
|
}
|
|
16954
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
|
+
|
|
16955
17135
|
// src/types/activityDetails.ts
|
|
16956
17136
|
var STUDENT_ACTIVITY_STATUS = {
|
|
16957
17137
|
CONCLUIDO: "CONCLUIDO",
|
|
@@ -17003,9 +17183,9 @@ var formatDateToBrazilian = (dateString) => {
|
|
|
17003
17183
|
};
|
|
17004
17184
|
|
|
17005
17185
|
// src/components/ActivityDetails/ActivityDetails.tsx
|
|
17006
|
-
import { useState as useState34, useMemo as
|
|
17186
|
+
import { useState as useState34, useMemo as useMemo19, useCallback as useCallback12, useEffect as useEffect36 } from "react";
|
|
17007
17187
|
import { Medal as Medal2, Star as Star2, File as File2, CaretRight as CaretRight9, WarningCircle as WarningCircle7 } from "phosphor-react";
|
|
17008
|
-
import { Fragment as Fragment17, jsx as
|
|
17188
|
+
import { Fragment as Fragment17, jsx as jsx74, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
17009
17189
|
var createTableColumns = (onCorrectActivity) => [
|
|
17010
17190
|
{
|
|
17011
17191
|
key: "studentName",
|
|
@@ -17013,9 +17193,9 @@ var createTableColumns = (onCorrectActivity) => [
|
|
|
17013
17193
|
sortable: true,
|
|
17014
17194
|
render: (value) => {
|
|
17015
17195
|
const name = typeof value === "string" ? value : "";
|
|
17016
|
-
return /* @__PURE__ */
|
|
17017
|
-
/* @__PURE__ */
|
|
17018
|
-
/* @__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 })
|
|
17019
17199
|
] });
|
|
17020
17200
|
}
|
|
17021
17201
|
},
|
|
@@ -17025,7 +17205,7 @@ var createTableColumns = (onCorrectActivity) => [
|
|
|
17025
17205
|
sortable: false,
|
|
17026
17206
|
render: (value) => {
|
|
17027
17207
|
const config = getStatusBadgeConfig(value);
|
|
17028
|
-
return /* @__PURE__ */
|
|
17208
|
+
return /* @__PURE__ */ jsx74(
|
|
17029
17209
|
Badge_default,
|
|
17030
17210
|
{
|
|
17031
17211
|
className: `${config.bgColor} ${config.textColor} text-xs px-2 py-1`,
|
|
@@ -17040,22 +17220,22 @@ var createTableColumns = (onCorrectActivity) => [
|
|
|
17040
17220
|
sortable: true,
|
|
17041
17221
|
render: (value) => {
|
|
17042
17222
|
if (!value || typeof value !== "string") {
|
|
17043
|
-
return /* @__PURE__ */
|
|
17223
|
+
return /* @__PURE__ */ jsx74(Text_default, { className: "text-sm text-text-400", children: "-" });
|
|
17044
17224
|
}
|
|
17045
|
-
return /* @__PURE__ */
|
|
17225
|
+
return /* @__PURE__ */ jsx74(Text_default, { className: "text-sm text-text-700", children: formatDateToBrazilian(value) });
|
|
17046
17226
|
}
|
|
17047
17227
|
},
|
|
17048
17228
|
{
|
|
17049
17229
|
key: "timeSpent",
|
|
17050
17230
|
label: "Dura\xE7\xE3o",
|
|
17051
17231
|
sortable: false,
|
|
17052
|
-
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: "-" })
|
|
17053
17233
|
},
|
|
17054
17234
|
{
|
|
17055
17235
|
key: "score",
|
|
17056
17236
|
label: "Nota",
|
|
17057
17237
|
sortable: true,
|
|
17058
|
-
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) })
|
|
17059
17239
|
},
|
|
17060
17240
|
{
|
|
17061
17241
|
key: "actions",
|
|
@@ -17063,7 +17243,7 @@ var createTableColumns = (onCorrectActivity) => [
|
|
|
17063
17243
|
sortable: false,
|
|
17064
17244
|
render: (_value, row) => {
|
|
17065
17245
|
if (row.status === STUDENT_ACTIVITY_STATUS.AGUARDANDO_CORRECAO) {
|
|
17066
|
-
return /* @__PURE__ */
|
|
17246
|
+
return /* @__PURE__ */ jsx74(
|
|
17067
17247
|
Button_default,
|
|
17068
17248
|
{
|
|
17069
17249
|
variant: "outline",
|
|
@@ -17075,7 +17255,7 @@ var createTableColumns = (onCorrectActivity) => [
|
|
|
17075
17255
|
);
|
|
17076
17256
|
}
|
|
17077
17257
|
if (row.status === STUDENT_ACTIVITY_STATUS.CONCLUIDO || row.status === STUDENT_ACTIVITY_STATUS.NAO_ENTREGUE) {
|
|
17078
|
-
return /* @__PURE__ */
|
|
17258
|
+
return /* @__PURE__ */ jsx74(
|
|
17079
17259
|
Button_default,
|
|
17080
17260
|
{
|
|
17081
17261
|
variant: "link",
|
|
@@ -17177,7 +17357,7 @@ var ActivityDetails = ({
|
|
|
17177
17357
|
},
|
|
17178
17358
|
[activityId, correctionData?.studentId, submitObservation]
|
|
17179
17359
|
);
|
|
17180
|
-
const tableData =
|
|
17360
|
+
const tableData = useMemo19(() => {
|
|
17181
17361
|
if (!data?.students) return [];
|
|
17182
17362
|
return data.students.map((student) => ({
|
|
17183
17363
|
id: student.studentId,
|
|
@@ -17189,7 +17369,7 @@ var ActivityDetails = ({
|
|
|
17189
17369
|
score: student.score
|
|
17190
17370
|
}));
|
|
17191
17371
|
}, [data?.students]);
|
|
17192
|
-
const columns =
|
|
17372
|
+
const columns = useMemo19(
|
|
17193
17373
|
() => createTableColumns(handleCorrectActivity),
|
|
17194
17374
|
[handleCorrectActivity]
|
|
17195
17375
|
);
|
|
@@ -17221,10 +17401,10 @@ var ActivityDetails = ({
|
|
|
17221
17401
|
const subjectEnum = data?.activity.subjectName && mapSubjectNameToEnum ? mapSubjectNameToEnum(data.activity.subjectName) : null;
|
|
17222
17402
|
const subjectInfo = subjectEnum ? getSubjectInfo(subjectEnum) : null;
|
|
17223
17403
|
if (loading && !data) {
|
|
17224
|
-
return /* @__PURE__ */
|
|
17225
|
-
/* @__PURE__ */
|
|
17226
|
-
/* @__PURE__ */
|
|
17227
|
-
/* @__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(
|
|
17228
17408
|
"div",
|
|
17229
17409
|
{
|
|
17230
17410
|
className: cn(
|
|
@@ -17237,14 +17417,14 @@ var ActivityDetails = ({
|
|
|
17237
17417
|
"pending",
|
|
17238
17418
|
"avg-score",
|
|
17239
17419
|
"avg-time"
|
|
17240
|
-
].map((id) => /* @__PURE__ */
|
|
17420
|
+
].map((id) => /* @__PURE__ */ jsx74(SkeletonRounded, { className: "w-full h-[150px]" }, id))
|
|
17241
17421
|
}
|
|
17242
17422
|
),
|
|
17243
|
-
/* @__PURE__ */
|
|
17423
|
+
/* @__PURE__ */ jsx74("div", { className: "w-full bg-background rounded-xl p-6", children: /* @__PURE__ */ jsx74(SkeletonTable, { rows: 5, columns: 6, showHeader: true }) })
|
|
17244
17424
|
] }) });
|
|
17245
17425
|
}
|
|
17246
17426
|
if (error || !data) {
|
|
17247
|
-
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(
|
|
17248
17428
|
EmptyState_default,
|
|
17249
17429
|
{
|
|
17250
17430
|
image: emptyStateImage,
|
|
@@ -17253,10 +17433,10 @@ var ActivityDetails = ({
|
|
|
17253
17433
|
}
|
|
17254
17434
|
) }) });
|
|
17255
17435
|
}
|
|
17256
|
-
return /* @__PURE__ */
|
|
17257
|
-
/* @__PURE__ */
|
|
17258
|
-
/* @__PURE__ */
|
|
17259
|
-
/* @__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(
|
|
17260
17440
|
"button",
|
|
17261
17441
|
{
|
|
17262
17442
|
onClick: handleBack,
|
|
@@ -17264,31 +17444,31 @@ var ActivityDetails = ({
|
|
|
17264
17444
|
children: "Atividades"
|
|
17265
17445
|
}
|
|
17266
17446
|
),
|
|
17267
|
-
/* @__PURE__ */
|
|
17268
|
-
/* @__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 })
|
|
17269
17449
|
] }),
|
|
17270
|
-
/* @__PURE__ */
|
|
17271
|
-
/* @__PURE__ */
|
|
17272
|
-
/* @__PURE__ */
|
|
17273
|
-
/* @__PURE__ */
|
|
17274
|
-
/* @__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: [
|
|
17275
17455
|
"In\xEDcio",
|
|
17276
17456
|
" ",
|
|
17277
17457
|
data.activity.startDate ? formatDateToBrazilian(data.activity.startDate) : "00/00/0000"
|
|
17278
17458
|
] }),
|
|
17279
|
-
/* @__PURE__ */
|
|
17280
|
-
/* @__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: [
|
|
17281
17461
|
"Prazo final",
|
|
17282
17462
|
" ",
|
|
17283
17463
|
data.activity.finalDate ? formatDateToBrazilian(data.activity.finalDate) : "00/00/0000"
|
|
17284
17464
|
] }),
|
|
17285
|
-
/* @__PURE__ */
|
|
17286
|
-
/* @__PURE__ */
|
|
17287
|
-
/* @__PURE__ */
|
|
17288
|
-
/* @__PURE__ */
|
|
17289
|
-
/* @__PURE__ */
|
|
17290
|
-
subjectInfo ? /* @__PURE__ */
|
|
17291
|
-
/* @__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(
|
|
17292
17472
|
"span",
|
|
17293
17473
|
{
|
|
17294
17474
|
className: cn(
|
|
@@ -17298,33 +17478,33 @@ var ActivityDetails = ({
|
|
|
17298
17478
|
children: subjectInfo.icon
|
|
17299
17479
|
}
|
|
17300
17480
|
),
|
|
17301
|
-
/* @__PURE__ */
|
|
17302
|
-
] }) : /* @__PURE__ */
|
|
17303
|
-
/* @__PURE__ */
|
|
17304
|
-
/* @__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 })
|
|
17305
17485
|
] })
|
|
17306
17486
|
] }),
|
|
17307
|
-
/* @__PURE__ */
|
|
17487
|
+
/* @__PURE__ */ jsxs58(
|
|
17308
17488
|
Button_default,
|
|
17309
17489
|
{
|
|
17310
17490
|
size: "small",
|
|
17311
17491
|
onClick: handleViewActivity,
|
|
17312
17492
|
className: "bg-primary-950 text-text gap-2",
|
|
17313
17493
|
children: [
|
|
17314
|
-
/* @__PURE__ */
|
|
17494
|
+
/* @__PURE__ */ jsx74(File2, { size: 16 }),
|
|
17315
17495
|
"Ver atividade"
|
|
17316
17496
|
]
|
|
17317
17497
|
}
|
|
17318
17498
|
)
|
|
17319
17499
|
] }) }),
|
|
17320
|
-
/* @__PURE__ */
|
|
17500
|
+
/* @__PURE__ */ jsxs58(
|
|
17321
17501
|
"div",
|
|
17322
17502
|
{
|
|
17323
17503
|
className: cn("grid gap-5", isMobile ? "grid-cols-2" : "grid-cols-5"),
|
|
17324
17504
|
children: [
|
|
17325
|
-
/* @__PURE__ */
|
|
17326
|
-
/* @__PURE__ */
|
|
17327
|
-
/* @__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(
|
|
17328
17508
|
"circle",
|
|
17329
17509
|
{
|
|
17330
17510
|
cx: "45",
|
|
@@ -17335,7 +17515,7 @@ var ActivityDetails = ({
|
|
|
17335
17515
|
fill: "none"
|
|
17336
17516
|
}
|
|
17337
17517
|
),
|
|
17338
|
-
/* @__PURE__ */
|
|
17518
|
+
/* @__PURE__ */ jsx74(
|
|
17339
17519
|
"circle",
|
|
17340
17520
|
{
|
|
17341
17521
|
cx: "45",
|
|
@@ -17349,26 +17529,26 @@ var ActivityDetails = ({
|
|
|
17349
17529
|
}
|
|
17350
17530
|
)
|
|
17351
17531
|
] }),
|
|
17352
|
-
/* @__PURE__ */
|
|
17353
|
-
/* @__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: [
|
|
17354
17534
|
Math.round(data.generalStats.completionPercentage),
|
|
17355
17535
|
"%"
|
|
17356
17536
|
] }),
|
|
17357
|
-
/* @__PURE__ */
|
|
17537
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-2xs font-bold text-text-600 uppercase", children: "Conclu\xEDdo" })
|
|
17358
17538
|
] })
|
|
17359
17539
|
] }) }),
|
|
17360
|
-
/* @__PURE__ */
|
|
17361
|
-
/* @__PURE__ */
|
|
17362
|
-
/* @__PURE__ */
|
|
17363
|
-
/* @__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) })
|
|
17364
17544
|
] }),
|
|
17365
|
-
/* @__PURE__ */
|
|
17366
|
-
/* @__PURE__ */
|
|
17367
|
-
/* @__PURE__ */
|
|
17368
|
-
/* @__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) })
|
|
17369
17549
|
] }),
|
|
17370
|
-
/* @__PURE__ */
|
|
17371
|
-
/* @__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(
|
|
17372
17552
|
WarningCircle7,
|
|
17373
17553
|
{
|
|
17374
17554
|
size: 16,
|
|
@@ -17376,11 +17556,11 @@ var ActivityDetails = ({
|
|
|
17376
17556
|
weight: "regular"
|
|
17377
17557
|
}
|
|
17378
17558
|
) }),
|
|
17379
|
-
/* @__PURE__ */
|
|
17380
|
-
/* @__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) })
|
|
17381
17561
|
] }),
|
|
17382
|
-
/* @__PURE__ */
|
|
17383
|
-
/* @__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(
|
|
17384
17564
|
WarningCircle7,
|
|
17385
17565
|
{
|
|
17386
17566
|
size: 16,
|
|
@@ -17388,17 +17568,17 @@ var ActivityDetails = ({
|
|
|
17388
17568
|
weight: "regular"
|
|
17389
17569
|
}
|
|
17390
17570
|
) }),
|
|
17391
|
-
/* @__PURE__ */
|
|
17392
|
-
/* @__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) })
|
|
17393
17573
|
] })
|
|
17394
17574
|
]
|
|
17395
17575
|
}
|
|
17396
17576
|
),
|
|
17397
|
-
correctionError && /* @__PURE__ */
|
|
17398
|
-
/* @__PURE__ */
|
|
17399
|
-
/* @__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 })
|
|
17400
17580
|
] }),
|
|
17401
|
-
/* @__PURE__ */
|
|
17581
|
+
/* @__PURE__ */ jsx74("div", { className: "w-full bg-background rounded-xl p-6 space-y-4", children: /* @__PURE__ */ jsx74(
|
|
17402
17582
|
TableProvider,
|
|
17403
17583
|
{
|
|
17404
17584
|
data: tableData,
|
|
@@ -17415,7 +17595,7 @@ var ActivityDetails = ({
|
|
|
17415
17595
|
totalPages: data.pagination.totalPages
|
|
17416
17596
|
},
|
|
17417
17597
|
emptyState: {
|
|
17418
|
-
component: /* @__PURE__ */
|
|
17598
|
+
component: /* @__PURE__ */ jsx74(
|
|
17419
17599
|
EmptyState_default,
|
|
17420
17600
|
{
|
|
17421
17601
|
image: emptyStateImage,
|
|
@@ -17425,14 +17605,14 @@ var ActivityDetails = ({
|
|
|
17425
17605
|
)
|
|
17426
17606
|
},
|
|
17427
17607
|
onParamsChange: handleTableParamsChange,
|
|
17428
|
-
children: ({ table, pagination }) => /* @__PURE__ */
|
|
17608
|
+
children: ({ table, pagination }) => /* @__PURE__ */ jsxs58(Fragment17, { children: [
|
|
17429
17609
|
table,
|
|
17430
17610
|
pagination
|
|
17431
17611
|
] })
|
|
17432
17612
|
}
|
|
17433
17613
|
) })
|
|
17434
17614
|
] }),
|
|
17435
|
-
/* @__PURE__ */
|
|
17615
|
+
/* @__PURE__ */ jsx74(
|
|
17436
17616
|
CorrectActivityModal_default,
|
|
17437
17617
|
{
|
|
17438
17618
|
isOpen: isModalOpen,
|
|
@@ -17558,36 +17738,36 @@ var mapInternalStatusToApi = (internalStatus) => {
|
|
|
17558
17738
|
|
|
17559
17739
|
// src/components/Support/utils/supportUtils.tsx
|
|
17560
17740
|
import { KeyIcon, BugIcon, InfoIcon } from "@phosphor-icons/react";
|
|
17561
|
-
import { jsx as
|
|
17741
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
17562
17742
|
var getCategoryIcon = (category, size = 16) => {
|
|
17563
17743
|
if (!category) return null;
|
|
17564
17744
|
switch (category) {
|
|
17565
17745
|
case "acesso" /* ACESSO */:
|
|
17566
|
-
return /* @__PURE__ */
|
|
17746
|
+
return /* @__PURE__ */ jsx75(KeyIcon, { size });
|
|
17567
17747
|
case "tecnico" /* TECNICO */:
|
|
17568
|
-
return /* @__PURE__ */
|
|
17748
|
+
return /* @__PURE__ */ jsx75(BugIcon, { size });
|
|
17569
17749
|
case "outros" /* OUTROS */:
|
|
17570
|
-
return /* @__PURE__ */
|
|
17750
|
+
return /* @__PURE__ */ jsx75(InfoIcon, { size });
|
|
17571
17751
|
default:
|
|
17572
|
-
return /* @__PURE__ */
|
|
17752
|
+
return /* @__PURE__ */ jsx75(InfoIcon, { size });
|
|
17573
17753
|
}
|
|
17574
17754
|
};
|
|
17575
17755
|
|
|
17576
17756
|
// src/components/Support/components/TicketModal.tsx
|
|
17577
|
-
import { Fragment as Fragment18, jsx as
|
|
17757
|
+
import { Fragment as Fragment18, jsx as jsx76, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
17578
17758
|
dayjs.locale("pt-br");
|
|
17579
|
-
var AnswerSkeleton = () => /* @__PURE__ */
|
|
17580
|
-
/* @__PURE__ */
|
|
17581
|
-
/* @__PURE__ */
|
|
17582
|
-
/* @__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 })
|
|
17583
17763
|
] }),
|
|
17584
|
-
/* @__PURE__ */
|
|
17585
|
-
/* @__PURE__ */
|
|
17586
|
-
/* @__PURE__ */
|
|
17587
|
-
/* @__PURE__ */
|
|
17588
|
-
/* @__PURE__ */
|
|
17589
|
-
/* @__PURE__ */
|
|
17590
|
-
/* @__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 })
|
|
17591
17771
|
] })
|
|
17592
17772
|
] })
|
|
17593
17773
|
] });
|
|
@@ -17660,8 +17840,8 @@ var TicketModal = ({
|
|
|
17660
17840
|
setAnswers([]);
|
|
17661
17841
|
}
|
|
17662
17842
|
}, [isOpen, fetchAnswers]);
|
|
17663
|
-
return /* @__PURE__ */
|
|
17664
|
-
/* @__PURE__ */
|
|
17843
|
+
return /* @__PURE__ */ jsxs59(Fragment18, { children: [
|
|
17844
|
+
/* @__PURE__ */ jsx76(
|
|
17665
17845
|
Modal_default,
|
|
17666
17846
|
{
|
|
17667
17847
|
isOpen,
|
|
@@ -17671,10 +17851,10 @@ var TicketModal = ({
|
|
|
17671
17851
|
hideCloseButton: false,
|
|
17672
17852
|
closeOnEscape: true,
|
|
17673
17853
|
"data-testid": "ticket-modal",
|
|
17674
|
-
children: /* @__PURE__ */
|
|
17675
|
-
/* @__PURE__ */
|
|
17676
|
-
/* @__PURE__ */
|
|
17677
|
-
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(
|
|
17678
17858
|
Button_default,
|
|
17679
17859
|
{
|
|
17680
17860
|
variant: "outline",
|
|
@@ -17685,10 +17865,10 @@ var TicketModal = ({
|
|
|
17685
17865
|
}
|
|
17686
17866
|
)
|
|
17687
17867
|
] }),
|
|
17688
|
-
/* @__PURE__ */
|
|
17689
|
-
/* @__PURE__ */
|
|
17690
|
-
/* @__PURE__ */
|
|
17691
|
-
/* @__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(
|
|
17692
17872
|
Text_default,
|
|
17693
17873
|
{
|
|
17694
17874
|
size: "md",
|
|
@@ -17697,10 +17877,10 @@ var TicketModal = ({
|
|
|
17697
17877
|
children: "ID"
|
|
17698
17878
|
}
|
|
17699
17879
|
),
|
|
17700
|
-
/* @__PURE__ */
|
|
17880
|
+
/* @__PURE__ */ jsx76(Text_default, { size: "md", weight: "normal", className: "text-text-600", children: ticket.id })
|
|
17701
17881
|
] }),
|
|
17702
|
-
/* @__PURE__ */
|
|
17703
|
-
/* @__PURE__ */
|
|
17882
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-center space-x-6", children: [
|
|
17883
|
+
/* @__PURE__ */ jsx76(
|
|
17704
17884
|
Text_default,
|
|
17705
17885
|
{
|
|
17706
17886
|
size: "md",
|
|
@@ -17709,10 +17889,10 @@ var TicketModal = ({
|
|
|
17709
17889
|
children: "Aberto em"
|
|
17710
17890
|
}
|
|
17711
17891
|
),
|
|
17712
|
-
/* @__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]") })
|
|
17713
17893
|
] }),
|
|
17714
|
-
/* @__PURE__ */
|
|
17715
|
-
/* @__PURE__ */
|
|
17894
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-center space-x-6", children: [
|
|
17895
|
+
/* @__PURE__ */ jsx76(
|
|
17716
17896
|
Text_default,
|
|
17717
17897
|
{
|
|
17718
17898
|
size: "md",
|
|
@@ -17721,7 +17901,7 @@ var TicketModal = ({
|
|
|
17721
17901
|
children: "Status"
|
|
17722
17902
|
}
|
|
17723
17903
|
),
|
|
17724
|
-
/* @__PURE__ */
|
|
17904
|
+
/* @__PURE__ */ jsx76(
|
|
17725
17905
|
Badge_default,
|
|
17726
17906
|
{
|
|
17727
17907
|
variant: "solid",
|
|
@@ -17732,8 +17912,8 @@ var TicketModal = ({
|
|
|
17732
17912
|
}
|
|
17733
17913
|
)
|
|
17734
17914
|
] }),
|
|
17735
|
-
/* @__PURE__ */
|
|
17736
|
-
/* @__PURE__ */
|
|
17915
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-center space-x-6", children: [
|
|
17916
|
+
/* @__PURE__ */ jsx76(
|
|
17737
17917
|
Text_default,
|
|
17738
17918
|
{
|
|
17739
17919
|
size: "md",
|
|
@@ -17742,7 +17922,7 @@ var TicketModal = ({
|
|
|
17742
17922
|
children: "Tipo"
|
|
17743
17923
|
}
|
|
17744
17924
|
),
|
|
17745
|
-
/* @__PURE__ */
|
|
17925
|
+
/* @__PURE__ */ jsxs59(
|
|
17746
17926
|
Badge_default,
|
|
17747
17927
|
{
|
|
17748
17928
|
variant: "solid",
|
|
@@ -17756,9 +17936,9 @@ var TicketModal = ({
|
|
|
17756
17936
|
}
|
|
17757
17937
|
)
|
|
17758
17938
|
] }),
|
|
17759
|
-
/* @__PURE__ */
|
|
17760
|
-
/* @__PURE__ */
|
|
17761
|
-
/* @__PURE__ */
|
|
17939
|
+
/* @__PURE__ */ jsx76(Divider_default, {}),
|
|
17940
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-start space-x-6", children: [
|
|
17941
|
+
/* @__PURE__ */ jsx76(
|
|
17762
17942
|
Text_default,
|
|
17763
17943
|
{
|
|
17764
17944
|
size: "md",
|
|
@@ -17767,24 +17947,24 @@ var TicketModal = ({
|
|
|
17767
17947
|
children: "Descri\xE7\xE3o"
|
|
17768
17948
|
}
|
|
17769
17949
|
),
|
|
17770
|
-
ticket.description && /* @__PURE__ */
|
|
17950
|
+
ticket.description && /* @__PURE__ */ jsx76(Text_default, { size: "md", weight: "normal", className: "text-text-600", children: ticket.description })
|
|
17771
17951
|
] })
|
|
17772
17952
|
] }),
|
|
17773
|
-
ticket.status === "respondido" /* RESPONDIDO */ && isLoadingAnswers && /* @__PURE__ */
|
|
17774
|
-
/* @__PURE__ */
|
|
17775
|
-
/* @__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, {})
|
|
17776
17956
|
] }),
|
|
17777
|
-
!isLoadingAnswers && answers.some((answer) => answer.userId !== userId) && /* @__PURE__ */
|
|
17778
|
-
/* @__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" }),
|
|
17779
17959
|
answers.filter((answer) => answer.userId !== userId).sort(
|
|
17780
17960
|
(a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()
|
|
17781
|
-
).slice(0, 1).map((answer) => /* @__PURE__ */
|
|
17961
|
+
).slice(0, 1).map((answer) => /* @__PURE__ */ jsxs59(
|
|
17782
17962
|
"div",
|
|
17783
17963
|
{
|
|
17784
17964
|
className: "bg-background p-4 space-y-6 rounded-xl",
|
|
17785
17965
|
children: [
|
|
17786
|
-
/* @__PURE__ */
|
|
17787
|
-
/* @__PURE__ */
|
|
17966
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-center space-x-6", children: [
|
|
17967
|
+
/* @__PURE__ */ jsx76(
|
|
17788
17968
|
Text_default,
|
|
17789
17969
|
{
|
|
17790
17970
|
size: "md",
|
|
@@ -17793,7 +17973,7 @@ var TicketModal = ({
|
|
|
17793
17973
|
children: "Recebido"
|
|
17794
17974
|
}
|
|
17795
17975
|
),
|
|
17796
|
-
/* @__PURE__ */
|
|
17976
|
+
/* @__PURE__ */ jsx76(
|
|
17797
17977
|
Text_default,
|
|
17798
17978
|
{
|
|
17799
17979
|
size: "md",
|
|
@@ -17805,9 +17985,9 @@ var TicketModal = ({
|
|
|
17805
17985
|
}
|
|
17806
17986
|
)
|
|
17807
17987
|
] }),
|
|
17808
|
-
/* @__PURE__ */
|
|
17809
|
-
/* @__PURE__ */
|
|
17810
|
-
/* @__PURE__ */
|
|
17988
|
+
/* @__PURE__ */ jsx76(Divider_default, {}),
|
|
17989
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-start space-x-6", children: [
|
|
17990
|
+
/* @__PURE__ */ jsx76(
|
|
17811
17991
|
Text_default,
|
|
17812
17992
|
{
|
|
17813
17993
|
size: "md",
|
|
@@ -17816,7 +17996,7 @@ var TicketModal = ({
|
|
|
17816
17996
|
children: "Resposta"
|
|
17817
17997
|
}
|
|
17818
17998
|
),
|
|
17819
|
-
/* @__PURE__ */
|
|
17999
|
+
/* @__PURE__ */ jsx76(
|
|
17820
18000
|
Text_default,
|
|
17821
18001
|
{
|
|
17822
18002
|
size: "md",
|
|
@@ -17831,17 +18011,17 @@ var TicketModal = ({
|
|
|
17831
18011
|
answer.id
|
|
17832
18012
|
))
|
|
17833
18013
|
] }),
|
|
17834
|
-
!isLoadingAnswers && answers.some((answer) => answer.userId === userId) && /* @__PURE__ */
|
|
17835
|
-
/* @__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" }),
|
|
17836
18016
|
answers.filter((answer) => answer.userId === userId).sort(
|
|
17837
18017
|
(a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()
|
|
17838
|
-
).slice(0, 1).map((answer) => /* @__PURE__ */
|
|
18018
|
+
).slice(0, 1).map((answer) => /* @__PURE__ */ jsxs59(
|
|
17839
18019
|
"div",
|
|
17840
18020
|
{
|
|
17841
18021
|
className: "bg-background p-4 space-y-6 rounded-xl",
|
|
17842
18022
|
children: [
|
|
17843
|
-
/* @__PURE__ */
|
|
17844
|
-
/* @__PURE__ */
|
|
18023
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-center space-x-6", children: [
|
|
18024
|
+
/* @__PURE__ */ jsx76(
|
|
17845
18025
|
Text_default,
|
|
17846
18026
|
{
|
|
17847
18027
|
size: "md",
|
|
@@ -17850,7 +18030,7 @@ var TicketModal = ({
|
|
|
17850
18030
|
children: "Enviada"
|
|
17851
18031
|
}
|
|
17852
18032
|
),
|
|
17853
|
-
/* @__PURE__ */
|
|
18033
|
+
/* @__PURE__ */ jsx76(
|
|
17854
18034
|
Text_default,
|
|
17855
18035
|
{
|
|
17856
18036
|
size: "md",
|
|
@@ -17862,9 +18042,9 @@ var TicketModal = ({
|
|
|
17862
18042
|
}
|
|
17863
18043
|
)
|
|
17864
18044
|
] }),
|
|
17865
|
-
/* @__PURE__ */
|
|
17866
|
-
/* @__PURE__ */
|
|
17867
|
-
/* @__PURE__ */
|
|
18045
|
+
/* @__PURE__ */ jsx76(Divider_default, {}),
|
|
18046
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-start space-x-6", children: [
|
|
18047
|
+
/* @__PURE__ */ jsx76(
|
|
17868
18048
|
Text_default,
|
|
17869
18049
|
{
|
|
17870
18050
|
size: "md",
|
|
@@ -17873,7 +18053,7 @@ var TicketModal = ({
|
|
|
17873
18053
|
children: "Resposta"
|
|
17874
18054
|
}
|
|
17875
18055
|
),
|
|
17876
|
-
/* @__PURE__ */
|
|
18056
|
+
/* @__PURE__ */ jsx76(
|
|
17877
18057
|
Text_default,
|
|
17878
18058
|
{
|
|
17879
18059
|
size: "md",
|
|
@@ -17888,10 +18068,10 @@ var TicketModal = ({
|
|
|
17888
18068
|
answer.id
|
|
17889
18069
|
))
|
|
17890
18070
|
] }),
|
|
17891
|
-
!isLoadingAnswers && answers.some((answer) => answer.userId !== userId) && /* @__PURE__ */
|
|
17892
|
-
/* @__PURE__ */
|
|
17893
|
-
/* @__PURE__ */
|
|
17894
|
-
/* @__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(
|
|
17895
18075
|
TextArea_default,
|
|
17896
18076
|
{
|
|
17897
18077
|
placeholder: "Detalhe o problema aqui.",
|
|
@@ -17901,7 +18081,7 @@ var TicketModal = ({
|
|
|
17901
18081
|
onChange: (e) => setResponseText(e.target.value)
|
|
17902
18082
|
}
|
|
17903
18083
|
),
|
|
17904
|
-
responseText.trim().length > 0 && /* @__PURE__ */
|
|
18084
|
+
responseText.trim().length > 0 && /* @__PURE__ */ jsx76("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx76(
|
|
17905
18085
|
Button_default,
|
|
17906
18086
|
{
|
|
17907
18087
|
variant: "solid",
|
|
@@ -17917,7 +18097,7 @@ var TicketModal = ({
|
|
|
17917
18097
|
] })
|
|
17918
18098
|
}
|
|
17919
18099
|
),
|
|
17920
|
-
/* @__PURE__ */
|
|
18100
|
+
/* @__PURE__ */ jsx76(
|
|
17921
18101
|
Modal_default,
|
|
17922
18102
|
{
|
|
17923
18103
|
isOpen: showCloseConfirmation,
|
|
@@ -17927,10 +18107,10 @@ var TicketModal = ({
|
|
|
17927
18107
|
hideCloseButton: false,
|
|
17928
18108
|
closeOnEscape: true,
|
|
17929
18109
|
"data-testid": "close-ticket-modal",
|
|
17930
|
-
children: /* @__PURE__ */
|
|
17931
|
-
/* @__PURE__ */
|
|
17932
|
-
/* @__PURE__ */
|
|
17933
|
-
/* @__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(
|
|
17934
18114
|
Button_default,
|
|
17935
18115
|
{
|
|
17936
18116
|
variant: "outline",
|
|
@@ -17939,7 +18119,7 @@ var TicketModal = ({
|
|
|
17939
18119
|
children: "Cancelar"
|
|
17940
18120
|
}
|
|
17941
18121
|
),
|
|
17942
|
-
/* @__PURE__ */
|
|
18122
|
+
/* @__PURE__ */ jsx76(
|
|
17943
18123
|
Button_default,
|
|
17944
18124
|
{
|
|
17945
18125
|
variant: "solid",
|
|
@@ -17960,20 +18140,20 @@ var TicketModal = ({
|
|
|
17960
18140
|
var suporthistory_default = "./suporthistory-W5LBGAUP.png";
|
|
17961
18141
|
|
|
17962
18142
|
// src/components/Support/Support.tsx
|
|
17963
|
-
import { jsx as
|
|
18143
|
+
import { jsx as jsx77, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
17964
18144
|
var TicketCard = ({
|
|
17965
18145
|
ticket,
|
|
17966
18146
|
onTicketClick
|
|
17967
|
-
}) => /* @__PURE__ */
|
|
18147
|
+
}) => /* @__PURE__ */ jsxs60(
|
|
17968
18148
|
"button",
|
|
17969
18149
|
{
|
|
17970
18150
|
type: "button",
|
|
17971
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",
|
|
17972
18152
|
onClick: () => onTicketClick(ticket),
|
|
17973
18153
|
children: [
|
|
17974
|
-
/* @__PURE__ */
|
|
17975
|
-
/* @__PURE__ */
|
|
17976
|
-
/* @__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(
|
|
17977
18157
|
Badge_default,
|
|
17978
18158
|
{
|
|
17979
18159
|
variant: "solid",
|
|
@@ -17982,11 +18162,11 @@ var TicketCard = ({
|
|
|
17982
18162
|
children: getStatusText(ticket.status)
|
|
17983
18163
|
}
|
|
17984
18164
|
),
|
|
17985
|
-
/* @__PURE__ */
|
|
18165
|
+
/* @__PURE__ */ jsxs60(Badge_default, { variant: "solid", className: "flex items-center gap-1", action: "muted", children: [
|
|
17986
18166
|
getCategoryIcon(ticket.category, 18),
|
|
17987
18167
|
getCategoryText(ticket.category)
|
|
17988
18168
|
] }),
|
|
17989
|
-
/* @__PURE__ */
|
|
18169
|
+
/* @__PURE__ */ jsx77(CaretRightIcon, { size: 24, className: "text-text-800" })
|
|
17990
18170
|
] })
|
|
17991
18171
|
]
|
|
17992
18172
|
},
|
|
@@ -17996,9 +18176,9 @@ var TicketGroup = ({
|
|
|
17996
18176
|
date,
|
|
17997
18177
|
tickets,
|
|
17998
18178
|
onTicketClick
|
|
17999
|
-
}) => /* @__PURE__ */
|
|
18000
|
-
/* @__PURE__ */
|
|
18001
|
-
/* @__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(
|
|
18002
18182
|
TicketCard,
|
|
18003
18183
|
{
|
|
18004
18184
|
ticket,
|
|
@@ -18007,13 +18187,13 @@ var TicketGroup = ({
|
|
|
18007
18187
|
ticket.id
|
|
18008
18188
|
)) })
|
|
18009
18189
|
] }, date);
|
|
18010
|
-
var EmptyState2 = ({ imageSrc }) => /* @__PURE__ */
|
|
18011
|
-
imageSrc && /* @__PURE__ */
|
|
18012
|
-
/* @__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." })
|
|
18013
18193
|
] });
|
|
18014
|
-
var TicketSkeleton = () => /* @__PURE__ */
|
|
18015
|
-
/* @__PURE__ */
|
|
18016
|
-
/* @__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(
|
|
18017
18197
|
SkeletonRounded,
|
|
18018
18198
|
{
|
|
18019
18199
|
width: "100%",
|
|
@@ -18194,25 +18374,25 @@ var Support = ({
|
|
|
18194
18374
|
{
|
|
18195
18375
|
id: "tecnico" /* TECNICO */,
|
|
18196
18376
|
title: "T\xE9cnico",
|
|
18197
|
-
icon: /* @__PURE__ */
|
|
18377
|
+
icon: /* @__PURE__ */ jsx77(BugIcon2, { size: 24 })
|
|
18198
18378
|
},
|
|
18199
18379
|
{
|
|
18200
18380
|
id: "acesso" /* ACESSO */,
|
|
18201
18381
|
title: "Acesso",
|
|
18202
|
-
icon: /* @__PURE__ */
|
|
18382
|
+
icon: /* @__PURE__ */ jsx77(KeyIcon2, { size: 24 })
|
|
18203
18383
|
},
|
|
18204
18384
|
{
|
|
18205
18385
|
id: "outros" /* OUTROS */,
|
|
18206
18386
|
title: "Outros",
|
|
18207
|
-
icon: /* @__PURE__ */
|
|
18387
|
+
icon: /* @__PURE__ */ jsx77(InfoIcon2, { size: 24 })
|
|
18208
18388
|
}
|
|
18209
18389
|
];
|
|
18210
18390
|
const emptyImage = emptyStateImage || suporthistory_default;
|
|
18211
|
-
return /* @__PURE__ */
|
|
18212
|
-
/* @__PURE__ */
|
|
18213
|
-
/* @__PURE__ */
|
|
18214
|
-
/* @__PURE__ */
|
|
18215
|
-
/* @__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(
|
|
18216
18396
|
Menu_default,
|
|
18217
18397
|
{
|
|
18218
18398
|
value: activeTab,
|
|
@@ -18220,8 +18400,8 @@ var Support = ({
|
|
|
18220
18400
|
variant: "menu2",
|
|
18221
18401
|
onValueChange: (value) => setActiveTab(value),
|
|
18222
18402
|
className: "bg-transparent shadow-none px-0",
|
|
18223
|
-
children: /* @__PURE__ */
|
|
18224
|
-
/* @__PURE__ */
|
|
18403
|
+
children: /* @__PURE__ */ jsxs60(MenuContent, { variant: "menu2", children: [
|
|
18404
|
+
/* @__PURE__ */ jsx77(
|
|
18225
18405
|
MenuItem,
|
|
18226
18406
|
{
|
|
18227
18407
|
variant: "menu2",
|
|
@@ -18230,7 +18410,7 @@ var Support = ({
|
|
|
18230
18410
|
children: "Criar Pedido"
|
|
18231
18411
|
}
|
|
18232
18412
|
),
|
|
18233
|
-
/* @__PURE__ */
|
|
18413
|
+
/* @__PURE__ */ jsx77(
|
|
18234
18414
|
MenuItem,
|
|
18235
18415
|
{
|
|
18236
18416
|
variant: "menu2",
|
|
@@ -18243,9 +18423,9 @@ var Support = ({
|
|
|
18243
18423
|
}
|
|
18244
18424
|
) })
|
|
18245
18425
|
] }),
|
|
18246
|
-
activeTab === "criar-pedido" && /* @__PURE__ */
|
|
18247
|
-
/* @__PURE__ */
|
|
18248
|
-
/* @__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(
|
|
18249
18429
|
SelectionButton_default,
|
|
18250
18430
|
{
|
|
18251
18431
|
icon: type.icon,
|
|
@@ -18256,10 +18436,10 @@ var Support = ({
|
|
|
18256
18436
|
},
|
|
18257
18437
|
type.id
|
|
18258
18438
|
)) }),
|
|
18259
|
-
errors.problemType && /* @__PURE__ */
|
|
18439
|
+
errors.problemType && /* @__PURE__ */ jsx77(Text_default, { size: "sm", className: "text-red-500 mt-1", children: errors.problemType.message })
|
|
18260
18440
|
] }),
|
|
18261
|
-
selectedProblem && activeTab === "criar-pedido" && /* @__PURE__ */
|
|
18262
|
-
/* @__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(
|
|
18263
18443
|
Input_default,
|
|
18264
18444
|
{
|
|
18265
18445
|
size: "large",
|
|
@@ -18270,7 +18450,7 @@ var Support = ({
|
|
|
18270
18450
|
errorMessage: errors.title?.message
|
|
18271
18451
|
}
|
|
18272
18452
|
) }),
|
|
18273
|
-
/* @__PURE__ */
|
|
18453
|
+
/* @__PURE__ */ jsx77("div", { className: "space-y-1", children: /* @__PURE__ */ jsx77(
|
|
18274
18454
|
TextArea_default,
|
|
18275
18455
|
{
|
|
18276
18456
|
size: "large",
|
|
@@ -18280,7 +18460,7 @@ var Support = ({
|
|
|
18280
18460
|
errorMessage: errors.description?.message
|
|
18281
18461
|
}
|
|
18282
18462
|
) }),
|
|
18283
|
-
/* @__PURE__ */
|
|
18463
|
+
/* @__PURE__ */ jsx77(
|
|
18284
18464
|
Button_default,
|
|
18285
18465
|
{
|
|
18286
18466
|
size: "large",
|
|
@@ -18290,11 +18470,11 @@ var Support = ({
|
|
|
18290
18470
|
children: isSubmitting ? "Enviando..." : "Enviar Pedido"
|
|
18291
18471
|
}
|
|
18292
18472
|
),
|
|
18293
|
-
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 }) })
|
|
18294
18474
|
] }),
|
|
18295
|
-
activeTab === "historico" && /* @__PURE__ */
|
|
18296
|
-
/* @__PURE__ */
|
|
18297
|
-
/* @__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(
|
|
18298
18478
|
Select_default,
|
|
18299
18479
|
{
|
|
18300
18480
|
label: "Status",
|
|
@@ -18302,17 +18482,17 @@ var Support = ({
|
|
|
18302
18482
|
value: statusFilter,
|
|
18303
18483
|
onValueChange: setStatusFilter,
|
|
18304
18484
|
children: [
|
|
18305
|
-
/* @__PURE__ */
|
|
18306
|
-
/* @__PURE__ */
|
|
18307
|
-
/* @__PURE__ */
|
|
18308
|
-
/* @__PURE__ */
|
|
18309
|
-
/* @__PURE__ */
|
|
18310
|
-
/* @__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" })
|
|
18311
18491
|
] })
|
|
18312
18492
|
]
|
|
18313
18493
|
}
|
|
18314
18494
|
) }),
|
|
18315
|
-
/* @__PURE__ */
|
|
18495
|
+
/* @__PURE__ */ jsx77("div", { className: "flex flex-col flex-1/2 space-y-1", children: /* @__PURE__ */ jsxs60(
|
|
18316
18496
|
Select_default,
|
|
18317
18497
|
{
|
|
18318
18498
|
label: "Tipo",
|
|
@@ -18320,19 +18500,19 @@ var Support = ({
|
|
|
18320
18500
|
value: categoryFilter,
|
|
18321
18501
|
onValueChange: setCategoryFilter,
|
|
18322
18502
|
children: [
|
|
18323
|
-
/* @__PURE__ */
|
|
18324
|
-
/* @__PURE__ */
|
|
18325
|
-
/* @__PURE__ */
|
|
18326
|
-
/* @__PURE__ */
|
|
18327
|
-
/* @__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 }),
|
|
18328
18508
|
" T\xE9cnico"
|
|
18329
18509
|
] }),
|
|
18330
|
-
/* @__PURE__ */
|
|
18331
|
-
/* @__PURE__ */
|
|
18510
|
+
/* @__PURE__ */ jsxs60(SelectItem, { value: "acesso" /* ACESSO */, children: [
|
|
18511
|
+
/* @__PURE__ */ jsx77(KeyIcon2, { size: 16 }),
|
|
18332
18512
|
" Acesso"
|
|
18333
18513
|
] }),
|
|
18334
|
-
/* @__PURE__ */
|
|
18335
|
-
/* @__PURE__ */
|
|
18514
|
+
/* @__PURE__ */ jsxs60(SelectItem, { value: "outros" /* OUTROS */, children: [
|
|
18515
|
+
/* @__PURE__ */ jsx77(InfoIcon2, { size: 16 }),
|
|
18336
18516
|
" Outros"
|
|
18337
18517
|
] })
|
|
18338
18518
|
] })
|
|
@@ -18342,14 +18522,14 @@ var Support = ({
|
|
|
18342
18522
|
] }),
|
|
18343
18523
|
(() => {
|
|
18344
18524
|
if (loadingTickets) {
|
|
18345
|
-
return /* @__PURE__ */
|
|
18525
|
+
return /* @__PURE__ */ jsx77(TicketSkeleton, {});
|
|
18346
18526
|
}
|
|
18347
18527
|
if (Object.keys(groupedTickets).length === 0) {
|
|
18348
|
-
return /* @__PURE__ */
|
|
18528
|
+
return /* @__PURE__ */ jsx77(EmptyState2, { imageSrc: emptyImage });
|
|
18349
18529
|
}
|
|
18350
|
-
return /* @__PURE__ */
|
|
18530
|
+
return /* @__PURE__ */ jsx77("div", { className: "space-y-6", children: Object.entries(groupedTickets).sort(
|
|
18351
18531
|
([a], [b]) => new Date(b).getTime() - new Date(a).getTime()
|
|
18352
|
-
).map(([date, tickets]) => /* @__PURE__ */
|
|
18532
|
+
).map(([date, tickets]) => /* @__PURE__ */ jsx77(
|
|
18353
18533
|
TicketGroup,
|
|
18354
18534
|
{
|
|
18355
18535
|
date,
|
|
@@ -18359,8 +18539,8 @@ var Support = ({
|
|
|
18359
18539
|
date
|
|
18360
18540
|
)) });
|
|
18361
18541
|
})(),
|
|
18362
|
-
!loadingTickets && totalPages > 1 && /* @__PURE__ */
|
|
18363
|
-
/* @__PURE__ */
|
|
18542
|
+
!loadingTickets && totalPages > 1 && /* @__PURE__ */ jsxs60("div", { className: "flex justify-center items-center gap-4 mt-6", children: [
|
|
18543
|
+
/* @__PURE__ */ jsx77(
|
|
18364
18544
|
Button_default,
|
|
18365
18545
|
{
|
|
18366
18546
|
variant: "outline",
|
|
@@ -18370,13 +18550,13 @@ var Support = ({
|
|
|
18370
18550
|
children: "Anterior"
|
|
18371
18551
|
}
|
|
18372
18552
|
),
|
|
18373
|
-
/* @__PURE__ */
|
|
18553
|
+
/* @__PURE__ */ jsxs60(Text_default, { size: "sm", className: "text-text-600", children: [
|
|
18374
18554
|
"P\xE1gina ",
|
|
18375
18555
|
currentPage,
|
|
18376
18556
|
" de ",
|
|
18377
18557
|
totalPages
|
|
18378
18558
|
] }),
|
|
18379
|
-
/* @__PURE__ */
|
|
18559
|
+
/* @__PURE__ */ jsx77(
|
|
18380
18560
|
Button_default,
|
|
18381
18561
|
{
|
|
18382
18562
|
variant: "outline",
|
|
@@ -18389,7 +18569,7 @@ var Support = ({
|
|
|
18389
18569
|
] })
|
|
18390
18570
|
] })
|
|
18391
18571
|
] }) }),
|
|
18392
|
-
selectedTicket && /* @__PURE__ */
|
|
18572
|
+
selectedTicket && /* @__PURE__ */ jsx77(
|
|
18393
18573
|
TicketModal,
|
|
18394
18574
|
{
|
|
18395
18575
|
ticket: selectedTicket,
|
|
@@ -18400,7 +18580,7 @@ var Support = ({
|
|
|
18400
18580
|
userId
|
|
18401
18581
|
}
|
|
18402
18582
|
),
|
|
18403
|
-
showSuccessToast && /* @__PURE__ */
|
|
18583
|
+
showSuccessToast && /* @__PURE__ */ jsx77("div", { className: "fixed top-4 left-1/2 transform -translate-x-1/2 z-50", children: /* @__PURE__ */ jsx77(
|
|
18404
18584
|
Toast_default,
|
|
18405
18585
|
{
|
|
18406
18586
|
title: "Pedido enviado!",
|
|
@@ -18409,7 +18589,7 @@ var Support = ({
|
|
|
18409
18589
|
onClose: () => setShowSuccessToast(false)
|
|
18410
18590
|
}
|
|
18411
18591
|
) }),
|
|
18412
|
-
showCloseSuccessToast && /* @__PURE__ */
|
|
18592
|
+
showCloseSuccessToast && /* @__PURE__ */ jsx77("div", { className: "fixed top-4 left-1/2 transform -translate-x-1/2 z-50", children: /* @__PURE__ */ jsx77(
|
|
18413
18593
|
Toast_default,
|
|
18414
18594
|
{
|
|
18415
18595
|
title: "Pedido encerrado!",
|
|
@@ -18418,7 +18598,7 @@ var Support = ({
|
|
|
18418
18598
|
onClose: () => setShowCloseSuccessToast(false)
|
|
18419
18599
|
}
|
|
18420
18600
|
) }),
|
|
18421
|
-
showCloseErrorToast && /* @__PURE__ */
|
|
18601
|
+
showCloseErrorToast && /* @__PURE__ */ jsx77("div", { className: "fixed top-4 left-1/2 transform -translate-x-1/2 z-50", children: /* @__PURE__ */ jsx77(
|
|
18422
18602
|
Toast_default,
|
|
18423
18603
|
{
|
|
18424
18604
|
title: "Erro ao encerrar pedido",
|
|
@@ -18434,6 +18614,7 @@ var Support_default = Support;
|
|
|
18434
18614
|
export {
|
|
18435
18615
|
ANSWER_STATUS,
|
|
18436
18616
|
AccordionGroup,
|
|
18617
|
+
ActivityCardQuestionBanks,
|
|
18437
18618
|
ActivityDetails,
|
|
18438
18619
|
ActivityFilters,
|
|
18439
18620
|
ActivityFiltersPopover,
|