@tipp/ui 2.3.14 → 2.3.16
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/app/index.cjs +182 -159
- package/dist/app/index.cjs.map +1 -1
- package/dist/app/index.js +100 -98
- package/dist/app/platform/coach-question-list.js +31 -31
- package/dist/app/platform/contents-card.js +31 -31
- package/dist/app/platform/curriculum-card.js +5 -5
- package/dist/app/platform/edit-coaching-time.cjs +39 -16
- package/dist/app/platform/edit-coaching-time.cjs.map +1 -1
- package/dist/app/platform/edit-coaching-time.js +76 -74
- package/dist/app/platform/edit-service-type.cjs +41 -16
- package/dist/app/platform/edit-service-type.cjs.map +1 -1
- package/dist/app/platform/edit-service-type.js +77 -75
- package/dist/app/platform/goal-manage-card-edit.cjs +47 -22
- package/dist/app/platform/goal-manage-card-edit.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-edit.js +76 -74
- package/dist/app/platform/goal-manage-card-read.js +31 -31
- package/dist/app/platform/on-offline-radio-card.cjs +45 -22
- package/dist/app/platform/on-offline-radio-card.cjs.map +1 -1
- package/dist/app/platform/on-offline-radio-card.js +76 -74
- package/dist/app/platform/report-card.js +31 -31
- package/dist/app/platform/reservation-card.cjs +58 -33
- package/dist/app/platform/reservation-card.cjs.map +1 -1
- package/dist/app/platform/reservation-card.js +77 -75
- package/dist/app/platform/session-card.cjs +78 -55
- package/dist/app/platform/session-card.cjs.map +1 -1
- package/dist/app/platform/session-card.js +79 -77
- package/dist/app/platform/session-review-simple-read.js +31 -31
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +36 -36
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +31 -31
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +31 -31
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +31 -31
- package/dist/app/platform/userInfos/session-user-info-detail.js +31 -31
- package/dist/app/platform/userInfos/utils.js +30 -30
- package/dist/atoms/bullet-text.js +2 -2
- package/dist/atoms/dialog.js +2 -2
- package/dist/atoms/field-error-wrapper.js +2 -2
- package/dist/atoms/index.js +62 -62
- package/dist/atoms/list.js +2 -2
- package/dist/atoms/pagination.js +3 -3
- package/dist/chunk-2GTKMGHS.js +70 -0
- package/dist/chunk-2GTKMGHS.js.map +1 -0
- package/dist/chunk-2GWB6C4M.js +63 -0
- package/dist/chunk-2GWB6C4M.js.map +1 -0
- package/dist/chunk-2OVAPUSZ.js +218 -0
- package/dist/chunk-2OVAPUSZ.js.map +1 -0
- package/dist/chunk-33FHBMD2.js +89 -0
- package/dist/chunk-33FHBMD2.js.map +1 -0
- package/dist/chunk-3IDHQODC.js +99 -0
- package/dist/chunk-3IDHQODC.js.map +1 -0
- package/dist/chunk-3INEXJIV.js +37 -0
- package/dist/chunk-3INEXJIV.js.map +1 -0
- package/dist/chunk-3UOA73MU.js +196 -0
- package/dist/chunk-3UOA73MU.js.map +1 -0
- package/dist/chunk-4F2XOUIR.js +51 -0
- package/dist/chunk-4F2XOUIR.js.map +1 -0
- package/dist/chunk-4GDCXSDS.js +87 -0
- package/dist/chunk-4GDCXSDS.js.map +1 -0
- package/dist/chunk-52IAQ2FT.js +233 -0
- package/dist/chunk-52IAQ2FT.js.map +1 -0
- package/dist/chunk-54POQFUI.js +98 -0
- package/dist/chunk-54POQFUI.js.map +1 -0
- package/dist/chunk-5FBWB2W4.js +57 -0
- package/dist/chunk-5FBWB2W4.js.map +1 -0
- package/dist/chunk-5VPNBYFV.js +89 -0
- package/dist/chunk-5VPNBYFV.js.map +1 -0
- package/dist/chunk-6DAL2GRI.js +196 -0
- package/dist/chunk-6DAL2GRI.js.map +1 -0
- package/dist/chunk-6INLPCD5.js +30 -0
- package/dist/chunk-6INLPCD5.js.map +1 -0
- package/dist/chunk-6LJJRIWT.js +49 -0
- package/dist/chunk-6LJJRIWT.js.map +1 -0
- package/dist/chunk-6WT3VRAP.js +144 -0
- package/dist/chunk-6WT3VRAP.js.map +1 -0
- package/dist/chunk-7MB2G5XF.js +145 -0
- package/dist/chunk-7MB2G5XF.js.map +1 -0
- package/dist/chunk-7XUN3OQT.js +1 -0
- package/dist/chunk-7XUN3OQT.js.map +1 -0
- package/dist/chunk-A2DBM6WR.js +51 -0
- package/dist/chunk-A2DBM6WR.js.map +1 -0
- package/dist/chunk-AB5USZGJ.js +101 -0
- package/dist/chunk-AB5USZGJ.js.map +1 -0
- package/dist/chunk-AJWRR5KG.js +74 -0
- package/dist/chunk-AJWRR5KG.js.map +1 -0
- package/dist/chunk-ALFE4BOS.js +139 -0
- package/dist/chunk-ALFE4BOS.js.map +1 -0
- package/dist/chunk-AULDM6SL.js +89 -0
- package/dist/chunk-AULDM6SL.js.map +1 -0
- package/dist/chunk-BJLJNTF2.js +218 -0
- package/dist/chunk-BJLJNTF2.js.map +1 -0
- package/dist/chunk-CMFHPI3J.js +51 -0
- package/dist/chunk-CMFHPI3J.js.map +1 -0
- package/dist/chunk-DAZY7DRP.js +145 -0
- package/dist/chunk-DAZY7DRP.js.map +1 -0
- package/dist/chunk-DXD774YC.js +145 -0
- package/dist/chunk-DXD774YC.js.map +1 -0
- package/dist/chunk-EAMKUF7R.js +75 -0
- package/dist/chunk-EAMKUF7R.js.map +1 -0
- package/dist/chunk-EMNEV6EN.js +139 -0
- package/dist/chunk-EMNEV6EN.js.map +1 -0
- package/dist/chunk-ETKTERDA.js +51 -0
- package/dist/chunk-ETKTERDA.js.map +1 -0
- package/dist/chunk-FFAGYBAB.js +64 -0
- package/dist/chunk-FFAGYBAB.js.map +1 -0
- package/dist/chunk-FVNVGFTT.js +218 -0
- package/dist/chunk-FVNVGFTT.js.map +1 -0
- package/dist/chunk-FXQYWO4P.js +57 -0
- package/dist/chunk-FXQYWO4P.js.map +1 -0
- package/dist/chunk-G4DOK5DQ.js +64 -0
- package/dist/chunk-G4DOK5DQ.js.map +1 -0
- package/dist/chunk-G6ZTIOUH.js +54 -0
- package/dist/chunk-G6ZTIOUH.js.map +1 -0
- package/dist/chunk-GN7UAKYU.js +145 -0
- package/dist/chunk-GN7UAKYU.js.map +1 -0
- package/dist/chunk-GTB6HEJR.js +218 -0
- package/dist/chunk-GTB6HEJR.js.map +1 -0
- package/dist/chunk-JO5OXSQV.js +363 -0
- package/dist/chunk-JO5OXSQV.js.map +1 -0
- package/dist/chunk-JOUSZBPX.js +196 -0
- package/dist/chunk-JOUSZBPX.js.map +1 -0
- package/dist/chunk-JOXWMJKW.js +64 -0
- package/dist/chunk-JOXWMJKW.js.map +1 -0
- package/dist/chunk-JQU3CE4K.js +174 -0
- package/dist/chunk-JQU3CE4K.js.map +1 -0
- package/dist/chunk-K7NSOSIE.js +1 -0
- package/dist/chunk-K7NSOSIE.js.map +1 -0
- package/dist/chunk-KD3SPRXH.js +37 -0
- package/dist/chunk-KD3SPRXH.js.map +1 -0
- package/dist/chunk-KEKNMQJK.js +69 -0
- package/dist/chunk-KEKNMQJK.js.map +1 -0
- package/dist/chunk-KGPXD5VO.js +228 -0
- package/dist/chunk-KGPXD5VO.js.map +1 -0
- package/dist/chunk-KMNAZCXO.js +117 -0
- package/dist/chunk-KMNAZCXO.js.map +1 -0
- package/dist/chunk-KPE4JB42.js +218 -0
- package/dist/chunk-KPE4JB42.js.map +1 -0
- package/dist/chunk-MFAW7E6L.js +69 -0
- package/dist/chunk-MFAW7E6L.js.map +1 -0
- package/dist/chunk-MLOC57ZN.js +64 -0
- package/dist/chunk-MLOC57ZN.js.map +1 -0
- package/dist/chunk-MRW2RO32.js +163 -0
- package/dist/chunk-MRW2RO32.js.map +1 -0
- package/dist/chunk-MYELL2V2.js +63 -0
- package/dist/chunk-MYELL2V2.js.map +1 -0
- package/dist/chunk-N7WM36NN.js +64 -0
- package/dist/chunk-N7WM36NN.js.map +1 -0
- package/dist/chunk-NMOPWSEY.js +145 -0
- package/dist/chunk-NMOPWSEY.js.map +1 -0
- package/dist/chunk-NWCLGWD7.js +218 -0
- package/dist/chunk-NWCLGWD7.js.map +1 -0
- package/dist/chunk-ONUWABWT.js +169 -0
- package/dist/chunk-ONUWABWT.js.map +1 -0
- package/dist/chunk-PTCXWBAB.js +218 -0
- package/dist/chunk-PTCXWBAB.js.map +1 -0
- package/dist/chunk-PXSZVAKR.js +68 -0
- package/dist/chunk-PXSZVAKR.js.map +1 -0
- package/dist/chunk-PZXLZLQH.js +64 -0
- package/dist/chunk-PZXLZLQH.js.map +1 -0
- package/dist/chunk-QOA6EEKP.js +89 -0
- package/dist/chunk-QOA6EEKP.js.map +1 -0
- package/dist/chunk-R3VOZZ5O.js +63 -0
- package/dist/chunk-R3VOZZ5O.js.map +1 -0
- package/dist/chunk-S3ITGMDG.js +218 -0
- package/dist/chunk-S3ITGMDG.js.map +1 -0
- package/dist/chunk-SFYV52JB.js +151 -0
- package/dist/chunk-SFYV52JB.js.map +1 -0
- package/dist/chunk-SLV7LKTR.js +51 -0
- package/dist/chunk-SLV7LKTR.js.map +1 -0
- package/dist/chunk-TJQUUR4N.js +54 -0
- package/dist/chunk-TJQUUR4N.js.map +1 -0
- package/dist/chunk-TTVJOFG5.js +30 -0
- package/dist/chunk-TTVJOFG5.js.map +1 -0
- package/dist/chunk-TYQOHHL5.js +63 -0
- package/dist/chunk-TYQOHHL5.js.map +1 -0
- package/dist/chunk-VRY3HFX6.js +45 -0
- package/dist/chunk-VRY3HFX6.js.map +1 -0
- package/dist/chunk-WU6EJCDT.js +196 -0
- package/dist/chunk-WU6EJCDT.js.map +1 -0
- package/dist/chunk-X6YSDRES.js +165 -0
- package/dist/chunk-X6YSDRES.js.map +1 -0
- package/dist/chunk-XU2LW3CT.js +43 -0
- package/dist/chunk-XU2LW3CT.js.map +1 -0
- package/dist/chunk-XUTNPV7E.js +218 -0
- package/dist/chunk-XUTNPV7E.js.map +1 -0
- package/dist/chunk-YWEWWXKM.js +51 -0
- package/dist/chunk-YWEWWXKM.js.map +1 -0
- package/dist/chunk-YYWEFK4H.js +39 -0
- package/dist/chunk-YYWEFK4H.js.map +1 -0
- package/dist/chunk-Z5JV7JGZ.js +58 -0
- package/dist/chunk-Z5JV7JGZ.js.map +1 -0
- package/dist/chunk-ZMXFJ3AZ.js +196 -0
- package/dist/chunk-ZMXFJ3AZ.js.map +1 -0
- package/dist/chunk-ZP5VSS77.js +89 -0
- package/dist/chunk-ZP5VSS77.js.map +1 -0
- package/dist/context/index.js +5 -5
- package/dist/index.cjs +310 -248
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +155 -145
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.js +18 -18
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-comp.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.js +11 -11
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-footer.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-header.js +3 -3
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-layout.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.js +6 -6
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.js +21 -21
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.js +6 -6
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.js +3 -3
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.js +23 -23
- package/dist/molecules/curriculumV2/CurriculumContents/index.js +26 -26
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-item-title.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-item.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumSidebar/index.js +8 -8
- package/dist/molecules/curriculumV2/CurriculumSidebar/sidebar-item.js +6 -6
- package/dist/molecules/curriculumV2/curriculum-sub-nav.js +4 -4
- package/dist/molecules/curriculumV2/curriculum-v2-layout.js +2 -2
- package/dist/molecules/curriculumV2/index.js +34 -34
- package/dist/molecules/date-picker/date-picker-button.js +6 -6
- package/dist/molecules/date-picker/index.js +5 -5
- package/dist/molecules/description-json-render.cjs +722 -0
- package/dist/molecules/description-json-render.cjs.map +1 -0
- package/dist/molecules/description-json-render.d.cts +27 -0
- package/dist/molecules/description-json-render.d.ts +27 -0
- package/dist/molecules/description-json-render.js +30 -0
- package/dist/molecules/description-json-render.js.map +1 -0
- package/dist/molecules/download-card.js +2 -2
- package/dist/molecules/dynamic-field.cjs +71 -68
- package/dist/molecules/dynamic-field.cjs.map +1 -1
- package/dist/molecules/dynamic-field.js +6 -5
- package/dist/molecules/dynamic-form.cjs +32 -29
- package/dist/molecules/dynamic-form.cjs.map +1 -1
- package/dist/molecules/dynamic-form.js +7 -6
- package/dist/molecules/expand-table/index.js +5 -5
- package/dist/molecules/force-refresh.js +2 -2
- package/dist/molecules/ghost-post.js +4 -4
- package/dist/molecules/index.cjs +67 -9
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.d.cts +1 -0
- package/dist/molecules/index.d.ts +1 -0
- package/dist/molecules/index.js +76 -71
- package/dist/molecules/learning-post.js +6 -6
- package/dist/molecules/navigation.js +3 -3
- package/dist/molecules/one-on-one-guide-list.js +3 -3
- package/dist/molecules/stepper.js +4 -4
- package/dist/molecules/tag-selector.js +5 -5
- package/dist/molecules/time-select.cjs +519 -5
- package/dist/molecules/time-select.cjs.map +1 -1
- package/dist/molecules/time-select.js +18 -2
- package/dist/utils/getCalloutIconComponent.cjs +580 -0
- package/dist/utils/getCalloutIconComponent.cjs.map +1 -0
- package/dist/utils/getCalloutIconComponent.d.cts +11 -0
- package/dist/utils/getCalloutIconComponent.d.ts +11 -0
- package/dist/utils/getCalloutIconComponent.js +25 -0
- package/dist/utils/getCalloutIconComponent.js.map +1 -0
- package/dist/utils/index.cjs +535 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +2 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +24 -3
- package/package.json +3 -3
- package/src/molecules/description-json-render.tsx +85 -0
- package/src/molecules/dynamic-field.tsx +11 -9
- package/src/molecules/dynamic-form.tsx +1 -1
- package/src/molecules/index.ts +2 -1
- package/src/utils/getCalloutIconComponent.ts +39 -0
- package/src/utils/index.ts +1 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useCurriculumReviewContext
|
|
3
|
+
} from "./chunk-GMKRNFH5.js";
|
|
4
|
+
import {
|
|
5
|
+
getCurriculumIcon,
|
|
6
|
+
getCurriculumQuestionIconColor,
|
|
7
|
+
getCurriculumQuestionTypeDescription
|
|
8
|
+
} from "./chunk-JF7JAMOQ.js";
|
|
9
|
+
import {
|
|
10
|
+
Separator
|
|
11
|
+
} from "./chunk-HYITAA4J.js";
|
|
12
|
+
import {
|
|
13
|
+
Grid
|
|
14
|
+
} from "./chunk-EGEQY3KT.js";
|
|
15
|
+
import {
|
|
16
|
+
Badge
|
|
17
|
+
} from "./chunk-U3BQT7ZO.js";
|
|
18
|
+
import {
|
|
19
|
+
Box
|
|
20
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
21
|
+
import {
|
|
22
|
+
Flex
|
|
23
|
+
} from "./chunk-25HMMI7R.js";
|
|
24
|
+
import {
|
|
25
|
+
Button
|
|
26
|
+
} from "./chunk-ZVDAEY5Q.js";
|
|
27
|
+
import {
|
|
28
|
+
Heading
|
|
29
|
+
} from "./chunk-BESTU2AY.js";
|
|
30
|
+
import {
|
|
31
|
+
Typo
|
|
32
|
+
} from "./chunk-PMJIFLDT.js";
|
|
33
|
+
|
|
34
|
+
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.tsx
|
|
35
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
36
|
+
var renderPreviewContent = (args) => {
|
|
37
|
+
const { question } = args;
|
|
38
|
+
const Icon = getCurriculumIcon({
|
|
39
|
+
type: question.type,
|
|
40
|
+
icon: question.icon
|
|
41
|
+
});
|
|
42
|
+
const getDescription = () => {
|
|
43
|
+
return [
|
|
44
|
+
getCurriculumQuestionTypeDescription(question.type),
|
|
45
|
+
question.duration ? `${question.duration}\uBD84` : ""
|
|
46
|
+
].filter(Boolean).join(" | ");
|
|
47
|
+
};
|
|
48
|
+
return /* @__PURE__ */ jsxs(
|
|
49
|
+
Grid,
|
|
50
|
+
{
|
|
51
|
+
columns: "16px 1fr",
|
|
52
|
+
gap: "2",
|
|
53
|
+
px: "4",
|
|
54
|
+
py: "2",
|
|
55
|
+
width: "100%",
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ jsx(Box, { mt: "1", children: /* @__PURE__ */ jsx(Icon, { color: getCurriculumQuestionIconColor(question.type) }) }),
|
|
58
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
59
|
+
/* @__PURE__ */ jsx(Typo, { as: "p", color: "gray", weight: "bold", children: question.title }),
|
|
60
|
+
/* @__PURE__ */ jsx(Typo, { color: "gray", children: getDescription() })
|
|
61
|
+
] })
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
question.uuid
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
var getReviewContentValue = (question, answer) => {
|
|
68
|
+
var _a, _b, _c;
|
|
69
|
+
if (question.type === "question_satisfaction_option") {
|
|
70
|
+
return (_c = (_b = (_a = question.options) == null ? void 0 : _a.find((option) => option.value === Number(answer))) == null ? void 0 : _b.label) != null ? _c : "";
|
|
71
|
+
}
|
|
72
|
+
return answer;
|
|
73
|
+
};
|
|
74
|
+
var renderReviewContent = (args) => {
|
|
75
|
+
const { question, answer } = args;
|
|
76
|
+
const Icon = getCurriculumIcon({
|
|
77
|
+
type: question.type,
|
|
78
|
+
icon: question.icon
|
|
79
|
+
});
|
|
80
|
+
const color = getCurriculumQuestionIconColor(question.type);
|
|
81
|
+
const badgeColor = ["question_radio", "question_satisfaction_option"].includes(question.type) ? "accent" : "neutral";
|
|
82
|
+
const value = getReviewContentValue(question, answer);
|
|
83
|
+
return /* @__PURE__ */ jsxs(
|
|
84
|
+
Grid,
|
|
85
|
+
{
|
|
86
|
+
columns: "16px 1fr",
|
|
87
|
+
gap: "2",
|
|
88
|
+
px: "4",
|
|
89
|
+
py: "2",
|
|
90
|
+
width: "100%",
|
|
91
|
+
children: [
|
|
92
|
+
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Icon, { color }) }),
|
|
93
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
94
|
+
/* @__PURE__ */ jsx(Typo, { as: "p", color: "gray", mb: "2", weight: "bold", children: question.title }),
|
|
95
|
+
/* @__PURE__ */ jsx(Badge, { color: badgeColor, size: "large", style: { whiteSpace: "break-spaces", lineBreak: "anywhere" }, children: value || "(\uBBF8 \uC751\uB2F5)" })
|
|
96
|
+
] })
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
question.uuid
|
|
100
|
+
);
|
|
101
|
+
};
|
|
102
|
+
function StartReview({ onStart }) {
|
|
103
|
+
const { curriculum, reviewContents, sectionTitle, done, formik } = useCurriculumReviewContext();
|
|
104
|
+
return /* @__PURE__ */ jsx(
|
|
105
|
+
Flex,
|
|
106
|
+
{
|
|
107
|
+
align: "center",
|
|
108
|
+
direction: "column",
|
|
109
|
+
height: "100%",
|
|
110
|
+
justify: "center",
|
|
111
|
+
width: "100%",
|
|
112
|
+
children: /* @__PURE__ */ jsxs(
|
|
113
|
+
Flex,
|
|
114
|
+
{
|
|
115
|
+
align: "center",
|
|
116
|
+
direction: "column",
|
|
117
|
+
height: "100%",
|
|
118
|
+
justify: "center",
|
|
119
|
+
maxWidth: "650px",
|
|
120
|
+
pb: { initial: "6", sm: "0" },
|
|
121
|
+
pt: { initial: "4", sm: "0" },
|
|
122
|
+
px: { initial: "4", sm: "0" },
|
|
123
|
+
width: "100%",
|
|
124
|
+
children: [
|
|
125
|
+
/* @__PURE__ */ jsx(Typo, { color: "gray", mb: "1", children: curriculum.title }),
|
|
126
|
+
/* @__PURE__ */ jsx(Heading, { variant: "heading3", children: reviewContents.title }),
|
|
127
|
+
/* @__PURE__ */ jsx(Separator, { my: "4", style: { width: 100 } }),
|
|
128
|
+
/* @__PURE__ */ jsxs(Typo, { align: "left", as: "p", color: "gray", mb: "4", children: [
|
|
129
|
+
/* @__PURE__ */ jsx(Typo, { as: "span", weight: "bold", children: sectionTitle }),
|
|
130
|
+
" ",
|
|
131
|
+
/* @__PURE__ */ jsx(Typo, { children: reviewContents.description })
|
|
132
|
+
] }),
|
|
133
|
+
/* @__PURE__ */ jsx(Box, { mb: "5", overflowY: "auto", width: "100%", children: reviewContents.questions.map((question) => {
|
|
134
|
+
if (done) {
|
|
135
|
+
return renderReviewContent({ question, answer: formik.values.answers[question.uuid] });
|
|
136
|
+
}
|
|
137
|
+
return renderPreviewContent({ question });
|
|
138
|
+
}) }),
|
|
139
|
+
/* @__PURE__ */ jsx(Button, { color: "yellow", onClick: onStart, variant: done ? "outline" : "solid", children: done ? "\uB098\uC758 \uC751\uB2F5 \uC218\uC815\uD558\uAE30" : reviewContents.buttonTitle })
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
)
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
var start_review_default = StartReview;
|
|
147
|
+
|
|
148
|
+
export {
|
|
149
|
+
start_review_default
|
|
150
|
+
};
|
|
151
|
+
//# sourceMappingURL=chunk-SFYV52JB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.tsx"],"sourcesContent":["import React from 'react'; \nimport type { BadgeProps } from '@/atoms/badge';\nimport { Badge } from '@/atoms/badge';\nimport { Box } from '@/atoms/box';\nimport { Button } from '@/atoms/button';\nimport { Flex } from '@/atoms/flex';\nimport { Grid } from '@/atoms/grid';\nimport { Heading } from '@/atoms/heading';\nimport { Separator } from '@/atoms/separator';\nimport { Typo } from '@/atoms/typo';\nimport {\n getCurriculumIcon,\n getCurriculumQuestionIconColor,\n getCurriculumQuestionTypeDescription,\n} from '@/utils/curriculum.utils';\nimport type { ReviewQuestionElement } from '@/types/curriculum.type';\nimport { useCurriculumReviewContext } from './curriculum-review-context';\n\ninterface StartReviewProps {\n onStart: () => void;\n}\n\n\nconst renderPreviewContent = (args: {\n question: ReviewQuestionElement;\n}):React.ReactElement => {\n const { question } = args;\n const Icon = getCurriculumIcon({\n type: question.type,\n icon: question.icon,\n });\n const getDescription = (): string => {\n return [\n getCurriculumQuestionTypeDescription(question.type),\n question.duration ? `${question.duration}분` : '',\n ]\n .filter(Boolean)\n .join(' | ');\n };\n\n return (\n <Grid\n columns=\"16px 1fr\"\n gap=\"2\"\n key={question.uuid}\n px=\"4\"\n py=\"2\"\n width=\"100%\"\n >\n <Box mt=\"1\">\n <Icon color={getCurriculumQuestionIconColor(question.type)} />\n </Box>\n <Box>\n <Typo as=\"p\" color=\"gray\" weight=\"bold\">\n {question.title}\n </Typo>\n <Typo color=\"gray\">{getDescription()}</Typo>\n </Box>\n </Grid>\n );\n};\n\n\nconst getReviewContentValue = (question: ReviewQuestionElement, answer: string): string => {\n if(question.type === 'question_satisfaction_option'){ \n return question.options?.find((option)=>option.value === Number(answer))?.label ?? '';\n }\n return answer\n}\n\n\nconst renderReviewContent = (args: {\n question: ReviewQuestionElement;\n answer: string;\n}):React.ReactElement => {\n const { question, answer } = args;\n const Icon = getCurriculumIcon({\n type: question.type,\n icon: question.icon,\n }); \n\n const color = getCurriculumQuestionIconColor(question.type);\n const badgeColor: BadgeProps['color'] = ['question_radio','question_satisfaction_option'].includes(question.type) ? 'accent' : 'neutral';\n const value = getReviewContentValue(question, answer);\n\n return (\n <Grid\n columns=\"16px 1fr\"\n gap=\"2\"\n key={question.uuid}\n px=\"4\"\n py=\"2\"\n width=\"100%\"\n >\n <Box>\n <Icon color={color} />\n </Box>\n\n <Box>\n <Typo as=\"p\" color=\"gray\" mb=\"2\" weight=\"bold\">{question.title}</Typo>\n <Badge color={badgeColor} size=\"large\" style={{whiteSpace: 'break-spaces', lineBreak: 'anywhere'}}>\n {value || '(미 응답)'}\n </Badge>\n </Box>\n \n </Grid>\n );\n};\n\nfunction StartReview({ onStart }: StartReviewProps): React.ReactNode {\n const { curriculum, reviewContents, sectionTitle, done,formik } =\n useCurriculumReviewContext();\n\n return (\n <Flex\n align=\"center\"\n direction=\"column\"\n height=\"100%\"\n justify=\"center\"\n width=\"100%\"\n >\n <Flex\n align=\"center\"\n direction=\"column\"\n height=\"100%\"\n justify=\"center\"\n maxWidth=\"650px\"\n pb={{initial: '6', sm: '0'}}\n pt={{initial: '4', sm: '0'}}\n px={{initial: '4', sm: '0'}}\n width=\"100%\"\n >\n <Typo color=\"gray\" mb=\"1\">{curriculum.title}</Typo>\n <Heading variant=\"heading3\">{reviewContents.title}</Heading>\n <Separator my=\"4\" style={{ width: 100 }} />\n\n <Typo align=\"left\" as=\"p\" color=\"gray\" mb=\"4\">\n <Typo as=\"span\" weight=\"bold\">\n {sectionTitle}\n </Typo>\n {' '}\n <Typo>{reviewContents.description}</Typo>\n </Typo>\n\n <Box mb=\"5\" overflowY=\"auto\" width=\"100%\">\n {reviewContents.questions.map((question)=>{\n if(done){\n return renderReviewContent({ question, answer: formik.values.answers[question.uuid]});\n }\n return renderPreviewContent({ question });\n })}\n </Box>\n <Button color=\"yellow\" onClick={onStart} variant={done ? 'outline' : 'solid'}>\n {done ? '나의 응답 수정하기' : reviewContents.buttonTitle}\n </Button>\n </Flex>\n </Flex>\n );\n}\n\nexport default StartReview;\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getCalloutIconComponent
|
|
3
|
+
} from "./chunk-3INEXJIV.js";
|
|
4
|
+
import {
|
|
5
|
+
List
|
|
6
|
+
} from "./chunk-JIJLOKVN.js";
|
|
7
|
+
import {
|
|
8
|
+
Box
|
|
9
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
10
|
+
import {
|
|
11
|
+
Typo
|
|
12
|
+
} from "./chunk-PMJIFLDT.js";
|
|
13
|
+
import {
|
|
14
|
+
Callout
|
|
15
|
+
} from "./chunk-B6XJN6EC.js";
|
|
16
|
+
|
|
17
|
+
// src/molecules/description-json-render.tsx
|
|
18
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
function DescriptionJsonRender(props) {
|
|
20
|
+
const { value } = props;
|
|
21
|
+
return value.values.map((block, index) => {
|
|
22
|
+
if (block.type === "bullet-list") {
|
|
23
|
+
return (
|
|
24
|
+
// eslint-disable-next-line react/no-array-index-key -- 블록 타입과 인덱스를 키로 사용
|
|
25
|
+
/* @__PURE__ */ jsx(Box, { mb: "2", pl: "4", children: /* @__PURE__ */ jsx(List.Root, { preSpace: "small", children: block.value.map((v, i) => (
|
|
26
|
+
// eslint-disable-next-line react/no-array-index-key -- 블록 타입과 인덱스를 키로 사용
|
|
27
|
+
/* @__PURE__ */ jsx(List.Item, { children: v }, `${index}-${i}`)
|
|
28
|
+
)) }) }, `${block.type}-${index}`)
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
if (block.type === "callout") {
|
|
32
|
+
const Icon = getCalloutIconComponent(block.icon);
|
|
33
|
+
return (
|
|
34
|
+
// eslint-disable-next-line react/no-array-index-key -- 블록 타입과 인덱스를 키로 사용
|
|
35
|
+
/* @__PURE__ */ jsx(Box, { mb: "2", children: /* @__PURE__ */ jsxs(Callout.Root, { children: [
|
|
36
|
+
/* @__PURE__ */ jsx(Callout.Icon, { children: /* @__PURE__ */ jsx(Icon, {}) }),
|
|
37
|
+
/* @__PURE__ */ jsx(Callout.Text, { children: block.value })
|
|
38
|
+
] }) }, `${block.type}-${index}`)
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
return (
|
|
42
|
+
// eslint-disable-next-line react/no-array-index-key -- 블록 타입과 인덱스를 키로 사용
|
|
43
|
+
/* @__PURE__ */ jsx(Typo, { mb: "2", weight: "regular", children: block.value }, `${block.type}-${index}`)
|
|
44
|
+
);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export {
|
|
49
|
+
DescriptionJsonRender
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=chunk-SLV7LKTR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/description-json-render.tsx"],"sourcesContent":["import React from 'react';\nimport { Box } from '@/atoms/box';\nimport { Callout } from '@/atoms/call-out';\nimport { List } from '@/atoms/list';\nimport { Typo } from '@/atoms/typo';\nimport { getCalloutIconComponent } from '@/utils/getCalloutIconComponent';\n\nexport type DescriptionBlockType = 'callout' | 'typo' | 'bullet-list';\n\nexport interface DescriptionCalloutBlock {\n type: 'callout';\n icon: string;\n value: string;\n}\n\nexport interface DescriptionTypoBlock {\n type: 'typo';\n value: string;\n}\n\nexport interface DescriptionBulletListBlock {\n type: 'bullet-list';\n value: string[];\n}\n\nexport type DescriptionBlock =\n | DescriptionCalloutBlock\n | DescriptionTypoBlock\n | DescriptionBulletListBlock;\n\nexport interface Description {\n version: number;\n values: DescriptionBlock[];\n}\n\nexport interface DescriptionJsonRenderProps {\n value: Description;\n}\n\nexport function DescriptionJsonRender(\n props: DescriptionJsonRenderProps\n): React.ReactElement {\n const { value } = props;\n return value.values.map((block, index) => {\n if (block.type === 'bullet-list') {\n return (\n // eslint-disable-next-line react/no-array-index-key -- 블록 타입과 인덱스를 키로 사용\n <Box key={`${block.type}-${index}`} mb=\"2\" pl=\"4\">\n <List.Root preSpace=\"small\">\n {block.value.map((v, i) => (\n // eslint-disable-next-line react/no-array-index-key -- 블록 타입과 인덱스를 키로 사용\n <List.Item key={`${index}-${i}`}>{v}</List.Item>\n ))}\n </List.Root>\n </Box>\n );\n }\n\n if (block.type === 'callout') {\n const Icon = getCalloutIconComponent(block.icon);\n return (\n // eslint-disable-next-line react/no-array-index-key -- 블록 타입과 인덱스를 키로 사용\n <Box key={`${block.type}-${index}`} mb=\"2\">\n <Callout.Root>\n <Callout.Icon>\n <Icon />\n </Callout.Icon>\n <Callout.Text>{block.value}</Callout.Text>\n </Callout.Root>\n </Box>\n );\n }\n\n return (\n // eslint-disable-next-line react/no-array-index-key -- 블록 타입과 인덱스를 키로 사용\n <Typo key={`${block.type}-${index}`} mb=\"2\" weight=\"regular\">\n {block.value}\n </Typo>\n );\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAmDc,cAYJ,YAZI;AAZP,SAAS,sBACd,OACoB;AACpB,QAAM,EAAE,MAAM,IAAI;AAClB,SAAS,MAAM,OAAO,IAAI,CAAC,OAAO,UAAU;AAC1C,QAAI,MAAM,SAAS,eAAe;AAChC;AAAA;AAAA,QAEE,oBAAC,OAAmC,IAAG,KAAI,IAAG,KAC5C,8BAAC,KAAK,MAAL,EAAU,UAAS,SACjB,gBAAM,MAAM,IAAI,CAAC,GAAG;AAAA;AAAA,UAEnB,oBAAC,KAAK,MAAL,EAAiC,eAAlB,GAAG,KAAK,IAAI,CAAC,EAAO;AAAA,SACrC,GACH,KANQ,GAAG,MAAM,IAAI,IAAI,KAAK,EAOhC;AAAA;AAAA,IAEJ;AAEA,QAAI,MAAM,SAAS,WAAW;AAC5B,YAAM,OAAO,wBAAwB,MAAM,IAAI;AAC/C;AAAA;AAAA,QAEE,oBAAC,OAAmC,IAAG,KACrC,+BAAC,QAAQ,MAAR,EACC;AAAA,8BAAC,QAAQ,MAAR,EACC,8BAAC,QAAK,GACR;AAAA,UACA,oBAAC,QAAQ,MAAR,EAAc,gBAAM,OAAM;AAAA,WAC7B,KANQ,GAAG,MAAM,IAAI,IAAI,KAAK,EAOhC;AAAA;AAAA,IAEJ;AAEA;AAAA;AAAA,MAEE,oBAAC,QAAoC,IAAG,KAAI,QAAO,WAChD,gBAAM,SADE,GAAG,MAAM,IAAI,IAAI,KAAK,EAEjC;AAAA;AAAA,EAEJ,CAAC;AACH;","names":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
OnOfflineRadioCard
|
|
3
|
+
} from "./chunk-Z5JV7JGZ.js";
|
|
4
|
+
import {
|
|
5
|
+
Dialog
|
|
6
|
+
} from "./chunk-JQ7VQ5SB.js";
|
|
7
|
+
import {
|
|
8
|
+
Box
|
|
9
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
10
|
+
import {
|
|
11
|
+
Flex
|
|
12
|
+
} from "./chunk-25HMMI7R.js";
|
|
13
|
+
import {
|
|
14
|
+
Button
|
|
15
|
+
} from "./chunk-ZVDAEY5Q.js";
|
|
16
|
+
import {
|
|
17
|
+
Typo
|
|
18
|
+
} from "./chunk-PMJIFLDT.js";
|
|
19
|
+
|
|
20
|
+
// src/app/platform/edit-service-type.tsx
|
|
21
|
+
import { useCallback, useState } from "react";
|
|
22
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
23
|
+
function EditServiceType(props) {
|
|
24
|
+
const { defaultServiceType, onClickCancel } = props;
|
|
25
|
+
const [sessionType, setSessionType] = useState(
|
|
26
|
+
defaultServiceType
|
|
27
|
+
);
|
|
28
|
+
const onClickSave = useCallback(() => {
|
|
29
|
+
var _a;
|
|
30
|
+
(_a = props.onClickSave) == null ? void 0 : _a.call(props, sessionType);
|
|
31
|
+
}, [props, sessionType]);
|
|
32
|
+
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
33
|
+
/* @__PURE__ */ jsx(
|
|
34
|
+
Typo,
|
|
35
|
+
{
|
|
36
|
+
as: "p",
|
|
37
|
+
color: "gray",
|
|
38
|
+
mb: { initial: "5", xs: "3" },
|
|
39
|
+
variant: "caption",
|
|
40
|
+
children: "\uC138\uC158 \uC720\uD615\uC5D0 \uB530\uB77C \uCC45\uC815\uB418\uB294 \uCF54\uCE6D \uAE08\uC561\uC774 \uB2EC\uB77C\uC9C0\uBBC0\uB85C, \uC815\uD655\uD558\uAC8C \uC120\uD0DD\uD574\uC8FC\uC138\uC694"
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ jsx(OnOfflineRadioCard, { onValueChange: setSessionType, value: sessionType }),
|
|
44
|
+
/* @__PURE__ */ jsxs(Flex, { gap: "3", justify: "end", mt: { initial: "6", xs: "3" }, children: [
|
|
45
|
+
/* @__PURE__ */ jsx(Dialog.Close, { children: /* @__PURE__ */ jsx(Button, { color: "gray", onClick: onClickCancel, variant: "outline", children: "\uCDE8\uC18C\uD558\uAE30" }) }),
|
|
46
|
+
/* @__PURE__ */ jsx(Dialog.Close, { children: /* @__PURE__ */ jsx(Button, { onClick: onClickSave, children: "\uC800\uC7A5\uD558\uAE30" }) })
|
|
47
|
+
] })
|
|
48
|
+
] });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export {
|
|
52
|
+
EditServiceType
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=chunk-TJQUUR4N.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app/platform/edit-service-type.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport { Box, Button, Dialog, Flex, Typo } from '@/atoms';\nimport type { ServiceType } from '@/types/biz.type';\nimport { OnOfflineRadioCard } from './on-offline-radio-card';\n\nexport interface EditServiceTypeProps {\n defaultServiceType?: ServiceType;\n onClickSave?: (serviceType: ServiceType) => void;\n onClickCancel?: () => void;\n}\n\nexport function EditServiceType(\n props: EditServiceTypeProps\n): React.ReactNode {\n const { defaultServiceType, onClickCancel } = props;\n const [sessionType, setSessionType] = useState<string | undefined>(\n defaultServiceType\n );\n\n const onClickSave = useCallback(() => {\n props.onClickSave?.(sessionType as ServiceType);\n }, [props, sessionType]);\n\n return (\n <Box>\n <Typo\n as=\"p\"\n color=\"gray\"\n mb={{ initial: '5', xs: '3' }}\n variant=\"caption\"\n >\n 세션 유형에 따라 책정되는 코칭 금액이 달라지므로, 정확하게 선택해주세요\n </Typo>\n <OnOfflineRadioCard onValueChange={setSessionType} value={sessionType} />\n <Flex gap=\"3\" justify=\"end\" mt={{ initial: '6', xs: '3' }}>\n <Dialog.Close>\n <Button color=\"gray\" onClick={onClickCancel} variant=\"outline\">\n 취소하기\n </Button>\n </Dialog.Close>\n <Dialog.Close>\n <Button onClick={onClickSave}>저장하기</Button>\n </Dialog.Close>\n </Flex>\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,aAAa,gBAAgB;AAyBvC,cASA,YATA;AAdC,SAAS,gBACd,OACiB;AACjB,QAAM,EAAE,oBAAoB,cAAc,IAAI;AAC9C,QAAM,CAAC,aAAa,cAAc,IAAI;AAAA,IACpC;AAAA,EACF;AAEA,QAAM,cAAc,YAAY,MAAM;AAnBxC;AAoBI,gBAAM,gBAAN,+BAAoB;AAAA,EACtB,GAAG,CAAC,OAAO,WAAW,CAAC;AAEvB,SACE,qBAAC,OACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH,OAAM;AAAA,QACN,IAAI,EAAE,SAAS,KAAK,IAAI,IAAI;AAAA,QAC5B,SAAQ;AAAA,QACT;AAAA;AAAA,IAED;AAAA,IACA,oBAAC,sBAAmB,eAAe,gBAAgB,OAAO,aAAa;AAAA,IACvE,qBAAC,QAAK,KAAI,KAAI,SAAQ,OAAM,IAAI,EAAE,SAAS,KAAK,IAAI,IAAI,GACtD;AAAA,0BAAC,OAAO,OAAP,EACC,8BAAC,UAAO,OAAM,QAAO,SAAS,eAAe,SAAQ,WAAU,sCAE/D,GACF;AAAA,MACA,oBAAC,OAAO,OAAP,EACC,8BAAC,UAAO,SAAS,aAAa,sCAAI,GACpC;AAAA,OACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CoachingCustomerInfoLarge
|
|
3
|
+
} from "./chunk-RFXVHZAN.js";
|
|
4
|
+
import {
|
|
5
|
+
CoachingCustomerInfoMedium
|
|
6
|
+
} from "./chunk-KD6EXWP7.js";
|
|
7
|
+
import {
|
|
8
|
+
CoachingCustomerInfoSmall
|
|
9
|
+
} from "./chunk-YADSNPMG.js";
|
|
10
|
+
import {
|
|
11
|
+
Box
|
|
12
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
13
|
+
import {
|
|
14
|
+
__spreadValues
|
|
15
|
+
} from "./chunk-CRTRMMJ7.js";
|
|
16
|
+
|
|
17
|
+
// src/app/platform/userInfos/coaching-customer-info/index.tsx
|
|
18
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
function CoachingCustomerInfo(props) {
|
|
20
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
21
|
+
/* @__PURE__ */ jsx(Box, { display: { initial: "block", sm: "none", md: "none" }, children: /* @__PURE__ */ jsx(CoachingCustomerInfoSmall, __spreadValues({}, props)) }),
|
|
22
|
+
/* @__PURE__ */ jsx(Box, { display: { initial: "none", sm: "block", md: "none" }, children: /* @__PURE__ */ jsx(CoachingCustomerInfoMedium, __spreadValues({}, props)) }),
|
|
23
|
+
/* @__PURE__ */ jsx(Box, { display: { initial: "none", sm: "none", md: "block" }, children: /* @__PURE__ */ jsx(CoachingCustomerInfoLarge, __spreadValues({}, props)) })
|
|
24
|
+
] });
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
CoachingCustomerInfo
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=chunk-TTVJOFG5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app/platform/userInfos/coaching-customer-info/index.tsx"],"sourcesContent":["import React from 'react';\nimport { Box } from '../../../../atoms';\nimport type { CoachingCustomerInfoProps } from '../utils';\nimport { CoachingCustomerInfoSmall } from './small';\nimport { CoachingCustomerInfoMedium } from './medium';\nimport { CoachingCustomerInfoLarge } from './large';\n\nexport {\n CoachingCustomerInfoLarge,\n CoachingCustomerInfoMedium,\n CoachingCustomerInfoSmall,\n};\n\nexport { type CoachingCustomerInfoProps };\n\nexport function CoachingCustomerInfo(\n props: CoachingCustomerInfoProps\n): React.ReactNode {\n return (\n <>\n <Box display={{ initial: 'block', sm: 'none', md: 'none' }}>\n <CoachingCustomerInfoSmall {...props} />\n </Box>\n <Box display={{ initial: 'none', sm: 'block', md: 'none' }}>\n <CoachingCustomerInfoMedium {...props} />\n </Box>\n <Box display={{ initial: 'none', sm: 'none', md: 'block' }}>\n <CoachingCustomerInfoLarge {...props} />\n </Box>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAmBI,mBAEI,KAFJ;AAJG,SAAS,qBACd,OACiB;AACjB,SACE,iCACE;AAAA,wBAAC,OAAI,SAAS,EAAE,SAAS,SAAS,IAAI,QAAQ,IAAI,OAAO,GACvD,8BAAC,8CAA8B,MAAO,GACxC;AAAA,IACA,oBAAC,OAAI,SAAS,EAAE,SAAS,QAAQ,IAAI,SAAS,IAAI,OAAO,GACvD,8BAAC,+CAA+B,MAAO,GACzC;AAAA,IACA,oBAAC,OAAI,SAAS,EAAE,SAAS,QAAQ,IAAI,QAAQ,IAAI,QAAQ,GACvD,8BAAC,8CAA8B,MAAO,GACxC;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Card
|
|
3
|
+
} from "./chunk-RP2RGCAW.js";
|
|
4
|
+
import {
|
|
5
|
+
Badge
|
|
6
|
+
} from "./chunk-U3BQT7ZO.js";
|
|
7
|
+
import {
|
|
8
|
+
Box
|
|
9
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
10
|
+
import {
|
|
11
|
+
Flex
|
|
12
|
+
} from "./chunk-25HMMI7R.js";
|
|
13
|
+
import {
|
|
14
|
+
Heading
|
|
15
|
+
} from "./chunk-BESTU2AY.js";
|
|
16
|
+
import {
|
|
17
|
+
Typo
|
|
18
|
+
} from "./chunk-PMJIFLDT.js";
|
|
19
|
+
|
|
20
|
+
// src/app/platform/session-review-simple-read.tsx
|
|
21
|
+
import { useMemo } from "react";
|
|
22
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
23
|
+
function SubTitleWrapper({
|
|
24
|
+
children,
|
|
25
|
+
title
|
|
26
|
+
}) {
|
|
27
|
+
return /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "2", children: [
|
|
28
|
+
/* @__PURE__ */ jsx(Heading, { mb: "2", variant: "heading5", weight: "regular", children: title }),
|
|
29
|
+
/* @__PURE__ */ jsx(Box, { children })
|
|
30
|
+
] });
|
|
31
|
+
}
|
|
32
|
+
function SessionReviewSimpleRead({
|
|
33
|
+
helpfulness,
|
|
34
|
+
review
|
|
35
|
+
}) {
|
|
36
|
+
const helpfulnessMeta = useMemo(() => {
|
|
37
|
+
if (helpfulness) {
|
|
38
|
+
return {
|
|
39
|
+
text: "\uB124",
|
|
40
|
+
color: "success"
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
if (typeof helpfulness === "undefined") {
|
|
44
|
+
return {
|
|
45
|
+
text: "-",
|
|
46
|
+
color: "neutral"
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
text: "\uC544\uB2C8\uC694",
|
|
51
|
+
color: "error"
|
|
52
|
+
};
|
|
53
|
+
}, [helpfulness]);
|
|
54
|
+
return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "5", children: [
|
|
55
|
+
/* @__PURE__ */ jsx(SubTitleWrapper, { title: "\uC774\uBC88 \uCF54\uCE6D\uC774 \uBAA9\uD45C \uB2EC\uC131\uC5D0 \uB3C4\uC6C0\uC774 \uB418\uC5C8\uB098\uC694?", children: /* @__PURE__ */ jsx(Badge, { color: helpfulnessMeta.color, children: helpfulnessMeta.text }) }),
|
|
56
|
+
/* @__PURE__ */ jsx(SubTitleWrapper, { title: "\uC138\uC158 \uD6C4\uAE30", children: /* @__PURE__ */ jsx(Card, { children: review ? /* @__PURE__ */ jsx(Typo, { as: "p", children: review }) : /* @__PURE__ */ jsx(Typo, { color: "gray", children: "\uC785\uB825\uB41C \uD6C4\uAE30\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4." }) }) })
|
|
57
|
+
] }) });
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export {
|
|
61
|
+
SessionReviewSimpleRead
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=chunk-TYQOHHL5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app/platform/session-review-simple-read.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport type { BadgeProps } from '../../atoms';\nimport { Badge, Box, Card, Flex, Heading, Typo } from '../../atoms';\n\nexport interface SessionReviewSimpleReadProps {\n helpfulness?: boolean;\n review?: string;\n}\n\nfunction SubTitleWrapper({\n children,\n title,\n}: {\n children: React.ReactNode;\n title: string;\n}): React.ReactNode {\n return (\n <Flex direction=\"column\" gap=\"2\">\n <Heading mb=\"2\" variant=\"heading5\" weight=\"regular\">\n {title}\n </Heading>\n\n <Box>{children}</Box>\n </Flex>\n );\n}\n\nexport function SessionReviewSimpleRead({\n helpfulness,\n review,\n}: SessionReviewSimpleReadProps): React.ReactNode {\n const helpfulnessMeta = useMemo<{\n text: string;\n color: BadgeProps['color'];\n }>(() => {\n if (helpfulness) {\n return {\n text: '네',\n color: 'success',\n };\n }\n if (typeof helpfulness === 'undefined') {\n return {\n text: '-',\n color: 'neutral',\n };\n }\n return {\n text: '아니요',\n color: 'error',\n };\n }, [helpfulness]);\n\n return (\n <Box>\n <Flex direction=\"column\" gap=\"5\">\n <SubTitleWrapper title=\"이번 코칭이 목표 달성에 도움이 되었나요?\">\n <Badge color={helpfulnessMeta.color}>{helpfulnessMeta.text}</Badge>\n </SubTitleWrapper>\n <SubTitleWrapper title=\"세션 후기\">\n <Card>\n {review ? (\n <Typo as=\"p\">{review}</Typo>\n ) : (\n <Typo color=\"gray\">입력된 후기가 없습니다.</Typo>\n )}\n </Card>\n </SubTitleWrapper>\n </Flex>\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,eAAe;AAiB3B,SACE,KADF;AARJ,SAAS,gBAAgB;AAAA,EACvB;AAAA,EACA;AACF,GAGoB;AAClB,SACE,qBAAC,QAAK,WAAU,UAAS,KAAI,KAC3B;AAAA,wBAAC,WAAQ,IAAG,KAAI,SAAQ,YAAW,QAAO,WACvC,iBACH;AAAA,IAEA,oBAAC,OAAK,UAAS;AAAA,KACjB;AAEJ;AAEO,SAAS,wBAAwB;AAAA,EACtC;AAAA,EACA;AACF,GAAkD;AAChD,QAAM,kBAAkB,QAGrB,MAAM;AACP,QAAI,aAAa;AACf,aAAO;AAAA,QACL,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,IACF;AACA,QAAI,OAAO,gBAAgB,aAAa;AACtC,aAAO;AAAA,QACL,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,IACF;AACA,WAAO;AAAA,MACL,MAAM;AAAA,MACN,OAAO;AAAA,IACT;AAAA,EACF,GAAG,CAAC,WAAW,CAAC;AAEhB,SACE,oBAAC,OACC,+BAAC,QAAK,WAAU,UAAS,KAAI,KAC3B;AAAA,wBAAC,mBAAgB,OAAM,gHACrB,8BAAC,SAAM,OAAO,gBAAgB,OAAQ,0BAAgB,MAAK,GAC7D;AAAA,IACA,oBAAC,mBAAgB,OAAM,6BACrB,8BAAC,QACE,mBACC,oBAAC,QAAK,IAAG,KAAK,kBAAO,IAErB,oBAAC,QAAK,OAAM,QAAO,6EAAa,GAEpC,GACF;AAAA,KACF,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Grid
|
|
3
|
+
} from "./chunk-EGEQY3KT.js";
|
|
4
|
+
import {
|
|
5
|
+
Box
|
|
6
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
7
|
+
import {
|
|
8
|
+
Flex
|
|
9
|
+
} from "./chunk-25HMMI7R.js";
|
|
10
|
+
import {
|
|
11
|
+
Heading
|
|
12
|
+
} from "./chunk-BESTU2AY.js";
|
|
13
|
+
import {
|
|
14
|
+
Typo
|
|
15
|
+
} from "./chunk-PMJIFLDT.js";
|
|
16
|
+
|
|
17
|
+
// src/app/platform/userInfos/coaching-customer-info/small.tsx
|
|
18
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
function CoachingCustomerInfoSmall({
|
|
20
|
+
customer,
|
|
21
|
+
children,
|
|
22
|
+
badge
|
|
23
|
+
}) {
|
|
24
|
+
return /* @__PURE__ */ jsxs(
|
|
25
|
+
Flex,
|
|
26
|
+
{
|
|
27
|
+
direction: { initial: "column", xs: "row" },
|
|
28
|
+
gap: "3",
|
|
29
|
+
justify: "between",
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Grid, { align: "center", columns: "auto auto 1fr", gapX: "3", children: [
|
|
32
|
+
/* @__PURE__ */ jsx(Heading, { variant: "heading3", children: (customer == null ? void 0 : customer.username) || "\uC774\uB984 \uC5C6\uC74C" }),
|
|
33
|
+
/* @__PURE__ */ jsx(Typo, { color: "gray", truncate: true, variant: "body", children: customer == null ? void 0 : customer.company }),
|
|
34
|
+
/* @__PURE__ */ jsx(Box, { style: { justifySelf: "end" }, children: badge })
|
|
35
|
+
] }) }),
|
|
36
|
+
children
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export {
|
|
43
|
+
CoachingCustomerInfoSmall
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=chunk-VRY3HFX6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app/platform/userInfos/coaching-customer-info/small.tsx"],"sourcesContent":["import React from 'react';\nimport { Box, Flex, Grid, Heading, Typo } from '../../../../atoms';\nimport type { CoachingCustomerInfoProps } from '../utils';\n\nexport function CoachingCustomerInfoSmall({\n customer,\n children,\n badge,\n}: CoachingCustomerInfoProps): React.ReactNode {\n return (\n <Flex\n direction={{ initial: 'column', xs: 'row' }}\n gap=\"3\"\n justify=\"between\"\n >\n {/* 이름, 사명 */}\n <Box>\n <Grid align=\"center\" columns=\"auto auto 1fr\" gapX=\"3\">\n <Heading variant=\"heading3\">\n {customer?.username || '이름 없음'}\n </Heading>\n <Typo color=\"gray\" truncate variant=\"body\">\n {customer?.company}\n </Typo>\n <Box style={{ justifySelf: 'end' }}>{badge}</Box>\n </Grid>\n </Box>\n {children}\n </Flex>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAiBQ,SACE,KADF;AAbD,SAAS,0BAA0B;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AACF,GAA+C;AAC7C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,EAAE,SAAS,UAAU,IAAI,MAAM;AAAA,MAC1C,KAAI;AAAA,MACJ,SAAQ;AAAA,MAGR;AAAA,4BAAC,OACC,+BAAC,QAAK,OAAM,UAAS,SAAQ,iBAAgB,MAAK,KAChD;AAAA,8BAAC,WAAQ,SAAQ,YACd,gDAAU,aAAY,6BACzB;AAAA,UACA,oBAAC,QAAK,OAAM,QAAO,UAAQ,MAAC,SAAQ,QACjC,+CAAU,SACb;AAAA,UACA,oBAAC,OAAI,OAAO,EAAE,aAAa,MAAM,GAAI,iBAAM;AAAA,WAC7C,GACF;AAAA,QACC;AAAA;AAAA;AAAA,EACH;AAEJ;","names":[]}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CurriculumReviewSteps_default
|
|
3
|
+
} from "./chunk-QOA6EEKP.js";
|
|
4
|
+
import {
|
|
5
|
+
useCurriculumContext
|
|
6
|
+
} from "./chunk-ZFWZAZPG.js";
|
|
7
|
+
import {
|
|
8
|
+
Dialog
|
|
9
|
+
} from "./chunk-AH4A53SZ.js";
|
|
10
|
+
import {
|
|
11
|
+
IconButton
|
|
12
|
+
} from "./chunk-XK6VEVOK.js";
|
|
13
|
+
import {
|
|
14
|
+
Box
|
|
15
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
16
|
+
import {
|
|
17
|
+
Typo
|
|
18
|
+
} from "./chunk-PMJIFLDT.js";
|
|
19
|
+
import {
|
|
20
|
+
Flex
|
|
21
|
+
} from "./chunk-25HMMI7R.js";
|
|
22
|
+
import {
|
|
23
|
+
Button
|
|
24
|
+
} from "./chunk-ZVDAEY5Q.js";
|
|
25
|
+
import {
|
|
26
|
+
__spreadValues
|
|
27
|
+
} from "./chunk-CRTRMMJ7.js";
|
|
28
|
+
|
|
29
|
+
// src/molecules/curriculumV2/CurriculumContents/curriculum-review.tsx
|
|
30
|
+
import { useCallback, useMemo, useState } from "react";
|
|
31
|
+
import { Cross1Icon } from "@radix-ui/react-icons";
|
|
32
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
33
|
+
function CurriculumReview(props) {
|
|
34
|
+
const { item, sectionTitle } = props;
|
|
35
|
+
const { description, buttonTitle } = item;
|
|
36
|
+
const {
|
|
37
|
+
curriculum,
|
|
38
|
+
onReviewSubmit: _onReviewSubmit,
|
|
39
|
+
onReviewValueChange: _onReviewValueChange,
|
|
40
|
+
curriculumReviewAnswers,
|
|
41
|
+
tempCurriculumReviewAnswers,
|
|
42
|
+
curriculumCompleteMap
|
|
43
|
+
} = useCurriculumContext();
|
|
44
|
+
const [open, setOpen] = useState(false);
|
|
45
|
+
const [isChanged, setIsChanged] = useState(false);
|
|
46
|
+
const [closeDialogOpen, setCloseDialogOpen] = useState(false);
|
|
47
|
+
const onReviewValueChange = useCallback(
|
|
48
|
+
({
|
|
49
|
+
reviewId,
|
|
50
|
+
answer
|
|
51
|
+
}) => {
|
|
52
|
+
if (curriculumReviewAnswers[reviewId] === answer[reviewId]) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
setIsChanged(true);
|
|
56
|
+
_onReviewValueChange({ reviewId, answer });
|
|
57
|
+
},
|
|
58
|
+
[_onReviewValueChange, curriculumReviewAnswers]
|
|
59
|
+
);
|
|
60
|
+
const onReviewSubmit = useCallback(
|
|
61
|
+
(values) => {
|
|
62
|
+
return _onReviewSubmit({ reviewId: item.uuid, answer: values }).then(
|
|
63
|
+
(result) => {
|
|
64
|
+
setIsChanged(false);
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
},
|
|
69
|
+
[item.uuid, _onReviewSubmit]
|
|
70
|
+
);
|
|
71
|
+
const onClickEndReview = useCallback(() => {
|
|
72
|
+
setOpen(false);
|
|
73
|
+
}, []);
|
|
74
|
+
const onClickCloseDrawer = useCallback(() => {
|
|
75
|
+
if (isChanged) {
|
|
76
|
+
setCloseDialogOpen(true);
|
|
77
|
+
} else {
|
|
78
|
+
setOpen(false);
|
|
79
|
+
}
|
|
80
|
+
}, [isChanged]);
|
|
81
|
+
const mode = useMemo(() => {
|
|
82
|
+
return item.questions.every(
|
|
83
|
+
(question) => curriculumReviewAnswers[question.uuid] && curriculumReviewAnswers[question.uuid] !== ""
|
|
84
|
+
) ? "edit" : "create";
|
|
85
|
+
}, [curriculumReviewAnswers, item.questions]);
|
|
86
|
+
const defaultValues = useMemo(() => {
|
|
87
|
+
const allAnswers = __spreadValues(__spreadValues({}, tempCurriculumReviewAnswers), curriculumReviewAnswers);
|
|
88
|
+
return item.questions.reduce((acc, question) => {
|
|
89
|
+
acc[question.uuid] = allAnswers[question.uuid] || "";
|
|
90
|
+
return acc;
|
|
91
|
+
}, {});
|
|
92
|
+
}, [curriculumReviewAnswers, item.questions, tempCurriculumReviewAnswers]);
|
|
93
|
+
const done = useMemo(() => {
|
|
94
|
+
return Boolean(curriculumCompleteMap[item.uuid]);
|
|
95
|
+
}, [curriculumCompleteMap, item.uuid]);
|
|
96
|
+
const bgColor = done ? "var(--color-panel-solid)" : void 0;
|
|
97
|
+
return /* @__PURE__ */ jsxs(Dialog.Root, { onOpenChange: setOpen, open, children: [
|
|
98
|
+
/* @__PURE__ */ jsxs(
|
|
99
|
+
Flex,
|
|
100
|
+
{
|
|
101
|
+
align: "center",
|
|
102
|
+
direction: "column",
|
|
103
|
+
height: "100%",
|
|
104
|
+
justify: "center",
|
|
105
|
+
px: "3",
|
|
106
|
+
py: "3",
|
|
107
|
+
style: {
|
|
108
|
+
backgroundImage: `url(https://tipp-coaching-live.s3.ap-northeast-2.amazonaws.com/images/curriculum_review_bg.png)`,
|
|
109
|
+
backgroundPosition: "center",
|
|
110
|
+
backgroundSize: "cover",
|
|
111
|
+
backgroundRepeat: "no-repeat"
|
|
112
|
+
},
|
|
113
|
+
width: "100%",
|
|
114
|
+
children: [
|
|
115
|
+
/* @__PURE__ */ jsx(Typo, { color: "gray", weight: "bold", children: curriculum.title }),
|
|
116
|
+
/* @__PURE__ */ jsx(Typo, { align: "center", as: "p", color: "gray", children: description }),
|
|
117
|
+
/* @__PURE__ */ jsx(Dialog.Trigger, { children: /* @__PURE__ */ jsx(
|
|
118
|
+
Button,
|
|
119
|
+
{
|
|
120
|
+
mt: "3",
|
|
121
|
+
style: { minWidth: 232, backgroundColor: bgColor },
|
|
122
|
+
variant: done ? "outline" : "solid",
|
|
123
|
+
children: /* @__PURE__ */ jsx(Typo, { truncate: true, children: done ? "\uB098\uC758 \uC751\uB2F5 \uB2E4\uC2DC\uBCF4\uAE30" : buttonTitle })
|
|
124
|
+
}
|
|
125
|
+
) })
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
),
|
|
129
|
+
/* @__PURE__ */ jsx(
|
|
130
|
+
Dialog.Content,
|
|
131
|
+
{
|
|
132
|
+
height: "100%",
|
|
133
|
+
hideCloseButton: true,
|
|
134
|
+
style: { borderRadius: 0, padding: 0 },
|
|
135
|
+
title: "",
|
|
136
|
+
width: "100%",
|
|
137
|
+
children: /* @__PURE__ */ jsxs(
|
|
138
|
+
Flex,
|
|
139
|
+
{
|
|
140
|
+
align: "center",
|
|
141
|
+
height: "100%",
|
|
142
|
+
justify: "center",
|
|
143
|
+
pb: "3",
|
|
144
|
+
position: "relative",
|
|
145
|
+
width: "100%",
|
|
146
|
+
children: [
|
|
147
|
+
/* @__PURE__ */ jsx(
|
|
148
|
+
CurriculumReviewSteps_default,
|
|
149
|
+
{
|
|
150
|
+
contents: item,
|
|
151
|
+
curriculum,
|
|
152
|
+
defaultValues,
|
|
153
|
+
done,
|
|
154
|
+
mode,
|
|
155
|
+
onClickEndReview,
|
|
156
|
+
onReviewValueChange,
|
|
157
|
+
onSubmit: onReviewSubmit,
|
|
158
|
+
title: sectionTitle
|
|
159
|
+
}
|
|
160
|
+
),
|
|
161
|
+
/* @__PURE__ */ jsx(Box, { position: "absolute", right: "16px", top: "16px", children: /* @__PURE__ */ jsxs(
|
|
162
|
+
IconButton,
|
|
163
|
+
{
|
|
164
|
+
color: "gray",
|
|
165
|
+
onClick: onClickCloseDrawer,
|
|
166
|
+
variant: "ghost",
|
|
167
|
+
children: [
|
|
168
|
+
/* @__PURE__ */ jsx(Box, { display: { initial: "none", md: "block" }, children: /* @__PURE__ */ jsx(Cross1Icon, { height: 20, width: 20 }) }),
|
|
169
|
+
/* @__PURE__ */ jsx(Box, { display: { initial: "block", md: "none" }, children: /* @__PURE__ */ jsx(Cross1Icon, { height: 16, width: 16 }) })
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
) }),
|
|
173
|
+
/* @__PURE__ */ jsx(Dialog.Root, { onOpenChange: setCloseDialogOpen, open: closeDialogOpen, children: /* @__PURE__ */ jsx(
|
|
174
|
+
Dialog.Content,
|
|
175
|
+
{
|
|
176
|
+
buttons: /* @__PURE__ */ jsxs(Flex, { gap: "3", justify: "end", children: [
|
|
177
|
+
/* @__PURE__ */ jsx(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { color: "gray", variant: "outline", children: "\uB3CC\uC544\uAC00\uAE30" }) }),
|
|
178
|
+
/* @__PURE__ */ jsx(Dialog.Close, { children: /* @__PURE__ */ jsx(Button, { color: "red", onClick: onClickEndReview, children: "\uB098\uAC00\uAE30" }) })
|
|
179
|
+
] }),
|
|
180
|
+
title: "\uC791\uC131\uC744 \uC911\uB2E8\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",
|
|
181
|
+
children: /* @__PURE__ */ jsx(Typo, { children: "\uD398\uC774\uC9C0\uC5D0\uC11C \uBC97\uC5B4\uB098\uBA74 \uC791\uC131\uD55C \uB0B4\uC6A9\uC774 \uC800\uC7A5\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4." })
|
|
182
|
+
}
|
|
183
|
+
) })
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
)
|
|
187
|
+
}
|
|
188
|
+
)
|
|
189
|
+
] });
|
|
190
|
+
}
|
|
191
|
+
var curriculum_review_default = CurriculumReview;
|
|
192
|
+
|
|
193
|
+
export {
|
|
194
|
+
curriculum_review_default
|
|
195
|
+
};
|
|
196
|
+
//# sourceMappingURL=chunk-WU6EJCDT.js.map
|