@bwg-ui/core 1.3.7 → 1.3.9
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/chunks/CMPrgrMstrP02-CIPnCdt3.cjs +1 -0
- package/dist/chunks/CMPrgrMstrP02-jC3zDeFU.js +154 -0
- package/dist/chunks/CMSearchIntfGwP01-D4qj6J2N.cjs +1 -0
- package/dist/chunks/{CMSearchIntfGwP01-DCHZJn2H.js → CMSearchIntfGwP01-DzTHXQi3.js} +31 -31
- package/dist/chunks/MenuReport-BtP1uAmq.cjs +1 -0
- package/dist/chunks/{MenuReport-IBdoU2S3.js → MenuReport-DgMjx5Hs.js} +5 -5
- package/dist/chunks/SearchAddressP01-B25Exa9E.cjs +1 -0
- package/dist/chunks/SearchAddressP01-B_D3nrkn.js +605 -0
- package/dist/chunks/SearchDepartmentP01-D5ihO3l8.cjs +1 -0
- package/dist/chunks/SearchDepartmentP01-pUAav3Xp.js +352 -0
- package/dist/chunks/SearchDepartmentP02-B3oL1B-h.js +518 -0
- package/dist/chunks/SearchDepartmentP02-CWs8sLuu.cjs +1 -0
- package/dist/chunks/SearchHolidayP01-SuuyAk9T.js +188 -0
- package/dist/chunks/SearchHolidayP01-cJ8Wlkwr.cjs +1 -0
- package/dist/chunks/SearchOrganizationP01-3nDwrB08.cjs +1 -0
- package/dist/chunks/SearchOrganizationP01-ChwLBfVt.js +420 -0
- package/dist/chunks/SearchOrganizationP02-0Suj4DLH.cjs +1 -0
- package/dist/chunks/SearchOrganizationP02-DI0V4Bdz.js +516 -0
- package/dist/chunks/UploadMultiFileP01-CffgcIXm.cjs +1 -0
- package/dist/chunks/UploadMultiFileP01-Cy2LeYfy.js +38 -0
- package/dist/chunks/{layout-components-DnuV2Psp.js → layout-components-Cpzy8mH1.js} +1053 -951
- package/dist/chunks/layout-components-y9YpQQbx.cjs +38 -0
- package/dist/chunks/provider-DrmM0H4o.cjs +1 -0
- package/dist/chunks/provider-ff4RVDYo.js +711 -0
- package/dist/components/common/ButtonAccessController.d.ts +2 -3
- package/dist/components/common/ButtonAccessController.d.ts.map +1 -1
- package/dist/components/common/BwgButtonGroup.d.ts +1 -1
- package/dist/components/common/BwgButtonGroup.d.ts.map +1 -1
- package/dist/components/common/BwgCol.d.ts +1 -1
- package/dist/components/common/BwgCol.d.ts.map +1 -1
- package/dist/components/common/BwgGrid.d.ts.map +1 -1
- package/dist/components/common/BwgModal.d.ts +10 -0
- package/dist/components/common/BwgModal.d.ts.map +1 -0
- package/dist/components/common/BwgView.d.ts.map +1 -1
- package/dist/components/common/index.cjs +1 -1
- package/dist/components/common/index.d.ts +2 -1
- package/dist/components/common/index.d.ts.map +1 -1
- package/dist/components/common/index.js +4887 -28
- package/dist/components/core/BwgCmnFileItems.d.ts +47 -0
- package/dist/components/core/BwgCmnFileItems.d.ts.map +1 -0
- package/dist/components/core/BwgDeptSearch.d.ts +38 -0
- package/dist/components/core/BwgDeptSearch.d.ts.map +1 -0
- package/dist/components/core/BwgDraggerUploader.d.ts +13 -0
- package/dist/components/core/BwgDraggerUploader.d.ts.map +1 -0
- package/dist/components/core/BwgEmpSearch.d.ts +12 -4
- package/dist/components/core/BwgEmpSearch.d.ts.map +1 -1
- package/dist/components/core/BwgUploader.d.ts +6 -92
- package/dist/components/core/BwgUploader.d.ts.map +1 -1
- package/dist/components/core/BwgUploader_bak.d.ts +98 -0
- package/dist/components/core/BwgUploader_bak.d.ts.map +1 -0
- package/dist/components/core/BwgXlsxUploader.d.ts +25 -0
- package/dist/components/core/BwgXlsxUploader.d.ts.map +1 -0
- package/dist/components/core/index.cjs +1 -1
- package/dist/components/core/index.d.ts +11 -2
- package/dist/components/core/index.d.ts.map +1 -1
- package/dist/components/core/index.js +1318 -1164
- package/dist/components/guide/index.cjs +1 -1
- package/dist/components/guide/index.js +17 -17
- package/dist/components/layout/BwgCoreLogin.d.ts.map +1 -1
- package/dist/components/layout/BwgPortal01.d.ts.map +1 -1
- package/dist/components/layout/custom/ConfigurableSidebar.d.ts.map +1 -1
- package/dist/components/layout/index.cjs +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/components/pages/auth/AuthManagement.d.ts +8 -0
- package/dist/components/pages/auth/AuthManagement.d.ts.map +1 -0
- package/dist/components/pages/auth/AuthSelector.d.ts +28 -0
- package/dist/components/pages/auth/AuthSelector.d.ts.map +1 -0
- package/dist/components/pages/auth/RoleAuthMapper.d.ts +8 -0
- package/dist/components/pages/auth/RoleAuthMapper.d.ts.map +1 -0
- package/dist/components/pages/auth/RoleDashBoard.d.ts +13 -0
- package/dist/components/pages/auth/RoleDashBoard.d.ts.map +1 -0
- package/dist/components/pages/auth/RoleView.d.ts +17 -0
- package/dist/components/pages/auth/RoleView.d.ts.map +1 -0
- package/dist/components/pages/board/AdminBoard.d.ts +6 -0
- package/dist/components/pages/board/AdminBoard.d.ts.map +1 -0
- package/dist/components/pages/board/BoardComment.d.ts +8 -0
- package/dist/components/pages/board/BoardComment.d.ts.map +1 -0
- package/dist/components/pages/board/MyBoard.d.ts +6 -0
- package/dist/components/pages/board/MyBoard.d.ts.map +1 -0
- package/dist/components/pages/index.d.ts +10 -10
- package/dist/components/pages/index.d.ts.map +1 -1
- package/dist/components/pages/rsrc/MenuManagement.d.ts +4 -0
- package/dist/components/pages/rsrc/MenuManagement.d.ts.map +1 -0
- package/dist/components/pages/rsrc/{CMMenuPrntSelectModal.d.ts → MenuSelector.d.ts} +5 -4
- package/dist/components/pages/rsrc/MenuSelector.d.ts.map +1 -0
- package/dist/components/pages/rsrc/ProgramManagement.d.ts +4 -0
- package/dist/components/pages/rsrc/ProgramManagement.d.ts.map +1 -0
- package/dist/components/pages/rsrc/{CMMenuPrgrSelectModal.d.ts → ProgramSelector.d.ts} +5 -4
- package/dist/components/pages/rsrc/ProgramSelector.d.ts.map +1 -0
- package/dist/components/pages/syst/CommonCodeManagement.d.ts +4 -0
- package/dist/components/pages/syst/CommonCodeManagement.d.ts.map +1 -0
- package/dist/components/pages/syst/CommonCodeTester.d.ts +7 -0
- package/dist/components/pages/syst/CommonCodeTester.d.ts.map +1 -0
- package/dist/components/pages/types.d.ts +5 -1
- package/dist/components/pages/types.d.ts.map +1 -1
- package/dist/components/popup/SearchDepartmentP01.d.ts +1 -1
- package/dist/components/popup/SearchDepartmentP01.d.ts.map +1 -1
- package/dist/components/popup/SearchOrganizationP02.d.ts.map +1 -1
- package/dist/components/popup/UploadMultiFileP01.d.ts +14 -0
- package/dist/components/popup/UploadMultiFileP01.d.ts.map +1 -0
- package/dist/components/popup/config/localPopupRegistry.d.ts.map +1 -1
- package/dist/components/popup/index.cjs +1 -1
- package/dist/components/popup/index.d.ts +1 -0
- package/dist/components/popup/index.d.ts.map +1 -1
- package/dist/components/popup/index.js +16 -8
- package/dist/index.cjs +186 -1
- package/dist/index.js +32378 -290
- package/dist/provider/contexts/BwgViewContext.d.ts +8 -1
- package/dist/provider/contexts/BwgViewContext.d.ts.map +1 -1
- package/dist/provider/contexts/CommonCodeContext.d.ts +15 -28
- package/dist/provider/contexts/CommonCodeContext.d.ts.map +1 -1
- package/dist/provider/contexts/MenuButtonContentx.d.ts +1 -0
- package/dist/provider/contexts/MenuButtonContentx.d.ts.map +1 -0
- package/dist/provider/contexts/MenuButtonContext.d.ts +42 -0
- package/dist/provider/contexts/MenuButtonContext.d.ts.map +1 -0
- package/dist/provider/hooks/index.d.ts +1 -0
- package/dist/provider/hooks/index.d.ts.map +1 -1
- package/dist/provider/hooks/useFileUploader.d.ts +74 -0
- package/dist/provider/hooks/useFileUploader.d.ts.map +1 -0
- package/dist/provider/hooks/useSizeConfig.d.ts +2 -2
- package/dist/provider/index.cjs +1 -1
- package/dist/provider/index.d.ts +1 -0
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/index.js +8 -7
- package/dist/stores/codeStore.d.ts +65 -128
- package/dist/stores/codeStore.d.ts.map +1 -1
- package/dist/stores/index.cjs +2 -2
- package/dist/stores/index.d.ts +3 -3
- package/dist/stores/index.d.ts.map +1 -1
- package/dist/stores/index.js +815 -1625
- package/dist/stores/menuModelStore.d.ts +22 -7
- package/dist/stores/menuModelStore.d.ts.map +1 -1
- package/dist/stores/menuViewStore.d.ts +3 -3
- package/dist/stores/menuViewStore.d.ts.map +1 -1
- package/dist/stores/systemStore.d.ts +50 -17
- package/dist/stores/systemStore.d.ts.map +1 -1
- package/dist/styles/assets/images/header/icon/ico-bell.svg +3 -3
- package/dist/styles/assets/images/header/icon/ico-logout.svg +10 -10
- package/dist/styles/assets/images/header/icon/ico-setting.svg +4 -4
- package/dist/styles/assets/images/header/icon/ico-sidebar-arrow.svg +3 -3
- package/dist/styles/assets/images/menus/ico1-completed.png +0 -0
- package/dist/styles/assets/images/menus/ico1-design.png +0 -0
- package/dist/styles/assets/images/menus/ico1-dev.png +0 -0
- package/dist/styles/assets/images/menus/ico2-completed.png +0 -0
- package/dist/styles/assets/images/menus/ico2-design.png +0 -0
- package/dist/styles/assets/images/menus/ico2-dev.png +0 -0
- package/dist/styles/assets/images/menus/ico3-completed.png +0 -0
- package/dist/styles/assets/images/menus/ico3-design.png +0 -0
- package/dist/styles/assets/images/menus/ico3-dev.png +0 -0
- package/dist/utils/apiUtils.d.ts.map +1 -1
- package/dist/utils/colorFormat.d.ts.map +1 -1
- package/dist/utils/commonUtils.d.ts +1 -2
- package/dist/utils/commonUtils.d.ts.map +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.ts +9 -3
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1118 -1962
- package/dist/utils/serviceConfig.d.ts +9 -3
- package/dist/utils/serviceConfig.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/chunks/CMSearchIntfGwP01-0t3umcc_.cjs +0 -1
- package/dist/chunks/MenuReport-C70mGz2g.cjs +0 -1
- package/dist/chunks/common-components-DNgQR-Ge.cjs +0 -1109
- package/dist/chunks/common-components-DeYL3J6X.js +0 -52604
- package/dist/chunks/layout-components-Bf9IsLUS.cjs +0 -38
- package/dist/chunks/provider-Bi5OYngn.cjs +0 -1
- package/dist/chunks/provider-Bx4VpaFf.js +0 -465
- package/dist/components/pages/board/CMAdminBoardM01.d.ts +0 -6
- package/dist/components/pages/board/CMAdminBoardM01.d.ts.map +0 -1
- package/dist/components/pages/board/CMBoardS01.d.ts +0 -8
- package/dist/components/pages/board/CMBoardS01.d.ts.map +0 -1
- package/dist/components/pages/board/CMMyBoardM01.d.ts +0 -6
- package/dist/components/pages/board/CMMyBoardM01.d.ts.map +0 -1
- package/dist/components/pages/guide/BwgComponentGuideM01.d.ts +0 -3
- package/dist/components/pages/guide/BwgComponentGuideM01.d.ts.map +0 -1
- package/dist/components/pages/guide/BwgDeveloperGuideM01.d.ts +0 -3
- package/dist/components/pages/guide/BwgDeveloperGuideM01.d.ts.map +0 -1
- package/dist/components/pages/guide/BwgReactGuideM01.d.ts +0 -3
- package/dist/components/pages/guide/BwgReactGuideM01.d.ts.map +0 -1
- package/dist/components/pages/rsrc/CMMenuPrgrSelectModal.d.ts.map +0 -1
- package/dist/components/pages/rsrc/CMMenuPrntSelectModal.d.ts.map +0 -1
- package/dist/components/pages/syst/CMSystCodeM01.d.ts +0 -4
- package/dist/components/pages/syst/CMSystCodeM01.d.ts.map +0 -1
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { CalendarOutlined as M } from "@ant-design/icons";
|
|
3
|
+
import { theme as R, message as P, Row as _, Col as S, Card as p, Calendar as $, Space as Y, Typography as j, Tag as E, Empty as X } from "antd";
|
|
4
|
+
import { useState as d, useEffect as k } from "react";
|
|
5
|
+
import m from "dayjs";
|
|
6
|
+
import { useCodeStore as O } from "../stores/index.js";
|
|
7
|
+
import { callService as I, getUserInfo as A } from "../utils/index.js";
|
|
8
|
+
import { BwgPopup as G, ContentLayOut as U, ContentBox as W } from "../components/common/index.js";
|
|
9
|
+
const { Text: D, Title: q } = j, re = ({ popup: x }) => {
|
|
10
|
+
const [c, C] = d(m()), [F, v] = d(m()), [y, b] = d([]), [f, H] = d([]), [s, L] = d("month");
|
|
11
|
+
O();
|
|
12
|
+
const { token: r } = R.useToken(), u = (t, n, o = s) => {
|
|
13
|
+
const l = n.filter((a) => {
|
|
14
|
+
if (o === "year") {
|
|
15
|
+
const h = a.stndYmd.substring(0, 6), B = t.format("YYYYMM");
|
|
16
|
+
return h === B;
|
|
17
|
+
} else {
|
|
18
|
+
const h = t.format("YYYYMMDD");
|
|
19
|
+
return a.stndYmd === h;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
b(l);
|
|
23
|
+
}, T = (t) => {
|
|
24
|
+
C(t), u(t, f, s);
|
|
25
|
+
}, w = (t, n) => {
|
|
26
|
+
v(t), L(n), g.SCMHLDY00101(n, t);
|
|
27
|
+
};
|
|
28
|
+
k(() => {
|
|
29
|
+
g.SCMHLDY00101();
|
|
30
|
+
}, []);
|
|
31
|
+
const z = (t) => {
|
|
32
|
+
const n = f.filter((o) => {
|
|
33
|
+
if (s === "year") {
|
|
34
|
+
const l = o.stndYmd.substring(0, 6), a = t.format("YYYYMM");
|
|
35
|
+
return l === a;
|
|
36
|
+
} else {
|
|
37
|
+
const l = t.format("YYYYMMDD");
|
|
38
|
+
return o.stndYmd === l;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
return n.length > 0 ? /* @__PURE__ */ e(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
style: {
|
|
45
|
+
position: "absolute",
|
|
46
|
+
bottom: "1px",
|
|
47
|
+
left: "1px",
|
|
48
|
+
right: "1px",
|
|
49
|
+
height: "3px",
|
|
50
|
+
display: "flex",
|
|
51
|
+
gap: "1px"
|
|
52
|
+
},
|
|
53
|
+
children: n.map((o, l) => /* @__PURE__ */ e(
|
|
54
|
+
"div",
|
|
55
|
+
{
|
|
56
|
+
style: {
|
|
57
|
+
flex: 1,
|
|
58
|
+
height: "3px",
|
|
59
|
+
background: o.hldyYn === "Y" ? r.colorError : r.colorSuccess,
|
|
60
|
+
borderRadius: "1px"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
l
|
|
64
|
+
))
|
|
65
|
+
}
|
|
66
|
+
) : null;
|
|
67
|
+
}, g = {
|
|
68
|
+
SCMHLDY00101: async (t = s, n = c) => {
|
|
69
|
+
try {
|
|
70
|
+
let o;
|
|
71
|
+
t === "year" ? o = n.format("YYYY") : o = n.format("YYYYMM");
|
|
72
|
+
const l = await I("SCMHLDY00101", {
|
|
73
|
+
crprCd: A()?.crprCd || "",
|
|
74
|
+
sysCd: __SYS_CD__,
|
|
75
|
+
stndYmd: o
|
|
76
|
+
});
|
|
77
|
+
H(l.sub || []), u(n, l.sub || [], t);
|
|
78
|
+
} catch (o) {
|
|
79
|
+
console.error("휴일 데이터 로드 실패:", o), P.error("휴일 데이터를 불러오는데 실패했습니다.");
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
return /* @__PURE__ */ e(G, { popup: x, children: /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(W, { children: /* @__PURE__ */ i(_, { gutter: r.padding, style: { marginTop: r.padding }, children: [
|
|
84
|
+
/* @__PURE__ */ e(S, { span: 12, children: /* @__PURE__ */ e(
|
|
85
|
+
p,
|
|
86
|
+
{
|
|
87
|
+
title: /* @__PURE__ */ i(Y, { children: [
|
|
88
|
+
/* @__PURE__ */ e(M, {}),
|
|
89
|
+
/* @__PURE__ */ e("span", { children: "휴일 달력" })
|
|
90
|
+
] }),
|
|
91
|
+
style: { height: "500px" },
|
|
92
|
+
children: /* @__PURE__ */ e(
|
|
93
|
+
$,
|
|
94
|
+
{
|
|
95
|
+
fullscreen: !1,
|
|
96
|
+
value: c,
|
|
97
|
+
onSelect: T,
|
|
98
|
+
onPanelChange: w,
|
|
99
|
+
cellRender: z,
|
|
100
|
+
style: { height: "400px" },
|
|
101
|
+
mode: s
|
|
102
|
+
}
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
) }),
|
|
106
|
+
/* @__PURE__ */ e(S, { span: 12, children: /* @__PURE__ */ e(
|
|
107
|
+
p,
|
|
108
|
+
{
|
|
109
|
+
title: /* @__PURE__ */ i(Y, { children: [
|
|
110
|
+
/* @__PURE__ */ e(M, {}),
|
|
111
|
+
/* @__PURE__ */ e("span", { children: s === "year" ? `${c.format("YYYY년 MM월")} 휴일 목록` : `${c.format(
|
|
112
|
+
"YYYY년 MM월 DD일"
|
|
113
|
+
)} 휴일 목록` })
|
|
114
|
+
] }),
|
|
115
|
+
style: { height: "500px" },
|
|
116
|
+
children: /* @__PURE__ */ e("div", { style: { height: "400px", overflowY: "auto" }, children: y.length > 0 ? /* @__PURE__ */ e(
|
|
117
|
+
Y,
|
|
118
|
+
{
|
|
119
|
+
direction: "vertical",
|
|
120
|
+
style: { width: "100%" },
|
|
121
|
+
size: "small",
|
|
122
|
+
children: y.map((t, n) => /* @__PURE__ */ e(
|
|
123
|
+
p,
|
|
124
|
+
{
|
|
125
|
+
size: "small",
|
|
126
|
+
style: {
|
|
127
|
+
border: `${r.lineWidth}px solid ${r.colorBorder}`,
|
|
128
|
+
borderRadius: r.borderRadiusLG
|
|
129
|
+
},
|
|
130
|
+
children: /* @__PURE__ */ i("div", { style: { padding: `${r.paddingXS}px 0` }, children: [
|
|
131
|
+
/* @__PURE__ */ i(
|
|
132
|
+
"div",
|
|
133
|
+
{
|
|
134
|
+
style: {
|
|
135
|
+
display: "flex",
|
|
136
|
+
justifyContent: "space-between",
|
|
137
|
+
alignItems: "center",
|
|
138
|
+
marginBottom: r.paddingXS
|
|
139
|
+
},
|
|
140
|
+
children: [
|
|
141
|
+
/* @__PURE__ */ e(
|
|
142
|
+
q,
|
|
143
|
+
{
|
|
144
|
+
level: 5,
|
|
145
|
+
style: { margin: 0, color: r.colorPrimary },
|
|
146
|
+
children: t.hldyDscr || "휴일명 미입력"
|
|
147
|
+
}
|
|
148
|
+
),
|
|
149
|
+
t.hldyYn === "Y" && /* @__PURE__ */ e(E, { color: r.colorSuccess, children: "휴일" })
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
),
|
|
153
|
+
/* @__PURE__ */ e("div", { style: { marginBottom: r.paddingXXS }, children: /* @__PURE__ */ e(
|
|
154
|
+
D,
|
|
155
|
+
{
|
|
156
|
+
type: "secondary",
|
|
157
|
+
style: { fontSize: r.fontSizeSM },
|
|
158
|
+
children: m(t.stndYmd).format(
|
|
159
|
+
"YYYY년 MM월 DD일 dddd"
|
|
160
|
+
)
|
|
161
|
+
}
|
|
162
|
+
) }),
|
|
163
|
+
t.hldyDscr && /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
164
|
+
D,
|
|
165
|
+
{
|
|
166
|
+
style: { fontSize: r.fontSizeSM + 1 },
|
|
167
|
+
children: t.hldyDscr
|
|
168
|
+
}
|
|
169
|
+
) })
|
|
170
|
+
] })
|
|
171
|
+
},
|
|
172
|
+
n
|
|
173
|
+
))
|
|
174
|
+
}
|
|
175
|
+
) : /* @__PURE__ */ e(
|
|
176
|
+
X,
|
|
177
|
+
{
|
|
178
|
+
description: "선택된 날짜에 등록된 휴일이 없습니다.",
|
|
179
|
+
style: { marginTop: "100px" }
|
|
180
|
+
}
|
|
181
|
+
) })
|
|
182
|
+
}
|
|
183
|
+
) })
|
|
184
|
+
] }) }) }) });
|
|
185
|
+
};
|
|
186
|
+
export {
|
|
187
|
+
re as default
|
|
188
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("@ant-design/icons"),s=require("antd"),i=require("react"),u=require("dayjs"),T=require("../stores/index.cjs"),f=require("../utils/index.cjs"),Y=require("../components/common/index.cjs"),{Text:j,Title:w}=s.Typography,z=({popup:S})=>{const[c,M]=i.useState(u()),[B,C]=i.useState(u()),[x,D]=i.useState([]),[p,v]=i.useState([]),[d,b]=i.useState("month");T.useCodeStore();const{token:r}=s.theme.useToken(),y=(t,n,l=d)=>{const o=n.filter(a=>{if(l==="year"){const h=a.stndYmd.substring(0,6),R=t.format("YYYYMM");return h===R}else{const h=t.format("YYYYMMDD");return a.stndYmd===h}});D(o)},H=t=>{M(t),y(t,p,d)},q=(t,n)=>{C(t),b(n),m.SCMHLDY00101(n,t)};i.useEffect(()=>{m.SCMHLDY00101()},[]);const L=t=>{const n=p.filter(l=>{if(d==="year"){const o=l.stndYmd.substring(0,6),a=t.format("YYYYMM");return o===a}else{const o=t.format("YYYYMMDD");return l.stndYmd===o}});return n.length>0?e.jsx("div",{style:{position:"absolute",bottom:"1px",left:"1px",right:"1px",height:"3px",display:"flex",gap:"1px"},children:n.map((l,o)=>e.jsx("div",{style:{flex:1,height:"3px",background:l.hldyYn==="Y"?r.colorError:r.colorSuccess,borderRadius:"1px"}},o))}):null},m={SCMHLDY00101:async(t=d,n=c)=>{try{let l;t==="year"?l=n.format("YYYY"):l=n.format("YYYYMM");const o=await f.callService("SCMHLDY00101",{crprCd:f.getUserInfo()?.crprCd||"",sysCd:__SYS_CD__,stndYmd:l});v(o.sub||[]),y(n,o.sub||[],t)}catch(l){console.error("휴일 데이터 로드 실패:",l),s.message.error("휴일 데이터를 불러오는데 실패했습니다.")}}};return e.jsx(Y.BwgPopup,{popup:S,children:e.jsx(Y.ContentLayOut,{children:e.jsx(Y.ContentBox,{children:e.jsxs(s.Row,{gutter:r.padding,style:{marginTop:r.padding},children:[e.jsx(s.Col,{span:12,children:e.jsx(s.Card,{title:e.jsxs(s.Space,{children:[e.jsx(g.CalendarOutlined,{}),e.jsx("span",{children:"휴일 달력"})]}),style:{height:"500px"},children:e.jsx(s.Calendar,{fullscreen:!1,value:c,onSelect:H,onPanelChange:q,cellRender:L,style:{height:"400px"},mode:d})})}),e.jsx(s.Col,{span:12,children:e.jsx(s.Card,{title:e.jsxs(s.Space,{children:[e.jsx(g.CalendarOutlined,{}),e.jsx("span",{children:d==="year"?`${c.format("YYYY년 MM월")} 휴일 목록`:`${c.format("YYYY년 MM월 DD일")} 휴일 목록`})]}),style:{height:"500px"},children:e.jsx("div",{style:{height:"400px",overflowY:"auto"},children:x.length>0?e.jsx(s.Space,{direction:"vertical",style:{width:"100%"},size:"small",children:x.map((t,n)=>e.jsx(s.Card,{size:"small",style:{border:`${r.lineWidth}px solid ${r.colorBorder}`,borderRadius:r.borderRadiusLG},children:e.jsxs("div",{style:{padding:`${r.paddingXS}px 0`},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:r.paddingXS},children:[e.jsx(w,{level:5,style:{margin:0,color:r.colorPrimary},children:t.hldyDscr||"휴일명 미입력"}),t.hldyYn==="Y"&&e.jsx(s.Tag,{color:r.colorSuccess,children:"휴일"})]}),e.jsx("div",{style:{marginBottom:r.paddingXXS},children:e.jsx(j,{type:"secondary",style:{fontSize:r.fontSizeSM},children:u(t.stndYmd).format("YYYY년 MM월 DD일 dddd")})}),t.hldyDscr&&e.jsx("div",{children:e.jsx(j,{style:{fontSize:r.fontSizeSM+1},children:t.hldyDscr})})]})},n))}):e.jsx(s.Empty,{description:"선택된 날짜에 등록된 휴일이 없습니다.",style:{marginTop:"100px"}})})})})]})})})})};exports.default=z;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),w=require("@ant-design/icons"),l=require("antd"),r=require("react"),z=require("../utils/index.cjs"),b=require("../components/common/index.cjs"),J=o=>{const k=[...o].sort((i,p)=>i.deptLvl-p.deptLvl||i.orgSortOrd-p.orgSortOrd||i.deptCd.localeCompare(p.deptCd)),x=new Map;k.forEach(i=>x.set(i.deptCd,{...i,children:[]}));const g=[];k.forEach(i=>{const p=x.get(i.deptCd),S=i.hrnkDeptCd;S&&x.has(S)?x.get(S).children.push(p):g.push(p)});const f=i=>{!i.children||i.children.length===0?delete i.children:i.children.forEach(f)};return g.forEach(f),g},G=({popup:o,onClose:k})=>{const[x,g]=r.useState([]),[f,i]=r.useState([]),[p,S]=r.useState([]),[M,D]=r.useState(!1),[I,v]=r.useState([]),[c,N]=r.useState(null),[L,P]=r.useState(""),[u,q]=r.useState(!1),[h,y]=r.useState([]),[T,E]=r.useState(!1),m=r.useCallback(async e=>{if(e)try{const n=await z.callService("SCMUTIL00106",{deptCds:e},{showLoading:!1}),s=Array.isArray(n?.empList)&&n.empList||[];v(s)}catch(n){console.error("직원 목록 로딩 실패:",n),l.message.error("직원 목록을 불러오는 중 오류가 발생했습니다.")}},[]),B=r.useCallback(async(e,n)=>{try{const s={keyword:e,deptCds:n},d=await z.callService("SCMUTIL00106",s,{showLoading:!1});v(d?.empList||[]),d?.empCnt===0?E(!0):E(!1)}catch(s){console.error("검색 실패:",s),l.message.error("검색 중 오류가 발생했습니다."),v([]),E(!1)}},[]),O=r.useCallback(async()=>{D(!0);try{const e=await z.callService("SCMUTIL00103",{...o?.popupParams},{showLoading:!1}),n=Array.isArray(e?.deptList)&&e.deptList||[];if(n.length===0){console.warn("⚠️ 조직도 데이터가 없습니다.");return}const s=J(n);S(s);const d=n.filter(a=>Number(a.deptLvl)<=2).map(a=>String(a.deptCd));if(g(d),o?.popupParams?.keyword){const a=o.popupParams.keyword;await B(a,[]);return}const C=s[1];C&&m&&(i([C.deptCd]),m([C.deptCd]))}catch(e){console.error("부서 목록 로딩 실패:",e),l.message.error("부서 목록을 불러오는 중 오류가 발생했습니다.")}finally{D(!1)}},[m]);r.useEffect(()=>{O()},[O]);const F=r.useMemo(()=>{const e=n=>n.map(s=>({title:t.jsxs(t.Fragment,{children:[t.jsxs("span",{style:{marginRight:4},children:[s.deptNm," "]}),t.jsx(l.Tag,{color:"default",icon:t.jsx(w.UserOutlined,{}),style:{borderRadius:"7px",fontSize:"11px"},children:s.empCnt},s.deptCd)]}),key:s.deptCd,children:s.children?e(s.children):void 0,isLeaf:!s.children||s.children.length===0}));return e(p)},[p]),R=r.useCallback(e=>{c&&c.empNo===e.empNo?N(null):N(e)},[]),$=r.useCallback(e=>{const n=e.map(String);i(n);const s=(C,a)=>{for(const j of C){if(j.deptCd===a)return{deptCd:j.deptCd,deptNm:j.deptNm};if(j.children){const K=s(j.children,a);if(K)return K}}return null};if(!n[0])return;const d=s(p,n[0]);if(d){if(u){if(h.some(a=>a.deptCd===d.deptCd))return;if(h.length>=5){l.message.warning("부서는 최대 5개까지 선택할 수 있습니다.");return}y(a=>[...a,d])}else y([d]);P(""),m([d.deptCd])}},[p,m,u,h]),A=r.useCallback(e=>{g(e.map(String))},[]),U=r.useCallback(async e=>{const n=e.trim(),s=u&&h.length>0?h.map(d=>d.deptCd):[];await B(n,s)},[B,u,h]),W=r.useCallback(e=>{y(n=>n.filter(s=>s.deptCd!==e))},[]),Y={confirm:()=>{if(c){const e=o?.config;e?.onSelect?e.onSelect(c):o?.popupParams?.onSelect?o.popupParams.onSelect(c):o?.config?.callback&&o.config.callback(JSON.stringify(c,null,2)),e?.onClose&&e.onClose(),o?.close?.()}else l.message.error("사원을 선택해주세요.")},cancel:()=>{const e=o?.config;e?.onCancel&&e.onCancel(),o?.close?.()}};return t.jsx(b.BwgPopup,{popup:o,buttons:[{id:"confirm",label:"확인",onClick:()=>{Y.confirm()}}],onClose:()=>{o?.close?.(),k?.()},children:t.jsx(b.ContentLayOut,{children:t.jsx(b.ContentBox,{border:!1,style:{paddingBottom:20},children:t.jsxs(l.Splitter,{layout:"vertical",style:{height:"100%"},children:[t.jsxs(l.Splitter.Panel,{defaultSize:"60%",min:"20%",max:"80%",children:[t.jsx("div",{style:{position:"sticky",top:0,zIndex:10,backgroundColor:"white",borderBottom:"1px solid #e0e0e0",padding:"8px"},children:t.jsxs(l.Flex,{gap:12,vertical:!0,children:[t.jsx(b.BwgTitleBox,{title:"조직도",marginBottom:0}),t.jsx(l.Input.Search,{placeholder:"이름, 소속, 전화번호 검색",prefix:t.jsx(w.SearchOutlined,{}),value:L,allowClear:!0,enterButton:t.jsx(l.Button,{children:"검색"}),onChange:e=>{P(e.target.value),y([]),N(null),v([]),E(!1),!e.target.value.trim()&&f.length>0&&m([f[0]])},onSearch:U}),t.jsx(l.Flex,{gap:8,align:"center",style:{marginLeft:6},children:t.jsxs(b.BwgConfigProvider,{children:[t.jsx(l.Switch,{checked:u,onChange:e=>{q(e),e||y([])}}),t.jsx("span",{style:{fontSize:"14px"},children:"부서 안에서 검색하기"})]})}),u&&t.jsx(l.Flex,{gap:4,wrap:"wrap",style:{margin:4},children:h.length>0?t.jsx(t.Fragment,{children:h.slice(0,5).map(e=>t.jsx(l.Tag,{closable:!0,onClose:()=>W(e.deptCd),children:e.deptNm},e.deptCd))}):t.jsx("span",{style:{fontSize:"12px",color:"#999"},children:"트리에서 부서를 선택하면 조건에 추가됩니다."})})]})}),t.jsx("div",{style:{padding:"16px",overflowY:"hidden"},children:t.jsx(l.Spin,{spinning:M,children:t.jsx(l.Tree,{className:"bwg-ogrn-tree",treeData:F,expandedKeys:x,selectedKeys:f,onSelect:$,onExpand:A,showLine:!0,showIcon:!1,style:{overflow:"hidden"},titleRender:e=>t.jsx("span",{style:{padding:"4px 8px",borderRadius:"4px",fontWeight:f.includes(e.key)?"bold":"normal",display:"inline-block",width:"100%"},children:e.title})})})})]}),t.jsx(l.Splitter.Panel,{collapsible:!0,children:t.jsxs("div",{style:{padding:"16px",overflowY:"hidden"},children:[t.jsx("div",{style:{marginBottom:"16px"},children:t.jsx("h3",{style:{margin:"0 0 8px 0",fontSize:"16px",fontWeight:"bold"},children:L?"검색 결과":h[0]?.deptNm})}),t.jsxs("div",{style:{overflow:"hidden",height:"100%"},children:[I.map(e=>t.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"12px",border:"1px solid #e0e0e0",borderRadius:"8px",marginBottom:"8px",cursor:"pointer",backgroundColor:c&&c.crprCd===e.crprCd&&c.wkplCd===e.wkplCd&&c.empNo===e.empNo?"#efebff":"white"},onClick:()=>R(e),children:[t.jsx("div",{style:{marginRight:"12px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",width:"20px",height:"20px"},onClick:n=>{n.stopPropagation(),R(e)},children:c&&c.crprCd===e.crprCd&&c.wkplCd===e.wkplCd&&c.empNo===e.empNo?t.jsx(w.CheckCircleFilled,{style:{fontSize:"20px",color:"#6449fc"}}):t.jsx(w.CheckCircleOutlined,{style:{fontSize:"20px",color:"#d9d9d9"}})}),t.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"#e0e0e0",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",fontSize:"18px",color:"#666"},children:t.jsx(w.UserOutlined,{})}),t.jsxs("div",{style:{flex:1},children:[t.jsx("div",{style:{fontSize:"14px",fontWeight:"bold",marginBottom:"4px"},children:e.empNm}),t.jsxs("div",{style:{fontSize:"12px",color:"#666",marginBottom:"2px"},children:[e.deptNm," (",e.deptCd,") | 직급:"," ",e.jbpsCd," | 등급: ",e.jbgdCd]})]})]},`emp-${e.crprCd}-${e.wkplCd}-${e.empNo}-${e.jbpsCd}-${e.jbgdCd}-${e.empMarkOrd}`)),I.length===0&&t.jsx("div",{style:{textAlign:"center",padding:"40px",color:"#999",fontSize:"14px"},children:h.length>0?"해당 부서에 직원이 없습니다.":L&&T?"검색 결과가 없습니다.":L&&!T?"검색 버튼을 누르거나 엔터키를 눌러 검색해주세요.":"검색어를 입력하거나 부서를 눌러 직원을 조회해주세요."})]})]})})]})})})})};exports.default=G;
|
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
import { jsx as t, jsxs as a, Fragment as A } from "react/jsx-runtime";
|
|
2
|
+
import { SearchOutlined as X, CheckCircleFilled as Z, CheckCircleOutlined as _, UserOutlined as U } from "@ant-design/icons";
|
|
3
|
+
import { message as b, Splitter as D, Flex as I, Input as ee, Button as te, Switch as re, Tag as F, Spin as ne, Tree as ie } from "antd";
|
|
4
|
+
import { useState as h, useCallback as f, useEffect as oe, useMemo as le } from "react";
|
|
5
|
+
import { callService as P } from "../utils/index.js";
|
|
6
|
+
import { BwgPopup as se, ContentLayOut as de, ContentBox as ce, BwgTitleBox as ae, BwgConfigProvider as pe } from "../components/common/index.js";
|
|
7
|
+
const he = (o) => {
|
|
8
|
+
const k = [...o].sort(
|
|
9
|
+
(i, c) => (
|
|
10
|
+
// 1) 정렬: 레벨 → 정렬순서 → 부서코드
|
|
11
|
+
i.deptLvl - c.deptLvl || i.orgSortOrd - c.orgSortOrd || i.deptCd.localeCompare(c.deptCd)
|
|
12
|
+
)
|
|
13
|
+
), m = /* @__PURE__ */ new Map();
|
|
14
|
+
k.forEach((i) => m.set(i.deptCd, { ...i, children: [] }));
|
|
15
|
+
const C = [];
|
|
16
|
+
k.forEach((i) => {
|
|
17
|
+
const c = m.get(i.deptCd), S = i.hrnkDeptCd;
|
|
18
|
+
S && m.has(S) ? m.get(S).children.push(c) : C.push(c);
|
|
19
|
+
});
|
|
20
|
+
const g = (i) => {
|
|
21
|
+
!i.children || i.children.length === 0 ? delete i.children : i.children.forEach(g);
|
|
22
|
+
};
|
|
23
|
+
return C.forEach(g), C;
|
|
24
|
+
}, ye = ({
|
|
25
|
+
popup: o,
|
|
26
|
+
onClose: k
|
|
27
|
+
}) => {
|
|
28
|
+
const [m, C] = h([]), [g, i] = h([]), [c, S] = h([]), [W, T] = h(!1), [O, L] = h([]), [l, B] = h(
|
|
29
|
+
null
|
|
30
|
+
), [E, R] = h(""), [u, Y] = h(!1), [p, w] = h([]), [j, N] = h(!1), x = f(async (e) => {
|
|
31
|
+
if (e)
|
|
32
|
+
try {
|
|
33
|
+
const n = await P(
|
|
34
|
+
"SCMUTIL00106",
|
|
35
|
+
{
|
|
36
|
+
deptCds: e
|
|
37
|
+
},
|
|
38
|
+
{ showLoading: !1 }
|
|
39
|
+
), r = Array.isArray(n?.empList) && n.empList || [];
|
|
40
|
+
L(r);
|
|
41
|
+
} catch (n) {
|
|
42
|
+
console.error("직원 목록 로딩 실패:", n), b.error("직원 목록을 불러오는 중 오류가 발생했습니다.");
|
|
43
|
+
}
|
|
44
|
+
}, []), z = f(
|
|
45
|
+
async (e, n) => {
|
|
46
|
+
try {
|
|
47
|
+
const s = await P("SCMUTIL00106", { keyword: e, deptCds: n }, {
|
|
48
|
+
showLoading: !1
|
|
49
|
+
});
|
|
50
|
+
L(s?.empList || []), s?.empCnt === 0 ? N(!0) : N(!1);
|
|
51
|
+
} catch (r) {
|
|
52
|
+
console.error("검색 실패:", r), b.error("검색 중 오류가 발생했습니다."), L([]), N(!1);
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
[]
|
|
56
|
+
), K = f(async () => {
|
|
57
|
+
T(!0);
|
|
58
|
+
try {
|
|
59
|
+
const e = await P(
|
|
60
|
+
"SCMUTIL00103",
|
|
61
|
+
{
|
|
62
|
+
...o?.popupParams
|
|
63
|
+
},
|
|
64
|
+
{ showLoading: !1 }
|
|
65
|
+
), n = Array.isArray(e?.deptList) && e.deptList || [];
|
|
66
|
+
if (n.length === 0) {
|
|
67
|
+
console.warn("⚠️ 조직도 데이터가 없습니다.");
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const r = he(n);
|
|
71
|
+
S(r);
|
|
72
|
+
const s = n.filter((d) => Number(d.deptLvl) <= 2).map((d) => String(d.deptCd));
|
|
73
|
+
if (C(s), o?.popupParams?.keyword) {
|
|
74
|
+
const d = o.popupParams.keyword;
|
|
75
|
+
await z(d, []);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const y = r[1];
|
|
79
|
+
y && x && (i([y.deptCd]), x([y.deptCd]));
|
|
80
|
+
} catch (e) {
|
|
81
|
+
console.error("부서 목록 로딩 실패:", e), b.error("부서 목록을 불러오는 중 오류가 발생했습니다.");
|
|
82
|
+
} finally {
|
|
83
|
+
T(!1);
|
|
84
|
+
}
|
|
85
|
+
}, [x]);
|
|
86
|
+
oe(() => {
|
|
87
|
+
K();
|
|
88
|
+
}, [K]);
|
|
89
|
+
const J = le(() => {
|
|
90
|
+
const e = (n) => n.map((r) => ({
|
|
91
|
+
title: /* @__PURE__ */ a(A, { children: [
|
|
92
|
+
/* @__PURE__ */ a("span", { style: { marginRight: 4 }, children: [
|
|
93
|
+
r.deptNm,
|
|
94
|
+
" "
|
|
95
|
+
] }),
|
|
96
|
+
/* @__PURE__ */ t(
|
|
97
|
+
F,
|
|
98
|
+
{
|
|
99
|
+
color: "default",
|
|
100
|
+
icon: /* @__PURE__ */ t(U, {}),
|
|
101
|
+
style: { borderRadius: "7px", fontSize: "11px" },
|
|
102
|
+
children: r.empCnt
|
|
103
|
+
},
|
|
104
|
+
r.deptCd
|
|
105
|
+
)
|
|
106
|
+
] }),
|
|
107
|
+
key: r.deptCd,
|
|
108
|
+
children: r.children ? e(r.children) : void 0,
|
|
109
|
+
isLeaf: !r.children || r.children.length === 0
|
|
110
|
+
}));
|
|
111
|
+
return e(c);
|
|
112
|
+
}, [c]), M = f((e) => {
|
|
113
|
+
l && l.empNo === e.empNo ? B(null) : B(e);
|
|
114
|
+
}, []), q = f(
|
|
115
|
+
(e) => {
|
|
116
|
+
const n = e.map(String);
|
|
117
|
+
i(n);
|
|
118
|
+
const r = (y, d) => {
|
|
119
|
+
for (const v of y) {
|
|
120
|
+
if (v.deptCd === d) return { deptCd: v.deptCd, deptNm: v.deptNm };
|
|
121
|
+
if (v.children) {
|
|
122
|
+
const $ = r(v.children, d);
|
|
123
|
+
if ($) return $;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return null;
|
|
127
|
+
};
|
|
128
|
+
if (!n[0])
|
|
129
|
+
return;
|
|
130
|
+
const s = r(c, n[0]);
|
|
131
|
+
if (s) {
|
|
132
|
+
if (u) {
|
|
133
|
+
if (p.some((d) => d.deptCd === s.deptCd)) return;
|
|
134
|
+
if (p.length >= 5) {
|
|
135
|
+
b.warning("부서는 최대 5개까지 선택할 수 있습니다.");
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
w((d) => [...d, s]);
|
|
139
|
+
} else
|
|
140
|
+
w([s]);
|
|
141
|
+
R(""), x([s.deptCd]);
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
[c, x, u, p]
|
|
145
|
+
), G = f((e) => {
|
|
146
|
+
C(e.map(String));
|
|
147
|
+
}, []), H = f(
|
|
148
|
+
async (e) => {
|
|
149
|
+
const n = e.trim(), r = u && p.length > 0 ? p.map((s) => s.deptCd) : [];
|
|
150
|
+
await z(n, r);
|
|
151
|
+
},
|
|
152
|
+
[z, u, p]
|
|
153
|
+
), Q = f((e) => {
|
|
154
|
+
w((n) => n.filter((r) => r.deptCd !== e));
|
|
155
|
+
}, []), V = {
|
|
156
|
+
confirm: () => {
|
|
157
|
+
if (l) {
|
|
158
|
+
const e = o?.config;
|
|
159
|
+
e?.onSelect ? e.onSelect(l) : o?.popupParams?.onSelect ? o.popupParams.onSelect(l) : o?.config?.callback && o.config.callback(JSON.stringify(l, null, 2)), e?.onClose && e.onClose(), o?.close?.();
|
|
160
|
+
} else
|
|
161
|
+
b.error("사원을 선택해주세요.");
|
|
162
|
+
},
|
|
163
|
+
cancel: () => {
|
|
164
|
+
const e = o?.config;
|
|
165
|
+
e?.onCancel && e.onCancel(), o?.close?.();
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
return /* @__PURE__ */ t(
|
|
169
|
+
se,
|
|
170
|
+
{
|
|
171
|
+
popup: o,
|
|
172
|
+
buttons: [
|
|
173
|
+
{
|
|
174
|
+
id: "confirm",
|
|
175
|
+
label: "확인",
|
|
176
|
+
onClick: () => {
|
|
177
|
+
V.confirm();
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
onClose: () => {
|
|
182
|
+
o?.close?.(), k?.();
|
|
183
|
+
},
|
|
184
|
+
children: /* @__PURE__ */ t(de, { children: /* @__PURE__ */ t(ce, { border: !1, style: { paddingBottom: 20 }, children: /* @__PURE__ */ a(D, { layout: "vertical", style: { height: "100%" }, children: [
|
|
185
|
+
/* @__PURE__ */ a(D.Panel, { defaultSize: "60%", min: "20%", max: "80%", children: [
|
|
186
|
+
/* @__PURE__ */ t(
|
|
187
|
+
"div",
|
|
188
|
+
{
|
|
189
|
+
style: {
|
|
190
|
+
position: "sticky",
|
|
191
|
+
top: 0,
|
|
192
|
+
zIndex: 10,
|
|
193
|
+
backgroundColor: "white",
|
|
194
|
+
borderBottom: "1px solid #e0e0e0",
|
|
195
|
+
padding: "8px"
|
|
196
|
+
},
|
|
197
|
+
children: /* @__PURE__ */ a(I, { gap: 12, vertical: !0, children: [
|
|
198
|
+
/* @__PURE__ */ t(ae, { title: "조직도", marginBottom: 0 }),
|
|
199
|
+
/* @__PURE__ */ t(
|
|
200
|
+
ee.Search,
|
|
201
|
+
{
|
|
202
|
+
placeholder: "이름, 소속, 전화번호 검색",
|
|
203
|
+
prefix: /* @__PURE__ */ t(X, {}),
|
|
204
|
+
value: E,
|
|
205
|
+
allowClear: !0,
|
|
206
|
+
enterButton: /* @__PURE__ */ t(te, { children: "검색" }),
|
|
207
|
+
onChange: (e) => {
|
|
208
|
+
R(e.target.value), w([]), B(null), L([]), N(!1), !e.target.value.trim() && g.length > 0 && x([g[0]]);
|
|
209
|
+
},
|
|
210
|
+
onSearch: H
|
|
211
|
+
}
|
|
212
|
+
),
|
|
213
|
+
/* @__PURE__ */ t(I, { gap: 8, align: "center", style: { marginLeft: 6 }, children: /* @__PURE__ */ a(pe, { children: [
|
|
214
|
+
/* @__PURE__ */ t(
|
|
215
|
+
re,
|
|
216
|
+
{
|
|
217
|
+
checked: u,
|
|
218
|
+
onChange: (e) => {
|
|
219
|
+
Y(e), e || w([]);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
),
|
|
223
|
+
/* @__PURE__ */ t("span", { style: { fontSize: "14px" }, children: "부서 안에서 검색하기" })
|
|
224
|
+
] }) }),
|
|
225
|
+
u && /* @__PURE__ */ t(I, { gap: 4, wrap: "wrap", style: { margin: 4 }, children: p.length > 0 ? /* @__PURE__ */ t(A, { children: p.slice(0, 5).map((e) => /* @__PURE__ */ t(
|
|
226
|
+
F,
|
|
227
|
+
{
|
|
228
|
+
closable: !0,
|
|
229
|
+
onClose: () => Q(e.deptCd),
|
|
230
|
+
children: e.deptNm
|
|
231
|
+
},
|
|
232
|
+
e.deptCd
|
|
233
|
+
)) }) : /* @__PURE__ */ t("span", { style: { fontSize: "12px", color: "#999" }, children: "트리에서 부서를 선택하면 조건에 추가됩니다." }) })
|
|
234
|
+
] })
|
|
235
|
+
}
|
|
236
|
+
),
|
|
237
|
+
/* @__PURE__ */ t(
|
|
238
|
+
"div",
|
|
239
|
+
{
|
|
240
|
+
style: {
|
|
241
|
+
padding: "16px",
|
|
242
|
+
overflowY: "hidden"
|
|
243
|
+
},
|
|
244
|
+
children: /* @__PURE__ */ t(ne, { spinning: W, children: /* @__PURE__ */ t(
|
|
245
|
+
ie,
|
|
246
|
+
{
|
|
247
|
+
className: "bwg-ogrn-tree",
|
|
248
|
+
treeData: J,
|
|
249
|
+
expandedKeys: m,
|
|
250
|
+
selectedKeys: g,
|
|
251
|
+
onSelect: q,
|
|
252
|
+
onExpand: G,
|
|
253
|
+
showLine: !0,
|
|
254
|
+
showIcon: !1,
|
|
255
|
+
style: { overflow: "hidden" },
|
|
256
|
+
titleRender: (e) => /* @__PURE__ */ t(
|
|
257
|
+
"span",
|
|
258
|
+
{
|
|
259
|
+
style: {
|
|
260
|
+
padding: "4px 8px",
|
|
261
|
+
borderRadius: "4px",
|
|
262
|
+
fontWeight: g.includes(e.key) ? "bold" : "normal",
|
|
263
|
+
display: "inline-block",
|
|
264
|
+
width: "100%"
|
|
265
|
+
},
|
|
266
|
+
children: e.title
|
|
267
|
+
}
|
|
268
|
+
)
|
|
269
|
+
}
|
|
270
|
+
) })
|
|
271
|
+
}
|
|
272
|
+
)
|
|
273
|
+
] }),
|
|
274
|
+
/* @__PURE__ */ t(D.Panel, { collapsible: !0, children: /* @__PURE__ */ a(
|
|
275
|
+
"div",
|
|
276
|
+
{
|
|
277
|
+
style: {
|
|
278
|
+
padding: "16px",
|
|
279
|
+
overflowY: "hidden"
|
|
280
|
+
},
|
|
281
|
+
children: [
|
|
282
|
+
/* @__PURE__ */ t("div", { style: { marginBottom: "16px" }, children: /* @__PURE__ */ t(
|
|
283
|
+
"h3",
|
|
284
|
+
{
|
|
285
|
+
style: {
|
|
286
|
+
margin: "0 0 8px 0",
|
|
287
|
+
fontSize: "16px",
|
|
288
|
+
fontWeight: "bold"
|
|
289
|
+
},
|
|
290
|
+
children: E ? "검색 결과" : p[0]?.deptNm
|
|
291
|
+
}
|
|
292
|
+
) }),
|
|
293
|
+
/* @__PURE__ */ a("div", { style: { overflow: "hidden", height: "100%" }, children: [
|
|
294
|
+
O.map((e) => /* @__PURE__ */ a(
|
|
295
|
+
"div",
|
|
296
|
+
{
|
|
297
|
+
style: {
|
|
298
|
+
display: "flex",
|
|
299
|
+
alignItems: "center",
|
|
300
|
+
padding: "12px",
|
|
301
|
+
border: "1px solid #e0e0e0",
|
|
302
|
+
borderRadius: "8px",
|
|
303
|
+
marginBottom: "8px",
|
|
304
|
+
cursor: "pointer",
|
|
305
|
+
backgroundColor: l && l.crprCd === e.crprCd && l.wkplCd === e.wkplCd && l.empNo === e.empNo ? "#efebff" : "white"
|
|
306
|
+
},
|
|
307
|
+
onClick: () => M(e),
|
|
308
|
+
children: [
|
|
309
|
+
/* @__PURE__ */ t(
|
|
310
|
+
"div",
|
|
311
|
+
{
|
|
312
|
+
style: {
|
|
313
|
+
marginRight: "12px",
|
|
314
|
+
cursor: "pointer",
|
|
315
|
+
display: "flex",
|
|
316
|
+
alignItems: "center",
|
|
317
|
+
justifyContent: "center",
|
|
318
|
+
width: "20px",
|
|
319
|
+
height: "20px"
|
|
320
|
+
},
|
|
321
|
+
onClick: (n) => {
|
|
322
|
+
n.stopPropagation(), M(e);
|
|
323
|
+
},
|
|
324
|
+
children: l && l.crprCd === e.crprCd && l.wkplCd === e.wkplCd && l.empNo === e.empNo ? /* @__PURE__ */ t(
|
|
325
|
+
Z,
|
|
326
|
+
{
|
|
327
|
+
style: {
|
|
328
|
+
fontSize: "20px",
|
|
329
|
+
color: "#6449fc"
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
) : /* @__PURE__ */ t(
|
|
333
|
+
_,
|
|
334
|
+
{
|
|
335
|
+
style: {
|
|
336
|
+
fontSize: "20px",
|
|
337
|
+
color: "#d9d9d9"
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
)
|
|
341
|
+
}
|
|
342
|
+
),
|
|
343
|
+
/* @__PURE__ */ t(
|
|
344
|
+
"div",
|
|
345
|
+
{
|
|
346
|
+
style: {
|
|
347
|
+
width: "40px",
|
|
348
|
+
height: "40px",
|
|
349
|
+
borderRadius: "50%",
|
|
350
|
+
backgroundColor: "#e0e0e0",
|
|
351
|
+
display: "flex",
|
|
352
|
+
alignItems: "center",
|
|
353
|
+
justifyContent: "center",
|
|
354
|
+
marginRight: "12px",
|
|
355
|
+
fontSize: "18px",
|
|
356
|
+
color: "#666"
|
|
357
|
+
},
|
|
358
|
+
children: /* @__PURE__ */ t(U, {})
|
|
359
|
+
}
|
|
360
|
+
),
|
|
361
|
+
/* @__PURE__ */ a("div", { style: { flex: 1 }, children: [
|
|
362
|
+
/* @__PURE__ */ t(
|
|
363
|
+
"div",
|
|
364
|
+
{
|
|
365
|
+
style: {
|
|
366
|
+
fontSize: "14px",
|
|
367
|
+
fontWeight: "bold",
|
|
368
|
+
marginBottom: "4px"
|
|
369
|
+
},
|
|
370
|
+
children: e.empNm
|
|
371
|
+
}
|
|
372
|
+
),
|
|
373
|
+
/* @__PURE__ */ a(
|
|
374
|
+
"div",
|
|
375
|
+
{
|
|
376
|
+
style: {
|
|
377
|
+
fontSize: "12px",
|
|
378
|
+
color: "#666",
|
|
379
|
+
marginBottom: "2px"
|
|
380
|
+
},
|
|
381
|
+
children: [
|
|
382
|
+
e.deptNm,
|
|
383
|
+
" (",
|
|
384
|
+
e.deptCd,
|
|
385
|
+
") | 직급:",
|
|
386
|
+
" ",
|
|
387
|
+
e.jbpsCd,
|
|
388
|
+
" | 등급: ",
|
|
389
|
+
e.jbgdCd
|
|
390
|
+
]
|
|
391
|
+
}
|
|
392
|
+
)
|
|
393
|
+
] })
|
|
394
|
+
]
|
|
395
|
+
},
|
|
396
|
+
`emp-${e.crprCd}-${e.wkplCd}-${e.empNo}-${e.jbpsCd}-${e.jbgdCd}-${e.empMarkOrd}`
|
|
397
|
+
)),
|
|
398
|
+
O.length === 0 && /* @__PURE__ */ t(
|
|
399
|
+
"div",
|
|
400
|
+
{
|
|
401
|
+
style: {
|
|
402
|
+
textAlign: "center",
|
|
403
|
+
padding: "40px",
|
|
404
|
+
color: "#999",
|
|
405
|
+
fontSize: "14px"
|
|
406
|
+
},
|
|
407
|
+
children: p.length > 0 ? "해당 부서에 직원이 없습니다." : E && j ? "검색 결과가 없습니다." : E && !j ? "검색 버튼을 누르거나 엔터키를 눌러 검색해주세요." : "검색어를 입력하거나 부서를 눌러 직원을 조회해주세요."
|
|
408
|
+
}
|
|
409
|
+
)
|
|
410
|
+
] })
|
|
411
|
+
]
|
|
412
|
+
}
|
|
413
|
+
) })
|
|
414
|
+
] }) }) })
|
|
415
|
+
}
|
|
416
|
+
);
|
|
417
|
+
};
|
|
418
|
+
export {
|
|
419
|
+
ye as default
|
|
420
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),x=require("@ant-design/icons"),r=require("antd"),l=require("react"),z=require("../utils/index.cjs"),j=require("../components/common/index.cjs"),V=c=>{const S=[...c].sort((i,a)=>i.deptLvl-a.deptLvl||i.orgSortOrd-a.orgSortOrd||i.deptCd.localeCompare(a.deptCd)),d=new Map;S.forEach(i=>d.set(i.deptCd,{...i,children:[]}));const f=[];S.forEach(i=>{const a=d.get(i.deptCd),p=i.hrnkDeptCd;p&&d.has(p)?d.get(p).children.push(a):f.push(a)});const b=i=>{!i.children||i.children.length===0?delete i.children:i.children.forEach(b)};return f.forEach(b),f},X=({popup:c,onClose:S})=>{const[d,f]=l.useState(""),[b,i]=l.useState(""),[a,p]=l.useState([]),[g,B]=l.useState([]),[k,P]=l.useState([]),[E,v]=l.useState([]),[R,L]=l.useState(!1),[D,w]=l.useState(!1),[m,C]=l.useState({}),u=l.useCallback(async e=>{if(e)try{const s=await z.callService("SCMUTIL00106",{deptCds:e},{showLoading:!1}),n=Array.isArray(s?.empList)&&s.empList||[];v(n)}catch(s){console.error("직원 목록 로딩 실패:",s),r.message.error("직원 목록을 불러오는 중 오류가 발생했습니다.")}},[]),O=l.useCallback(async(e,s)=>{try{const n={keyword:e,deptCds:s},h=await z.callService("SCMUTIL00106",n,{showLoading:!1});v(h?.empList||[]),h?.empCnt===0?w(!0):w(!1)}catch(n){console.error("검색 실패:",n),r.message.error("검색 중 오류가 발생했습니다."),v([]),w(!1)}},[]),I=l.useCallback(async()=>{try{L(!0);const e=await z.callService("SCMUTIL00103",{...c?.popupParams},{showLoading:!1}),s=Array.isArray(e?.deptList)&&e.deptList||[];if(s.length===0){console.warn("⚠️ 조직도 데이터가 없습니다.");return}const n=V(s);P(n);const h=s.filter(o=>o.deptLvl<=2).map(o=>o.deptCd);if(p(h),c?.popupParams?.keyword){const o=c.popupParams.keyword;await O(o,[]);return}if(n.length>0){const o=n[1];B([o.deptCd]),i(o.deptNm),u([o.deptCd])}}catch(e){console.error("❌ 조직도 데이터 로딩 실패:",e),r.message.error("조직도 데이터를 불러오는 중 오류가 발생했습니다.")}finally{L(!1)}},[u]);l.useEffect(()=>{I()},[I]);const A=l.useMemo(()=>{const e=s=>s.map(n=>({title:n.deptNm,key:n.deptCd,children:n.children?e(n.children):void 0,isLeaf:!n.children||n.children.length===0}));return e(k)},[k]),K=l.useCallback(async e=>{const s=e.trim();f(s),s?await O(s,[]):g.length>0&&u([g[0]])},[O,u,g]),y=l.useMemo(()=>E,[E]),$=l.useCallback(e=>{C(s=>{const n={...s};return n[e.empNo]?delete n[e.empNo]:n[e.empNo]=e,n})},[]),q=l.useCallback(e=>{C(s=>{const n={...s};return delete n[e],n})},[]),W=l.useCallback(()=>C({}),[]),U=l.useCallback(()=>{C(e=>{const s={...e};for(const n of y)s[n.empNo]=n;return s})},[y]),Y=l.useCallback(()=>{C(e=>{const s={...e};for(const n of y)delete s[n.empNo];return s})},[y]),F=l.useCallback(e=>{const s=e.map(String);if(B(s),f(""),s.length>0){const n=s[0],h=(Q,M)=>{for(const N of Q){if(N.deptCd===M)return N.deptNm;if(N.children){const T=h(N.children,M);if(T)return T}}return null},o=h(k,n);o&&i(o),f(""),u([n])}},[k,u]),J=l.useCallback(e=>{p(e.map(String))},[]),G=l.useCallback((e,s)=>{if(e.stopPropagation(),!s.children||!s.children.length)return;const n=a.includes(s.key);p(h=>n?h.filter(o=>o!==s.key):[...h,s.key])},[a]),H={confirm:()=>{const e=Object.values(m).map(n=>({crprCd:n.crprCd,wkplCd:n.wkplCd,empNo:n.empNo,deptCd:n.deptCd,deptNm:n.deptNm,empNm:n.empNm,jbpsCd:n.jbpsCd,jbgdCd:n.jbgdCd,empMarkOrd:n.empMarkOrd,emplyStCd:n.emplyStCd}));if(e.length===0){r.message.error("직원을 선택해주세요.");return}const s=c?.config;s?.onSelect?s.onSelect(e):c?.config?.callback&&c.config.callback(JSON.stringify(e)),s?.onClose&&s.onClose(),c?.close?.()},cancel:()=>{const e=c?.config;e?.onCancel&&e.onCancel(),c?.close?.()}};return t.jsx(j.BwgPopup,{popup:c,buttons:[{id:"confirm",label:"확인",onClick:()=>{H.confirm()}}],onClose:()=>{c?.close?.(),S?.()},children:t.jsx(j.ContentLayOut,{children:t.jsx(j.ContentBox,{border:!1,style:{paddingBottom:20},children:t.jsxs(r.Splitter,{style:{height:"100%"},children:[t.jsx(r.Splitter.Panel,{defaultSize:"50%",min:"50%",max:"70%",children:t.jsxs(r.Splitter,{layout:"vertical",style:{height:"100%"},children:[t.jsxs(r.Splitter.Panel,{defaultSize:"60%",min:"35%",max:"75%",children:[t.jsx("div",{style:{position:"sticky",top:0,zIndex:10,backgroundColor:"white",borderBottom:"1px solid #e0e0e0",padding:8},children:t.jsxs(r.Flex,{gap:8,vertical:!0,style:{marginBottom:6},children:[t.jsx(j.BwgTitleBox,{title:"조직도"}),t.jsx(r.Input.Search,{placeholder:"이름, 소속, 직급/직위, 전화번호 검색",prefix:t.jsx(x.SearchOutlined,{}),value:d,allowClear:!0,enterButton:t.jsx(r.Button,{children:"검색"}),onChange:e=>{f(e.target.value),w(!1),v([]),!e.target.value.trim()&&g.length>0&&u([g[0]])},onSearch:K})]})}),t.jsx("div",{style:{padding:16,overflowY:"hidden"},children:t.jsx(r.Spin,{spinning:R,children:t.jsx(r.Tree,{className:"bwg-ogrn-tree",treeData:A,expandedKeys:a,selectedKeys:g,onSelect:F,onExpand:J,onDoubleClick:G,showLine:!0,showIcon:!1,style:{overflow:"hidden"},titleRender:e=>t.jsx("span",{style:{padding:"4px 8px",borderRadius:4,fontWeight:g.includes(e.key)?"bold":"normal",display:"inline-block",width:"100%"},children:e.title})})})})]}),t.jsx(r.Splitter.Panel,{children:t.jsxs("div",{style:{padding:16,height:"100%",display:"flex",flexDirection:"column"},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[t.jsx("h3",{style:{margin:0,fontSize:16,fontWeight:700},children:d?"검색 결과":`${b} 사용자`}),t.jsxs("div",{style:{display:"flex",gap:8},children:[t.jsx(r.Button,{size:"small",onClick:U,children:"현재 목록 전체 선택"}),t.jsx(r.Button,{size:"small",onClick:Y,children:"현재 목록 전체 해제"})]})]}),t.jsx(r.Divider,{style:{margin:"8px 0"}}),t.jsxs("div",{style:{overflowY:"auto"},children:[y.map(e=>{const s=!!m[e.empNo];return t.jsxs("div",{style:{display:"flex",alignItems:"center",padding:10,border:"1px solid #e0e0e0",borderRadius:8,marginBottom:8,cursor:"pointer",background:s?"#efebff":"#fff"},onClick:()=>$(e),children:[t.jsx("div",{style:{marginRight:12,width:22,height:22,display:"flex",alignItems:"center",justifyContent:"center"},onClick:n=>{n.stopPropagation(),$(e)},children:s?t.jsx(x.CheckCircleFilled,{style:{fontSize:20,color:"#6449fc"}}):t.jsx(x.CheckCircleOutlined,{style:{fontSize:20,color:"#d9d9d9"}})}),t.jsx("div",{style:{width:36,height:36,borderRadius:"50%",backgroundColor:"#e0e0e0",display:"flex",alignItems:"center",justifyContent:"center",marginRight:12,fontSize:16,color:"#666",flex:"0 0 auto"},children:t.jsx(x.UserOutlined,{})}),t.jsxs("div",{style:{flex:1,minWidth:0},children:[t.jsx("div",{style:{fontSize:14,fontWeight:600,marginBottom:2},children:e.empNm}),t.jsxs("div",{style:{fontSize:12,color:"#666"},children:[e.deptNm," (",e.deptCd,") | 직급: ",e.jbpsCd," ","| 등급: ",e.jbgdCd]})]})]},`emp-${e.crprCd}-${e.wkplCd}-${e.empNo}-${e.jbpsCd}-${e.jbgdCd}-${e.empMarkOrd}`)}),y.length===0&&t.jsx("div",{style:{textAlign:"center",padding:32,color:"#999",fontSize:14},children:!d&&g.length>0?"해당 부서에 직원이 없습니다.":d&&D?"검색 결과가 없습니다.":d&&!D?"검색 버튼을 누르거나 엔터키를 눌러 검색해주세요.":"검색어를 입력하거나 부서를 눌러 직원을 조회해주세요."})]})]})})]})}),t.jsx(r.Splitter.Panel,{collapsible:!0,children:t.jsxs("div",{style:{padding:16,height:"100%",display:"flex",flexDirection:"column"},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(j.BwgTitleBox,{title:`선택된 사용자 (${Object.keys(m).length})`}),t.jsx(r.Button,{type:"link",size:"small",onClick:W,children:"전체 해제"})]}),t.jsx(r.Divider,{style:{margin:"8px 0"}}),t.jsxs("div",{style:{overflowY:"auto",flex:1},children:[Object.values(m).map(e=>t.jsxs("div",{style:{display:"flex",alignItems:"center",padding:10,border:"1px solid #e0e0e0",borderRadius:8,marginBottom:8,background:"#fafafa"},children:[t.jsx("div",{style:{width:32,height:32,borderRadius:"50%",backgroundColor:"#e0e0e0",display:"flex",alignItems:"center",justifyContent:"center",marginRight:10,color:"#666"},children:t.jsx(x.UserOutlined,{})}),t.jsxs("div",{style:{flex:1,minWidth:0},children:[t.jsx("div",{style:{fontSize:13,fontWeight:600,marginBottom:2},children:e.empNm}),t.jsxs("div",{style:{fontSize:12,color:"#666"},children:[e.deptNm," (",e.deptCd,") | 직급: ",e.jbpsCd," | 등급: ",e.jbgdCd]})]}),t.jsx(r.Button,{type:"text",shape:"circle",icon:t.jsx(x.CloseOutlined,{}),onClick:()=>q(e.empNo)})]},`selected-${e.crprCd}-${e.wkplCd}-${e.empNo}-${e.jbpsCd}-${e.jbgdCd}-${e.empMarkOrd}`)),Object.keys(m).length===0&&t.jsx("div",{style:{color:"#999",fontSize:14,textAlign:"center",padding:24},children:"선택된 사용자가 없습니다."})]})]})})]})})})})};exports.default=X;
|