analytica-frontend-lib 1.2.29 → 1.2.31
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/ActivityFilters/index.d.ts +5 -9
- package/dist/ActivityFilters/index.d.ts.map +1 -1
- package/dist/ActivityFilters/index.js +116 -74
- package/dist/ActivityFilters/index.js.map +1 -1
- package/dist/ActivityFilters/index.mjs +117 -75
- package/dist/ActivityFilters/index.mjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +562 -338
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +539 -316
- package/dist/index.mjs.map +1 -1
- package/dist/types/activityFilters.d.ts +11 -2
- package/dist/types/activityFilters.d.ts.map +1 -1
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -11445,7 +11445,7 @@ var useTableFilter = (initialConfigs, options = {}) => {
|
|
|
11445
11445
|
};
|
|
11446
11446
|
|
|
11447
11447
|
// src/components/ActivityFilters/ActivityFilters.tsx
|
|
11448
|
-
import { useState as useState22, useEffect as useEffect22, useMemo as useMemo10, useCallback as useCallback4 } from "react";
|
|
11448
|
+
import { useState as useState22, useEffect as useEffect22, useMemo as useMemo10, useCallback as useCallback4, useRef as useRef12 } from "react";
|
|
11449
11449
|
import { jsx as jsx58, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
11450
11450
|
var questionTypes = [
|
|
11451
11451
|
"ALTERNATIVA" /* ALTERNATIVA */,
|
|
@@ -11458,11 +11458,13 @@ var questionTypes = [
|
|
|
11458
11458
|
];
|
|
11459
11459
|
var QuestionTypeFilter = ({
|
|
11460
11460
|
selectedTypes,
|
|
11461
|
-
onToggleType
|
|
11461
|
+
onToggleType,
|
|
11462
|
+
allowedQuestionTypes
|
|
11462
11463
|
}) => {
|
|
11464
|
+
const availableQuestionTypes = allowedQuestionTypes || questionTypes;
|
|
11463
11465
|
return /* @__PURE__ */ jsxs45("div", { children: [
|
|
11464
11466
|
/* @__PURE__ */ jsx58(Text_default, { size: "sm", weight: "bold", className: "mb-3 block", children: "Tipo de quest\xE3o" }),
|
|
11465
|
-
/* @__PURE__ */ jsx58("div", { className: "grid grid-cols-2 gap-2", children:
|
|
11467
|
+
/* @__PURE__ */ jsx58("div", { className: "grid grid-cols-2 gap-2", children: availableQuestionTypes.map((questionType) => /* @__PURE__ */ jsx58(
|
|
11466
11468
|
Chips_default,
|
|
11467
11469
|
{
|
|
11468
11470
|
selected: selectedTypes.includes(questionType),
|
|
@@ -11473,10 +11475,11 @@ var QuestionTypeFilter = ({
|
|
|
11473
11475
|
)) })
|
|
11474
11476
|
] });
|
|
11475
11477
|
};
|
|
11476
|
-
var
|
|
11478
|
+
var BanksAndYearsFilter = ({
|
|
11477
11479
|
banks,
|
|
11478
|
-
|
|
11479
|
-
|
|
11480
|
+
bankYears,
|
|
11481
|
+
bankCategories,
|
|
11482
|
+
onBankCategoriesChange,
|
|
11480
11483
|
loading = false,
|
|
11481
11484
|
error = null
|
|
11482
11485
|
}) => {
|
|
@@ -11486,18 +11489,21 @@ var BanksFilter = ({
|
|
|
11486
11489
|
if (error) {
|
|
11487
11490
|
return /* @__PURE__ */ jsx58(Text_default, { size: "sm", className: "text-text-600", children: error });
|
|
11488
11491
|
}
|
|
11489
|
-
if (banks.length === 0) {
|
|
11492
|
+
if (banks.length === 0 && bankYears.length === 0) {
|
|
11490
11493
|
return /* @__PURE__ */ jsx58(Text_default, { size: "sm", className: "text-text-600", children: "Nenhuma banca encontrada" });
|
|
11491
11494
|
}
|
|
11492
|
-
|
|
11493
|
-
|
|
11494
|
-
|
|
11495
|
-
|
|
11496
|
-
|
|
11497
|
-
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
|
|
11495
|
+
if (bankCategories.length > 0) {
|
|
11496
|
+
return /* @__PURE__ */ jsx58(
|
|
11497
|
+
CheckboxGroup,
|
|
11498
|
+
{
|
|
11499
|
+
categories: bankCategories,
|
|
11500
|
+
onCategoriesChange: onBankCategoriesChange,
|
|
11501
|
+
compactSingleItem: true,
|
|
11502
|
+
showSingleItem: true
|
|
11503
|
+
}
|
|
11504
|
+
);
|
|
11505
|
+
}
|
|
11506
|
+
return null;
|
|
11501
11507
|
};
|
|
11502
11508
|
var SubjectsFilter = ({
|
|
11503
11509
|
knowledgeAreas,
|
|
@@ -11546,38 +11552,10 @@ var SubjectsFilter = ({
|
|
|
11546
11552
|
area.id
|
|
11547
11553
|
)) });
|
|
11548
11554
|
};
|
|
11549
|
-
var KnowledgeSummary = ({
|
|
11550
|
-
knowledgeStructure,
|
|
11551
|
-
selectedKnowledgeSummary
|
|
11552
|
-
}) => {
|
|
11553
|
-
return /* @__PURE__ */ jsxs45("div", { className: "mt-4 p-3 bg-background-50 rounded-lg border border-border-200", children: [
|
|
11554
|
-
/* @__PURE__ */ jsx58(Text_default, { size: "sm", weight: "bold", className: "mb-2 block", children: "Resumo da sele\xE7\xE3o" }),
|
|
11555
|
-
/* @__PURE__ */ jsxs45("div", { className: "flex flex-col gap-2", children: [
|
|
11556
|
-
knowledgeStructure.topics.length === 1 && /* @__PURE__ */ jsxs45("div", { children: [
|
|
11557
|
-
/* @__PURE__ */ jsx58(Text_default, { size: "xs", weight: "medium", className: "text-text-600", children: "Tema:" }),
|
|
11558
|
-
/* @__PURE__ */ jsx58("div", { className: "flex flex-wrap gap-1 mt-1", children: selectedKnowledgeSummary.topics.map((topic) => /* @__PURE__ */ jsx58(Chips_default, { selected: true, children: topic }, topic)) })
|
|
11559
|
-
] }),
|
|
11560
|
-
knowledgeStructure.subtopics.length === 1 && /* @__PURE__ */ jsxs45("div", { children: [
|
|
11561
|
-
/* @__PURE__ */ jsx58(Text_default, { size: "xs", weight: "medium", className: "text-text-600", children: "Subtema:" }),
|
|
11562
|
-
/* @__PURE__ */ jsx58("div", { className: "flex flex-wrap gap-1 mt-1", children: selectedKnowledgeSummary.subtopics.map((subtopic) => /* @__PURE__ */ jsx58(Chips_default, { selected: true, children: subtopic }, subtopic)) })
|
|
11563
|
-
] }),
|
|
11564
|
-
knowledgeStructure.contents.length === 1 && /* @__PURE__ */ jsxs45("div", { children: [
|
|
11565
|
-
/* @__PURE__ */ jsx58(Text_default, { size: "xs", weight: "medium", className: "text-text-600", children: "Assunto:" }),
|
|
11566
|
-
/* @__PURE__ */ jsx58("div", { className: "flex flex-wrap gap-1 mt-1", children: selectedKnowledgeSummary.contents.map((content) => /* @__PURE__ */ jsx58(Chips_default, { selected: true, children: content }, content)) })
|
|
11567
|
-
] })
|
|
11568
|
-
] })
|
|
11569
|
-
] });
|
|
11570
|
-
};
|
|
11571
11555
|
var KnowledgeStructureFilter = ({
|
|
11572
11556
|
knowledgeStructure,
|
|
11573
11557
|
knowledgeCategories,
|
|
11574
|
-
handleCategoriesChange
|
|
11575
|
-
selectedKnowledgeSummary = {
|
|
11576
|
-
topics: [],
|
|
11577
|
-
subtopics: [],
|
|
11578
|
-
contents: []
|
|
11579
|
-
},
|
|
11580
|
-
enableSummary = false
|
|
11558
|
+
handleCategoriesChange
|
|
11581
11559
|
}) => {
|
|
11582
11560
|
return /* @__PURE__ */ jsxs45("div", { className: "mt-4", children: [
|
|
11583
11561
|
/* @__PURE__ */ jsx58(Text_default, { size: "sm", weight: "bold", className: "mb-3 block", children: "Tema, Subtema e Assunto" }),
|
|
@@ -11587,17 +11565,12 @@ var KnowledgeStructureFilter = ({
|
|
|
11587
11565
|
CheckboxGroup,
|
|
11588
11566
|
{
|
|
11589
11567
|
categories: knowledgeCategories,
|
|
11590
|
-
onCategoriesChange: handleCategoriesChange
|
|
11568
|
+
onCategoriesChange: handleCategoriesChange,
|
|
11569
|
+
compactSingleItem: false,
|
|
11570
|
+
showSingleItem: true
|
|
11591
11571
|
}
|
|
11592
11572
|
),
|
|
11593
|
-
!knowledgeStructure.loading && knowledgeCategories.length === 0 && knowledgeStructure.topics.length === 0 && /* @__PURE__ */ jsx58(Text_default, { size: "sm", className: "text-text-600", children: "Nenhum tema dispon\xEDvel para as mat\xE9rias selecionadas" })
|
|
11594
|
-
enableSummary && /* @__PURE__ */ jsx58(
|
|
11595
|
-
KnowledgeSummary,
|
|
11596
|
-
{
|
|
11597
|
-
knowledgeStructure,
|
|
11598
|
-
selectedKnowledgeSummary
|
|
11599
|
-
}
|
|
11600
|
-
)
|
|
11573
|
+
!knowledgeStructure.loading && knowledgeCategories.length === 0 && knowledgeStructure.topics.length === 0 && /* @__PURE__ */ jsx58(Text_default, { size: "sm", className: "text-text-600", children: "Nenhum tema dispon\xEDvel para as mat\xE9rias selecionadas" })
|
|
11601
11574
|
] });
|
|
11602
11575
|
};
|
|
11603
11576
|
var FilterActions = ({
|
|
@@ -11617,6 +11590,7 @@ var ActivityFilters = ({
|
|
|
11617
11590
|
variant = "default",
|
|
11618
11591
|
// Data
|
|
11619
11592
|
banks = [],
|
|
11593
|
+
bankYears = [],
|
|
11620
11594
|
knowledgeAreas = [],
|
|
11621
11595
|
knowledgeStructure = {
|
|
11622
11596
|
topics: [],
|
|
@@ -11626,6 +11600,8 @@ var ActivityFilters = ({
|
|
|
11626
11600
|
error: null
|
|
11627
11601
|
},
|
|
11628
11602
|
knowledgeCategories = [],
|
|
11603
|
+
// Question types
|
|
11604
|
+
allowedQuestionTypes,
|
|
11629
11605
|
// Loading states
|
|
11630
11606
|
loadingBanks = false,
|
|
11631
11607
|
loadingKnowledge: _loadingKnowledge = false,
|
|
@@ -11641,19 +11617,47 @@ var ActivityFilters = ({
|
|
|
11641
11617
|
loadContents: _loadContents,
|
|
11642
11618
|
// Handlers
|
|
11643
11619
|
handleCategoriesChange,
|
|
11644
|
-
selectedKnowledgeSummary = {
|
|
11645
|
-
topics: [],
|
|
11646
|
-
subtopics: [],
|
|
11647
|
-
contents: []
|
|
11648
|
-
},
|
|
11649
|
-
enableSummary = false,
|
|
11650
11620
|
// Action buttons
|
|
11651
11621
|
onClearFilters,
|
|
11652
11622
|
onApplyFilters
|
|
11653
11623
|
}) => {
|
|
11654
11624
|
const [selectedQuestionTypes, setSelectedQuestionTypes] = useState22([]);
|
|
11655
|
-
const [selectedBanks, setSelectedBanks] = useState22([]);
|
|
11656
11625
|
const [selectedSubject, setSelectedSubject] = useState22(null);
|
|
11626
|
+
const prevAllowedQuestionTypesRef = useRef12(null);
|
|
11627
|
+
useEffect22(() => {
|
|
11628
|
+
if (!allowedQuestionTypes || allowedQuestionTypes.length === 0) {
|
|
11629
|
+
prevAllowedQuestionTypesRef.current = null;
|
|
11630
|
+
return;
|
|
11631
|
+
}
|
|
11632
|
+
const currentKey = allowedQuestionTypes.slice().sort((a, b) => {
|
|
11633
|
+
return a === b ? 0 : allowedQuestionTypes.indexOf(a) - allowedQuestionTypes.indexOf(b);
|
|
11634
|
+
}).join(",");
|
|
11635
|
+
const prevKey = prevAllowedQuestionTypesRef.current;
|
|
11636
|
+
if (currentKey === prevKey) {
|
|
11637
|
+
return;
|
|
11638
|
+
}
|
|
11639
|
+
prevAllowedQuestionTypesRef.current = currentKey;
|
|
11640
|
+
setSelectedQuestionTypes((prev) => {
|
|
11641
|
+
const filtered = prev.filter(
|
|
11642
|
+
(type) => allowedQuestionTypes.includes(type)
|
|
11643
|
+
);
|
|
11644
|
+
if (filtered.length !== prev.length) {
|
|
11645
|
+
return filtered;
|
|
11646
|
+
}
|
|
11647
|
+
const prevSet = new Set(prev);
|
|
11648
|
+
const filteredSet = new Set(filtered);
|
|
11649
|
+
if (prevSet.size !== filteredSet.size) {
|
|
11650
|
+
return filtered;
|
|
11651
|
+
}
|
|
11652
|
+
for (const item of prevSet) {
|
|
11653
|
+
if (!filteredSet.has(item)) {
|
|
11654
|
+
return filtered;
|
|
11655
|
+
}
|
|
11656
|
+
}
|
|
11657
|
+
return prev;
|
|
11658
|
+
});
|
|
11659
|
+
}, [allowedQuestionTypes]);
|
|
11660
|
+
const [bankCategories, setBankCategories] = useState22([]);
|
|
11657
11661
|
const selectedSubjects = useMemo10(
|
|
11658
11662
|
() => selectedSubject ? [selectedSubject] : [],
|
|
11659
11663
|
[selectedSubject]
|
|
@@ -11661,12 +11665,38 @@ var ActivityFilters = ({
|
|
|
11661
11665
|
const toggleQuestionType = (questionType) => {
|
|
11662
11666
|
setSelectedQuestionTypes((prev) => toggleArrayItem(prev, questionType));
|
|
11663
11667
|
};
|
|
11664
|
-
const toggleBank = (bankName) => {
|
|
11665
|
-
setSelectedBanks((prev) => toggleArrayItem(prev, bankName));
|
|
11666
|
-
};
|
|
11667
11668
|
const handleSubjectChange = (subjectId) => {
|
|
11668
11669
|
setSelectedSubject(toggleSingleValue(selectedSubject, subjectId));
|
|
11669
11670
|
};
|
|
11671
|
+
const handleBankCategoriesChange = (updatedCategories) => {
|
|
11672
|
+
setBankCategories(updatedCategories);
|
|
11673
|
+
};
|
|
11674
|
+
useEffect22(() => {
|
|
11675
|
+
setBankCategories((prevCategories) => {
|
|
11676
|
+
const bankCategory = {
|
|
11677
|
+
key: "banca",
|
|
11678
|
+
label: "Banca",
|
|
11679
|
+
itens: banks.map((bank) => ({
|
|
11680
|
+
id: bank.id,
|
|
11681
|
+
name: bank.name || bank.examInstitution
|
|
11682
|
+
})),
|
|
11683
|
+
selectedIds: prevCategories.find((c) => c.key === "banca")?.selectedIds || []
|
|
11684
|
+
};
|
|
11685
|
+
const yearCategory = {
|
|
11686
|
+
key: "ano",
|
|
11687
|
+
label: "Ano",
|
|
11688
|
+
dependsOn: ["banca"],
|
|
11689
|
+
itens: bankYears.map((year) => ({
|
|
11690
|
+
id: year.id,
|
|
11691
|
+
name: year.name,
|
|
11692
|
+
bankId: year.bankId
|
|
11693
|
+
})),
|
|
11694
|
+
filteredBy: [{ key: "banca", internalField: "bankId" }],
|
|
11695
|
+
selectedIds: prevCategories.find((c) => c.key === "ano")?.selectedIds || []
|
|
11696
|
+
};
|
|
11697
|
+
return [bankCategory, yearCategory];
|
|
11698
|
+
});
|
|
11699
|
+
}, [banks, bankYears]);
|
|
11670
11700
|
useEffect22(() => {
|
|
11671
11701
|
if (loadBanks) {
|
|
11672
11702
|
loadBanks();
|
|
@@ -11687,24 +11717,36 @@ var ActivityFilters = ({
|
|
|
11687
11717
|
contentIds: "assunto"
|
|
11688
11718
|
});
|
|
11689
11719
|
}, [knowledgeCategories]);
|
|
11720
|
+
const getSelectedBankIds = useCallback4(() => {
|
|
11721
|
+
return getSelectedIdsFromCategories(bankCategories, {
|
|
11722
|
+
bankIds: "banca",
|
|
11723
|
+
yearIds: "ano"
|
|
11724
|
+
});
|
|
11725
|
+
}, [bankCategories]);
|
|
11726
|
+
const onFiltersChangeRef = useRef12(onFiltersChange);
|
|
11727
|
+
useEffect22(() => {
|
|
11728
|
+
onFiltersChangeRef.current = onFiltersChange;
|
|
11729
|
+
}, [onFiltersChange]);
|
|
11690
11730
|
useEffect22(() => {
|
|
11691
11731
|
const knowledgeIds = getSelectedKnowledgeIds();
|
|
11732
|
+
const bankIds = getSelectedBankIds();
|
|
11692
11733
|
const filters = {
|
|
11693
11734
|
types: selectedQuestionTypes,
|
|
11694
|
-
bankIds:
|
|
11735
|
+
bankIds: bankIds.bankIds || [],
|
|
11736
|
+
yearIds: bankIds.yearIds || [],
|
|
11695
11737
|
knowledgeIds: selectedSubjects,
|
|
11696
11738
|
topicIds: knowledgeIds.topicIds,
|
|
11697
11739
|
subtopicIds: knowledgeIds.subtopicIds,
|
|
11698
11740
|
contentIds: knowledgeIds.contentIds
|
|
11699
11741
|
};
|
|
11700
|
-
|
|
11742
|
+
onFiltersChangeRef.current(filters);
|
|
11701
11743
|
}, [
|
|
11702
11744
|
selectedQuestionTypes,
|
|
11703
|
-
selectedBanks,
|
|
11704
11745
|
selectedSubjects,
|
|
11705
11746
|
knowledgeCategories,
|
|
11747
|
+
bankCategories,
|
|
11706
11748
|
getSelectedKnowledgeIds,
|
|
11707
|
-
|
|
11749
|
+
getSelectedBankIds
|
|
11708
11750
|
]);
|
|
11709
11751
|
const containerClassName = variant === "popover" ? "w-full bg-background" : "w-[400px] flex-shrink-0 p-4 bg-background";
|
|
11710
11752
|
const contentClassName = variant === "popover" ? "p-4" : "";
|
|
@@ -11715,17 +11757,19 @@ var ActivityFilters = ({
|
|
|
11715
11757
|
QuestionTypeFilter,
|
|
11716
11758
|
{
|
|
11717
11759
|
selectedTypes: selectedQuestionTypes,
|
|
11718
|
-
onToggleType: toggleQuestionType
|
|
11760
|
+
onToggleType: toggleQuestionType,
|
|
11761
|
+
allowedQuestionTypes
|
|
11719
11762
|
}
|
|
11720
11763
|
),
|
|
11721
11764
|
/* @__PURE__ */ jsxs45("div", { children: [
|
|
11722
11765
|
/* @__PURE__ */ jsx58(Text_default, { size: "sm", weight: "bold", className: "mb-3 block", children: "Banca de vestibular" }),
|
|
11723
11766
|
/* @__PURE__ */ jsx58(
|
|
11724
|
-
|
|
11767
|
+
BanksAndYearsFilter,
|
|
11725
11768
|
{
|
|
11726
11769
|
banks,
|
|
11727
|
-
|
|
11728
|
-
|
|
11770
|
+
bankYears,
|
|
11771
|
+
bankCategories,
|
|
11772
|
+
onBankCategoriesChange: handleBankCategoriesChange,
|
|
11729
11773
|
loading: loadingBanks,
|
|
11730
11774
|
error: banksError
|
|
11731
11775
|
}
|
|
@@ -11749,9 +11793,7 @@ var ActivityFilters = ({
|
|
|
11749
11793
|
{
|
|
11750
11794
|
knowledgeStructure,
|
|
11751
11795
|
knowledgeCategories,
|
|
11752
|
-
handleCategoriesChange
|
|
11753
|
-
selectedKnowledgeSummary,
|
|
11754
|
-
enableSummary
|
|
11796
|
+
handleCategoriesChange
|
|
11755
11797
|
}
|
|
11756
11798
|
),
|
|
11757
11799
|
/* @__PURE__ */ jsx58(
|
|
@@ -12090,7 +12132,7 @@ var TableProvider_default = TableProvider;
|
|
|
12090
12132
|
import { create as create10, useStore as useStore4 } from "zustand";
|
|
12091
12133
|
import {
|
|
12092
12134
|
useEffect as useEffect24,
|
|
12093
|
-
useRef as
|
|
12135
|
+
useRef as useRef13,
|
|
12094
12136
|
forwardRef as forwardRef19,
|
|
12095
12137
|
isValidElement as isValidElement6,
|
|
12096
12138
|
Children as Children6,
|
|
@@ -12196,10 +12238,10 @@ var Select = ({
|
|
|
12196
12238
|
errorMessage,
|
|
12197
12239
|
id
|
|
12198
12240
|
}) => {
|
|
12199
|
-
const storeRef =
|
|
12241
|
+
const storeRef = useRef13(null);
|
|
12200
12242
|
storeRef.current ??= createSelectStore(onValueChange);
|
|
12201
12243
|
const store = storeRef.current;
|
|
12202
|
-
const selectRef =
|
|
12244
|
+
const selectRef = useRef13(null);
|
|
12203
12245
|
const { open, setOpen, setValue, selectedLabel } = useStore4(store, (s) => s);
|
|
12204
12246
|
const generatedId = useId10();
|
|
12205
12247
|
const selectId = id ?? `select-${generatedId}`;
|
|
@@ -12443,7 +12485,7 @@ var Select_default = Select;
|
|
|
12443
12485
|
import { create as create11, useStore as useStore5 } from "zustand";
|
|
12444
12486
|
import {
|
|
12445
12487
|
useEffect as useEffect25,
|
|
12446
|
-
useRef as
|
|
12488
|
+
useRef as useRef14,
|
|
12447
12489
|
forwardRef as forwardRef20,
|
|
12448
12490
|
isValidElement as isValidElement7,
|
|
12449
12491
|
Children as Children7,
|
|
@@ -12480,7 +12522,7 @@ var Menu = forwardRef20(
|
|
|
12480
12522
|
onValueChange,
|
|
12481
12523
|
...props
|
|
12482
12524
|
}, ref) => {
|
|
12483
|
-
const storeRef =
|
|
12525
|
+
const storeRef = useRef14(null);
|
|
12484
12526
|
storeRef.current ??= createMenuStore(onValueChange);
|
|
12485
12527
|
const store = storeRef.current;
|
|
12486
12528
|
const { setValue } = useStore5(store, (s) => s);
|
|
@@ -12685,7 +12727,7 @@ var MenuOverflow = ({
|
|
|
12685
12727
|
onValueChange,
|
|
12686
12728
|
...props
|
|
12687
12729
|
}) => {
|
|
12688
|
-
const containerRef =
|
|
12730
|
+
const containerRef = useRef14(null);
|
|
12689
12731
|
const [showLeftArrow, setShowLeftArrow] = useState24(false);
|
|
12690
12732
|
const [showRightArrow, setShowRightArrow] = useState24(false);
|
|
12691
12733
|
useEffect25(() => {
|
|
@@ -13012,7 +13054,7 @@ var NotFound_default = NotFound;
|
|
|
13012
13054
|
|
|
13013
13055
|
// src/components/VideoPlayer/VideoPlayer.tsx
|
|
13014
13056
|
import {
|
|
13015
|
-
useRef as
|
|
13057
|
+
useRef as useRef15,
|
|
13016
13058
|
useState as useState26,
|
|
13017
13059
|
useEffect as useEffect26,
|
|
13018
13060
|
useCallback as useCallback7
|
|
@@ -13286,9 +13328,9 @@ var SpeedMenu = ({
|
|
|
13286
13328
|
iconSize = 24,
|
|
13287
13329
|
isTinyMobile = false
|
|
13288
13330
|
}) => {
|
|
13289
|
-
const buttonRef =
|
|
13290
|
-
const speedMenuContainerRef =
|
|
13291
|
-
const speedMenuRef =
|
|
13331
|
+
const buttonRef = useRef15(null);
|
|
13332
|
+
const speedMenuContainerRef = useRef15(null);
|
|
13333
|
+
const speedMenuRef = useRef15(null);
|
|
13292
13334
|
const getMenuPosition = () => {
|
|
13293
13335
|
if (!buttonRef.current) return { top: 0, left: 0 };
|
|
13294
13336
|
const rect = buttonRef.current.getBoundingClientRect();
|
|
@@ -13381,7 +13423,7 @@ var VideoPlayer = ({
|
|
|
13381
13423
|
onDownloadComplete,
|
|
13382
13424
|
onDownloadError
|
|
13383
13425
|
}) => {
|
|
13384
|
-
const videoRef =
|
|
13426
|
+
const videoRef = useRef15(null);
|
|
13385
13427
|
const { isUltraSmallMobile, isTinyMobile } = useMobile();
|
|
13386
13428
|
const [isPlaying, setIsPlaying] = useState26(false);
|
|
13387
13429
|
const [currentTime, setCurrentTime] = useState26(0);
|
|
@@ -13398,10 +13440,10 @@ var VideoPlayer = ({
|
|
|
13398
13440
|
}, [src]);
|
|
13399
13441
|
const [playbackRate, setPlaybackRate] = useState26(1);
|
|
13400
13442
|
const [showSpeedMenu, setShowSpeedMenu] = useState26(false);
|
|
13401
|
-
const lastSaveTimeRef =
|
|
13402
|
-
const trackRef =
|
|
13403
|
-
const controlsTimeoutRef =
|
|
13404
|
-
const lastMousePositionRef =
|
|
13443
|
+
const lastSaveTimeRef = useRef15(0);
|
|
13444
|
+
const trackRef = useRef15(null);
|
|
13445
|
+
const controlsTimeoutRef = useRef15(null);
|
|
13446
|
+
const lastMousePositionRef = useRef15({ x: 0, y: 0 });
|
|
13405
13447
|
const isUserInteracting = useCallback7(() => {
|
|
13406
13448
|
if (showSpeedMenu) {
|
|
13407
13449
|
return true;
|
|
@@ -14415,7 +14457,7 @@ function createZustandAuthAdapter(useAuthStore2) {
|
|
|
14415
14457
|
}
|
|
14416
14458
|
|
|
14417
14459
|
// src/components/Auth/useUrlAuthentication.ts
|
|
14418
|
-
import { useEffect as useEffect28, useRef as
|
|
14460
|
+
import { useEffect as useEffect28, useRef as useRef16 } from "react";
|
|
14419
14461
|
import { useLocation as useLocation2 } from "react-router-dom";
|
|
14420
14462
|
var getAuthParams = (location, extractParams) => {
|
|
14421
14463
|
const searchParams = new URLSearchParams(location.search);
|
|
@@ -14463,7 +14505,7 @@ var handleUserData = (responseData, setUser) => {
|
|
|
14463
14505
|
};
|
|
14464
14506
|
function useUrlAuthentication(options) {
|
|
14465
14507
|
const location = useLocation2();
|
|
14466
|
-
const processedRef =
|
|
14508
|
+
const processedRef = useRef16(false);
|
|
14467
14509
|
useEffect28(() => {
|
|
14468
14510
|
const handleAuthentication = async () => {
|
|
14469
14511
|
if (processedRef.current) {
|
|
@@ -14566,7 +14608,7 @@ import {
|
|
|
14566
14608
|
useEffect as useEffect30,
|
|
14567
14609
|
useId as useId11,
|
|
14568
14610
|
useMemo as useMemo14,
|
|
14569
|
-
useRef as
|
|
14611
|
+
useRef as useRef17,
|
|
14570
14612
|
useState as useState30
|
|
14571
14613
|
} from "react";
|
|
14572
14614
|
|
|
@@ -14823,8 +14865,8 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
|
|
|
14823
14865
|
const currentQuestionResult = getQuestionResultByQuestionId(
|
|
14824
14866
|
currentQuestion?.id || ""
|
|
14825
14867
|
);
|
|
14826
|
-
const prevSelectedValuesRef =
|
|
14827
|
-
const prevQuestionIdRef =
|
|
14868
|
+
const prevSelectedValuesRef = useRef17([]);
|
|
14869
|
+
const prevQuestionIdRef = useRef17("");
|
|
14828
14870
|
const allCurrentAnswerIds = useMemo14(() => {
|
|
14829
14871
|
return allCurrentAnswers?.map((answer) => answer.optionId) || [];
|
|
14830
14872
|
}, [allCurrentAnswers]);
|
|
@@ -14924,7 +14966,7 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
14924
14966
|
currentQuestion?.id || ""
|
|
14925
14967
|
);
|
|
14926
14968
|
const currentAnswer = getCurrentAnswer();
|
|
14927
|
-
const textareaRef =
|
|
14969
|
+
const textareaRef = useRef17(null);
|
|
14928
14970
|
const charLimit = getDissertativeCharLimit();
|
|
14929
14971
|
const handleAnswerChange = (value) => {
|
|
14930
14972
|
if (currentQuestion) {
|
|
@@ -16952,6 +16994,186 @@ function useAppContent(config) {
|
|
|
16952
16994
|
};
|
|
16953
16995
|
}
|
|
16954
16996
|
|
|
16997
|
+
// src/components/ActivityCardQuestionBanks/ActivityCardQuestionBanks.tsx
|
|
16998
|
+
import { Plus as Plus2, CheckCircle as CheckCircle7, XCircle as XCircle6 } from "phosphor-react";
|
|
16999
|
+
import { useMemo as useMemo18 } from "react";
|
|
17000
|
+
import { jsx as jsx73, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
17001
|
+
var ActivityCardQuestionBanks = ({
|
|
17002
|
+
question,
|
|
17003
|
+
questionType,
|
|
17004
|
+
iconName = "BookOpen",
|
|
17005
|
+
subjectColor = "#000000",
|
|
17006
|
+
isDark = false,
|
|
17007
|
+
onAddToActivity,
|
|
17008
|
+
assunto,
|
|
17009
|
+
enunciado
|
|
17010
|
+
} = {}) => {
|
|
17011
|
+
const alternatives = useMemo18(() => {
|
|
17012
|
+
if (!question?.options || questionType !== "ALTERNATIVA" /* ALTERNATIVA */)
|
|
17013
|
+
return [];
|
|
17014
|
+
const correctOptionIds2 = question.correctOptionIds || [];
|
|
17015
|
+
return question.options.map((option) => {
|
|
17016
|
+
const isCorrect = correctOptionIds2.includes(option.id);
|
|
17017
|
+
return {
|
|
17018
|
+
value: option.id,
|
|
17019
|
+
label: option.option,
|
|
17020
|
+
status: isCorrect ? "correct" : void 0,
|
|
17021
|
+
disabled: !isCorrect
|
|
17022
|
+
};
|
|
17023
|
+
});
|
|
17024
|
+
}, [question, questionType]);
|
|
17025
|
+
const correctOptionId = useMemo18(() => {
|
|
17026
|
+
if (!question?.correctOptionIds || question.correctOptionIds.length === 0) {
|
|
17027
|
+
return void 0;
|
|
17028
|
+
}
|
|
17029
|
+
return question.correctOptionIds[0];
|
|
17030
|
+
}, [question]);
|
|
17031
|
+
const multipleChoices = useMemo18(() => {
|
|
17032
|
+
if (!question?.options || questionType !== "MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */)
|
|
17033
|
+
return [];
|
|
17034
|
+
const correctOptionIds2 = question.correctOptionIds || [];
|
|
17035
|
+
return question.options.map((option) => {
|
|
17036
|
+
const isCorrect = correctOptionIds2.includes(option.id);
|
|
17037
|
+
return {
|
|
17038
|
+
value: option.id,
|
|
17039
|
+
label: option.option,
|
|
17040
|
+
status: isCorrect ? "correct" : void 0,
|
|
17041
|
+
disabled: !isCorrect
|
|
17042
|
+
};
|
|
17043
|
+
});
|
|
17044
|
+
}, [question, questionType]);
|
|
17045
|
+
const correctOptionIds = useMemo18(() => {
|
|
17046
|
+
return question?.correctOptionIds || [];
|
|
17047
|
+
}, [question]);
|
|
17048
|
+
const getStatusBadge2 = (status) => {
|
|
17049
|
+
switch (status) {
|
|
17050
|
+
case "correct":
|
|
17051
|
+
return /* @__PURE__ */ jsx73(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx73(CheckCircle7, {}), children: "Resposta correta" });
|
|
17052
|
+
case "incorrect":
|
|
17053
|
+
return /* @__PURE__ */ jsx73(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx73(XCircle6, {}), children: "Resposta incorreta" });
|
|
17054
|
+
}
|
|
17055
|
+
};
|
|
17056
|
+
const getStatusStyles2 = (status) => {
|
|
17057
|
+
switch (status) {
|
|
17058
|
+
case "correct":
|
|
17059
|
+
return "bg-success-background border-success-300";
|
|
17060
|
+
case "incorrect":
|
|
17061
|
+
return "bg-error-background border-error-300";
|
|
17062
|
+
}
|
|
17063
|
+
};
|
|
17064
|
+
const getLetterByIndex = (index) => String.fromCodePoint(97 + index);
|
|
17065
|
+
const renderAlternative = () => {
|
|
17066
|
+
if (!question || alternatives.length === 0) return null;
|
|
17067
|
+
return /* @__PURE__ */ jsx73("div", { className: "mt-4", children: /* @__PURE__ */ jsx73(
|
|
17068
|
+
AlternativesList,
|
|
17069
|
+
{
|
|
17070
|
+
alternatives,
|
|
17071
|
+
mode: "readonly",
|
|
17072
|
+
layout: "compact",
|
|
17073
|
+
selectedValue: correctOptionId,
|
|
17074
|
+
name: "teacher-question-view"
|
|
17075
|
+
}
|
|
17076
|
+
) });
|
|
17077
|
+
};
|
|
17078
|
+
const renderMultipleChoice = () => {
|
|
17079
|
+
if (!question || multipleChoices.length === 0) return null;
|
|
17080
|
+
return /* @__PURE__ */ jsx73("div", { className: "mt-4", children: /* @__PURE__ */ jsx73(
|
|
17081
|
+
MultipleChoiceList,
|
|
17082
|
+
{
|
|
17083
|
+
choices: multipleChoices,
|
|
17084
|
+
mode: "readonly",
|
|
17085
|
+
selectedValues: correctOptionIds,
|
|
17086
|
+
name: "teacher-question-view-multiple"
|
|
17087
|
+
}
|
|
17088
|
+
) });
|
|
17089
|
+
};
|
|
17090
|
+
const renderDissertative = () => {
|
|
17091
|
+
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" }) });
|
|
17092
|
+
};
|
|
17093
|
+
const renderTrueOrFalse = () => {
|
|
17094
|
+
if (!question || question.options.length === 0) return null;
|
|
17095
|
+
return /* @__PURE__ */ jsx73("div", { className: "mt-4", children: /* @__PURE__ */ jsx73("div", { className: "flex flex-col gap-3.5", children: question.options.map((option, index) => {
|
|
17096
|
+
const isCorrect = correctOptionIds.includes(option.id);
|
|
17097
|
+
const correctAnswer = isCorrect ? "Verdadeiro" : "Falso";
|
|
17098
|
+
const variantCorrect = "correct";
|
|
17099
|
+
return /* @__PURE__ */ jsx73("section", { className: "flex flex-col gap-2", children: /* @__PURE__ */ jsxs57(
|
|
17100
|
+
"div",
|
|
17101
|
+
{
|
|
17102
|
+
className: cn(
|
|
17103
|
+
"flex flex-row justify-between items-center gap-2 p-2 rounded-md border",
|
|
17104
|
+
getStatusStyles2(variantCorrect)
|
|
17105
|
+
),
|
|
17106
|
+
children: [
|
|
17107
|
+
/* @__PURE__ */ jsx73(Text_default, { size: "sm", className: "text-text-900", children: getLetterByIndex(index).concat(") ").concat(option.option) }),
|
|
17108
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex flex-row items-center gap-2 flex-shrink-0", children: [
|
|
17109
|
+
/* @__PURE__ */ jsxs57(Text_default, { size: "sm", className: "text-text-700", children: [
|
|
17110
|
+
"Resposta correta: ",
|
|
17111
|
+
correctAnswer
|
|
17112
|
+
] }),
|
|
17113
|
+
getStatusBadge2(variantCorrect)
|
|
17114
|
+
] })
|
|
17115
|
+
]
|
|
17116
|
+
}
|
|
17117
|
+
) }, option.id);
|
|
17118
|
+
}) }) });
|
|
17119
|
+
};
|
|
17120
|
+
const renderConnectDots = () => {
|
|
17121
|
+
return null;
|
|
17122
|
+
};
|
|
17123
|
+
const renderFill = () => {
|
|
17124
|
+
return null;
|
|
17125
|
+
};
|
|
17126
|
+
const renderImage = () => {
|
|
17127
|
+
return null;
|
|
17128
|
+
};
|
|
17129
|
+
const questionRenderers = {
|
|
17130
|
+
["ALTERNATIVA" /* ALTERNATIVA */]: renderAlternative,
|
|
17131
|
+
["MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */]: renderMultipleChoice,
|
|
17132
|
+
["DISSERTATIVA" /* DISSERTATIVA */]: renderDissertative,
|
|
17133
|
+
["VERDADEIRO_FALSO" /* VERDADEIRO_FALSO */]: renderTrueOrFalse,
|
|
17134
|
+
["LIGAR_PONTOS" /* LIGAR_PONTOS */]: renderConnectDots,
|
|
17135
|
+
["PREENCHER" /* PREENCHER */]: renderFill,
|
|
17136
|
+
["IMAGEM" /* IMAGEM */]: renderImage
|
|
17137
|
+
};
|
|
17138
|
+
const renderQuestionContent = () => {
|
|
17139
|
+
if (!questionType) return null;
|
|
17140
|
+
const renderer = questionRenderers[questionType];
|
|
17141
|
+
return renderer ? renderer() : null;
|
|
17142
|
+
};
|
|
17143
|
+
return /* @__PURE__ */ jsxs57("div", { className: "w-full flex flex-col gap-2 px-4 py-6", children: [
|
|
17144
|
+
/* @__PURE__ */ jsxs57("section", { className: "flex flex-row gap-2 text-text-650", children: [
|
|
17145
|
+
/* @__PURE__ */ jsxs57("div", { className: "py-1 px-2 flex flex-row items-center gap-1", children: [
|
|
17146
|
+
/* @__PURE__ */ jsx73(
|
|
17147
|
+
"span",
|
|
17148
|
+
{
|
|
17149
|
+
className: "size-4 rounded-sm flex items-center justify-center shrink-0 text-text-950",
|
|
17150
|
+
style: {
|
|
17151
|
+
backgroundColor: getSubjectColorWithOpacity(subjectColor, isDark)
|
|
17152
|
+
},
|
|
17153
|
+
children: /* @__PURE__ */ jsx73(IconRender_default, { iconName, size: 14, color: "currentColor" })
|
|
17154
|
+
}
|
|
17155
|
+
),
|
|
17156
|
+
/* @__PURE__ */ jsx73(Text_default, { size: "sm", children: assunto || "Assunto n\xE3o informado" })
|
|
17157
|
+
] }),
|
|
17158
|
+
/* @__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" }) })
|
|
17159
|
+
] }),
|
|
17160
|
+
/* @__PURE__ */ jsxs57("section", { className: "flex flex-col gap-1", children: [
|
|
17161
|
+
/* @__PURE__ */ jsx73(Text_default, { size: "md", weight: "medium", className: "text-text-950 text-md", children: enunciado || "Enunciado n\xE3o informado" }),
|
|
17162
|
+
renderQuestionContent()
|
|
17163
|
+
] }),
|
|
17164
|
+
/* @__PURE__ */ jsx73("section", { children: /* @__PURE__ */ jsx73(
|
|
17165
|
+
Button_default,
|
|
17166
|
+
{
|
|
17167
|
+
size: "small",
|
|
17168
|
+
iconLeft: /* @__PURE__ */ jsx73(Plus2, {}),
|
|
17169
|
+
className: "w-full",
|
|
17170
|
+
onClick: onAddToActivity,
|
|
17171
|
+
children: "Adicionar \xE0 atividade"
|
|
17172
|
+
}
|
|
17173
|
+
) })
|
|
17174
|
+
] });
|
|
17175
|
+
};
|
|
17176
|
+
|
|
16955
17177
|
// src/types/activityDetails.ts
|
|
16956
17178
|
var STUDENT_ACTIVITY_STATUS = {
|
|
16957
17179
|
CONCLUIDO: "CONCLUIDO",
|
|
@@ -17003,9 +17225,9 @@ var formatDateToBrazilian = (dateString) => {
|
|
|
17003
17225
|
};
|
|
17004
17226
|
|
|
17005
17227
|
// src/components/ActivityDetails/ActivityDetails.tsx
|
|
17006
|
-
import { useState as useState34, useMemo as
|
|
17228
|
+
import { useState as useState34, useMemo as useMemo19, useCallback as useCallback12, useEffect as useEffect36 } from "react";
|
|
17007
17229
|
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
|
|
17230
|
+
import { Fragment as Fragment17, jsx as jsx74, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
17009
17231
|
var createTableColumns = (onCorrectActivity) => [
|
|
17010
17232
|
{
|
|
17011
17233
|
key: "studentName",
|
|
@@ -17013,9 +17235,9 @@ var createTableColumns = (onCorrectActivity) => [
|
|
|
17013
17235
|
sortable: true,
|
|
17014
17236
|
render: (value) => {
|
|
17015
17237
|
const name = typeof value === "string" ? value : "";
|
|
17016
|
-
return /* @__PURE__ */
|
|
17017
|
-
/* @__PURE__ */
|
|
17018
|
-
/* @__PURE__ */
|
|
17238
|
+
return /* @__PURE__ */ jsxs58("div", { className: "flex items-center gap-3", children: [
|
|
17239
|
+
/* @__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() }) }),
|
|
17240
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-sm font-normal text-text-950", children: name })
|
|
17019
17241
|
] });
|
|
17020
17242
|
}
|
|
17021
17243
|
},
|
|
@@ -17025,7 +17247,7 @@ var createTableColumns = (onCorrectActivity) => [
|
|
|
17025
17247
|
sortable: false,
|
|
17026
17248
|
render: (value) => {
|
|
17027
17249
|
const config = getStatusBadgeConfig(value);
|
|
17028
|
-
return /* @__PURE__ */
|
|
17250
|
+
return /* @__PURE__ */ jsx74(
|
|
17029
17251
|
Badge_default,
|
|
17030
17252
|
{
|
|
17031
17253
|
className: `${config.bgColor} ${config.textColor} text-xs px-2 py-1`,
|
|
@@ -17040,22 +17262,22 @@ var createTableColumns = (onCorrectActivity) => [
|
|
|
17040
17262
|
sortable: true,
|
|
17041
17263
|
render: (value) => {
|
|
17042
17264
|
if (!value || typeof value !== "string") {
|
|
17043
|
-
return /* @__PURE__ */
|
|
17265
|
+
return /* @__PURE__ */ jsx74(Text_default, { className: "text-sm text-text-400", children: "-" });
|
|
17044
17266
|
}
|
|
17045
|
-
return /* @__PURE__ */
|
|
17267
|
+
return /* @__PURE__ */ jsx74(Text_default, { className: "text-sm text-text-700", children: formatDateToBrazilian(value) });
|
|
17046
17268
|
}
|
|
17047
17269
|
},
|
|
17048
17270
|
{
|
|
17049
17271
|
key: "timeSpent",
|
|
17050
17272
|
label: "Dura\xE7\xE3o",
|
|
17051
17273
|
sortable: false,
|
|
17052
|
-
render: (value) => Number(value) > 0 ? /* @__PURE__ */
|
|
17274
|
+
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
17275
|
},
|
|
17054
17276
|
{
|
|
17055
17277
|
key: "score",
|
|
17056
17278
|
label: "Nota",
|
|
17057
17279
|
sortable: true,
|
|
17058
|
-
render: (value) => value === null ? /* @__PURE__ */
|
|
17280
|
+
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
17281
|
},
|
|
17060
17282
|
{
|
|
17061
17283
|
key: "actions",
|
|
@@ -17063,7 +17285,7 @@ var createTableColumns = (onCorrectActivity) => [
|
|
|
17063
17285
|
sortable: false,
|
|
17064
17286
|
render: (_value, row) => {
|
|
17065
17287
|
if (row.status === STUDENT_ACTIVITY_STATUS.AGUARDANDO_CORRECAO) {
|
|
17066
|
-
return /* @__PURE__ */
|
|
17288
|
+
return /* @__PURE__ */ jsx74(
|
|
17067
17289
|
Button_default,
|
|
17068
17290
|
{
|
|
17069
17291
|
variant: "outline",
|
|
@@ -17075,7 +17297,7 @@ var createTableColumns = (onCorrectActivity) => [
|
|
|
17075
17297
|
);
|
|
17076
17298
|
}
|
|
17077
17299
|
if (row.status === STUDENT_ACTIVITY_STATUS.CONCLUIDO || row.status === STUDENT_ACTIVITY_STATUS.NAO_ENTREGUE) {
|
|
17078
|
-
return /* @__PURE__ */
|
|
17300
|
+
return /* @__PURE__ */ jsx74(
|
|
17079
17301
|
Button_default,
|
|
17080
17302
|
{
|
|
17081
17303
|
variant: "link",
|
|
@@ -17177,7 +17399,7 @@ var ActivityDetails = ({
|
|
|
17177
17399
|
},
|
|
17178
17400
|
[activityId, correctionData?.studentId, submitObservation]
|
|
17179
17401
|
);
|
|
17180
|
-
const tableData =
|
|
17402
|
+
const tableData = useMemo19(() => {
|
|
17181
17403
|
if (!data?.students) return [];
|
|
17182
17404
|
return data.students.map((student) => ({
|
|
17183
17405
|
id: student.studentId,
|
|
@@ -17189,7 +17411,7 @@ var ActivityDetails = ({
|
|
|
17189
17411
|
score: student.score
|
|
17190
17412
|
}));
|
|
17191
17413
|
}, [data?.students]);
|
|
17192
|
-
const columns =
|
|
17414
|
+
const columns = useMemo19(
|
|
17193
17415
|
() => createTableColumns(handleCorrectActivity),
|
|
17194
17416
|
[handleCorrectActivity]
|
|
17195
17417
|
);
|
|
@@ -17221,10 +17443,10 @@ var ActivityDetails = ({
|
|
|
17221
17443
|
const subjectEnum = data?.activity.subjectName && mapSubjectNameToEnum ? mapSubjectNameToEnum(data.activity.subjectName) : null;
|
|
17222
17444
|
const subjectInfo = subjectEnum ? getSubjectInfo(subjectEnum) : null;
|
|
17223
17445
|
if (loading && !data) {
|
|
17224
|
-
return /* @__PURE__ */
|
|
17225
|
-
/* @__PURE__ */
|
|
17226
|
-
/* @__PURE__ */
|
|
17227
|
-
/* @__PURE__ */
|
|
17446
|
+
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: [
|
|
17447
|
+
/* @__PURE__ */ jsx74("div", { className: "flex items-center gap-2 py-4", children: /* @__PURE__ */ jsx74(SkeletonText, { width: 100, height: 14 }) }),
|
|
17448
|
+
/* @__PURE__ */ jsx74(SkeletonRounded, { className: "w-full h-[120px]" }),
|
|
17449
|
+
/* @__PURE__ */ jsx74(
|
|
17228
17450
|
"div",
|
|
17229
17451
|
{
|
|
17230
17452
|
className: cn(
|
|
@@ -17237,14 +17459,14 @@ var ActivityDetails = ({
|
|
|
17237
17459
|
"pending",
|
|
17238
17460
|
"avg-score",
|
|
17239
17461
|
"avg-time"
|
|
17240
|
-
].map((id) => /* @__PURE__ */
|
|
17462
|
+
].map((id) => /* @__PURE__ */ jsx74(SkeletonRounded, { className: "w-full h-[150px]" }, id))
|
|
17241
17463
|
}
|
|
17242
17464
|
),
|
|
17243
|
-
/* @__PURE__ */
|
|
17465
|
+
/* @__PURE__ */ jsx74("div", { className: "w-full bg-background rounded-xl p-6", children: /* @__PURE__ */ jsx74(SkeletonTable, { rows: 5, columns: 6, showHeader: true }) })
|
|
17244
17466
|
] }) });
|
|
17245
17467
|
}
|
|
17246
17468
|
if (error || !data) {
|
|
17247
|
-
return /* @__PURE__ */
|
|
17469
|
+
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
17470
|
EmptyState_default,
|
|
17249
17471
|
{
|
|
17250
17472
|
image: emptyStateImage,
|
|
@@ -17253,10 +17475,10 @@ var ActivityDetails = ({
|
|
|
17253
17475
|
}
|
|
17254
17476
|
) }) });
|
|
17255
17477
|
}
|
|
17256
|
-
return /* @__PURE__ */
|
|
17257
|
-
/* @__PURE__ */
|
|
17258
|
-
/* @__PURE__ */
|
|
17259
|
-
/* @__PURE__ */
|
|
17478
|
+
return /* @__PURE__ */ jsxs58("div", { className: "flex flex-col w-full h-auto relative justify-center items-center mb-5 overflow-hidden", children: [
|
|
17479
|
+
/* @__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: [
|
|
17480
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex items-center gap-2 py-4", children: [
|
|
17481
|
+
/* @__PURE__ */ jsx74(
|
|
17260
17482
|
"button",
|
|
17261
17483
|
{
|
|
17262
17484
|
onClick: handleBack,
|
|
@@ -17264,31 +17486,31 @@ var ActivityDetails = ({
|
|
|
17264
17486
|
children: "Atividades"
|
|
17265
17487
|
}
|
|
17266
17488
|
),
|
|
17267
|
-
/* @__PURE__ */
|
|
17268
|
-
/* @__PURE__ */
|
|
17489
|
+
/* @__PURE__ */ jsx74(CaretRight9, { size: 16, className: "text-text-500" }),
|
|
17490
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-text-950 text-sm font-bold", children: data.activity.title })
|
|
17269
17491
|
] }),
|
|
17270
|
-
/* @__PURE__ */
|
|
17271
|
-
/* @__PURE__ */
|
|
17272
|
-
/* @__PURE__ */
|
|
17273
|
-
/* @__PURE__ */
|
|
17274
|
-
/* @__PURE__ */
|
|
17492
|
+
/* @__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: [
|
|
17493
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex flex-col gap-2", children: [
|
|
17494
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-2xl font-bold text-text-950", children: data.activity.title }),
|
|
17495
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
17496
|
+
/* @__PURE__ */ jsxs58(Text_default, { className: "text-sm text-text-500", children: [
|
|
17275
17497
|
"In\xEDcio",
|
|
17276
17498
|
" ",
|
|
17277
17499
|
data.activity.startDate ? formatDateToBrazilian(data.activity.startDate) : "00/00/0000"
|
|
17278
17500
|
] }),
|
|
17279
|
-
/* @__PURE__ */
|
|
17280
|
-
/* @__PURE__ */
|
|
17501
|
+
/* @__PURE__ */ jsx74("span", { className: "w-1 h-1 rounded-full bg-text-500" }),
|
|
17502
|
+
/* @__PURE__ */ jsxs58(Text_default, { className: "text-sm text-text-500", children: [
|
|
17281
17503
|
"Prazo final",
|
|
17282
17504
|
" ",
|
|
17283
17505
|
data.activity.finalDate ? formatDateToBrazilian(data.activity.finalDate) : "00/00/0000"
|
|
17284
17506
|
] }),
|
|
17285
|
-
/* @__PURE__ */
|
|
17286
|
-
/* @__PURE__ */
|
|
17287
|
-
/* @__PURE__ */
|
|
17288
|
-
/* @__PURE__ */
|
|
17289
|
-
/* @__PURE__ */
|
|
17290
|
-
subjectInfo ? /* @__PURE__ */
|
|
17291
|
-
/* @__PURE__ */
|
|
17507
|
+
/* @__PURE__ */ jsx74("span", { className: "w-1 h-1 rounded-full bg-text-500" }),
|
|
17508
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-sm text-text-500", children: data.activity.schoolName }),
|
|
17509
|
+
/* @__PURE__ */ jsx74("span", { className: "w-1 h-1 rounded-full bg-text-500" }),
|
|
17510
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-sm text-text-500", children: data.activity.year }),
|
|
17511
|
+
/* @__PURE__ */ jsx74("span", { className: "w-1 h-1 rounded-full bg-text-500" }),
|
|
17512
|
+
subjectInfo ? /* @__PURE__ */ jsxs58("div", { className: "flex items-center gap-1", children: [
|
|
17513
|
+
/* @__PURE__ */ jsx74(
|
|
17292
17514
|
"span",
|
|
17293
17515
|
{
|
|
17294
17516
|
className: cn(
|
|
@@ -17298,33 +17520,33 @@ var ActivityDetails = ({
|
|
|
17298
17520
|
children: subjectInfo.icon
|
|
17299
17521
|
}
|
|
17300
17522
|
),
|
|
17301
|
-
/* @__PURE__ */
|
|
17302
|
-
] }) : /* @__PURE__ */
|
|
17303
|
-
/* @__PURE__ */
|
|
17304
|
-
/* @__PURE__ */
|
|
17523
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-sm text-text-500", children: data.activity.subjectName })
|
|
17524
|
+
] }) : /* @__PURE__ */ jsx74(Text_default, { className: "text-sm text-text-500", children: data.activity.subjectName }),
|
|
17525
|
+
/* @__PURE__ */ jsx74("span", { className: "w-1 h-1 rounded-full bg-text-500" }),
|
|
17526
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-sm text-text-500", children: data.activity.className })
|
|
17305
17527
|
] })
|
|
17306
17528
|
] }),
|
|
17307
|
-
/* @__PURE__ */
|
|
17529
|
+
/* @__PURE__ */ jsxs58(
|
|
17308
17530
|
Button_default,
|
|
17309
17531
|
{
|
|
17310
17532
|
size: "small",
|
|
17311
17533
|
onClick: handleViewActivity,
|
|
17312
17534
|
className: "bg-primary-950 text-text gap-2",
|
|
17313
17535
|
children: [
|
|
17314
|
-
/* @__PURE__ */
|
|
17536
|
+
/* @__PURE__ */ jsx74(File2, { size: 16 }),
|
|
17315
17537
|
"Ver atividade"
|
|
17316
17538
|
]
|
|
17317
17539
|
}
|
|
17318
17540
|
)
|
|
17319
17541
|
] }) }),
|
|
17320
|
-
/* @__PURE__ */
|
|
17542
|
+
/* @__PURE__ */ jsxs58(
|
|
17321
17543
|
"div",
|
|
17322
17544
|
{
|
|
17323
17545
|
className: cn("grid gap-5", isMobile ? "grid-cols-2" : "grid-cols-5"),
|
|
17324
17546
|
children: [
|
|
17325
|
-
/* @__PURE__ */
|
|
17326
|
-
/* @__PURE__ */
|
|
17327
|
-
/* @__PURE__ */
|
|
17547
|
+
/* @__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: [
|
|
17548
|
+
/* @__PURE__ */ jsxs58("svg", { className: "w-full h-full transform -rotate-90", children: [
|
|
17549
|
+
/* @__PURE__ */ jsx74(
|
|
17328
17550
|
"circle",
|
|
17329
17551
|
{
|
|
17330
17552
|
cx: "45",
|
|
@@ -17335,7 +17557,7 @@ var ActivityDetails = ({
|
|
|
17335
17557
|
fill: "none"
|
|
17336
17558
|
}
|
|
17337
17559
|
),
|
|
17338
|
-
/* @__PURE__ */
|
|
17560
|
+
/* @__PURE__ */ jsx74(
|
|
17339
17561
|
"circle",
|
|
17340
17562
|
{
|
|
17341
17563
|
cx: "45",
|
|
@@ -17349,26 +17571,26 @@ var ActivityDetails = ({
|
|
|
17349
17571
|
}
|
|
17350
17572
|
)
|
|
17351
17573
|
] }),
|
|
17352
|
-
/* @__PURE__ */
|
|
17353
|
-
/* @__PURE__ */
|
|
17574
|
+
/* @__PURE__ */ jsxs58("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
17575
|
+
/* @__PURE__ */ jsxs58(Text_default, { className: "text-xl font-medium text-primary-600", children: [
|
|
17354
17576
|
Math.round(data.generalStats.completionPercentage),
|
|
17355
17577
|
"%"
|
|
17356
17578
|
] }),
|
|
17357
|
-
/* @__PURE__ */
|
|
17579
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-2xs font-bold text-text-600 uppercase", children: "Conclu\xEDdo" })
|
|
17358
17580
|
] })
|
|
17359
17581
|
] }) }),
|
|
17360
|
-
/* @__PURE__ */
|
|
17361
|
-
/* @__PURE__ */
|
|
17362
|
-
/* @__PURE__ */
|
|
17363
|
-
/* @__PURE__ */
|
|
17582
|
+
/* @__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: [
|
|
17583
|
+
/* @__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" }) }),
|
|
17584
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-2xs font-bold uppercase text-center text-warning-600", children: "M\xE9dia da Turma" }),
|
|
17585
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-xl font-bold text-warning-600", children: data.generalStats.averageScore.toFixed(1) })
|
|
17364
17586
|
] }),
|
|
17365
|
-
/* @__PURE__ */
|
|
17366
|
-
/* @__PURE__ */
|
|
17367
|
-
/* @__PURE__ */
|
|
17368
|
-
/* @__PURE__ */
|
|
17587
|
+
/* @__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: [
|
|
17588
|
+
/* @__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" }) }),
|
|
17589
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-2xs font-bold uppercase text-center text-success-700", children: "Quest\xF5es com mais acertos" }),
|
|
17590
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-xl font-bold text-success-700", children: formatQuestionNumbers(data.questionStats.mostCorrect) })
|
|
17369
17591
|
] }),
|
|
17370
|
-
/* @__PURE__ */
|
|
17371
|
-
/* @__PURE__ */
|
|
17592
|
+
/* @__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: [
|
|
17593
|
+
/* @__PURE__ */ jsx74("div", { className: "w-[30px] h-[30px] rounded-2xl flex items-center justify-center bg-indicator-negative", children: /* @__PURE__ */ jsx74(
|
|
17372
17594
|
WarningCircle7,
|
|
17373
17595
|
{
|
|
17374
17596
|
size: 16,
|
|
@@ -17376,11 +17598,11 @@ var ActivityDetails = ({
|
|
|
17376
17598
|
weight: "regular"
|
|
17377
17599
|
}
|
|
17378
17600
|
) }),
|
|
17379
|
-
/* @__PURE__ */
|
|
17380
|
-
/* @__PURE__ */
|
|
17601
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-2xs font-bold uppercase text-center text-error-700", children: "Quest\xF5es com mais erros" }),
|
|
17602
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-xl font-bold text-error-700", children: formatQuestionNumbers(data.questionStats.mostIncorrect) })
|
|
17381
17603
|
] }),
|
|
17382
|
-
/* @__PURE__ */
|
|
17383
|
-
/* @__PURE__ */
|
|
17604
|
+
/* @__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: [
|
|
17605
|
+
/* @__PURE__ */ jsx74("div", { className: "w-[30px] h-[30px] rounded-2xl flex items-center justify-center bg-info-500", children: /* @__PURE__ */ jsx74(
|
|
17384
17606
|
WarningCircle7,
|
|
17385
17607
|
{
|
|
17386
17608
|
size: 16,
|
|
@@ -17388,17 +17610,17 @@ var ActivityDetails = ({
|
|
|
17388
17610
|
weight: "regular"
|
|
17389
17611
|
}
|
|
17390
17612
|
) }),
|
|
17391
|
-
/* @__PURE__ */
|
|
17392
|
-
/* @__PURE__ */
|
|
17613
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-2xs font-bold uppercase text-center text-info-700", children: "Quest\xF5es n\xE3o respondidas" }),
|
|
17614
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-xl font-bold text-info-700", children: formatQuestionNumbers(data.questionStats.notAnswered) })
|
|
17393
17615
|
] })
|
|
17394
17616
|
]
|
|
17395
17617
|
}
|
|
17396
17618
|
),
|
|
17397
|
-
correctionError && /* @__PURE__ */
|
|
17398
|
-
/* @__PURE__ */
|
|
17399
|
-
/* @__PURE__ */
|
|
17619
|
+
correctionError && /* @__PURE__ */ jsxs58("div", { className: "w-full bg-error-50 border border-error-200 rounded-xl p-4 flex items-center gap-3", children: [
|
|
17620
|
+
/* @__PURE__ */ jsx74(WarningCircle7, { size: 20, className: "text-error-600", weight: "fill" }),
|
|
17621
|
+
/* @__PURE__ */ jsx74(Text_default, { className: "text-error-700 text-sm", children: correctionError })
|
|
17400
17622
|
] }),
|
|
17401
|
-
/* @__PURE__ */
|
|
17623
|
+
/* @__PURE__ */ jsx74("div", { className: "w-full bg-background rounded-xl p-6 space-y-4", children: /* @__PURE__ */ jsx74(
|
|
17402
17624
|
TableProvider,
|
|
17403
17625
|
{
|
|
17404
17626
|
data: tableData,
|
|
@@ -17415,7 +17637,7 @@ var ActivityDetails = ({
|
|
|
17415
17637
|
totalPages: data.pagination.totalPages
|
|
17416
17638
|
},
|
|
17417
17639
|
emptyState: {
|
|
17418
|
-
component: /* @__PURE__ */
|
|
17640
|
+
component: /* @__PURE__ */ jsx74(
|
|
17419
17641
|
EmptyState_default,
|
|
17420
17642
|
{
|
|
17421
17643
|
image: emptyStateImage,
|
|
@@ -17425,14 +17647,14 @@ var ActivityDetails = ({
|
|
|
17425
17647
|
)
|
|
17426
17648
|
},
|
|
17427
17649
|
onParamsChange: handleTableParamsChange,
|
|
17428
|
-
children: ({ table, pagination }) => /* @__PURE__ */
|
|
17650
|
+
children: ({ table, pagination }) => /* @__PURE__ */ jsxs58(Fragment17, { children: [
|
|
17429
17651
|
table,
|
|
17430
17652
|
pagination
|
|
17431
17653
|
] })
|
|
17432
17654
|
}
|
|
17433
17655
|
) })
|
|
17434
17656
|
] }),
|
|
17435
|
-
/* @__PURE__ */
|
|
17657
|
+
/* @__PURE__ */ jsx74(
|
|
17436
17658
|
CorrectActivityModal_default,
|
|
17437
17659
|
{
|
|
17438
17660
|
isOpen: isModalOpen,
|
|
@@ -17558,36 +17780,36 @@ var mapInternalStatusToApi = (internalStatus) => {
|
|
|
17558
17780
|
|
|
17559
17781
|
// src/components/Support/utils/supportUtils.tsx
|
|
17560
17782
|
import { KeyIcon, BugIcon, InfoIcon } from "@phosphor-icons/react";
|
|
17561
|
-
import { jsx as
|
|
17783
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
17562
17784
|
var getCategoryIcon = (category, size = 16) => {
|
|
17563
17785
|
if (!category) return null;
|
|
17564
17786
|
switch (category) {
|
|
17565
17787
|
case "acesso" /* ACESSO */:
|
|
17566
|
-
return /* @__PURE__ */
|
|
17788
|
+
return /* @__PURE__ */ jsx75(KeyIcon, { size });
|
|
17567
17789
|
case "tecnico" /* TECNICO */:
|
|
17568
|
-
return /* @__PURE__ */
|
|
17790
|
+
return /* @__PURE__ */ jsx75(BugIcon, { size });
|
|
17569
17791
|
case "outros" /* OUTROS */:
|
|
17570
|
-
return /* @__PURE__ */
|
|
17792
|
+
return /* @__PURE__ */ jsx75(InfoIcon, { size });
|
|
17571
17793
|
default:
|
|
17572
|
-
return /* @__PURE__ */
|
|
17794
|
+
return /* @__PURE__ */ jsx75(InfoIcon, { size });
|
|
17573
17795
|
}
|
|
17574
17796
|
};
|
|
17575
17797
|
|
|
17576
17798
|
// src/components/Support/components/TicketModal.tsx
|
|
17577
|
-
import { Fragment as Fragment18, jsx as
|
|
17799
|
+
import { Fragment as Fragment18, jsx as jsx76, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
17578
17800
|
dayjs.locale("pt-br");
|
|
17579
|
-
var AnswerSkeleton = () => /* @__PURE__ */
|
|
17580
|
-
/* @__PURE__ */
|
|
17581
|
-
/* @__PURE__ */
|
|
17582
|
-
/* @__PURE__ */
|
|
17801
|
+
var AnswerSkeleton = () => /* @__PURE__ */ jsxs59("div", { className: "bg-background p-4 space-y-6 rounded-xl", children: [
|
|
17802
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-center space-x-6", children: [
|
|
17803
|
+
/* @__PURE__ */ jsx76(SkeletonText, { width: "80px", height: 16 }),
|
|
17804
|
+
/* @__PURE__ */ jsx76(SkeletonText, { width: "200px", height: 16 })
|
|
17583
17805
|
] }),
|
|
17584
|
-
/* @__PURE__ */
|
|
17585
|
-
/* @__PURE__ */
|
|
17586
|
-
/* @__PURE__ */
|
|
17587
|
-
/* @__PURE__ */
|
|
17588
|
-
/* @__PURE__ */
|
|
17589
|
-
/* @__PURE__ */
|
|
17590
|
-
/* @__PURE__ */
|
|
17806
|
+
/* @__PURE__ */ jsx76(Divider_default, {}),
|
|
17807
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-start space-x-6", children: [
|
|
17808
|
+
/* @__PURE__ */ jsx76(SkeletonText, { width: "80px", height: 16 }),
|
|
17809
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex-1 space-y-2", children: [
|
|
17810
|
+
/* @__PURE__ */ jsx76(SkeletonText, { width: "100%", height: 16 }),
|
|
17811
|
+
/* @__PURE__ */ jsx76(SkeletonText, { width: "80%", height: 16 }),
|
|
17812
|
+
/* @__PURE__ */ jsx76(SkeletonText, { width: "60%", height: 16 })
|
|
17591
17813
|
] })
|
|
17592
17814
|
] })
|
|
17593
17815
|
] });
|
|
@@ -17660,8 +17882,8 @@ var TicketModal = ({
|
|
|
17660
17882
|
setAnswers([]);
|
|
17661
17883
|
}
|
|
17662
17884
|
}, [isOpen, fetchAnswers]);
|
|
17663
|
-
return /* @__PURE__ */
|
|
17664
|
-
/* @__PURE__ */
|
|
17885
|
+
return /* @__PURE__ */ jsxs59(Fragment18, { children: [
|
|
17886
|
+
/* @__PURE__ */ jsx76(
|
|
17665
17887
|
Modal_default,
|
|
17666
17888
|
{
|
|
17667
17889
|
isOpen,
|
|
@@ -17671,10 +17893,10 @@ var TicketModal = ({
|
|
|
17671
17893
|
hideCloseButton: false,
|
|
17672
17894
|
closeOnEscape: true,
|
|
17673
17895
|
"data-testid": "ticket-modal",
|
|
17674
|
-
children: /* @__PURE__ */
|
|
17675
|
-
/* @__PURE__ */
|
|
17676
|
-
/* @__PURE__ */
|
|
17677
|
-
canCloseTicket && /* @__PURE__ */
|
|
17896
|
+
children: /* @__PURE__ */ jsxs59("div", { className: "flex flex-col h-full max-h-[80vh]", children: [
|
|
17897
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex justify-between items-center mb-3", children: [
|
|
17898
|
+
/* @__PURE__ */ jsx76(Text_default, { size: "md", weight: "bold", className: "text-text-950", children: "Detalhes" }),
|
|
17899
|
+
canCloseTicket && /* @__PURE__ */ jsx76(
|
|
17678
17900
|
Button_default,
|
|
17679
17901
|
{
|
|
17680
17902
|
variant: "outline",
|
|
@@ -17685,10 +17907,10 @@ var TicketModal = ({
|
|
|
17685
17907
|
}
|
|
17686
17908
|
)
|
|
17687
17909
|
] }),
|
|
17688
|
-
/* @__PURE__ */
|
|
17689
|
-
/* @__PURE__ */
|
|
17690
|
-
/* @__PURE__ */
|
|
17691
|
-
/* @__PURE__ */
|
|
17910
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex-1 overflow-y-auto pr-2 space-y-6", children: [
|
|
17911
|
+
/* @__PURE__ */ jsxs59("div", { className: "bg-background p-4 space-y-6 rounded-xl", children: [
|
|
17912
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-center space-x-6", children: [
|
|
17913
|
+
/* @__PURE__ */ jsx76(
|
|
17692
17914
|
Text_default,
|
|
17693
17915
|
{
|
|
17694
17916
|
size: "md",
|
|
@@ -17697,10 +17919,10 @@ var TicketModal = ({
|
|
|
17697
17919
|
children: "ID"
|
|
17698
17920
|
}
|
|
17699
17921
|
),
|
|
17700
|
-
/* @__PURE__ */
|
|
17922
|
+
/* @__PURE__ */ jsx76(Text_default, { size: "md", weight: "normal", className: "text-text-600", children: ticket.id })
|
|
17701
17923
|
] }),
|
|
17702
|
-
/* @__PURE__ */
|
|
17703
|
-
/* @__PURE__ */
|
|
17924
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-center space-x-6", children: [
|
|
17925
|
+
/* @__PURE__ */ jsx76(
|
|
17704
17926
|
Text_default,
|
|
17705
17927
|
{
|
|
17706
17928
|
size: "md",
|
|
@@ -17709,10 +17931,10 @@ var TicketModal = ({
|
|
|
17709
17931
|
children: "Aberto em"
|
|
17710
17932
|
}
|
|
17711
17933
|
),
|
|
17712
|
-
/* @__PURE__ */
|
|
17934
|
+
/* @__PURE__ */ jsx76(Text_default, { size: "md", weight: "normal", className: "text-text-600", children: dayjs(ticket.createdAt).format("DD MMMM YYYY, [\xE0s] HH[h]") })
|
|
17713
17935
|
] }),
|
|
17714
|
-
/* @__PURE__ */
|
|
17715
|
-
/* @__PURE__ */
|
|
17936
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-center space-x-6", children: [
|
|
17937
|
+
/* @__PURE__ */ jsx76(
|
|
17716
17938
|
Text_default,
|
|
17717
17939
|
{
|
|
17718
17940
|
size: "md",
|
|
@@ -17721,7 +17943,7 @@ var TicketModal = ({
|
|
|
17721
17943
|
children: "Status"
|
|
17722
17944
|
}
|
|
17723
17945
|
),
|
|
17724
|
-
/* @__PURE__ */
|
|
17946
|
+
/* @__PURE__ */ jsx76(
|
|
17725
17947
|
Badge_default,
|
|
17726
17948
|
{
|
|
17727
17949
|
variant: "solid",
|
|
@@ -17732,8 +17954,8 @@ var TicketModal = ({
|
|
|
17732
17954
|
}
|
|
17733
17955
|
)
|
|
17734
17956
|
] }),
|
|
17735
|
-
/* @__PURE__ */
|
|
17736
|
-
/* @__PURE__ */
|
|
17957
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-center space-x-6", children: [
|
|
17958
|
+
/* @__PURE__ */ jsx76(
|
|
17737
17959
|
Text_default,
|
|
17738
17960
|
{
|
|
17739
17961
|
size: "md",
|
|
@@ -17742,7 +17964,7 @@ var TicketModal = ({
|
|
|
17742
17964
|
children: "Tipo"
|
|
17743
17965
|
}
|
|
17744
17966
|
),
|
|
17745
|
-
/* @__PURE__ */
|
|
17967
|
+
/* @__PURE__ */ jsxs59(
|
|
17746
17968
|
Badge_default,
|
|
17747
17969
|
{
|
|
17748
17970
|
variant: "solid",
|
|
@@ -17756,9 +17978,9 @@ var TicketModal = ({
|
|
|
17756
17978
|
}
|
|
17757
17979
|
)
|
|
17758
17980
|
] }),
|
|
17759
|
-
/* @__PURE__ */
|
|
17760
|
-
/* @__PURE__ */
|
|
17761
|
-
/* @__PURE__ */
|
|
17981
|
+
/* @__PURE__ */ jsx76(Divider_default, {}),
|
|
17982
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-start space-x-6", children: [
|
|
17983
|
+
/* @__PURE__ */ jsx76(
|
|
17762
17984
|
Text_default,
|
|
17763
17985
|
{
|
|
17764
17986
|
size: "md",
|
|
@@ -17767,24 +17989,24 @@ var TicketModal = ({
|
|
|
17767
17989
|
children: "Descri\xE7\xE3o"
|
|
17768
17990
|
}
|
|
17769
17991
|
),
|
|
17770
|
-
ticket.description && /* @__PURE__ */
|
|
17992
|
+
ticket.description && /* @__PURE__ */ jsx76(Text_default, { size: "md", weight: "normal", className: "text-text-600", children: ticket.description })
|
|
17771
17993
|
] })
|
|
17772
17994
|
] }),
|
|
17773
|
-
ticket.status === "respondido" /* RESPONDIDO */ && isLoadingAnswers && /* @__PURE__ */
|
|
17774
|
-
/* @__PURE__ */
|
|
17775
|
-
/* @__PURE__ */
|
|
17995
|
+
ticket.status === "respondido" /* RESPONDIDO */ && isLoadingAnswers && /* @__PURE__ */ jsxs59(Fragment18, { children: [
|
|
17996
|
+
/* @__PURE__ */ jsx76(Text_default, { size: "md", weight: "bold", className: "text-text-950 my-6", children: "Resposta de Suporte T\xE9cnico" }),
|
|
17997
|
+
/* @__PURE__ */ jsx76(AnswerSkeleton, {})
|
|
17776
17998
|
] }),
|
|
17777
|
-
!isLoadingAnswers && answers.some((answer) => answer.userId !== userId) && /* @__PURE__ */
|
|
17778
|
-
/* @__PURE__ */
|
|
17999
|
+
!isLoadingAnswers && answers.some((answer) => answer.userId !== userId) && /* @__PURE__ */ jsxs59(Fragment18, { children: [
|
|
18000
|
+
/* @__PURE__ */ jsx76(Text_default, { size: "md", weight: "bold", className: "text-text-950 my-6", children: "Resposta de Suporte T\xE9cnico" }),
|
|
17779
18001
|
answers.filter((answer) => answer.userId !== userId).sort(
|
|
17780
18002
|
(a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()
|
|
17781
|
-
).slice(0, 1).map((answer) => /* @__PURE__ */
|
|
18003
|
+
).slice(0, 1).map((answer) => /* @__PURE__ */ jsxs59(
|
|
17782
18004
|
"div",
|
|
17783
18005
|
{
|
|
17784
18006
|
className: "bg-background p-4 space-y-6 rounded-xl",
|
|
17785
18007
|
children: [
|
|
17786
|
-
/* @__PURE__ */
|
|
17787
|
-
/* @__PURE__ */
|
|
18008
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-center space-x-6", children: [
|
|
18009
|
+
/* @__PURE__ */ jsx76(
|
|
17788
18010
|
Text_default,
|
|
17789
18011
|
{
|
|
17790
18012
|
size: "md",
|
|
@@ -17793,7 +18015,7 @@ var TicketModal = ({
|
|
|
17793
18015
|
children: "Recebido"
|
|
17794
18016
|
}
|
|
17795
18017
|
),
|
|
17796
|
-
/* @__PURE__ */
|
|
18018
|
+
/* @__PURE__ */ jsx76(
|
|
17797
18019
|
Text_default,
|
|
17798
18020
|
{
|
|
17799
18021
|
size: "md",
|
|
@@ -17805,9 +18027,9 @@ var TicketModal = ({
|
|
|
17805
18027
|
}
|
|
17806
18028
|
)
|
|
17807
18029
|
] }),
|
|
17808
|
-
/* @__PURE__ */
|
|
17809
|
-
/* @__PURE__ */
|
|
17810
|
-
/* @__PURE__ */
|
|
18030
|
+
/* @__PURE__ */ jsx76(Divider_default, {}),
|
|
18031
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-start space-x-6", children: [
|
|
18032
|
+
/* @__PURE__ */ jsx76(
|
|
17811
18033
|
Text_default,
|
|
17812
18034
|
{
|
|
17813
18035
|
size: "md",
|
|
@@ -17816,7 +18038,7 @@ var TicketModal = ({
|
|
|
17816
18038
|
children: "Resposta"
|
|
17817
18039
|
}
|
|
17818
18040
|
),
|
|
17819
|
-
/* @__PURE__ */
|
|
18041
|
+
/* @__PURE__ */ jsx76(
|
|
17820
18042
|
Text_default,
|
|
17821
18043
|
{
|
|
17822
18044
|
size: "md",
|
|
@@ -17831,17 +18053,17 @@ var TicketModal = ({
|
|
|
17831
18053
|
answer.id
|
|
17832
18054
|
))
|
|
17833
18055
|
] }),
|
|
17834
|
-
!isLoadingAnswers && answers.some((answer) => answer.userId === userId) && /* @__PURE__ */
|
|
17835
|
-
/* @__PURE__ */
|
|
18056
|
+
!isLoadingAnswers && answers.some((answer) => answer.userId === userId) && /* @__PURE__ */ jsxs59(Fragment18, { children: [
|
|
18057
|
+
/* @__PURE__ */ jsx76(Text_default, { size: "md", weight: "bold", className: "text-text-950 my-6", children: "Resposta enviada" }),
|
|
17836
18058
|
answers.filter((answer) => answer.userId === userId).sort(
|
|
17837
18059
|
(a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()
|
|
17838
|
-
).slice(0, 1).map((answer) => /* @__PURE__ */
|
|
18060
|
+
).slice(0, 1).map((answer) => /* @__PURE__ */ jsxs59(
|
|
17839
18061
|
"div",
|
|
17840
18062
|
{
|
|
17841
18063
|
className: "bg-background p-4 space-y-6 rounded-xl",
|
|
17842
18064
|
children: [
|
|
17843
|
-
/* @__PURE__ */
|
|
17844
|
-
/* @__PURE__ */
|
|
18065
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-center space-x-6", children: [
|
|
18066
|
+
/* @__PURE__ */ jsx76(
|
|
17845
18067
|
Text_default,
|
|
17846
18068
|
{
|
|
17847
18069
|
size: "md",
|
|
@@ -17850,7 +18072,7 @@ var TicketModal = ({
|
|
|
17850
18072
|
children: "Enviada"
|
|
17851
18073
|
}
|
|
17852
18074
|
),
|
|
17853
|
-
/* @__PURE__ */
|
|
18075
|
+
/* @__PURE__ */ jsx76(
|
|
17854
18076
|
Text_default,
|
|
17855
18077
|
{
|
|
17856
18078
|
size: "md",
|
|
@@ -17862,9 +18084,9 @@ var TicketModal = ({
|
|
|
17862
18084
|
}
|
|
17863
18085
|
)
|
|
17864
18086
|
] }),
|
|
17865
|
-
/* @__PURE__ */
|
|
17866
|
-
/* @__PURE__ */
|
|
17867
|
-
/* @__PURE__ */
|
|
18087
|
+
/* @__PURE__ */ jsx76(Divider_default, {}),
|
|
18088
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-start space-x-6", children: [
|
|
18089
|
+
/* @__PURE__ */ jsx76(
|
|
17868
18090
|
Text_default,
|
|
17869
18091
|
{
|
|
17870
18092
|
size: "md",
|
|
@@ -17873,7 +18095,7 @@ var TicketModal = ({
|
|
|
17873
18095
|
children: "Resposta"
|
|
17874
18096
|
}
|
|
17875
18097
|
),
|
|
17876
|
-
/* @__PURE__ */
|
|
18098
|
+
/* @__PURE__ */ jsx76(
|
|
17877
18099
|
Text_default,
|
|
17878
18100
|
{
|
|
17879
18101
|
size: "md",
|
|
@@ -17888,10 +18110,10 @@ var TicketModal = ({
|
|
|
17888
18110
|
answer.id
|
|
17889
18111
|
))
|
|
17890
18112
|
] }),
|
|
17891
|
-
!isLoadingAnswers && answers.some((answer) => answer.userId !== userId) && /* @__PURE__ */
|
|
17892
|
-
/* @__PURE__ */
|
|
17893
|
-
/* @__PURE__ */
|
|
17894
|
-
/* @__PURE__ */
|
|
18113
|
+
!isLoadingAnswers && answers.some((answer) => answer.userId !== userId) && /* @__PURE__ */ jsxs59(Fragment18, { children: [
|
|
18114
|
+
/* @__PURE__ */ jsx76(Text_default, { size: "lg", weight: "bold", className: "text-text-950 my-6", children: "Responder" }),
|
|
18115
|
+
/* @__PURE__ */ jsxs59("div", { className: "space-y-4", children: [
|
|
18116
|
+
/* @__PURE__ */ jsx76(
|
|
17895
18117
|
TextArea_default,
|
|
17896
18118
|
{
|
|
17897
18119
|
placeholder: "Detalhe o problema aqui.",
|
|
@@ -17901,7 +18123,7 @@ var TicketModal = ({
|
|
|
17901
18123
|
onChange: (e) => setResponseText(e.target.value)
|
|
17902
18124
|
}
|
|
17903
18125
|
),
|
|
17904
|
-
responseText.trim().length > 0 && /* @__PURE__ */
|
|
18126
|
+
responseText.trim().length > 0 && /* @__PURE__ */ jsx76("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx76(
|
|
17905
18127
|
Button_default,
|
|
17906
18128
|
{
|
|
17907
18129
|
variant: "solid",
|
|
@@ -17917,7 +18139,7 @@ var TicketModal = ({
|
|
|
17917
18139
|
] })
|
|
17918
18140
|
}
|
|
17919
18141
|
),
|
|
17920
|
-
/* @__PURE__ */
|
|
18142
|
+
/* @__PURE__ */ jsx76(
|
|
17921
18143
|
Modal_default,
|
|
17922
18144
|
{
|
|
17923
18145
|
isOpen: showCloseConfirmation,
|
|
@@ -17927,10 +18149,10 @@ var TicketModal = ({
|
|
|
17927
18149
|
hideCloseButton: false,
|
|
17928
18150
|
closeOnEscape: true,
|
|
17929
18151
|
"data-testid": "close-ticket-modal",
|
|
17930
|
-
children: /* @__PURE__ */
|
|
17931
|
-
/* @__PURE__ */
|
|
17932
|
-
/* @__PURE__ */
|
|
17933
|
-
/* @__PURE__ */
|
|
18152
|
+
children: /* @__PURE__ */ jsxs59("div", { className: "space-y-6", children: [
|
|
18153
|
+
/* @__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." }),
|
|
18154
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex gap-3 justify-end", children: [
|
|
18155
|
+
/* @__PURE__ */ jsx76(
|
|
17934
18156
|
Button_default,
|
|
17935
18157
|
{
|
|
17936
18158
|
variant: "outline",
|
|
@@ -17939,7 +18161,7 @@ var TicketModal = ({
|
|
|
17939
18161
|
children: "Cancelar"
|
|
17940
18162
|
}
|
|
17941
18163
|
),
|
|
17942
|
-
/* @__PURE__ */
|
|
18164
|
+
/* @__PURE__ */ jsx76(
|
|
17943
18165
|
Button_default,
|
|
17944
18166
|
{
|
|
17945
18167
|
variant: "solid",
|
|
@@ -17960,20 +18182,20 @@ var TicketModal = ({
|
|
|
17960
18182
|
var suporthistory_default = "./suporthistory-W5LBGAUP.png";
|
|
17961
18183
|
|
|
17962
18184
|
// src/components/Support/Support.tsx
|
|
17963
|
-
import { jsx as
|
|
18185
|
+
import { jsx as jsx77, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
17964
18186
|
var TicketCard = ({
|
|
17965
18187
|
ticket,
|
|
17966
18188
|
onTicketClick
|
|
17967
|
-
}) => /* @__PURE__ */
|
|
18189
|
+
}) => /* @__PURE__ */ jsxs60(
|
|
17968
18190
|
"button",
|
|
17969
18191
|
{
|
|
17970
18192
|
type: "button",
|
|
17971
18193
|
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
18194
|
onClick: () => onTicketClick(ticket),
|
|
17973
18195
|
children: [
|
|
17974
|
-
/* @__PURE__ */
|
|
17975
|
-
/* @__PURE__ */
|
|
17976
|
-
/* @__PURE__ */
|
|
18196
|
+
/* @__PURE__ */ jsx77("div", { className: "flex flex-col", children: /* @__PURE__ */ jsx77(Text_default, { size: "xs", weight: "bold", className: "text-text-900", children: ticket.title }) }),
|
|
18197
|
+
/* @__PURE__ */ jsxs60("div", { className: "flex items-center gap-3", children: [
|
|
18198
|
+
/* @__PURE__ */ jsx77(
|
|
17977
18199
|
Badge_default,
|
|
17978
18200
|
{
|
|
17979
18201
|
variant: "solid",
|
|
@@ -17982,11 +18204,11 @@ var TicketCard = ({
|
|
|
17982
18204
|
children: getStatusText(ticket.status)
|
|
17983
18205
|
}
|
|
17984
18206
|
),
|
|
17985
|
-
/* @__PURE__ */
|
|
18207
|
+
/* @__PURE__ */ jsxs60(Badge_default, { variant: "solid", className: "flex items-center gap-1", action: "muted", children: [
|
|
17986
18208
|
getCategoryIcon(ticket.category, 18),
|
|
17987
18209
|
getCategoryText(ticket.category)
|
|
17988
18210
|
] }),
|
|
17989
|
-
/* @__PURE__ */
|
|
18211
|
+
/* @__PURE__ */ jsx77(CaretRightIcon, { size: 24, className: "text-text-800" })
|
|
17990
18212
|
] })
|
|
17991
18213
|
]
|
|
17992
18214
|
},
|
|
@@ -17996,9 +18218,9 @@ var TicketGroup = ({
|
|
|
17996
18218
|
date,
|
|
17997
18219
|
tickets,
|
|
17998
18220
|
onTicketClick
|
|
17999
|
-
}) => /* @__PURE__ */
|
|
18000
|
-
/* @__PURE__ */
|
|
18001
|
-
/* @__PURE__ */
|
|
18221
|
+
}) => /* @__PURE__ */ jsxs60("div", { className: "space-y-4", children: [
|
|
18222
|
+
/* @__PURE__ */ jsx77(Text_default, { size: "md", weight: "bold", className: "text-text-900", children: dayjs2(date).format("DD MMM YYYY") }),
|
|
18223
|
+
/* @__PURE__ */ jsx77("div", { className: "space-y-3", children: tickets.map((ticket) => /* @__PURE__ */ jsx77(
|
|
18002
18224
|
TicketCard,
|
|
18003
18225
|
{
|
|
18004
18226
|
ticket,
|
|
@@ -18007,13 +18229,13 @@ var TicketGroup = ({
|
|
|
18007
18229
|
ticket.id
|
|
18008
18230
|
)) })
|
|
18009
18231
|
] }, date);
|
|
18010
|
-
var EmptyState2 = ({ imageSrc }) => /* @__PURE__ */
|
|
18011
|
-
imageSrc && /* @__PURE__ */
|
|
18012
|
-
/* @__PURE__ */
|
|
18232
|
+
var EmptyState2 = ({ imageSrc }) => /* @__PURE__ */ jsxs60("div", { className: "flex flex-row justify-center items-center mt-48", children: [
|
|
18233
|
+
imageSrc && /* @__PURE__ */ jsx77("img", { src: imageSrc, alt: "Imagem de suporte" }),
|
|
18234
|
+
/* @__PURE__ */ jsx77(Text_default, { size: "3xl", weight: "semibold", children: "Nenhum pedido encontrado." })
|
|
18013
18235
|
] });
|
|
18014
|
-
var TicketSkeleton = () => /* @__PURE__ */
|
|
18015
|
-
/* @__PURE__ */
|
|
18016
|
-
/* @__PURE__ */
|
|
18236
|
+
var TicketSkeleton = () => /* @__PURE__ */ jsx77("div", { className: "space-y-6", children: [0, 1].map((groupIndex) => /* @__PURE__ */ jsxs60("div", { className: "space-y-4", children: [
|
|
18237
|
+
/* @__PURE__ */ jsx77(SkeletonText, { width: "150px", height: 20 }),
|
|
18238
|
+
/* @__PURE__ */ jsx77("div", { className: "space-y-3", children: [0, 1].map((ticketIndex) => /* @__PURE__ */ jsx77(
|
|
18017
18239
|
SkeletonRounded,
|
|
18018
18240
|
{
|
|
18019
18241
|
width: "100%",
|
|
@@ -18194,25 +18416,25 @@ var Support = ({
|
|
|
18194
18416
|
{
|
|
18195
18417
|
id: "tecnico" /* TECNICO */,
|
|
18196
18418
|
title: "T\xE9cnico",
|
|
18197
|
-
icon: /* @__PURE__ */
|
|
18419
|
+
icon: /* @__PURE__ */ jsx77(BugIcon2, { size: 24 })
|
|
18198
18420
|
},
|
|
18199
18421
|
{
|
|
18200
18422
|
id: "acesso" /* ACESSO */,
|
|
18201
18423
|
title: "Acesso",
|
|
18202
|
-
icon: /* @__PURE__ */
|
|
18424
|
+
icon: /* @__PURE__ */ jsx77(KeyIcon2, { size: 24 })
|
|
18203
18425
|
},
|
|
18204
18426
|
{
|
|
18205
18427
|
id: "outros" /* OUTROS */,
|
|
18206
18428
|
title: "Outros",
|
|
18207
|
-
icon: /* @__PURE__ */
|
|
18429
|
+
icon: /* @__PURE__ */ jsx77(InfoIcon2, { size: 24 })
|
|
18208
18430
|
}
|
|
18209
18431
|
];
|
|
18210
18432
|
const emptyImage = emptyStateImage || suporthistory_default;
|
|
18211
|
-
return /* @__PURE__ */
|
|
18212
|
-
/* @__PURE__ */
|
|
18213
|
-
/* @__PURE__ */
|
|
18214
|
-
/* @__PURE__ */
|
|
18215
|
-
/* @__PURE__ */
|
|
18433
|
+
return /* @__PURE__ */ jsxs60("div", { className: "flex flex-col w-full h-full relative justify-start items-center mb-5 overflow-y-auto", children: [
|
|
18434
|
+
/* @__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: [
|
|
18435
|
+
/* @__PURE__ */ jsxs60("div", { className: "flex w-full mb-4 flex-row items-center justify-between not-lg:gap-4 lg:gap-6", children: [
|
|
18436
|
+
/* @__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 }),
|
|
18437
|
+
/* @__PURE__ */ jsx77("div", { className: "sm:flex-shrink-0 sm:self-end", children: /* @__PURE__ */ jsx77(
|
|
18216
18438
|
Menu_default,
|
|
18217
18439
|
{
|
|
18218
18440
|
value: activeTab,
|
|
@@ -18220,8 +18442,8 @@ var Support = ({
|
|
|
18220
18442
|
variant: "menu2",
|
|
18221
18443
|
onValueChange: (value) => setActiveTab(value),
|
|
18222
18444
|
className: "bg-transparent shadow-none px-0",
|
|
18223
|
-
children: /* @__PURE__ */
|
|
18224
|
-
/* @__PURE__ */
|
|
18445
|
+
children: /* @__PURE__ */ jsxs60(MenuContent, { variant: "menu2", children: [
|
|
18446
|
+
/* @__PURE__ */ jsx77(
|
|
18225
18447
|
MenuItem,
|
|
18226
18448
|
{
|
|
18227
18449
|
variant: "menu2",
|
|
@@ -18230,7 +18452,7 @@ var Support = ({
|
|
|
18230
18452
|
children: "Criar Pedido"
|
|
18231
18453
|
}
|
|
18232
18454
|
),
|
|
18233
|
-
/* @__PURE__ */
|
|
18455
|
+
/* @__PURE__ */ jsx77(
|
|
18234
18456
|
MenuItem,
|
|
18235
18457
|
{
|
|
18236
18458
|
variant: "menu2",
|
|
@@ -18243,9 +18465,9 @@ var Support = ({
|
|
|
18243
18465
|
}
|
|
18244
18466
|
) })
|
|
18245
18467
|
] }),
|
|
18246
|
-
activeTab === "criar-pedido" && /* @__PURE__ */
|
|
18247
|
-
/* @__PURE__ */
|
|
18248
|
-
/* @__PURE__ */
|
|
18468
|
+
activeTab === "criar-pedido" && /* @__PURE__ */ jsxs60("div", { className: "space-y-2", children: [
|
|
18469
|
+
/* @__PURE__ */ jsx77(Text_default, { as: "h2", size: "md", weight: "bold", className: "text-text-900", children: "Selecione o tipo de problema" }),
|
|
18470
|
+
/* @__PURE__ */ jsx77("div", { className: "flex flex-col sm:flex-row gap-2 sm:gap-4", children: problemTypes.map((type) => /* @__PURE__ */ jsx77(
|
|
18249
18471
|
SelectionButton_default,
|
|
18250
18472
|
{
|
|
18251
18473
|
icon: type.icon,
|
|
@@ -18256,10 +18478,10 @@ var Support = ({
|
|
|
18256
18478
|
},
|
|
18257
18479
|
type.id
|
|
18258
18480
|
)) }),
|
|
18259
|
-
errors.problemType && /* @__PURE__ */
|
|
18481
|
+
errors.problemType && /* @__PURE__ */ jsx77(Text_default, { size: "sm", className: "text-red-500 mt-1", children: errors.problemType.message })
|
|
18260
18482
|
] }),
|
|
18261
|
-
selectedProblem && activeTab === "criar-pedido" && /* @__PURE__ */
|
|
18262
|
-
/* @__PURE__ */
|
|
18483
|
+
selectedProblem && activeTab === "criar-pedido" && /* @__PURE__ */ jsxs60("form", { onSubmit: handleSubmit(onSubmit), className: "space-y-4", children: [
|
|
18484
|
+
/* @__PURE__ */ jsx77("div", { className: "space-y-1", children: /* @__PURE__ */ jsx77(
|
|
18263
18485
|
Input_default,
|
|
18264
18486
|
{
|
|
18265
18487
|
size: "large",
|
|
@@ -18270,7 +18492,7 @@ var Support = ({
|
|
|
18270
18492
|
errorMessage: errors.title?.message
|
|
18271
18493
|
}
|
|
18272
18494
|
) }),
|
|
18273
|
-
/* @__PURE__ */
|
|
18495
|
+
/* @__PURE__ */ jsx77("div", { className: "space-y-1", children: /* @__PURE__ */ jsx77(
|
|
18274
18496
|
TextArea_default,
|
|
18275
18497
|
{
|
|
18276
18498
|
size: "large",
|
|
@@ -18280,7 +18502,7 @@ var Support = ({
|
|
|
18280
18502
|
errorMessage: errors.description?.message
|
|
18281
18503
|
}
|
|
18282
18504
|
) }),
|
|
18283
|
-
/* @__PURE__ */
|
|
18505
|
+
/* @__PURE__ */ jsx77(
|
|
18284
18506
|
Button_default,
|
|
18285
18507
|
{
|
|
18286
18508
|
size: "large",
|
|
@@ -18290,11 +18512,11 @@ var Support = ({
|
|
|
18290
18512
|
children: isSubmitting ? "Enviando..." : "Enviar Pedido"
|
|
18291
18513
|
}
|
|
18292
18514
|
),
|
|
18293
|
-
submitError && /* @__PURE__ */
|
|
18515
|
+
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
18516
|
] }),
|
|
18295
|
-
activeTab === "historico" && /* @__PURE__ */
|
|
18296
|
-
/* @__PURE__ */
|
|
18297
|
-
/* @__PURE__ */
|
|
18517
|
+
activeTab === "historico" && /* @__PURE__ */ jsxs60("div", { className: "space-y-6", children: [
|
|
18518
|
+
/* @__PURE__ */ jsxs60("div", { className: "flex gap-4", children: [
|
|
18519
|
+
/* @__PURE__ */ jsx77("div", { className: "flex flex-col flex-1/2 space-y-1", children: /* @__PURE__ */ jsxs60(
|
|
18298
18520
|
Select_default,
|
|
18299
18521
|
{
|
|
18300
18522
|
label: "Status",
|
|
@@ -18302,17 +18524,17 @@ var Support = ({
|
|
|
18302
18524
|
value: statusFilter,
|
|
18303
18525
|
onValueChange: setStatusFilter,
|
|
18304
18526
|
children: [
|
|
18305
|
-
/* @__PURE__ */
|
|
18306
|
-
/* @__PURE__ */
|
|
18307
|
-
/* @__PURE__ */
|
|
18308
|
-
/* @__PURE__ */
|
|
18309
|
-
/* @__PURE__ */
|
|
18310
|
-
/* @__PURE__ */
|
|
18527
|
+
/* @__PURE__ */ jsx77(SelectTrigger, { variant: "rounded", className: "", children: /* @__PURE__ */ jsx77(SelectValue, { placeholder: "Todos" }) }),
|
|
18528
|
+
/* @__PURE__ */ jsxs60(SelectContent, { children: [
|
|
18529
|
+
/* @__PURE__ */ jsx77(SelectItem, { value: "todos", children: "Todos" }),
|
|
18530
|
+
/* @__PURE__ */ jsx77(SelectItem, { value: "aberto" /* ABERTO */, children: "Aberto" }),
|
|
18531
|
+
/* @__PURE__ */ jsx77(SelectItem, { value: "respondido" /* RESPONDIDO */, children: "Respondido" }),
|
|
18532
|
+
/* @__PURE__ */ jsx77(SelectItem, { value: "encerrado" /* ENCERRADO */, children: "Encerrado" })
|
|
18311
18533
|
] })
|
|
18312
18534
|
]
|
|
18313
18535
|
}
|
|
18314
18536
|
) }),
|
|
18315
|
-
/* @__PURE__ */
|
|
18537
|
+
/* @__PURE__ */ jsx77("div", { className: "flex flex-col flex-1/2 space-y-1", children: /* @__PURE__ */ jsxs60(
|
|
18316
18538
|
Select_default,
|
|
18317
18539
|
{
|
|
18318
18540
|
label: "Tipo",
|
|
@@ -18320,19 +18542,19 @@ var Support = ({
|
|
|
18320
18542
|
value: categoryFilter,
|
|
18321
18543
|
onValueChange: setCategoryFilter,
|
|
18322
18544
|
children: [
|
|
18323
|
-
/* @__PURE__ */
|
|
18324
|
-
/* @__PURE__ */
|
|
18325
|
-
/* @__PURE__ */
|
|
18326
|
-
/* @__PURE__ */
|
|
18327
|
-
/* @__PURE__ */
|
|
18545
|
+
/* @__PURE__ */ jsx77(SelectTrigger, { variant: "rounded", className: "", children: /* @__PURE__ */ jsx77(SelectValue, { placeholder: "Todos" }) }),
|
|
18546
|
+
/* @__PURE__ */ jsxs60(SelectContent, { children: [
|
|
18547
|
+
/* @__PURE__ */ jsx77(SelectItem, { value: "todos", children: "Todos" }),
|
|
18548
|
+
/* @__PURE__ */ jsxs60(SelectItem, { value: "tecnico" /* TECNICO */, children: [
|
|
18549
|
+
/* @__PURE__ */ jsx77(BugIcon2, { size: 16 }),
|
|
18328
18550
|
" T\xE9cnico"
|
|
18329
18551
|
] }),
|
|
18330
|
-
/* @__PURE__ */
|
|
18331
|
-
/* @__PURE__ */
|
|
18552
|
+
/* @__PURE__ */ jsxs60(SelectItem, { value: "acesso" /* ACESSO */, children: [
|
|
18553
|
+
/* @__PURE__ */ jsx77(KeyIcon2, { size: 16 }),
|
|
18332
18554
|
" Acesso"
|
|
18333
18555
|
] }),
|
|
18334
|
-
/* @__PURE__ */
|
|
18335
|
-
/* @__PURE__ */
|
|
18556
|
+
/* @__PURE__ */ jsxs60(SelectItem, { value: "outros" /* OUTROS */, children: [
|
|
18557
|
+
/* @__PURE__ */ jsx77(InfoIcon2, { size: 16 }),
|
|
18336
18558
|
" Outros"
|
|
18337
18559
|
] })
|
|
18338
18560
|
] })
|
|
@@ -18342,14 +18564,14 @@ var Support = ({
|
|
|
18342
18564
|
] }),
|
|
18343
18565
|
(() => {
|
|
18344
18566
|
if (loadingTickets) {
|
|
18345
|
-
return /* @__PURE__ */
|
|
18567
|
+
return /* @__PURE__ */ jsx77(TicketSkeleton, {});
|
|
18346
18568
|
}
|
|
18347
18569
|
if (Object.keys(groupedTickets).length === 0) {
|
|
18348
|
-
return /* @__PURE__ */
|
|
18570
|
+
return /* @__PURE__ */ jsx77(EmptyState2, { imageSrc: emptyImage });
|
|
18349
18571
|
}
|
|
18350
|
-
return /* @__PURE__ */
|
|
18572
|
+
return /* @__PURE__ */ jsx77("div", { className: "space-y-6", children: Object.entries(groupedTickets).sort(
|
|
18351
18573
|
([a], [b]) => new Date(b).getTime() - new Date(a).getTime()
|
|
18352
|
-
).map(([date, tickets]) => /* @__PURE__ */
|
|
18574
|
+
).map(([date, tickets]) => /* @__PURE__ */ jsx77(
|
|
18353
18575
|
TicketGroup,
|
|
18354
18576
|
{
|
|
18355
18577
|
date,
|
|
@@ -18359,8 +18581,8 @@ var Support = ({
|
|
|
18359
18581
|
date
|
|
18360
18582
|
)) });
|
|
18361
18583
|
})(),
|
|
18362
|
-
!loadingTickets && totalPages > 1 && /* @__PURE__ */
|
|
18363
|
-
/* @__PURE__ */
|
|
18584
|
+
!loadingTickets && totalPages > 1 && /* @__PURE__ */ jsxs60("div", { className: "flex justify-center items-center gap-4 mt-6", children: [
|
|
18585
|
+
/* @__PURE__ */ jsx77(
|
|
18364
18586
|
Button_default,
|
|
18365
18587
|
{
|
|
18366
18588
|
variant: "outline",
|
|
@@ -18370,13 +18592,13 @@ var Support = ({
|
|
|
18370
18592
|
children: "Anterior"
|
|
18371
18593
|
}
|
|
18372
18594
|
),
|
|
18373
|
-
/* @__PURE__ */
|
|
18595
|
+
/* @__PURE__ */ jsxs60(Text_default, { size: "sm", className: "text-text-600", children: [
|
|
18374
18596
|
"P\xE1gina ",
|
|
18375
18597
|
currentPage,
|
|
18376
18598
|
" de ",
|
|
18377
18599
|
totalPages
|
|
18378
18600
|
] }),
|
|
18379
|
-
/* @__PURE__ */
|
|
18601
|
+
/* @__PURE__ */ jsx77(
|
|
18380
18602
|
Button_default,
|
|
18381
18603
|
{
|
|
18382
18604
|
variant: "outline",
|
|
@@ -18389,7 +18611,7 @@ var Support = ({
|
|
|
18389
18611
|
] })
|
|
18390
18612
|
] })
|
|
18391
18613
|
] }) }),
|
|
18392
|
-
selectedTicket && /* @__PURE__ */
|
|
18614
|
+
selectedTicket && /* @__PURE__ */ jsx77(
|
|
18393
18615
|
TicketModal,
|
|
18394
18616
|
{
|
|
18395
18617
|
ticket: selectedTicket,
|
|
@@ -18400,7 +18622,7 @@ var Support = ({
|
|
|
18400
18622
|
userId
|
|
18401
18623
|
}
|
|
18402
18624
|
),
|
|
18403
|
-
showSuccessToast && /* @__PURE__ */
|
|
18625
|
+
showSuccessToast && /* @__PURE__ */ jsx77("div", { className: "fixed top-4 left-1/2 transform -translate-x-1/2 z-50", children: /* @__PURE__ */ jsx77(
|
|
18404
18626
|
Toast_default,
|
|
18405
18627
|
{
|
|
18406
18628
|
title: "Pedido enviado!",
|
|
@@ -18409,7 +18631,7 @@ var Support = ({
|
|
|
18409
18631
|
onClose: () => setShowSuccessToast(false)
|
|
18410
18632
|
}
|
|
18411
18633
|
) }),
|
|
18412
|
-
showCloseSuccessToast && /* @__PURE__ */
|
|
18634
|
+
showCloseSuccessToast && /* @__PURE__ */ jsx77("div", { className: "fixed top-4 left-1/2 transform -translate-x-1/2 z-50", children: /* @__PURE__ */ jsx77(
|
|
18413
18635
|
Toast_default,
|
|
18414
18636
|
{
|
|
18415
18637
|
title: "Pedido encerrado!",
|
|
@@ -18418,7 +18640,7 @@ var Support = ({
|
|
|
18418
18640
|
onClose: () => setShowCloseSuccessToast(false)
|
|
18419
18641
|
}
|
|
18420
18642
|
) }),
|
|
18421
|
-
showCloseErrorToast && /* @__PURE__ */
|
|
18643
|
+
showCloseErrorToast && /* @__PURE__ */ jsx77("div", { className: "fixed top-4 left-1/2 transform -translate-x-1/2 z-50", children: /* @__PURE__ */ jsx77(
|
|
18422
18644
|
Toast_default,
|
|
18423
18645
|
{
|
|
18424
18646
|
title: "Erro ao encerrar pedido",
|
|
@@ -18434,6 +18656,7 @@ var Support_default = Support;
|
|
|
18434
18656
|
export {
|
|
18435
18657
|
ANSWER_STATUS,
|
|
18436
18658
|
AccordionGroup,
|
|
18659
|
+
ActivityCardQuestionBanks,
|
|
18437
18660
|
ActivityDetails,
|
|
18438
18661
|
ActivityFilters,
|
|
18439
18662
|
ActivityFiltersPopover,
|