@dotss/tictoccroc 0.7.0 → 0.7.1
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.
|
@@ -15,6 +15,9 @@ export interface BotMessageOffer {
|
|
|
15
15
|
export interface BotMessageMatching {
|
|
16
16
|
careStartDate?: string | null;
|
|
17
17
|
careStartTime?: string | null;
|
|
18
|
+
changeReqDate?: string | null;
|
|
19
|
+
changeReqStartTime?: string | null;
|
|
20
|
+
changeReqEndTime?: string | null;
|
|
18
21
|
firstCareType?: string | null;
|
|
19
22
|
secondCareType?: string | null;
|
|
20
23
|
representativeChildName?: string | null;
|
|
@@ -61,7 +61,7 @@ function p({ id: p, botMessageType: m, ctaType: h, ctaTargetId: g, ctaTargetTabl
|
|
|
61
61
|
}),
|
|
62
62
|
/* @__PURE__ */ f(s, {
|
|
63
63
|
alignItems: "flex-start",
|
|
64
|
-
gap:
|
|
64
|
+
gap: 2,
|
|
65
65
|
"aria-hidden": !0,
|
|
66
66
|
children: [x && /* @__PURE__ */ d(t, {
|
|
67
67
|
src: x,
|
|
@@ -98,16 +98,16 @@ function p({ id: p, botMessageType: m, ctaType: h, ctaTargetId: g, ctaTargetTabl
|
|
|
98
98
|
}),
|
|
99
99
|
C && /* @__PURE__ */ d(c, {
|
|
100
100
|
tag: "p",
|
|
101
|
-
variant: "
|
|
101
|
+
variant: "b2R",
|
|
102
102
|
inlineCSS: { marginTop: S ? F.content(1) : void 0 },
|
|
103
103
|
children: C
|
|
104
104
|
}),
|
|
105
105
|
z.length > 0 && /* @__PURE__ */ d(c, {
|
|
106
106
|
tag: "dl",
|
|
107
|
-
inlineCSS: { marginTop: F.content(
|
|
107
|
+
inlineCSS: { marginTop: F.content(6) },
|
|
108
108
|
children: z.map((e) => /* @__PURE__ */ f(c, {
|
|
109
109
|
tag: "div",
|
|
110
|
-
variant: "
|
|
110
|
+
variant: "b2R",
|
|
111
111
|
children: [/* @__PURE__ */ d(c, {
|
|
112
112
|
tag: "dt",
|
|
113
113
|
visuallyHidden: e.hideLabel,
|
|
@@ -121,9 +121,14 @@ function p({ id: p, botMessageType: m, ctaType: h, ctaTargetId: g, ctaTargetTabl
|
|
|
121
121
|
}, e.label))
|
|
122
122
|
}),
|
|
123
123
|
R && /* @__PURE__ */ d(o, {
|
|
124
|
-
color: "secondary",
|
|
125
124
|
onClick: B,
|
|
126
|
-
inlineCSS: {
|
|
125
|
+
inlineCSS: {
|
|
126
|
+
marginTop: F.content(4),
|
|
127
|
+
backgroundColor: P[10],
|
|
128
|
+
color: P[100],
|
|
129
|
+
"&:hover:not([aria-disabled=\"true\"])": { backgroundColor: P[10] },
|
|
130
|
+
"&:active:not([aria-disabled=\"true\"])": { backgroundColor: P[10] }
|
|
131
|
+
},
|
|
127
132
|
children: R
|
|
128
133
|
})
|
|
129
134
|
]
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import e from "../../../utils/getCareTypeLabel/index.mjs";
|
|
2
2
|
import t from "dayjs";
|
|
3
3
|
//#region shared/components/ChatKit/BotMessage/BotMessage.utils.ts
|
|
4
|
-
var n = "아이이름", r = "돌봄종류"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
var n = "아이이름", r = "돌봄종류", i = "방문일시", a = "기존 수업시간", o = "변경 수업시간", s = {
|
|
5
|
+
TEACHER_APPLIED: "NONE",
|
|
6
|
+
PARENT_SENT_OFFER: "NONE",
|
|
7
|
+
PLAY_CONTENT_RECOMMENDED: "NONE",
|
|
8
|
+
PARENT_REJECTED_APPLICATION: "NONE",
|
|
9
|
+
TEACHER_REFUSED_OFFER: "NONE",
|
|
10
|
+
PARENT_REQUESTED_MATCHING_SCHEDULE_CHANGE: "NONE",
|
|
11
|
+
TEACHER_REFUSED_MATCHING_SCHEDULE_CHANGE: "ORIGINAL_ONLY",
|
|
12
|
+
MATCHING_SCHEDULE_CHANGE_EXPIRED: "ORIGINAL_ONLY",
|
|
13
|
+
TEACHER_ACCEPTED_MATCHING_SCHEDULE_CHANGE: "ORIGINAL_AND_CHANGED"
|
|
14
|
+
};
|
|
15
|
+
function c(e) {
|
|
14
16
|
switch (e) {
|
|
15
17
|
case "MY_CLASS_CHECK": return "내 수업 확인하기";
|
|
16
18
|
case "OFFER_CHECK": return "공고 확인하기";
|
|
@@ -22,43 +24,59 @@ function a(e) {
|
|
|
22
24
|
default: return "";
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
|
-
function
|
|
26
|
-
let c =
|
|
27
|
+
function l({ offer: t, matchings: a, botMessageType: o }) {
|
|
28
|
+
let c = a?.[0] ?? t ?? null;
|
|
27
29
|
if (!c) return [];
|
|
28
|
-
let l = o
|
|
30
|
+
let l = o ? s[o] : void 0;
|
|
31
|
+
if (l === "NONE") return [];
|
|
32
|
+
if (l === "ORIGINAL_ONLY") return u(c);
|
|
33
|
+
if (l === "ORIGINAL_AND_CHANGED") return d(c);
|
|
34
|
+
let f = a?.length ? a.length : t?.totalCareCount ?? 1, m = [];
|
|
29
35
|
if (c.careStartDate && c.careStartTime) {
|
|
30
|
-
let e =
|
|
31
|
-
|
|
32
|
-
label:
|
|
33
|
-
value: `${
|
|
36
|
+
let e = p(c.careStartDate, c.careStartTime), t = f > 1 ? ` 외 ${f - 1}건` : "";
|
|
37
|
+
m.push({
|
|
38
|
+
label: i,
|
|
39
|
+
value: `${e}${t}`
|
|
34
40
|
});
|
|
35
41
|
}
|
|
36
42
|
if (c.representativeChildName) {
|
|
37
43
|
let e = c.childCount ?? 1, t = e > 1 ? ` 외 ${e - 1}명` : "";
|
|
38
|
-
|
|
44
|
+
m.push({
|
|
39
45
|
label: n,
|
|
40
46
|
value: `${c.representativeChildName}${t}`
|
|
41
47
|
});
|
|
42
48
|
}
|
|
43
|
-
let
|
|
44
|
-
return
|
|
49
|
+
let h = [e(c.firstCareType), e(c.secondCareType)].filter(Boolean).join("+");
|
|
50
|
+
return h && m.push({
|
|
45
51
|
label: r,
|
|
46
|
-
value:
|
|
52
|
+
value: h,
|
|
47
53
|
hideLabel: !0
|
|
48
|
-
}),
|
|
54
|
+
}), m;
|
|
49
55
|
}
|
|
50
|
-
|
|
56
|
+
var u = (e) => {
|
|
57
|
+
let t = [];
|
|
58
|
+
return f(t, a, e.careStartDate, e.careStartTime), t;
|
|
59
|
+
}, d = (e) => {
|
|
60
|
+
let t = [];
|
|
61
|
+
return f(t, a, e.changeReqDate, e.changeReqStartTime), f(t, o, e.careStartDate, e.careStartTime), t;
|
|
62
|
+
}, f = (e, t, n, r) => {
|
|
63
|
+
n && r && e.push({
|
|
64
|
+
label: t,
|
|
65
|
+
value: p(n, r)
|
|
66
|
+
});
|
|
67
|
+
}, p = (e, n) => t(`${e} ${n}`).format("YYYY-MM-DD HH:mm");
|
|
68
|
+
function m({ title: e, content: n, offer: r, matchings: i, botMessageType: a, regDatetime: o }) {
|
|
51
69
|
return [
|
|
52
70
|
"안내",
|
|
53
71
|
e,
|
|
54
72
|
n,
|
|
55
|
-
|
|
73
|
+
l({
|
|
56
74
|
offer: r,
|
|
57
75
|
matchings: i,
|
|
58
76
|
botMessageType: a
|
|
59
77
|
}).map((e) => `${e.label} ${e.value}`).join(", "),
|
|
60
|
-
t(
|
|
78
|
+
t(o).format("YYYY년 MM월 DD일 A h:mm")
|
|
61
79
|
].filter(Boolean).join(", ");
|
|
62
80
|
}
|
|
63
81
|
//#endregion
|
|
64
|
-
export {
|
|
82
|
+
export { m as getBotMessageLabel, l as getClassInfo, c as getCtaButtonText };
|
package/package.json
CHANGED