Compare commits
578
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c580141b71 | ||
|
|
5cb0719297 | ||
|
|
1b6fb6f77d | ||
|
|
5e5678f005 | ||
|
|
bbca5ac6f2 | ||
|
|
b8ff15f187 | ||
|
|
049ea098d0 | ||
|
|
70b941c081 | ||
|
|
f528c0e893 | ||
|
|
f5f2a8f675 | ||
|
|
21878892dc | ||
|
|
112634a8e3 | ||
|
|
64d33bec6d | ||
|
|
4b1dd416b5 | ||
|
|
6d28936a35 | ||
|
|
aca6e249b4 | ||
|
|
1dee2c4200 | ||
|
|
f2be91986c | ||
|
|
fa64855574 | ||
|
|
df7a66b2c7 | ||
|
|
e7f4da2322 | ||
|
|
c551481c5b | ||
|
|
b0f71f2239 | ||
|
|
688ec0f88f | ||
|
|
3efac843d4 | ||
|
|
3ed8b4ed6c | ||
|
|
2042076597 | ||
|
|
7088540ccc | ||
|
|
c279124c41 | ||
|
|
fc03a19da1 | ||
|
|
e566bc087b | ||
|
|
90eb5f3b04 | ||
|
|
7b9db8d879 | ||
|
|
b1d556c6ee | ||
|
|
5e01305922 | ||
|
|
8015dc4b93 | ||
|
|
bb6274ef12 | ||
|
|
2805e382b3 | ||
|
|
df4f3b296b | ||
|
|
42632d96ad | ||
|
|
a73265eac6 | ||
|
|
1a82d549f5 | ||
|
|
28681969e2 | ||
|
|
f5f0f67798 | ||
|
|
cbee407911 | ||
|
|
cc291243b0 | ||
|
|
11ecd90d13 | ||
|
|
57904427cf | ||
|
|
5372ef9d9c | ||
|
|
214bd9db4d | ||
|
|
7423b778ee | ||
|
|
4bd67fcbb3 | ||
|
|
ce0e6e9d99 | ||
|
|
ca324251ad | ||
|
|
41504e6e0f | ||
|
|
b40a974ba3 | ||
|
|
5f11b39810 | ||
|
|
f706f07bc5 | ||
|
|
c987f6beed | ||
|
|
4bcda65c05 | ||
|
|
3f12cfd8c3 | ||
|
|
abfa231493 | ||
|
|
601e99fbd5 | ||
|
|
c7b22b3e95 | ||
|
|
a57c1a4a5c | ||
|
|
7cb1a9ab6f | ||
|
|
c86dd2bb9e | ||
|
|
dc8006899e | ||
|
|
6e50514096 | ||
|
|
863634ea6a | ||
|
|
fcd5f215e8 | ||
|
|
645a7db2e5 | ||
|
|
fe930d4773 | ||
|
|
b2d528dc78 | ||
|
|
a7c4d251a2 | ||
|
|
edf0d30b95 | ||
|
|
bb8e3e5456 | ||
|
|
2ee400c9bb | ||
|
|
a46b185c16 | ||
|
|
c9c8a7ff62 | ||
|
|
1728d1879c | ||
|
|
bdd3708fde | ||
|
|
6c76f9a810 | ||
|
|
36e7c6cfee | ||
|
|
c3b5c5d0cd | ||
|
|
ca7002f3bb | ||
|
|
9642680909 | ||
|
|
6eb8a3baac | ||
|
|
4e404abad3 | ||
|
|
5e56999c68 | ||
|
|
45fd44aa01 | ||
|
|
57b16653d4 | ||
|
|
4dcd422815 | ||
|
|
4a8c748095 | ||
|
|
01f1076a5d | ||
|
|
58fee673ce | ||
|
|
9567d7f7ce | ||
|
|
11cf1bf7c9 | ||
|
|
0818b63cdc | ||
|
|
14f2aab0be | ||
|
|
72f5fdd7a8 | ||
|
|
96db2b4ed4 | ||
|
|
f9a1af43f5 | ||
|
|
b711dae3ed | ||
|
|
512c39cd46 | ||
|
|
cb8743ea39 | ||
|
|
0b46ba36dc | ||
|
|
53356228a7 | ||
|
|
59e3dd0804 | ||
|
|
165c7bcbbf | ||
|
|
3d11a8be21 | ||
|
|
daaff4a4ca | ||
|
|
a3270acd29 | ||
|
|
3184ea4386 | ||
|
|
13fad0c692 | ||
|
|
9181ec192d | ||
|
|
f993a4a13e | ||
|
|
630c9492cd | ||
|
|
c57c7ce1f7 | ||
|
|
d320d96edf | ||
|
|
a32a1ac003 | ||
|
|
908ec81fb7 | ||
|
|
43bbc81616 | ||
|
|
80510adb8e | ||
|
|
ee2301470a | ||
|
|
bb778b6dc0 | ||
|
|
1bc03d99c6 | ||
|
|
dc64095e76 | ||
|
|
414a69c6ad | ||
|
|
4c86f7f3a5 | ||
|
|
685ba15baa | ||
|
|
80036ed876 | ||
|
|
2cf241236e | ||
|
|
f5320259b9 | ||
|
|
b5ecfdf3f8 | ||
|
|
57afe5dc5c | ||
|
|
5fb7a83de8 | ||
|
|
3fdc459b16 | ||
|
|
96bd0185b3 | ||
|
|
980c4f1c9f | ||
|
|
76bb48aacd | ||
|
|
af12aa0718 | ||
|
|
1970a8d632 | ||
|
|
8269b31b42 | ||
|
|
d8d0207891 | ||
|
|
f575e3b677 | ||
|
|
6b28c4e332 | ||
|
|
6ae792c3e2 | ||
|
|
5f42eb080e | ||
|
|
1d73da316c | ||
|
|
ea490bcdbc | ||
|
|
4cde2a56b4 | ||
|
|
5446a8a656 | ||
|
|
7662e80eba | ||
|
|
e610b3b8e8 | ||
|
|
9d6902f521 | ||
|
|
b6e11b4be4 | ||
|
|
969d24736d | ||
|
|
bf577ddc81 | ||
|
|
d731a3fc5b | ||
|
|
dabdf5739a | ||
|
|
f09028a7ea | ||
|
|
57e8e4c8d6 | ||
|
|
8c384a51ce | ||
|
|
c8a66d2e53 | ||
|
|
42a99708a3 | ||
|
|
d8d704aec1 | ||
|
|
d225e9fcac | ||
|
|
de6bb04927 | ||
|
|
5f639a2fa9 | ||
|
|
d8c908b68e | ||
|
|
3a1b22b57b | ||
|
|
9ef58ef153 | ||
|
|
a8948fd1f3 | ||
|
|
56a9218210 | ||
|
|
19670a6ff0 | ||
|
|
38bbce9ea1 | ||
|
|
9d7ceb69b1 | ||
|
|
3fb1fe870b | ||
|
|
ff2b79aaa6 | ||
|
|
f3ba3d9b31 | ||
|
|
bffa8fbc11 | ||
|
|
3e8f55bee5 | ||
|
|
64e7a1f43f | ||
|
|
dd849958c0 | ||
|
|
dde92cf779 | ||
|
|
ec14773409 | ||
|
|
50232da090 | ||
|
|
6b92d0630a | ||
|
|
6b4dd6aba7 | ||
|
|
97a67bfd55 | ||
|
|
0556245d62 | ||
|
|
0a52b6c507 | ||
|
|
ac24ebff40 | ||
|
|
45ad5eb5eb | ||
|
|
727d448dc5 | ||
|
|
90ebabd5bd | ||
|
|
fad671ef29 | ||
|
|
0eeac7512b | ||
|
|
a5aa6bfdf4 | ||
|
|
0292353c24 | ||
|
|
9eb0cd428b | ||
|
|
3fed584ec4 | ||
|
|
451d25666a | ||
|
|
a71a2a147f | ||
|
|
63afdfc726 | ||
|
|
cb442bfc13 | ||
|
|
64fcc423b5 | ||
|
|
c72b2c3f58 | ||
|
|
fe3e6de085 | ||
|
|
6504d53672 | ||
|
|
c1813ba4f3 | ||
|
|
ff5b43e1d2 | ||
|
|
aa05cb5d73 | ||
|
|
9cf73141df | ||
|
|
3772cd6edd | ||
|
|
fd6b008b80 | ||
|
|
c5fbd6e6f3 | ||
|
|
409e755e7d | ||
|
|
c957c2ff8d | ||
|
|
6dae2896d7 | ||
|
|
fa21387c55 | ||
|
|
ec59447db9 | ||
|
|
9cd3ce9f63 | ||
|
|
f0dcccaee9 | ||
|
|
cf825ef3ad | ||
|
|
a85fb848f7 | ||
|
|
d3bd1b5721 | ||
|
|
485b041f97 | ||
|
|
55aaee8983 | ||
|
|
c6cf6e90c3 | ||
|
|
8c663fa4e8 | ||
|
|
b6ca669c2e | ||
|
|
5e1a5c68c8 | ||
|
|
690bca4c06 | ||
|
|
5600ce01bd | ||
|
|
93e652a557 | ||
|
|
cc3c5c5d68 | ||
|
|
2a473c85db | ||
|
|
1a5b000b02 | ||
|
|
2b76e21de5 | ||
|
|
f812e021b4 | ||
|
|
4cfe33bdc7 | ||
|
|
25a53f8162 | ||
|
|
4f0a8374e7 | ||
|
|
f402961de7 | ||
|
|
ec250bded1 | ||
|
|
8e7baee930 | ||
|
|
c30bbbd263 | ||
|
|
55c953d284 | ||
|
|
c2de582b76 | ||
|
|
8d0a79063e | ||
|
|
f51f6e58d8 | ||
|
|
103efe79d3 | ||
|
|
cd392b0f11 | ||
|
|
019bfaf9c2 | ||
|
|
a0e9d5dcab | ||
|
|
acdeb9af6e | ||
|
|
2e8163e593 | ||
|
|
184e031ec9 | ||
|
|
ef26a73af6 | ||
|
|
64f4194947 | ||
|
|
14f534c3fc | ||
|
|
e3164fc96d | ||
|
|
46c1d33750 | ||
|
|
1bc0685289 | ||
|
|
b0baff824b | ||
|
|
baa42bd669 | ||
|
|
cec93cf77e | ||
|
|
8fa00797c8 | ||
|
|
a154a11ed0 | ||
|
|
cb29ac6c4d | ||
|
|
b6a75f6ee0 | ||
|
|
76fdba2bc9 | ||
|
|
17a5c20266 | ||
|
|
d55b7e384e | ||
|
|
f4de1a6027 | ||
|
|
92ed4fccc8 | ||
|
|
842ec36c32 | ||
|
|
433ef5e24d | ||
|
|
a61b3905d4 | ||
|
|
640d4cb1a8 | ||
|
|
4ff9b8e793 | ||
|
|
00adb28aa1 | ||
|
|
d474af5688 | ||
|
|
4a74cd0394 | ||
|
|
8826340780 | ||
|
|
f31826da5a | ||
|
|
0149f489a7 | ||
|
|
b67f4828b1 | ||
|
|
7a91fcbd80 | ||
|
|
be21ea3e8a | ||
|
|
4b883a30c5 | ||
|
|
37e3b6ebdb | ||
|
|
ca83ac22aa | ||
|
|
f621f4dfa1 | ||
|
|
5dc6fe4e3b | ||
|
|
f2a71893d4 | ||
|
|
a91bcd9cf7 | ||
|
|
d9baf33a63 | ||
|
|
b644281348 | ||
|
|
1572711749 | ||
|
|
62fef6bcdc | ||
|
|
60edf0a1ff | ||
|
|
36ce09b754 | ||
|
|
d4775ff745 | ||
|
|
93d4cb57e6 | ||
|
|
a256379633 | ||
|
|
2873d1b0b9 | ||
|
|
12bed29eb9 | ||
|
|
6817d34bc3 | ||
|
|
efbef8283b | ||
|
|
af7c2a4f6f | ||
|
|
60c515a654 | ||
|
|
78e3e8e20e | ||
|
|
ac598c7215 | ||
|
|
321911371a | ||
|
|
7e82714678 | ||
|
|
fa6f2fdcd7 | ||
|
|
3b23113955 | ||
|
|
fbe355f6cf | ||
|
|
c439d3e58a | ||
|
|
057175b65c | ||
|
|
794fdc482f | ||
|
|
28d7a1bd29 | ||
|
|
8d5546abd5 | ||
|
|
e264159323 | ||
|
|
7650ec30e8 | ||
|
|
c8912357b2 | ||
|
|
e79590b70d | ||
|
|
6904144ef8 | ||
|
|
be2dcdc6f0 | ||
|
|
636af7b14d | ||
|
|
a7d7ffb767 | ||
|
|
0de9e66988 | ||
|
|
e376fc7373 | ||
|
|
0f7e8c1de3 | ||
|
|
c581698591 | ||
|
|
aacf652dac | ||
|
|
3787f824df | ||
|
|
8d481aab09 | ||
|
|
21dd8f47a1 | ||
|
|
0b14d1c0b5 | ||
|
|
226c61eee9 | ||
|
|
8d1af396ec | ||
|
|
89df17aaeb | ||
|
|
e762720a01 | ||
|
|
3b8fd2129b | ||
|
|
8565331e68 | ||
|
|
d0faa58f3c | ||
|
|
064898333c | ||
|
|
94f8e53184 | ||
|
|
d08df3ff35 | ||
|
|
4b0b08761c | ||
|
|
610d3d1c38 | ||
|
|
56d47ca1d0 | ||
|
|
0e90277e90 | ||
|
|
18413509fc | ||
|
|
cfddd6c0ae | ||
|
|
d861cfa811 | ||
|
|
f88d42493c | ||
|
|
0459bcd4fd | ||
|
|
eca74c1f2e | ||
|
|
42d6010efa | ||
|
|
206cd10844 | ||
|
|
ded46a7b6d | ||
|
|
7227b98961 | ||
|
|
6f07aca860 | ||
|
|
912e335b27 | ||
|
|
b9cb8959ee | ||
|
|
4ee12d127d | ||
|
|
830cbf97d1 | ||
|
|
d32d73a681 | ||
|
|
9eb40c46e5 | ||
|
|
8a160dc97c | ||
|
|
ddb3693358 | ||
|
|
1884f3733d | ||
|
|
15dd319b21 | ||
|
|
2947fb1524 | ||
|
|
2582bdd08c | ||
|
|
85615a826e | ||
|
|
2e24da3c83 | ||
|
|
c6cfedb28b | ||
|
|
164fc1388e | ||
|
|
39fb1d974a | ||
|
|
88eb32f4fc | ||
|
|
1aaa8fcd6b | ||
|
|
527b0c6567 | ||
|
|
a2504f4c85 | ||
|
|
68c5548252 | ||
|
|
ee9e309413 | ||
|
|
5faced2928 | ||
|
|
4356ec8a34 | ||
|
|
a61fda8b58 | ||
|
|
cf61a8956b | ||
|
|
9fc6be1256 | ||
|
|
30b98de0a1 | ||
|
|
da1107566c | ||
|
|
974d15962c | ||
|
|
bd5c2f07d3 | ||
|
|
2469a84068 | ||
|
|
80598a5b6a | ||
|
|
b4a905d2ed | ||
|
|
599e8a95c7 | ||
|
|
3eb8861d06 | ||
|
|
122e10f851 | ||
|
|
e464d298ad | ||
|
|
44580f5156 | ||
|
|
69d73ae3fb | ||
|
|
943d858c5a | ||
|
|
9881653bae | ||
|
|
2fe73c7480 | ||
|
|
af636453e0 | ||
|
|
51d8eb50aa | ||
|
|
e94782f56a | ||
|
|
8552957fb5 | ||
|
|
35a44ff7aa | ||
|
|
93d090b23f | ||
|
|
66930f2e93 | ||
|
|
0240e1fc7a | ||
|
|
011104b548 | ||
|
|
c077c0507c | ||
|
|
042f839e41 | ||
|
|
292c17d682 | ||
|
|
e875700105 | ||
|
|
c036ce41c9 | ||
|
|
b4f3c0108e | ||
|
|
2a6fa899e3 | ||
|
|
3716e8c7b2 | ||
|
|
4e27466f00 | ||
|
|
21b043cbae | ||
|
|
7588ee4e6a | ||
|
|
c57f05cc3e | ||
|
|
8252561050 | ||
|
|
20cbd7ebcd | ||
|
|
71e412d030 | ||
|
|
bb1cbb9ac0 | ||
|
|
7af1ef94cb | ||
|
|
8f26c1482e | ||
|
|
a3797c7ae1 | ||
|
|
2cfcddc365 | ||
|
|
7fa390ccb1 | ||
|
|
5e7eae3e9e | ||
|
|
b83a55d1af | ||
|
|
2eddbacc7f | ||
|
|
fe216499ec | ||
|
|
1b64bccc55 | ||
|
|
36294fef80 | ||
|
|
1eb4435c2f | ||
|
|
94fa8eb721 | ||
|
|
ac8c58d2a9 | ||
|
|
54c958e8fa | ||
|
|
57151eae76 | ||
|
|
9729b42837 | ||
|
|
fd106f3729 | ||
|
|
4da4f5cd62 | ||
|
|
58c8f118d3 | ||
|
|
a6514cab64 | ||
|
|
c73a01d27d | ||
|
|
eae2c15aaf | ||
|
|
f279f49865 | ||
|
|
ece49f0ae2 | ||
|
|
810bedb414 | ||
|
|
5492ea70ed | ||
|
|
39de22045b | ||
|
|
f61e952d28 | ||
|
|
b960a03361 | ||
|
|
e5a750e8b9 | ||
|
|
b5709ab2e2 | ||
|
|
d9d5b49057 | ||
|
|
6a5c7c301f | ||
|
|
295247845c | ||
|
|
1c7be567f4 | ||
|
|
c4ca48be62 | ||
|
|
5b76d02e0b | ||
|
|
9b1342b203 | ||
|
|
a4147a4c67 | ||
|
|
0b8ace2f0d | ||
|
|
185bda696a | ||
|
|
2e03b79031 | ||
|
|
b57858c5ef | ||
|
|
cbded3e605 | ||
|
|
c01de13bae | ||
|
|
a0ad12af49 | ||
|
|
81306a7b82 | ||
|
|
c6d66c54b5 | ||
|
|
69a0dd47ff | ||
|
|
1ad61e0fa5 | ||
|
|
4b895ac5d4 | ||
|
|
f86301a771 | ||
|
|
7a231c541a | ||
|
|
2a66772bfa | ||
|
|
f7c691ef9f | ||
|
|
2bf04dd288 | ||
|
|
96aecb9847 | ||
|
|
e0b631ec25 | ||
|
|
55bf8df00d | ||
|
|
69c068e823 | ||
|
|
591f47a3ff | ||
|
|
c281f688b5 | ||
|
|
97e448c5c8 | ||
|
|
8de5317d28 | ||
|
|
955c969fc5 | ||
|
|
ac3acbb0f4 | ||
|
|
897ce3eb24 | ||
|
|
94b640d566 | ||
|
|
bd8d850a78 | ||
|
|
43af9042c8 | ||
|
|
e283c91394 | ||
|
|
63543a016e | ||
|
|
f96ae66385 | ||
|
|
8f531a245f | ||
|
|
ea738d687b | ||
|
|
8cc5a0a737 | ||
|
|
d4b32ffad0 | ||
|
|
911e97791d | ||
|
|
e0e1bb5b1a | ||
|
|
61aa2ff1e1 | ||
|
|
cdf3dfd18f | ||
|
|
54e60d83a0 | ||
|
|
25e41a356b | ||
|
|
745a7d06ea | ||
|
|
7abae34531 | ||
|
|
877a548c6f | ||
|
|
28f841adc8 | ||
|
|
69820d8e4c | ||
|
|
36146c3fc4 | ||
|
|
7af6f3a324 | ||
|
|
36deb89f25 | ||
|
|
2364de0616 | ||
|
|
8318888f6d | ||
|
|
7e9f294ae8 | ||
|
|
7d51674516 | ||
|
|
3830273119 | ||
|
|
d065fe669b | ||
|
|
9fcd719382 | ||
|
|
6ff2e5b0a2 | ||
|
|
67d8ff5523 | ||
|
|
55b3752f49 | ||
|
|
32ad548de2 | ||
|
|
074d82a3bd | ||
|
|
8bedd8629a | ||
|
|
a2cd08cbd9 | ||
|
|
90c977300c | ||
|
|
01ef993601 | ||
|
|
68669b2574 | ||
|
|
b09e5c68f9 | ||
|
|
a5d2a261ab | ||
|
|
a161cb2346 | ||
|
|
a6b03ddc4e | ||
|
|
ae96324783 | ||
|
|
a542cdd87d | ||
|
|
f57fd44db9 | ||
|
|
ce44289ff1 | ||
|
|
52e94bc943 | ||
|
|
7876fea738 | ||
|
|
ef2e0ccfea | ||
|
|
086478b41e | ||
|
|
66560d661e | ||
|
|
c6f13b35a1 | ||
|
|
2009c54a00 | ||
|
|
822081b318 | ||
|
|
2080927302 | ||
|
|
f0272e1f82 | ||
|
|
b59ab18fa6 | ||
|
|
8006a9ef09 | ||
|
|
97435b7113 | ||
|
|
6cee09b72e | ||
|
|
35ae83034c | ||
|
|
deaf1b53ee | ||
|
|
cda8044183 | ||
|
|
47f41faee3 | ||
|
|
3d7fc84a2e | ||
|
|
68f8a7be38 | ||
|
|
4d537a7bbc | ||
|
|
6c6aaebdc8 | ||
|
|
ba4062f826 | ||
|
|
019415f124 |
+9
-4
@@ -4,10 +4,7 @@
|
|||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
node_modules/
|
node_modules/
|
||||||
|
.idea/
|
||||||
# build
|
|
||||||
.next/
|
|
||||||
dist/
|
|
||||||
|
|
||||||
# build
|
# build
|
||||||
.next
|
.next
|
||||||
@@ -22,6 +19,14 @@ apps/fo/.next/**/*
|
|||||||
#.env*
|
#.env*
|
||||||
.qodo
|
.qodo
|
||||||
|
|
||||||
|
# next-agents-md
|
||||||
|
.next-docs/
|
||||||
|
|
||||||
pnpm-lock.yaml
|
pnpm-lock.yaml
|
||||||
settings.json
|
settings.json
|
||||||
.npmrc
|
.npmrc
|
||||||
|
.cursor
|
||||||
|
.agent
|
||||||
|
|
||||||
|
apps/**/tsconfig.tsbuildinfo
|
||||||
|
logs/
|
||||||
|
|||||||
Executable
+10
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||||
|
if [ "$BRANCH" != "main" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "Branch: $BRANCH"
|
||||||
|
echo "Changed packages (dry-run):"
|
||||||
|
pnpm turbo run build --filter="...[origin/$BRANCH]" --dry-run
|
||||||
|
echo "Starting build..."
|
||||||
|
pnpm turbo run build --filter="...[origin/$BRANCH]"
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# apps/as/shared/config/env.ts 참고
|
||||||
|
NEXT_PUBLIC_PORT=
|
||||||
|
NEXT_PUBLIC_PROXY_HOST=
|
||||||
|
NEXT_PUBLIC_SITE_ID=
|
||||||
|
NEXT_PUBLIC_SERVER_API_URL=
|
||||||
|
|
||||||
|
# 401 시 브라우저 리다이렉트 대상
|
||||||
|
NEXT_PUBLIC_AUTH_LOGIN_REDIRECT_URL=/auth/login
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"extends": "next/core-web-vitals"
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
/node_modules
|
||||||
|
/.pnp
|
||||||
|
.pnp.js
|
||||||
|
.yarn/install-state.gz
|
||||||
|
|
||||||
|
# testing
|
||||||
|
/coverage
|
||||||
|
|
||||||
|
# next.js
|
||||||
|
/.next/
|
||||||
|
/out/
|
||||||
|
|
||||||
|
# production
|
||||||
|
/build
|
||||||
|
|
||||||
|
# misc
|
||||||
|
.DS_Store
|
||||||
|
*.pem
|
||||||
|
|
||||||
|
# debug
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
|
||||||
|
# local env files
|
||||||
|
.env*.local
|
||||||
|
|
||||||
|
# vercel
|
||||||
|
.vercel
|
||||||
|
|
||||||
|
# typescript
|
||||||
|
*.tsbuildinfo
|
||||||
|
next-env.d.ts
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"semi": true,
|
||||||
|
"trailingComma": "all",
|
||||||
|
"singleQuote": false,
|
||||||
|
"printWidth": 100,
|
||||||
|
"tabWidth": 2,
|
||||||
|
"plugins": ["prettier-plugin-tailwindcss"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,248 @@
|
|||||||
|
# AS Application
|
||||||
|
|
||||||
|
Next.js 애플리케이션 with FSD(Feature Sliced Design) 아키텍처
|
||||||
|
|
||||||
|
## 기술 스택
|
||||||
|
|
||||||
|
- **프레임워크**: Next.js 15 + TypeScript
|
||||||
|
- **스타일링**: Tailwind CSS
|
||||||
|
- **상태관리**: Zustand
|
||||||
|
- **데이터 페칭**: TanStack Query (React Query)
|
||||||
|
- **폼 관리**: React Hook Form + Zod
|
||||||
|
- **테이블**: TanStack Table
|
||||||
|
- **HTTP 클라이언트**: Axios
|
||||||
|
- **날짜 처리**: Day.js
|
||||||
|
|
||||||
|
## 프로젝트 구조 (FSD)
|
||||||
|
|
||||||
|
이 프로젝트는 **Feature-Sliced Design v2.1**을 따르며, 계층적 아키텍처로 구성되어 있습니다.
|
||||||
|
|
||||||
|
```
|
||||||
|
as/
|
||||||
|
├── app/ # App 레이어 (Next.js App Router)
|
||||||
|
│ ├── (routes)/ # 라우트 구조
|
||||||
|
│ ├── layout.tsx # 루트 레이아웃
|
||||||
|
│ ├── page.tsx # 홈 페이지
|
||||||
|
│ ├── globals.css # 글로벌 스타일
|
||||||
|
│ └── providers.tsx # 전역 providers
|
||||||
|
│
|
||||||
|
├── widgets/ # Widgets 레이어
|
||||||
|
│ └── [widget-name]/ # 큰 독립적 UI 블록 (여러 페이지에서 재사용)
|
||||||
|
│ ├── ui/
|
||||||
|
│ ├── model/
|
||||||
|
│ └── index.ts
|
||||||
|
│
|
||||||
|
├── features/ # Features 레이어
|
||||||
|
│ └── [feature-name]/ # 사용자 상호작용 기능 (여러 페이지에서 재사용)
|
||||||
|
│ ├── ui/
|
||||||
|
│ ├── api/
|
||||||
|
│ ├── model/
|
||||||
|
│ └── index.ts
|
||||||
|
│
|
||||||
|
├── entities/ # Entities 레이어
|
||||||
|
│ └── [entity-name]/ # 비즈니스 엔티티 (User, Product 등)
|
||||||
|
│ ├── model/
|
||||||
|
│ ├── api/
|
||||||
|
│ ├── ui/
|
||||||
|
│ └── index.ts
|
||||||
|
│
|
||||||
|
└── shared/ # Shared 레이어
|
||||||
|
├── ui/ # UI Kit (비즈니스 로직 없는 공통 컴포넌트)
|
||||||
|
├── api/ # API 클라이언트 설정
|
||||||
|
├── lib/ # 내부 라이브러리 (dates, colors 등)
|
||||||
|
├── config/ # 환경 설정, feature flags
|
||||||
|
├── types/ # 공통 타입 정의
|
||||||
|
└── routes/ # 라우트 상수
|
||||||
|
```
|
||||||
|
|
||||||
|
### 계층 구조 이해하기
|
||||||
|
|
||||||
|
FSD는 **3단계 계층**으로 구성됩니다:
|
||||||
|
|
||||||
|
1. **Layers (레이어)**: 책임과 의존성에 따른 수평적 분리 (app, pages, widgets, features, entities, shared)
|
||||||
|
2. **Slices (슬라이스)**: 비즈니스 도메인에 따른 수직적 분리 (user, product, auth-login 등)
|
||||||
|
3. **Segments (세그먼트)**: 기술적 목적에 따른 분리 (ui, api, model, lib 등)
|
||||||
|
|
||||||
|
> 📚 각 레이어의 자세한 설명은 해당 폴더의 README.md를 참고하세요.
|
||||||
|
|
||||||
|
## FSD 레이어 설명
|
||||||
|
|
||||||
|
FSD는 계층적 아키텍처로, 각 레이어는 책임의 범위와 의존성의 정도에 따라 구분됩니다. 7개의 표준화된 레이어가 있으며, 프로젝트에 필요한 레이어만 사용하면 됩니다.
|
||||||
|
|
||||||
|
### 레이어 계층 구조 (위에서 아래로)
|
||||||
|
|
||||||
|
```
|
||||||
|
app/ ↑ 가장 높은 책임, 가장 많은 의존성
|
||||||
|
pages/ |
|
||||||
|
widgets/ |
|
||||||
|
features/ |
|
||||||
|
entities/ |
|
||||||
|
shared/ ↓ 가장 낮은 책임, 의존성 없음
|
||||||
|
```
|
||||||
|
|
||||||
|
### 1. App
|
||||||
|
- **목적**: 앱 전체에 영향을 주는 기술적/비즈니스적 사항
|
||||||
|
- **내용**: Context providers, 글로벌 스타일, 스토어 설정, 라우터 설정, 애널리틱스
|
||||||
|
- **특징**: 슬라이스가 없고 세그먼트로만 구성
|
||||||
|
- **의존성**: 모든 하위 레이어 사용 가능
|
||||||
|
|
||||||
|
### 2. Pages (app 디렉토리)
|
||||||
|
- **목적**: 웹사이트나 애플리케이션을 구성하는 페이지/화면
|
||||||
|
- **내용**: 페이지 UI, 로딩 상태, 에러 바운더리, 데이터 fetching
|
||||||
|
- **특징**: 한 페이지당 한 슬라이스 (유사한 페이지는 그룹화 가능)
|
||||||
|
- **의존성**: `widgets`, `features`, `entities`, `shared` 사용 가능
|
||||||
|
|
||||||
|
> 💡 **FSD v2.1 권장사항**: "pages-first" 접근 방식을 따라, 재사용되지 않는 큰 UI 블록과 비즈니스 로직은 페이지 슬라이스에 유지하세요.
|
||||||
|
|
||||||
|
### 3. Widgets
|
||||||
|
- **목적**: 큰 규모의 독립적인 UI 블록
|
||||||
|
- **내용**: 여러 features와 entities를 조합한 복합 UI
|
||||||
|
- **사용 시기**: 여러 페이지에서 재사용되거나, 페이지에 여러 개의 큰 독립적 블록이 있을 때
|
||||||
|
- **의존성**: `features`, `entities`, `shared` 사용 가능 (다른 `widgets` 불가)
|
||||||
|
|
||||||
|
### 4. Features
|
||||||
|
- **목적**: 사용자가 수행하는 주요 상호작용과 비즈니스 기능
|
||||||
|
- **내용**: 사용자 시나리오 (예: 로그인, 상품 검색, 댓글 작성)
|
||||||
|
- **사용 시기**: 여러 페이지에서 재사용되는 기능
|
||||||
|
- **의존성**: `entities`, `shared` 사용 가능 (다른 `features` 불가)
|
||||||
|
|
||||||
|
### 5. Entities
|
||||||
|
- **목적**: 비즈니스가 다루는 실제 개념 (User, Product, Order 등)
|
||||||
|
- **내용**: 데이터 모델, 타입, API 요청, 엔티티의 시각적 표현
|
||||||
|
- **특징**: 비즈니스 용어로 명명
|
||||||
|
- **의존성**: 다른 `entities`, `shared` 사용 가능
|
||||||
|
|
||||||
|
### 6. Shared
|
||||||
|
- **목적**: 애플리케이션의 기반 제공
|
||||||
|
- **내용**: API 클라이언트, UI Kit, 유틸리티 라이브러리, 글로벌 설정
|
||||||
|
- **특징**: 비즈니스 로직 없음, 슬라이스가 없고 세그먼트로만 구성
|
||||||
|
- **의존성**: 외부 라이브러리만 사용 가능 (다른 레이어 불가)
|
||||||
|
|
||||||
|
## 레이어 간 Import 규칙
|
||||||
|
|
||||||
|
> **핵심 규칙**: 슬라이스 내의 모듈(파일)은 **오직 하위 레이어**에 있는 다른 슬라이스만 import할 수 있습니다.
|
||||||
|
|
||||||
|
예시:
|
||||||
|
- `features/auth-login/ui/form.tsx`는 `entities/user`와 `shared/ui`를 import 가능
|
||||||
|
- 하지만 다른 `features/post-create`나 상위 레이어인 `widgets`는 import 불가
|
||||||
|
- 같은 슬라이스 내부(`features/auth-login/`)의 다른 파일들은 자유롭게 import 가능
|
||||||
|
|
||||||
|
## Public API 규칙
|
||||||
|
|
||||||
|
> **슬라이스 외부의 모듈은 슬라이스의 Public API만 참조할 수 있으며, 내부 파일 구조에 직접 접근할 수 없습니다.**
|
||||||
|
|
||||||
|
모든 슬라이스(및 슬라이스가 없는 레이어의 세그먼트)는 반드시 `index.ts`를 통해 Public API를 정의해야 합니다.
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// ✅ 올바른 import
|
||||||
|
import { LoginForm } from 'features/auth-login';
|
||||||
|
|
||||||
|
// ❌ 잘못된 import (내부 구조 직접 접근)
|
||||||
|
import { LoginForm } from 'features/auth-login/ui/login-form';
|
||||||
|
```
|
||||||
|
|
||||||
|
## 시작하기
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 의존성 설치
|
||||||
|
pnpm install
|
||||||
|
|
||||||
|
# 개발 서버 실행
|
||||||
|
pnpm run dev
|
||||||
|
|
||||||
|
# 프로덕션 빌드
|
||||||
|
pnpm run build
|
||||||
|
|
||||||
|
# 프로덕션 서버 실행
|
||||||
|
pnpm start
|
||||||
|
```
|
||||||
|
|
||||||
|
## 환경 변수
|
||||||
|
|
||||||
|
`.env.local` 파일 생성:
|
||||||
|
|
||||||
|
```env
|
||||||
|
NEXT_PUBLIC_API_URL=http://localhost:3000/api
|
||||||
|
```
|
||||||
|
|
||||||
|
## FSD 핵심 규칙
|
||||||
|
|
||||||
|
### 1. Import 규칙
|
||||||
|
|
||||||
|
> **슬라이스 내의 모듈(파일)은 오직 하위 레이어에 있는 슬라이스만 import할 수 있습니다.**
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// ✅ 올바른 import (하위 레이어)
|
||||||
|
// features/auth-login/ui/form.tsx
|
||||||
|
import { User } from 'entities/user';
|
||||||
|
import { Button } from 'shared/ui/button';
|
||||||
|
|
||||||
|
// ❌ 잘못된 import (같은 레이어)
|
||||||
|
// features/auth-login/ui/form.tsx
|
||||||
|
import { PostForm } from 'features/post-create'; // 금지!
|
||||||
|
|
||||||
|
// ❌ 잘못된 import (상위 레이어)
|
||||||
|
// features/auth-login/ui/form.tsx
|
||||||
|
import { Header } from 'widgets/header'; // 금지!
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Public API 규칙
|
||||||
|
|
||||||
|
> **슬라이스 외부에서는 Public API(index.ts)를 통해서만 접근해야 합니다.**
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// ✅ 올바른 import (Public API 사용)
|
||||||
|
import { LoginForm } from 'features/auth-login';
|
||||||
|
|
||||||
|
// ❌ 잘못된 import (내부 구조 직접 접근)
|
||||||
|
import { LoginForm } from 'features/auth-login/ui/login-form';
|
||||||
|
```
|
||||||
|
|
||||||
|
**Public API 작성 시 주의사항**:
|
||||||
|
- 와일드카드 re-export(`export * from`) 사용 지양
|
||||||
|
- 필요한 것만 명시적으로 export
|
||||||
|
- 슬라이스의 인터페이스를 명확하게 표현
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// ❌ 나쁜 예시
|
||||||
|
export * from './ui/Comment';
|
||||||
|
export * from './model/comments';
|
||||||
|
|
||||||
|
// ✅ 좋은 예시
|
||||||
|
export { Comment } from './ui/comment';
|
||||||
|
export { CommentForm } from './ui/comment-form';
|
||||||
|
export { useComments } from './model/use-comments';
|
||||||
|
export type { Comment, CommentFormData } from './model/types';
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. 슬라이스 독립성
|
||||||
|
|
||||||
|
- **Zero Coupling**: 같은 레이어의 슬라이스들은 서로 독립적이어야 합니다
|
||||||
|
- **High Cohesion**: 슬라이스는 주요 목표와 관련된 대부분의 코드를 포함해야 합니다
|
||||||
|
- 예외: Entities 레이어에서 필요한 경우 `@x` 표기법으로 cross-import 가능
|
||||||
|
|
||||||
|
### 4. 세그먼트 명명 규칙
|
||||||
|
|
||||||
|
세그먼트 이름은 **목적**을 설명해야 하며, **본질**을 설명하면 안 됩니다:
|
||||||
|
|
||||||
|
- ❌ **나쁜 이름**: `components`, `hooks`, `types` (무엇인지만 설명)
|
||||||
|
- ✅ **좋은 이름**: `ui`, `api`, `model`, `lib` (왜 있는지 설명)
|
||||||
|
|
||||||
|
## 코드 규칙
|
||||||
|
|
||||||
|
- TypeScript 사용 (strict mode)
|
||||||
|
- 함수형 컴포넌트 사용
|
||||||
|
- Named exports 선호
|
||||||
|
- Tailwind CSS 사용
|
||||||
|
- ESLint + Prettier 적용
|
||||||
|
- Public API는 명시적으로 정의 (와일드카드 export 지양)
|
||||||
|
|
||||||
|
## 아키텍처 린팅
|
||||||
|
|
||||||
|
코드베이스의 FSD 규칙 준수를 자동으로 검증하려면 [Steiger](https://github.com/feature-sliced/steiger)를 사용하세요.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Steiger 설치 및 실행
|
||||||
|
pnpm add -D @feature-sliced/steiger
|
||||||
|
npx steiger src
|
||||||
|
```
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import { useCallback } from "react";
|
||||||
|
import { usePathname, useRouter } from "next/navigation";
|
||||||
|
import { useQueryClient } from "@tanstack/react-query";
|
||||||
|
import { BaseLayout } from "@common/components";
|
||||||
|
import type { MenuItem } from "@/entities/menu";
|
||||||
|
import { PageLayout } from "@/shared/ui/page-layout";
|
||||||
|
|
||||||
|
export default function WithBaseLayout({ children }: { children: React.ReactNode }) {
|
||||||
|
const router = useRouter();
|
||||||
|
const pathname = usePathname();
|
||||||
|
const queryClient = useQueryClient();
|
||||||
|
|
||||||
|
const handleMenuClick = useCallback(
|
||||||
|
(item: MenuItem) => {
|
||||||
|
router.push(item.urlPath);
|
||||||
|
},
|
||||||
|
[router],
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<BaseLayout
|
||||||
|
queryClient={queryClient}
|
||||||
|
currentPath={pathname ?? ""}
|
||||||
|
handleMenuClick={handleMenuClick}
|
||||||
|
>
|
||||||
|
<PageLayout>{children}</PageLayout>
|
||||||
|
</BaseLayout>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
export default function MainPage() {
|
||||||
|
return (
|
||||||
|
<div className="flex h-full flex-col items-center justify-center py-10">
|
||||||
|
<h1 className="mb-4 text-3xl font-bold">Home</h1>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,169 @@
|
|||||||
|
# App Layer
|
||||||
|
|
||||||
|
**App**은 애플리케이션 전체에 영향을 미치는 기술적, 비즈니스적 사항을 다루는 최상위 레이어입니다.
|
||||||
|
|
||||||
|
## 목적
|
||||||
|
|
||||||
|
- 애플리케이션의 진입점(entrypoint) 제공
|
||||||
|
- 전역 Context Providers 설정
|
||||||
|
- 라우터 구성
|
||||||
|
- 글로벌 스타일 정의
|
||||||
|
- 전역 상태 저장소 설정
|
||||||
|
- 애널리틱스 및 모니터링 설정
|
||||||
|
|
||||||
|
## 특징
|
||||||
|
|
||||||
|
- **슬라이스 없음**: App 레이어는 Shared처럼 슬라이스가 없고 세그먼트로만 구성됩니다
|
||||||
|
- **전체 앱 관심사**: 특정 비즈니스 도메인이 아닌 앱 전체와 관련된 코드만 포함
|
||||||
|
- **최상위 레이어**: 모든 하위 레이어의 모듈을 자유롭게 import 가능
|
||||||
|
|
||||||
|
## 구조 (Next.js App Router)
|
||||||
|
|
||||||
|
Next.js를 사용하는 경우, App 레이어는 주로 `app/` 디렉토리로 표현됩니다:
|
||||||
|
|
||||||
|
```
|
||||||
|
app/
|
||||||
|
├── (routes)/ # 라우트 그룹 및 페이지
|
||||||
|
│ ├── (auth)/
|
||||||
|
│ │ ├── login/
|
||||||
|
│ │ │ └── page.tsx
|
||||||
|
│ │ └── register/
|
||||||
|
│ │ └── page.tsx
|
||||||
|
│ └── (main)/
|
||||||
|
│ ├── dashboard/
|
||||||
|
│ │ └── page.tsx
|
||||||
|
│ └── settings/
|
||||||
|
│ └── page.tsx
|
||||||
|
├── layout.tsx # 루트 레이아웃
|
||||||
|
├── page.tsx # 홈 페이지
|
||||||
|
├── globals.css # 글로벌 스타일
|
||||||
|
├── providers.tsx # 전역 Providers 설정
|
||||||
|
└── error.tsx # 글로벌 에러 핸들러
|
||||||
|
```
|
||||||
|
|
||||||
|
### 일반적인 FSD 세그먼트 구조
|
||||||
|
|
||||||
|
FSD 표준 세그먼트를 사용하는 경우:
|
||||||
|
|
||||||
|
```
|
||||||
|
app/
|
||||||
|
├── entrypoint/ # 애플리케이션 진입점 (프레임워크별)
|
||||||
|
│ └── index.tsx
|
||||||
|
├── providers/ # Context Providers
|
||||||
|
│ ├── query-provider.tsx
|
||||||
|
│ ├── theme-provider.tsx
|
||||||
|
│ └── index.tsx
|
||||||
|
├── styles/ # 글로벌 스타일
|
||||||
|
│ ├── globals.css
|
||||||
|
│ └── theme.css
|
||||||
|
├── store/ # 글로벌 상태 저장소 설정
|
||||||
|
│ └── index.ts
|
||||||
|
└── routes/ # 라우터 설정
|
||||||
|
└── index.tsx
|
||||||
|
```
|
||||||
|
|
||||||
|
## 예시
|
||||||
|
|
||||||
|
### Next.js Providers 설정
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// app/providers.tsx
|
||||||
|
'use client';
|
||||||
|
|
||||||
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||||
|
import { ThemeProvider } from 'next-themes';
|
||||||
|
import { useState } from 'react';
|
||||||
|
|
||||||
|
export function Providers({ children }: { children: React.ReactNode }) {
|
||||||
|
const [queryClient] = useState(() => new QueryClient({
|
||||||
|
defaultOptions: {
|
||||||
|
queries: {
|
||||||
|
staleTime: 60 * 1000,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
|
||||||
|
return (
|
||||||
|
<QueryClientProvider client={queryClient}>
|
||||||
|
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
|
||||||
|
{children}
|
||||||
|
</ThemeProvider>
|
||||||
|
</QueryClientProvider>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// app/layout.tsx
|
||||||
|
import { Providers } from './providers';
|
||||||
|
import './globals.css';
|
||||||
|
|
||||||
|
export default function RootLayout({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<html lang="ko">
|
||||||
|
<body>
|
||||||
|
<Providers>
|
||||||
|
{children}
|
||||||
|
</Providers>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 글로벌 설정
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// app/config/analytics.ts
|
||||||
|
export function initAnalytics() {
|
||||||
|
if (typeof window !== 'undefined') {
|
||||||
|
// 애널리틱스 초기화
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// app/config/monitoring.ts
|
||||||
|
export function initMonitoring() {
|
||||||
|
// 에러 모니터링 설정
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Next.js App Router와 FSD
|
||||||
|
|
||||||
|
Next.js의 `app/` 디렉토리는 FSD의 **App 레이어**와 **Pages 레이어**를 동시에 담당합니다:
|
||||||
|
|
||||||
|
- **루트 레벨 파일들** (`layout.tsx`, `providers.tsx`, `globals.css`): App 레이어
|
||||||
|
- **라우트 폴더들** (`dashboard/`, `login/` 등): Pages 레이어
|
||||||
|
|
||||||
|
각 페이지별 비즈니스 로직은:
|
||||||
|
- 재사용되지 않는 UI는 페이지 슬라이스(`app/dashboard/` 등) 안에 유지
|
||||||
|
- 재사용되는 기능은 `features/` 레이어로 분리
|
||||||
|
- 여러 페이지에서 재사용되는 큰 UI 블록은 `widgets/` 레이어로 분리
|
||||||
|
|
||||||
|
## 레이어 의존성 규칙
|
||||||
|
|
||||||
|
✅ **허용되는 의존성**:
|
||||||
|
- 모든 하위 레이어 (`pages`, `widgets`, `features`, `entities`, `shared`)
|
||||||
|
- 같은 `app` 레이어 내의 다른 세그먼트
|
||||||
|
- 외부 라이브러리
|
||||||
|
|
||||||
|
❌ **금지된 의존성**:
|
||||||
|
- 없음 (App은 최상위 레이어)
|
||||||
|
|
||||||
|
## 주의사항
|
||||||
|
|
||||||
|
1. **비대화 방지**: App 레이어가 너무 커지면 관리가 어려워집니다. 대부분의 로직은 하위 레이어에 배치하세요
|
||||||
|
2. **전역 관심사만**: 특정 페이지나 기능에만 관련된 코드는 해당 레이어로 이동
|
||||||
|
3. **라우터 레벨 로직**: 라우터 및 서버 레벨 로직은 이 레이어에 유지
|
||||||
|
4. **Processes 레이어 사용 지양**: Processes 레이어는 deprecated되었으므로 해당 로직은 `app`이나 `features`에 배치
|
||||||
|
|
||||||
|
## FSD v2.1 권장사항
|
||||||
|
|
||||||
|
최신 FSD 버전(v2.1)은 **"pages-first"** 접근 방식을 권장합니다:
|
||||||
|
|
||||||
|
- 더 많은 코드를 페이지 슬라이스에 유지
|
||||||
|
- 큰 UI 블록과 재사용되지 않는 비즈니스 로직은 즉시 추출하지 말고 페이지에 보관
|
||||||
|
- 실제로 재사용이 필요할 때만 `features`나 `widgets`로 분리
|
||||||
|
|
||||||
|
이 접근 방식은 과도한 추상화를 방지하고 코드를 더 쉽게 탐색할 수 있게 합니다.
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
@import "@common/assets/styles/base.css";
|
||||||
|
@import "@common/assets/styles/diveicon.css";
|
||||||
|
@import "@common/components/index.css";
|
||||||
|
|
||||||
|
@tailwind base;
|
||||||
|
@tailwind components;
|
||||||
|
@tailwind utilities;
|
||||||
|
|
||||||
|
html,
|
||||||
|
body {
|
||||||
|
color: var(--foreground);
|
||||||
|
background: var(--background);
|
||||||
|
font-family: var(--font-noto-sans-kr), sans-serif;
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
import type { Metadata } from "next";
|
||||||
|
import { Noto_Sans_KR } from "next/font/google";
|
||||||
|
import { Providers } from "./providers";
|
||||||
|
import "./globals.css";
|
||||||
|
|
||||||
|
const notoSansKR = Noto_Sans_KR({
|
||||||
|
subsets: ["latin"],
|
||||||
|
weight: ["100", "300", "400", "500", "700", "900"],
|
||||||
|
display: "swap",
|
||||||
|
variable: "--font-noto-sans-kr",
|
||||||
|
});
|
||||||
|
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: "행정지원시스템",
|
||||||
|
description: "행정지원시스템",
|
||||||
|
};
|
||||||
|
|
||||||
|
interface RootLayoutProps {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function RootLayout({ children }: RootLayoutProps) {
|
||||||
|
return (
|
||||||
|
<html lang="ko" className={notoSansKR.variable}>
|
||||||
|
<body className={`${notoSansKR.className} antialiased`}>
|
||||||
|
<Providers>{children}</Providers>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import { QueryClientProvider } from "@tanstack/react-query";
|
||||||
|
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
||||||
|
import { queryClient } from "@/shared/lib";
|
||||||
|
|
||||||
|
interface ProvidersProps {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Providers({ children }: ProvidersProps) {
|
||||||
|
return (
|
||||||
|
<QueryClientProvider client={queryClient}>
|
||||||
|
{children}
|
||||||
|
<ReactQueryDevtools initialIsOpen={false} />
|
||||||
|
</QueryClientProvider>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
# Entities Layer
|
||||||
|
|
||||||
|
**Entities**는 프로젝트가 다루는 실제 비즈니스 개념을 나타내는 레이어입니다. 비즈니스에서 제품을 설명할 때 사용하는 용어들(예: User, Product, Order)이 주로 엔티티가 됩니다.
|
||||||
|
|
||||||
|
## 목적
|
||||||
|
|
||||||
|
- 비즈니스 엔티티의 데이터 모델 및 타입 정의
|
||||||
|
- 엔티티 관련 API 요청 함수 관리
|
||||||
|
- 엔티티의 시각적 표현 제공 (재사용 가능한 UI)
|
||||||
|
- 여러 페이지에서 동일한 외관을 재사용할 수 있도록 지원
|
||||||
|
|
||||||
|
## 구조
|
||||||
|
|
||||||
|
각 엔티티 슬라이스는 다음 세그먼트로 구성됩니다:
|
||||||
|
|
||||||
|
```
|
||||||
|
entities/
|
||||||
|
└── [entity-name]/
|
||||||
|
├── model/ # 데이터 저장소, 검증 스키마, 상태 관리
|
||||||
|
├── api/ # 엔티티 관련 API 요청 함수
|
||||||
|
├── ui/ # 엔티티 시각적 표현 (선택적)
|
||||||
|
├── lib/ # 엔티티 관련 유틸리티 (선택적)
|
||||||
|
├── @x/ # 다른 엔티티로부터의 cross-import용 Public API (선택적)
|
||||||
|
└── index.ts # Public API
|
||||||
|
```
|
||||||
|
|
||||||
|
### 세그먼트 설명
|
||||||
|
|
||||||
|
- **model**: 데이터 모델, 타입 정의, 상태 저장소 (Zustand 등)
|
||||||
|
- **api**: 백엔드 API 호출 함수
|
||||||
|
- **ui**: 엔티티를 표시하는 UI 컴포넌트 (완전한 UI 블록이 아니라 재사용 가능한 표현)
|
||||||
|
- **lib**: 엔티티 관련 유틸리티 함수
|
||||||
|
- **@x**: 다른 엔티티가 이 엔티티를 import할 때 사용하는 명시적 cross-import API
|
||||||
|
- **index.ts**: 슬라이스의 Public API (외부에서 사용할 수 있는 것만 export)
|
||||||
|
|
||||||
|
## 예시
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// entities/user/model/user.ts
|
||||||
|
export interface User {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
email: string;
|
||||||
|
role: 'admin' | 'user';
|
||||||
|
}
|
||||||
|
|
||||||
|
// entities/user/api/get-user.ts
|
||||||
|
import type { User } from '../model/user';
|
||||||
|
|
||||||
|
export async function getUser(id: string): Promise<User> {
|
||||||
|
const response = await fetch(`/api/users/${id}`);
|
||||||
|
return response.json();
|
||||||
|
}
|
||||||
|
|
||||||
|
// entities/user/ui/user-card.tsx
|
||||||
|
import type { User } from '../model/user';
|
||||||
|
|
||||||
|
interface UserCardProps {
|
||||||
|
user: User;
|
||||||
|
onClick?: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function UserCard({ user, onClick }: UserCardProps) {
|
||||||
|
return (
|
||||||
|
<div onClick={onClick}>
|
||||||
|
<h3>{user.name}</h3>
|
||||||
|
<p>{user.email}</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// entities/user/index.ts
|
||||||
|
export { type User } from './model/user';
|
||||||
|
export { getUser } from './api/get-user';
|
||||||
|
export { UserCard } from './ui/user-card';
|
||||||
|
```
|
||||||
|
|
||||||
|
## 엔티티 간 관계
|
||||||
|
|
||||||
|
엔티티가 서로 연결되어 있을 때는 `@x` 표기법을 사용하여 명시적으로 cross-import를 관리하는 것이 권장됩니다:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// entities/artist/model/artist.ts
|
||||||
|
import type { Song } from 'entities/song/@x/artist';
|
||||||
|
|
||||||
|
export interface Artist {
|
||||||
|
name: string;
|
||||||
|
songs: Array<Song>;
|
||||||
|
}
|
||||||
|
|
||||||
|
// entities/song/@x/artist.ts
|
||||||
|
export type { Song } from '../model/song';
|
||||||
|
```
|
||||||
|
|
||||||
|
> `@x` 폴더를 사용하면 엔티티 간 연결을 명확하게 만들어 함께 리팩터링이 필요한 코드를 쉽게 찾을 수 있습니다.
|
||||||
|
|
||||||
|
## 레이어 의존성 규칙
|
||||||
|
|
||||||
|
✅ **허용되는 의존성**:
|
||||||
|
- `shared` 레이어의 모듈
|
||||||
|
- 같은 엔티티 슬라이스 내의 다른 세그먼트
|
||||||
|
- 다른 엔티티 슬라이스 (필요한 경우, `@x` 표기법 권장)
|
||||||
|
|
||||||
|
❌ **금지된 의존성**:
|
||||||
|
- `features` 레이어
|
||||||
|
- `widgets` 레이어
|
||||||
|
- `pages` 레이어
|
||||||
|
- `app` 레이어
|
||||||
|
|
||||||
|
## 주의사항
|
||||||
|
|
||||||
|
1. **UI 컴포넌트는 완전한 비즈니스 로직을 포함하지 않음**: UI는 주로 props나 slots를 통해 다양한 비즈니스 로직을 연결할 수 있도록 설계
|
||||||
|
2. **엔티티 간 비즈니스 로직은 상위 레이어에**: 엔티티 간 상호작용의 비즈니스 로직은 Features나 Pages 레이어에서 처리
|
||||||
|
3. **데이터 관리에 집중**: 복잡한 비즈니스 로직보다는 데이터 모델, 검증, 저장에 집중
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export { type MenuItem } from "./model/types";
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
export interface MenuItem {
|
||||||
|
menuCd: number;
|
||||||
|
menuKornNm: string;
|
||||||
|
menuEngNm: string;
|
||||||
|
parentId: number | null;
|
||||||
|
sortSeq: number;
|
||||||
|
iconNm?: string;
|
||||||
|
children: MenuItem[] | null;
|
||||||
|
levelNo: number;
|
||||||
|
urlPath: string;
|
||||||
|
menuLnkgTypeCd: string;
|
||||||
|
menuLnkgSn: number;
|
||||||
|
menuPath: string;
|
||||||
|
qrcd: string;
|
||||||
|
useYn: string;
|
||||||
|
otptYn: string;
|
||||||
|
newWndwYn: string;
|
||||||
|
requiredUrlPath: boolean;
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import { defineConfig, globalIgnores } from "eslint/config";
|
||||||
|
import nextVitals from "eslint-config-next/core-web-vitals";
|
||||||
|
import nextTs from "eslint-config-next/typescript";
|
||||||
|
|
||||||
|
const eslintConfig = defineConfig([
|
||||||
|
...nextVitals,
|
||||||
|
...nextTs,
|
||||||
|
// Override default ignores of eslint-config-next.
|
||||||
|
globalIgnores([
|
||||||
|
// Default ignores of eslint-config-next:
|
||||||
|
".next/**",
|
||||||
|
"out/**",
|
||||||
|
"build/**",
|
||||||
|
"next-env.d.ts",
|
||||||
|
]),
|
||||||
|
]);
|
||||||
|
|
||||||
|
export default eslintConfig;
|
||||||
@@ -0,0 +1,130 @@
|
|||||||
|
# Features Layer
|
||||||
|
|
||||||
|
**Features**는 앱의 주요 사용자 상호작용과 기능을 구현하는 레이어입니다. 사용자가 실제로 수행하는 작업들로, 주로 비즈니스 엔티티와 관련이 있습니다.
|
||||||
|
|
||||||
|
## 목적
|
||||||
|
|
||||||
|
- 사용자가 중요하게 생각하는 주요 상호작용 구현
|
||||||
|
- 재사용 가능한 비즈니스 기능 제공
|
||||||
|
- 여러 페이지에서 사용되는 기능의 중복 제거
|
||||||
|
|
||||||
|
## Feature로 만들어야 하는 경우
|
||||||
|
|
||||||
|
> ⚠️ **중요**: 모든 것을 feature로 만들 필요는 없습니다.
|
||||||
|
|
||||||
|
Feature로 만드는 것이 좋은 지표:
|
||||||
|
- **여러 페이지에서 재사용됨**: 예를 들어, 여러 에디터가 있고 모두 댓글 기능이 있다면, 댓글은 재사용 가능한 feature입니다
|
||||||
|
- **중요한 비즈니스 기능**: 신규 프로젝트 참여자가 Features 폴더를 보고 앱의 주요 기능을 빠르게 파악할 수 있어야 합니다
|
||||||
|
|
||||||
|
Feature가 너무 많으면 중요한 기능이 묻히므로, 신규 참여자의 경험을 최적화하여 결정하세요.
|
||||||
|
|
||||||
|
## 구조
|
||||||
|
|
||||||
|
각 feature 슬라이스는 다음 세그먼트로 구성됩니다:
|
||||||
|
|
||||||
|
```
|
||||||
|
features/
|
||||||
|
└── [feature-name]/
|
||||||
|
├── ui/ # 상호작용을 수행하는 UI (폼, 버튼 등)
|
||||||
|
├── api/ # 액션 수행에 필요한 API 호출 (선택적)
|
||||||
|
├── model/ # 검증 및 내부 상태 관리 (선택적)
|
||||||
|
├── lib/ # 유틸리티 함수 (선택적)
|
||||||
|
├── config/ # feature flags (선택적)
|
||||||
|
└── index.ts # Public API
|
||||||
|
```
|
||||||
|
|
||||||
|
### 세그먼트 설명
|
||||||
|
|
||||||
|
- **ui**: 사용자 상호작용을 위한 UI 컴포넌트 (폼, 모달, 버튼 등)
|
||||||
|
- **api**: feature 실행에 필요한 API 요청 함수
|
||||||
|
- **model**: 폼 검증, 내부 상태, 비즈니스 로직
|
||||||
|
- **lib**: feature 내부에서만 사용되는 유틸리티
|
||||||
|
- **config**: feature flags, feature별 설정값
|
||||||
|
- **index.ts**: 슬라이스의 Public API (외부에서 사용할 수 있는 것만 export)
|
||||||
|
|
||||||
|
## 예시
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// features/auth-login/ui/login-form.tsx
|
||||||
|
import { useState } from 'react';
|
||||||
|
import { loginUser } from '../api/login-user';
|
||||||
|
import type { LoginCredentials } from '../model/types';
|
||||||
|
|
||||||
|
export function LoginForm() {
|
||||||
|
const [credentials, setCredentials] = useState<LoginCredentials>({
|
||||||
|
email: '',
|
||||||
|
password: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
const handleSubmit = async (e: React.FormEvent) => {
|
||||||
|
e.preventDefault();
|
||||||
|
await loginUser(credentials);
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<form onSubmit={handleSubmit}>
|
||||||
|
<input
|
||||||
|
type="email"
|
||||||
|
value={credentials.email}
|
||||||
|
onChange={(e) => setCredentials({ ...credentials, email: e.target.value })}
|
||||||
|
/>
|
||||||
|
<input
|
||||||
|
type="password"
|
||||||
|
value={credentials.password}
|
||||||
|
onChange={(e) => setCredentials({ ...credentials, password: e.target.value })}
|
||||||
|
/>
|
||||||
|
<button type="submit">로그인</button>
|
||||||
|
</form>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// features/auth-login/api/login-user.ts
|
||||||
|
import type { LoginCredentials } from '../model/types';
|
||||||
|
|
||||||
|
export async function loginUser(credentials: LoginCredentials) {
|
||||||
|
const response = await fetch('/api/auth/login', {
|
||||||
|
method: 'POST',
|
||||||
|
body: JSON.stringify(credentials),
|
||||||
|
});
|
||||||
|
return response.json();
|
||||||
|
}
|
||||||
|
|
||||||
|
// features/auth-login/model/types.ts
|
||||||
|
export interface LoginCredentials {
|
||||||
|
email: string;
|
||||||
|
password: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
// features/auth-login/index.ts
|
||||||
|
export { LoginForm } from './ui/login-form';
|
||||||
|
export { loginUser } from './api/login-user';
|
||||||
|
export type { LoginCredentials } from './model/types';
|
||||||
|
```
|
||||||
|
|
||||||
|
## 레이어 의존성 규칙
|
||||||
|
|
||||||
|
✅ **허용되는 의존성**:
|
||||||
|
- `shared` 레이어의 모듈
|
||||||
|
- `entities` 레이어의 모듈
|
||||||
|
- 같은 feature 슬라이스 내의 다른 세그먼트
|
||||||
|
|
||||||
|
❌ **금지된 의존성**:
|
||||||
|
- 다른 `features` 슬라이스 (feature 간 직접 의존 금지)
|
||||||
|
- `widgets` 레이어
|
||||||
|
- `pages` 레이어
|
||||||
|
- `app` 레이어
|
||||||
|
|
||||||
|
> 💡 **팁**: 여러 features가 공통 기능을 필요로 한다면, 그 기능을 `shared` 레이어로 이동시키거나 `entities` 레이어에서 관리하세요.
|
||||||
|
|
||||||
|
## 명명 규칙
|
||||||
|
|
||||||
|
- 소문자와 대시 사용: `auth-login`, `post-create`, `comment-edit`
|
||||||
|
- 동사 형태 권장: 사용자 액션을 나타내는 이름 사용
|
||||||
|
- 명확하고 구체적으로: 기능의 목적이 명확하게 드러나도록
|
||||||
|
|
||||||
|
## 주의사항
|
||||||
|
|
||||||
|
1. **하나의 기능에만 집중**: 각 feature는 단일 사용자 시나리오를 구현해야 합니다
|
||||||
|
2. **재사용성 고려**: 여러 페이지에서 사용될 수 있도록 설계
|
||||||
|
3. **독립성 유지**: 다른 features에 의존하지 않고 독립적으로 작동
|
||||||
|
4. **적절한 추상화**: 너무 많은 feature를 만들지 말고, 중요한 기능 위주로 구성
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import type { NextConfig } from "next";
|
||||||
|
|
||||||
|
const nextConfig: NextConfig = {
|
||||||
|
reactStrictMode: true,
|
||||||
|
transpilePackages: ["@common/assets"],
|
||||||
|
};
|
||||||
|
|
||||||
|
export default nextConfig;
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"name": "as",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"dev": "next dev",
|
||||||
|
"build": "next build",
|
||||||
|
"start": "next start",
|
||||||
|
"lint": "next lint",
|
||||||
|
"lint:fsd": "steiger ."
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@common/assets": "workspace:*",
|
||||||
|
"@common/components": "workspace:*",
|
||||||
|
"@common/network": "workspace:*",
|
||||||
|
"@hookform/resolvers": "^4.1.3",
|
||||||
|
"@tanstack/react-query": "^5.75.5",
|
||||||
|
"@tanstack/react-query-devtools": "^5.75.5",
|
||||||
|
"@tanstack/react-table": "^8.21.2",
|
||||||
|
"axios": "^1.8.1",
|
||||||
|
"dayjs": "^1.11.13",
|
||||||
|
"next": "15.3.8",
|
||||||
|
"react-hook-form": "^7.54.2",
|
||||||
|
"zod": "^3.24.2"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"eslint": "^9.0.0",
|
||||||
|
"eslint-config-next": "15.3.8",
|
||||||
|
"postcss": "^8.4.49",
|
||||||
|
"prettier": "^3.4.2",
|
||||||
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
||||||
|
"steiger": "^0.5.11",
|
||||||
|
"tailwindcss": "^3.4.14",
|
||||||
|
"typescript": "^5.7.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
/** @type {import('postcss-load-config').Config} */
|
||||||
|
const config = {
|
||||||
|
plugins: {
|
||||||
|
tailwindcss: {},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
||||||
@@ -0,0 +1,149 @@
|
|||||||
|
# Shared Layer
|
||||||
|
|
||||||
|
**Shared**는 애플리케이션의 기반을 형성하는 레이어입니다. 외부 세계(백엔드, 서드파티 라이브러리, 환경)와의 연결을 생성하고, 높은 응집력을 가진 자체 라이브러리를 정의하는 곳입니다.
|
||||||
|
|
||||||
|
## 목적
|
||||||
|
|
||||||
|
- 외부 시스템 및 라이브러리와의 통합
|
||||||
|
- 프로젝트 전체에서 사용되는 공통 코드 제공
|
||||||
|
- 비즈니스 로직이 없는 재사용 가능한 유틸리티 및 UI 제공
|
||||||
|
- 글로벌 설정 및 환경 변수 관리
|
||||||
|
|
||||||
|
## 특징
|
||||||
|
|
||||||
|
- **슬라이스 없음**: Shared 레이어는 비즈니스 도메인이 없으므로 슬라이스로 나뉘지 않습니다
|
||||||
|
- **세그먼트 구성**: 기술적 목적에 따라 세그먼트로 직접 구성됩니다
|
||||||
|
- **자유로운 import**: Shared 내의 모든 파일은 서로를 참조하고 import할 수 있습니다
|
||||||
|
|
||||||
|
## 구조
|
||||||
|
|
||||||
|
```
|
||||||
|
shared/
|
||||||
|
├── ui/ # 애플리케이션 UI Kit
|
||||||
|
│ ├── button/
|
||||||
|
│ ├── input/
|
||||||
|
│ ├── modal/
|
||||||
|
│ └── index.ts
|
||||||
|
├── api/ # API 클라이언트 및 백엔드 엔드포인트 함수
|
||||||
|
│ ├── client.ts
|
||||||
|
│ └── index.ts
|
||||||
|
├── lib/ # 내부 라이브러리 모음
|
||||||
|
│ ├── dates/ # 날짜 관련 유틸리티
|
||||||
|
│ ├── colors/ # 색상 관련 유틸리티
|
||||||
|
│ ├── text/ # 텍스트 처리 유틸리티
|
||||||
|
│ └── index.ts
|
||||||
|
├── config/ # 환경 변수, 글로벌 feature flags
|
||||||
|
│ ├── env.ts
|
||||||
|
│ └── index.ts
|
||||||
|
├── types/ # 공통 타입 정의
|
||||||
|
│ └── index.ts
|
||||||
|
├── i18n/ # 번역 설정, 글로벌 번역 문자열
|
||||||
|
│ └── index.ts
|
||||||
|
└── routes/ # 라우트 상수 또는 패턴
|
||||||
|
└── index.ts
|
||||||
|
```
|
||||||
|
|
||||||
|
## 세그먼트 설명
|
||||||
|
|
||||||
|
### 📁 ui
|
||||||
|
애플리케이션의 UI Kit로, 비즈니스 로직을 포함하지 않는 재사용 가능한 UI 컴포넌트들입니다.
|
||||||
|
|
||||||
|
- Button, Input, Modal 같은 기본 컴포넌트
|
||||||
|
- 비즈니스 로직은 없지만 UI 로직은 포함 가능 (예: Autocomplete, SearchBar)
|
||||||
|
- 비즈니스 테마 컴포넌트도 허용 (예: 회사 로고, 페이지 레이아웃)
|
||||||
|
|
||||||
|
### 📁 api
|
||||||
|
API 클라이언트 및 특정 백엔드 엔드포인트 요청 함수입니다.
|
||||||
|
|
||||||
|
- HTTP 클라이언트 설정 (Axios, Fetch 등)
|
||||||
|
- 인증 인터셉터
|
||||||
|
- 공통 에러 핸들링
|
||||||
|
|
||||||
|
### 📁 lib
|
||||||
|
내부 라이브러리 모음으로, 각 라이브러리는 **하나의 관심사**에 집중해야 합니다.
|
||||||
|
|
||||||
|
> ⚠️ **중요**: `helpers`나 `utils` 폴더처럼 덤프 폴더로 만들지 마세요. 각 라이브러리는 명확한 초점 영역(예: dates, colors, text)을 가져야 하며, README로 문서화해야 합니다.
|
||||||
|
|
||||||
|
### 📁 config
|
||||||
|
환경 변수, 글로벌 feature flags 및 앱 전체 설정입니다.
|
||||||
|
|
||||||
|
### 📁 types
|
||||||
|
프로젝트 전체에서 사용되는 공통 타입 정의입니다.
|
||||||
|
|
||||||
|
### 📁 i18n
|
||||||
|
번역 설정 코드 및 글로벌 번역 문자열입니다.
|
||||||
|
|
||||||
|
### 📁 routes
|
||||||
|
라우트 상수 또는 라우트 매칭 패턴입니다.
|
||||||
|
|
||||||
|
## 예시
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// shared/ui/button/button.tsx
|
||||||
|
interface ButtonProps {
|
||||||
|
children: React.ReactNode;
|
||||||
|
variant?: 'primary' | 'secondary';
|
||||||
|
onClick?: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Button({ children, variant = 'primary', onClick }: ButtonProps) {
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
className={variant === 'primary' ? 'bg-blue-500' : 'bg-gray-500'}
|
||||||
|
onClick={onClick}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</button>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// shared/api/client.ts
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
|
export const apiClient = axios.create({
|
||||||
|
baseURL: process.env.NEXT_PUBLIC_API_URL,
|
||||||
|
timeout: 10000,
|
||||||
|
});
|
||||||
|
|
||||||
|
// shared/lib/dates/format-date.ts
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
|
||||||
|
export function formatDate(date: Date, format: string = 'YYYY-MM-DD'): string {
|
||||||
|
return dayjs(date).format(format);
|
||||||
|
}
|
||||||
|
|
||||||
|
// shared/config/env.ts
|
||||||
|
export const ENV = {
|
||||||
|
apiUrl: process.env.NEXT_PUBLIC_API_URL!,
|
||||||
|
isDev: process.env.NODE_ENV === 'development',
|
||||||
|
} as const;
|
||||||
|
```
|
||||||
|
|
||||||
|
## 레이어 의존성 규칙
|
||||||
|
|
||||||
|
✅ **허용되는 의존성**:
|
||||||
|
- 같은 `shared` 레이어 내의 다른 세그먼트 (자유로운 cross-import)
|
||||||
|
- 외부 라이브러리 및 패키지
|
||||||
|
|
||||||
|
❌ **금지된 의존성**:
|
||||||
|
- `entities` 레이어
|
||||||
|
- `features` 레이어
|
||||||
|
- `widgets` 레이어
|
||||||
|
- `pages` 레이어
|
||||||
|
- `app` 레이어
|
||||||
|
|
||||||
|
> 💡 **원칙**: Shared는 가장 낮은 레이어이므로 상위 레이어에 의존하지 않습니다.
|
||||||
|
|
||||||
|
## 세그먼트 명명 규칙
|
||||||
|
|
||||||
|
세그먼트 이름은 **내용의 목적**을 설명해야 하며, **본질**을 설명하면 안 됩니다.
|
||||||
|
|
||||||
|
❌ **나쁜 예시**: `components`, `hooks`, `types` (본질을 설명)
|
||||||
|
✅ **좋은 예시**: `ui`, `api`, `lib/dates`, `config` (목적을 설명)
|
||||||
|
|
||||||
|
## 주의사항
|
||||||
|
|
||||||
|
1. **비즈니스 로직 없음**: Shared는 순수한 기술적 코드만 포함
|
||||||
|
2. **높은 재사용성**: 앱 전체에서 사용될 수 있어야 함
|
||||||
|
3. **명확한 라이브러리 구조**: `lib` 내부는 관심사별로 명확하게 분리
|
||||||
|
4. **문서화**: 각 라이브러리는 README로 사용법과 목적을 문서화
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
import { Client } from "@common/network";
|
||||||
|
import { PROXY_HOST, SITE_ID } from "@/shared/config/env";
|
||||||
|
|
||||||
|
const BASE_URL = `${PROXY_HOST}/server`;
|
||||||
|
|
||||||
|
export const apiClient = Client.getInstance({
|
||||||
|
baseURL: BASE_URL,
|
||||||
|
siteId: SITE_ID,
|
||||||
|
});
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export { apiClient } from "./client";
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
export const PORT = process.env.NEXT_PUBLIC_PORT || "3000";
|
||||||
|
export const PROXY_HOST =
|
||||||
|
process.env.NEXT_PUBLIC_PROXY_HOST || `http://localhost:${PORT}`;
|
||||||
|
export const SERVER_API_URL = process.env.NEXT_PUBLIC_SERVER_API_URL;
|
||||||
|
export const SITE_ID = process.env.NEXT_PUBLIC_SITE_ID || "AS";
|
||||||
|
export const CLAIM_NAME = process.env.NEXT_PUBLIC_CLAIM_NAME || "Authorization";
|
||||||
|
export const ACCESS_TOKEN =
|
||||||
|
process.env.NEXT_PUBLIC_ACCESS_TOKEN || "access-token";
|
||||||
|
export const REFRESH_TOKEN =
|
||||||
|
process.env.NEXT_PUBLIC_REFRESH_TOKEN || "refresh-token";
|
||||||
|
export const AUTH_USER_ID = process.env.NEXT_PUBLIC_AUTH_USER_ID || "token-id";
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from "./env";
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import dayjs from "dayjs";
|
||||||
|
import "dayjs/locale/ko";
|
||||||
|
import utc from "dayjs/plugin/utc";
|
||||||
|
import timezone from "dayjs/plugin/timezone";
|
||||||
|
import relativeTime from "dayjs/plugin/relativeTime";
|
||||||
|
|
||||||
|
dayjs.extend(utc);
|
||||||
|
dayjs.extend(timezone);
|
||||||
|
dayjs.extend(relativeTime);
|
||||||
|
dayjs.locale("ko");
|
||||||
|
|
||||||
|
export { dayjs };
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
export { queryClient } from "./query-client";
|
||||||
|
export { dayjs } from "./dayjs";
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { QueryClient } from "@tanstack/react-query";
|
||||||
|
|
||||||
|
export const queryClient = new QueryClient({
|
||||||
|
defaultOptions: {
|
||||||
|
queries: {
|
||||||
|
retry: 1,
|
||||||
|
refetchOnWindowFocus: false,
|
||||||
|
staleTime: 60 * 1000,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
export interface BaseEntity {
|
||||||
|
id: string;
|
||||||
|
createdAt: string;
|
||||||
|
updatedAt: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PaginationParams {
|
||||||
|
page: number;
|
||||||
|
limit: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PaginationResponse<T> {
|
||||||
|
data: T[];
|
||||||
|
total: number;
|
||||||
|
page: number;
|
||||||
|
limit: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ApiResponse<T> {
|
||||||
|
success: boolean;
|
||||||
|
data: T;
|
||||||
|
message?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ApiError {
|
||||||
|
message: string;
|
||||||
|
code?: string;
|
||||||
|
status?: number;
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export { PageLayout } from "./page-layout";
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import { PageTitle } from "@common/components";
|
||||||
|
|
||||||
|
const mockCurrentMenuInfo = {
|
||||||
|
menuCd: 0,
|
||||||
|
menuKornNm: "메인",
|
||||||
|
menuEngNm: "Main",
|
||||||
|
parentId: null,
|
||||||
|
sortSeq: 0,
|
||||||
|
children: null,
|
||||||
|
levelNo: 0,
|
||||||
|
urlPath: "/",
|
||||||
|
menuLnkgTypeCd: "",
|
||||||
|
menuLnkgSn: 0,
|
||||||
|
menuPath: "메인",
|
||||||
|
qrcd: "",
|
||||||
|
useYn: "Y",
|
||||||
|
otptYn: "Y",
|
||||||
|
newWndwYn: "N",
|
||||||
|
requiredUrlPath: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
function PageLayout({ children }: { children: React.ReactNode }) {
|
||||||
|
const menuPaths = mockCurrentMenuInfo.menuPath.split(">").map((path) => path.trim());
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="bg-container h-auto min-h-full pb-2">
|
||||||
|
<PageTitle title={mockCurrentMenuInfo.menuKornNm} menuPaths={menuPaths} />
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export { PageLayout };
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
import type { Config } from "tailwindcss";
|
||||||
|
import presetConfig from "../../tailwind.config.preset";
|
||||||
|
|
||||||
|
const config: Config = {
|
||||||
|
presets: [presetConfig],
|
||||||
|
content: [
|
||||||
|
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
|
"./shared/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
|
"./entities/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
|
"./features/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
|
"./widgets/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
|
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
|
"../../packages/common/components/dist/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
|
],
|
||||||
|
theme: {
|
||||||
|
extend: {
|
||||||
|
colors: {
|
||||||
|
background: "var(--background)",
|
||||||
|
foreground: "var(--foreground)",
|
||||||
|
},
|
||||||
|
fontFamily: {
|
||||||
|
sans: ["var(--font-noto-sans-kr)", "Noto Sans KR", "sans-serif"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
plugins: [],
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES2017",
|
||||||
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
|
"allowJs": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"strict": true,
|
||||||
|
"noEmit": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"module": "esnext",
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"jsx": "preserve",
|
||||||
|
"incremental": true,
|
||||||
|
"plugins": [
|
||||||
|
{
|
||||||
|
"name": "next"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"paths": {
|
||||||
|
"@/*": ["./*"],
|
||||||
|
"@/app/*": ["./app/*"],
|
||||||
|
"@/shared/*": ["./shared/*"],
|
||||||
|
"@/entities/*": ["./entities/*"],
|
||||||
|
"@/features/*": ["./features/*"],
|
||||||
|
"@/widgets/*": ["./widgets/*"],
|
||||||
|
"@/pages/*": ["./pages/*"],
|
||||||
|
"@common/components": ["../../packages/common/components/dist/"],
|
||||||
|
"@common/network": ["../../packages/common/network/"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||||
|
"exclude": ["node_modules"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,135 @@
|
|||||||
|
# Widgets Layer
|
||||||
|
|
||||||
|
**Widgets**는 큰 규모의 독립적인 UI 블록을 위한 레이어입니다. 여러 features와 entities를 조합하여 완전한 기능을 제공하는 복합 컴포넌트를 담습니다.
|
||||||
|
|
||||||
|
## 목적
|
||||||
|
|
||||||
|
- 큰 규모의 독립적인 UI 블록 구성
|
||||||
|
- 여러 features와 entities를 하나의 응집력 있는 UI로 결합
|
||||||
|
- 여러 페이지에서 재사용되는 복잡한 UI 제공
|
||||||
|
- 페이지 레벨 레이아웃 및 섹션 관리
|
||||||
|
|
||||||
|
## Widget으로 만들어야 하는 경우
|
||||||
|
|
||||||
|
Widget은 다음 조건에 해당할 때 사용하세요:
|
||||||
|
|
||||||
|
✅ **Widget으로 만들기 좋은 경우**:
|
||||||
|
- 여러 페이지에서 재사용되는 큰 UI 블록
|
||||||
|
- 페이지에 여러 개의 큰 독립적 블록이 있고, 이것이 그 중 하나인 경우
|
||||||
|
- 페이지 레벨 레이아웃 컴포넌트 (nested routing 시스템 사용 시)
|
||||||
|
|
||||||
|
❌ **Widget으로 만들지 말아야 하는 경우**:
|
||||||
|
- UI 블록이 페이지의 대부분을 차지하고 재사용되지 않는 경우 → 페이지 슬라이스 내부에 직접 배치
|
||||||
|
- 작은 재사용 컴포넌트 → `shared/ui`에 배치
|
||||||
|
|
||||||
|
## 구조
|
||||||
|
|
||||||
|
각 widget 슬라이스는 다음 세그먼트로 구성됩니다:
|
||||||
|
|
||||||
|
```
|
||||||
|
widgets/
|
||||||
|
└── [widget-name]/
|
||||||
|
├── ui/ # 위젯의 메인 UI 컴포넌트
|
||||||
|
├── model/ # 위젯 내부 상태 관리 (선택적)
|
||||||
|
├── api/ # 위젯 전용 API 호출 (선택적)
|
||||||
|
├── lib/ # 위젯 내부 유틸리티 (선택적)
|
||||||
|
└── index.ts # Public API
|
||||||
|
```
|
||||||
|
|
||||||
|
### 세그먼트 설명
|
||||||
|
|
||||||
|
- **ui**: 여러 features와 entities를 조합한 위젯 UI
|
||||||
|
- **model**: 위젯 내부 상태 및 로직 (선택적)
|
||||||
|
- **api**: 위젯이 필요로 하는 데이터 fetching (선택적)
|
||||||
|
- **lib**: 위젯 내부에서만 사용되는 헬퍼 함수 (선택적)
|
||||||
|
- **index.ts**: 슬라이스의 Public API (외부에서 사용할 수 있는 것만 export)
|
||||||
|
|
||||||
|
## 예시
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// widgets/header/ui/header.tsx
|
||||||
|
import { Logo } from 'shared/ui/logo';
|
||||||
|
import { Navigation } from 'shared/ui/navigation';
|
||||||
|
import { UserMenu } from 'features/user-menu';
|
||||||
|
import { NotificationBell } from 'features/notifications';
|
||||||
|
|
||||||
|
export function Header() {
|
||||||
|
return (
|
||||||
|
<header>
|
||||||
|
<Logo />
|
||||||
|
<Navigation />
|
||||||
|
<NotificationBell />
|
||||||
|
<UserMenu />
|
||||||
|
</header>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// widgets/product-list/ui/product-list.tsx
|
||||||
|
import { useProducts } from '../api/use-products';
|
||||||
|
import { ProductCard } from 'entities/product';
|
||||||
|
import { AddToCartButton } from 'features/cart-add-item';
|
||||||
|
|
||||||
|
export function ProductList() {
|
||||||
|
const { data: products, isLoading } = useProducts();
|
||||||
|
|
||||||
|
if (isLoading) return <div>로딩 중...</div>;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
{products.map((product) => (
|
||||||
|
<div key={product.id}>
|
||||||
|
<ProductCard product={product} />
|
||||||
|
<AddToCartButton productId={product.id} />
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// widgets/product-list/api/use-products.ts
|
||||||
|
import { useQuery } from '@tanstack/react-query';
|
||||||
|
import { getProducts } from 'entities/product';
|
||||||
|
|
||||||
|
export function useProducts() {
|
||||||
|
return useQuery({
|
||||||
|
queryKey: ['products'],
|
||||||
|
queryFn: getProducts,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// widgets/product-list/index.ts
|
||||||
|
export { ProductList } from './ui/product-list';
|
||||||
|
```
|
||||||
|
|
||||||
|
## 레이어 의존성 규칙
|
||||||
|
|
||||||
|
✅ **허용되는 의존성**:
|
||||||
|
- `shared` 레이어의 모듈
|
||||||
|
- `entities` 레이어의 모듈
|
||||||
|
- `features` 레이어의 모듈
|
||||||
|
- 같은 widget 슬라이스 내의 다른 세그먼트
|
||||||
|
|
||||||
|
❌ **금지된 의존성**:
|
||||||
|
- 다른 `widgets` 슬라이스 (widget 간 직접 의존 금지)
|
||||||
|
- `pages` 레이어
|
||||||
|
- `app` 레이어
|
||||||
|
|
||||||
|
## 명명 규칙
|
||||||
|
|
||||||
|
- 소문자와 대시 사용: `header`, `sidebar`, `product-list`
|
||||||
|
- 명사 형태 권장: UI 블록의 성격을 나타내는 이름 사용
|
||||||
|
- 구체적으로: 위젯의 역할이 명확하게 드러나도록
|
||||||
|
|
||||||
|
## Nested Routing 사용 시
|
||||||
|
|
||||||
|
Remix 같은 nested routing 시스템을 사용한다면:
|
||||||
|
- Widgets 레이어를 flat routing의 Pages 레이어처럼 사용 가능
|
||||||
|
- 완전한 라우터 블록 생성 (데이터 fetching, loading states, error boundaries 포함)
|
||||||
|
- 페이지 레이아웃을 이 레이어에 저장 가능
|
||||||
|
|
||||||
|
## 주의사항
|
||||||
|
|
||||||
|
1. **독립성 유지**: 각 위젯은 독립적으로 작동 가능해야 합니다
|
||||||
|
2. **적절한 크기**: 너무 작은 컴포넌트는 `shared/ui`에, 재사용되지 않으면 `pages`에 배치
|
||||||
|
3. **응집력**: 관련된 features와 entities를 의미 있게 조합
|
||||||
|
4. **재사용 최적화**: 여러 페이지에서 동일한 방식으로 사용될 수 있도록 설계
|
||||||
Vendored
+5
@@ -0,0 +1,5 @@
|
|||||||
|
/// <reference types="next" />
|
||||||
|
/// <reference types="next/image-types/global" />
|
||||||
|
|
||||||
|
// NOTE: This file should not be edited
|
||||||
|
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
# apps/cs/src/shared/config/env.ts 참고
|
|
||||||
NEXT_PUBLIC_PORT=3000
|
|
||||||
NEXT_PUBLIC_PROXY_HOST=http://localhost:3000
|
|
||||||
NEXT_PUBLIC_SITE_ID=CS
|
|
||||||
NEXT_PUBLIC_SUB_DOMAIN=http://localhost:3000
|
|
||||||
NEXT_PUBLIC_SERVER_API_URL=http://192.168.0.102:8000
|
|
||||||
NEXT_PUBLIC_TINY_API_KEY=t9nc4z6inquvvd5pq1vea8wcp7lb01qmqseh6egms9vpaju2
|
|
||||||
+12
-5
@@ -1,7 +1,14 @@
|
|||||||
# apps/cs/src/shared/config/env.ts 참고
|
# apps/cs/src/shared/config/env.ts 참고
|
||||||
NEXT_PUBLIC_PORT=3000
|
NEXT_PUBLIC_PORT=3001
|
||||||
NEXT_PUBLIC_PROXY_HOST=http://localhost:3000
|
NEXT_PUBLIC_PROXY_HOST=http://localhost:3001
|
||||||
NEXT_PUBLIC_SITE_ID=CS
|
NEXT_PUBLIC_SITE_ID=CM
|
||||||
NEXT_PUBLIC_SUB_DOMAIN=http://localhost:3000
|
NEXT_PUBLIC_SUB_DOMAIN=http://localhost:13000
|
||||||
NEXT_PUBLIC_SERVER_API_URL=http://192.168.0.102:8000
|
# NEXT_PUBLIC_SERVER_API_URL=http://localhost:8000
|
||||||
|
NEXT_PUBLIC_SERVER_API_URL=http://dev.onasys.co.kr:8000
|
||||||
|
NEXT_PUBLIC_LINK_BACKEND_API_HOST=http://rsone.iptime.org:10014
|
||||||
NEXT_PUBLIC_TINY_API_KEY=t9nc4z6inquvvd5pq1vea8wcp7lb01qmqseh6egms9vpaju2
|
NEXT_PUBLIC_TINY_API_KEY=t9nc4z6inquvvd5pq1vea8wcp7lb01qmqseh6egms9vpaju2
|
||||||
|
|
||||||
|
NEXT_PUBLIC_SERVER_API_URL2=http://con.mind-one.co.kr:11083
|
||||||
|
NEXT_PUBLIC_SERVER_API_URL3=https://apigateway.apps.rsonesoft.com
|
||||||
|
NEXT_PUBLIC_SN=https://devlion.hasuon.co.kr
|
||||||
|
NEXT_PUBLIC_WR=https://devtiger.hasuon.co.kr
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
# apps/cs/src/shared/config/env.ts 참고
|
|
||||||
NEXT_PUBLIC_PORT=3000
|
|
||||||
NEXT_PUBLIC_PROXY_HOST=http://localhost:3000
|
|
||||||
NEXT_PUBLIC_SITE_ID=CM
|
|
||||||
NEXT_PUBLIC_SUB_DOMAIN=http://localhost:13000
|
|
||||||
# NEXT_PUBLIC_SERVER_API_URL=http://localhost:8000
|
|
||||||
NEXT_PUBLIC_SERVER_API_URL=http://dev.onasys.co.kr:8000
|
|
||||||
NEXT_PUBLIC_LINK_BACKEND_API_HOST=http://rsone.iptime.org:10014
|
|
||||||
NEXT_PUBLIC_TINY_API_KEY=t9nc4z6inquvvd5pq1vea8wcp7lb01qmqseh6egms9vpaju2
|
|
||||||
|
|
||||||
NEXT_PUBLIC_SERVER_API_URL2=http://con.mind-one.co.kr:11083
|
|
||||||
NEXT_PUBLIC_SERVER_API_URL3=https://apigateway.apps.rsonesoft.com
|
|
||||||
NEXT_PUBLIC_SN=https://devlion.hasuon.co.kr
|
|
||||||
NEXT_PUBLIC_WR=https://devtiger.hasuon.co.kr
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# apps/cs/src/shared/config/env.ts 참고
|
|
||||||
NEXT_PUBLIC_PORT=3000
|
|
||||||
NEXT_PUBLIC_PROXY_HOST=http://localhost:3000
|
|
||||||
NEXT_PUBLIC_SITE_ID=CS
|
|
||||||
NEXT_PUBLIC_SUB_DOMAIN=http://localhost:13000
|
|
||||||
NEXT_PUBLIC_SERVER_API_URL=http://192.168.0.102:8000
|
|
||||||
NEXT_PUBLIC_TINY_API_KEY=t9nc4z6inquvvd5pq1vea8wcp7lb01qmqseh6egms9vpaju2
|
|
||||||
|
|
||||||
NEXT_PUBLIC_SERVER_API_URL2=http://apigateway.iipbs-was.svc.cluster.local:8000
|
|
||||||
NEXT_PUBLIC_SN=https://lion.hasuon.co.kr
|
|
||||||
NEXT_PUBLIC_WR=https://tiger.hasuon.co.kr
|
|
||||||
Binary file not shown.
@@ -15,4 +15,3 @@ export async function POST() {
|
|||||||
cookieStore.delete(CLAIM_NAME);
|
cookieStore.delete(CLAIM_NAME);
|
||||||
return NextResponse.json({ message: "Logged out" }, { status: 200 });
|
return NextResponse.json({ message: "Logged out" }, { status: 200 });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
"@types/node": "^22.13.1",
|
"@types/node": "^22.13.1",
|
||||||
"@types/webpack": "^5.28.5",
|
"@types/webpack": "^5.28.5",
|
||||||
"eslint": "^9.0.0",
|
"eslint": "^9.0.0",
|
||||||
"eslint-config-next": "15.4.0",
|
"eslint-config-next": "15.3.8",
|
||||||
"postcss": "^8.4.49",
|
"postcss": "^8.4.49",
|
||||||
"prettier": "^3.4.2",
|
"prettier": "^3.4.2",
|
||||||
"prettier-plugin-tailwindcss": "^0.6.11",
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
||||||
|
|||||||
@@ -5,16 +5,15 @@ import { useRouter } from "next/navigation";
|
|||||||
import { client } from "@/shared/api";
|
import { client } from "@/shared/api";
|
||||||
import type { IUserInfo } from "@/shared/store";
|
import type { IUserInfo } from "@/shared/store";
|
||||||
import { getCookie, useUserStore } from "@/shared/lib";
|
import { getCookie, useUserStore } from "@/shared/lib";
|
||||||
|
import { isAtLoginRedirectUrl } from "@common/network";
|
||||||
import { ENDPOINT, AUTH_USER_ID } from "@/shared/config";
|
import { ENDPOINT, AUTH_USER_ID } from "@/shared/config";
|
||||||
import { LoginApi } from "../api/login-service";
|
|
||||||
|
|
||||||
const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { userInfo, setUserInfo } = useUserStore((state) => state);
|
const { userInfo, setUserInfo } = useUserStore((state) => state);
|
||||||
|
|
||||||
async function authCheck() {
|
async function authCheck() {
|
||||||
// 로그인 페이지에서는 인증 체크를 건너뜀
|
if (isAtLoginRedirectUrl("/auth/login")) {
|
||||||
if (window.location.pathname === '/auth/login') {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,13 +34,8 @@ const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
|||||||
await authCheck();
|
await authCheck();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|
||||||
try {
|
|
||||||
await LoginApi.silentRefresh();
|
|
||||||
await authCheck();
|
|
||||||
} catch (refreshError) {
|
|
||||||
console.error("Token refresh failed:", refreshError);
|
|
||||||
setUserInfo(null);
|
setUserInfo(null);
|
||||||
|
if (!isAtLoginRedirectUrl("/auth/login")) {
|
||||||
router.push("/auth/login");
|
router.push("/auth/login");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { AUTH_USER_ID, CLAIM_NAME } from "@/shared/config";
|
import { ACCESS_TOKEN, AUTH_USER_ID, CLAIM_NAME, REFRESH_TOKEN } from "@/shared/config";
|
||||||
import { getCookie, setCookie, removeCookie } from "@/shared/lib";
|
import { getCookie, setCookie, removeCookie } from "@/shared/lib";
|
||||||
|
|
||||||
export class TokenManager {
|
export class TokenManager {
|
||||||
@@ -76,6 +76,8 @@ export class TokenManager {
|
|||||||
|
|
||||||
this.removeToken(CLAIM_NAME);
|
this.removeToken(CLAIM_NAME);
|
||||||
this.removeToken(AUTH_USER_ID);
|
this.removeToken(AUTH_USER_ID);
|
||||||
|
this.removeToken(REFRESH_TOKEN);
|
||||||
|
this.removeToken(ACCESS_TOKEN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -147,9 +147,9 @@ function LoginPage() {
|
|||||||
<h1>
|
<h1>
|
||||||
유역하수도통합플랫폼
|
유역하수도통합플랫폼
|
||||||
<br />
|
<br />
|
||||||
<span>통합관리시스템</span>
|
<span>하수도 포탈</span>
|
||||||
</h1>
|
</h1>
|
||||||
<p>유역하수도 통합플랫폼에 오신 것을 환영합니다.</p>
|
<p>유역하수도통합플랫폼 하수도 포탈에 오신 것을 환영합니다.</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="img">
|
<div className="img">
|
||||||
<Image src={images.logo} width={229} height={46} alt="logo" />
|
<Image src={images.logo} width={229} height={46} alt="logo" />
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
import { getCoreRowModel } from "@tanstack/react-table";
|
import { getCoreRowModel } from "@tanstack/react-table";
|
||||||
import { PostApi, type MyPost } from "@/entities/post";
|
import { PostApi, type MyPost, type NoticePost } from "@/entities/post";
|
||||||
import { ENDPOINT } from "@/shared/config";
|
import { ENDPOINT } from "@/shared/config";
|
||||||
import { useDataTable } from "@/shared/lib";
|
import { useDataTable } from "@/shared/lib";
|
||||||
import {
|
import {
|
||||||
@@ -23,6 +23,10 @@ const MyPostList: React.FC = () => {
|
|||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const handleMyPostRowClick = (row: MyPost) => {
|
||||||
|
router.push(`/cms/${row.bbsTypeCd.toLowerCase()}/${row.bbsId}/${row.pstNo}`);
|
||||||
|
};
|
||||||
|
|
||||||
const { tableComponent: myPostTableComponent } = useDataTable({
|
const { tableComponent: myPostTableComponent } = useDataTable({
|
||||||
query: myPostQuery,
|
query: myPostQuery,
|
||||||
tableOptions: {
|
tableOptions: {
|
||||||
@@ -31,7 +35,9 @@ const MyPostList: React.FC = () => {
|
|||||||
},
|
},
|
||||||
dataTableOptions: {
|
dataTableOptions: {
|
||||||
variant: "line",
|
variant: "line",
|
||||||
|
onRowClick: handleMyPostRowClick
|
||||||
},
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const NoticeList: React.FC = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const handleNoticePostRowClick = (row: NoticePost) => {
|
const handleNoticePostRowClick = (row: NoticePost) => {
|
||||||
router.push(`/bbs/bbsnotice/${row.bbsId}/${row.pstNo}`);
|
router.push(`/cms/${row.bbsTypeCd.toLowerCase()}/${row.bbsId}/${row.pstNo}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleMoreClick = () => {
|
const handleMoreClick = () => {
|
||||||
|
|||||||
@@ -1,6 +1,21 @@
|
|||||||
import type { NextConfig } from "next";
|
import type { NextConfig } from "next";
|
||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
|
output: "standalone",
|
||||||
|
experimental: {
|
||||||
|
proxyTimeout: 600000,
|
||||||
|
},
|
||||||
|
eslint: {
|
||||||
|
ignoreDuringBuilds: true,
|
||||||
|
},
|
||||||
|
typescript: {
|
||||||
|
ignoreBuildErrors: true,
|
||||||
|
},
|
||||||
|
logging: {
|
||||||
|
fetches: {
|
||||||
|
fullUrl: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
async rewrites() {
|
async rewrites() {
|
||||||
return {
|
return {
|
||||||
afterFiles: [
|
afterFiles: [
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
"@types/node": "^22.13.1",
|
"@types/node": "^22.13.1",
|
||||||
"@types/webpack": "^5.28.5",
|
"@types/webpack": "^5.28.5",
|
||||||
"eslint": "^9",
|
"eslint": "^9",
|
||||||
"eslint-config-next": "15.1.7",
|
"eslint-config-next": "15.3.8",
|
||||||
"postcss": "^8",
|
"postcss": "^8",
|
||||||
"prettier": "^3.4.2",
|
"prettier": "^3.4.2",
|
||||||
"prettier-plugin-tailwindcss": "^0.6.11",
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
||||||
|
|||||||
@@ -4,13 +4,17 @@ import { useEffect } from "react";
|
|||||||
import { client } from "@/shared/api";
|
import { client } from "@/shared/api";
|
||||||
import type { IUserInfo } from "@/shared/store";
|
import type { IUserInfo } from "@/shared/store";
|
||||||
import { getCookie, useUserStore } from "@/shared/lib";
|
import { getCookie, useUserStore } from "@/shared/lib";
|
||||||
|
import { getAuthLoginRedirectUrl, isAtLoginRedirectUrl } from "@common/network";
|
||||||
import { ENDPOINT, AUTH_USER_ID } from "@/shared/config";
|
import { ENDPOINT, AUTH_USER_ID } from "@/shared/config";
|
||||||
import { LoginApi } from "../api/login-service";
|
|
||||||
|
|
||||||
const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
||||||
const { userInfo, setUserInfo } = useUserStore((state) => state);
|
const { userInfo, setUserInfo } = useUserStore((state) => state);
|
||||||
|
|
||||||
async function authCheck() {
|
async function authCheck() {
|
||||||
|
if (isAtLoginRedirectUrl(getAuthLoginRedirectUrl())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const userId = getCookie(AUTH_USER_ID);
|
const userId = getCookie(AUTH_USER_ID);
|
||||||
if (!userId) {
|
if (!userId) {
|
||||||
throw new Error("Missing required authentication tokens");
|
throw new Error("Missing required authentication tokens");
|
||||||
@@ -28,8 +32,6 @@ const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
|||||||
await authCheck();
|
await authCheck();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
await LoginApi.silentRefresh();
|
|
||||||
await authCheck();
|
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
}, []);
|
}, []);
|
||||||
|
|||||||
@@ -39,3 +39,4 @@ next-env.d.ts
|
|||||||
|
|
||||||
.env*
|
.env*
|
||||||
!.env.example
|
!.env.example
|
||||||
|
/start_cs.log
|
||||||
|
|||||||
@@ -60,13 +60,18 @@ async function handler(
|
|||||||
[AUTH_USER_ID]: userId,
|
[AUTH_USER_ID]: userId,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const forwardedHost = request.headers.get("x-forwarded-host");
|
||||||
|
const host = request.headers.get("host");
|
||||||
|
const actualHost = forwardedHost || host || new URL(request.url).hostname.toString();
|
||||||
|
|
||||||
|
// 운영 환경에서 domain 설정
|
||||||
|
const domain = actualHost.includes("hasuon.or.kr") ? ".hasuon.or.kr" : actualHost;
|
||||||
|
|
||||||
if (refreshToken) {
|
if (refreshToken) {
|
||||||
cookieStore.set(REFRESH_TOKEN, refreshToken, {
|
cookieStore.set(REFRESH_TOKEN, refreshToken, {
|
||||||
httpOnly: true,
|
httpOnly: true,
|
||||||
sameSite: "lax",
|
sameSite: "strict",
|
||||||
// domain: domain,
|
domain: domain,
|
||||||
path: "/",
|
path: "/",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,831 @@
|
|||||||
|
# 표준단어정의서
|
||||||
|
|
||||||
|
AI 이해용으로 정리된 표준단어명, 영문약어명, 영문명 목록입니다.
|
||||||
|
|
||||||
|
| 표준단어명 | 표준단어 영문약어명 | 표준단어 영문명 |
|
||||||
|
|-----------|-------------------|----------------|
|
||||||
|
| BOD | BOD | Biochemical Oxygen Demand |
|
||||||
|
| C/N비 | CNR | Carbon-Nitrogen Ratio |
|
||||||
|
| COD | COD | Chemical Oxygen Demand |
|
||||||
|
| F/M비 | FMR | Food-Microorganism Ratio |
|
||||||
|
| GISD | GISDATA | Geographic Information System Data |
|
||||||
|
| HTML | HTML | Hypertext Markup Language |
|
||||||
|
| ID | ID | Id |
|
||||||
|
| IP | IP | Internet Protocol |
|
||||||
|
| KEY | KEY | Key |
|
||||||
|
| ND | ND | Not Detected |
|
||||||
|
| NON | NON | Non |
|
||||||
|
| NTU | NTU | Nephelometry Turbidity Unit |
|
||||||
|
| OPT | OPT | Opt |
|
||||||
|
| PAC | PAC | Polyaluminium Chloride |
|
||||||
|
| PH | PH | Hydrogen Exponent |
|
||||||
|
| PKI | PKI | Public Key Infrastructure |
|
||||||
|
| POOL | POOL | Pool |
|
||||||
|
| SS | SS | Suspended Solids (Ss) |
|
||||||
|
| TCE | TCE | Trichloroethane |
|
||||||
|
| TM | TM | Transverse Mercator |
|
||||||
|
| T-N | TN | Total Nitrogen |
|
||||||
|
| TOC | TOC | Total Organic Carbon |
|
||||||
|
| T-P | TP | Total Phosphorus |
|
||||||
|
| URL | URL | Uniform Resource Locator |
|
||||||
|
| 가구 | HSHD | Household |
|
||||||
|
| 가능 | PSBL | Possible |
|
||||||
|
| 가동 | OPR | Operation |
|
||||||
|
| 가산 | ADTN | Addition |
|
||||||
|
| 가성소다 | NAOH | Caustic Soda(Nach) |
|
||||||
|
| 가축분뇨 | ANMA | Animal Manure |
|
||||||
|
| 값 | VAL | Value |
|
||||||
|
| 강도 | IN | Intensity |
|
||||||
|
| 강우 | RAIN | Rain |
|
||||||
|
| 개방 | OPN | Opening |
|
||||||
|
| 개별 | INDIV | Individual |
|
||||||
|
| 개보수비 | RPAFEE | Repair Fee |
|
||||||
|
| 개설 | ESTBL | Establishment |
|
||||||
|
| 개시 | STRT | Start |
|
||||||
|
| 개정 | RVSN | Revision |
|
||||||
|
| 개조 | REMDEL | Remodeling |
|
||||||
|
| 개체 | INDVD | Individual |
|
||||||
|
| 개체군 | POPU | Population |
|
||||||
|
| 개폐 | RORGN | Reorganization |
|
||||||
|
| 갱신 | UPDT | Update |
|
||||||
|
| 건물 | BLDG | Building |
|
||||||
|
| 건설 | CONC | Construction |
|
||||||
|
| 건수 | NOCS | The Number Of Cases |
|
||||||
|
| 건조 | DRY | Dry |
|
||||||
|
| 검사 | INSP | Inspection |
|
||||||
|
| 검사서 | EXRPT | Examination Report |
|
||||||
|
| 검정 | RCGN | Recognition |
|
||||||
|
| 검증 | VRFC | Verification |
|
||||||
|
| 검출 | DETECT | Detection |
|
||||||
|
| 검토 | RVW | Review |
|
||||||
|
| 격자 | LATTC | Lattice |
|
||||||
|
| 결과 | RSLT | Result |
|
||||||
|
| 결의 | DCIS | Decision |
|
||||||
|
| 결정 | DCSN | Decision |
|
||||||
|
| 경계 | BNDRY | Boundary |
|
||||||
|
| 경과 | PROC | Process |
|
||||||
|
| 경도 | LOT | Longitude |
|
||||||
|
| 경보 | ALARM | Alarm |
|
||||||
|
| 경사판 | ICNTPT | Inclination plate |
|
||||||
|
| 계 | SUM | Summation |
|
||||||
|
| 계량기 | MRNR | Measuring Instrument |
|
||||||
|
| 계량기분리 | METRSPRT | Meter Separation |
|
||||||
|
| 계면 | SGLV | Sludge Level |
|
||||||
|
| 계산식 | FMUL | Formula |
|
||||||
|
| 계약 | CTRT | Contract |
|
||||||
|
| 계약기간 | CNTRPD | Contract Period |
|
||||||
|
| 계절 | SEASON | Season |
|
||||||
|
| 계획 | PLAN | Plan |
|
||||||
|
| 고도처리 | AWTR | Advanced Water Treatment |
|
||||||
|
| 고시 | ANCMNT | Announcement |
|
||||||
|
| 고액분리 | SLSPRT | Solid-Liquid Separation |
|
||||||
|
| 고형물체류시간 | SRT | Solid Retention Time |
|
||||||
|
| 공간데이터 | SPCEDATA | Space Data |
|
||||||
|
| 공공 | PUBLIC | Public |
|
||||||
|
| 공급 | SPLY | Supply |
|
||||||
|
| 공기 | AIR | Air |
|
||||||
|
| 공기여과 | ARFT | Air Filter |
|
||||||
|
| 공문 | ODOC | Official Documnet |
|
||||||
|
| 공법 | MSRC | Method Of Construction |
|
||||||
|
| 공사 | CSTRN | Construction |
|
||||||
|
| 공사비 | CONSTEXPN | Construction Expenses |
|
||||||
|
| 공업지역 | MNFTR_ARA | Manufacturing Area |
|
||||||
|
| 공용면적 | CMAR | Common Area |
|
||||||
|
| 공통 | CMMN | Commonness |
|
||||||
|
| 관 | PP | Pipe |
|
||||||
|
| 관계 | REL | Relation |
|
||||||
|
| 관련 | RLTN | Relation |
|
||||||
|
| 관로 | PPLINE | Pipe Line |
|
||||||
|
| 관리 | MNG | Management |
|
||||||
|
| 관리기관 | MGC | Management Agency |
|
||||||
|
| 관리자 | MNGR | Manager |
|
||||||
|
| 관찰 | WTCH | Watch |
|
||||||
|
| 관측 | OBSR | Observation |
|
||||||
|
| 관측소 | OBSRVT | Observatory |
|
||||||
|
| 교반기 | AGITOR | Agirator |
|
||||||
|
| 교정 | CRRC | Correction |
|
||||||
|
| 구간 | SCTN | Section |
|
||||||
|
| 구동 | DRIVE | Drive |
|
||||||
|
| 구분 | SE | Section |
|
||||||
|
| 구성 | CMPSG | Composing |
|
||||||
|
| 구역 | ZONE | Zone |
|
||||||
|
| 구조 | STRCT | Structure |
|
||||||
|
| 권역 | DSTR | District |
|
||||||
|
| 권한 | AUTH | Authority |
|
||||||
|
| 규격 | STNDRD | Standard |
|
||||||
|
| 규모 | SCAL | Scale |
|
||||||
|
| 규제 | REGL | Regulation |
|
||||||
|
| 균등 | EQLTY | Equality |
|
||||||
|
| 금액 | AMT | Amount |
|
||||||
|
| 급수 | WSP | Water Supply |
|
||||||
|
| 기간 | WHL | While |
|
||||||
|
| 기관 | INST | Institution |
|
||||||
|
| 기록 | RECD | Recording |
|
||||||
|
| 기록부 | REGI | Register |
|
||||||
|
| 기밀 | SCRET | Secret |
|
||||||
|
| 기법 | TECQU | Techniques |
|
||||||
|
| 기본 | BSIC | Basics |
|
||||||
|
| 기본정보 | BASINF | Bassinfo |
|
||||||
|
| 기본키 | PK | Primary Key |
|
||||||
|
| 기상 | WETHER | Weather |
|
||||||
|
| 기안 | DRFTG | Drafting |
|
||||||
|
| 기재 | WRIT | Write |
|
||||||
|
| 기점 | CDPNT | Cardinal Point |
|
||||||
|
| 기존 | LGCY | Legacy |
|
||||||
|
| 기준 | CRTR | Criteria |
|
||||||
|
| 기타 | ETC | Etc |
|
||||||
|
| 기한 | TERM | Term |
|
||||||
|
| 기후 | CLMT | Climate |
|
||||||
|
| 긴급 | EMRG | Emergency |
|
||||||
|
| 날개벽 | WW | Wing Wall |
|
||||||
|
| 날씨 | WETHR | Weather |
|
||||||
|
| 날짜 | DATE | DATE |
|
||||||
|
| 남조류 | BLAL | Blue-Green Algae |
|
||||||
|
| 납 | PB | Plumbum |
|
||||||
|
| 내려받기 | DWLD | Download |
|
||||||
|
| 내부반송 | ITNRCC | Internal Recycl |
|
||||||
|
| 내용 | CN | Content |
|
||||||
|
| 내용연수 | SVLF | Service Life |
|
||||||
|
| 냄새 | SMELL | Smell |
|
||||||
|
| 년 | YY | Year |
|
||||||
|
| 년간 | FAYR | For A Year |
|
||||||
|
| 노즐 | NZL | Nozzle |
|
||||||
|
| 노출 | EXPSR | Exposure |
|
||||||
|
| 농도 | DNSTY | Density |
|
||||||
|
| 농축 | TKN | Thickened |
|
||||||
|
| 누적 | ACML | Accumulate |
|
||||||
|
| 누출 | LKG | Leakage |
|
||||||
|
| 눈 | SNW | Snow |
|
||||||
|
| 단가 | UNPRC | Unit Price |
|
||||||
|
| 단기 | SRTPD | Short Period |
|
||||||
|
| 단순 | SIMPL | Simplicity |
|
||||||
|
| 단위 | UNIT | Unit |
|
||||||
|
| 대구역 | LZONE | Large Zone |
|
||||||
|
| 대분류 | LCLAS | Large Classification |
|
||||||
|
| 대장 | REGSTR | Register |
|
||||||
|
| 대장균 | COLI | Coliform, Fecal Coliform |
|
||||||
|
| 대장균군 | COLIB | Coliform Bacteria |
|
||||||
|
| 대지면적 | SIAR | Site Area |
|
||||||
|
| 대체 | RPLC | Replace |
|
||||||
|
| 덮개 | COVR | Cover |
|
||||||
|
| 데이타 | DAT | Data |
|
||||||
|
| 도구 | UNT | Unit |
|
||||||
|
| 도래 | ADVNT | Advent |
|
||||||
|
| 도로 | ROAD | Road |
|
||||||
|
| 도로명 | RN | Road Name |
|
||||||
|
| 도시 | CTY | City |
|
||||||
|
| 도엽 | MAPDMC | Map Demarcation |
|
||||||
|
| 도표 | CHART | Chart |
|
||||||
|
| 독성 | TOXCTY | Toxicity |
|
||||||
|
| 동의 | AGRE | Agreement |
|
||||||
|
| 동절기 | WSESN | The Winter Season |
|
||||||
|
| 등급 | GRD | Grade |
|
||||||
|
| 등기 | RG | Registered |
|
||||||
|
| 등록 | REG | Registration |
|
||||||
|
| 디바이스 | DVICE | Device |
|
||||||
|
| 디코딩 | DCD | Decoding |
|
||||||
|
| 레이어 | LYR | Layer |
|
||||||
|
| 로그인 | LGN | Login |
|
||||||
|
| 로우 | ROW | Row |
|
||||||
|
| 마감 | DDLN | Deadline |
|
||||||
|
| 마이크로필터 | MCRFT | Micro Filter |
|
||||||
|
| 막 | MBRN | Membrane |
|
||||||
|
| 만족도 | STFDG | Satisfaction Degree |
|
||||||
|
| 맑음 | CLAR | Clear |
|
||||||
|
| 매각 | SAL | Sale |
|
||||||
|
| 맨홀 | MH | Manhole |
|
||||||
|
| 맵 | MAP | Map |
|
||||||
|
| 메인 | MAIN | Main |
|
||||||
|
| 메일 | EMAIL | Email |
|
||||||
|
| 메탄올 | MTN | Methanol(CH3OH) |
|
||||||
|
| 명 | NM | Name |
|
||||||
|
| 모니터링 | MTRG | Monitoring |
|
||||||
|
| 모델 | MODL | Model |
|
||||||
|
| 모델링 | MODLNG | Modeling |
|
||||||
|
| 모래 | SAND | Sand |
|
||||||
|
| 목 | MOK | Mok |
|
||||||
|
| 무산소 | ANX | Anoxic |
|
||||||
|
| 무산소조 | ANX_TANK | Anoxic Tank |
|
||||||
|
| 무인센서 | MNLSENSR | Manless Sensor |
|
||||||
|
| 문서 | DCMT | Document |
|
||||||
|
| 물 | WTR | Water |
|
||||||
|
| 미급수 | NONWTRSPL | Non Water Supply |
|
||||||
|
| 미생물 | BLGC | Biological |
|
||||||
|
| 미세먼지 | PM | Particulate Matter |
|
||||||
|
| 미세목 | MCRB | Micro Bar |
|
||||||
|
| 민간위탁 | ETSVN | Entrustment To Civilian |
|
||||||
|
| 민감 | SST | Sensitive |
|
||||||
|
| 민원 | CVLCPT | Civil Complaint |
|
||||||
|
| 바이러스 | VIRS | Virus |
|
||||||
|
| 반기 | HT | Half Term |
|
||||||
|
| 반류수 | SIDSWT | Side Stream Water |
|
||||||
|
| 반송 | SNDBK | Send Back |
|
||||||
|
| 반송수 | RCCWT | Recycled Water |
|
||||||
|
| 반송슬러지 | RTNSLG | Return Sludge |
|
||||||
|
| 반영 | RFLT | Reflection |
|
||||||
|
| 반응조 | RETNK | Reactant Tank |
|
||||||
|
| 반출 | EXPRT | Export |
|
||||||
|
| 반토 | ALUM | Alumina |
|
||||||
|
| 반환 | GVBK | Giving Back |
|
||||||
|
| 받이 | INL | Inlet |
|
||||||
|
| 발생 | OCRN | Occurrence |
|
||||||
|
| 발전 | PWGNRT | Power Generation |
|
||||||
|
| 발주기관 | ORNT | Order Institution |
|
||||||
|
| 방류 | DCWTR | Discharge Water Stock Etc |
|
||||||
|
| 방류구 | DSCHG | Discharge |
|
||||||
|
| 방류수 | EFLEC | Effluence |
|
||||||
|
| 방문 | VST | Visit |
|
||||||
|
| 방문자 | VSTR | Visitor |
|
||||||
|
| 방법 | MTHD | Method |
|
||||||
|
| 방사 | RLSE | Release |
|
||||||
|
| 배관 | PLINE | Pipeline |
|
||||||
|
| 배분 | DSTRB | Distirbution |
|
||||||
|
| 배설물 | EXCRTN | Excretion |
|
||||||
|
| 배수 | DRNG | Drainage |
|
||||||
|
| 배수구역 | DRANGZN | Drainage Zone |
|
||||||
|
| 배출 | EXHST | Exhaust |
|
||||||
|
| 배출가스 | EMGA | Emission Gases |
|
||||||
|
| 배출구 | VENT | Vent |
|
||||||
|
| 배출시설 | DHGP | Discharge Equipment |
|
||||||
|
| 배출시험 | EXHTST | Exhaust Test |
|
||||||
|
| 배출자 | DCHGR | Discharge Person |
|
||||||
|
| 밸브 | VALVE | Valve |
|
||||||
|
| 번호 | NO | Number |
|
||||||
|
| 법 | LAW | Law |
|
||||||
|
| 법적 | LGL | Legal |
|
||||||
|
| 법정 | STTY | Statutory |
|
||||||
|
| 법정동 | STDG | Statutory Dong(Administrative District) |
|
||||||
|
| 법정리 | STLI | Statutory Li(Administrative District) |
|
||||||
|
| 변경 | CHG | Change |
|
||||||
|
| 변동 | FLCTN | Fluctuation |
|
||||||
|
| 변속기 | TRMIS | Transmission |
|
||||||
|
| 보고 | RPT | Report |
|
||||||
|
| 보고서 | RPOT | Report |
|
||||||
|
| 보관 | STORG | Storage |
|
||||||
|
| 보수 | MEND | Mend |
|
||||||
|
| 보유 | HOLD | Hold |
|
||||||
|
| 보정 | RVSION | Revision |
|
||||||
|
| 보조 | ASSISC | Assistance |
|
||||||
|
| 보조금 | SBSIDY | Subsidy |
|
||||||
|
| 복개 | COVE | Cover |
|
||||||
|
| 복토 | CWTH | Covering With Soil |
|
||||||
|
| 본류 | MI_RV | Main River |
|
||||||
|
| 본번 | MNO | Main Number |
|
||||||
|
| 부검 | ATPSY | Autopsy |
|
||||||
|
| 부과 | LEVY | Levy |
|
||||||
|
| 부과금 | LVYAMT | Levy Amount |
|
||||||
|
| 부기 | BUKIP | Bookkeeping |
|
||||||
|
| 부담금 | ALOTM | Allotment |
|
||||||
|
| 부번 | SNO | Sub Number |
|
||||||
|
| 부산물 | BYPRD | By-Product |
|
||||||
|
| 부서 | DEPT | Department |
|
||||||
|
| 부숙화 | DECPZ | Decomposed ~Ize |
|
||||||
|
| 부적합 | IMPPRTY | Impropriety |
|
||||||
|
| 부착 | ASN | Adhesion |
|
||||||
|
| 부품 | CMPNT | Components |
|
||||||
|
| 부하량 | LOADQTY | Load Quantity |
|
||||||
|
| 분과 | DIVSN | Division |
|
||||||
|
| 분뇨 | ENSO | Excreta, Night Soil |
|
||||||
|
| 분류 | CL | Classification |
|
||||||
|
| 분류군 | TAXON | Taxon |
|
||||||
|
| 분리막 | SPRTMBR | Separation Membrane |
|
||||||
|
| 분배 | DTRBT | Distribution |
|
||||||
|
| 분배조 | DTRBT_TANK | Distribution Tank |
|
||||||
|
| 분야 | RLM | Realm |
|
||||||
|
| 분원성 | FECL | Fecal |
|
||||||
|
| 분원성대장균군 | FCOLI | Fecal Coliform |
|
||||||
|
| 분원성연쇄상구균 | FCSTRCCI | Fecal Streptococci |
|
||||||
|
| 분할 | PRTIN | Partition |
|
||||||
|
| 비밀번호 | PSWD | Password |
|
||||||
|
| 비상 | EMGNY | Emergency |
|
||||||
|
| 비정상 | ABNRM | Abnormality |
|
||||||
|
| 사양 | SPECS | Specification |
|
||||||
|
| 사업비 | WCT | Working Cost |
|
||||||
|
| 사업장 | BPLC | Business Place |
|
||||||
|
| 사여과지 | SAND_ FILTR | Sand Filter |
|
||||||
|
| 사용 | USE | Use |
|
||||||
|
| 사용가능 | USABLE | Usable |
|
||||||
|
| 사용권 | RIOUS | Right Of Using |
|
||||||
|
| 사용량 | USG | USAGE |
|
||||||
|
| 사용자 | USER | User |
|
||||||
|
| 사위 | FDG | Four Directions Girth |
|
||||||
|
| 사유 | RESN | Reason |
|
||||||
|
| 사이클 | CYCLE | Cycle |
|
||||||
|
| 사이트 | SITE | Site |
|
||||||
|
| 사진 | PHOT | Photograph |
|
||||||
|
| 사항 | MATTR | Matter |
|
||||||
|
| 사후 | AFTFAT | After Fact |
|
||||||
|
| 삭제 | DEL | Deletion |
|
||||||
|
| 산기관 | DFS | Diffuser |
|
||||||
|
| 산업 | INDUST | Industrial |
|
||||||
|
| 산화환원전위 | ORP | Oxidation Reduction Potential |
|
||||||
|
| 살모넬라 | SLMN | Salmonella |
|
||||||
|
| 삼원촉매장치 | TWCTLC | Three Way Catalytic Converter |
|
||||||
|
| 상세 | DTL | Details |
|
||||||
|
| 상세주소 | DADDR | Detailed Address |
|
||||||
|
| 상수 | WT | Water |
|
||||||
|
| 상업지역 | CMCL_ARA | Commercial Area |
|
||||||
|
| 상태 | STUS | Status |
|
||||||
|
| 상품 | GDS | Goods |
|
||||||
|
| 상향류 | UFW | Upflow |
|
||||||
|
| 상호 | CONM | Company Name |
|
||||||
|
| 색도 | CRMTY | Chromaticity |
|
||||||
|
| 생략 | OMS | Omission |
|
||||||
|
| 생물 | LVB | Living Being |
|
||||||
|
| 생물반응조 | BIRAT | Bioreactor |
|
||||||
|
| 생물서식처 | ORGNHBT | Organism Habitat |
|
||||||
|
| 생물종 | BISP | Biological Species |
|
||||||
|
| 생성 | CRT | Creation |
|
||||||
|
| 생슬러지 | RSLG | Raw Sludge |
|
||||||
|
| 생태 | ECLGY | Ecology |
|
||||||
|
| 생태독성 | ECTOX | ecotoxicity |
|
||||||
|
| 서류 | PAPE | Papers |
|
||||||
|
| 서명 | SIGN | Signing |
|
||||||
|
| 서버 | SRVR | Server |
|
||||||
|
| 서비스 | SRVC | Service |
|
||||||
|
| 설계 | DESGN | Design |
|
||||||
|
| 설계용량 | DESGN_CPCT | Design Capacity |
|
||||||
|
| 설립 | FNDN | Foundation |
|
||||||
|
| 설정 | STNG | Setting |
|
||||||
|
| 설치 | INSTL | Installation |
|
||||||
|
| 성격 | CHTR | Character |
|
||||||
|
| 성공 | SCS | Success |
|
||||||
|
| 성능 | PRFMNC | Performance |
|
||||||
|
| 성능검사 | EFTST | Efficiency Test |
|
||||||
|
| 성적서 | SCRRP | Score Report |
|
||||||
|
| 세균 | BCLS | Bacillus |
|
||||||
|
| 세목 | FB | Fine bar |
|
||||||
|
| 세부 | DETAIL | Detail |
|
||||||
|
| 세정 | WS | Washing |
|
||||||
|
| 세정제 | CNML | Cleaning Material |
|
||||||
|
| 소 | SML | Small |
|
||||||
|
| 소독 | DSNF | Disinfection |
|
||||||
|
| 소독제 | DSINF | Disinfectant |
|
||||||
|
| 소분류 | SCLAS | Small Classification |
|
||||||
|
| 소수점 | DCPT | Decimal Point |
|
||||||
|
| 소요 | REQ | Required |
|
||||||
|
| 소유 | OWN | Own |
|
||||||
|
| 소유역 | SBASIN | Sub Basin |
|
||||||
|
| 소재지 | PLAC | Place Of Location |
|
||||||
|
| 소포 | ATFM | Antifoaming |
|
||||||
|
| 소포수 | FBW | Foam Breaking Water |
|
||||||
|
| 소포제 | ANAG | Antifoaming Agent |
|
||||||
|
| 송부 | SENDNG | Sending |
|
||||||
|
| 송신 | SNDM | Send Message |
|
||||||
|
| 송풍기 | BLW | Blower |
|
||||||
|
| 수 | CNT | Count |
|
||||||
|
| 수거 | TKAWY | Take Away |
|
||||||
|
| 수계 | WWBH | Watershed, Water Basin, Hydrosphere |
|
||||||
|
| 수동 | HOPR | Hand Operation |
|
||||||
|
| 수리학적 체류시간 | HRT | Hydraulic Retention Time |
|
||||||
|
| 수문 | Gate | Gate |
|
||||||
|
| 수산화나트륨 | SOHY | Sodium Hydroxide |
|
||||||
|
| 수소이온 | HION | Hydrogen Ion |
|
||||||
|
| 수신 | RCPTN | Reception |
|
||||||
|
| 수용가 | RCPTR | Receptor |
|
||||||
|
| 수위 | WAL | Water Level |
|
||||||
|
| 수정 | MDFCN | Modification |
|
||||||
|
| 수정자 | MDFR | Modifier |
|
||||||
|
| 수제 | SPRDIKE | Superdike |
|
||||||
|
| 수조 | Tank | Tank |
|
||||||
|
| 수질 | QTWT | Quality Of Water |
|
||||||
|
| 수질개선 | WTRQLIMP | Water Quality Improvement |
|
||||||
|
| 수질기준 | WQST | Water Quality Standards |
|
||||||
|
| 수질배출정보 | WTDI | Water Discharge Information |
|
||||||
|
| 수집 | CLCT | Collection |
|
||||||
|
| 순환 | CCL | Cycling |
|
||||||
|
| 쉬겔라 | SHIGLA | Shigella |
|
||||||
|
| 스컴 | SCM | Scum |
|
||||||
|
| 스크린 | SCR | Screen |
|
||||||
|
| 슬러지 | SLG | Sludge |
|
||||||
|
| 슬러지 밀도지수 | SDI | sludge density index |
|
||||||
|
| 슬러지 용량 지표 | SVI | Sludge Volume Index |
|
||||||
|
| 습지 | WTLN | Wetland |
|
||||||
|
| 승인 | APRV | Approval |
|
||||||
|
| 승인권 | APPRVRGT | Right Of Approval |
|
||||||
|
| 시각 | TIME | Time |
|
||||||
|
| 시간 | HR | Hour |
|
||||||
|
| 시군구 | SGG | Si/Gun/Gu |
|
||||||
|
| 시나리오 | SCEN | Scenario |
|
||||||
|
| 시도 | CTPV | Cities And Provinces |
|
||||||
|
| 시료 | SMPL | Sample |
|
||||||
|
| 시설 | FCLT | Facility |
|
||||||
|
| 시설면적 | FCAR | Facility Area |
|
||||||
|
| 시설물 | FCLTS | Facilities |
|
||||||
|
| 시스템 | SYS | System |
|
||||||
|
| 시안 | CYN | Cyaan |
|
||||||
|
| 시운전 | TSTRN | Test Run |
|
||||||
|
| 시작 | BGNG | Beginning |
|
||||||
|
| 시점 | PTM | Point Time |
|
||||||
|
| 시행 | ENFC | Enforcement |
|
||||||
|
| 시험 | TEST | Test |
|
||||||
|
| 신고 | DCLR | Declaration |
|
||||||
|
| 신고자 | DCL | Declarer |
|
||||||
|
| 신규 | NEW | New |
|
||||||
|
| 신기술 | NTCH | New Technology |
|
||||||
|
| 신뢰 | CNFDNC | Confidence |
|
||||||
|
| 신뢰성 | CRDIBLTY | Credibility |
|
||||||
|
| 실시 | OPRT | Operation |
|
||||||
|
| 실적 | ACRS | Actual Result |
|
||||||
|
| 실행 | EXCN | Execution |
|
||||||
|
| 심사 | SRNG | Screening |
|
||||||
|
| 심의 | DLBR | Deliberation |
|
||||||
|
| 아황산환원혐기성포자형성균 | SFSRA | Spore Forming Sulfite Reducing Anaerobes |
|
||||||
|
| 안정화 | STBLZT | Stabilization |
|
||||||
|
| 암롤박스(컨테이너) | ARTCT | Arm roll type container |
|
||||||
|
| 암모니아성질소 | NHN | Ammonia Nitrogen |
|
||||||
|
| 압력 | PRESSR | Pressure |
|
||||||
|
| 압송 | PUMPNG | Pumping |
|
||||||
|
| 압축 | CMPRS | Compress |
|
||||||
|
| 액비 | LQFERTLZ | Liquid Fertilizer |
|
||||||
|
| 액상 | LIQD | Liquid |
|
||||||
|
| 약 | GENTLE | Gentle |
|
||||||
|
| 약품 | CMC | Chemical |
|
||||||
|
| 약품비 | MEDFEE | Medicine Fee |
|
||||||
|
| 약품사용 | USMD | Use Medicines |
|
||||||
|
| 업로드 | UPLD | Upload |
|
||||||
|
| 업무 | DTY | Duty |
|
||||||
|
| 없음 | NOT | Nothing |
|
||||||
|
| 에너지 | ENR | Energy |
|
||||||
|
| 에틸벤젠 | ETBNZN | Ethylbenzene |
|
||||||
|
| 여과 | FILTR | Filteration |
|
||||||
|
| 여과수 | FTWT | Filtered Water |
|
||||||
|
| 여과재 | FTMTRL | Filter Material |
|
||||||
|
| 여과형 | FILTRFOM | Filter Form |
|
||||||
|
| 여부 | YN | Yes or No |
|
||||||
|
| 여시니아균 | YERSNA | Yersinia |
|
||||||
|
| 역률 | PWRER_FCT | Power Factor |
|
||||||
|
| 역세척 | BWS | Back Wash |
|
||||||
|
| 연결 | CONN | Connection |
|
||||||
|
| 연계 | LINK | Link |
|
||||||
|
| 연도 | YR | Year |
|
||||||
|
| 연락 | CNTC | Contact |
|
||||||
|
| 연령 | AGE | Age |
|
||||||
|
| 연료화 | FUELZ | Fuelize |
|
||||||
|
| 연월 | YM | Year and Month |
|
||||||
|
| 염소 | CLRN | Chlorine |
|
||||||
|
| 염소소독 | CHDI | Chlorine Disinfection |
|
||||||
|
| 염소이온 | CLION | Chlorine Ion |
|
||||||
|
| 염화제이철 | IRCLD | Iron(III) Chloride |
|
||||||
|
| 예보 | FRCST | Forecast |
|
||||||
|
| 예비 | PRPT | Preparation |
|
||||||
|
| 예산 | BGT | Budget |
|
||||||
|
| 예상 | EXPCT | Expectation |
|
||||||
|
| 예약 | RSVT | Reservation |
|
||||||
|
| 예외 | EXCPT | Exception |
|
||||||
|
| 예정 | PRNG | Prearrangement |
|
||||||
|
| 예찰 | PRDICT | Prediction |
|
||||||
|
| 오류 | ERR | Error |
|
||||||
|
| 오수받이 | HUS_INL | House Inlet |
|
||||||
|
| 오염물질 | CNTMN | Contaminant |
|
||||||
|
| 오염원 | POLUSRC | Pollution Source |
|
||||||
|
| 오존 | OZN | Ozone |
|
||||||
|
| 오프로드 | OFFRD | Off Road |
|
||||||
|
| 옥살산 | OXACID | Oxalic Acid |
|
||||||
|
| 와류 | VORTEX | Vortex |
|
||||||
|
| 와류형 | VORTXFOM | Vortex From |
|
||||||
|
| 완결 | COMPLT | Completion |
|
||||||
|
| 완료 | CMPTN | Completion |
|
||||||
|
| 완전 | PRFECT | Perfection |
|
||||||
|
| 요건 | REQSIT | Requisite |
|
||||||
|
| 요막액 | ALLNTFLD | Allantoic Fluid |
|
||||||
|
| 요청 | DMND | Demand |
|
||||||
|
| 용량 | CPCT | Capacity |
|
||||||
|
| 용역 | SERVC | Service |
|
||||||
|
| 용존산소 | DO | Dissolved Oxygen |
|
||||||
|
| 용해 | DSLV | Dissolving |
|
||||||
|
| 우량 | EXLT | Excellent |
|
||||||
|
| 우수 | ST | Storm |
|
||||||
|
| 우수받이 | STRT_INL | Street Inlet |
|
||||||
|
| 우수토구 | STM_OVFL_MUT | Storm Overflow Mouth |
|
||||||
|
| 우회 | BP | BY PASS |
|
||||||
|
| 운반 | CNVY | Conveyance |
|
||||||
|
| 운영 | OPER | Operation |
|
||||||
|
| 운영비 | OPEXP | Operation Expense |
|
||||||
|
| 운행 | OPRAT | Operation |
|
||||||
|
| 원격 | RMRT | Rmrt |
|
||||||
|
| 원격감시체계 | TMS | Tele Monitoring System |
|
||||||
|
| 원료 | MTRAL | Material |
|
||||||
|
| 원수 | ORGWT | Origin'S Water |
|
||||||
|
| 원인자 | ORGPR | The Origin Person |
|
||||||
|
| 월 | MM | Month |
|
||||||
|
| 위도 | LAT | Latitude |
|
||||||
|
| 위반 | CNTR | Contravene |
|
||||||
|
| 위촉 | ENTRST | Entrusting |
|
||||||
|
| 위치 | LOC | Location |
|
||||||
|
| 위탁 | CNSG | Consign |
|
||||||
|
| 위탁자 | CONSGNR | Consignor |
|
||||||
|
| 유기인 | ORGP | Organic Phosphorus |
|
||||||
|
| 유량 | FLUX | Flux |
|
||||||
|
| 유량조정조 | EQLZT__TANK | Equalization Tank |
|
||||||
|
| 유입 | INFlOW | Inflow |
|
||||||
|
| 유입수 | INFWTR | Influent Water |
|
||||||
|
| 유주 | SWARMG | Swarming |
|
||||||
|
| 유지 | MNTNC | Maintenance |
|
||||||
|
| 유지용수공급 | MWRS | Maintenance Water Requirement Supply |
|
||||||
|
| 유체 | FLUID | Fluid |
|
||||||
|
| 유출 | EFFLUX | Efflux |
|
||||||
|
| 유충 | LAVL | Larval |
|
||||||
|
| 유형 | TY | Type |
|
||||||
|
| 유효 | VLD | Validity |
|
||||||
|
| 음용 | DKPS | For Drinking Purpose |
|
||||||
|
| 읍면동 | EMD | Eup/Myun/Dong |
|
||||||
|
| 응답 | RSPNS | Response |
|
||||||
|
| 응집제 | COAG | Cohesive Agents |
|
||||||
|
| 이관 | TRNSF | Transfer |
|
||||||
|
| 이동 | MVMN | Movement |
|
||||||
|
| 이력 | HST | History |
|
||||||
|
| 이메일 | EML | Email |
|
||||||
|
| 이상 | ABOVE | Above |
|
||||||
|
| 이송 | TRSF | Transfer |
|
||||||
|
| 이의 | OBJC | Objection |
|
||||||
|
| 이차 | SCDR | Secondary |
|
||||||
|
| 이차침전지 | SCDR_SDMT_TANK | Secondary Sedimaentation |
|
||||||
|
| 이행 | MIG | Migratation |
|
||||||
|
| 인건비 | PEXP | Personnel Expenses{Expenditure] |
|
||||||
|
| 인계 | HNDVR | Handover |
|
||||||
|
| 인계서 | HDOVDC | Handover Document |
|
||||||
|
| 인구 | POPL | Population |
|
||||||
|
| 인산 | PHACID | Phosphoric Acid |
|
||||||
|
| 인산염인 | POP | phosphate |
|
||||||
|
| 인양기 | LFT | Lifter |
|
||||||
|
| 인원수 | NOPE | The Number of Persons |
|
||||||
|
| 인증 | CERT | Certification |
|
||||||
|
| 인처리 | PPRCS | Phosphorus Process |
|
||||||
|
| 인허가 | APVL | Approval |
|
||||||
|
| 일 | DY | Day |
|
||||||
|
| 일련번호 | SN | Serial Number |
|
||||||
|
| 일반 | GNRL | General |
|
||||||
|
| 일별 | DALY | Daily |
|
||||||
|
| 일시 | DT | Date and Time |
|
||||||
|
| 일자 | YMD | YEAR Month Day |
|
||||||
|
| 일지 | DIARY | Diary |
|
||||||
|
| 일차 | PRM | Primary |
|
||||||
|
| 일차침전지 | PST_SDMT_TANK | Primary Sedimentation Tank |
|
||||||
|
| 일평균 | DYRG | Day Average |
|
||||||
|
| 임시 | TMPR | Temporary |
|
||||||
|
| 임의 | RNDM | Random |
|
||||||
|
| 입고 | WRHS | Warehousing |
|
||||||
|
| 입력 | INPT | Input |
|
||||||
|
| 잉여 | SPS | Surplus |
|
||||||
|
| 잉여슬러지 | EC_SLG | Excess Sludge |
|
||||||
|
| 자 | MAN | Man |
|
||||||
|
| 자갈 | GRAVEL | Gravel |
|
||||||
|
| 자료 | DATA | Data |
|
||||||
|
| 자리 | DIGIT | Digit |
|
||||||
|
| 자립화 | SLFRLI | Self Reliance |
|
||||||
|
| 자연형 | NATRLFOM | Natural Form |
|
||||||
|
| 자외선 | URLI | Ultraviolet Rays, Light |
|
||||||
|
| 자재 | MTRIL | Material |
|
||||||
|
| 자체 | ITSL | Itself |
|
||||||
|
| 작성 | WRT | Writing |
|
||||||
|
| 작업 | JOB | Job |
|
||||||
|
| 잠금 | LOCK | Lock |
|
||||||
|
| 장기 | LNGTR | Long Term |
|
||||||
|
| 장소 | PLCE | Place |
|
||||||
|
| 장착 | MNTNG | Mounting |
|
||||||
|
| 재 | RE | Re |
|
||||||
|
| 재이용 | REUSE | Reuse |
|
||||||
|
| 재이용수 | | Reuse Water |
|
||||||
|
| 재활용 | RUSE | Reuse |
|
||||||
|
| 저감 | REDUC | Reduction |
|
||||||
|
| 저류조 | DTT_TANK | Detention Tank |
|
||||||
|
| 저온 | LOWTMP | Low Temperature |
|
||||||
|
| 저장 | STRG | Storage |
|
||||||
|
| 저장소 | STORGE | Storage |
|
||||||
|
| 적발 | DSCL | Disclose |
|
||||||
|
| 적산 | ADD | Addition |
|
||||||
|
| 적용 | APLCN | Application |
|
||||||
|
| 적합 | STBLT | Suitability |
|
||||||
|
| 전기 | ELCTY | Electricity |
|
||||||
|
| 전기료 | ELFEE | Electricity Fee |
|
||||||
|
| 전력 | PWRER | Power |
|
||||||
|
| 전문 | SPCY | Specially |
|
||||||
|
| 전산 | CMPUTT | Computation |
|
||||||
|
| 전송 | TRSM | Transmission |
|
||||||
|
| 전압 | VLTGE | Voltage |
|
||||||
|
| 전용 | EXUSE | Exclusive Use |
|
||||||
|
| 전원 | SELCT | Source Of Electricity |
|
||||||
|
| 전처리 | PRETR | Pretreatment |
|
||||||
|
| 점검 | CHCK | Check |
|
||||||
|
| 접속 | CNTN | Connection |
|
||||||
|
| 정밀 | PRCIS | Precision |
|
||||||
|
| 정보 | INFO | Information |
|
||||||
|
| 정산 | CLCLN | Calculation |
|
||||||
|
| 정상 | NRMLT | Normality |
|
||||||
|
| 정수장 | WPPW | Water Purification Plant, Waterworks |
|
||||||
|
| 정제 | REFINE | Refining |
|
||||||
|
| 정지 | STP | Stop |
|
||||||
|
| 제거 | RMV | Removal |
|
||||||
|
| 제수변 | SL_VALVE | Sluice Valve |
|
||||||
|
| 제작 | MNFCT | Manufacture |
|
||||||
|
| 제조사 | MKR | Maker |
|
||||||
|
| 제출 | SBMSN | Submission |
|
||||||
|
| 제한 | LIMT | Limitation |
|
||||||
|
| 조류 | ALG | Algae |
|
||||||
|
| 조목 | CSB | Coarse Bar |
|
||||||
|
| 조사 | EXMN | Examination |
|
||||||
|
| 조성 | MAKE | Make |
|
||||||
|
| 조정 | EQLT | Equalization |
|
||||||
|
| 조치 | ACTN | Action |
|
||||||
|
| 조회 | INQ | Inquiry |
|
||||||
|
| 존재 | EXST | Existence |
|
||||||
|
| 종결 | TRMN | Termination |
|
||||||
|
| 종균제 | MICBA | Microbial Agent |
|
||||||
|
| 종료 | END | End |
|
||||||
|
| 종류 | KND | Kind |
|
||||||
|
| 종목 | IEM | Item |
|
||||||
|
| 종별 | ASORT | Assortment |
|
||||||
|
| 종사자 | ENFSN | Enfilade Person |
|
||||||
|
| 종점 | TMNL | Terminal |
|
||||||
|
| 좌표 | COOR | Coordinate |
|
||||||
|
| 주간 | WIK | Week |
|
||||||
|
| 주변 | CFR | Circumference |
|
||||||
|
| 주소 | ADDR | Address |
|
||||||
|
| 주입 | IJTN | Injection |
|
||||||
|
| 주파수 | FQNC | Frequency |
|
||||||
|
| 준공 | CMCN | Completion Of Construction |
|
||||||
|
| 중권역 | MDSTRC | Medium District |
|
||||||
|
| 중복 | DPCN | Duplication |
|
||||||
|
| 중분류 | MLSFC | Middle Classification |
|
||||||
|
| 중온 | MESPH | Mesophilic |
|
||||||
|
| 중첩 | RETRTN | Reiteration |
|
||||||
|
| 중화설비 | NUTEQP | Neutralization Equipment |
|
||||||
|
| 중화제 | CNTAG | Counteragent |
|
||||||
|
| 증가 | INCRS | Increase |
|
||||||
|
| 지도점검표사본 | CITBMR | Copy of Instruction Checklist |
|
||||||
|
| 지방자치단체 | LGOV | Local Governments |
|
||||||
|
| 지번 | LOTNO | Lot Number |
|
||||||
|
| 지상 | GRND | Ground |
|
||||||
|
| 지역 | ARA | Area |
|
||||||
|
| 지질 | NTRFS | Nature Of Soil |
|
||||||
|
| 지질도 | GEOMAP | Geological Map |
|
||||||
|
| 지하 | UDGD | Underground |
|
||||||
|
| 지하수 | GROU | Groundwater |
|
||||||
|
| 지형 | TPGRPH | Topography |
|
||||||
|
| 진공 | VCM | Vacuum |
|
||||||
|
| 진단 | DGNSS | Diagnosis |
|
||||||
|
| 진동 | VIBRAT | Vibration |
|
||||||
|
| 진행 | PRGRE | Progress |
|
||||||
|
| 질산 | NIACID | Nitric Acid. |
|
||||||
|
| 질산성질소 | NO3N | Nitrate Nitrogen |
|
||||||
|
| 집계 | TOT | Total |
|
||||||
|
| 집계구 | SUMDST | Summation District |
|
||||||
|
| 집행 | IMPL | Implementation |
|
||||||
|
| 찌꺼기 | LEES | Lees |
|
||||||
|
| 차아염소산 | NAOCL | Hypochlorous Acid |
|
||||||
|
| 차집 | ITCT | Intercepting |
|
||||||
|
| 착공 | BGNCST | Begin Construction |
|
||||||
|
| 채수 | SAMWT | Sampling Of Water |
|
||||||
|
| 채수기 | WTRSMPLR | Water Sampler |
|
||||||
|
| 채수병 | WTRBOTL | Water Bottle |
|
||||||
|
| 처리 | PRCS | Process |
|
||||||
|
| 처리비 | PSSFEE | Process Fee |
|
||||||
|
| 처리수 | TRT_WT | Treated Water |
|
||||||
|
| 처리수조 | TRT_WT_TANK | Treated Water Tank |
|
||||||
|
| 처리시설 | TRTMTFCLT | Treatment Facility |
|
||||||
|
| 처리자 | PRCR | Processor |
|
||||||
|
| 처분 | DSPS | Disposition |
|
||||||
|
| 철염 | FESLT | Ferric Salt |
|
||||||
|
| 첨부 | ATCH | Attachment |
|
||||||
|
| 첨부파일 | ATFI | Attachment File |
|
||||||
|
| 초과 | EXCS | Excess |
|
||||||
|
| 초기화 | INITL | Initialization |
|
||||||
|
| 촉매 | CTLY | Catalyst |
|
||||||
|
| 총계 | TSM | Summation |
|
||||||
|
| 총대장균군 | TCOLFGRP | Total Coliform Group |
|
||||||
|
| 총량 | TQT | Total Quantity |
|
||||||
|
| 총면적 | GFA | Gross Floor Area |
|
||||||
|
| 총사업비 | TPCO | Total Project Cost |
|
||||||
|
| 총인구 | TPOPLTN | Total Population |
|
||||||
|
| 총인처리시설 | TPFCT | Total Phosphorus facility |
|
||||||
|
| 최근 | RCNT | Recent |
|
||||||
|
| 최대값 | MAXV | Maximum Value |
|
||||||
|
| 최소값 | MINV | Minimum Value |
|
||||||
|
| 최적 | BMTB | Being The Most Suitable |
|
||||||
|
| 최종 | LAST | Last |
|
||||||
|
| 최초 | FRST | First |
|
||||||
|
| 추출 | EXTR | Extraction |
|
||||||
|
| 추출정보 | EXTRINFO | Extraction Information |
|
||||||
|
| 축 | AXS | Axis |
|
||||||
|
| 출력 | OTPT | Output |
|
||||||
|
| 출발 | LVE | Leave |
|
||||||
|
| 충전기 | CHRGR | Charger |
|
||||||
|
| 취득 | ACQS | Acquisition |
|
||||||
|
| 취소 | RTRCN | Retraction |
|
||||||
|
| 측정 | MSUR | Measurement |
|
||||||
|
| 측정기 | MSRR | Measurement Instrument |
|
||||||
|
| 측정소 | MSRSTN | Measurement Station |
|
||||||
|
| 침사지 | GTCB | Grit Chamber |
|
||||||
|
| 침전 | SDMT | Sediment |
|
||||||
|
| 침전지 | SDMT_TANK | sedimentation tank |
|
||||||
|
| 컨베이어 | CVY | Conveyor |
|
||||||
|
| 컬럼 | COL | Column |
|
||||||
|
| 코드 | CD | Code |
|
||||||
|
| 크기 | SZ | Size |
|
||||||
|
| 크실렌 | XYLEN | Xylene |
|
||||||
|
| 탄화 | CARB | Carbonization |
|
||||||
|
| 탈거 | CRYOFF | Carry Off |
|
||||||
|
| 탈리액 | SPNT | Supernatant |
|
||||||
|
| 탈수 | DWTR | Dewatering |
|
||||||
|
| 탈수기 | DEHYM | Dehydration Machine |
|
||||||
|
| 탈질 | DNTFCT | Denitrificatio |
|
||||||
|
| 탈취 | DODRZ | Deodorization |
|
||||||
|
| 탈취기 | DEODRZ | Deodorizer |
|
||||||
|
| 탈취제 | DEODR | Deodorant |
|
||||||
|
| 탈황제 | DSLFA | Desulfurizing Agent |
|
||||||
|
| 터널형 | YUNLTP | Tunnel Type |
|
||||||
|
| 테이블 | TBL | Table |
|
||||||
|
| 토구 | OTFL | Outfall |
|
||||||
|
| 토지 | LAD | Land |
|
||||||
|
| 토지면적 | LDAR | Land Area |
|
||||||
|
| 통계 | STATS | Statistics |
|
||||||
|
| 통보 | NTFCTN | Notification |
|
||||||
|
| 통신 | COMM | Communication |
|
||||||
|
| 통지 | AVTSMT | Avertissement |
|
||||||
|
| 통합 | UNTY | Unity |
|
||||||
|
| 특성 | CHRT | Character |
|
||||||
|
| 특수 | SPECL | Special |
|
||||||
|
| 특정유해물질 | SHCH | Specified Hazardous Chemicals |
|
||||||
|
| 파일 | FILE | File |
|
||||||
|
| 판정 | JGMT | Judgement |
|
||||||
|
| 펌프 | PUMP | Pump |
|
||||||
|
| 펌프장 | PUMP_STT | Pump Station |
|
||||||
|
| 페놀 | PHNL | Phenol |
|
||||||
|
| 평가 | EVL | Evaluation |
|
||||||
|
| 폐기 | DSCD | Discard |
|
||||||
|
| 폐기물 | WSTE | Waste |
|
||||||
|
| 폐쇄 | CLSG | Closing |
|
||||||
|
| 폐수 | WAWA | Waste Water |
|
||||||
|
| 폐수처리 | WSWT | Wastewater Treatment |
|
||||||
|
| 폐열 | WASTHET | Waste Heat |
|
||||||
|
| 포기 | ARTN | Aeration |
|
||||||
|
| 포트 | PORT | Port |
|
||||||
|
| 폭기조 | ARTN_TANK | Aeration Tank |
|
||||||
|
| 폴리머 | PLYMR | Polymer |
|
||||||
|
| 폴리철 | FRRCSU | Ferric Sulfate |
|
||||||
|
| 표고 | AL | Altitude |
|
||||||
|
| 표기 | MARK | Mark |
|
||||||
|
| 표시 | INDCT | Indication |
|
||||||
|
| 표준 | STD | Standard |
|
||||||
|
| 표출 | EPRSS | Expression |
|
||||||
|
| 플래그 | FLAG | Flag |
|
||||||
|
| 필드 | FILD | Field |
|
||||||
|
| 필수 | ESNTL | Essential |
|
||||||
|
| 필증 | CERFIN | Certificate Of Finishing |
|
||||||
|
| 필터 | FLTER | Filter |
|
||||||
|
| 하수 | SWGE | Sewage |
|
||||||
|
| 하수도 | DRNGSYS | Drainage System |
|
||||||
|
| 하수미처리 | SEWGUNTTM | Un Sewage Treatment |
|
||||||
|
| 하수처리 | SEWGTRTM | Sewage Treatment |
|
||||||
|
| 하수처리수 | STWTR | Sewage Treatment Water |
|
||||||
|
| 하위 | LOWR | Lower |
|
||||||
|
| 하향류 | DWFW | Downflow |
|
||||||
|
| 할인 | DSCNT | Discount |
|
||||||
|
| 함수율 | MISTR_CTNT | Moisture content |
|
||||||
|
| 합계 | SMM | Summation |
|
||||||
|
| 해당 | RLVT | Relevant |
|
||||||
|
| 해석 | INTRPRTT | Interpretation |
|
||||||
|
| 해양투기 | OCDU | Ocean Dumping |
|
||||||
|
| 행망 | ADMNW | Administration Network |
|
||||||
|
| 행정 | ADMN | Administration |
|
||||||
|
| 행정구역 | ADMI | Administrative District |
|
||||||
|
| 행정동 | DONG | Dong (Administrative District) |
|
||||||
|
| 허가 | PRMSN | Permission |
|
||||||
|
| 허용 | PERM | Permission |
|
||||||
|
| 현상 | PHNMN | Phenomenon |
|
||||||
|
| 혐기 | AARB | Anaerobic |
|
||||||
|
| 혐기조 | AARB_TANK | Anaerobic tank |
|
||||||
|
| 협잡물 | CCMT | Concomitant |
|
||||||
|
| 형태 | SHAP | Shape |
|
||||||
|
| 호기 | ARB | Aerobic |
|
||||||
|
| 호기조 | ARB_TANK | Aerobic Tank |
|
||||||
|
| 호소수 | LMSHWT | Lake And Marsh Water |
|
||||||
|
| 호수 | LKE | Lake |
|
||||||
|
| 호안 | RVTMNT | Revetment |
|
||||||
|
| 호이스트 | HIST | Hoist |
|
||||||
|
| 혼합 | CMPN | Compound |
|
||||||
|
| 혼합액현탁고형물 | MLSS | Mixed liquor suspended solids |
|
||||||
|
| 혼화지 | MXG_TNAK | Mixing tank |
|
||||||
|
| 홈페이지 | HMPG | Homepage |
|
||||||
|
| 홍수 | FLOOD | Flood |
|
||||||
|
| 확인 | IDNTY | Identify |
|
||||||
|
| 확인서 | CNFRMN | Confirmation |
|
||||||
|
| 확인자 | IDFR | Identifier |
|
||||||
|
| 확장자 | EXTN | Extension |
|
||||||
|
| 확정 | CFMTN | Confirmation |
|
||||||
|
| 환경 | ENVR | Environment |
|
||||||
|
| 환경기초시설 | ENINF | Environmental Infrastructure |
|
||||||
|
| 환원 | RSTORE | Restoration |
|
||||||
|
| 활성탄 | AC | Activated Carbon |
|
||||||
|
| 활성화 | PRMT | Promote/Facilitate |
|
||||||
|
| 활용 | PRUS | Practical Use |
|
||||||
|
| 황산 | ECCBT | Encyclopaedia Britannica (H2So4) |
|
||||||
|
| 회사 | CO | Company |
|
||||||
|
| 회수 | RTRVL | Retrieval |
|
||||||
|
| 회신 | RPLY | Reply |
|
||||||
|
| 효율 | EFC | Efficiency |
|
||||||
|
| 효율성 | EFFCTV | Effectiveness |
|
||||||
|
| 휴대 | MBL | Mobile |
|
||||||
|
| 흡수정 | EXTTW | Extraction Well |
|
||||||
|
| 흡착 | ADST | Adsorption |
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
"@types/node": "^22.13.1",
|
"@types/node": "^22.13.1",
|
||||||
"@types/webpack": "^5.28.5",
|
"@types/webpack": "^5.28.5",
|
||||||
"eslint": "^9.0.0",
|
"eslint": "^9.0.0",
|
||||||
"eslint-config-next": "15.4.0",
|
"eslint-config-next": "15.3.8",
|
||||||
"postcss": "^8.4.49",
|
"postcss": "^8.4.49",
|
||||||
"prettier": "^3.4.2",
|
"prettier": "^3.4.2",
|
||||||
"prettier-plugin-tailwindcss": "^0.6.11",
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
||||||
|
|||||||
@@ -1,18 +1,24 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { client } from "@/shared/api";
|
import { client } from "@/shared/api";
|
||||||
import type { IUserInfo } from "@/shared/store";
|
import type { IUserInfo } from "@/shared/store";
|
||||||
import { getCookie, useUserStore } from "@/shared/lib";
|
import { getCookie, useUserStore } from "@/shared/lib";
|
||||||
import { ENDPOINT, AUTH_USER_ID } from "@/shared/config";
|
import { isAtLoginRedirectUrl } from "@common/network";
|
||||||
import { LoginApi } from "../api/login-service";
|
import {
|
||||||
|
ENDPOINT,
|
||||||
|
AUTH_USER_ID,
|
||||||
|
AUTH_LOGIN_REDIRECT_URL,
|
||||||
|
} from "@/shared/config";
|
||||||
|
|
||||||
const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
||||||
const router = useRouter();
|
|
||||||
const { userInfo, setUserInfo } = useUserStore((state) => state);
|
const { userInfo, setUserInfo } = useUserStore((state) => state);
|
||||||
|
|
||||||
async function authCheck() {
|
async function authCheck() {
|
||||||
|
if (isAtLoginRedirectUrl(AUTH_LOGIN_REDIRECT_URL)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const userId = getCookie(AUTH_USER_ID);
|
const userId = getCookie(AUTH_USER_ID);
|
||||||
if (!userId) {
|
if (!userId) {
|
||||||
throw new Error("Missing required authentication tokens");
|
throw new Error("Missing required authentication tokens");
|
||||||
@@ -30,14 +36,9 @@ const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
|||||||
await authCheck();
|
await authCheck();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|
||||||
try {
|
|
||||||
await LoginApi.silentRefresh();
|
|
||||||
await authCheck();
|
|
||||||
} catch (refreshError) {
|
|
||||||
console.error("Token refresh failed:", refreshError);
|
|
||||||
setUserInfo(null);
|
setUserInfo(null);
|
||||||
router.push("/auth/login");
|
if (!isAtLoginRedirectUrl(AUTH_LOGIN_REDIRECT_URL)) {
|
||||||
|
window.location.assign(AUTH_LOGIN_REDIRECT_URL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ export const linkFormSchema = z.object({
|
|||||||
last_link_rslt_cd: z.string().max(4).nullable().optional(),
|
last_link_rslt_cd: z.string().max(4).nullable().optional(),
|
||||||
last_link_excn_dt: z.string().max(40).nullable().optional(),
|
last_link_excn_dt: z.string().max(40).nullable().optional(),
|
||||||
next_link_excn_dt: z.string().max(40).nullable().optional(),
|
next_link_excn_dt: z.string().max(40).nullable().optional(),
|
||||||
last_link_err_cd: z.string().max(10).nullable().optional(),
|
last_link_err_cd: z.string().max(50, { message: '마지막 연계 오류 코드는 50자 이하입니다.' }).nullable().optional(),
|
||||||
mdfcn_dt: z.string().nullable().optional(),
|
mdfcn_dt: z.string().nullable().optional(),
|
||||||
mdfr_id: z.string().nullable().optional(),
|
mdfr_id: z.string().nullable().optional(),
|
||||||
link_cycle_mi: z.coerce.number().nullable().optional().refine((val) => {
|
link_cycle_mi: z.coerce.number().nullable().optional().refine((val) => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import {
|
import {
|
||||||
keepPreviousData,
|
keepPreviousData,
|
||||||
useQuery,
|
useQuery,
|
||||||
@@ -75,7 +75,7 @@ function AddAdminDialog() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const query = useQuery({
|
const query = useQuery({
|
||||||
queryKey: [ENDPOINT.USER_SERVICE.USERS, pagination, "normal-user"],
|
queryKey: [ENDPOINT.USER_SERVICE.USERS, "findPageUser", pagination],
|
||||||
queryFn: () =>
|
queryFn: () =>
|
||||||
UserApi.findPageUser({
|
UserApi.findPageUser({
|
||||||
...userSearchQuery,
|
...userSearchQuery,
|
||||||
@@ -181,6 +181,21 @@ function AddAdminDialog() {
|
|||||||
query.refetch();
|
query.refetch();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!open) {
|
||||||
|
setRowSelection({});
|
||||||
|
setSelectedGroupId("");
|
||||||
|
setUserSearchQuery({
|
||||||
|
keywordType: "userName",
|
||||||
|
keyword: "",
|
||||||
|
});
|
||||||
|
setPagination({ pageIndex: 0, pageSize: 10 });
|
||||||
|
queryClient.removeQueries({
|
||||||
|
queryKey: [ENDPOINT.USER_SERVICE.USERS, "findPageUser"],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, [open]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog open={open} onOpenChange={setOpen}>
|
<Dialog open={open} onOpenChange={setOpen}>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
|
|||||||
@@ -1,53 +1,22 @@
|
|||||||
// import { client } from "@/shared/api";
|
import { client } from "@/shared/api";
|
||||||
// import { ENDPOINT } from "@/shared/config";
|
import { ENDPOINT } from "@/shared/config";
|
||||||
import {
|
import {
|
||||||
type BoardStatisticsParams,
|
type BoardStatisticsParams,
|
||||||
type BoardStatistics,
|
type BoardStatistics,
|
||||||
type BoardStatisticsService,
|
type BoardStatisticsService,
|
||||||
} from "../model/board-statistics-interface";
|
} from "../model/board-statistics-interface";
|
||||||
|
|
||||||
// 임시 모의 데이터
|
|
||||||
const mockBoardStatisticsData: BoardStatistics = {
|
|
||||||
totalPosts: 2456,
|
|
||||||
totalComments: 156,
|
|
||||||
averageRating: 4.2,
|
|
||||||
totalViews: 45678,
|
|
||||||
dayList: [
|
|
||||||
{ date: "1월", posts: 10, comments: 5, views: 800 },
|
|
||||||
{ date: "2월", posts: 15, comments: 8, views: 1200 },
|
|
||||||
{ date: "3월", posts: 12, comments: 10, views: 1000 },
|
|
||||||
{ date: "4월", posts: 18, comments: 15, views: 1500 },
|
|
||||||
{ date: "5월", posts: 22, comments: 20, views: 1800 },
|
|
||||||
{ date: "6월", posts: 20, comments: 18, views: 1600 },
|
|
||||||
{ date: "7월", posts: 25, comments: 22, views: 2000 },
|
|
||||||
],
|
|
||||||
boardList: [
|
|
||||||
{ boardType: "notice", boardName: "공지사항", count: 45 },
|
|
||||||
{ boardType: "faq", boardName: "FAQ", count: 120 },
|
|
||||||
{ boardType: "qna", boardName: "Q&A", count: 180 },
|
|
||||||
{ boardType: "free", boardName: "자유게시판", count: 95 },
|
|
||||||
],
|
|
||||||
statusList: [
|
|
||||||
{ status: "completed", statusName: "답변완료", count: 75 },
|
|
||||||
{ status: "waiting", statusName: "답변대기", count: 25 },
|
|
||||||
],
|
|
||||||
};
|
|
||||||
|
|
||||||
class BoardStatisticsApiService implements BoardStatisticsService {
|
class BoardStatisticsApiService implements BoardStatisticsService {
|
||||||
async getBoardStatistics(
|
async getBoardStatistics(
|
||||||
params: BoardStatisticsParams,
|
params: BoardStatisticsParams,
|
||||||
): Promise<BoardStatistics> {
|
): Promise<BoardStatistics> {
|
||||||
console.log("params: ", params);
|
|
||||||
try {
|
try {
|
||||||
// 실제 API 연동 시 아래 코드 사용
|
// 실제 API 연동 시 아래 코드 사용
|
||||||
// const response = await client.get<BoardStatistics>(
|
const response = await client.get<BoardStatistics>(
|
||||||
// `${ENDPOINT.CMS_SERVICE.BOARD_STATISTICS}`,
|
`${ENDPOINT.BOARD_SERVICE.STATISTICS}`,
|
||||||
// { params },
|
{ params },
|
||||||
// );
|
);
|
||||||
// return response.data;
|
return response.data;
|
||||||
|
|
||||||
// 임시 모의 데이터 반환
|
|
||||||
return Promise.resolve(mockBoardStatisticsData);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("게시판 통계 데이터 조회 실패:", error);
|
console.error("게시판 통계 데이터 조회 실패:", error);
|
||||||
throw error;
|
throw error;
|
||||||
|
|||||||
@@ -12,32 +12,36 @@ export interface BoardStatisticsParams extends PageableParams {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface BoardStatistics {
|
export interface BoardStatistics {
|
||||||
totalPosts: number;
|
bbsTotalDto: BbsTotalDto; // 게시판 전체 통계
|
||||||
totalComments: number;
|
pstAnsList: PstAnswerStatistics[]; // 게시물 답변 상태별 통계 목록
|
||||||
averageRating: number;
|
bbsDailyList: BbsDailyStatistics[]; // 게시판 일별 통계 목록
|
||||||
totalViews: number;
|
bbsPstCntList: BbsPostCountStatistics[]; // 게시판별 게시물 건수 통계 목록
|
||||||
dayList: DayStatistics[];
|
|
||||||
boardList: BoardTypeStatistics[];
|
|
||||||
statusList: StatusStatistics[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DayStatistics {
|
interface BbsTotalDto {
|
||||||
date: string;
|
pstInqCnt: number; // 게시물 조회 건수
|
||||||
posts: number;
|
pstEvlAvg: number; // 게시물 평가 평균
|
||||||
comments: number;
|
pstTotCnt: number; // 게시물 총 건수
|
||||||
views: number;
|
pstAnsWaitCnt: number; // 게시물 답변 대기 건수
|
||||||
}
|
}
|
||||||
|
|
||||||
interface BoardTypeStatistics {
|
interface PstAnswerStatistics {
|
||||||
boardType: string;
|
answerNm: string; // 답변 명
|
||||||
boardName: string;
|
answerYn: string; // 답변 여부 (Y/N)
|
||||||
count: number;
|
ansCnt: number; // 답변 건수
|
||||||
}
|
}
|
||||||
|
|
||||||
interface StatusStatistics {
|
interface BbsDailyStatistics {
|
||||||
status: string;
|
dayYmd: string; // 일자 (YYYY-MM-DD)
|
||||||
statusName: string;
|
pstInqCnt: number; // 게시물 조회 건수
|
||||||
count: number;
|
pstCmntCnt: number; // 게시물 댓글 건수
|
||||||
|
pstNewCnt: number; // 게시물 신규 건수
|
||||||
|
}
|
||||||
|
|
||||||
|
interface BbsPostCountStatistics {
|
||||||
|
bbsId: number; // 게시판 ID
|
||||||
|
bbsNm: string; // 게시판 명
|
||||||
|
pstCnt: number; // 게시물 건수
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BoardStatisticsService {
|
export interface BoardStatisticsService {
|
||||||
|
|||||||
@@ -11,20 +11,20 @@ export const chartData = {
|
|||||||
} => {
|
} => {
|
||||||
return {
|
return {
|
||||||
data: {
|
data: {
|
||||||
labels: data.dayList.map((item) => item.date),
|
labels: data.bbsDailyList.map((item) => item.dayYmd),
|
||||||
datasets: [
|
datasets: [
|
||||||
{
|
{
|
||||||
type: "line",
|
type: "line",
|
||||||
label: "신규게시물",
|
label: "신규게시물",
|
||||||
data: data.dayList.map((item) => item.posts),
|
data: data.bbsDailyList.map((item) => item.pstNewCnt),
|
||||||
borderColor: getCssVariableValue("--chart-1"),
|
borderColor: getCssVariableValue("--chart-1"),
|
||||||
backgroundColor: "rgba(59, 130, 246, 0.1)",
|
backgroundColor: "rgba(59, 130, 246, 0.1)",
|
||||||
tension: 0.4,
|
tension: 0.4,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "line",
|
type: "line",
|
||||||
label: "답변대기",
|
label: "댓글수",
|
||||||
data: data.dayList.map((item) => item.comments),
|
data: data.bbsDailyList.map((item) => item.pstCmntCnt),
|
||||||
borderColor: getCssVariableValue("--chart-2"),
|
borderColor: getCssVariableValue("--chart-2"),
|
||||||
backgroundColor: "rgba(236, 72, 153, 0.1)",
|
backgroundColor: "rgba(236, 72, 153, 0.1)",
|
||||||
tension: 0.4,
|
tension: 0.4,
|
||||||
@@ -32,11 +32,10 @@ export const chartData = {
|
|||||||
{
|
{
|
||||||
type: "line",
|
type: "line",
|
||||||
label: "조회수",
|
label: "조회수",
|
||||||
data: data.dayList.map((item) => item.views),
|
data: data.bbsDailyList.map((item) => item.pstInqCnt),
|
||||||
borderColor: getCssVariableValue("--chart-3"),
|
borderColor: getCssVariableValue("--chart-3"),
|
||||||
backgroundColor: "rgba(168, 85, 247, 0.1)",
|
backgroundColor: "rgba(168, 85, 247, 0.1)",
|
||||||
tension: 0.4,
|
tension: 0.4,
|
||||||
hidden: true,
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -67,13 +66,13 @@ export const chartData = {
|
|||||||
} => {
|
} => {
|
||||||
return {
|
return {
|
||||||
data: {
|
data: {
|
||||||
labels: data.boardList.map((item) => item.boardName),
|
labels: data.bbsPstCntList.map((item) => item.bbsNm),
|
||||||
datasets: [
|
datasets: [
|
||||||
{
|
{
|
||||||
type: "bar",
|
type: "bar",
|
||||||
label: "게시판별 분포",
|
label: "게시판별 분포",
|
||||||
data: data.boardList.map((item) => item.count),
|
data: data.bbsPstCntList.map((item) => item.pstCnt),
|
||||||
backgroundColor: data.boardList.map((_, index) =>
|
backgroundColor: data.bbsPstCntList.map((_, index) =>
|
||||||
getCssVariableValue(`--chart-${(index % 5) + 1}`),
|
getCssVariableValue(`--chart-${(index % 5) + 1}`),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -106,12 +105,12 @@ export const chartData = {
|
|||||||
} => {
|
} => {
|
||||||
return {
|
return {
|
||||||
data: {
|
data: {
|
||||||
labels: data.statusList.map((item) => item.statusName),
|
labels: data.pstAnsList.map((item) => item.answerNm),
|
||||||
datasets: [
|
datasets: [
|
||||||
{
|
{
|
||||||
type: "doughnut",
|
type: "doughnut",
|
||||||
data: data.statusList.map((item) => item.count),
|
data: data.pstAnsList.map((item) => item.ansCnt),
|
||||||
backgroundColor: data.statusList.map((_, index) =>
|
backgroundColor: data.pstAnsList.map((_, index) =>
|
||||||
getCssVariableValue(`--chart-${(index % 5) + 1}`),
|
getCssVariableValue(`--chart-${(index % 5) + 1}`),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import {
|
|||||||
SelectValue,
|
SelectValue,
|
||||||
} from "@common/components";
|
} from "@common/components";
|
||||||
import { SiteSelect } from "@/entities/site";
|
import { SiteSelect } from "@/entities/site";
|
||||||
// import { ENDPOINT } from "@/shared/config";
|
import { ENDPOINT } from "@/shared/config";
|
||||||
import { NoData } from "@/shared/ui/no-data";
|
import { NoData } from "@/shared/ui/no-data";
|
||||||
import { InputDateRangePicker } from "@/shared/ui/input-date-range-picker";
|
import { InputDateRangePicker } from "@/shared/ui/input-date-range-picker";
|
||||||
import { BoardStatisticsApi } from "../api/board-statistics-service";
|
import { BoardStatisticsApi } from "../api/board-statistics-service";
|
||||||
@@ -66,7 +66,7 @@ function BoardStatisticsPage() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const { data: boardStatisticsData } = useQuery({
|
const { data: boardStatisticsData } = useQuery({
|
||||||
queryKey: ["board-statistics", searchParams],
|
queryKey: [ENDPOINT.BOARD_SERVICE.STATISTICS, searchParams],
|
||||||
queryFn: () =>
|
queryFn: () =>
|
||||||
BoardStatisticsApi.getBoardStatistics({
|
BoardStatisticsApi.getBoardStatistics({
|
||||||
...searchParams,
|
...searchParams,
|
||||||
@@ -176,7 +176,8 @@ function BoardStatisticsPage() {
|
|||||||
<h3 className="text-lg font-medium text-gray-500">총 게시물</h3>
|
<h3 className="text-lg font-medium text-gray-500">총 게시물</h3>
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="mt-2 text-4xl font-bold">
|
<div className="mt-2 text-4xl font-bold">
|
||||||
{boardStatisticsData?.totalPosts.toLocaleString() || 0}
|
{boardStatisticsData?.bbsTotalDto?.pstTotCnt?.toLocaleString() ||
|
||||||
|
0}
|
||||||
</div>
|
</div>
|
||||||
<div className="h-16 w-24">
|
<div className="h-16 w-24">
|
||||||
<Line
|
<Line
|
||||||
@@ -210,7 +211,8 @@ function BoardStatisticsPage() {
|
|||||||
<h3 className="text-lg font-medium text-gray-500">답변대기</h3>
|
<h3 className="text-lg font-medium text-gray-500">답변대기</h3>
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="mt-2 text-4xl font-bold">
|
<div className="mt-2 text-4xl font-bold">
|
||||||
{boardStatisticsData?.totalComments.toLocaleString() || 0}
|
{boardStatisticsData?.bbsTotalDto?.pstAnsWaitCnt?.toLocaleString() ||
|
||||||
|
0}
|
||||||
</div>
|
</div>
|
||||||
<div className="h-16 w-24">
|
<div className="h-16 w-24">
|
||||||
<Line
|
<Line
|
||||||
@@ -244,7 +246,7 @@ function BoardStatisticsPage() {
|
|||||||
<h3 className="text-lg font-medium text-gray-500">평균평점</h3>
|
<h3 className="text-lg font-medium text-gray-500">평균평점</h3>
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="mt-2 text-4xl font-bold">
|
<div className="mt-2 text-4xl font-bold">
|
||||||
{boardStatisticsData?.averageRating.toFixed(1) || 0}
|
{boardStatisticsData?.bbsTotalDto?.pstEvlAvg?.toFixed(1) || 0}
|
||||||
</div>
|
</div>
|
||||||
<div className="h-16 w-24">
|
<div className="h-16 w-24">
|
||||||
<Line
|
<Line
|
||||||
@@ -278,7 +280,8 @@ function BoardStatisticsPage() {
|
|||||||
<h3 className="text-lg font-medium text-gray-500">총 조회수</h3>
|
<h3 className="text-lg font-medium text-gray-500">총 조회수</h3>
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="mt-2 text-4xl font-bold">
|
<div className="mt-2 text-4xl font-bold">
|
||||||
{boardStatisticsData?.totalViews.toLocaleString() || 0}
|
{boardStatisticsData?.bbsTotalDto?.pstInqCnt?.toLocaleString() ||
|
||||||
|
0}
|
||||||
</div>
|
</div>
|
||||||
<div className="h-16 w-24">
|
<div className="h-16 w-24">
|
||||||
<Line
|
<Line
|
||||||
@@ -315,7 +318,7 @@ function BoardStatisticsPage() {
|
|||||||
<h3 className="text-2xl font-medium">일별 게시물 현황</h3>
|
<h3 className="text-2xl font-medium">일별 게시물 현황</h3>
|
||||||
</div>
|
</div>
|
||||||
<div className="h-96 p-4">
|
<div className="h-96 p-4">
|
||||||
{boardStatisticsData?.dayList?.length ? (
|
{boardStatisticsData?.bbsDailyList?.length ? (
|
||||||
<Line {...chartData.day(boardStatisticsData)} />
|
<Line {...chartData.day(boardStatisticsData)} />
|
||||||
) : (
|
) : (
|
||||||
<NoData />
|
<NoData />
|
||||||
@@ -329,7 +332,7 @@ function BoardStatisticsPage() {
|
|||||||
<h3 className="text-2xl font-medium">답변상태</h3>
|
<h3 className="text-2xl font-medium">답변상태</h3>
|
||||||
</div>
|
</div>
|
||||||
<div className="h-96 p-4">
|
<div className="h-96 p-4">
|
||||||
{boardStatisticsData?.statusList?.length ? (
|
{boardStatisticsData?.pstAnsList?.length ? (
|
||||||
<Doughnut {...chartData.status(boardStatisticsData)} />
|
<Doughnut {...chartData.status(boardStatisticsData)} />
|
||||||
) : (
|
) : (
|
||||||
<NoData />
|
<NoData />
|
||||||
@@ -342,7 +345,7 @@ function BoardStatisticsPage() {
|
|||||||
<h3 className="text-2xl font-medium">게시판별 분포</h3>
|
<h3 className="text-2xl font-medium">게시판별 분포</h3>
|
||||||
</div>
|
</div>
|
||||||
<div className="h-96 p-4">
|
<div className="h-96 p-4">
|
||||||
{boardStatisticsData?.boardList?.length ? (
|
{boardStatisticsData?.bbsPstCntList?.length ? (
|
||||||
<Bar {...chartData.board(boardStatisticsData)} />
|
<Bar {...chartData.board(boardStatisticsData)} />
|
||||||
) : (
|
) : (
|
||||||
<NoData />
|
<NoData />
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { memo } from "react";
|
import { memo, useEffect } from "react";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
import { zodResolver } from "@hookform/resolvers/zod";
|
import { zodResolver } from "@hookform/resolvers/zod";
|
||||||
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
||||||
@@ -140,6 +140,10 @@ const LwpoCodeManagementDialog = memo(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!open) form.reset();
|
||||||
|
}, [open]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog open={open} onOpenChange={onOpenChange} {...props}>
|
<Dialog open={open} onOpenChange={onOpenChange} {...props}>
|
||||||
<DialogTrigger asChild>{children}</DialogTrigger>
|
<DialogTrigger asChild>{children}</DialogTrigger>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { memo } from "react";
|
import { memo, useEffect } from "react";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
import { zodResolver } from "@hookform/resolvers/zod";
|
import { zodResolver } from "@hookform/resolvers/zod";
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
@@ -96,6 +96,10 @@ const UpCodeManagementDialog = memo(
|
|||||||
if (await confirm(confirmMessage)) callback(data);
|
if (await confirm(confirmMessage)) callback(data);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!open) form.reset();
|
||||||
|
}, [open]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog open={open} onOpenChange={onOpenChange} {...props}>
|
<Dialog open={open} onOpenChange={onOpenChange} {...props}>
|
||||||
<DialogTrigger asChild>{children}</DialogTrigger>
|
<DialogTrigger asChild>{children}</DialogTrigger>
|
||||||
|
|||||||
@@ -1,6 +1,13 @@
|
|||||||
import { client } from "@/shared/api";
|
import { client } from "@/shared/api";
|
||||||
import { ENDPOINT } from "@/shared/config";
|
import { ENDPOINT } from "@/shared/config";
|
||||||
import type { Dashboard, DashboardService } from "../model/dashboard-interface";
|
import type {
|
||||||
|
Dashboard,
|
||||||
|
DashboardService,
|
||||||
|
NoticeUser,
|
||||||
|
Schedule,
|
||||||
|
ScheduleQueryParams,
|
||||||
|
} from "../model/dashboard-interface";
|
||||||
|
import type { PageableList } from "@/shared/model";
|
||||||
|
|
||||||
export class DashboardApiService implements DashboardService {
|
export class DashboardApiService implements DashboardService {
|
||||||
public async getDashboard(): Promise<Dashboard> {
|
public async getDashboard(): Promise<Dashboard> {
|
||||||
@@ -9,6 +16,25 @@ export class DashboardApiService implements DashboardService {
|
|||||||
);
|
);
|
||||||
return response.data;
|
return response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async getNoticeUserList(
|
||||||
|
recvUnqId: string,
|
||||||
|
): Promise<PageableList<NoticeUser>> {
|
||||||
|
const response = await client.get<PageableList<NoticeUser>>(
|
||||||
|
`${ENDPOINT.CMS_SERVICE.NOTICE_USER}/${recvUnqId}/list`,
|
||||||
|
);
|
||||||
|
return response.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async getScheduleList(
|
||||||
|
params?: ScheduleQueryParams,
|
||||||
|
): Promise<Schedule[]> {
|
||||||
|
const response = await client.get<Schedule[]>(
|
||||||
|
ENDPOINT.CMS_SERVICE.SCHEDULES,
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
return response.data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DashboardApi = new DashboardApiService();
|
export const DashboardApi = new DashboardApiService();
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import type { PageableList } from "@/shared/model";
|
||||||
|
|
||||||
export interface SiteStatisticsContent {
|
export interface SiteStatisticsContent {
|
||||||
siteId: string;
|
siteId: string;
|
||||||
siteNm: string;
|
siteNm: string;
|
||||||
@@ -27,6 +29,42 @@ export interface Dashboard {
|
|||||||
menuAccessList: MenuStatisticsContent[];
|
menuAccessList: MenuStatisticsContent[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface NoticeUser {
|
||||||
|
notiId: number;
|
||||||
|
recvUnqId: string;
|
||||||
|
senderUnqId: string;
|
||||||
|
notiType: string;
|
||||||
|
notiTtl: string;
|
||||||
|
notReadYn: string;
|
||||||
|
regDt: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Schedule {
|
||||||
|
schdlBgngDt: string;
|
||||||
|
schdlEndDt: string;
|
||||||
|
actualDate: string;
|
||||||
|
schdlSn: number;
|
||||||
|
siteId: string;
|
||||||
|
schdlTtl: string;
|
||||||
|
schdlSeCd: string;
|
||||||
|
schdlCn: string;
|
||||||
|
reptYn: string;
|
||||||
|
commSchdlYn: string;
|
||||||
|
atflCd: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ScheduleQueryParams {
|
||||||
|
siteId?: string;
|
||||||
|
schdlTtl?: string;
|
||||||
|
schdlSeCd?: string;
|
||||||
|
schdlBgngYmd?: string;
|
||||||
|
schdlEndYmd?: string;
|
||||||
|
reptYn?: string;
|
||||||
|
commSchdlYn?: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface DashboardService {
|
export interface DashboardService {
|
||||||
getDashboard(): Promise<Dashboard>;
|
getDashboard(): Promise<Dashboard>;
|
||||||
|
getNoticeUserList(recvUnqId: string): Promise<PageableList<NoticeUser>>;
|
||||||
|
getScheduleList(params?: ScheduleQueryParams): Promise<Schedule[]>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
|
import dayjs from "dayjs";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
import { getCoreRowModel } from "@tanstack/react-table";
|
import { getCoreRowModel } from "@tanstack/react-table";
|
||||||
@@ -17,8 +18,8 @@ import {
|
|||||||
} from "chart.js";
|
} from "chart.js";
|
||||||
import { Bar, Line } from "react-chartjs-2";
|
import { Bar, Line } from "react-chartjs-2";
|
||||||
import { PostApi, type RecentPost } from "@/entities/post";
|
import { PostApi, type RecentPost } from "@/entities/post";
|
||||||
import { ENDPOINT } from "@/shared/config";
|
import { AUTH_USER_ID, ENDPOINT, SITE_ID } from "@/shared/config";
|
||||||
import { useDataTable } from "@/shared/lib";
|
import { getCookie, useDataTable } from "@/shared/lib";
|
||||||
import { DashboardApi } from "../api/dashboard-service";
|
import { DashboardApi } from "../api/dashboard-service";
|
||||||
import { chartData } from "../model/chart-data";
|
import { chartData } from "../model/chart-data";
|
||||||
import {
|
import {
|
||||||
@@ -39,12 +40,44 @@ ChartJS.register(
|
|||||||
);
|
);
|
||||||
|
|
||||||
function DashboardPage() {
|
function DashboardPage() {
|
||||||
|
const userId = getCookie(AUTH_USER_ID) ?? "";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const { data } = useQuery({
|
const { data } = useQuery({
|
||||||
queryKey: [ENDPOINT.CMS_SERVICE.DASHBOARD],
|
queryKey: [ENDPOINT.CMS_SERVICE.DASHBOARD],
|
||||||
queryFn: () => DashboardApi.getDashboard(),
|
queryFn: () => DashboardApi.getDashboard(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const { data: noticeUserList } = useQuery({
|
||||||
|
queryKey: [ENDPOINT.CMS_SERVICE.NOTICE_USER],
|
||||||
|
queryFn: () => DashboardApi.getNoticeUserList(userId),
|
||||||
|
enabled: !!userId,
|
||||||
|
select: (data) => {
|
||||||
|
// 오늘 ~ 한 달 전 사이의 일정
|
||||||
|
const today = dayjs().endOf("day");
|
||||||
|
const monthAgo = dayjs().subtract(1, "month").startOf("day");
|
||||||
|
return data.content?.filter((item) => {
|
||||||
|
const regDt = dayjs(item.regDt);
|
||||||
|
return (
|
||||||
|
(regDt.isSame(monthAgo) || regDt.isAfter(monthAgo)) &&
|
||||||
|
(regDt.isSame(today) || regDt.isBefore(today))
|
||||||
|
);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const { data: scheduleList } = useQuery({
|
||||||
|
queryKey: [ENDPOINT.CMS_SERVICE.SCHEDULES],
|
||||||
|
queryFn: () =>
|
||||||
|
DashboardApi.getScheduleList({
|
||||||
|
siteId: SITE_ID,
|
||||||
|
schdlBgngYmd: dayjs().format("YYYY-MM-DD"),
|
||||||
|
schdlEndYmd: dayjs().add(1, "month").format("YYYY-MM-DD"),
|
||||||
|
commSchdlYn: "Y",
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
|
||||||
const noticePostQuery = useQuery({
|
const noticePostQuery = useQuery({
|
||||||
queryKey: [ENDPOINT.BOARD_SERVICE.POSTS],
|
queryKey: [ENDPOINT.BOARD_SERVICE.POSTS],
|
||||||
queryFn: () =>
|
queryFn: () =>
|
||||||
@@ -323,22 +356,15 @@ function DashboardPage() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="p-4">
|
<div className="p-4">
|
||||||
<div className="space-y-4 text-foreground">
|
<div className="space-y-4 text-foreground">
|
||||||
<div className="flex items-center justify-between border-b border-border pb-4">
|
{noticeUserList?.map((item) => (
|
||||||
<span className="font-medium">신규 사용자 가입</span>
|
<div
|
||||||
<span>{(1).toLocaleString()}분 전</span>
|
key={item.notiId}
|
||||||
</div>
|
className="flex items-center justify-between border-b border-border pb-4"
|
||||||
<div className="flex items-center justify-between border-b border-border pb-4">
|
>
|
||||||
<span className="font-medium">메뉴 수정 요청</span>
|
<span className="font-medium">{item.notiTtl}</span>
|
||||||
<span>{(5).toLocaleString()}분 전</span>
|
<span>{dayjs(item.regDt).fromNow()}</span>
|
||||||
</div>
|
|
||||||
<div className="flex items-center justify-between border-b border-border pb-4">
|
|
||||||
<span className="font-medium">게시물 신고</span>
|
|
||||||
<span>{(10).toLocaleString()}분 전</span>
|
|
||||||
</div>
|
|
||||||
<div className="flex items-center justify-between">
|
|
||||||
<span className="font-medium">컨텐츠 승인 요청</span>
|
|
||||||
<span>{(15).toLocaleString()}분 전</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -349,24 +375,44 @@ function DashboardPage() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="p-4">
|
<div className="p-4">
|
||||||
<div className="space-y-4 text-foreground">
|
<div className="space-y-4 text-foreground">
|
||||||
<div className="flex items-center justify-between border-b border-border pb-4">
|
{scheduleList && scheduleList.length > 0 ? (
|
||||||
|
scheduleList.map((schedule, index) => {
|
||||||
|
const today = dayjs();
|
||||||
|
const scheduleDate = dayjs(schedule.actualDate);
|
||||||
|
const daysUntil = scheduleDate.diff(today, "day");
|
||||||
|
|
||||||
|
let timeText = "";
|
||||||
|
if (daysUntil === 0) {
|
||||||
|
timeText = "오늘";
|
||||||
|
} else if (daysUntil === 1) {
|
||||||
|
timeText = "내일";
|
||||||
|
} else if (daysUntil > 1) {
|
||||||
|
timeText = `${daysUntil}일 후`;
|
||||||
|
} else {
|
||||||
|
timeText = scheduleDate.format("YYYY-MM-DD");
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
key={schedule.schdlSn}
|
||||||
|
className={`flex items-center justify-between ${
|
||||||
|
index < scheduleList.length - 1
|
||||||
|
? "border-b border-border pb-4"
|
||||||
|
: ""
|
||||||
|
}`}
|
||||||
|
>
|
||||||
<span className="font-medium">
|
<span className="font-medium">
|
||||||
{(3).toLocaleString()}월 정기 시스템 점검
|
{schedule.schdlTtl}
|
||||||
</span>
|
</span>
|
||||||
<span>내일</span>
|
<span>{timeText}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center justify-between border-b border-border pb-4">
|
);
|
||||||
<span className="font-medium">서버 업데이트 예정</span>
|
})
|
||||||
<span>{(3).toLocaleString()}일 후</span>
|
) : (
|
||||||
</div>
|
<div className="text-center text-muted-foreground">
|
||||||
<div className="flex items-center justify-between border-b border-border pb-4">
|
예정된 일정이 없습니다.
|
||||||
<span className="font-medium">백업 스케줄</span>
|
|
||||||
<span>{(5).toLocaleString()}일 후</span>
|
|
||||||
</div>
|
|
||||||
<div className="flex items-center justify-between">
|
|
||||||
<span className="font-medium">정기 보안 점검</span>
|
|
||||||
<span>{(7).toLocaleString()}일 후</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useState, useRef } from "react";
|
import { useState, useRef, useEffect } from "react";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
import { zodResolver } from "@hookform/resolvers/zod";
|
import { zodResolver } from "@hookform/resolvers/zod";
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
@@ -49,23 +49,12 @@ function MenuAuthorityDialog({ groupId }: MenuAuthorityDialogProps) {
|
|||||||
siteId: "",
|
siteId: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleReset = () => {
|
|
||||||
if (inputRef.current) inputRef.current.value = "";
|
|
||||||
setKeywordType("");
|
|
||||||
setSiteId("");
|
|
||||||
setSearchParams({
|
|
||||||
keyword: "",
|
|
||||||
keywordType: "",
|
|
||||||
siteId: "",
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
const query = useQuery({
|
const query = useQuery({
|
||||||
queryKey: [ENDPOINT.CMS_SERVICE.MENU_AUTHRTS, groupId, searchParams],
|
queryKey: [ENDPOINT.CMS_SERVICE.MENU_AUTHRTS, groupId, searchParams],
|
||||||
queryFn: () => MenuAuthorityApi.getGroupMenuAuthorityList({
|
queryFn: () =>
|
||||||
|
MenuAuthorityApi.getGroupMenuAuthorityList({
|
||||||
groupId,
|
groupId,
|
||||||
...searchParams
|
...searchParams,
|
||||||
}),
|
}),
|
||||||
enabled: open && !!groupId,
|
enabled: open && !!groupId,
|
||||||
});
|
});
|
||||||
@@ -117,6 +106,21 @@ function MenuAuthorityDialog({ groupId }: MenuAuthorityDialogProps) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleReset = () => {
|
||||||
|
if (inputRef.current) inputRef.current.value = "";
|
||||||
|
setSiteId("");
|
||||||
|
setKeywordType("");
|
||||||
|
setSearchParams({
|
||||||
|
keyword: "",
|
||||||
|
keywordType: "",
|
||||||
|
siteId: "",
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!open) handleReset();
|
||||||
|
}, [open]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog open={open} onOpenChange={setOpen}>
|
<Dialog open={open} onOpenChange={setOpen}>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
|
|||||||
@@ -39,10 +39,10 @@ function LoginlogPage() {
|
|||||||
const [presetDateRange, setPresetDateRange] = useState("");
|
const [presetDateRange, setPresetDateRange] = useState("");
|
||||||
const [dateRange, setDateRange] = useState<DateRange>(defaultDateRange);
|
const [dateRange, setDateRange] = useState<DateRange>(defaultDateRange);
|
||||||
const [userId, setUserId] = useState("");
|
const [userId, setUserId] = useState("");
|
||||||
const [errOcrnYn, setErrOcrnYn] = useState("N");
|
const [errOcrnYn, setErrOcrnYn] = useState("ALL");
|
||||||
const [searchParams, setSearchParams] = useState<LoginlogParams>({
|
const [searchParams, setSearchParams] = useState<LoginlogParams>({
|
||||||
userId: "",
|
userId: "",
|
||||||
errOcrnYn: "N",
|
errOcrnYn: "",
|
||||||
searchDateFrom: dayjs().subtract(7, "day").format("YYYY-MM-DD"),
|
searchDateFrom: dayjs().subtract(7, "day").format("YYYY-MM-DD"),
|
||||||
searchDateTo: dayjs().format("YYYY-MM-DD"),
|
searchDateTo: dayjs().format("YYYY-MM-DD"),
|
||||||
sort: "lgnDt,desc",
|
sort: "lgnDt,desc",
|
||||||
@@ -87,7 +87,7 @@ function LoginlogPage() {
|
|||||||
setSearchParams({
|
setSearchParams({
|
||||||
...searchParams,
|
...searchParams,
|
||||||
userId,
|
userId,
|
||||||
errOcrnYn,
|
errOcrnYn: errOcrnYn === "ALL" ? "" : errOcrnYn,
|
||||||
searchDateFrom: dateRange.from
|
searchDateFrom: dateRange.from
|
||||||
? dayjs(dateRange.from).format("YYYY-MM-DD")
|
? dayjs(dateRange.from).format("YYYY-MM-DD")
|
||||||
: "",
|
: "",
|
||||||
@@ -102,12 +102,12 @@ function LoginlogPage() {
|
|||||||
|
|
||||||
const handleReset = () => {
|
const handleReset = () => {
|
||||||
setUserId("");
|
setUserId("");
|
||||||
setErrOcrnYn("N");
|
setErrOcrnYn("ALL");
|
||||||
setDateRange(defaultDateRange);
|
setDateRange(defaultDateRange);
|
||||||
setSearchParams({
|
setSearchParams({
|
||||||
...searchParams,
|
...searchParams,
|
||||||
userId: "",
|
userId: "",
|
||||||
errOcrnYn: "N",
|
errOcrnYn: "",
|
||||||
searchDateFrom: dayjs().subtract(7, "day").format("YYYY-MM-DD"),
|
searchDateFrom: dayjs().subtract(7, "day").format("YYYY-MM-DD"),
|
||||||
searchDateTo: dayjs().format("YYYY-MM-DD"),
|
searchDateTo: dayjs().format("YYYY-MM-DD"),
|
||||||
});
|
});
|
||||||
@@ -180,6 +180,7 @@ function LoginlogPage() {
|
|||||||
<SelectValue placeholder="선택" />
|
<SelectValue placeholder="선택" />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
|
<SelectItem value="ALL">전체</SelectItem>
|
||||||
<SelectItem value="N">정상</SelectItem>
|
<SelectItem value="N">정상</SelectItem>
|
||||||
<SelectItem value="Y">오류</SelectItem>
|
<SelectItem value="Y">오류</SelectItem>
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useState, memo } from "react";
|
import { useState, memo, useEffect } from "react";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
import { zodResolver } from "@hookform/resolvers/zod";
|
import { zodResolver } from "@hookform/resolvers/zod";
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
@@ -90,6 +90,10 @@ const ManagementAuthorityDialog = memo(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!open) form.reset();
|
||||||
|
}, [open]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog open={open} onOpenChange={setOpen}>
|
<Dialog open={open} onOpenChange={setOpen}>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useState, useRef } from "react";
|
import { useState, useRef, useEffect } from "react";
|
||||||
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
||||||
import { getCoreRowModel, type ColumnDef } from "@tanstack/react-table";
|
import { getCoreRowModel, type ColumnDef } from "@tanstack/react-table";
|
||||||
import {
|
import {
|
||||||
@@ -113,6 +113,10 @@ function MappingRoleDialog({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!open) handleReset();
|
||||||
|
}, [open]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog open={open} onOpenChange={onOpenChange} {...props}>
|
<Dialog open={open} onOpenChange={onOpenChange} {...props}>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ export const ENDPOINT = {
|
|||||||
APILOG: "/cms-service/api/v1/api-logs",
|
APILOG: "/cms-service/api/v1/api-logs",
|
||||||
SITE_AUTHORITY: "/cms-service/api/v1/site-authrt",
|
SITE_AUTHORITY: "/cms-service/api/v1/site-authrt",
|
||||||
CONNECTION_LOG: "/cms-service/api/v1/cntnlog",
|
CONNECTION_LOG: "/cms-service/api/v1/cntnlog",
|
||||||
|
NOTICE_USER: "/cms-service/api/v1/noti/user",
|
||||||
},
|
},
|
||||||
BOARD_SERVICE: {
|
BOARD_SERVICE: {
|
||||||
BBS: "/board-service/api/v1/bbs",
|
BBS: "/board-service/api/v1/bbs",
|
||||||
@@ -63,6 +64,7 @@ export const ENDPOINT = {
|
|||||||
POSTS: "/board-service/api/v1/posts",
|
POSTS: "/board-service/api/v1/posts",
|
||||||
POSTS_COMMENTS: "/board-service/api/v1/posts-cmnts",
|
POSTS_COMMENTS: "/board-service/api/v1/posts-cmnts",
|
||||||
POST_EVALUATION: "/board-service/api/v1/pstEvl",
|
POST_EVALUATION: "/board-service/api/v1/pstEvl",
|
||||||
|
STATISTICS: "/board-service/api/v1/stat/bbs",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ export const PORT = process.env.NEXT_PUBLIC_PORT || "3000";
|
|||||||
export const PROXY_HOST =
|
export const PROXY_HOST =
|
||||||
process.env.NEXT_PUBLIC_PROXY_HOST || `http://localhost:${PORT}`;
|
process.env.NEXT_PUBLIC_PROXY_HOST || `http://localhost:${PORT}`;
|
||||||
export const SERVER_API_URL = process.env.NEXT_PUBLIC_SERVER_API_URL;
|
export const SERVER_API_URL = process.env.NEXT_PUBLIC_SERVER_API_URL;
|
||||||
|
export const AUTH_LOGIN_REDIRECT_URL =
|
||||||
|
process.env.NEXT_PUBLIC_AUTH_LOGIN_REDIRECT_URL || "/auth/login";
|
||||||
export const SITE_ID = process.env.NEXT_PUBLIC_SITE_ID || "CS";
|
export const SITE_ID = process.env.NEXT_PUBLIC_SITE_ID || "CS";
|
||||||
export const CLAIM_NAME = process.env.NEXT_PUBLIC_CLAIM_NAME || "Authorization";
|
export const CLAIM_NAME = process.env.NEXT_PUBLIC_CLAIM_NAME || "Authorization";
|
||||||
export const ACCESS_TOKEN =
|
export const ACCESS_TOKEN =
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
"@types/node": "^22.17.0",
|
"@types/node": "^22.17.0",
|
||||||
"@types/webpack": "^5.28.5",
|
"@types/webpack": "^5.28.5",
|
||||||
"eslint": "^9.0.0",
|
"eslint": "^9.0.0",
|
||||||
"eslint-config-next": "15.4.0",
|
"eslint-config-next": "15.3.8",
|
||||||
"postcss": "^8.4.49",
|
"postcss": "^8.4.49",
|
||||||
"prettier": "^3.4.2",
|
"prettier": "^3.4.2",
|
||||||
"prettier-plugin-tailwindcss": "^0.6.11",
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
||||||
|
|||||||
@@ -1,20 +1,24 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { client } from "@/shared/api";
|
import { client } from "@/shared/api";
|
||||||
import type { IUserInfo } from "@/shared/store";
|
import type { IUserInfo } from "@/shared/store";
|
||||||
import { getCookie, useUserStore } from "@/shared/lib";
|
import { getCookie, useUserStore } from "@/shared/lib";
|
||||||
import { ENDPOINT, AUTH_USER_ID } from "@/shared/config";
|
import { isAtLoginRedirectUrl } from "@common/network";
|
||||||
import { LoginApi } from "../api/login-service";
|
import {
|
||||||
|
ENDPOINT,
|
||||||
const CLAIM_NAME = process.env.NEXT_PUBLIC_CLAIM_NAME || "Authorization";
|
AUTH_USER_ID,
|
||||||
|
AUTH_LOGIN_REDIRECT_URL,
|
||||||
|
} from "@/shared/config";
|
||||||
|
|
||||||
const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
||||||
const router = useRouter();
|
|
||||||
const { userInfo, setUserInfo } = useUserStore((state) => state);
|
const { userInfo, setUserInfo } = useUserStore((state) => state);
|
||||||
|
|
||||||
async function authCheck() {
|
async function authCheck() {
|
||||||
|
if (isAtLoginRedirectUrl(AUTH_LOGIN_REDIRECT_URL)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const userId = getCookie(AUTH_USER_ID);
|
const userId = getCookie(AUTH_USER_ID);
|
||||||
if (!userId) {
|
if (!userId) {
|
||||||
throw new Error("Missing required authentication tokens");
|
throw new Error("Missing required authentication tokens");
|
||||||
@@ -32,14 +36,9 @@ const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
|||||||
await authCheck();
|
await authCheck();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|
||||||
try {
|
|
||||||
await LoginApi.silentRefresh();
|
|
||||||
await authCheck();
|
|
||||||
} catch (refreshError) {
|
|
||||||
console.error("Token refresh failed:", refreshError);
|
|
||||||
setUserInfo(null);
|
setUserInfo(null);
|
||||||
router.push("/auth/login");
|
if (!isAtLoginRedirectUrl(AUTH_LOGIN_REDIRECT_URL)) {
|
||||||
|
window.location.assign(AUTH_LOGIN_REDIRECT_URL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -3,10 +3,14 @@ export const PROXY_HOST =
|
|||||||
process.env.NEXT_PUBLIC_PROXY_HOST || `http://localhost:${PORT}`;
|
process.env.NEXT_PUBLIC_PROXY_HOST || `http://localhost:${PORT}`;
|
||||||
|
|
||||||
export const SERVER_API_URL = process.env.NEXT_PUBLIC_SERVER_API_URL;
|
export const SERVER_API_URL = process.env.NEXT_PUBLIC_SERVER_API_URL;
|
||||||
export const NEXT_PUBLIC_DC_SERVICE_API_URL = process.env.NEXT_PUBLIC_DC_SERVICE_API_URL || `http://localhost:${PORT}`;
|
export const NEXT_PUBLIC_DC_SERVICE_API_URL =
|
||||||
|
process.env.NEXT_PUBLIC_DC_SERVICE_API_URL || `http://localhost:${PORT}`;
|
||||||
|
export const AUTH_LOGIN_REDIRECT_URL =
|
||||||
|
process.env.NEXT_PUBLIC_AUTH_LOGIN_REDIRECT_URL || "/auth/login";
|
||||||
|
|
||||||
// Flask API URL
|
// Flask API URL
|
||||||
export const FLASK_API_URL = process.env.NEXT_PUBLIC_FLASK_API_URL || "http://localhost:5000";
|
export const FLASK_API_URL =
|
||||||
|
process.env.NEXT_PUBLIC_FLASK_API_URL || "http://localhost:5000";
|
||||||
|
|
||||||
//export const SITE_ID = process.env.NEXT_PUBLIC_SITE_ID || "DC";
|
//export const SITE_ID = process.env.NEXT_PUBLIC_SITE_ID || "DC";
|
||||||
export const SITE_ID = "DC";
|
export const SITE_ID = "DC";
|
||||||
|
|||||||
+7
-8
@@ -4,23 +4,22 @@ NEXT_PUBLIC_AUTH_USER_ID = token-id
|
|||||||
NEXT_PUBLIC_ACCESS_TOKEN = access-token
|
NEXT_PUBLIC_ACCESS_TOKEN = access-token
|
||||||
NEXT_PUBLIC_REFRESH_TOKEN = refresh-token
|
NEXT_PUBLIC_REFRESH_TOKEN = refresh-token
|
||||||
NEXT_PUBLIC_PORT = 3005
|
NEXT_PUBLIC_PORT = 3005
|
||||||
#NEXT_PUBLIC_PROXY_HOST = http://con.mind-one.co.kr:11035
|
|
||||||
NEXT_PUBLIC_PROXY_HOST = http://localhost:3005
|
NEXT_PUBLIC_PROXY_HOST = http://localhost:3005
|
||||||
NEXT_PUBLIC_DM_SERVER_API_URL = http://con.mind-one.co.kr:11083/reuse-service/api/v1
|
|
||||||
NEXT_PUBLIC_SERVER_API_URL = http://dev.onasys.co.kr:8000
|
|
||||||
NEXT_PUBLIC_FO_SERVER_API_URL = http://con.mind-one.co.kr:11083/operation-service/api/v1
|
|
||||||
# NEXT_PUBLIC_FO_SERVER_API_URL = http://192.168.1.222:8883/operation-service/api/v1
|
|
||||||
NEXT_PUBLIC_CS_SERVER_API_URL = http://dev.onasys.co.kr:8000
|
NEXT_PUBLIC_CS_SERVER_API_URL = http://dev.onasys.co.kr:8000
|
||||||
|
NEXT_PUBLIC_SERVER_API_URL = http://dev.onasys.co.kr:8000
|
||||||
|
NEXT_PUBLIC_DM_SERVER_API_URL = http://con.mind-one.co.kr:11083/reuse-service/api/v1
|
||||||
|
# NEXT_PUBLIC_FO_SERVER_API_URL = http://192.168.1.222:8883/operation-service/api/v1
|
||||||
|
NEXT_PUBLIC_FO_SERVER_API_URL = http://con.mind-one.co.kr:11083/operation-service/api/v1
|
||||||
|
NEXT_PUBLIC_WR_SERVER_API_URL = http://con.mind-one.co.kr:11083/reuse-service/api/v1
|
||||||
NEXT_PUBLIC_GEOSERVER_URL = http://rsone.iptime.org:10010/geoserver
|
NEXT_PUBLIC_GEOSERVER_URL = http://rsone.iptime.org:10010/geoserver
|
||||||
NEXT_PUBLIC_LX_GEOSERVER_URL = http://con.mind-one.co.kr:11306/geoserver
|
NEXT_PUBLIC_LX_GEOSERVER_URL = http://con.mind-one.co.kr:11306/geoserver
|
||||||
NEXT_PUBLIC_CS_TUS_UPLOAD = /attach-service/api/v1/tus/upload
|
NEXT_PUBLIC_CS_TUS_UPLOAD = /attach-service/api/v1/tus/upload
|
||||||
NEXT_PUBLIC_WR_SERVER_API_URL = http://con.mind-one.co.kr:11083/reuse-service/api/v1
|
|
||||||
NEXT_PUBLIC_NGII_URL = https://map.ngii.go.kr
|
NEXT_PUBLIC_NGII_URL = https://map.ngii.go.kr
|
||||||
NEXT_PUBLIC_NGII_PARAM = 04trYP9_xwLAfALjwZ-B8g&service=WMTS&request=GetTile&version=1.0.0&format=image/png&layer=korean_map&style=korean&tilematrixset=korean&tilematrix={z}&tilecol={x}&tilerow={y}
|
NEXT_PUBLIC_NGII_PARAM = 04trYP9_xwLAfALjwZ-B8g&service=WMTS&request=GetTile&version=1.0.0&format=image/png&layer=korean_map&style=korean&tilematrixset=korean&tilematrix={z}&tilecol={x}&tilerow={y}
|
||||||
NEXT_PUBLIC_SEWERAGE_API_URL=http://con.mind-one.co.kr:11083/sewerage-service # 개발 서버 API
|
NEXT_PUBLIC_GATEWAY_URL=http://con.mind-one.co.kr:11083 # 개발 서버 API
|
||||||
#NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.128:8883/sewerage-service/api # 최용성
|
#NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.128:8883/sewerage-service/api # 최용성
|
||||||
#NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.66:8883/sewerage-service/api # 박이정
|
#NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.66:8883/sewerage-service/api # 박이정
|
||||||
NEXT_PUBLIC_CM_LOGIN_PAGE_URL = http://dev.onasys.co.kr:3000/auth/login
|
NEXT_PUBLIC_CM_LOGIN_PAGE_URL = /
|
||||||
|
|
||||||
|
|
||||||
NEXT_PUBLIC_FINDADRESS_URL=https://business.juso.go.kr/addrlink/addrLinkApi.do
|
NEXT_PUBLIC_FINDADRESS_URL=https://business.juso.go.kr/addrlink/addrLinkApi.do
|
||||||
|
|||||||
@@ -14,9 +14,10 @@ NEXT_PUBLIC_WR_SERVER_API_URL = http://con.mind-one.co.kr:11083/reuse-service/ap
|
|||||||
NEXT_PUBLIC_NGII_URL = https://map.ngii.go.kr
|
NEXT_PUBLIC_NGII_URL = https://map.ngii.go.kr
|
||||||
NEXT_PUBLIC_NGII_PARAM = 04trYP9_xwLAfALjwZ-B8g&service=WMTS&request=GetTile&version=1.0.0&format=image/png&layer=korean_map&style=korean&tilematrixset=korean&tilematrix={z}&tilecol={x}&tilerow={y}
|
NEXT_PUBLIC_NGII_PARAM = 04trYP9_xwLAfALjwZ-B8g&service=WMTS&request=GetTile&version=1.0.0&format=image/png&layer=korean_map&style=korean&tilematrixset=korean&tilematrix={z}&tilecol={x}&tilerow={y}
|
||||||
NEXT_PUBLIC_SEWERAGE_API_URL=http://con.mind-one.co.kr:11083/sewerage-service # 개발 서버 API
|
NEXT_PUBLIC_SEWERAGE_API_URL=http://con.mind-one.co.kr:11083/sewerage-service # 개발 서버 API
|
||||||
|
NEXT_PUBLIC_GATEWAY_URL=http://con.mind-one.co.kr:11083 # 개발 서버 API
|
||||||
# NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.128:8883/sewerage-service/api # 최용성
|
# NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.128:8883/sewerage-service/api # 최용성
|
||||||
#NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.66:8883/sewerage-service/api # 박이정
|
#NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.66:8883/sewerage-service/api # 박이정
|
||||||
NEXT_PUBLIC_CM_LOGIN_PAGE_URL = http://dev.onasys.co.kr:3000/auth/login
|
NEXT_PUBLIC_CM_LOGIN_PAGE_URL = /
|
||||||
|
|
||||||
|
|
||||||
NEXT_PUBLIC_FINDADRESS_URL=https://business.juso.go.kr/addrlink/addrLinkApi.do
|
NEXT_PUBLIC_FINDADRESS_URL=https://business.juso.go.kr/addrlink/addrLinkApi.do
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ NEXT_PUBLIC_GEOSERVER_URL = http://172.29.143.87:8080/geoserver
|
|||||||
NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl
|
NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl
|
||||||
NEXT_PUBLIC_WR_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/reuse-service/api/v1
|
NEXT_PUBLIC_WR_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/reuse-service/api/v1
|
||||||
NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service
|
NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service
|
||||||
NEXT_PUBLIC_NGII_URL = http://172.29.143.87
|
NEXT_PUBLIC_GATEWAY_URL = http://apigateway.iipbs-was.svc.cluster.local:8000
|
||||||
|
NEXT_PUBLIC_NGII_URL = http://172.29.143.87/poiact
|
||||||
NEXT_PUBLIC_NGII_PARAM = BDE2BEF39DAFEC293AB6730150F222AC&service=WMTS&request=GetTile&version=1.0.0&format=image/png&layer=korean_map&style=korean&tilematrixset=korean&tilematrix={z}&tilecol={y}&tilerow={x}
|
NEXT_PUBLIC_NGII_PARAM = BDE2BEF39DAFEC293AB6730150F222AC&service=WMTS&request=GetTile&version=1.0.0&format=image/png&layer=korean_map&style=korean&tilematrixset=korean&tilematrix={z}&tilecol={y}&tilerow={x}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
## Project
|
||||||
|
This repository contains a Next.js web application.
|
||||||
|
|
||||||
|
Main technologies:
|
||||||
|
- Next.js
|
||||||
|
- TypeScript
|
||||||
|
- pnpm workspace
|
||||||
|
- turborepo
|
||||||
|
|
||||||
|
이 저장소는 pnpm workspace + Turborepo 기반 monorepo이다.
|
||||||
|
|
||||||
|
- 워크스페이스 범위는 `apps/*`, `apps/common/*`, `packages/*`, `packages/common/*`
|
||||||
|
- 루트 스크립트는 `turbo run build`, `turbo run dev` 를 사용한다
|
||||||
|
- `build` 작업은 의존 패키지의 `build` 를 먼저 수행한다 (`dependsOn: ["^build"]`)
|
||||||
|
- `dev` 는 캐시하지 않는 지속 실행 작업이다
|
||||||
|
- 변경 범위만 선택 실행할 수 있으므로, 전체 빌드보다 `--filter` 사용을 우선한다
|
||||||
|
|
||||||
|
## Encoding
|
||||||
|
- UTF-8
|
||||||
|
- 한글이 깨지지 않도록 주의할 것
|
||||||
|
|
||||||
|
## 주석 comment
|
||||||
|
- 한글 주석을 삭제하지 말 것
|
||||||
|
|
||||||
|
## Monorepo structure
|
||||||
|
apps/
|
||||||
|
_template
|
||||||
|
as
|
||||||
|
cm
|
||||||
|
cs
|
||||||
|
dc
|
||||||
|
dm
|
||||||
|
dm_new
|
||||||
|
fo
|
||||||
|
sn
|
||||||
|
st
|
||||||
|
wr
|
||||||
|
|
||||||
@@ -87,9 +87,9 @@ export default function ModalSimilarPage({ sply = 0, usageCd = '', money = 0 }:
|
|||||||
}, [getSimilarCaseList, money, searchUseType, sply, usageCd]);
|
}, [getSimilarCaseList, money, searchUseType, sply, usageCd]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="align-top w-[1360px] overflow-x-auto">
|
<div className="align-top w-[1360px] h-full">
|
||||||
<Title title="유사사례 조회" />
|
<Title title="유사사례 조회" />
|
||||||
<div className="overflow-x-auto h-[450px] w-full mt-8" tabIndex={0} aria-label="유사사례 테이블 영역">
|
<div className="overflow-x-auto h-[480px] w-full mt-8" tabIndex={0} aria-label="유사사례 테이블 영역">
|
||||||
<div className="w-[150%]">
|
<div className="w-[150%]">
|
||||||
<div className="card-header justify-self-start">
|
<div className="card-header justify-self-start">
|
||||||
<h3 className="text-2xl font-medium text-label">유사사례</h3>
|
<h3 className="text-2xl font-medium text-label">유사사례</h3>
|
||||||
@@ -148,7 +148,7 @@ export default function ModalSimilarPage({ sply = 0, usageCd = '', money = 0 }:
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="overflow-x-auto h-[270px] w-full mt-8">
|
<div className="overflow-x-auto h-[270px] w-full mt-8 overflow-y-hidden">
|
||||||
<div className="w-[130%]">
|
<div className="w-[130%]">
|
||||||
<UiTable
|
<UiTable
|
||||||
headName={"사업비 상세정보"}
|
headName={"사업비 상세정보"}
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 수요정보등록 화면
|
||||||
|
*
|
||||||
|
* 🔗 사용 API
|
||||||
|
* - 수요정보등록: POST /reuseFc/request/demandInfo
|
||||||
|
*/
|
||||||
import { useDmStore } from "@/app/store";
|
import { useDmStore } from "@/app/store";
|
||||||
import { sdmInfoFormSchema, type DemandCompBizType, type SdmInfoFormData } from "@/app/store/sdmMng";
|
import { sdmInfoFormSchema, type DemandCompBizType, type SdmInfoFormData } from "@/app/store/sdmMng";
|
||||||
import { SdmInfoRegForm } from "@/components/ui/sdmInfoInsertForm/component";
|
import { SdmInfoRegForm } from "@/components/ui/sdmInfoInsertForm/component";
|
||||||
@@ -121,7 +127,7 @@ function SdmInfoInsertContent() {
|
|||||||
const userData = JSON.parse(user);
|
const userData = JSON.parse(user);
|
||||||
if (userData.dmdCoNm) {
|
if (userData.dmdCoNm) {
|
||||||
setFacilityName(userData.dmdCoNm);
|
setFacilityName(userData.dmdCoNm);
|
||||||
form.setValue("sdmNm", userData.dmdCoNm);
|
form.setValue("sdmNm", userData.dmdCoNm); // 수요처명(회사명)
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error parsing user data:", error);
|
console.error("Error parsing user data:", error);
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
"use client";
|
||||||
|
/**
|
||||||
|
* 수요처 로그아웃 화면
|
||||||
|
*
|
||||||
|
* 🔗 사용 API
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
import { useDmStore } from "@/app/store";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import { useEffect } from "react";
|
||||||
|
|
||||||
|
export default function SdmLogout() {
|
||||||
|
const router = useRouter();
|
||||||
|
const { actionLogout } = useDmStore((state) => state);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
actionLogout();
|
||||||
|
router.push("/pages/sdmMng/sdmInfoInsert");
|
||||||
|
}, [actionLogout, router]);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
@@ -235,6 +235,7 @@ const Map = () => {
|
|||||||
<>
|
<>
|
||||||
<div className="bg-container">
|
<div className="bg-container">
|
||||||
<Gis
|
<Gis
|
||||||
|
showZoomLevel={true}
|
||||||
height='h-screen'
|
height='h-screen'
|
||||||
treeData={treeData}
|
treeData={treeData}
|
||||||
isSearch={false}
|
isSearch={false}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
|
import { setCookie } from "../src/shared/lib";
|
||||||
|
|
||||||
|
setCookie("site-id-key", process.env.NEXT_PUBLIC_SITE_ID || "DM");
|
||||||
|
|
||||||
export default function RootLayout({
|
export default function RootLayout({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ export type DemandMatchings = {
|
|||||||
|
|
||||||
// 유사사례
|
// 유사사례
|
||||||
export type SimilarCaseType = {
|
export type SimilarCaseType = {
|
||||||
ruseBizNm : string | '';
|
ruseBizNm: string | ''; // 사업명
|
||||||
bizBgngDate: string | '';
|
bizBgngDate: string | '';
|
||||||
bizEndDate: string | '';
|
bizEndDate: string | '';
|
||||||
splyFcltKnd: string | '';
|
splyFcltKnd: string | '';
|
||||||
@@ -535,7 +535,7 @@ const postSdmLoginData = async (data: DemandCompType) => {
|
|||||||
sessionStorage.setItem("user", JSON.stringify(loginData));
|
sessionStorage.setItem("user", JSON.stringify(loginData));
|
||||||
loginSuccess = true;
|
loginSuccess = true;
|
||||||
} else if (status === 401) {
|
} else if (status === 401) {
|
||||||
alert("패스워드가 틀렸습니다.");
|
alert("패스워드가 일치하지 않습니다.");
|
||||||
loginSuccess = false;
|
loginSuccess = false;
|
||||||
} else {
|
} else {
|
||||||
alert("등록된 수요처가 없습니다.");
|
alert("등록된 수요처가 없습니다.");
|
||||||
@@ -597,6 +597,7 @@ export type SdmActions = {
|
|||||||
actionLogin: (data: DemandCompType) => Promise<void>;
|
actionLogin: (data: DemandCompType) => Promise<void>;
|
||||||
getSdmInfoStatusList: (dmdInfoId: string) => Promise<void>;
|
getSdmInfoStatusList: (dmdInfoId: string) => Promise<void>;
|
||||||
getSimilarCaseList: (part: string, value: number | string) => Promise<void>;
|
getSimilarCaseList: (part: string, value: number | string) => Promise<void>;
|
||||||
|
actionLogout: () => Promise<void>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SdmType = {
|
export type SdmType = {
|
||||||
@@ -751,11 +752,23 @@ export const SdmReducer = (set: any): SdmActions => {
|
|||||||
// 유사사례 조회
|
// 유사사례 조회
|
||||||
getSimilarCaseList: async (part: string, value: number | string) => {
|
getSimilarCaseList: async (part: string, value: number | string) => {
|
||||||
const res = await fetchGetSimilarCaseList(part, value);
|
const res = await fetchGetSimilarCaseList(part, value);
|
||||||
if(res && res.length !== 0) {
|
const similarCaseList = res.map((el: SimilarCaseType) => {
|
||||||
|
const maskedBizNm = el.ruseBizNm
|
||||||
|
? el.ruseBizNm.replace(/^(\s*)^\S+/, "***") // 첫 단어(공백 전까지) 치환
|
||||||
|
: el.ruseBizNm;
|
||||||
|
|
||||||
|
return {
|
||||||
|
...el,
|
||||||
|
ruseBizNm: maskedBizNm,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
console.log(similarCaseList);
|
||||||
|
|
||||||
|
if (similarCaseList && similarCaseList.length !== 0) {
|
||||||
set((state: SdmType) => ({
|
set((state: SdmType) => ({
|
||||||
Sdm: {
|
Sdm: {
|
||||||
...state.Sdm,
|
...state.Sdm,
|
||||||
similarCaseList: res,
|
similarCaseList: similarCaseList,
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
return;
|
return;
|
||||||
@@ -768,6 +781,16 @@ export const SdmReducer = (set: any): SdmActions => {
|
|||||||
}))
|
}))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
actionLogout: async () => {
|
||||||
|
sessionStorage.removeItem("user");
|
||||||
|
set((state: SdmType) => ({
|
||||||
|
Sdm: {
|
||||||
|
...state.Sdm,
|
||||||
|
successLogin: false,
|
||||||
|
}
|
||||||
|
}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,23 +85,21 @@ export const DmStatusReducer = (set: any): DmStatusActions => {
|
|||||||
|
|
||||||
const boardData: DmStatusBoardType[] = data.data.map(
|
const boardData: DmStatusBoardType[] = data.data.map(
|
||||||
(item: DmStatusDataType) => {
|
(item: DmStatusDataType) => {
|
||||||
const regionText = cityCd.find((city) => item.region === city.val);
|
const regionText = item.sidoNm; //cityCd.find((city) => item.region === city.val);
|
||||||
const sewage = item.sewage;
|
const sewage = item.sewage;
|
||||||
const rainwater = item.rainwater;
|
const rainwater = item.rainwater;
|
||||||
const reclaimed = item.reclaimed;
|
const reclaimed = item.reclaimed;
|
||||||
const sewageCnt = item.sewageCnt;
|
const sewageCnt = item.sewageCnt;
|
||||||
const rainwaterCnt = item.rainwaterCnt;
|
const rainwaterCnt = item.rainwaterCnt;
|
||||||
const reclaimedCnt = item.reclaimedCnt;
|
const reclaimedCnt = item.reclaimedCnt;
|
||||||
console.log("regionText ", regionText);
|
|
||||||
if (regionText && regionText.text) {
|
|
||||||
return {
|
return {
|
||||||
region: regionText ? regionText.text : item.region,
|
region: regionText ? regionText : item.region,
|
||||||
sewage: sewageCnt + "(" + sewage + ")",
|
sewage: sewageCnt + "(" + sewage.toLocaleString() + ")",
|
||||||
rainwater: rainwaterCnt + "(" + rainwater + ")",
|
rainwater: rainwaterCnt + "(" + rainwater.toLocaleString() + ")",
|
||||||
reclaimed: reclaimedCnt + "(" + reclaimed + ")",
|
reclaimed: reclaimedCnt + "(" + reclaimed.toLocaleString() + ")",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
|
||||||
).filter((item): item is DmStatusBoardType => item !== undefined);
|
).filter((item): item is DmStatusBoardType => item !== undefined);
|
||||||
|
|
||||||
//console.log("boardData ", boardData);
|
//console.log("boardData ", boardData);
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
export type DmStatusDataType = {
|
export type DmStatusDataType = {
|
||||||
region: string;
|
sidoNm: string; // 시도명
|
||||||
|
region: string; // 시도코드
|
||||||
sewage: string;
|
sewage: string;
|
||||||
rainwater: string;
|
rainwater: string;
|
||||||
reclaimed: string;
|
reclaimed: string;
|
||||||
sewageCnt:string
|
sewageCnt:string;
|
||||||
rainwaterCnt:string
|
rainwaterCnt:string;
|
||||||
reclaimedCnt:string
|
reclaimedCnt:string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type DmStatusBoardType = {
|
export type DmStatusBoardType = {
|
||||||
|
sidoNm: string; // 시도명
|
||||||
region: string;
|
region: string;
|
||||||
sewage: string;
|
sewage: string;
|
||||||
rainwater: string;
|
rainwater: string;
|
||||||
|
|||||||
@@ -1,23 +1,33 @@
|
|||||||
//8880
|
//8880
|
||||||
import { AUTH_USER_ID, CLAIM_NAME } from "@/src/shared/config";
|
import { AUTH_USER_ID, CLAIM_NAME } from "@/src/shared/config";
|
||||||
import { DEV_URL_FO, DEV_URL_WR } from "../config";
|
|
||||||
import { getCookie } from "@common/components/lib/cookie";
|
import { getCookie } from "@common/components/lib/cookie";
|
||||||
|
|
||||||
|
|
||||||
const tokenId = getCookie(AUTH_USER_ID);
|
const tokenId = getCookie(AUTH_USER_ID);
|
||||||
const Authorization = getCookie(CLAIM_NAME);
|
const Authorization = getCookie(CLAIM_NAME);
|
||||||
|
|
||||||
export const fetchType = {
|
export const fetchType = {
|
||||||
COMMON: "common",
|
COMMON: "common",
|
||||||
WR: "wr",
|
WR: "wr",
|
||||||
FO:'fo'
|
FO: "fo",
|
||||||
|
SN: "sn"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const API_VERSION = "/api/v1"
|
||||||
|
const servers = {
|
||||||
|
common: "",
|
||||||
|
local: "",
|
||||||
|
fo: "/operation-service" + API_VERSION,
|
||||||
|
wr: "/reuse-service" + API_VERSION,
|
||||||
|
sn: "/sewerage-service" + API_VERSION,
|
||||||
|
}
|
||||||
|
|
||||||
interface RequestParams {
|
interface RequestParams {
|
||||||
[key: string]: unknown;
|
[key: string]: unknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getFetch = async (type: string, url: string) => {
|
export const getFetch = async (type: string, url: string) => {
|
||||||
const baseUrl = type === fetchType.FO ? DEV_URL_FO : DEV_URL_WR;
|
const baseUrl = servers[type];
|
||||||
const response = await fetch(baseUrl + url, {
|
const response = await fetch(baseUrl + url, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
@@ -35,7 +45,8 @@ export const getFetch = async (type: string, url: string) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const postFetch = async (url: string, params: RequestParams) => {
|
export const postFetch = async (url: string, params: RequestParams) => {
|
||||||
const response = await fetch(DEV_URL_WR + url, {
|
const baseUrl = servers[fetchType.WR];
|
||||||
|
const response = await fetch(baseUrl + url, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@@ -52,7 +63,8 @@ export const postFetch = async (url: string, params: RequestParams) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const putFetch = async (url: string, params: RequestParams) => {
|
export const putFetch = async (url: string, params: RequestParams) => {
|
||||||
const response = await fetch(DEV_URL_WR + url, {
|
const baseUrl = servers[fetchType.WR];
|
||||||
|
const response = await fetch(baseUrl + url, {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@@ -69,7 +81,8 @@ export const putFetch = async (url: string, params: RequestParams) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const deleteFetch = async (url: string, params: RequestParams) => {
|
export const deleteFetch = async (url: string, params: RequestParams) => {
|
||||||
const response = await fetch(DEV_URL_WR + url, {
|
const baseUrl = servers[fetchType.WR];
|
||||||
|
const response = await fetch(baseUrl + url, {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
|||||||
@@ -950,7 +950,7 @@ export function SdmInfoRegForm({
|
|||||||
body={
|
body={
|
||||||
<ModalSimilarPage sply={sply} usageCd={usageCd} money={money} />
|
<ModalSimilarPage sply={sply} usageCd={usageCd} money={money} />
|
||||||
}
|
}
|
||||||
bodyClass="sm:max-w-[100vw] w-[1400px] h-[900px]"
|
bodyClass="sm:max-w-[100vw] w-[1400px] h-[100dvh] max-h-[900px] overflow-y-auto overflow-x-hidden"
|
||||||
open={isSimilarCase}
|
open={isSimilarCase}
|
||||||
onOpenChange={(open) => !open && setIsSimilarCase(false)}
|
onOpenChange={(open) => !open && setIsSimilarCase(false)}
|
||||||
noHeaderYn="Y"
|
noHeaderYn="Y"
|
||||||
|
|||||||
+8
-15
@@ -1,13 +1,13 @@
|
|||||||
import { NextRequest, NextResponse } from "next/server";
|
import { NextRequest, NextResponse } from "next/server";
|
||||||
import { CLAIM_NAME, AUTH_USER_ID } from "./src/shared/config";
|
import { CLAIM_NAME, AUTH_USER_ID } from "./src/shared/config";
|
||||||
import { SERVER_API_FO_URL, SERVER_API_WR_URL } from "./src/shared/config/env";
|
// import { SERVER_API_FO_URL, SERVER_API_WR_URL } from "./src/shared/config/env";
|
||||||
|
|
||||||
// const CLAIM_NAME = "Authorization";
|
// const CLAIM_NAME = "Authorization";
|
||||||
// const AUTH_USER_ID = "token-id";
|
// const AUTH_USER_ID = "token-id";
|
||||||
const serverApiUrl = process.env.NEXT_PUBLIC_CS_SERVER_API_URL;
|
const serverApiUrl = process.env.NEXT_PUBLIC_CS_SERVER_API_URL;
|
||||||
const GEOSERVER_URL = process.env.NEXT_PUBLIC_GEOSERVER_URL || "";
|
const GEOSERVER_URL = process.env.NEXT_PUBLIC_GEOSERVER_URL || "";
|
||||||
const LX_GEOSERVER_URL = process.env.NEXT_PUBLIC_LX_GEOSERVER_URL || "";
|
const LX_GEOSERVER_URL = process.env.NEXT_PUBLIC_LX_GEOSERVER_URL || "";
|
||||||
const SEWERAGE_API_URL = process.env.NEXT_PUBLIC_SEWERAGE_API_URL || "";
|
const GATEWAY_URL = process.env.NEXT_PUBLIC_GATEWAY_URL || "";
|
||||||
const BUSINESS_JUSO_API_URL = process.env.NEXT_PUBLIC_FINDADRESS_URL || "";
|
const BUSINESS_JUSO_API_URL = process.env.NEXT_PUBLIC_FINDADRESS_URL || "";
|
||||||
const AdressKey = process.env.NEXT_PRIVATE_WR_ADDRESS_KEY || "";
|
const AdressKey = process.env.NEXT_PRIVATE_WR_ADDRESS_KEY || "";
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ export function middleware(req: NextRequest) {
|
|||||||
const url = req.nextUrl.clone();
|
const url = req.nextUrl.clone();
|
||||||
url.searchParams.set("TYPENAME", typename.replace("hasudo:", ""));
|
url.searchParams.set("TYPENAME", typename.replace("hasudo:", ""));
|
||||||
queryParams = url.searchParams.toString();
|
queryParams = url.searchParams.toString();
|
||||||
newUrl = `${SEWERAGE_API_URL}/api/v1/map/geometry${queryParams ? `?${queryParams}` : ""}`;
|
newUrl = `${GATEWAY_URL}/api/v1/map/geometry${queryParams ? `?${queryParams}` : ""}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`[Middleware] Rewriting from '/geoserver' path to: ${newUrl}`);
|
console.log(`[Middleware] Rewriting from '/geoserver' path to: ${newUrl}`);
|
||||||
@@ -121,24 +121,17 @@ export function middleware(req: NextRequest) {
|
|||||||
|
|
||||||
if (pathname.startsWith("/reuse-service")) {
|
if (pathname.startsWith("/reuse-service")) {
|
||||||
const queryParams = searchParams.toString();
|
const queryParams = searchParams.toString();
|
||||||
const newUrl = `${SERVER_API_WR_URL}${pathname.replace("/reuse-service", "")}${queryParams ? `?${queryParams}` : ""
|
const newUrl = `${GATEWAY_URL}${pathname}${queryParams ? `?${queryParams}` : ""}`;
|
||||||
}`;
|
|
||||||
console.log(`[Middleware] Rewriting from '/reuse-service' path to: ${newUrl}`);
|
console.log(`[Middleware] Rewriting from '/reuse-service' path to: ${newUrl}`);
|
||||||
return NextResponse.rewrite(new URL(newUrl));
|
return NextResponse.rewrite(new URL(newUrl));
|
||||||
}
|
} else if (pathname.startsWith("/operation-service")) {
|
||||||
|
|
||||||
if (pathname.startsWith("/operation-service")) {
|
|
||||||
const queryParams = searchParams.toString();
|
const queryParams = searchParams.toString();
|
||||||
const newUrl = `${SERVER_API_FO_URL}${pathname.replace("/operation-service", "")}${queryParams ? `?${queryParams}` : ""
|
const newUrl = `${GATEWAY_URL}${pathname}${queryParams ? `?${queryParams}` : ""}`;
|
||||||
}`;
|
|
||||||
console.log(`[Middleware] Rewriting from '/operation-service' path to: ${newUrl}`);
|
console.log(`[Middleware] Rewriting from '/operation-service' path to: ${newUrl}`);
|
||||||
return NextResponse.rewrite(new URL(newUrl));
|
return NextResponse.rewrite(new URL(newUrl));
|
||||||
}
|
} else if (pathname.startsWith("/sewerage-service")) {
|
||||||
|
|
||||||
if (pathname.startsWith("/sewerage-service")) {
|
|
||||||
const queryParams = searchParams.toString();
|
const queryParams = searchParams.toString();
|
||||||
const newUrl = `${SEWERAGE_API_URL}${pathname.replace("/sewerage-service", "")}${queryParams ? `?${queryParams}` : ""
|
const newUrl = `${GATEWAY_URL}${pathname}${queryParams ? `?${queryParams}` : ""}`;
|
||||||
}`;
|
|
||||||
console.log(`[Middleware] Rewriting from '/sewerage-service' path to: ${newUrl}`);
|
console.log(`[Middleware] Rewriting from '/sewerage-service' path to: ${newUrl}`);
|
||||||
return NextResponse.rewrite(new URL(newUrl));
|
return NextResponse.rewrite(new URL(newUrl));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ const subDomain =
|
|||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
output: "standalone",
|
output: "standalone",
|
||||||
|
experimental: {
|
||||||
|
proxyTimeout: 600000,
|
||||||
|
},
|
||||||
async rewrites() {
|
async rewrites() {
|
||||||
return {
|
return {
|
||||||
beforeFiles: [
|
beforeFiles: [
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
"@eslint/eslintrc": "^3",
|
"@eslint/eslintrc": "^3",
|
||||||
"@types/webpack": "^5.28.5",
|
"@types/webpack": "^5.28.5",
|
||||||
"eslint": "^9",
|
"eslint": "^9",
|
||||||
"eslint-config-next": "15.1.7",
|
"eslint-config-next": "15.3.8",
|
||||||
"postcss": "^8",
|
"postcss": "^8",
|
||||||
"tailwindcss": "^3.4.1",
|
"tailwindcss": "^3.4.1",
|
||||||
"typescript": "^5"
|
"typescript": "^5"
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,26 @@
|
|||||||
|
NEXT_PUBLIC_SITE_ID = DN
|
||||||
|
NEXT_PUBLIC_PORT = 3015
|
||||||
|
NEXT_PUBLIC_CLAIM_NAME = Authorization
|
||||||
|
NEXT_PUBLIC_AUTH_USER_ID = token-id
|
||||||
|
NEXT_PUBLIC_ACCESS_TOKEN = access-token
|
||||||
|
NEXT_PUBLIC_REFRESH_TOKEN = refresh-token
|
||||||
|
NEXT_PUBLIC_PROXY_HOST = http://localhost:3005
|
||||||
|
NEXT_PUBLIC_CM_LOGIN_PAGE_URL = http://dev.onasys.co.kr:3000/auth/login
|
||||||
|
NEXT_PUBLIC_SERVER_API_URL = http://dev.onasys.co.kr:8000
|
||||||
|
NEXT_PUBLIC_CS_SERVER_API_URL = http://dev.onasys.co.kr:8000
|
||||||
|
NEXT_PUBLIC_DM_SERVER_API_URL = http://con.mind-one.co.kr:11083/reuse-service/api/v1
|
||||||
|
# NEXT_PUBLIC_FO_SERVER_API_URL = http://192.168.1.222:8883/operation-service/api/v1
|
||||||
|
NEXT_PUBLIC_FO_SERVER_API_URL = http://con.mind-one.co.kr:11083/operation-service/api/v1
|
||||||
|
NEXT_PUBLIC_WR_SERVER_API_URL = http://con.mind-one.co.kr:11083/reuse-service/api/v1
|
||||||
|
NEXT_PUBLIC_GEOSERVER_URL = http://rsone.iptime.org:10010/geoserver
|
||||||
|
NEXT_PUBLIC_LX_GEOSERVER_URL = http://con.mind-one.co.kr:11306/geoserver
|
||||||
|
NEXT_PUBLIC_CS_TUS_UPLOAD = /attach-service/api/v1/tus/upload
|
||||||
|
NEXT_PUBLIC_NGII_URL = https://map.ngii.go.kr
|
||||||
|
NEXT_PUBLIC_NGII_PARAM = 04trYP9_xwLAfALjwZ-B8g&service=WMTS&request=GetTile&version=1.0.0&format=image/png&layer=korean_map&style=korean&tilematrixset=korean&tilematrix={z}&tilecol={x}&tilerow={y}
|
||||||
|
NEXT_PUBLIC_GATEWAY_URL=http://con.mind-one.co.kr:11083 # 개발 서버 API
|
||||||
|
#NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.128:8883/sewerage-service/api # 최용성
|
||||||
|
#NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.66:8883/sewerage-service/api # 박이정
|
||||||
|
|
||||||
|
|
||||||
|
NEXT_PUBLIC_FINDADRESS_URL=https://business.juso.go.kr/addrlink/addrLinkApi.do
|
||||||
|
NEXT_PRIVATE_WR_ADDRESS_KEY = devU01TX0FVVEgyMDI1MDgyNTEwMzkwNDExNjEwNTM=
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
NEXT_PUBLIC_SITE_ID = DN
|
||||||
|
NEXT_PUBLIC_PORT = 11315
|
||||||
|
NEXT_PUBLIC_CLAIM_NAME = Authorization
|
||||||
|
NEXT_PUBLIC_AUTH_USER_ID = token-id
|
||||||
|
NEXT_PUBLIC_ACCESS_TOKEN = access-token
|
||||||
|
NEXT_PUBLIC_REFRESH_TOKEN = refresh-token
|
||||||
|
NEXT_PUBLIC_PROXY_HOST = http://con.mind-one.co.kr:11315
|
||||||
|
NEXT_PUBLIC_CM_LOGIN_PAGE_URL = http://dev.onasys.co.kr:3000/auth/login
|
||||||
|
NEXT_PUBLIC_SERVER_API_URL = http://dev.onasys.co.kr:8000
|
||||||
|
NEXT_PUBLIC_CS_SERVER_API_URL = http://dev.onasys.co.kr:8000
|
||||||
|
NEXT_PUBLIC_DM_SERVER_API_URL = http://con.mind-one.co.kr:11083/reuse-service/api/v1
|
||||||
|
NEXT_PUBLIC_FO_SERVER_API_URL = http://con.mind-one.co.kr:11083/operation-service/api/v1
|
||||||
|
NEXT_PUBLIC_WR_SERVER_API_URL = http://con.mind-one.co.kr:11083/reuse-service/api/v1
|
||||||
|
#NEXT_PUBLIC_GEOSERVER_URL = http://rsone.iptime.org:10010/geoserver
|
||||||
|
#NEXT_PUBLIC_LX_GEOSERVER_URL = http://con.mind-one.co.kr:11306/geoserver
|
||||||
|
NEXT_PUBLIC_CS_TUS_UPLOAD = /attach-service/api/v1/tus/upload
|
||||||
|
NEXT_PUBLIC_NGII_URL = https://map.ngii.go.kr
|
||||||
|
NEXT_PUBLIC_NGII_PARAM = 04trYP9_xwLAfALjwZ-B8g&service=WMTS&request=GetTile&version=1.0.0&format=image/png&layer=korean_map&style=korean&tilematrixset=korean&tilematrix={z}&tilecol={x}&tilerow={y}
|
||||||
|
NEXT_PUBLIC_SEWERAGE_API_URL=http://con.mind-one.co.kr:11083/sewerage-service # 개발 서버 API
|
||||||
|
NEXT_PUBLIC_GATEWAY_URL=http://con.mind-one.co.kr:11083 # 개발 서버 API
|
||||||
|
# NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.128:8883/sewerage-service/api # 최용성
|
||||||
|
#NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.66:8883/sewerage-service/api # 박이정
|
||||||
|
|
||||||
|
|
||||||
|
NEXT_PUBLIC_FINDADRESS_URL=https://business.juso.go.kr/addrlink/addrLinkApi.do
|
||||||
|
NEXT_PRIVATE_WR_ADDRESS_KEY = devU01TX0FVVEgyMDI1MDgyNTEwMzkwNDExNjEwNTM=
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# 공단 운영
|
||||||
|
NEXT_PUBLIC_SITE_ID = DN
|
||||||
|
NEXT_PUBLIC_PORT = 3000
|
||||||
|
NEXT_PUBLIC_CLAIM_NAME = Authorization
|
||||||
|
NEXT_PUBLIC_AUTH_USER_ID = token-id
|
||||||
|
NEXT_PUBLIC_ACCESS_TOKEN = access-token
|
||||||
|
NEXT_PUBLIC_REFRESH_TOKEN = refresh-token
|
||||||
|
#NEXT_PUBLIC_PROXY_HOST = https://devreuse.hasuon.or.kr
|
||||||
|
#NEXT_PUBLIC_CM_LOGIN_PAGE_URL = https://devqueen.hasuon.or.kr/auth/login
|
||||||
|
NEXT_PUBLIC_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000
|
||||||
|
NEXT_PUBLIC_CS_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000
|
||||||
|
NEXT_PUBLIC_FO_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/operation-service/api/v1
|
||||||
|
NEXT_PUBLIC_WR_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/reuse-service/api/v1
|
||||||
|
NEXT_PUBLIC_GEOSERVER_URL = http://172.29.143.87:8080/geoserver
|
||||||
|
NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl
|
||||||
|
NEXT_PUBLIC_CS_TUS_UPLOAD = /attach-service/api/v1/tus/upload
|
||||||
|
NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service
|
||||||
|
NEXT_PUBLIC_NGII_URL = http://172.29.143.87/poiact
|
||||||
|
NEXT_PUBLIC_NGII_PARAM = BDE2BEF39DAFEC293AB6730150F222AC&service=WMTS&request=GetTile&version=1.0.0&format=image/png&layer=korean_map&style=korean&tilematrixset=korean&tilematrix={z}&tilecol={y}&tilerow={x}
|
||||||
|
NEXT_PUBLIC_GATEWAY_URL = http://apigateway.iipbs-was.svc.cluster.local:8000
|
||||||
|
|
||||||
|
|
||||||
|
NEXT_PUBLIC_FINDADRESS_URL=https://business.juso.go.kr/addrlink/addrLinkApi.do
|
||||||
|
NEXT_PRIVATE_WR_ADDRESS_KEY = U01TXOFVVEgyMDI1MDgyODE0MTAxNzExNjEyMjA=
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
## Project
|
||||||
|
This repository contains a Next.js web application.
|
||||||
|
|
||||||
|
Main technologies:
|
||||||
|
- Next.js
|
||||||
|
- TypeScript
|
||||||
|
- pnpm workspace
|
||||||
|
- turborepo
|
||||||
|
|
||||||
|
이 저장소는 pnpm workspace + Turborepo 기반 monorepo이다.
|
||||||
|
|
||||||
|
- 워크스페이스 범위는 `apps/*`, `apps/common/*`, `packages/*`, `packages/common/*`
|
||||||
|
- 루트 스크립트는 `turbo run build`, `turbo run dev` 를 사용한다
|
||||||
|
- `build` 작업은 의존 패키지의 `build` 를 먼저 수행한다 (`dependsOn: ["^build"]`)
|
||||||
|
- `dev` 는 캐시하지 않는 지속 실행 작업이다
|
||||||
|
- 변경 범위만 선택 실행할 수 있으므로, 전체 빌드보다 `--filter` 사용을 우선한다
|
||||||
|
|
||||||
|
## Encoding
|
||||||
|
- UTF-8
|
||||||
|
- 한글이 깨지지 않도록 주의할 것
|
||||||
|
|
||||||
|
## 주석 comment
|
||||||
|
- 한글 주석을 삭제하지 말 것
|
||||||
|
|
||||||
|
## Monorepo structure
|
||||||
|
apps/
|
||||||
|
_template
|
||||||
|
as
|
||||||
|
cm
|
||||||
|
cs
|
||||||
|
dc
|
||||||
|
dm
|
||||||
|
dm_new
|
||||||
|
fo
|
||||||
|
sn
|
||||||
|
st
|
||||||
|
wr
|
||||||
|
|
||||||
@@ -0,0 +1,578 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import React, {
|
||||||
|
useCallback,
|
||||||
|
useEffect,
|
||||||
|
useLayoutEffect,
|
||||||
|
useMemo,
|
||||||
|
useRef,
|
||||||
|
useState,
|
||||||
|
} from "react";
|
||||||
|
import Image from "next/image";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CaseTabsCarousel.tsx (FINAL OPTIMIZED)
|
||||||
|
* - 탭별 데이터
|
||||||
|
* - 카드 perPage(1/2/3) 반응형
|
||||||
|
* - 카드 perPage개 = 1그룹, 좌/우 클릭 시 1그룹 단위 이동
|
||||||
|
* - 3그룹 가상화(prev/cur/next)로 DOM 최소화
|
||||||
|
* - px 기반 트랙 이동 + "측정 박스 분리"로 좌/우 비침 방지
|
||||||
|
* - stale state 제거(방향/인덱스 ref 관리)로 슬라이드 안정성 강화
|
||||||
|
* - BUGFIX 1) onTransitionEnd 버블링 방지 (target===currentTarget, transform만 처리)
|
||||||
|
* - BUGFIX 2) 슬라이드 중(busy) clipWidth 변화로 트랙 스냅(-W) 덮어쓰지 않게 분리
|
||||||
|
*/
|
||||||
|
|
||||||
|
type TabKey = "rain" | "reuse" | "sewage" | "global";
|
||||||
|
|
||||||
|
type CaseItem = {
|
||||||
|
id: string;
|
||||||
|
title: string;
|
||||||
|
desc: string;
|
||||||
|
imageSrc: string;
|
||||||
|
href?: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
const TABS: { key: TabKey; label: string }[] = [
|
||||||
|
{ key: "rain", label: "빗물 재이용 사례" },
|
||||||
|
{ key: "reuse", label: "중수 재이용 사례" },
|
||||||
|
{ key: "sewage", label: "하수 재이용 사례" },
|
||||||
|
{ key: "global", label: "해외 재이용 사례" },
|
||||||
|
];
|
||||||
|
|
||||||
|
// 실제 데이터로 교체해서 쓰세요(구조 유지)
|
||||||
|
const MOCK: Record<TabKey, CaseItem[]> = {
|
||||||
|
rain: [
|
||||||
|
{
|
||||||
|
id: "rain-0",
|
||||||
|
title: "경기도 수원시 빗물이용과 중수도",
|
||||||
|
desc: "(빗물) 월드컵경기장 등 4개소에 노면 빗물분사시스템 및 빗물 공급기를 설치하여 혹서기…",
|
||||||
|
imageSrc: "/images/landing/rain_01.png",
|
||||||
|
href: "/reuse/business/rain/suwon",
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// id: "rain-2",
|
||||||
|
// title: "경기도 수원시 빗물이용과 중수도",
|
||||||
|
// desc: "(빗물) 월드컵경기장 등 4개소에 노면 빗물분사시스템 및 빗물 공급기를 설치하여 혹서기…",
|
||||||
|
// imageSrc: "/images/landing/rain_01.png",
|
||||||
|
// href: "#",
|
||||||
|
// },
|
||||||
|
],
|
||||||
|
reuse: Array.from({ length: 6 }).map((_, i) => ({
|
||||||
|
id: `reuse-${i}`,
|
||||||
|
title: `중수 재이용 사례 ${i + 1}`,
|
||||||
|
desc: "설명 문구가 들어갑니다. (최대 2~3줄) …",
|
||||||
|
imageSrc: "/images/landing/sample_case.png",
|
||||||
|
href: "#",
|
||||||
|
})),
|
||||||
|
sewage: [
|
||||||
|
{
|
||||||
|
id: "sewage-1",
|
||||||
|
title: "경기도 파주시 하수 재이용",
|
||||||
|
desc: "운정·금촌하수처리시설의 하수처리수를 막공법(U/F, R/O)으로 재처리하여 파주 LCD 산업단지내 3개 업체*에...",
|
||||||
|
imageSrc: "/images/landing/sewage_01.png",
|
||||||
|
href: "/reuse/business/sewage/paju",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "sewage-2",
|
||||||
|
title: "충남보령 하수재이용",
|
||||||
|
desc: "보령·신보령화력발전소에 하루 1만톤의 탈황용수 공급을 위해 보령하수처리시설의 하수처리수 재이용 사업...",
|
||||||
|
imageSrc: "/images/landing/sewage_02.png",
|
||||||
|
href: "/reuse/business/sewage/bolyeong",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "sewage-3",
|
||||||
|
title: "여수시 하수처리수 재이용",
|
||||||
|
desc: "(빗물) 월드컵경기장 등 4개소에 노면 빗물분사시스템 및 빗물 공급기를 설치하여 혹서기 도시 열섬효과 및 도로...",
|
||||||
|
imageSrc: "/images/landing/sewage_03.png",
|
||||||
|
href: "/reuse/business/sewage/yeosu",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "sewage-4",
|
||||||
|
title: "청주시 하수 재이용 시설",
|
||||||
|
desc: "청주시 하수처리수 재이용 민간투자사업(BTO) 청주시 하수처리수 재이용 민간투자사업(BTO) 청주시 하수처리수 재이용 민간투자사업(BTO)...",
|
||||||
|
imageSrc: "/images/landing/sewage_04.png",
|
||||||
|
href: "/reuse/business/sewage/cheongju",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "sewage-5",
|
||||||
|
title: "수원시 황구지천 하천유지용수",
|
||||||
|
desc: "황구지천 공공하수처리시설 하수처리수 재이용사업으로 향후 호매실천 및 금곡천 건천화 방지로...",
|
||||||
|
imageSrc: "/images/landing/sewage_05.png",
|
||||||
|
href: "/reuse/business/sewage/hwanggu",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "sewage-6",
|
||||||
|
title: "구리시 도로자동청소시스템",
|
||||||
|
desc: "고농도 미세먼지 발생 및 폭염의 급증에 따라 공공하수처리시설 발생 재이용수 일부를 도로자동청소시스템에 활용...",
|
||||||
|
imageSrc: "/images/landing/sewage_06.png",
|
||||||
|
href: "/reuse/business/sewage/guri",
|
||||||
|
},
|
||||||
|
// ...Array.from({ length: 6 }).map((_, i) => ({
|
||||||
|
// id: `sewage-x-${i}`,
|
||||||
|
// title: `하수 재이용 사례 ${i + 4}`,
|
||||||
|
// desc: "설명 문구가 들어갑니다. (최대 2~3줄) …",
|
||||||
|
// imageSrc: "/images/landing/sample_case.png",
|
||||||
|
// href: "#",
|
||||||
|
// })),
|
||||||
|
],
|
||||||
|
global: [
|
||||||
|
{
|
||||||
|
id: "global-1",
|
||||||
|
title: "해외 재이용 사례 개요",
|
||||||
|
desc: "2024년 하수도 통계 기준 15.6%이며, 제2차 물 재이용 기본 계획을 고려한 2030년 목표는 17%, 우리나라의 하수 처리 재이용률은 15% 수준...",
|
||||||
|
imageSrc: "/images/landing/overview_01.png",
|
||||||
|
href: "reuse/business/globalCase/overview",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "global-2",
|
||||||
|
title: "[대만] 국가 주도의 공업용수 공급",
|
||||||
|
desc: "대만은 물 재이용에 적극적이며 국가주도로 하수재이용 사업 시행(안핑), 안핑을 포함한 16건 공사 완료시 628,100 CMD 공급 가능...",
|
||||||
|
imageSrc: "/images/landing/taiwan_01.png",
|
||||||
|
href: "/reuse/business/globalCase/taiwan",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "global-3",
|
||||||
|
title: "[호주] 생활 속 물 재이용 / 광역 물 재이용수 공급",
|
||||||
|
desc: "SEQ Water Grid는 브리즈번 남동부지역의 식수 공급을 위해 설정한 광역 수로망, 이 광역수로망을 활용하여 물이 부족한 지역으로 물을 공급...",
|
||||||
|
imageSrc: "/images/landing/australia_01.png",
|
||||||
|
href: "/reuse/business/globalCase/australia",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "global-4",
|
||||||
|
title: "[싱가포르] 수요가 높은 산업의 물 재이용 의무화",
|
||||||
|
desc: "2003년 공식 NEWater 공장을 가동했으며 신뢰확보를 위해 NEWater Visitor Center를 함께 건설, NEWater 전체파이프 공급 → 반도체 공장에서 가장 많이 사용...",
|
||||||
|
imageSrc: "/images/landing/singapore_01.png",
|
||||||
|
href: "/reuse/business/globalCase/singapore",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "global-5",
|
||||||
|
title: "[EU] 법률을 제정, EU국가에서 물 재이용 유도",
|
||||||
|
desc: "유럽 지역의 물 부족 문제를 인식하고 ’20년 물 재이용 법률을 제정 (2020/741), 2023년부터 모든 EU국가에서 시행...",
|
||||||
|
imageSrc: "/images/landing/eu_01.png",
|
||||||
|
href: "/reuse/business/globalCase/eu",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
/* ---------------- utils ---------------- */
|
||||||
|
function chunk<T>(arr: T[], size: number) {
|
||||||
|
const res: T[][] = [];
|
||||||
|
if (size <= 0) return res;
|
||||||
|
for (let i = 0; i < arr.length; i += size) res.push(arr.slice(i, i + size));
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
function mod(n: number, m: number) {
|
||||||
|
return ((n % m) + m) % m;
|
||||||
|
}
|
||||||
|
function usePrefersReducedMotion() {
|
||||||
|
const [reduced, setReduced] = useState(false);
|
||||||
|
useEffect(() => {
|
||||||
|
const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
|
||||||
|
const onChange = () => setReduced(mq.matches);
|
||||||
|
onChange();
|
||||||
|
mq.addEventListener?.("change", onChange);
|
||||||
|
return () => mq.removeEventListener?.("change", onChange);
|
||||||
|
}, []);
|
||||||
|
return reduced;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wrapRef: perPage 계산용
|
||||||
|
* clipRef: "패딩 없는 측정 박스" 폭(px) 계산용
|
||||||
|
*/
|
||||||
|
function useCarouselMeasure() {
|
||||||
|
const wrapRef = useRef<HTMLDivElement | null>(null);
|
||||||
|
const clipRef = useRef<HTMLDivElement | null>(null);
|
||||||
|
|
||||||
|
const [perPage, setPerPage] = useState(3);
|
||||||
|
const [clipWidth, setClipWidth] = useState(0);
|
||||||
|
|
||||||
|
// perPage: container width로 반응형 결정 (rAF로 디바운스)
|
||||||
|
useEffect(() => {
|
||||||
|
const el = wrapRef.current;
|
||||||
|
if (!el) return;
|
||||||
|
|
||||||
|
let raf = 0;
|
||||||
|
|
||||||
|
const calc = () => {
|
||||||
|
const w = el.clientWidth;
|
||||||
|
if (w < 640) setPerPage(1);
|
||||||
|
else if (w < 1024) setPerPage(2);
|
||||||
|
else setPerPage(3);
|
||||||
|
};
|
||||||
|
|
||||||
|
const ro = new ResizeObserver(() => {
|
||||||
|
cancelAnimationFrame(raf);
|
||||||
|
raf = requestAnimationFrame(calc);
|
||||||
|
});
|
||||||
|
|
||||||
|
calc();
|
||||||
|
ro.observe(el);
|
||||||
|
return () => {
|
||||||
|
cancelAnimationFrame(raf);
|
||||||
|
ro.disconnect();
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
// clipWidth: 패딩 없는 박스에서 width를 정확히 측정 (sub-pixel 반올림)
|
||||||
|
useEffect(() => {
|
||||||
|
const el = clipRef.current;
|
||||||
|
if (!el) return;
|
||||||
|
|
||||||
|
let raf = 0;
|
||||||
|
|
||||||
|
const calc = () => {
|
||||||
|
const w = Math.round(el.getBoundingClientRect().width);
|
||||||
|
setClipWidth(w);
|
||||||
|
};
|
||||||
|
|
||||||
|
const ro = new ResizeObserver(() => {
|
||||||
|
cancelAnimationFrame(raf);
|
||||||
|
raf = requestAnimationFrame(calc);
|
||||||
|
});
|
||||||
|
|
||||||
|
calc();
|
||||||
|
ro.observe(el);
|
||||||
|
return () => {
|
||||||
|
cancelAnimationFrame(raf);
|
||||||
|
ro.disconnect();
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return { wrapRef, clipRef, perPage, clipWidth };
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------- component ---------------- */
|
||||||
|
export default function CaseTabsCarousel() {
|
||||||
|
const [active, setActive] = useState<TabKey>("rain");
|
||||||
|
|
||||||
|
// 탭별 마지막 그룹 인덱스 기억
|
||||||
|
const tabIndexRef = useRef<Record<TabKey, number>>({
|
||||||
|
rain: 0,
|
||||||
|
reuse: 0,
|
||||||
|
sewage: 0,
|
||||||
|
global: 0,
|
||||||
|
});
|
||||||
|
|
||||||
|
const reducedMotion = usePrefersReducedMotion();
|
||||||
|
const { wrapRef, clipRef, perPage, clipWidth } = useCarouselMeasure();
|
||||||
|
|
||||||
|
const items = useMemo(() => MOCK[active] ?? [], [active]);
|
||||||
|
const groups = useMemo(() => chunk(items, perPage), [items, perPage]);
|
||||||
|
const groupCount = groups.length;
|
||||||
|
|
||||||
|
const [cur, setCur] = useState(0);
|
||||||
|
const curRef = useRef(0);
|
||||||
|
|
||||||
|
// px 기반 트랙
|
||||||
|
const [trackPx, setTrackPx] = useState(0);
|
||||||
|
const [anim, setAnim] = useState(false);
|
||||||
|
const [busy, setBusy] = useState(false);
|
||||||
|
|
||||||
|
// 방향 ref (onTransitionEnd에서 trackPx 비교하지 않음)
|
||||||
|
const dirRef = useRef<-1 | 1 | 0>(0);
|
||||||
|
|
||||||
|
// cur 최신값 유지
|
||||||
|
useEffect(() => {
|
||||||
|
curRef.current = cur;
|
||||||
|
}, [cur]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 리셋 로직 분리:
|
||||||
|
* - 탭/perPage/groupCount 바뀔 때만 "인덱스/상태" 리셋
|
||||||
|
* - clipWidth 변화는 별도 effect에서 "busy 아닐 때만" 중앙(-W)로 배치
|
||||||
|
*/
|
||||||
|
useLayoutEffect(() => {
|
||||||
|
const saved = tabIndexRef.current[active] ?? 0;
|
||||||
|
const nextCur = groupCount ? mod(saved, groupCount) : 0;
|
||||||
|
|
||||||
|
dirRef.current = 0;
|
||||||
|
setCur(nextCur);
|
||||||
|
setBusy(false);
|
||||||
|
setAnim(false);
|
||||||
|
}, [active, perPage, groupCount]);
|
||||||
|
|
||||||
|
// clipWidth 변화로 트랙 위치를 잡되, 슬라이드 중(busy)엔 덮어쓰지 않음
|
||||||
|
useLayoutEffect(() => {
|
||||||
|
if (busy) return;
|
||||||
|
if (clipWidth > 0) setTrackPx(-clipWidth);
|
||||||
|
else setTrackPx(0);
|
||||||
|
}, [clipWidth, busy]);
|
||||||
|
|
||||||
|
// 3그룹 가상화
|
||||||
|
const viewGroups = useMemo(() => {
|
||||||
|
if (!groupCount) return [[], [], []] as CaseItem[][];
|
||||||
|
return [
|
||||||
|
groups[mod(cur - 1, groupCount)] ?? [],
|
||||||
|
groups[mod(cur, groupCount)] ?? [],
|
||||||
|
groups[mod(cur + 1, groupCount)] ?? [],
|
||||||
|
];
|
||||||
|
}, [groups, cur, groupCount]);
|
||||||
|
|
||||||
|
const canSlide = groupCount > 1 && clipWidth > 0;
|
||||||
|
|
||||||
|
const go = useCallback(
|
||||||
|
(dir: -1 | 1) => {
|
||||||
|
if (!canSlide) return;
|
||||||
|
if (busy) return;
|
||||||
|
|
||||||
|
dirRef.current = dir;
|
||||||
|
|
||||||
|
setBusy(true);
|
||||||
|
setAnim(!reducedMotion);
|
||||||
|
|
||||||
|
// 중앙(-W) 기준: prev=0, next=-2W
|
||||||
|
setTrackPx(dir === 1 ? -2 * clipWidth : 0);
|
||||||
|
|
||||||
|
// reduced motion이면 즉시 확정
|
||||||
|
if (reducedMotion) {
|
||||||
|
const nextCur = mod(curRef.current + dir, groupCount);
|
||||||
|
tabIndexRef.current[active] = nextCur;
|
||||||
|
|
||||||
|
setCur(nextCur);
|
||||||
|
setAnim(false);
|
||||||
|
setTrackPx(-clipWidth);
|
||||||
|
setBusy(false);
|
||||||
|
dirRef.current = 0;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[active, busy, canSlide, clipWidth, groupCount, reducedMotion]
|
||||||
|
);
|
||||||
|
|
||||||
|
// BUGFIX 1) 자식 transitionend 버블링 방지 + transform만 처리
|
||||||
|
const onTransitionEnd = useCallback(
|
||||||
|
(e: React.TransitionEvent<HTMLDivElement>) => {
|
||||||
|
// 자식 transitionend 버블링 방지
|
||||||
|
if (e.target !== e.currentTarget) return;
|
||||||
|
if (e.propertyName !== "transform") return;
|
||||||
|
|
||||||
|
if (!busy || reducedMotion) return;
|
||||||
|
|
||||||
|
const dir = dirRef.current;
|
||||||
|
if (dir !== 1 && dir !== -1) return;
|
||||||
|
|
||||||
|
const nextCur = mod(curRef.current + dir, groupCount);
|
||||||
|
tabIndexRef.current[active] = nextCur;
|
||||||
|
|
||||||
|
// 1) 먼저 transition을 끄고(중요)
|
||||||
|
setAnim(false);
|
||||||
|
|
||||||
|
// 2) cur를 회전 + 트랙을 즉시 중앙(-W)로 스냅
|
||||||
|
// (이 순간은 "무조건 애니메이션 없이" 처리되어야 함)
|
||||||
|
setCur(nextCur);
|
||||||
|
setTrackPx(-clipWidth);
|
||||||
|
|
||||||
|
// 3) 다음 프레임(2번 rAF)에서 다시 애니메이션 켜고 busy 해제
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
setAnim(!reducedMotion);
|
||||||
|
setBusy(false);
|
||||||
|
dirRef.current = 0;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
[active, busy, clipWidth, groupCount, reducedMotion]
|
||||||
|
);
|
||||||
|
|
||||||
|
const goDot = useCallback(
|
||||||
|
(idx: number) => {
|
||||||
|
if (!groupCount) return;
|
||||||
|
if (busy) return;
|
||||||
|
|
||||||
|
const target = mod(idx, groupCount);
|
||||||
|
tabIndexRef.current[active] = target;
|
||||||
|
|
||||||
|
dirRef.current = 0;
|
||||||
|
setCur(target);
|
||||||
|
setAnim(false);
|
||||||
|
if (clipWidth > 0) setTrackPx(-clipWidth);
|
||||||
|
},
|
||||||
|
[active, busy, clipWidth, groupCount]
|
||||||
|
);
|
||||||
|
|
||||||
|
const trackStyle: React.CSSProperties = useMemo(
|
||||||
|
() => ({
|
||||||
|
transform: `translate3d(${trackPx}px, 0, 0)`,
|
||||||
|
transition: anim ? "transform 700ms cubic-bezier(.22,.61,.36,1)" : "none",
|
||||||
|
willChange: busy ? "transform" : undefined,
|
||||||
|
}),
|
||||||
|
[trackPx, anim, busy]
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section className="w-full">
|
||||||
|
{/* 탭 바 */}
|
||||||
|
<div className="mx-auto max-w-[1520px] pt-10">
|
||||||
|
<div className="">
|
||||||
|
<div className="grid grid-cols-4">
|
||||||
|
{TABS.map((t) => {
|
||||||
|
const isActive = t.key === active;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
key={t.key}
|
||||||
|
type="button"
|
||||||
|
onClick={() => setActive(t.key)}
|
||||||
|
className={[
|
||||||
|
"relative h-[74px] w-full text-base font-semibold",
|
||||||
|
"transition-colors",
|
||||||
|
// 기본(비활성): 검정 배경 + 회색 텍스트
|
||||||
|
!isActive ? "text-[#767676] hover:text-black border-b-2 border-sky-400" : "",
|
||||||
|
// 활성: 흰 배경 + 진한 텍스트 + 하늘색 테두리(위/좌/우) + 아래는 열어둠
|
||||||
|
isActive
|
||||||
|
? [
|
||||||
|
"bg-[#eaf4f4] text-black",
|
||||||
|
"border-t-2 border-l-2 border-r-2 border-sky-400",
|
||||||
|
"border-b-0", // 아래는 컨텐츠와 이어지도록 열어둠
|
||||||
|
"z-10", // 테두리가 위로 올라오게
|
||||||
|
].join(" ")
|
||||||
|
: "",
|
||||||
|
].join(" ")}
|
||||||
|
>
|
||||||
|
{t.label}
|
||||||
|
|
||||||
|
{/* 활성 탭 하단에 얇은 라인이 필요하면(이미지처럼) */}
|
||||||
|
{isActive && (
|
||||||
|
<span className="pointer-events-none absolute left-0 right-0 bottom-[-1px] h-[2px] bg-[#eaf4f4]" />
|
||||||
|
)}
|
||||||
|
</button>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* 슬라이더 */}
|
||||||
|
<div ref={wrapRef} className="mx-auto max-w-[1520px] px-6 pb-5 pt-10 bg-[#eaf4f4]">
|
||||||
|
<div className="relative">
|
||||||
|
{/* 좌우 버튼 */}
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={() => go(-1)}
|
||||||
|
disabled={!canSlide || busy}
|
||||||
|
className={[
|
||||||
|
"absolute left-0 top-1/2 z-10 -translate-y-1/2",
|
||||||
|
"w-[80px] h-[80px] rounded-full bg-white shadow-[0_10px_25px_rgba(0,0,0,0.12)]",
|
||||||
|
"grid place-items-center border-2 border-[#C2CAD2]",
|
||||||
|
!canSlide || busy
|
||||||
|
? "opacity-40 cursor-not-allowed"
|
||||||
|
: "hover:brightness-95",
|
||||||
|
].join(" ")}
|
||||||
|
aria-label="이전"
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
src="/images/landing/icon_left_arrow.png"
|
||||||
|
alt="이전"
|
||||||
|
width={24}
|
||||||
|
height={24}
|
||||||
|
className="w-6 h-6 object-contain"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={() => go(1)}
|
||||||
|
disabled={!canSlide || busy}
|
||||||
|
className={[
|
||||||
|
"absolute right-0 top-1/2 z-10 -translate-y-1/2",
|
||||||
|
"w-[80px] h-[80px] rounded-full bg-white shadow-[0_10px_25px_rgba(0,0,0,0.12)]",
|
||||||
|
"grid place-items-center border-2 border-[#C2CAD2]",
|
||||||
|
!canSlide || busy
|
||||||
|
? "opacity-40 cursor-not-allowed"
|
||||||
|
: "hover:brightness-95",
|
||||||
|
].join(" ")}
|
||||||
|
aria-label="다음"
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
src="/images/landing/icon_right_arrow.png"
|
||||||
|
alt="다음"
|
||||||
|
width={24}
|
||||||
|
height={24}
|
||||||
|
className="w-6 h-6 object-contain"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{/* 중요: clip(가림)과 measure(측정) 분리 */}
|
||||||
|
<div className="overflow-hidden [clip-path:inset(0)] [contain:paint]">
|
||||||
|
<div className="w-[1250px] overflow-hidden m-auto">
|
||||||
|
{/* 측정은 패딩 없는 박스에서 */}
|
||||||
|
<div ref={clipRef} className="w-full">
|
||||||
|
{/* track */}
|
||||||
|
<div className="flex" style={trackStyle} onTransitionEnd={onTransitionEnd}>
|
||||||
|
{viewGroups.map((group, gi) => (
|
||||||
|
<div
|
||||||
|
key={`pane-${gi}`}
|
||||||
|
className="shrink-0"
|
||||||
|
style={{ width: clipWidth || "100%" }}
|
||||||
|
>
|
||||||
|
{/* 그룹 내부: perPage 컬럼 */}
|
||||||
|
<div
|
||||||
|
className="grid gap-7"
|
||||||
|
style={{
|
||||||
|
gridTemplateColumns: `repeat(${perPage}, minmax(0, 1fr))`,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{(group ?? []).map((c) => (
|
||||||
|
<article
|
||||||
|
key={c.id}
|
||||||
|
className="overflow-hidden rounded-[22px] border-2 border-sky-400 bg-white"
|
||||||
|
>
|
||||||
|
<div className="h-[241px] w-full bg-slate-100 border-b border-b-blue-300">
|
||||||
|
<Image
|
||||||
|
src={c.imageSrc}
|
||||||
|
alt={c.title}
|
||||||
|
width={640}
|
||||||
|
height={241}
|
||||||
|
className="h-full w-full object-cover"
|
||||||
|
style={{ width: "100%", height: "100%" }}
|
||||||
|
loading="lazy"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="p-8">
|
||||||
|
<h3 className="h-[77px] text-center text-[28px] font-extrabold leading-snug tracking-tight">
|
||||||
|
{c.title}
|
||||||
|
</h3>
|
||||||
|
<p className="mt-4 line-clamp-3 text-[16px] leading-7 text-slate-600">
|
||||||
|
{c.desc}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href={c.href ?? "#"}
|
||||||
|
className="mt-8 inline-flex h-[56px] w-full items-center justify-center gap-3 rounded-md bg-[#02A0D6] text-[18px] font-bold text-white transition hover:brightness-110"
|
||||||
|
>
|
||||||
|
자세히 보기 <span aria-hidden>→</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* 도트 */}
|
||||||
|
<div className="mt-8 flex items-center justify-center gap-3">
|
||||||
|
{Array.from({ length: Math.max(groupCount, 1) }).map((_, i) => (
|
||||||
|
<button
|
||||||
|
key={`dot-${i}`}
|
||||||
|
type="button"
|
||||||
|
onClick={() => goDot(i)}
|
||||||
|
className={[
|
||||||
|
"h-[10px] w-[10px] rounded-full transition",
|
||||||
|
i === cur
|
||||||
|
? "bg-black opacity-100"
|
||||||
|
: "bg-black opacity-30 hover:opacity-60",
|
||||||
|
].join(" ")}
|
||||||
|
aria-label={`${i + 1}번 그룹`}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,175 @@
|
|||||||
|
// apps/dm/app/(landing)/reuse/_components/ImageSlider.tsx
|
||||||
|
"use client";
|
||||||
|
|
||||||
|
import Image from "next/image";
|
||||||
|
import { useEffect, useMemo, useRef, useState } from "react";
|
||||||
|
|
||||||
|
type Slide = { src: string; alt?: string };
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
slides: Slide[];
|
||||||
|
className?: string;
|
||||||
|
maxWidthClassName?: string; // 예: "max-w-[760px]"
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function CaseImageSlider({
|
||||||
|
slides,
|
||||||
|
className = "",
|
||||||
|
maxWidthClassName = "max-w-[760px]",
|
||||||
|
}: Props) {
|
||||||
|
const safeSlides = useMemo(() => slides.filter(Boolean), [slides]);
|
||||||
|
const [idx, setIdx] = useState(0);
|
||||||
|
const [dragging, setDragging] = useState(false);
|
||||||
|
|
||||||
|
const startX = useRef(0);
|
||||||
|
const deltaX = useRef(0);
|
||||||
|
|
||||||
|
const total = safeSlides.length;
|
||||||
|
const canSlide = total > 1;
|
||||||
|
|
||||||
|
const go = (dir: number) => {
|
||||||
|
if (!canSlide) return;
|
||||||
|
setIdx((prev) => {
|
||||||
|
const next = prev + dir;
|
||||||
|
if (next < 0) return total - 1;
|
||||||
|
if (next >= total) return 0;
|
||||||
|
return next;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// ← → 키보드 지원(선택)
|
||||||
|
useEffect(() => {
|
||||||
|
const onKey = (e: KeyboardEvent) => {
|
||||||
|
if (!canSlide) return;
|
||||||
|
if (e.key === "ArrowLeft") go(-1);
|
||||||
|
if (e.key === "ArrowRight") go(1);
|
||||||
|
};
|
||||||
|
window.addEventListener("keydown", onKey);
|
||||||
|
return () => window.removeEventListener("keydown", onKey);
|
||||||
|
}, [canSlide, total]);
|
||||||
|
|
||||||
|
// 드래그(마우스/터치)로 넘기기
|
||||||
|
const onPointerDown = (e: React.PointerEvent) => {
|
||||||
|
if (!canSlide) return;
|
||||||
|
setDragging(true);
|
||||||
|
startX.current = e.clientX;
|
||||||
|
deltaX.current = 0;
|
||||||
|
(e.currentTarget as HTMLElement).setPointerCapture(e.pointerId);
|
||||||
|
};
|
||||||
|
|
||||||
|
const onPointerMove = (e: React.PointerEvent) => {
|
||||||
|
if (!dragging) return;
|
||||||
|
deltaX.current = e.clientX - startX.current;
|
||||||
|
};
|
||||||
|
|
||||||
|
const onPointerUp = () => {
|
||||||
|
if (!dragging) return;
|
||||||
|
setDragging(false);
|
||||||
|
|
||||||
|
const threshold = 60; // 넘김 감도
|
||||||
|
if (deltaX.current > threshold) go(-1);
|
||||||
|
else if (deltaX.current < -threshold) go(1);
|
||||||
|
|
||||||
|
deltaX.current = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!total) return null;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section className={className}>
|
||||||
|
<div className={`mx-auto ${maxWidthClassName}`}>
|
||||||
|
<div className="relative">
|
||||||
|
{/* 좌측 버튼 */}
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={() => go(-1)}
|
||||||
|
className="absolute left-[-60px] top-1/2 -translate-y-1/2 z-10
|
||||||
|
w-[80px] h-[80px] rounded-full border border-black/20 bg-white
|
||||||
|
grid place-items-center shadow-sm hover:bg-black/[0.03]"
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
src="/images/landing/icon_left_arrow.png"
|
||||||
|
alt="이전"
|
||||||
|
width={12}
|
||||||
|
height={22}
|
||||||
|
className="w-[12px] h-[22px]"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
|
||||||
|
{/* 우측 버튼 */}
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={() => go(1)}
|
||||||
|
className="absolute right-[-60px] top-1/2 -translate-y-1/2 z-10
|
||||||
|
w-[80px] h-[80px] rounded-full border border-black/20 bg-white
|
||||||
|
grid place-items-center shadow-sm hover:bg-black/[0.03]"
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
src="/images/landing/icon_right_arrow.png"
|
||||||
|
alt="다음"
|
||||||
|
width={12}
|
||||||
|
height={22}
|
||||||
|
className="w-[12px] h-[22px]"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
|
||||||
|
{/* 뷰포트 */}
|
||||||
|
<div
|
||||||
|
className={[
|
||||||
|
"overflow-hidden",
|
||||||
|
"select-none touch-pan-y",
|
||||||
|
"cursor-grab active:cursor-grabbing",
|
||||||
|
"w-[583px] h-[400px] mx-auto",
|
||||||
|
].join(" ")}
|
||||||
|
onPointerDown={onPointerDown}
|
||||||
|
onPointerMove={onPointerMove}
|
||||||
|
onPointerUp={onPointerUp}
|
||||||
|
onPointerCancel={onPointerUp}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="flex transition-transform duration-300 ease-out"
|
||||||
|
style={{ transform: `translateX(-${idx * 100}%)` }}
|
||||||
|
>
|
||||||
|
{safeSlides.map((s, i) => (
|
||||||
|
<div key={`${s.src}-${i}`} className="min-w-full">
|
||||||
|
<Image
|
||||||
|
src={s.src}
|
||||||
|
alt={s.alt ?? `slide-${i + 1}`}
|
||||||
|
width={583}
|
||||||
|
height={400}
|
||||||
|
className="w-full h-full object-contain"
|
||||||
|
style={{ width: "100%", height: "100%" }}
|
||||||
|
draggable={false}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* 도트 */}
|
||||||
|
{canSlide && (
|
||||||
|
<div className="mt-3 flex items-center justify-center gap-2">
|
||||||
|
{safeSlides.map((_, i) => {
|
||||||
|
const active = i === idx;
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
key={i}
|
||||||
|
type="button"
|
||||||
|
onClick={() => setIdx(i)}
|
||||||
|
aria-label={`${i + 1}번 슬라이드`}
|
||||||
|
className={[
|
||||||
|
"h-2 w-2 rounded-full",
|
||||||
|
active ? "bg-black/70" : "bg-black/20 hover:bg-black/35",
|
||||||
|
].join(" ")}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
);
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user