Compare commits
710
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c72fa450bc | ||
|
|
400d6cf732 | ||
|
|
39e2734a49 | ||
|
|
d92d4d3949 | ||
|
|
b93efa5503 | ||
|
|
0b8559891a | ||
|
|
ffa1781005 | ||
|
|
b47c0dff2b | ||
|
|
83f5d878e7 | ||
|
|
e815b9662f | ||
|
|
2e6cbad49c | ||
|
|
ede5ef6a21 | ||
|
|
621d222799 | ||
|
|
01df37d0b3 | ||
|
|
072a5337a3 | ||
|
|
2a0f5dce25 | ||
|
|
26f2c60f4c | ||
|
|
28d0e21815 | ||
|
|
49c475709f | ||
|
|
31b8152d37 | ||
|
|
b9f5eb50e5 | ||
|
|
c7772a0a23 | ||
|
|
392ccefb16 | ||
|
|
aeaf507c47 | ||
|
|
2f4cfa0d78 | ||
|
|
ebfc520d67 | ||
|
|
4df286b086 | ||
|
|
262cf21546 | ||
|
|
056b7bae3c | ||
|
|
428f617802 | ||
|
|
e797bdbdf7 | ||
|
|
cb11ec839e | ||
|
|
772dd1c1aa | ||
|
|
579e599eb1 | ||
|
|
3cc8fcb2eb | ||
|
|
f644bd6b7e | ||
|
|
f685884ed7 | ||
|
|
a2af60d52e | ||
|
|
395590bbe4 | ||
|
|
6c0d65a69a | ||
|
|
a6b34780ae | ||
|
|
a83ea455fb | ||
|
|
ab63cbe992 | ||
|
|
b2a6285475 | ||
|
|
6808430c9a | ||
|
|
dad8b9925e | ||
|
|
07c7947da1 | ||
|
|
35e1203168 | ||
|
|
bec3132417 | ||
|
|
e7a46ac3a2 | ||
|
|
6fb39d6384 | ||
|
|
0ad7d6a2c4 | ||
|
|
8fbecc41a5 | ||
|
|
711adc2e17 | ||
|
|
4920b4c1a2 | ||
|
|
c4f2af0bfe | ||
|
|
190adb6bc1 | ||
|
|
59bccfe1d6 | ||
|
|
84ff24c5b5 | ||
|
|
e1b48ab7c8 | ||
|
|
4c3be448f0 | ||
|
|
8ede32f4c4 | ||
|
|
2862fdc9fd | ||
|
|
a446739432 | ||
|
|
ea125605d1 | ||
|
|
8353800dac | ||
|
|
6492ad5500 | ||
|
|
523925459c | ||
|
|
d5c967e9ad | ||
|
|
804688b3c1 | ||
|
|
8435096e5a | ||
|
|
a028b6ae8b | ||
|
|
7d95ddf6a5 | ||
|
|
ddf3a5cfa0 | ||
|
|
0bb16f9795 | ||
|
|
c22e07bc16 | ||
|
|
18ec5c937f | ||
|
|
8b1e8ae2eb | ||
|
|
e0171a5a28 | ||
|
|
43f210a141 | ||
|
|
492ffa52ce | ||
|
|
b15fbc6c9d | ||
|
|
ea5176f6a2 | ||
|
|
d95b98e977 | ||
|
|
68db7f38bf | ||
|
|
e41baa5d72 | ||
|
|
e4da00f201 | ||
|
|
6903528088 | ||
|
|
4cea962403 | ||
|
|
1dd7de479c | ||
|
|
356a1943a9 | ||
|
|
80d0c5ee01 | ||
|
|
405458b069 | ||
|
|
d3748e8609 | ||
|
|
c204ba3670 | ||
|
|
980fffcd19 | ||
|
|
aa85bd9c87 | ||
|
|
ab492fc842 | ||
|
|
f6a8f76cd7 | ||
|
|
d836f82885 | ||
|
|
b0c28f2388 | ||
|
|
01b726a975 | ||
|
|
7cb4e97bbf | ||
|
|
4d85d3b345 | ||
|
|
f1054763e1 | ||
|
|
555c5e2de6 | ||
|
|
d1ab0d2f34 | ||
|
|
e687716e22 | ||
|
|
ff78ef96f2 | ||
|
|
ae360985de | ||
|
|
58fe39a639 | ||
|
|
05c2726007 | ||
|
|
01c137efca | ||
|
|
b806134cb4 | ||
|
|
37b03f340b | ||
|
|
2085b78231 | ||
|
|
656a69b008 | ||
|
|
ec3077b41c | ||
|
|
0110abeffa | ||
|
|
9b000fa376 | ||
|
|
6b7c7ec2ac | ||
|
|
760e335ea3 | ||
|
|
19e9d7db04 | ||
|
|
2ad4bd208b | ||
|
|
dc264024d2 | ||
|
|
811170eed0 | ||
|
|
7acc96b75b | ||
|
|
e115a7b2b3 | ||
|
|
0c608e75a0 | ||
|
|
3c1e0f7016 | ||
|
|
074d99aa66 | ||
|
|
eebbb91c47 | ||
|
|
8334323544 | ||
|
|
748aa5f21d | ||
|
|
a04a21ffeb | ||
|
|
92561ab1d3 | ||
|
|
247e6fcd52 | ||
|
|
9e3478252e | ||
|
|
9fbf6d1a6a | ||
|
|
1926d53da6 | ||
|
|
6d606cfce2 | ||
|
|
a23b80431c | ||
|
|
3b39b1001f | ||
|
|
cc22e733ab | ||
|
|
b497292d0f | ||
|
|
96499a8cd0 | ||
|
|
bb6c817852 | ||
|
|
b8ef43e0bd | ||
|
|
ea9a2b0cee | ||
|
|
2c5a80105b | ||
|
|
e352a63db4 | ||
|
|
b930722f5f | ||
|
|
e4ea9369ce | ||
|
|
34bc8b6a5c | ||
|
|
802204fa67 | ||
|
|
b5f360fb3b | ||
|
|
ba25659db9 | ||
|
|
57eb6c59ba | ||
|
|
c2df78e4a8 | ||
|
|
af92a70f13 | ||
|
|
ed7a56480e | ||
|
|
bde20e9a70 | ||
|
|
81770d9605 | ||
|
|
8a4f7d17aa | ||
|
|
95b77d68f6 | ||
|
|
b570db8375 | ||
|
|
58ec7ed002 | ||
|
|
8d2963e46e | ||
|
|
892249b048 | ||
|
|
b66b3a9b55 | ||
|
|
1e21f76c8f | ||
|
|
a21491cffd | ||
|
|
72b92ae9df | ||
|
|
328a68095e | ||
|
|
6249a73aa3 | ||
|
|
8aac0a4ff3 | ||
|
|
e69e83a9c6 | ||
|
|
8dc47fc805 | ||
|
|
38c21b1ad4 | ||
|
|
dec208d640 | ||
|
|
f06fa0f9ab | ||
|
|
fc424a2f46 | ||
|
|
8a874dd114 | ||
|
|
939863fe56 | ||
|
|
5763db71fe | ||
|
|
ab606ad65d | ||
|
|
71ec5588ef | ||
|
|
6330c125c7 | ||
|
|
89e6d0e236 | ||
|
|
e74d554992 | ||
|
|
3a2675f528 | ||
|
|
a71288f324 | ||
|
|
1e32980034 | ||
|
|
30c037f53b | ||
|
|
02a6c7019f | ||
|
|
c2aab3cfc4 | ||
|
|
12b041fdae | ||
|
|
87de574e35 | ||
|
|
f7a3eec904 | ||
|
|
27244ddd79 | ||
|
|
b7ad575883 | ||
|
|
4efb3a803b | ||
|
|
fe71d85bc6 | ||
|
|
2da312f198 | ||
|
|
c3d741fbf9 | ||
|
|
16abacf292 | ||
|
|
7c74fe346f | ||
|
|
3ce6a6295b | ||
|
|
0c3c46eda5 | ||
|
|
cb3705d616 | ||
|
|
9050895b0f | ||
|
|
757dc97bda | ||
|
|
9421c535b9 | ||
|
|
cbbb95bae9 | ||
|
|
55b3155dbf | ||
|
|
4294f3c878 | ||
|
|
a13dc738f3 | ||
|
|
20db700215 | ||
|
|
01427314b1 | ||
|
|
ed368160a2 | ||
|
|
0bf2484e8d | ||
|
|
e5b8bf2685 | ||
|
|
6765b829c3 | ||
|
|
1a24cb7fee | ||
|
|
4f0a445da2 | ||
|
|
29bc717b2c | ||
|
|
061b565f7c | ||
|
|
bc9140206c | ||
|
|
ec91aa461a | ||
|
|
67023952ae | ||
|
|
72c41a5462 | ||
|
|
c394fd4de2 | ||
|
|
12d03e9dd1 | ||
|
|
2851afccca | ||
|
|
46fb2d276b | ||
|
|
baa171b8d1 | ||
|
|
b75caf4f7b | ||
|
|
4a4ec40787 | ||
|
|
ffacf689f9 | ||
|
|
b25c60082a | ||
|
|
757deae40e | ||
|
|
225ebc0983 | ||
|
|
2bf1f4ac70 | ||
|
|
8e0f382278 | ||
|
|
a46fbf5a5d | ||
|
|
93025914fa | ||
|
|
1ec26b3de2 | ||
|
|
4358c0d41e | ||
|
|
46e5ef701d | ||
|
|
2fa18b1879 | ||
|
|
ea0790d1c7 | ||
|
|
cc21f5a044 | ||
|
|
a1511fdacc | ||
|
|
cce216ad9b | ||
|
|
b1822b24ee | ||
|
|
63abf8282b | ||
|
|
da995e19f1 | ||
|
|
7728717e66 | ||
|
|
be6bf1f160 | ||
|
|
b723c5b1ef | ||
|
|
a9e344c2f7 | ||
|
|
6baeb003e4 | ||
|
|
5a5ed9e669 | ||
|
|
2b6d2bddbc | ||
|
|
f1b28246d6 | ||
|
|
e07c29c0ad | ||
|
|
a7b9b9d24a | ||
|
|
50e6d615ae | ||
|
|
88d05c4a86 | ||
|
|
9ab0302e08 | ||
|
|
3ec986dfbe | ||
|
|
58e0322bfe | ||
|
|
e9ff6bbeb5 | ||
|
|
49047576af | ||
|
|
351adea87f | ||
|
|
4481759640 | ||
|
|
81d3b7867f | ||
|
|
f4d6b3415b | ||
|
|
3444a03f31 | ||
|
|
b3a69bf2ef | ||
|
|
17f6e640a6 | ||
|
|
8944fa8f81 | ||
|
|
eef73f36ff | ||
|
|
591ff390c6 | ||
|
|
38461d8a40 | ||
|
|
6d18785c9c | ||
|
|
9ea0a95333 | ||
|
|
90fda952ad | ||
|
|
618e838d6a | ||
|
|
1fca05bcaf | ||
|
|
3c831fe89e | ||
|
|
de4f8d618f | ||
|
|
e4426d61b3 | ||
|
|
fc1aa4fe06 | ||
|
|
9b2e7c19e6 | ||
|
|
5a13a7cf38 | ||
|
|
b444f24d41 | ||
|
|
6038f7cd3e | ||
|
|
2aa202ace3 | ||
|
|
63012618a2 | ||
|
|
1846873602 | ||
|
|
bb70090766 | ||
|
|
2413cdeb6c | ||
|
|
779cc442e8 | ||
|
|
2e05fc61e7 | ||
|
|
6573981505 | ||
|
|
4109ff73bb | ||
|
|
eb5cdf4912 | ||
|
|
4745c87ab0 | ||
|
|
2eecee702d | ||
|
|
5047468c7b | ||
|
|
bf241073b0 | ||
|
|
8b6ade0541 | ||
|
|
12e17e0bd1 | ||
|
|
564ca4116a | ||
|
|
d35730517f | ||
|
|
e0e2530a56 | ||
|
|
fa258323ec | ||
|
|
8e0a1a6b94 | ||
|
|
bb59338520 | ||
|
|
e30130dc8f | ||
|
|
e314369cbb | ||
|
|
8de4c605f2 | ||
|
|
1a4b287b7a | ||
|
|
8b4b5bd0ec | ||
|
|
166fc81f7e | ||
|
|
c47c68f27f | ||
|
|
4224375b3a | ||
|
|
0dd5744229 | ||
|
|
9d99f6044e | ||
|
|
49a699f533 | ||
|
|
7c0e646d21 | ||
|
|
52a5650ca5 | ||
|
|
13ac6d638b | ||
|
|
657361a141 | ||
|
|
21610c9c9f | ||
|
|
58c300ac47 | ||
|
|
46565c1820 | ||
|
|
d88c1310f3 | ||
|
|
ef1643e9da | ||
|
|
dbc56ab2b7 | ||
|
|
e28342a899 | ||
|
|
131dad8230 | ||
|
|
ff563600d7 | ||
|
|
c1d1c2e27e | ||
|
|
f93ca3d71f | ||
|
|
221a9331f7 | ||
|
|
edfd92c98f | ||
|
|
29a7c5d1c5 | ||
|
|
0afd2310de | ||
|
|
89b8f0fa38 | ||
|
|
d371de4c1c | ||
|
|
3b19ff32c8 | ||
|
|
a6fb951aa6 | ||
|
|
208c2fd321 | ||
|
|
5ed4e0d48d | ||
|
|
886b1e8d75 | ||
|
|
25f04e565a | ||
|
|
eac8e9fdbe | ||
|
|
75feb78baf | ||
|
|
c2ee97901a | ||
|
|
ff13d7b509 | ||
|
|
66eb77385b | ||
|
|
2abbf857c0 | ||
|
|
ff351059cf | ||
|
|
c1d741dd49 | ||
|
|
61411158d1 | ||
|
|
3bba3dce98 | ||
|
|
234f2bc0a7 | ||
|
|
4691f3b981 | ||
|
|
2642f73432 | ||
|
|
1e524ba9c5 | ||
|
|
3513daa004 | ||
|
|
56afbf2b2c | ||
|
|
1a6af2168b | ||
|
|
43c50d694f | ||
|
|
2592a52c10 | ||
|
|
b0861e5182 | ||
|
|
349b820790 | ||
|
|
f97bdf1bd5 | ||
|
|
3c73ba7125 | ||
|
|
b396a14a5d | ||
|
|
2dd80be17f | ||
|
|
a4976628c1 | ||
|
|
5e99562c5e | ||
|
|
f2f7c86cd1 | ||
|
|
b1096ed9df | ||
|
|
5ec33d0165 | ||
|
|
892c3d1eee | ||
|
|
04b365b94d | ||
|
|
56ec625f90 | ||
|
|
e428e17b52 | ||
|
|
bb9db3c927 | ||
|
|
8e7d32a48b | ||
|
|
0b8790afba | ||
|
|
4503181684 | ||
|
|
f7580defc9 | ||
|
|
7fc94abf86 | ||
|
|
2ec22b41eb | ||
|
|
af9c36527d | ||
|
|
25ef037bb0 | ||
|
|
711739df33 | ||
|
|
2703c34528 | ||
|
|
2a16e7151f | ||
|
|
b7f345fdf7 | ||
|
|
7c83ec0555 | ||
|
|
37eb11f303 | ||
|
|
eb912a49f0 | ||
|
|
f7c8518e57 | ||
|
|
4e9770e197 | ||
|
|
b3a8c6af36 | ||
|
|
777415adb5 | ||
|
|
921592a121 | ||
|
|
a7035b774e | ||
|
|
31b6326821 | ||
|
|
46c3f50432 | ||
|
|
d97de2861e | ||
|
|
8b20d7e88e | ||
|
|
02ada9925a | ||
|
|
5d271ebdb9 | ||
|
|
c0067eb007 | ||
|
|
7bda770200 | ||
|
|
5b71fa6dfe | ||
|
|
d842ac599e | ||
|
|
b695cc968b | ||
|
|
52080d2b1a | ||
|
|
a6b6ae3576 | ||
|
|
051c158e22 | ||
|
|
cbb41bb200 | ||
|
|
32070a3736 | ||
|
|
6269fbc8c5 | ||
|
|
11f1c75ac4 | ||
|
|
2a47e479aa | ||
|
|
0bfb84406f | ||
|
|
ab13d14361 | ||
|
|
abda62eebb | ||
|
|
c5d2cc53a4 | ||
|
|
c79b4ca18d | ||
|
|
f5c8e452be | ||
|
|
fb8812303b | ||
|
|
e332162984 | ||
|
|
d2c7bbb78b | ||
|
|
59a5175832 | ||
|
|
ad7b78688f | ||
|
|
103c5d3cb1 | ||
|
|
c5f7d62908 | ||
|
|
7d56ba0243 | ||
|
|
80b356f66b | ||
|
|
0d13f5eac6 | ||
|
|
200997f4af | ||
|
|
5a68142046 | ||
|
|
5fd8c6e6a6 | ||
|
|
db74c07df8 | ||
|
|
1d9111ee4c | ||
|
|
76a511a5e0 | ||
|
|
970bfc6c82 | ||
|
|
7c34c87aaf | ||
|
|
7d5ce5e3ec | ||
|
|
8b1a58f458 | ||
|
|
f4f3d2a3e9 | ||
|
|
60c06bd505 | ||
|
|
8a73793d1c | ||
|
|
76e9651a91 | ||
|
|
bf32364514 | ||
|
|
d02b17ba12 | ||
|
|
5b62171b01 | ||
|
|
71fab8cc63 | ||
|
|
011b87784d | ||
|
|
cec35e6724 | ||
|
|
7bbab96c4b | ||
|
|
df55c3fe12 | ||
|
|
ea0c85b0c3 | ||
|
|
fc8bd5c7b9 | ||
|
|
e579684b28 | ||
|
|
7e34bb6048 | ||
|
|
f379425fa7 | ||
|
|
f592ab31d8 | ||
|
|
d8d4560823 | ||
|
|
ddef447c62 | ||
|
|
be4bbdb3f1 | ||
|
|
916c068706 | ||
|
|
aa7ef37aaf | ||
|
|
5d1aaa2595 | ||
|
|
ef2f4f7b9e | ||
|
|
dd381c3a7f | ||
|
|
27aa9739a0 | ||
|
|
59f035f98d | ||
|
|
a2c8424838 | ||
|
|
7c39e16c37 | ||
|
|
7242dd54db | ||
|
|
b3a25f8f85 | ||
|
|
022eeb6187 | ||
|
|
26c36dd966 | ||
|
|
ea3ecec9fc | ||
|
|
b5d70a9534 | ||
|
|
498b86ce76 | ||
|
|
57beda429a | ||
|
|
fcf39d2222 | ||
|
|
2cc8d5209c | ||
|
|
7733426636 | ||
|
|
01ebab4a94 | ||
|
|
3fbcb0efca | ||
|
|
b20948fcfe | ||
|
|
c9138b72ca | ||
|
|
6b49aeb2d5 | ||
|
|
c975317638 | ||
|
|
79ea2e56d5 | ||
|
|
1fe8955c46 | ||
|
|
39977e4491 | ||
|
|
03179ede64 | ||
|
|
d56d4fc00d | ||
|
|
ed96df4b22 | ||
|
|
d936c71f7e | ||
|
|
620faff7cd | ||
|
|
0d83e0f4cc | ||
|
|
32271a86a0 | ||
|
|
bcf57b21ca | ||
|
|
da1795a519 | ||
|
|
45a0ff043d | ||
|
|
b6d318c546 | ||
|
|
6af38137fc | ||
|
|
819a6508bf | ||
|
|
5e59a25bff | ||
|
|
44e2bfedc3 | ||
|
|
20d44c09ff | ||
|
|
6f263a185e | ||
|
|
d5ccab7212 | ||
|
|
af3c78ad1d | ||
|
|
1f2316d8b4 | ||
|
|
0cbd48354c | ||
|
|
915b657357 | ||
|
|
711412b82e | ||
|
|
c1134d5858 | ||
|
|
209954cbc3 | ||
|
|
31140ea190 | ||
|
|
ed38451f84 | ||
|
|
3f7ea2bcd8 | ||
|
|
a40d5a37a2 | ||
|
|
2ab3439ae5 | ||
|
|
2cd199b33a | ||
|
|
b657ee97eb | ||
|
|
7641cb332f | ||
|
|
34a70ca21a | ||
|
|
1fd522e49b | ||
|
|
5d5b97d39f | ||
|
|
c7c868431f | ||
|
|
0f0ddb6c26 | ||
|
|
8ceebc053c | ||
|
|
a4089a6589 | ||
|
|
8d7bf04145 | ||
|
|
e36bfe7267 | ||
|
|
031307aa18 | ||
|
|
c50c2685c1 | ||
|
|
f6f03a62cb | ||
|
|
f2167e69a3 | ||
|
|
13d58d1153 | ||
|
|
5b314dae08 | ||
|
|
d1ed7dac62 | ||
|
|
3e0da6da8b | ||
|
|
3cc0a6d743 | ||
|
|
fe66bc4e88 | ||
|
|
8a459f1110 | ||
|
|
e99c15018f | ||
|
|
e125b76bbe | ||
|
|
cd7e0fe621 | ||
|
|
0c0d718ea9 | ||
|
|
255da1ca8c | ||
|
|
02b0750a5c | ||
|
|
37a9382d86 | ||
|
|
143e7581fd | ||
|
|
fbcaa5bc11 | ||
|
|
9c2a1e5c62 | ||
|
|
b3e5cb84d3 | ||
|
|
751ce5bff9 | ||
|
|
83b3fad3af | ||
|
|
934a84353b | ||
|
|
e763528985 | ||
|
|
7ea2521a93 | ||
|
|
9421b99d28 | ||
|
|
54da5e1e96 | ||
|
|
08adf380e6 | ||
|
|
54140dbad5 | ||
|
|
4bc1b6903f | ||
|
|
9cf281db7e | ||
|
|
929290588b | ||
|
|
9b07952340 | ||
|
|
e4350f71cd | ||
|
|
119d74d269 | ||
|
|
557cb7c882 | ||
|
|
d16645d0aa | ||
|
|
2a1430da6c | ||
|
|
e49e330384 | ||
|
|
2edc54f965 | ||
|
|
1978553a9d | ||
|
|
c39afc3114 | ||
|
|
b0dfec9825 | ||
|
|
547244872d | ||
|
|
ea20ceacb3 | ||
|
|
f4b0af5ede | ||
|
|
893aec4970 | ||
|
|
ecc11720ac | ||
|
|
33365348ef | ||
|
|
0dcbe8549c | ||
|
|
5579ab677d | ||
|
|
c5830e0326 | ||
|
|
dd05769560 | ||
|
|
464f026ad1 | ||
|
|
ab87185453 | ||
|
|
29cf135892 | ||
|
|
5b9747b7b1 | ||
|
|
c3f8c79282 | ||
|
|
dcbd89fc08 | ||
|
|
dccb055498 | ||
|
|
5aebb3ba77 | ||
|
|
27c4204fd8 | ||
|
|
6af9fc00a9 | ||
|
|
31e2e3dea1 | ||
|
|
b3c655ba95 | ||
|
|
852cb00d01 | ||
|
|
19621c17b4 | ||
|
|
b6e847a55a | ||
|
|
8bb8825c5e | ||
|
|
181307eeb6 | ||
|
|
2c3b2785bc | ||
|
|
842e63cef1 | ||
|
|
a0ee6f34f5 | ||
|
|
515f75bd80 | ||
|
|
9304cf4f8e | ||
|
|
165a1c4a06 | ||
|
|
16bcaf8947 | ||
|
|
d2564012e3 | ||
|
|
a2d48745b3 | ||
|
|
713d4efd46 | ||
|
|
381bae8e26 | ||
|
|
7e879ef7ad | ||
|
|
dc6348e4f9 | ||
|
|
9d5bffb403 | ||
|
|
27997ca4bb | ||
|
|
a5aeeb3d40 | ||
|
|
7c811df864 | ||
|
|
f5d8f8fe23 | ||
|
|
6487b3c11e | ||
|
|
1c603efc62 | ||
|
|
ca011a5e18 | ||
|
|
fd3ce87e97 | ||
|
|
1493d0c696 | ||
|
|
401b68fe24 | ||
|
|
039773682e | ||
|
|
f949319db3 | ||
|
|
7053966007 | ||
|
|
7ef8f986fc | ||
|
|
55912433f6 | ||
|
|
1fa892e150 | ||
|
|
aae94a83ec | ||
|
|
e1fcaad736 | ||
|
|
fd2dab7a77 | ||
|
|
a83cb2709c | ||
|
|
cd6568f4df | ||
|
|
c6b8e53c17 | ||
|
|
b6fa68453a | ||
|
|
faed554108 | ||
|
|
5288439625 | ||
|
|
cbb915a3e5 | ||
|
|
166cc26ad8 | ||
|
|
d4c58a19df | ||
|
|
1ec052cdc7 | ||
|
|
a2ac2433f7 | ||
|
|
e0dabac1e6 | ||
|
|
4b8ec343c9 | ||
|
|
6438ab6ade | ||
|
|
decf190712 | ||
|
|
f679277192 | ||
|
|
1cfae09b33 | ||
|
|
b6730c1e15 | ||
|
|
5ae9529afe | ||
|
|
5c3e7d6b97 | ||
|
|
1b7affe789 | ||
|
|
be18d726f6 | ||
|
|
3442edc92c | ||
|
|
fccfa500c8 | ||
|
|
5985154d06 | ||
|
|
a9ae39b013 | ||
|
|
17a097cf34 | ||
|
|
618828c7d7 | ||
|
|
09f3c6318a | ||
|
|
03f0a243f5 | ||
|
|
c3c9f841c4 | ||
|
|
04d43408f7 | ||
|
|
de96cb5acb | ||
|
|
a59d814bc7 | ||
|
|
774a7e084a | ||
|
|
34145fbc28 | ||
|
|
d8b1aa8821 | ||
|
|
a8fa116db4 | ||
|
|
d0b95fdab6 | ||
|
|
ab97811c9a | ||
|
|
72ac0f59c9 | ||
|
|
409c784387 | ||
|
|
bd07aaabb0 | ||
|
|
0cf806da24 | ||
|
|
deea89fbb2 | ||
|
|
aad3e978b8 | ||
|
|
3208b02fb2 | ||
|
|
b095dda5ad | ||
|
|
16bed41772 | ||
|
|
0ebe5e8ab8 | ||
|
|
6b2b5b56d4 | ||
|
|
e8c839235f | ||
|
|
66126bbe62 | ||
|
|
bde01e8039 |
+1
-1
@@ -18,5 +18,5 @@ apps/wr/.next/**/*
|
||||
apps/fo/.next/**/*
|
||||
|
||||
# env
|
||||
.env*
|
||||
#.env*
|
||||
.qodo
|
||||
|
||||
Generated
+8
@@ -0,0 +1,8 @@
|
||||
# 디폴트 무시된 파일
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 에디터 기반 HTTP 클라이언트 요청
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
@@ -0,0 +1,28 @@
|
||||
"use client";
|
||||
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { MenuApi } from "@/entities/menu";
|
||||
import { useMenuStore } from "@/shared/lib";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { PageLayout } from "@/shared/ui/page-layout";
|
||||
|
||||
export default function ContentsLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const currentMenuInfo = useMenuStore((state) => state.currentMenuInfo);
|
||||
const { data } = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.MENUS, currentMenuInfo?.menuCd],
|
||||
queryFn: () =>
|
||||
MenuApi.getMenuInfo(currentMenuInfo?.menuCd.toString() ?? ""),
|
||||
enabled: !!currentMenuInfo,
|
||||
});
|
||||
const menuPaths = data?.menuPath?.split(">").map((path) => path.trim());
|
||||
|
||||
return (
|
||||
<PageLayout title={data?.menuKornNm ?? ""} menuPaths={menuPaths ?? []}>
|
||||
{children}
|
||||
</PageLayout>
|
||||
);
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { ModifyPage } from "@/pages/(pst)/faq";
|
||||
import { ModifyPage } from "@/pages/(post)/faq";
|
||||
|
||||
export default async function PstBbsFaqPostModifyPage({
|
||||
params,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { FaqPage } from "@/pages/(pst)/faq";
|
||||
import { FaqPage } from "@/pages/(post)/faq";
|
||||
|
||||
export default async function PstBbsFaqPage({
|
||||
params,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { CreatePage } from "@/pages/(pst)/faq";
|
||||
import { CreatePage } from "@/pages/(post)/faq";
|
||||
|
||||
export default async function PstBbsFaqRegisterPage({
|
||||
params,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { ModifyPage } from "@/pages/(pst)/image";
|
||||
import { ModifyPage } from "@/pages/(post)/image";
|
||||
|
||||
export default async function PstBbsImagePostModifyPage({
|
||||
params,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { ImagePost } from "@/pages/(pst)/image";
|
||||
import { ImagePost } from "@/pages/(post)/image";
|
||||
|
||||
export default async function PstBbsImagePostPage({
|
||||
params,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { ImagePage } from "@/pages/(pst)/image";
|
||||
import { ImagePage } from "@/pages/(post)/image";
|
||||
|
||||
export default async function PstBbsImagePage({
|
||||
params,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { CreatePage } from "@/pages/(pst)/image";
|
||||
import { CreatePage } from "@/pages/(post)/image";
|
||||
|
||||
export default async function PstBbsImageRegisterPage({
|
||||
params,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { ModifyPage } from "@/pages/(pst)/movie";
|
||||
import { ModifyPage } from "@/pages/(post)/movie";
|
||||
|
||||
export default async function PstBbsMoviePostModifyPage({
|
||||
params,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { MoviePost } from "@/pages/(pst)/movie";
|
||||
import { MoviePost } from "@/pages/(post)/movie";
|
||||
|
||||
export default async function PstBbsMoviePostPage({
|
||||
params,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { MoviePage } from "@/pages/(pst)/movie";
|
||||
import { MoviePage } from "@/pages/(post)/movie";
|
||||
|
||||
export default async function PstBbsMoviePage({
|
||||
params,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { CreatePage } from "@/pages/(pst)/movie";
|
||||
import { CreatePage } from "@/pages/(post)/movie";
|
||||
|
||||
export default async function PstBbsMovieRegisterPage({
|
||||
params,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { CreatePage } from "@/pages/(pst)/normal";
|
||||
import { CreatePage } from "@/pages/(post)/normal";
|
||||
|
||||
export default async function PstBbsNormalAnswerPage({
|
||||
params,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { ModifyPage } from "@/pages/(pst)/normal";
|
||||
import { ModifyPage } from "@/pages/(post)/normal";
|
||||
|
||||
export default async function PstBbsNormalPostModifyPage({
|
||||
params,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { NormalPost } from "@/pages/(pst)/normal";
|
||||
import { NormalPost } from "@/pages/(post)/normal";
|
||||
|
||||
export default async function PstBbsNormalPostPage({
|
||||
params,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { NormalPage } from "@/pages/(pst)/normal";
|
||||
import { NormalPage } from "@/pages/(post)/normal";
|
||||
|
||||
export default async function PstBbsNormalPage({
|
||||
params,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { CreatePage } from "@/pages/(pst)/normal";
|
||||
import { CreatePage } from "@/pages/(post)/normal";
|
||||
|
||||
export default async function PstBbsNormalRegisterPage({
|
||||
params,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { ModifyPage } from "@/pages/(pst)/notice";
|
||||
import { ModifyPage } from "@/pages/(post)/notice";
|
||||
|
||||
export default async function PstBbsNoticePostModifyPage({
|
||||
params,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { NoticePost } from "@/pages/(pst)/notice";
|
||||
import { NoticePost } from "@/pages/(post)/notice";
|
||||
|
||||
export default async function PstBbsNoticePostPage({
|
||||
params,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { NoticePage } from "@/pages/(pst)/notice";
|
||||
import { NoticePage } from "@/pages/(post)/notice";
|
||||
|
||||
export default async function PstBbsNoticePage({
|
||||
params,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { CreatePage } from "@/pages/(pst)/notice";
|
||||
import { CreatePage } from "@/pages/(post)/notice";
|
||||
|
||||
export default async function PstBbsNoticeRegisterPage({
|
||||
params,
|
||||
@@ -0,0 +1,28 @@
|
||||
"use client";
|
||||
|
||||
import { MenuApi } from "@/entities/menu";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useMenuStore } from "@/shared/lib";
|
||||
import { PageLayout } from "@/shared/ui/page-layout";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
|
||||
export default function PostLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const { bbsInfo, currentMenuInfo } = useMenuStore((state) => state);
|
||||
const { data } = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.MENUS, currentMenuInfo?.menuCd],
|
||||
queryFn: () =>
|
||||
MenuApi.getMenuInfo(currentMenuInfo?.menuCd.toString() ?? ""),
|
||||
enabled: !!currentMenuInfo,
|
||||
});
|
||||
const menuPaths = data?.menuPath?.split(">").map((path) => path.trim());
|
||||
|
||||
return (
|
||||
<PageLayout title={bbsInfo?.bbsNm ?? ""} menuPaths={menuPaths ?? []}>
|
||||
{children}
|
||||
</PageLayout>
|
||||
);
|
||||
}
|
||||
@@ -1,12 +1,10 @@
|
||||
"use client";
|
||||
|
||||
import { usePathname, useRouter } from "next/navigation";
|
||||
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
import { BaseLayout } from "@common/components";
|
||||
import { MenuApi, type MenuRole } from "@/entities/menu";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { getCookie, useMenuStore } from "@/shared/lib";
|
||||
import { PageLayout } from "@/shared/ui/page-layout";
|
||||
import type { MenuRole } from "@/entities/menu";
|
||||
import { useMenuStore } from "@/shared/lib";
|
||||
|
||||
export default function WithBaseLayout({
|
||||
children,
|
||||
@@ -16,16 +14,6 @@ export default function WithBaseLayout({
|
||||
const router = useRouter();
|
||||
const pathname = usePathname();
|
||||
const queryClient = useQueryClient();
|
||||
const bbsInfo = useMenuStore((state) => state.bbsInfo);
|
||||
|
||||
const menuCd = getCookie("menu-code-key");
|
||||
const { data } = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.MENUS, menuCd],
|
||||
queryFn: () => MenuApi.getMenuInfo(menuCd!),
|
||||
enabled: !!menuCd,
|
||||
});
|
||||
|
||||
const menuPaths = data?.menuPath?.split(">").map((path) => path.trim());
|
||||
|
||||
const setCurrentMenuInfo = useMenuStore((state) => state.setCurrentMenuInfo);
|
||||
|
||||
@@ -40,9 +28,7 @@ export default function WithBaseLayout({
|
||||
currentPath={pathname ?? ""}
|
||||
handleMenuClick={handleMenuClick}
|
||||
>
|
||||
<PageLayout title={bbsInfo?.bbsNm ?? ""} menuPaths={menuPaths ?? []}>
|
||||
{children}
|
||||
</PageLayout>
|
||||
{children}
|
||||
</BaseLayout>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -21,9 +21,11 @@ export class ContentsApiService implements ContentsService {
|
||||
|
||||
public async getLatestApprovedContentsInfo(
|
||||
contsSn: number,
|
||||
menuCd: string,
|
||||
): Promise<ContentsDetail> {
|
||||
const response = await client.get<ContentsDetail>(
|
||||
`${ENDPOINT.CMS_SERVICE.CONTENTS}/${contsSn}`,
|
||||
{ params: { menuCd } },
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
@@ -65,6 +65,7 @@ export const contentsDetailSchema = z.object({
|
||||
aprvDt: z.string(),
|
||||
autzr: z.string(),
|
||||
useYn: z.string(),
|
||||
menuPicUserUnqIdNm: z.string().nullish(),
|
||||
});
|
||||
|
||||
export const contentsFormSchema = contentsDetailSchema.omit({
|
||||
@@ -81,7 +82,10 @@ export type ContentsVersionList = PageableList<ContentsVersion>;
|
||||
|
||||
export interface ContentsService {
|
||||
getContentsList(params: ContentsParams): Promise<ContentsList>;
|
||||
getLatestApprovedContentsInfo(contsSn: number): Promise<ContentsDetail>;
|
||||
getLatestApprovedContentsInfo(
|
||||
contsSn: number,
|
||||
menuCd: string,
|
||||
): Promise<ContentsDetail>;
|
||||
getContentsVersionList(
|
||||
params: ContentsVersionParams,
|
||||
): Promise<ContentsVersionList>;
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
import { client } from "@/shared/api";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import type {
|
||||
MenuEvaluation,
|
||||
MenuEvaluationDetail,
|
||||
MenuEvaluationParams,
|
||||
MenuEvaluationService,
|
||||
MenuEvaluationCreateRequestDto,
|
||||
MenuEvaluationUpdateRequestDto,
|
||||
PageMenuEvaluationListResponseDto,
|
||||
} from "../model/menu-evaluation-interface";
|
||||
|
||||
export class MenuEvaluationApiService implements MenuEvaluationService {
|
||||
public async getMenuEvaluationList(
|
||||
params: MenuEvaluationParams,
|
||||
): Promise<PageMenuEvaluationListResponseDto> {
|
||||
const response = await client.get<PageMenuEvaluationListResponseDto>(
|
||||
`${ENDPOINT.CMS_SERVICE.MENU_EVALUATION}`,
|
||||
{ params },
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async getMenuEvaluation(
|
||||
menuEvlSn: number,
|
||||
): Promise<MenuEvaluationDetail> {
|
||||
const response = await client.get<MenuEvaluationDetail>(
|
||||
`${ENDPOINT.CMS_SERVICE.MENU_EVALUATION}/${menuEvlSn}`,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async createMenuEvaluation(
|
||||
data: MenuEvaluationCreateRequestDto,
|
||||
): Promise<MenuEvaluation> {
|
||||
const response = await client.post<MenuEvaluation>(
|
||||
`${ENDPOINT.CMS_SERVICE.MENU_EVALUATION}`,
|
||||
data,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async updateMenuEvaluation(
|
||||
menuEvlSn: number,
|
||||
data: MenuEvaluationUpdateRequestDto,
|
||||
): Promise<MenuEvaluation> {
|
||||
const response = await client.put<MenuEvaluation>(
|
||||
`${ENDPOINT.CMS_SERVICE.MENU_EVALUATION}/${menuEvlSn}`,
|
||||
data,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async deleteMenuEvaluation(menuEvlSn: number): Promise<void> {
|
||||
await client.delete(`${ENDPOINT.CMS_SERVICE.MENU_EVALUATION}/${menuEvlSn}`);
|
||||
}
|
||||
}
|
||||
|
||||
export const MenuEvaluationApi = new MenuEvaluationApiService();
|
||||
@@ -0,0 +1,66 @@
|
||||
import { client } from "@/shared/api";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import type {
|
||||
MenuModificationDemand,
|
||||
MenuModificationDemandCreateRequestDto,
|
||||
MenuModificationDemandDetail,
|
||||
MenuModificationDemandParams,
|
||||
MenuModificationDemandService,
|
||||
MenuModificationDemandUpdateRequestDto,
|
||||
PageMenuModificationDemandListResponseDto,
|
||||
} from "../model/menu-modification-demand-interface";
|
||||
|
||||
export class MenuModificationDemandApiService
|
||||
implements MenuModificationDemandService
|
||||
{
|
||||
public async getMenuModificationDemandList(
|
||||
params: MenuModificationDemandParams,
|
||||
): Promise<PageMenuModificationDemandListResponseDto> {
|
||||
const response =
|
||||
await client.get<PageMenuModificationDemandListResponseDto>(
|
||||
`${ENDPOINT.CMS_SERVICE.MENU_MODIFICATION_DEMAND}`,
|
||||
{ params },
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async getMenuModificationDemand(
|
||||
mdfcnRcptNo: number,
|
||||
): Promise<MenuModificationDemandDetail> {
|
||||
const response = await client.get<MenuModificationDemandDetail>(
|
||||
`${ENDPOINT.CMS_SERVICE.MENU_MODIFICATION_DEMAND}/${mdfcnRcptNo}`,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async createMenuModificationDemand(
|
||||
data: MenuModificationDemandCreateRequestDto,
|
||||
): Promise<MenuModificationDemand> {
|
||||
const response = await client.post<MenuModificationDemand>(
|
||||
`${ENDPOINT.CMS_SERVICE.MENU_MODIFICATION_DEMAND}`,
|
||||
data,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async updateMenuModificationDemand(
|
||||
mdfcnRcptNo: number,
|
||||
data: MenuModificationDemandUpdateRequestDto,
|
||||
): Promise<MenuModificationDemand> {
|
||||
const response = await client.put<MenuModificationDemand>(
|
||||
`${ENDPOINT.CMS_SERVICE.MENU_MODIFICATION_DEMAND}/${mdfcnRcptNo}`,
|
||||
data,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async deleteMenuModificationDemand(
|
||||
mdfcnRcptNo: number,
|
||||
): Promise<void> {
|
||||
await client.delete(
|
||||
`${ENDPOINT.CMS_SERVICE.MENU_MODIFICATION_DEMAND}/${mdfcnRcptNo}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export const MenuModificationDemandApi = new MenuModificationDemandApiService();
|
||||
@@ -0,0 +1,49 @@
|
||||
import type { PageableList, PageableParams } from "@/shared/model";
|
||||
|
||||
export interface MenuEvaluationParams extends PageableParams {
|
||||
menuCd?: number;
|
||||
siteId?: string;
|
||||
evlIp?: string;
|
||||
}
|
||||
|
||||
export interface MenuEvaluation {
|
||||
evlSn: number;
|
||||
menuCd: number;
|
||||
siteId: string;
|
||||
evlDt: string;
|
||||
evlScr: number;
|
||||
}
|
||||
|
||||
export interface MenuEvaluationDetail extends MenuEvaluation {
|
||||
evlIp: string;
|
||||
userUnqId: string;
|
||||
}
|
||||
|
||||
export interface MenuEvaluationCreateRequestDto {
|
||||
menuCd: number;
|
||||
siteId: string;
|
||||
evlIp?: string;
|
||||
evlScr: number;
|
||||
userUnqId: string;
|
||||
}
|
||||
|
||||
export interface MenuEvaluationUpdateRequestDto {
|
||||
evlScr: number;
|
||||
}
|
||||
|
||||
export type PageMenuEvaluationListResponseDto = PageableList<MenuEvaluation>;
|
||||
|
||||
export interface MenuEvaluationService {
|
||||
getMenuEvaluationList(
|
||||
params: MenuEvaluationParams,
|
||||
): Promise<PageMenuEvaluationListResponseDto>;
|
||||
getMenuEvaluation(menuEvlSn: number): Promise<MenuEvaluationDetail>;
|
||||
createMenuEvaluation(
|
||||
data: MenuEvaluationCreateRequestDto,
|
||||
): Promise<MenuEvaluation>;
|
||||
updateMenuEvaluation(
|
||||
menuEvlSn: number,
|
||||
data: MenuEvaluationUpdateRequestDto,
|
||||
): Promise<MenuEvaluation>;
|
||||
deleteMenuEvaluation(menuEvlSn: number): Promise<void>;
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
import type { PageableList, PageableParams } from "@/shared/model";
|
||||
import { z } from "zod";
|
||||
|
||||
export interface MenuModificationDemandParams extends PageableParams {
|
||||
menuCd?: number;
|
||||
siteId?: string;
|
||||
mdfcnDmndSttusCd?: string;
|
||||
}
|
||||
|
||||
export interface MenuModificationDemand {
|
||||
mdfcnRcptNo: number;
|
||||
menuCd: number;
|
||||
rcptDt: string;
|
||||
aplcnt: string;
|
||||
aplcnYn: string;
|
||||
}
|
||||
|
||||
export interface MenuModificationDemandDetail extends MenuModificationDemand {
|
||||
mdfcnCn: string;
|
||||
userUnqId: string;
|
||||
aplcntEml: string;
|
||||
}
|
||||
|
||||
export const menuModificationDemandCreateRequestDtoSchema = z.object({
|
||||
menuCd: z.number(),
|
||||
mdfcnCn: z.string(),
|
||||
userUnqId: z.string().optional(),
|
||||
aplcnt: z.string(),
|
||||
aplcntEml: z.string().optional(),
|
||||
});
|
||||
|
||||
export const menuModificationDemandUpdateRequestDtoSchema = z.object({
|
||||
mdfcnCn: z.string(),
|
||||
aplcntEml: z.string().optional(),
|
||||
aplcnYn: z.string(),
|
||||
});
|
||||
|
||||
export type MenuModificationDemandCreateRequestDto = z.infer<
|
||||
typeof menuModificationDemandCreateRequestDtoSchema
|
||||
>;
|
||||
|
||||
export type MenuModificationDemandUpdateRequestDto = z.infer<
|
||||
typeof menuModificationDemandUpdateRequestDtoSchema
|
||||
>;
|
||||
|
||||
export type PageMenuModificationDemandListResponseDto =
|
||||
PageableList<MenuModificationDemand>;
|
||||
|
||||
export interface MenuModificationDemandService {
|
||||
getMenuModificationDemandList(
|
||||
params: MenuModificationDemandParams,
|
||||
): Promise<PageMenuModificationDemandListResponseDto>;
|
||||
|
||||
getMenuModificationDemand(
|
||||
mdfcnRcptNo: number,
|
||||
): Promise<MenuModificationDemandDetail>;
|
||||
|
||||
createMenuModificationDemand(
|
||||
data: MenuModificationDemandCreateRequestDto,
|
||||
): Promise<MenuModificationDemand>;
|
||||
|
||||
updateMenuModificationDemand(
|
||||
mdfcnRcptNo: number,
|
||||
data: MenuModificationDemandUpdateRequestDto,
|
||||
): Promise<MenuModificationDemand>;
|
||||
|
||||
deleteMenuModificationDemand(mdfcnRcptNo: number): Promise<void>;
|
||||
}
|
||||
@@ -1,17 +1,71 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect, useRef } from "react";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import dayjs from "dayjs";
|
||||
import Image from "next/image";
|
||||
import { toast } from "sonner";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
||||
import { useClipboard } from "@frontend-opensource/use-react-hooks";
|
||||
import {
|
||||
Button,
|
||||
getCookie,
|
||||
Label,
|
||||
RadioGroup,
|
||||
RadioGroupItem,
|
||||
} from "@common/components";
|
||||
import { CodeApi } from "@/entities/code";
|
||||
import { ContentsApi } from "@/entities/content";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { AUTH_USER_ID, ENDPOINT } from "@/shared/config";
|
||||
import { useAlertStore, useMenuStore } from "@/shared/lib";
|
||||
import { MenuEvaluationApi } from "../api/menu-evaluation-service";
|
||||
import { MenuModificationDemandDialog } from "./menu-modification-demand-dialog";
|
||||
|
||||
function ContentsPage({ contsSn }: { contsSn: number }) {
|
||||
const [evlScr, setEvlScr] = useState(5);
|
||||
const shadowRootRef = useRef<HTMLDivElement>(null);
|
||||
const { copyText, copied } = useClipboard();
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const currentMenuInfo = useMenuStore((state) => state.currentMenuInfo);
|
||||
const siteId = getCookie("site-id-key") ?? "";
|
||||
const userUnqId = getCookie(AUTH_USER_ID) ?? "";
|
||||
|
||||
const { data: contentsDetail } = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.CONTENTS_DETAILS, contsSn],
|
||||
queryFn: () => ContentsApi.getLatestApprovedContentsInfo(contsSn),
|
||||
enabled: !!contsSn,
|
||||
queryFn: () =>
|
||||
ContentsApi.getLatestApprovedContentsInfo(
|
||||
contsSn,
|
||||
currentMenuInfo?.menuCd.toString() ?? "",
|
||||
),
|
||||
enabled: !!contsSn && !!currentMenuInfo,
|
||||
});
|
||||
|
||||
const { data: koglData } = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.CODE, "KOGLCD"],
|
||||
queryFn: () => CodeApi.getCode("KOGLCD"),
|
||||
select: (data) =>
|
||||
data.find((code) => code.lwpoCd === contentsDetail?.koglCd),
|
||||
enabled: !!contentsDetail,
|
||||
});
|
||||
|
||||
const { data: cclData } = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.CODE, "CCLCD"],
|
||||
queryFn: () => CodeApi.getCode("CCLCD"),
|
||||
select: (data) =>
|
||||
data.find((code) => code.lwpoCd === contentsDetail?.cclCd),
|
||||
enabled: !!contentsDetail,
|
||||
});
|
||||
|
||||
const { mutate: menuEvaluation } = useMutation({
|
||||
mutationFn: (evlScr: number) =>
|
||||
MenuEvaluationApi.createMenuEvaluation({
|
||||
menuCd: currentMenuInfo?.menuCd ?? 0,
|
||||
siteId,
|
||||
evlScr,
|
||||
userUnqId,
|
||||
}),
|
||||
onSuccess: () => {
|
||||
alert("게시물 평가가 완료되었습니다.");
|
||||
},
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
@@ -28,10 +82,81 @@ function ContentsPage({ contsSn }: { contsSn: number }) {
|
||||
shadowRoot.appendChild(contentElement);
|
||||
}, [contentsDetail?.contsCn]);
|
||||
|
||||
useEffect(() => {
|
||||
if (copied) toast.success("URL이 클립보드에 복사되었습니다.");
|
||||
}, [copied]);
|
||||
|
||||
return (
|
||||
<div className="card card-border !mt-6 !p-6">
|
||||
<div ref={shadowRootRef} />
|
||||
</div>
|
||||
<>
|
||||
<div className="card card-border !mt-6 !p-6">
|
||||
<div ref={shadowRootRef} />
|
||||
</div>
|
||||
<div className="flex">
|
||||
<div className="card card-border flex flex-1 items-center gap-2">
|
||||
<div className="rounded-sm border border-border bg-accent px-8 py-4">
|
||||
<RadioGroup
|
||||
value={evlScr.toString()}
|
||||
onValueChange={(value) => setEvlScr(parseInt(value))}
|
||||
className="flex items-center space-x-4"
|
||||
>
|
||||
<div className="flex items-center space-x-2">
|
||||
<RadioGroupItem value="5" id="evl5" />
|
||||
<Label htmlFor="evl5">매우 만족 😊</Label>
|
||||
</div>
|
||||
<div className="flex items-center space-x-2">
|
||||
<RadioGroupItem value="4" id="evl4" />
|
||||
<Label htmlFor="evl4">만족 🙂</Label>
|
||||
</div>
|
||||
<div className="flex items-center space-x-2">
|
||||
<RadioGroupItem value="3" id="evl3" />
|
||||
<Label htmlFor="evl3">보통 😐</Label>
|
||||
</div>
|
||||
<div className="flex items-center space-x-2">
|
||||
<RadioGroupItem value="2" id="evl2" />
|
||||
<Label htmlFor="evl2">불만족 🙁</Label>
|
||||
</div>
|
||||
<div className="flex items-center space-x-2">
|
||||
<RadioGroupItem value="1" id="evl1" />
|
||||
<Label htmlFor="evl1">매우 불만족 😞</Label>
|
||||
</div>
|
||||
</RadioGroup>
|
||||
</div>
|
||||
<Button
|
||||
size="lg"
|
||||
color="white"
|
||||
onClick={() => menuEvaluation(evlScr)}
|
||||
>
|
||||
평가하기
|
||||
</Button>
|
||||
</div>
|
||||
<div className="card card-border flex flex-1 items-center gap-4">
|
||||
<div className="rounded-sm border border-border bg-accent px-8 py-4">
|
||||
최종수정일: {dayjs(contentsDetail?.aprvDt).format("YYYY-MM-DD")} |
|
||||
담당자: {contentsDetail?.menuPicUserUnqIdNm}
|
||||
</div>
|
||||
<Image
|
||||
src={`/images/${cclData?.unit}`}
|
||||
alt="CCL"
|
||||
width={114}
|
||||
height={40}
|
||||
/>
|
||||
<Image
|
||||
src={`/images/${koglData?.unit}`}
|
||||
alt="CCL"
|
||||
width={140}
|
||||
height={40}
|
||||
/>
|
||||
<Button
|
||||
size="lg"
|
||||
color="emerald"
|
||||
onClick={() => copyText(window.location.href)}
|
||||
>
|
||||
퍼가기
|
||||
</Button>
|
||||
<MenuModificationDemandDialog menuCd={currentMenuInfo?.menuCd} />
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
import { memo, useEffect, useState } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { useMutation } from "@tanstack/react-query";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
import {
|
||||
Button,
|
||||
Dialog,
|
||||
DialogClose,
|
||||
DialogContent,
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
Table,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableHead,
|
||||
TableRow,
|
||||
Input,
|
||||
DialogTrigger,
|
||||
Textarea,
|
||||
} from "@common/components";
|
||||
import { useAlertStore } from "@/shared/lib";
|
||||
import { Form, FormField, FormItem, FormControl } from "@/shared/ui/form";
|
||||
import { MenuModificationDemandApi } from "../api/menu-modification-demand-service";
|
||||
import {
|
||||
menuModificationDemandCreateRequestDtoSchema,
|
||||
type MenuModificationDemandCreateRequestDto,
|
||||
} from "../model/menu-modification-demand-interface";
|
||||
|
||||
type MenuModificationDemandDialogProps = {
|
||||
menuCd?: number;
|
||||
};
|
||||
|
||||
const MenuModificationDemandDialog = memo(
|
||||
({ menuCd }: MenuModificationDemandDialogProps) => {
|
||||
const [open, setOpen] = useState(false);
|
||||
const { confirm } = useConfirm();
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
|
||||
const { mutateAsync: createMenuModificationDemand } = useMutation({
|
||||
mutationFn: (data: MenuModificationDemandCreateRequestDto) =>
|
||||
MenuModificationDemandApi.createMenuModificationDemand(data),
|
||||
onSuccess: () => {
|
||||
alert("메뉴 수정 요청이 등록되었습니다.", () => setOpen(false));
|
||||
},
|
||||
});
|
||||
|
||||
const form = useForm<MenuModificationDemandCreateRequestDto>({
|
||||
resolver: zodResolver(menuModificationDemandCreateRequestDtoSchema),
|
||||
defaultValues: {
|
||||
menuCd: menuCd ?? 0,
|
||||
mdfcnCn: "",
|
||||
aplcnt: "",
|
||||
aplcntEml: "",
|
||||
},
|
||||
});
|
||||
|
||||
const onSubmit = async (data: MenuModificationDemandCreateRequestDto) => {
|
||||
if (await confirm("메뉴 수정 요청을 등록하시겠습니까?")) {
|
||||
createMenuModificationDemand(data);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (!open) form.reset();
|
||||
}, [open]);
|
||||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={setOpen}>
|
||||
<DialogTrigger asChild>
|
||||
<Button size="lg" color="white">
|
||||
수정요청
|
||||
</Button>
|
||||
</DialogTrigger>
|
||||
<DialogContent className="max-w-[60rem]" aria-describedby={undefined}>
|
||||
<DialogHeader>
|
||||
<DialogTitle>메뉴 수정 요청</DialogTitle>
|
||||
</DialogHeader>
|
||||
<Form {...form}>
|
||||
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-4">
|
||||
<Table variant="secondary">
|
||||
<colgroup>
|
||||
<col width="15%" />
|
||||
<col width="85%" />
|
||||
</colgroup>
|
||||
<TableBody>
|
||||
<TableRow>
|
||||
<TableHead>신청자</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aplcnt"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormControl>
|
||||
<Input
|
||||
{...field}
|
||||
value={field.value ?? ""}
|
||||
className="!text-[1.3rem]"
|
||||
placeholder="신청자명을 입력해주세요"
|
||||
/>
|
||||
</FormControl>
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>이메일</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aplcntEml"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormControl>
|
||||
<Input
|
||||
{...field}
|
||||
value={field.value ?? ""}
|
||||
className="!text-[1.3rem]"
|
||||
placeholder="이메일을 입력해주세요"
|
||||
/>
|
||||
</FormControl>
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>요청 내용</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="mdfcnCn"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormControl>
|
||||
<Textarea
|
||||
{...field}
|
||||
value={field.value ?? ""}
|
||||
className="!text-[1.3rem]"
|
||||
placeholder="요청 내용을 입력해주세요"
|
||||
/>
|
||||
</FormControl>
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
</TableBody>
|
||||
</Table>
|
||||
<DialogFooter className="!justify-center">
|
||||
<Button size="lg" type="submit">
|
||||
요청하기
|
||||
</Button>
|
||||
<DialogClose asChild>
|
||||
<Button size="lg" color="white">
|
||||
취소
|
||||
</Button>
|
||||
</DialogClose>
|
||||
</DialogFooter>
|
||||
</form>
|
||||
</Form>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
MenuModificationDemandDialog.displayName = "MenuModificationDemandDialog";
|
||||
|
||||
export { MenuModificationDemandDialog };
|
||||
@@ -28,6 +28,8 @@ export const ENDPOINT = {
|
||||
MENUS: "/cms-service/api/v1/menus",
|
||||
MENU_ROLES: "/cms-service/api/v1/menu-roles",
|
||||
MENU_AUTHRTS: "/cms-service/api/v1/menu-authrts",
|
||||
MENU_EVALUATION: "/cms-service/api/v1/menu-evls",
|
||||
MENU_MODIFICATION_DEMAND: "/cms-service/api/v1/menu-mdfcn-dmnds",
|
||||
CONTENTS: "/cms-service/api/v1/contents",
|
||||
CONTENTS_DETAILS: "/cms-service/api/v1/contents-details",
|
||||
ORGANIZATIONS: "/cms-service/api/v1/ognzs",
|
||||
@@ -41,6 +43,7 @@ export const ENDPOINT = {
|
||||
BBS: "/board-service/api/v1/bbs",
|
||||
POSTS_USER: "/board-service/api/v1/posts/user",
|
||||
POSTS_COMMENTS: "/board-service/api/v1/posts-cmnts",
|
||||
POST_EVALUATION: "/board-service/api/v1/pstEvl",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import { client } from "@/shared/api";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import type {
|
||||
PostEvaluationPayload,
|
||||
PostEvaluationService,
|
||||
} from "../model/post-evaluation-interface";
|
||||
|
||||
export class PostEvaluationApiService implements PostEvaluationService {
|
||||
public async postEvaluation(payload: PostEvaluationPayload) {
|
||||
await client.post(ENDPOINT.BOARD_SERVICE.POST_EVALUATION, payload);
|
||||
}
|
||||
}
|
||||
|
||||
export const PostEvaluationApi = new PostEvaluationApiService();
|
||||
@@ -0,0 +1,10 @@
|
||||
export interface PostEvaluationPayload {
|
||||
pstNo: number;
|
||||
evlIp?: string;
|
||||
evlDt?: string;
|
||||
evlScr: number;
|
||||
}
|
||||
|
||||
export interface PostEvaluationService {
|
||||
postEvaluation: (payload: PostEvaluationPayload) => Promise<void>;
|
||||
}
|
||||
@@ -15,8 +15,8 @@ type PostActionProps = {
|
||||
function PostAction({ registerId, children, handleDelete }: PostActionProps) {
|
||||
const router = useRouter();
|
||||
const pathname = usePathname();
|
||||
const { copyText, copied } = useClipboard();
|
||||
const { confirm } = useConfirm();
|
||||
const { copyText, copied } = useClipboard();
|
||||
const bbsInfo = useMenuStore((state) => state.bbsInfo);
|
||||
const userInfo = useUserStore((state) => state.userInfo);
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ function PostForm<T extends PostFormData | PostUpdateFormData>({
|
||||
</colgroup>
|
||||
<TableBody>
|
||||
<TableRow>
|
||||
<TableHead>제목</TableHead>
|
||||
<TableHead data-required>제목</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -120,7 +120,7 @@ function PostForm<T extends PostFormData | PostUpdateFormData>({
|
||||
</TableRow>
|
||||
{!userInfo?.userUnqId && (
|
||||
<TableRow>
|
||||
<TableHead>비밀번호</TableHead>
|
||||
<TableHead data-required>비밀번호</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
|
||||
@@ -44,7 +44,9 @@ function PostPage({ bbsId }: { bbsId: string }) {
|
||||
const thumbRefs = useRef<Map<number, string>>(new Map());
|
||||
|
||||
const [tableSort, setTableSort] = useState("");
|
||||
const [postParams, setPostParams] = useState<PostParams>({
|
||||
const [keywordType, setKeywordType] = useState("title");
|
||||
const [keyword, setKeyword] = useState("");
|
||||
const [searchParams, setSearchParams] = useState<PostParams>({
|
||||
keywordType: "title",
|
||||
keyword: "",
|
||||
});
|
||||
@@ -58,7 +60,7 @@ function PostPage({ bbsId }: { bbsId: string }) {
|
||||
queryKey: [ENDPOINT.BOARD_SERVICE.POSTS_USER, bbsId, bbsInfo],
|
||||
queryFn: () =>
|
||||
PostApi.getPostList(parseInt(bbsId), {
|
||||
...postParams,
|
||||
...searchParams,
|
||||
upndFixYn: bbsInfo?.upndFixUseYn,
|
||||
}),
|
||||
select: (data) => {
|
||||
@@ -79,10 +81,16 @@ function PostPage({ bbsId }: { bbsId: string }) {
|
||||
isLoading,
|
||||
refetch,
|
||||
} = useQuery({
|
||||
queryKey: [ENDPOINT.BOARD_SERVICE.POSTS_USER, bbsId, pagination, tableSort],
|
||||
queryKey: [
|
||||
ENDPOINT.BOARD_SERVICE.POSTS_USER,
|
||||
bbsId,
|
||||
searchParams,
|
||||
pagination,
|
||||
tableSort,
|
||||
],
|
||||
queryFn: () =>
|
||||
PostApi.getPostList(parseInt(bbsId), {
|
||||
...postParams,
|
||||
...searchParams,
|
||||
ansUseYn: bbsInfo?.ansUseYn,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
@@ -128,7 +136,29 @@ function PostPage({ bbsId }: { bbsId: string }) {
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
refetch();
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
keywordType,
|
||||
keyword,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setKeywordType("title");
|
||||
setKeyword("");
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
keywordType: "title",
|
||||
keyword: "",
|
||||
});
|
||||
};
|
||||
|
||||
const handleRowClick = (row: Post) => {
|
||||
@@ -141,12 +171,7 @@ function PostPage({ bbsId }: { bbsId: string }) {
|
||||
<div className="card card-border">
|
||||
<form onSubmit={handleSubmit} className="flex items-center gap-2 p-2">
|
||||
<Label className="mr-2 text-label">검색</Label>
|
||||
<Select
|
||||
value={postParams.keywordType}
|
||||
onValueChange={(keywordType) => {
|
||||
setPostParams({ ...postParams, keywordType });
|
||||
}}
|
||||
>
|
||||
<Select value={keywordType} onValueChange={setKeywordType}>
|
||||
<SelectTrigger className="h-[3.2rem] w-[10rem]">
|
||||
<SelectValue placeholder="선택" />
|
||||
</SelectTrigger>
|
||||
@@ -157,15 +182,21 @@ function PostPage({ bbsId }: { bbsId: string }) {
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<Input
|
||||
value={postParams.keyword}
|
||||
onChange={(e) =>
|
||||
setPostParams({ ...postParams, keyword: e.target.value })
|
||||
}
|
||||
value={keyword}
|
||||
onChange={(e) => setKeyword(e.target.value)}
|
||||
className="h-[3.2rem] w-[24rem] rounded-sm !text-[1.3rem]"
|
||||
/>
|
||||
<Button className="h-[3.2rem]" type="submit">
|
||||
조회
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
color="white"
|
||||
className="h-[3.2rem]"
|
||||
onClick={handleReset}
|
||||
>
|
||||
초기화
|
||||
</Button>
|
||||
</form>
|
||||
</div>
|
||||
<div className="card card-border">
|
||||
|
||||
@@ -5,7 +5,13 @@ import Image from "next/image";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
||||
import { Button, Skeleton } from "@common/components";
|
||||
import {
|
||||
Button,
|
||||
Label,
|
||||
RadioGroup,
|
||||
RadioGroupItem,
|
||||
Skeleton,
|
||||
} from "@common/components";
|
||||
import { AttachmentApi } from "@/entities/attachment";
|
||||
import { PostApi } from "@/entities/post";
|
||||
import {
|
||||
@@ -17,6 +23,7 @@ import {
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { PostAction } from "./post-action";
|
||||
import { PostComment } from "./post-comment";
|
||||
import { PostEvaluationApi } from "../api/post-evaluation-service";
|
||||
|
||||
function Post({ bbsId, pstNo }: { bbsId: string; pstNo: string }) {
|
||||
const router = useRouter();
|
||||
@@ -26,6 +33,7 @@ function Post({ bbsId, pstNo }: { bbsId: string; pstNo: string }) {
|
||||
const bbsInfo = useMenuStore((state) => state.bbsInfo);
|
||||
|
||||
const [filename, setFilename] = useState("");
|
||||
const [evlScr, setEvlScr] = useState(5);
|
||||
|
||||
const { data: postData } = useQuery({
|
||||
queryKey: [ENDPOINT.BOARD_SERVICE.POSTS_USER, bbsId, pstNo],
|
||||
@@ -73,6 +81,17 @@ function Post({ bbsId, pstNo }: { bbsId: string; pstNo: string }) {
|
||||
},
|
||||
});
|
||||
|
||||
const { mutate: postEvaluation } = useMutation({
|
||||
mutationFn: (evlScr: number) =>
|
||||
PostEvaluationApi.postEvaluation({
|
||||
pstNo: parseInt(pstNo),
|
||||
evlScr,
|
||||
}),
|
||||
onSuccess: () => {
|
||||
alert("게시물 평가가 완료되었습니다.");
|
||||
},
|
||||
});
|
||||
|
||||
const handleDelete = async () => {
|
||||
let pstPswd = "";
|
||||
if (userInfo?.userUnqId) {
|
||||
@@ -194,6 +213,53 @@ function Post({ bbsId, pstNo }: { bbsId: string; pstNo: string }) {
|
||||
</>
|
||||
)
|
||||
)}
|
||||
{bbsInfo?.dgstfnEvlUseYn === "Y" && (
|
||||
<>
|
||||
<hr />
|
||||
<div className="mt-8 flex items-center gap-2 px-4">
|
||||
<p>
|
||||
이 페이지에서 제공하는
|
||||
<br />
|
||||
정보에 대하여 만족하시나요?
|
||||
</p>
|
||||
<div className="ml-4 rounded-sm border border-border bg-accent px-8 py-4">
|
||||
<RadioGroup
|
||||
value={evlScr.toString()}
|
||||
onValueChange={(value) => setEvlScr(parseInt(value))}
|
||||
className="flex items-center space-x-4"
|
||||
>
|
||||
<div className="flex items-center space-x-2">
|
||||
<RadioGroupItem value="5" id="evl5" />
|
||||
<Label htmlFor="evl5">매우 만족 😊</Label>
|
||||
</div>
|
||||
<div className="flex items-center space-x-2">
|
||||
<RadioGroupItem value="4" id="evl4" />
|
||||
<Label htmlFor="evl4">만족 🙂</Label>
|
||||
</div>
|
||||
<div className="flex items-center space-x-2">
|
||||
<RadioGroupItem value="3" id="evl3" />
|
||||
<Label htmlFor="evl3">보통 😐</Label>
|
||||
</div>
|
||||
<div className="flex items-center space-x-2">
|
||||
<RadioGroupItem value="2" id="evl2" />
|
||||
<Label htmlFor="evl2">불만족 🙁</Label>
|
||||
</div>
|
||||
<div className="flex items-center space-x-2">
|
||||
<RadioGroupItem value="1" id="evl1" />
|
||||
<Label htmlFor="evl1">매우 불만족 😞</Label>
|
||||
</div>
|
||||
</RadioGroup>
|
||||
</div>
|
||||
<Button
|
||||
size="lg"
|
||||
color="white"
|
||||
onClick={() => postEvaluation(evlScr)}
|
||||
>
|
||||
평가하기
|
||||
</Button>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</PostAction>
|
||||
<PostComment bbsId={parseInt(bbsId)} pstNo={parseInt(pstNo)} />
|
||||
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
PORT=13000
|
||||
LOG_FILE="start_13000.log"
|
||||
|
||||
# 1. 기존 포트 사용 프로세스 종료
|
||||
PID=$(lsof -t -i :$PORT)
|
||||
if [ -n "$PID" ]; then
|
||||
echo "Killing process on port $PORT (PID: $PID)"
|
||||
kill -9 $PID
|
||||
fi
|
||||
|
||||
# 2. 백그라운드로 앱 시작 (로그 파일로 리디렉션)
|
||||
echo "Starting app on port $PORT..."
|
||||
nohup pnpm start > $LOG_FILE 2>&1 &
|
||||
|
||||
# 3. PID 확인
|
||||
sleep 1
|
||||
NEW_PID=$(lsof -t -i :$PORT)
|
||||
if [ -n "$NEW_PID" ]; then
|
||||
echo "App started successfully (PID: $NEW_PID)"
|
||||
echo "Logs: tail -f $LOG_FILE"
|
||||
else
|
||||
echo "Failed to start app. Check logs: $LOG_FILE"
|
||||
fi
|
||||
@@ -0,0 +1,2 @@
|
||||
import { LoginlogPage } from "@/pages/loginlog";
|
||||
export default LoginlogPage;
|
||||
@@ -24,6 +24,7 @@
|
||||
"@radix-ui/react-icons": "^1.3.2",
|
||||
"@radix-ui/react-label": "^2.1.2",
|
||||
"@radix-ui/react-slot": "^1.1.2",
|
||||
"@radix-ui/react-tooltip": "^1.1.8",
|
||||
"@tanstack/react-query": "^5.67.1",
|
||||
"@tanstack/react-query-devtools": "^5.75.5",
|
||||
"@tanstack/react-table": "^8.21.2",
|
||||
|
||||
@@ -9,12 +9,11 @@ import type {
|
||||
export class ApiLogApiService implements ApiLogService {
|
||||
public async getApiLogList(params: ApiLogParams): Promise<ApiLogList> {
|
||||
const response = await client.get<ApiLogList>(
|
||||
`${ENDPOINT.USER_SERVICE.APILOG}`,
|
||||
`${ENDPOINT.CMS_SERVICE.APILOG}`,
|
||||
{ params },
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export const ApiLogApi = new ApiLogApiService();
|
||||
|
||||
@@ -2,8 +2,9 @@ import type { PageableList, PageableParams } from "@/shared/model";
|
||||
|
||||
export interface ApiLogParams extends PageableParams {
|
||||
siteId?: string;
|
||||
userId?: string;
|
||||
userUnqId?: string;
|
||||
userNm?: string;
|
||||
userId?: string;
|
||||
apiHttpPmhd?: string;
|
||||
dmndUrl?: string;
|
||||
ipAddr?: string;
|
||||
|
||||
@@ -85,6 +85,15 @@ export class ContentsApiService implements ContentsService {
|
||||
`${ENDPOINT.CMS_SERVICE.CONTENTS_DETAILS}/${contsSn}/${contsVer}/approve`,
|
||||
);
|
||||
}
|
||||
|
||||
public async rejectContents(
|
||||
contsSn: number,
|
||||
contsVer: number,
|
||||
): Promise<void> {
|
||||
await client.put(
|
||||
`${ENDPOINT.CMS_SERVICE.CONTENTS_DETAILS}/${contsSn}/${contsVer}/reject`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export const ContentsApi = new ContentsApiService();
|
||||
|
||||
@@ -97,4 +97,5 @@ export interface ContentsService {
|
||||
deleteContents(contsSn: number, contsVer: number): Promise<void>;
|
||||
requestApprove(contsSn: number, contsVer: number): Promise<void>;
|
||||
approveContents(contsSn: number, contsVer: number): Promise<void>;
|
||||
rejectContents(contsSn: number, contsVer: number): Promise<void>;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { PageableList, PageableParams } from "@/shared/model";
|
||||
// 그룹 사용자 검색 파라미터 인터페이스
|
||||
export interface GroupUserSearchParams extends PageableParams {
|
||||
keyword?: string;
|
||||
userNm?: string;
|
||||
}
|
||||
|
||||
// 그룹 사용자 목록 응답 인터페이스
|
||||
|
||||
@@ -3,4 +3,5 @@ export {
|
||||
groupFormSchema,
|
||||
type GroupFormData,
|
||||
type GroupListResponseDto,
|
||||
type GroupSearchParams,
|
||||
} from "./model/group-interface";
|
||||
|
||||
@@ -56,7 +56,10 @@ export const groupFormSchema = z.object({
|
||||
groupNm: z.string().min(1, { message: "그룹명을 입력해주세요." }),
|
||||
groupSeCd: z.string().min(1, { message: "그룹구분을 선택해주세요." }),
|
||||
groupExpln: z.string().optional(),
|
||||
delYn: z.string().default("N"),
|
||||
delYn: z
|
||||
.string()
|
||||
.transform((val) => (val === "" || val === undefined ? "N" : val))
|
||||
.default("N"),
|
||||
authrtId: z.string().min(1, { message: "권한ID를 선택해주세요." }),
|
||||
siteId: z.string().optional(),
|
||||
mngrYn: z.string().default("N"),
|
||||
|
||||
@@ -74,7 +74,7 @@ function ManagementAuthorityDialog({ menuCd }: ManagementAuthorityDialogProps) {
|
||||
<Dialog open={open} onOpenChange={setOpen}>
|
||||
<DialogTrigger asChild>
|
||||
<Button className="gap-3" disabled={!menuCd}>
|
||||
<i className="diveicon di-personal-information" />
|
||||
<i className="diveicon di-key" />
|
||||
권한관리
|
||||
</Button>
|
||||
</DialogTrigger>
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
import { client } from "@/shared/api";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import type { MenuItem, MenuService } from "../model/menu-interface";
|
||||
import type {
|
||||
MenuService,
|
||||
Menu,
|
||||
MenuItem,
|
||||
MenuFormData,
|
||||
MenuTemporarilyStoredData,
|
||||
} from "../model/menu-interface";
|
||||
|
||||
export class MenuApiService implements MenuService {
|
||||
async getMenuRoles(siteId: string): Promise<MenuItem[]> {
|
||||
@@ -9,6 +15,56 @@ export class MenuApiService implements MenuService {
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async getMenuInfo(menuCd: number): Promise<Menu> {
|
||||
const response = await client.get<Menu>(
|
||||
`${ENDPOINT.CMS_SERVICE.MENUS}/${menuCd}`,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async createMenu(data: MenuFormData): Promise<void> {
|
||||
const response = await client.post<void>(
|
||||
`${ENDPOINT.CMS_SERVICE.MENUS}`,
|
||||
data,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async updateMenu(
|
||||
menuCd: number,
|
||||
data: Omit<MenuFormData, "siteId">,
|
||||
): Promise<void> {
|
||||
const response = await client.put<void>(
|
||||
`${ENDPOINT.CMS_SERVICE.MENUS}/${menuCd}`,
|
||||
data,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async deleteMenu(menuCd: number): Promise<void> {
|
||||
await client.delete(`${ENDPOINT.CMS_SERVICE.MENUS}/${menuCd}`);
|
||||
}
|
||||
|
||||
public async menuTemporaryStorage(
|
||||
menuCd: number,
|
||||
data: MenuFormData,
|
||||
): Promise<void> {
|
||||
const response = await client.post<void>(
|
||||
`${ENDPOINT.CMS_SERVICE.MENU_TEMPORARY_STORAGE}/${menuCd}`,
|
||||
data,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async getMenuTemporarilyStoredData(
|
||||
menuCd: number,
|
||||
): Promise<MenuTemporarilyStoredData[]> {
|
||||
const response = await client.get<MenuTemporarilyStoredData[]>(
|
||||
`${ENDPOINT.CMS_SERVICE.MENU_TEMPORARY_STORAGE}/menu/${menuCd}/user`,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
}
|
||||
|
||||
export const MenuApi = new MenuApiService();
|
||||
|
||||
@@ -1,2 +1,9 @@
|
||||
export { MenuApi } from "./api/menu-service";
|
||||
export {
|
||||
MENU_TYPE,
|
||||
menuFormSchema,
|
||||
type MenuType,
|
||||
type MenuItem,
|
||||
type MenuFormData,
|
||||
} from "./model/menu-interface";
|
||||
export { MenuWrapper } from "./lib/menu-wrapper";
|
||||
export type { MenuItem } from "./model/menu-interface";
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const MENU_TYPE = {
|
||||
EMPTY: "EMPTY",
|
||||
CONTENTS: "CONTENTS",
|
||||
BOARD: "BOARD",
|
||||
INSIDE: "INSIDE",
|
||||
OUTSIDE: "OUTSIDE",
|
||||
BOTTOM: "BOTTOM",
|
||||
} as const;
|
||||
|
||||
export type MenuType = (typeof MENU_TYPE)[keyof typeof MENU_TYPE];
|
||||
|
||||
export interface MenuItem {
|
||||
menuCd: number;
|
||||
menuKornNm: string;
|
||||
@@ -18,6 +31,65 @@ export interface MenuItem {
|
||||
requiredUrlPath: boolean;
|
||||
}
|
||||
|
||||
export interface MenuTemporarilyStoredData {
|
||||
tmprStrgSn: number;
|
||||
menuCd: number;
|
||||
menuTmprStrg: string;
|
||||
regDt: string;
|
||||
rgtr: string;
|
||||
mdfcnDt: string;
|
||||
mdfr: string;
|
||||
}
|
||||
|
||||
export const menuFormSchema = z.object({
|
||||
siteId: z.string(),
|
||||
menuKornNm: z.string(),
|
||||
menuSubKornNm: z.string().nullish(),
|
||||
menuEngNm: z.string().nullish(),
|
||||
menuSubEngNm: z.string().nullish(),
|
||||
levelNo: z.number(),
|
||||
urlPath: z.string().nullish(),
|
||||
iconNm: z.string().nullish(),
|
||||
menuLnkgTypeCd: z.enum([
|
||||
MENU_TYPE.EMPTY,
|
||||
MENU_TYPE.CONTENTS,
|
||||
MENU_TYPE.BOARD,
|
||||
MENU_TYPE.INSIDE,
|
||||
MENU_TYPE.OUTSIDE,
|
||||
MENU_TYPE.BOTTOM,
|
||||
]),
|
||||
menuLnkgSn: z.number().nullish(),
|
||||
otptYn: z.string().default("Y"),
|
||||
prntMenuCd: z.number().nullish(),
|
||||
sortSeq: z.number(),
|
||||
evlUseYn: z.string().default("Y"),
|
||||
qrcd: z.string().nullish(),
|
||||
useYn: z.string().default("Y"),
|
||||
newWndwYn: z.string().nullish(),
|
||||
menuLnkgSnNm: z.string().nullish(),
|
||||
menuPicUserUnqId: z.string().nullish(),
|
||||
menuPicUserUnqIdNm: z.string().nullish(),
|
||||
menuPicDsgnYmd: z.string().nullish(),
|
||||
});
|
||||
|
||||
export type MenuFormData = z.infer<typeof menuFormSchema>;
|
||||
|
||||
export type Menu = Omit<MenuFormData, "iconNm"> & {
|
||||
menuCd: number;
|
||||
iconName?: string;
|
||||
};
|
||||
|
||||
export interface MenuService {
|
||||
getMenuRoles(siteId: string): Promise<MenuItem[]>;
|
||||
getMenuInfo: (menuCd: number) => Promise<Menu>;
|
||||
createMenu: (data: MenuFormData) => Promise<void>;
|
||||
updateMenu: (
|
||||
menuCd: number,
|
||||
data: Omit<MenuFormData, "siteId">,
|
||||
) => Promise<void>;
|
||||
deleteMenu: (menuCd: number) => Promise<void>;
|
||||
menuTemporaryStorage: (menuCd: number, data: MenuFormData) => Promise<void>;
|
||||
getMenuTemporarilyStoredData: (
|
||||
menuCd: number,
|
||||
) => Promise<MenuTemporarilyStoredData[]>;
|
||||
}
|
||||
|
||||
@@ -38,10 +38,14 @@ function AdminPage() {
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const { confirm } = useConfirm();
|
||||
|
||||
const [adminQuery, setAdminQuery] = useState<UserSearchParams>({
|
||||
const [keywordType, setKeywordType] = useState("");
|
||||
const [keyword, setKeyword] = useState("");
|
||||
const [grpId, setGrpId] = useState("");
|
||||
const [searchParams, setSearchParams] = useState<UserSearchParams>({
|
||||
keywordType: "",
|
||||
keyword: "",
|
||||
grpId: "",
|
||||
sort: "regDt,desc",
|
||||
});
|
||||
const [pagination, setPagination] = useState<PaginationState>({
|
||||
pageIndex: 0,
|
||||
@@ -66,10 +70,10 @@ function AdminPage() {
|
||||
});
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.USER_SERVICE.USERS, pagination],
|
||||
queryKey: [ENDPOINT.USER_SERVICE.USERS, searchParams, pagination],
|
||||
queryFn: () =>
|
||||
UserApi.findPageAdminUser({
|
||||
...adminQuery,
|
||||
...searchParams,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
}),
|
||||
@@ -123,7 +127,28 @@ function AdminPage() {
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
query.refetch();
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
keywordType,
|
||||
keyword,
|
||||
grpId,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setKeywordType("");
|
||||
setKeyword("");
|
||||
setGrpId("");
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
keywordType: "",
|
||||
keyword: "",
|
||||
grpId: "",
|
||||
});
|
||||
};
|
||||
|
||||
const handleDeleteAdmins = async () => {
|
||||
@@ -161,11 +186,7 @@ function AdminPage() {
|
||||
<form onSubmit={handleSubmit} className="flex items-center gap-6 p-2">
|
||||
<div className="flex items-center gap-2">
|
||||
<Label className="mr-2 text-label">관리자구분</Label>
|
||||
<Select
|
||||
onValueChange={(value) =>
|
||||
setAdminQuery({ ...adminQuery, grpId: value })
|
||||
}
|
||||
>
|
||||
<Select value={grpId} onValueChange={(value) => setGrpId(value)}>
|
||||
<SelectTrigger className="h-[3.2rem] w-[16rem] !text-[1.3rem]">
|
||||
<SelectValue placeholder="그룹 선택" />
|
||||
</SelectTrigger>
|
||||
@@ -183,9 +204,8 @@ function AdminPage() {
|
||||
관리자
|
||||
</Label>
|
||||
<Select
|
||||
onValueChange={(value) =>
|
||||
setAdminQuery({ ...adminQuery, keywordType: value })
|
||||
}
|
||||
value={keywordType}
|
||||
onValueChange={(value) => setKeywordType(value)}
|
||||
>
|
||||
<SelectTrigger className="h-[3.2rem] w-[10rem] !text-[1.3rem]">
|
||||
<SelectValue placeholder="선택" />
|
||||
@@ -197,16 +217,22 @@ function AdminPage() {
|
||||
</Select>
|
||||
<Input
|
||||
className="h-[3.2rem] w-[24rem] rounded-sm !text-[1.3rem]"
|
||||
value={adminQuery.keyword}
|
||||
onChange={(e) =>
|
||||
setAdminQuery({ ...adminQuery, keyword: e.target.value })
|
||||
}
|
||||
value={keyword}
|
||||
onChange={(e) => setKeyword(e.target.value)}
|
||||
placeholder="검색어 입력"
|
||||
/>
|
||||
</div>
|
||||
<Button className="h-[3.2rem]" type="submit">
|
||||
조회
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
color="white"
|
||||
className="h-[3.2rem]"
|
||||
onClick={handleReset}
|
||||
>
|
||||
초기화
|
||||
</Button>
|
||||
</form>
|
||||
</div>
|
||||
<div className="card card-border">
|
||||
|
||||
@@ -26,36 +26,32 @@ type DateRange = {
|
||||
to?: Date | undefined;
|
||||
};
|
||||
|
||||
function ApiLogPage({}) {
|
||||
// 1주일 전부터 오늘까지 기본 날짜 설정
|
||||
function ApiLogPage() {
|
||||
const defaultDateRange: DateRange = {
|
||||
from: dayjs().subtract(7, "day").toDate(),
|
||||
to: dayjs().toDate(),
|
||||
};
|
||||
|
||||
const [dateRange, setDateRange] = useState<DateRange>(defaultDateRange);
|
||||
|
||||
const [pagination, setPagination] = useState<PaginationState>({
|
||||
pageIndex: 0,
|
||||
pageSize: 10,
|
||||
});
|
||||
|
||||
const [loginlogPostQuery, setLoginlogPostQuery] = useState<ApiLogParams>({
|
||||
const [dateRange, setDateRange] = useState<DateRange>(defaultDateRange);
|
||||
const [userId, setUserId] = useState("");
|
||||
const [apiHttpPmhd, setApiHttpPmhd] = useState("");
|
||||
const [searchParams, setSearchParams] = useState<ApiLogParams>({
|
||||
userId: "",
|
||||
siteId: "",
|
||||
apiHttpPmhd: "",
|
||||
dmndUrl: "",
|
||||
ipAddr: "",
|
||||
dmndDtStart: dayjs().subtract(7, "day").format("YYYY-MM-DD"),
|
||||
dmndDtEnd: dayjs().format("YYYY-MM-DD"),
|
||||
sort: "lgnDt,asc",
|
||||
sort: "regDt,desc",
|
||||
});
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.USER_SERVICE.LOGINLOG, pagination],
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.APILOG, searchParams, pagination],
|
||||
queryFn: () =>
|
||||
ApiLogApi.getApiLogList({
|
||||
...loginlogPostQuery,
|
||||
...searchParams,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
}),
|
||||
@@ -81,13 +77,31 @@ function ApiLogPage({}) {
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
query.refetch();
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
userId,
|
||||
apiHttpPmhd,
|
||||
dmndDtStart: dayjs(dateRange.from).format("YYYY-MM-DD"),
|
||||
dmndDtEnd: dayjs(dateRange.to).format("YYYY-MM-DD"),
|
||||
});
|
||||
};
|
||||
|
||||
const handleLoginlogParamsChange =
|
||||
(key: keyof ApiLogParams) => (value: unknown) => {
|
||||
setLoginlogPostQuery({ ...loginlogPostQuery, [key]: value });
|
||||
};
|
||||
const handleReset = () => {
|
||||
setUserId("");
|
||||
setApiHttpPmhd("");
|
||||
setDateRange(defaultDateRange);
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
userId: "",
|
||||
apiHttpPmhd: "",
|
||||
dmndDtStart: dayjs().subtract(7, "day").format("YYYY-MM-DD"),
|
||||
dmndDtEnd: dayjs().format("YYYY-MM-DD"),
|
||||
});
|
||||
};
|
||||
|
||||
const handlePresetDateRange = (value: string) => {
|
||||
let presetDateRange: DateRange | undefined;
|
||||
@@ -113,19 +127,7 @@ function ApiLogPage({}) {
|
||||
default:
|
||||
presetDateRange = undefined;
|
||||
}
|
||||
handleDateRangeChange(presetDateRange);
|
||||
};
|
||||
|
||||
const handleDateRangeChange = (value: DateRange | undefined) => {
|
||||
setDateRange(value || defaultDateRange);
|
||||
setLoginlogPostQuery({
|
||||
...loginlogPostQuery,
|
||||
dmndDtStart:
|
||||
dayjs(value?.from).format("YYYY-MM-DD") ??
|
||||
dayjs().subtract(7, "day").format("YYYY-MM-DD"),
|
||||
dmndDtEnd:
|
||||
dayjs(value?.to).format("YYYY-MM-DD") ?? dayjs().format("YYYY-MM-DD"),
|
||||
});
|
||||
setDateRange(presetDateRange || defaultDateRange);
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -135,7 +137,7 @@ function ApiLogPage({}) {
|
||||
<Label className="mr-2">조회기간</Label>
|
||||
<DateRangePicker
|
||||
value={dateRange}
|
||||
onValueChange={handleDateRangeChange}
|
||||
onValueChange={(value) => setDateRange(value || defaultDateRange)}
|
||||
>
|
||||
<div className="card card-border flex items-center gap-2">
|
||||
<Select onValueChange={handlePresetDateRange}>
|
||||
@@ -152,14 +154,15 @@ function ApiLogPage({}) {
|
||||
</DateRangePicker>
|
||||
<Label className="ml-4 mr-2 text-label">사용자ID</Label>
|
||||
<Input
|
||||
value={userId}
|
||||
onChange={(e) => setUserId(e.target.value)}
|
||||
className="h-[3.2rem] w-[20rem] rounded-sm !text-[1.3rem]"
|
||||
value={loginlogPostQuery.userId}
|
||||
onChange={(e) =>
|
||||
handleLoginlogParamsChange("userId")(e.target.value)
|
||||
}
|
||||
/>
|
||||
<Label className="ml-4 mr-2 text-label">상태</Label>
|
||||
<Select onValueChange={handleLoginlogParamsChange("apiHttpPmhd")}>
|
||||
<Select
|
||||
value={apiHttpPmhd}
|
||||
onValueChange={(value) => setApiHttpPmhd(value)}
|
||||
>
|
||||
<SelectTrigger className="w-[10rem]">
|
||||
<SelectValue placeholder="선택" />
|
||||
</SelectTrigger>
|
||||
@@ -173,12 +176,20 @@ function ApiLogPage({}) {
|
||||
<Button className="h-[3.2rem]" type="submit">
|
||||
조회
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
color="white"
|
||||
className="h-[3.2rem]"
|
||||
onClick={handleReset}
|
||||
>
|
||||
초기화
|
||||
</Button>
|
||||
</form>
|
||||
</div>
|
||||
<div className="card card-border">
|
||||
<div className="card-header">
|
||||
<div className="flex w-full items-center justify-between">
|
||||
<h3 className="text-2xl font-medium text-label">로그인로그 목록</h3>
|
||||
<h3 className="text-2xl font-medium text-label">작업로그 목록</h3>
|
||||
<div className="flex gap-2">
|
||||
<Select
|
||||
value={table.getState().pagination.pageSize.toString()}
|
||||
|
||||
@@ -84,7 +84,7 @@ function BannerForm({ form, bnrSn, ...props }: BannerFormProps) {
|
||||
</colgroup>
|
||||
<TableBody>
|
||||
<TableRow>
|
||||
<TableHead>배너명</TableHead>
|
||||
<TableHead data-required>배너명</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -105,7 +105,7 @@ function BannerForm({ form, bnrSn, ...props }: BannerFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>배너구분</TableHead>
|
||||
<TableHead data-required>배너구분</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -210,7 +210,7 @@ function BannerForm({ form, bnrSn, ...props }: BannerFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>링크 열기</TableHead>
|
||||
<TableHead data-required>링크 열기</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -260,7 +260,7 @@ function BannerForm({ form, bnrSn, ...props }: BannerFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>사용여부</TableHead>
|
||||
<TableHead data-required>사용여부</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
|
||||
@@ -28,17 +28,21 @@ function BannerPage() {
|
||||
|
||||
const [rowSelection, setRowSelection] = useState<RowSelectionState>({});
|
||||
const [postingTargets, setPostingTargets] = useState<PostingTarget[]>([]);
|
||||
const [bannerQuery, setBannerQuery] = useState<BannerParams>({ bnrTtl: "" });
|
||||
const [bnrTtl, setBnrTtl] = useState("");
|
||||
const [searchParams, setSearchParams] = useState<BannerParams>({
|
||||
bnrTtl: "",
|
||||
sort: "regDt,desc",
|
||||
});
|
||||
const [pagination, setPagination] = useState<PaginationState>({
|
||||
pageIndex: 0,
|
||||
pageSize: 5,
|
||||
pageSize: 10,
|
||||
});
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.BANNERS, pagination],
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.BANNERS, searchParams, pagination],
|
||||
queryFn: () =>
|
||||
BannerApi.getBannerList({
|
||||
...bannerQuery,
|
||||
...searchParams,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
}),
|
||||
@@ -46,7 +50,22 @@ function BannerPage() {
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
query.refetch();
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
bnrTtl,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setBnrTtl("");
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
bnrTtl: "",
|
||||
});
|
||||
};
|
||||
|
||||
const handleRowClick = (row: Banner) => {
|
||||
@@ -107,14 +126,20 @@ function BannerPage() {
|
||||
</Label>
|
||||
<Input
|
||||
className="h-[3.2rem] w-[24rem] rounded-sm !text-[1.3rem]"
|
||||
value={bannerQuery.bnrTtl}
|
||||
onChange={(e) =>
|
||||
setBannerQuery({ ...bannerQuery, bnrTtl: e.target.value })
|
||||
}
|
||||
value={bnrTtl}
|
||||
onChange={(e) => setBnrTtl(e.target.value)}
|
||||
/>
|
||||
<Button className="h-[3.2rem]" type="submit">
|
||||
조회
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
color="white"
|
||||
className="h-[3.2rem]"
|
||||
onClick={handleReset}
|
||||
>
|
||||
초기화
|
||||
</Button>
|
||||
</form>
|
||||
</div>
|
||||
<div className="card card-border">
|
||||
|
||||
@@ -54,7 +54,7 @@ function BbsForm({ form, bbsId, ...props }: BbsFormProps) {
|
||||
</colgroup>
|
||||
<TableBody>
|
||||
<TableRow>
|
||||
<TableHead>게시판명</TableHead>
|
||||
<TableHead data-required>게시판명</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -75,7 +75,7 @@ function BbsForm({ form, bbsId, ...props }: BbsFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>게시판 설명</TableHead>
|
||||
<TableHead data-required>게시판 설명</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -96,7 +96,7 @@ function BbsForm({ form, bbsId, ...props }: BbsFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>게시판 유형</TableHead>
|
||||
<TableHead data-required>게시판 유형</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -116,7 +116,7 @@ function BbsForm({ form, bbsId, ...props }: BbsFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>참조 사용 여부</TableHead>
|
||||
<TableHead data-required>참조 사용 여부</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -146,7 +146,7 @@ function BbsForm({ form, bbsId, ...props }: BbsFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>첨부파일 사용 여부</TableHead>
|
||||
<TableHead data-required>첨부파일 사용 여부</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -236,7 +236,7 @@ function BbsForm({ form, bbsId, ...props }: BbsFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>답글 사용 여부</TableHead>
|
||||
<TableHead data-required>답글 사용 여부</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -295,7 +295,7 @@ function BbsForm({ form, bbsId, ...props }: BbsFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>댓글 사용 여부</TableHead>
|
||||
<TableHead data-required>댓글 사용 여부</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -329,7 +329,7 @@ function BbsForm({ form, bbsId, ...props }: BbsFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>게시물평가 사용 여부</TableHead>
|
||||
<TableHead data-required>게시물평가 사용 여부</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -359,7 +359,7 @@ function BbsForm({ form, bbsId, ...props }: BbsFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>팝업 사용 여부</TableHead>
|
||||
<TableHead data-required>팝업 사용 여부</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -389,7 +389,7 @@ function BbsForm({ form, bbsId, ...props }: BbsFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>SMS알림 사용 여부</TableHead>
|
||||
<TableHead data-required>SMS알림 사용 여부</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -419,7 +419,7 @@ function BbsForm({ form, bbsId, ...props }: BbsFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>상단고정 사용 여부</TableHead>
|
||||
<TableHead data-required>상단고정 사용 여부</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -449,7 +449,7 @@ function BbsForm({ form, bbsId, ...props }: BbsFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>게시기간 사용 여부</TableHead>
|
||||
<TableHead data-required>게시기간 사용 여부</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -479,7 +479,7 @@ function BbsForm({ form, bbsId, ...props }: BbsFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>개인정보 표시 여부</TableHead>
|
||||
<TableHead data-required>개인정보 표시 여부</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -508,7 +508,7 @@ function BbsForm({ form, bbsId, ...props }: BbsFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>사용 여부</TableHead>
|
||||
<TableHead data-required>사용 여부</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
|
||||
@@ -29,9 +29,12 @@ function BbsPage() {
|
||||
const router = useRouter();
|
||||
|
||||
const [rowSelection, setRowSelection] = useState<RowSelectionState>({});
|
||||
const [boardParams, setBoardParams] = useState<BoardParams>({
|
||||
const [bbsTypeCd, setBbsTypeCd] = useState("");
|
||||
const [bbsNm, setBbsNm] = useState("");
|
||||
const [searchParams, setSearchParams] = useState<BoardParams>({
|
||||
bbsTypeCd: "",
|
||||
bbsNm: "",
|
||||
sort: "regDt,desc",
|
||||
});
|
||||
const [pagination, setPagination] = useState<PaginationState>({
|
||||
pageIndex: 0,
|
||||
@@ -39,10 +42,10 @@ function BbsPage() {
|
||||
});
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.BOARD_SERVICE.BBS, pagination],
|
||||
queryKey: [ENDPOINT.BOARD_SERVICE.BBS, searchParams, pagination],
|
||||
queryFn: () =>
|
||||
BoardApi.getBoardList({
|
||||
...boardParams,
|
||||
...searchParams,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
}),
|
||||
@@ -50,7 +53,25 @@ function BbsPage() {
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
query.refetch();
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
bbsTypeCd,
|
||||
bbsNm,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setBbsTypeCd("");
|
||||
setBbsNm("");
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
bbsTypeCd: "",
|
||||
bbsNm: "",
|
||||
});
|
||||
};
|
||||
|
||||
const handleRowClick = (row: Board) => {
|
||||
@@ -86,10 +107,8 @@ function BbsPage() {
|
||||
</Label>
|
||||
<CodeSelect
|
||||
upCd="BBSTYPE"
|
||||
value={boardParams.bbsTypeCd}
|
||||
onValueChange={(value) =>
|
||||
setBoardParams({ ...boardParams, bbsTypeCd: value })
|
||||
}
|
||||
value={bbsTypeCd}
|
||||
onValueChange={(value) => setBbsTypeCd(value)}
|
||||
/>
|
||||
<Label htmlFor="bbsNm" className="ml-4 mr-2 text-label">
|
||||
게시판명
|
||||
@@ -97,14 +116,20 @@ function BbsPage() {
|
||||
<Input
|
||||
id="bbsNm"
|
||||
className="h-[3.2rem] w-[24rem] rounded-sm !text-[1.3rem]"
|
||||
value={boardParams.bbsNm}
|
||||
onChange={(e) =>
|
||||
setBoardParams({ ...boardParams, bbsNm: e.target.value })
|
||||
}
|
||||
value={bbsNm}
|
||||
onChange={(e) => setBbsNm(e.target.value)}
|
||||
/>
|
||||
<Button className="h-[3.2rem]" type="submit">
|
||||
조회
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
color="white"
|
||||
className="h-[3.2rem]"
|
||||
onClick={handleReset}
|
||||
>
|
||||
초기화
|
||||
</Button>
|
||||
</form>
|
||||
</div>
|
||||
<div className="card card-border">
|
||||
|
||||
@@ -5,56 +5,62 @@ import type { LwpoCode } from "@/entities/code";
|
||||
import { LwpoCodeManagementDialog } from "../ui/lwpocode-dialog";
|
||||
import { useState } from "react";
|
||||
|
||||
export const columns: ColumnDef<LwpoCode>[] = [
|
||||
{
|
||||
id: "no",
|
||||
header: "NO",
|
||||
cell: ({ row, table }) => {
|
||||
const totalRows = table.getRowCount();
|
||||
const { pageIndex, pageSize } = table.getState().pagination;
|
||||
return totalRows - (pageIndex * pageSize + row.index);
|
||||
// columns를 함수로 변경하여 onAfterSave를 주입받음
|
||||
export function getColumns(onAfterSave: () => void) : ColumnDef<LwpoCode>[] {
|
||||
return [
|
||||
{
|
||||
id: "no",
|
||||
header: "NO",
|
||||
cell: ({ row, table }) => {
|
||||
const totalRows = table.getRowCount();
|
||||
const { pageIndex, pageSize } = table.getState().pagination;
|
||||
return totalRows - (pageIndex * pageSize + row.index);
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
accessorKey: "lwpoCd",
|
||||
header: "하위코드",
|
||||
},
|
||||
{
|
||||
accessorKey: "lwpoCdNm",
|
||||
header: "하위코드명",
|
||||
},
|
||||
{
|
||||
accessorKey: "useYn",
|
||||
header: "사용 여부",
|
||||
},
|
||||
{
|
||||
accessorKey: "regDt",
|
||||
header: "등록일",
|
||||
cell: ({ row }) => {
|
||||
const date = dayjs(row.original.regDt);
|
||||
return date.format("YYYY-MM-DD");
|
||||
{
|
||||
accessorKey: "lwpoCd",
|
||||
header: "하위코드",
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "actions",
|
||||
header: "관리",
|
||||
cell: ({ row }) => (
|
||||
<div onClick={(e) => e.stopPropagation()}>
|
||||
<LwpoCodeManageButton
|
||||
lwpoCd={row.original.lwpoCd}
|
||||
upCd={row.original.upCd}
|
||||
/>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
];
|
||||
{
|
||||
accessorKey: "lwpoCdNm",
|
||||
header: "하위코드명",
|
||||
},
|
||||
{
|
||||
accessorKey: "useYn",
|
||||
header: "사용 여부",
|
||||
},
|
||||
{
|
||||
accessorKey: "regDt",
|
||||
header: "등록일",
|
||||
cell: ({ row }) => {
|
||||
const date = dayjs(row.original.regDt);
|
||||
return date.format("YYYY-MM-DD");
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "actions",
|
||||
header: "관리",
|
||||
cell: ({ row }) => (
|
||||
<div onClick={(e) => e.stopPropagation()}>
|
||||
<LwpoCodeManageButton
|
||||
lwpoCd={row.original.lwpoCd}
|
||||
upCd={row.original.upCd}
|
||||
onAfterSave={onAfterSave}
|
||||
/>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
const LwpoCodeManageButton = ({
|
||||
lwpoCd,
|
||||
upCd,
|
||||
onAfterSave,
|
||||
}: {
|
||||
lwpoCd: string;
|
||||
upCd: string;
|
||||
onAfterSave: () => void;
|
||||
}) => {
|
||||
const [dialogOpen, setDialogOpen] = useState(false);
|
||||
return (
|
||||
@@ -63,6 +69,7 @@ const LwpoCodeManageButton = ({
|
||||
upCd={upCd}
|
||||
open={dialogOpen}
|
||||
onOpenChange={setDialogOpen}
|
||||
onAfterSave={onAfterSave}
|
||||
>
|
||||
<Button size="sm">관리</Button>
|
||||
</LwpoCodeManagementDialog>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { memo } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
import {
|
||||
Button,
|
||||
@@ -38,6 +38,7 @@ type ManagementLwpoCodeDialogProps = {
|
||||
children?: React.ReactNode;
|
||||
open?: boolean;
|
||||
onOpenChange?: (open: boolean) => void;
|
||||
onAfterSave?: () => void; // 콜백 추가
|
||||
};
|
||||
|
||||
const LwpoCodeManagementDialog = memo(
|
||||
@@ -47,17 +48,18 @@ const LwpoCodeManagementDialog = memo(
|
||||
children,
|
||||
open,
|
||||
onOpenChange,
|
||||
onAfterSave, // 콜백 사용
|
||||
...props
|
||||
}: ManagementLwpoCodeDialogProps) => {
|
||||
const isRegistration = !lwpoCd;
|
||||
|
||||
const { confirm } = useConfirm();
|
||||
const queryClient = useQueryClient();
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
|
||||
const { data: detailData } = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.LWPO_CODE, upCd, lwpoCd],
|
||||
queryFn: () => LwpoCodeApi.lwpoCodeDetail(upCd!, lwpoCd!),
|
||||
enabled: !!upCd && !isRegistration,
|
||||
enabled: !!upCd && !isRegistration && open,
|
||||
});
|
||||
|
||||
const { data: upCodeData } = useQuery({
|
||||
@@ -69,7 +71,13 @@ const LwpoCodeManagementDialog = memo(
|
||||
const { mutateAsync: createLwpoCode } = useMutationWrapper({
|
||||
mutationFn: (data: LwpoCodeFormData) => LwpoCodeApi.createLwpoCode(data),
|
||||
onSuccess: () => {
|
||||
alert("등록되었습니다.", () => onOpenChange?.(false));
|
||||
alert("등록되었습니다.", () => {
|
||||
onOpenChange?.(false);
|
||||
onAfterSave?.();
|
||||
});
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.LWPO_CODE, upCd],
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
@@ -77,7 +85,10 @@ const LwpoCodeManagementDialog = memo(
|
||||
mutationFn: (data: LwpoCodeFormData) =>
|
||||
LwpoCodeApi.updateLwpoCode(upCd!, lwpoCd!, data),
|
||||
onSuccess: () => {
|
||||
alert("수정되었습니다.", () => onOpenChange?.(false));
|
||||
alert("수정되었습니다.", () => {
|
||||
onOpenChange?.(false);
|
||||
onAfterSave?.();
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
@@ -96,15 +107,38 @@ const LwpoCodeManagementDialog = memo(
|
||||
},
|
||||
});
|
||||
|
||||
const onSubmit =
|
||||
(callback: (data: LwpoCodeFormData) => void) =>
|
||||
async (data: LwpoCodeFormData) => {
|
||||
const confirmMessage = isRegistration
|
||||
? "등록하시겠습니까?"
|
||||
: "수정하시겠습니까?";
|
||||
|
||||
if (await confirm(confirmMessage)) callback(data);
|
||||
};
|
||||
const handleRegister = async () => {
|
||||
if (!upCd) {
|
||||
alert("상위코드가 없습니다.");
|
||||
return;
|
||||
}
|
||||
const confirmMessage = "등록하시겠습니까?";
|
||||
if (await confirm(confirmMessage)) {
|
||||
const rawValues = form.getValues();
|
||||
const values = {
|
||||
...rawValues,
|
||||
upCd: upCd,
|
||||
sortSeq: Number(rawValues.sortSeq) || 0,
|
||||
};
|
||||
await createLwpoCode(values);
|
||||
}
|
||||
};
|
||||
const handleSave = async () => {
|
||||
if (!upCd) {
|
||||
alert("상위코드가 없습니다.");
|
||||
return;
|
||||
}
|
||||
const confirmMessage = "수정하시겠습니까?";
|
||||
if (await confirm(confirmMessage)) {
|
||||
const rawValues = form.getValues();
|
||||
const values = {
|
||||
...rawValues,
|
||||
upCd: upCd,
|
||||
sortSeq: Number(rawValues.sortSeq) || 0,
|
||||
};
|
||||
await updateLwpoCode(values);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={onOpenChange} {...props}>
|
||||
@@ -117,9 +151,14 @@ const LwpoCodeManagementDialog = memo(
|
||||
</DialogHeader>
|
||||
<Form {...form}>
|
||||
<form
|
||||
onSubmit={form.handleSubmit(
|
||||
onSubmit(isRegistration ? createLwpoCode : updateLwpoCode),
|
||||
)}
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
if (isRegistration) {
|
||||
handleRegister();
|
||||
} else {
|
||||
handleSave();
|
||||
}
|
||||
}}
|
||||
className="space-y-4"
|
||||
>
|
||||
<Table variant="secondary">
|
||||
@@ -251,6 +290,9 @@ const LwpoCodeManagementDialog = memo(
|
||||
{...field}
|
||||
type="number"
|
||||
value={field.value ?? 0}
|
||||
onChange={(e) => {
|
||||
field.onChange(parseInt(e.target.value));
|
||||
}}
|
||||
className="!text-[1.3rem]"
|
||||
placeholder="정렬순서를 입력해주세요"
|
||||
/>
|
||||
@@ -292,7 +334,11 @@ const LwpoCodeManagementDialog = memo(
|
||||
</TableBody>
|
||||
</Table>
|
||||
<DialogFooter className="!justify-center">
|
||||
<Button size="lg" type="submit">
|
||||
<Button
|
||||
size="lg"
|
||||
type="submit"
|
||||
onClick={isRegistration ? handleRegister : handleSave}
|
||||
>
|
||||
{isRegistration ? "등록" : "저장"}
|
||||
</Button>
|
||||
<DialogClose asChild>
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Button, Input, Label } from "@common/components";
|
||||
import { LwpoCodeApi, type LwpoCodeParams } from "@/entities/code";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useAlertStore, useDataTable } from "@/shared/lib";
|
||||
import { columns } from "../model/lwpocode-table-columns";
|
||||
import { getColumns } from "../model/lwpocode-table-columns";
|
||||
import { LwpoCodeManagementDialog } from "./lwpocode-dialog";
|
||||
|
||||
type LwpoCodeSectionProps = {
|
||||
@@ -15,8 +15,10 @@ type LwpoCodeSectionProps = {
|
||||
function LwpoCodeSection({ upCd }: LwpoCodeSectionProps) {
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const [dialogOpen, setDialogOpen] = useState(false);
|
||||
const [lwpoCodeQuery, setLwpoCodeQuery] = useState<LwpoCodeParams>({
|
||||
const [lwpoCdNm, setLwpoCdNm] = useState("");
|
||||
const [searchParams, setSearchParams] = useState<LwpoCodeParams>({
|
||||
lwpoCdNm: "",
|
||||
sort: "regDt,desc",
|
||||
});
|
||||
const [pagination, setPagination] = useState<PaginationState>({
|
||||
pageIndex: 0,
|
||||
@@ -24,10 +26,10 @@ function LwpoCodeSection({ upCd }: LwpoCodeSectionProps) {
|
||||
});
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.LWPO_CODE, upCd, pagination],
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.LWPO_CODE, upCd, searchParams, pagination],
|
||||
queryFn: () =>
|
||||
LwpoCodeApi.getLwpoCodeList({
|
||||
...lwpoCodeQuery,
|
||||
...searchParams,
|
||||
upCd,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
@@ -36,6 +38,12 @@ function LwpoCodeSection({ upCd }: LwpoCodeSectionProps) {
|
||||
placeholderData: keepPreviousData,
|
||||
});
|
||||
|
||||
// 등록/수정 후 목록 재조회 콜백
|
||||
const handleAfterSave = () => {
|
||||
query.refetch();
|
||||
};
|
||||
const columns = getColumns(handleAfterSave);
|
||||
|
||||
const { mutateAsync: codeRefreshAll } = useMutation({
|
||||
mutationFn: LwpoCodeApi.codeRefreshAll,
|
||||
onSuccess: () => {
|
||||
@@ -59,7 +67,22 @@ function LwpoCodeSection({ upCd }: LwpoCodeSectionProps) {
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
query.refetch();
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
lwpoCdNm,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setLwpoCdNm("");
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
lwpoCdNm: "",
|
||||
});
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
@@ -75,17 +98,20 @@ function LwpoCodeSection({ upCd }: LwpoCodeSectionProps) {
|
||||
</Label>
|
||||
<Input
|
||||
className="h-[3.2rem] w-[20rem] rounded-sm !text-[1.3rem]"
|
||||
value={lwpoCodeQuery.lwpoCdNm}
|
||||
onChange={(e) =>
|
||||
setLwpoCodeQuery({
|
||||
...lwpoCodeQuery,
|
||||
lwpoCdNm: e.target.value,
|
||||
})
|
||||
}
|
||||
value={lwpoCdNm}
|
||||
onChange={(e) => setLwpoCdNm(e.target.value)}
|
||||
/>
|
||||
<Button className="h-[3.2rem]" type="submit">
|
||||
조회
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
color="white"
|
||||
className="h-[3.2rem]"
|
||||
onClick={handleReset}
|
||||
>
|
||||
초기화
|
||||
</Button>
|
||||
</form>
|
||||
</div>
|
||||
<div className="card card-border">
|
||||
@@ -96,8 +122,10 @@ function LwpoCodeSection({ upCd }: LwpoCodeSectionProps) {
|
||||
코드갱신
|
||||
</Button>
|
||||
<LwpoCodeManagementDialog
|
||||
upCd={upCd}
|
||||
open={dialogOpen}
|
||||
onOpenChange={setDialogOpen}
|
||||
onAfterSave={handleAfterSave}
|
||||
>
|
||||
<Button>등록</Button>
|
||||
</LwpoCodeManagementDialog>
|
||||
|
||||
@@ -14,8 +14,10 @@ type UpCodeSectionProps = {
|
||||
|
||||
function UpCodeSection({ handleSelectedUpCd }: UpCodeSectionProps) {
|
||||
const [dialogOpen, setDialogOpen] = useState(false);
|
||||
const [upCodeQuery, setUpCodeQuery] = useState<UpCodeParams>({
|
||||
const [keyword, setKeyword] = useState("");
|
||||
const [searchParams, setSearchParams] = useState<UpCodeParams>({
|
||||
keyword: "",
|
||||
sort: "regDt,desc",
|
||||
});
|
||||
const [pagination, setPagination] = useState<PaginationState>({
|
||||
pageIndex: 0,
|
||||
@@ -23,10 +25,10 @@ function UpCodeSection({ handleSelectedUpCd }: UpCodeSectionProps) {
|
||||
});
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.UP_CODE, pagination],
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.UP_CODE, searchParams, pagination],
|
||||
queryFn: () =>
|
||||
UpCodeApi.getUpCodeList({
|
||||
...upCodeQuery,
|
||||
...searchParams,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
}),
|
||||
@@ -40,7 +42,22 @@ function UpCodeSection({ handleSelectedUpCd }: UpCodeSectionProps) {
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
query.refetch();
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
keyword,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setKeyword("");
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
keyword: "",
|
||||
});
|
||||
};
|
||||
|
||||
const { tableComponent, tableInstance: table } = useDataTable({
|
||||
@@ -66,17 +83,20 @@ function UpCodeSection({ handleSelectedUpCd }: UpCodeSectionProps) {
|
||||
</Label>
|
||||
<Input
|
||||
className="h-[3.2rem] w-[20rem] rounded-sm !text-[1.3rem]"
|
||||
value={upCodeQuery.keyword}
|
||||
onChange={(e) =>
|
||||
setUpCodeQuery({
|
||||
...upCodeQuery,
|
||||
keyword: e.target.value,
|
||||
})
|
||||
}
|
||||
value={keyword}
|
||||
onChange={(e) => setKeyword(e.target.value)}
|
||||
/>
|
||||
<Button className="h-[3.2rem]" type="submit">
|
||||
조회
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
color="white"
|
||||
className="h-[3.2rem]"
|
||||
onClick={handleReset}
|
||||
>
|
||||
초기화
|
||||
</Button>
|
||||
</form>
|
||||
</div>
|
||||
<div className="card card-border">
|
||||
|
||||
@@ -60,7 +60,7 @@ function ContentsForm({
|
||||
</colgroup>
|
||||
<TableBody>
|
||||
<TableRow>
|
||||
<TableHead>콘텐츠 제목</TableHead>
|
||||
<TableHead data-required>콘텐츠 제목</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -82,7 +82,7 @@ function ContentsForm({
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>콘텐츠 내용</TableHead>
|
||||
<TableHead data-required>콘텐츠 내용</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -228,7 +228,7 @@ function ContentsForm({
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>사용여부</TableHead>
|
||||
<TableHead data-required>사용여부</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
|
||||
@@ -17,19 +17,21 @@ import { columns } from "../model/table-columns";
|
||||
function ContentsPage() {
|
||||
const router = useRouter();
|
||||
|
||||
const [contentsQuery, setContentsQuery] = useState<ContentsParams>({
|
||||
const [contsTtl, setContsTtl] = useState("");
|
||||
const [searchParams, setSearchParams] = useState<ContentsParams>({
|
||||
contsTtl: "",
|
||||
sort: "regDt,desc",
|
||||
});
|
||||
const [pagination, setPagination] = useState<PaginationState>({
|
||||
pageIndex: 0,
|
||||
pageSize: 5,
|
||||
pageSize: 10,
|
||||
});
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.CONTENTS, pagination],
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.CONTENTS, searchParams, pagination],
|
||||
queryFn: () =>
|
||||
ContentsApi.getContentsList({
|
||||
...contentsQuery,
|
||||
...searchParams,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
}),
|
||||
@@ -38,7 +40,22 @@ function ContentsPage() {
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
query.refetch();
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
contsTtl,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setContsTtl("");
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
contsTtl: "",
|
||||
});
|
||||
};
|
||||
|
||||
const handleRowClick = (row: Contents) => {
|
||||
@@ -72,12 +89,20 @@ function ContentsPage() {
|
||||
</Label>
|
||||
<Input
|
||||
className="h-[3.2rem] w-[24rem] rounded-sm !text-[1.3rem]"
|
||||
value={contentsQuery.contsTtl}
|
||||
onChange={(e) => setContentsQuery({ contsTtl: e.target.value })}
|
||||
value={contsTtl}
|
||||
onChange={(e) => setContsTtl(e.target.value)}
|
||||
/>
|
||||
<Button className="h-[3.2rem]" type="submit">
|
||||
조회
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
color="white"
|
||||
className="h-[3.2rem]"
|
||||
onClick={handleReset}
|
||||
>
|
||||
초기화
|
||||
</Button>
|
||||
</form>
|
||||
</div>
|
||||
<div className="card card-border">
|
||||
|
||||
@@ -97,6 +97,16 @@ function ModifyPage({ sequential }: { sequential: string }) {
|
||||
},
|
||||
});
|
||||
|
||||
const { mutateAsync: rejectContents } = useMutationWrapper({
|
||||
mutationFn: () => ContentsApi.rejectContents(contsSn, contsVer),
|
||||
onSuccess: () => {
|
||||
alert("반려되었습니다.");
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.CONTENTS_DETAILS],
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
const form = useForm<ContentsFormData>({
|
||||
resolver: zodResolver(contentsFormSchema),
|
||||
values: contentsDetail,
|
||||
@@ -107,14 +117,20 @@ function ModifyPage({ sequential }: { sequential: string }) {
|
||||
(contentsVersionList?.content?.[0]?.contsVer ?? 0) > 1;
|
||||
|
||||
const onRequestApprove = async () => {
|
||||
const message =
|
||||
"승인 요청하면 더이상 내용을 수정할 수 없습니다.\n요청하시겠습니까?";
|
||||
if (await confirm(message)) requestApprove();
|
||||
if (
|
||||
await confirm(
|
||||
"승인 요청하면 더이상 내용을 수정할 수 없습니다.\n요청하시겠습니까?",
|
||||
)
|
||||
)
|
||||
requestApprove();
|
||||
};
|
||||
|
||||
const onApprove = async () => {
|
||||
const message = "승인하시겠습니까?";
|
||||
if (await confirm(message)) approveContents();
|
||||
if (await confirm("승인하시겠습니까?")) approveContents();
|
||||
};
|
||||
|
||||
const onReject = async () => {
|
||||
if (await confirm("반려하시겠습니까?")) rejectContents();
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
@@ -158,7 +174,9 @@ function ModifyPage({ sequential }: { sequential: string }) {
|
||||
{approveStatus === CONTENTS_APPROVE_STATUS.REQUESTED && (
|
||||
<>
|
||||
<Button onClick={onApprove}>승인</Button>
|
||||
<Button color="gray">반려</Button>
|
||||
<Button color="gray" onClick={onReject}>
|
||||
반려
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -14,8 +14,10 @@ function FilePage() {
|
||||
const { confirm } = useConfirm();
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
|
||||
const [attachmentQuery, setAttachmentQuery] = useState<AttachmentParams>({
|
||||
const [orgnlFileNm, setOrgnlFileNm] = useState("");
|
||||
const [searchParams, setSearchParams] = useState<AttachmentParams>({
|
||||
orgnlFileNm: "",
|
||||
sort: "regDt,desc",
|
||||
});
|
||||
const [pagination, setPagination] = useState<PaginationState>({
|
||||
pageIndex: 0,
|
||||
@@ -23,10 +25,10 @@ function FilePage() {
|
||||
});
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.ATTACH_SERVICE.ATTACHMENTS, pagination],
|
||||
queryKey: [ENDPOINT.ATTACH_SERVICE.ATTACHMENTS, searchParams, pagination],
|
||||
queryFn: () =>
|
||||
AttachmentApi.getAttachmentsList({
|
||||
...attachmentQuery,
|
||||
...searchParams,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
}),
|
||||
@@ -64,14 +66,24 @@ function FilePage() {
|
||||
},
|
||||
});
|
||||
|
||||
const handleAttachmentQueryChange =
|
||||
(key: keyof AttachmentParams) => (value: string) => {
|
||||
setAttachmentQuery({ ...attachmentQuery, [key]: value });
|
||||
};
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
query.refetch();
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
orgnlFileNm,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setOrgnlFileNm("");
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
orgnlFileNm: "",
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -86,10 +98,8 @@ function FilePage() {
|
||||
<Input
|
||||
id="keyword"
|
||||
className="h-[3.2rem] w-[24rem] rounded-sm !text-[1.3rem]"
|
||||
value={attachmentQuery.orgnlFileNm || ""}
|
||||
onChange={(e) =>
|
||||
handleAttachmentQueryChange("orgnlFileNm")(e.target.value)
|
||||
}
|
||||
value={orgnlFileNm}
|
||||
onChange={(e) => setOrgnlFileNm(e.target.value)}
|
||||
placeholder="파일명을 입력하세요"
|
||||
/>
|
||||
</div>
|
||||
@@ -97,6 +107,14 @@ function FilePage() {
|
||||
<Button className="h-[3.2rem]" type="submit">
|
||||
조회
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
color="white"
|
||||
className="h-[3.2rem]"
|
||||
onClick={handleReset}
|
||||
>
|
||||
초기화
|
||||
</Button>
|
||||
</form>
|
||||
</div>
|
||||
<div className="card card-border">
|
||||
|
||||
@@ -4,7 +4,11 @@ import { type GroupListResponseDto } from "@/entities/group";
|
||||
import { MenuAuthorityDialog } from "../ui/menu-authority-dialog";
|
||||
import { GroupsDialog } from "../ui/groups-dialog";
|
||||
|
||||
export const columns: ColumnDef<GroupListResponseDto>[] = [
|
||||
export const createColumns = ({
|
||||
onDelete,
|
||||
}: {
|
||||
onDelete: (groupId: string) => void;
|
||||
}): ColumnDef<GroupListResponseDto>[] => [
|
||||
{
|
||||
accessorKey: "groupId",
|
||||
header: "그룹코드",
|
||||
@@ -20,18 +24,28 @@ export const columns: ColumnDef<GroupListResponseDto>[] = [
|
||||
{
|
||||
id: "actions",
|
||||
header: "관리",
|
||||
cell: ({ row }) => (
|
||||
<div
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
className="flex justify-center gap-2"
|
||||
>
|
||||
<MenuAuthorityDialog groupId={row.original.groupId} />
|
||||
<GroupsDialog groupId={row.original.groupId}>
|
||||
<Button size="sm" color="white">
|
||||
수정
|
||||
cell: ({ row }) => {
|
||||
const handleDelete = (e: React.MouseEvent) => {
|
||||
e.stopPropagation();
|
||||
onDelete(row.original.groupId);
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
className="flex justify-center gap-2"
|
||||
>
|
||||
<MenuAuthorityDialog groupId={row.original.groupId} />
|
||||
<GroupsDialog groupId={row.original.groupId}>
|
||||
<Button size="sm" color="white">
|
||||
수정
|
||||
</Button>
|
||||
</GroupsDialog>
|
||||
<Button size="sm" color="red" onClick={handleDelete}>
|
||||
삭제
|
||||
</Button>
|
||||
</GroupsDialog>
|
||||
</div>
|
||||
),
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -37,7 +37,7 @@ function GroupForm({ form }: GroupFormProps) {
|
||||
</colgroup>
|
||||
<TableBody>
|
||||
<TableRow>
|
||||
<TableHead>그룹코드</TableHead>
|
||||
<TableHead data-required>그룹코드</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -59,7 +59,7 @@ function GroupForm({ form }: GroupFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>그룹명</TableHead>
|
||||
<TableHead data-required>그룹명</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -81,7 +81,7 @@ function GroupForm({ form }: GroupFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>그룹구분</TableHead>
|
||||
<TableHead data-required>그룹구분</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -146,7 +146,7 @@ function GroupForm({ form }: GroupFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>관리권한</TableHead>
|
||||
<TableHead data-required>관리권한</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -176,7 +176,7 @@ function GroupForm({ form }: GroupFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>권한</TableHead>
|
||||
<TableHead data-required>권한</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
type RowSelectionState,
|
||||
} from "@tanstack/react-table";
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
import { Button } from "@common/components";
|
||||
import { Button,Input, Label } from "@common/components";
|
||||
import { GroupUsersApi } from "@/entities/group-user";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useAlertStore, useDataTable } from "@/shared/lib";
|
||||
@@ -32,13 +32,17 @@ function GroupUsersSection({ groupId }: GroupUsersSectionProps) {
|
||||
pageIndex: 0,
|
||||
pageSize: 10,
|
||||
});
|
||||
|
||||
const [userNm, setUserNm] = useState("");
|
||||
|
||||
const [rowSelection, setRowSelection] = useState<RowSelectionState>({});
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.GROUP_USERS, groupId, pagination],
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.GROUP_USERS, groupId, pagination, userNm],
|
||||
queryFn: () =>
|
||||
GroupUsersApi.findPageGroupUser({
|
||||
keyword: groupId,
|
||||
userNm: userNm,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
}),
|
||||
@@ -46,6 +50,20 @@ function GroupUsersSection({ groupId }: GroupUsersSectionProps) {
|
||||
placeholderData: keepPreviousData,
|
||||
});
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
// userNm이 이미 state에 반영되어 있으므로 별도 처리 불필요
|
||||
// 쿼리키에 userNm이 포함되어 있어 자동 refetch됨
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setUserNm("");
|
||||
};
|
||||
|
||||
const { tableComponent, tableInstance: table } = useDataTable({
|
||||
query,
|
||||
tableOptions: {
|
||||
@@ -97,6 +115,29 @@ function GroupUsersSection({ groupId }: GroupUsersSectionProps) {
|
||||
|
||||
return (
|
||||
<div className="flex-1">
|
||||
<div className="card card-border">
|
||||
<form onSubmit={handleSubmit} className="flex items-center gap-2 p-2">
|
||||
<Label htmlFor="" className="mr-2 text-label">
|
||||
이름
|
||||
</Label>
|
||||
<Input
|
||||
className="h-[3.2rem] w-[20rem] rounded-sm !text-[1.3rem]"
|
||||
value={userNm}
|
||||
onChange={(e) => setUserNm(e.target.value)}
|
||||
/>
|
||||
<Button className="h-[3.2rem]" type="submit">
|
||||
조회
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
color="white"
|
||||
className="h-[3.2rem]"
|
||||
onClick={handleReset}
|
||||
>
|
||||
초기화
|
||||
</Button>
|
||||
</form>
|
||||
</div>
|
||||
<div className="card card-border">
|
||||
<div className="card-header">
|
||||
<h3 className="text-2xl font-medium text-label">그룹 사용자 목록</h3>
|
||||
|
||||
@@ -43,7 +43,7 @@ const GroupsDialog = memo(
|
||||
const { data: group } = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.GROUPS, groupId],
|
||||
queryFn: () => GroupApi.findGroupById(groupId!),
|
||||
enabled: !!groupId,
|
||||
enabled: !!groupId && open, // open 시점 groupId가 있을 때만 상세 조회 API 호출
|
||||
});
|
||||
|
||||
const { mutateAsync: createGroup } = useMutationWrapper({
|
||||
|
||||
@@ -1,14 +1,20 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import { keepPreviousData, useQuery } from "@tanstack/react-query";
|
||||
import {
|
||||
keepPreviousData,
|
||||
useQuery,
|
||||
useQueryClient,
|
||||
} from "@tanstack/react-query";
|
||||
import { getCoreRowModel, type PaginationState } from "@tanstack/react-table";
|
||||
import { Button } from "@common/components";
|
||||
import { GroupApi } from "@/entities/group";
|
||||
import { Button, Input, Label } from "@common/components";
|
||||
import { GroupApi , type GroupSearchParams} from "@/entities/group";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useDataTable } from "@/shared/lib";
|
||||
import { columns } from "../model/groups-table-columns";
|
||||
import { createColumns } from "../model/groups-table-columns";
|
||||
import { GroupsDialog } from "./groups-dialog";
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
import { useAlertStore, useMutationWrapper } from "@/shared/lib";
|
||||
|
||||
type GroupsSectionProps = {
|
||||
handleSelectedGroup: (groupId: string) => void;
|
||||
@@ -20,25 +26,73 @@ function GroupsSection({ handleSelectedGroup }: GroupsSectionProps) {
|
||||
pageSize: 10,
|
||||
});
|
||||
|
||||
const [groupNm, setGroupNm] = useState("");
|
||||
const [searchParams, setSearchParams] = useState<GroupSearchParams>({
|
||||
groupNm: "",
|
||||
delYn :"N",
|
||||
sort : "groupId,desc",
|
||||
});
|
||||
|
||||
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.GROUPS, pagination],
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.GROUPS,searchParams, pagination],
|
||||
queryFn: () =>
|
||||
GroupApi.findPageGroup({
|
||||
...searchParams,
|
||||
page: pagination.pageIndex,
|
||||
size: pagination.pageSize,
|
||||
}),
|
||||
placeholderData: keepPreviousData,
|
||||
});
|
||||
const { confirm } = useConfirm();
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const queryClient = useQueryClient();
|
||||
const { mutateAsync: deleteGroup } = useMutationWrapper({
|
||||
mutationFn: (groupId: string) => GroupApi.deleteGroup(groupId),
|
||||
onSuccess: () => {
|
||||
alert("삭제되었습니다.");
|
||||
queryClient.invalidateQueries({
|
||||
predicate: (query) => query.queryKey[0] === ENDPOINT.CMS_SERVICE.GROUPS,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
const handleDelete = async (groupId: string) => {
|
||||
if (await confirm("삭제하시겠습니까?")) {
|
||||
await deleteGroup(groupId);
|
||||
}
|
||||
};
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
setPagination({
|
||||
...pagination,
|
||||
pageIndex: 0,
|
||||
});
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
groupNm,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setGroupNm("");
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
groupNm: "",
|
||||
delYn:"N"
|
||||
});
|
||||
};
|
||||
const handleRowClick = (row: { groupId: string }) => {
|
||||
table.setRowSelection({ [row.groupId]: true });
|
||||
handleSelectedGroup(row.groupId);
|
||||
handleSelectedGroup(row.groupId); // 1. 리스트에서 선택된 groupId 저장
|
||||
};
|
||||
|
||||
const { tableComponent, tableInstance: table } = useDataTable({
|
||||
query,
|
||||
tableOptions: {
|
||||
columns,
|
||||
columns: createColumns({ onDelete: handleDelete }),
|
||||
state: { pagination },
|
||||
manualPagination: true,
|
||||
enableMultiRowSelection: false,
|
||||
@@ -54,6 +108,43 @@ function GroupsSection({ handleSelectedGroup }: GroupsSectionProps) {
|
||||
|
||||
return (
|
||||
<div className="flex-1">
|
||||
<div className="card card-border">
|
||||
<form onSubmit={handleSubmit} className="flex items-center gap-2 p-2">
|
||||
<Label htmlFor="" className="mr-2 text-label">
|
||||
그룹명
|
||||
</Label>
|
||||
<Input
|
||||
className="h-[3.2rem] w-[20rem] rounded-sm !text-[1.3rem]"
|
||||
value={groupNm}
|
||||
onChange={(e) => setGroupNm(e.target.value)}
|
||||
/>
|
||||
<Button className="h-[3.2rem]" type="submit">
|
||||
조회
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
color="white"
|
||||
className="h-[3.2rem]"
|
||||
onClick={handleReset}
|
||||
>
|
||||
초기화
|
||||
</Button>
|
||||
<Label htmlFor="delYn" className="ml-4 mr-2 text-label">
|
||||
삭제여부
|
||||
</Label>
|
||||
<input
|
||||
id="delYn"
|
||||
type="checkbox"
|
||||
checked={searchParams.delYn === "Y"}
|
||||
onChange={(e) =>
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
delYn: e.target.checked ? "Y" : "N",
|
||||
})
|
||||
}
|
||||
/>
|
||||
</form>
|
||||
</div>
|
||||
<div className="card card-border">
|
||||
<div className="card-header">
|
||||
<h3 className="text-2xl font-medium text-label">그룹 목록</h3>
|
||||
|
||||
@@ -42,8 +42,9 @@ function ImageForm({ form, imgSn, ...props }: ImageFormProps) {
|
||||
file: uploadFile,
|
||||
response: uploadResponse,
|
||||
progress,
|
||||
isValid,
|
||||
setFile,
|
||||
} = useTus();
|
||||
} = useTus({ accept: ".jpeg,.jpg,.png" });
|
||||
const setAttachmentFileCode = useAttachmentStore(
|
||||
(state) => state.setAttachmentFileCode,
|
||||
);
|
||||
@@ -90,7 +91,7 @@ function ImageForm({ form, imgSn, ...props }: ImageFormProps) {
|
||||
</colgroup>
|
||||
<TableBody>
|
||||
<TableRow>
|
||||
<TableHead>이미지명</TableHead>
|
||||
<TableHead data-required>이미지명</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -111,7 +112,7 @@ function ImageForm({ form, imgSn, ...props }: ImageFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>정렬순서</TableHead>
|
||||
<TableHead data-required>정렬순서</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -137,7 +138,7 @@ function ImageForm({ form, imgSn, ...props }: ImageFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>이미지유형</TableHead>
|
||||
<TableHead data-required>이미지유형</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -157,7 +158,7 @@ function ImageForm({ form, imgSn, ...props }: ImageFormProps) {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead>첨부파일</TableHead>
|
||||
<TableHead data-required>첨부파일</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -208,24 +209,26 @@ function ImageForm({ form, imgSn, ...props }: ImageFormProps) {
|
||||
customPreview={
|
||||
<>
|
||||
<Label htmlFor="atflCd">
|
||||
<div className="relative h-[27rem] w-[48rem] overflow-hidden rounded-sm border border-border bg-accent">
|
||||
<div className="relative h-full w-full">
|
||||
{imageUrl && (
|
||||
<Image
|
||||
src={imageUrl}
|
||||
className="object-contain"
|
||||
fill
|
||||
alt="업로드된 이미지"
|
||||
<div className="h-[27rem] w-[48rem] overflow-hidden rounded-sm border border-border bg-accent">
|
||||
{isValid && (
|
||||
<div className="relative size-full">
|
||||
{imageUrl && (
|
||||
<Image
|
||||
src={imageUrl}
|
||||
className="object-contain"
|
||||
fill
|
||||
alt="업로드된 이미지"
|
||||
/>
|
||||
)}
|
||||
<p className="absolute bottom-3 left-0 z-10 p-2 text-base leading-none">
|
||||
{uploadFile?.name}
|
||||
</p>
|
||||
<Progress
|
||||
value={progress}
|
||||
className="absolute bottom-0 left-0 z-10"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<p className="absolute bottom-3 left-0 z-10 p-2 text-base leading-none">
|
||||
{uploadFile?.name}
|
||||
</p>
|
||||
<Progress
|
||||
value={progress}
|
||||
className="absolute bottom-0 left-0 z-10"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</Label>
|
||||
<div className="mb-2 text-lg font-medium text-label">
|
||||
@@ -269,7 +272,7 @@ function ImageForm({ form, imgSn, ...props }: ImageFormProps) {
|
||||
</TableRow>
|
||||
)}
|
||||
<TableRow>
|
||||
<TableHead>사용여부</TableHead>
|
||||
<TableHead data-required>사용여부</TableHead>
|
||||
<TableCell className="border">
|
||||
<FormField
|
||||
control={form.control}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user