260716_01_ENH: 본 서버에서 기동 후 중간 테스트를 위한 커밋

This commit is contained in:
2026-07-16 09:12:57 +09:00
parent c710a60beb
commit 36c7b41191
29 changed files with 864 additions and 532 deletions

View File

@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ClaudeCodeEditorTabs"> <component name="ClaudeCodeEditorTabs">
<option name="activeSessionId" value="ce9acaee-3f3c-42ad-8c11-11ac85f2faf9" /> <option name="activeSessionId" value="92992f57-d7ca-4de2-8f74-9ef027389dc9" />
<option name="openSessionIds"> <option name="openSessionIds">
<list> <list>
<option value="ce9acaee-3f3c-42ad-8c11-11ac85f2faf9" /> <option value="92992f57-d7ca-4de2-8f74-9ef027389dc9" />
</list> </list>
</option> </option>
<option name="sessionPaths"> <option name="sessionPaths">
<map> <map>
<entry key="ce9acaee-3f3c-42ad-8c11-11ac85f2faf9" value="/sessions/2b094ed0-8b05-4852-a909-78cee4b18687" /> <entry key="92992f57-d7ca-4de2-8f74-9ef027389dc9" value="/sessions/215ce9ea-6da9-4fc1-aabf-8801c4455db1" />
</map> </map>
</option> </option>
<option name="sessionTitles"> <option name="sessionTitles">
<map> <map>
<entry key="ce9acaee-3f3c-42ad-8c11-11ac85f2faf9" value="이 다이얼로그에서 미리보기는 우측으로 따로 빼야 할거 같아 y축 높이가 너무 길어" /> <entry key="92992f57-d7ca-4de2-8f74-9ef027389dc9" value="hi" />
</map> </map>
</option> </option>
</component> </component>

396
package-lock.json generated
View File

@@ -11,7 +11,7 @@
"@dnd-kit/core": "^6.3.1", "@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0", "@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2", "@dnd-kit/utilities": "^3.2.2",
"@kri/common": "^0.16.0", "@kri/common": "^0.18.0",
"@radix-ui/react-checkbox": "^1.3.3", "@radix-ui/react-checkbox": "^1.3.3",
"@radix-ui/react-dialog": "^1.1.15", "@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.16", "@radix-ui/react-dropdown-menu": "^2.1.16",
@@ -83,12 +83,13 @@
} }
}, },
"node_modules/@babel/code-frame": { "node_modules/@babel/code-frame": {
"version": "7.27.1", "version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz",
"integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==",
"devOptional": true, "devOptional": true,
"license": "MIT",
"dependencies": { "dependencies": {
"@babel/helper-validator-identifier": "^7.27.1", "@babel/helper-validator-identifier": "^7.29.7",
"js-tokens": "^4.0.0", "js-tokens": "^4.0.0",
"picocolors": "^1.1.1" "picocolors": "^1.1.1"
}, },
@@ -97,29 +98,31 @@
} }
}, },
"node_modules/@babel/compat-data": { "node_modules/@babel/compat-data": {
"version": "7.28.5", "version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.5.tgz", "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz",
"integrity": "sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA==", "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==",
"devOptional": true, "devOptional": true,
"license": "MIT",
"engines": { "engines": {
"node": ">=6.9.0" "node": ">=6.9.0"
} }
}, },
"node_modules/@babel/core": { "node_modules/@babel/core": {
"version": "7.28.5", "version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz",
"integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==",
"devOptional": true, "devOptional": true,
"license": "MIT",
"dependencies": { "dependencies": {
"@babel/code-frame": "^7.27.1", "@babel/code-frame": "^7.29.7",
"@babel/generator": "^7.28.5", "@babel/generator": "^7.29.7",
"@babel/helper-compilation-targets": "^7.27.2", "@babel/helper-compilation-targets": "^7.29.7",
"@babel/helper-module-transforms": "^7.28.3", "@babel/helper-module-transforms": "^7.29.7",
"@babel/helpers": "^7.28.4", "@babel/helpers": "^7.29.7",
"@babel/parser": "^7.28.5", "@babel/parser": "^7.29.7",
"@babel/template": "^7.27.2", "@babel/template": "^7.29.7",
"@babel/traverse": "^7.28.5", "@babel/traverse": "^7.29.7",
"@babel/types": "^7.28.5", "@babel/types": "^7.29.7",
"@jridgewell/remapping": "^2.3.5", "@jridgewell/remapping": "^2.3.5",
"convert-source-map": "^2.0.0", "convert-source-map": "^2.0.0",
"debug": "^4.1.0", "debug": "^4.1.0",
@@ -136,13 +139,14 @@
} }
}, },
"node_modules/@babel/generator": { "node_modules/@babel/generator": {
"version": "7.28.5", "version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.7.tgz",
"integrity": "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==", "integrity": "sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==",
"devOptional": true, "devOptional": true,
"license": "MIT",
"dependencies": { "dependencies": {
"@babel/parser": "^7.28.5", "@babel/parser": "^7.29.7",
"@babel/types": "^7.28.5", "@babel/types": "^7.29.7",
"@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/gen-mapping": "^0.3.12",
"@jridgewell/trace-mapping": "^0.3.28", "@jridgewell/trace-mapping": "^0.3.28",
"jsesc": "^3.0.2" "jsesc": "^3.0.2"
@@ -152,13 +156,14 @@
} }
}, },
"node_modules/@babel/helper-compilation-targets": { "node_modules/@babel/helper-compilation-targets": {
"version": "7.27.2", "version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz",
"integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==",
"devOptional": true, "devOptional": true,
"license": "MIT",
"dependencies": { "dependencies": {
"@babel/compat-data": "^7.27.2", "@babel/compat-data": "^7.29.7",
"@babel/helper-validator-option": "^7.27.1", "@babel/helper-validator-option": "^7.29.7",
"browserslist": "^4.24.0", "browserslist": "^4.24.0",
"lru-cache": "^5.1.1", "lru-cache": "^5.1.1",
"semver": "^6.3.1" "semver": "^6.3.1"
@@ -168,36 +173,39 @@
} }
}, },
"node_modules/@babel/helper-globals": { "node_modules/@babel/helper-globals": {
"version": "7.28.0", "version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz",
"integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==",
"devOptional": true, "devOptional": true,
"license": "MIT",
"engines": { "engines": {
"node": ">=6.9.0" "node": ">=6.9.0"
} }
}, },
"node_modules/@babel/helper-module-imports": { "node_modules/@babel/helper-module-imports": {
"version": "7.27.1", "version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz",
"integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==",
"devOptional": true, "devOptional": true,
"license": "MIT",
"dependencies": { "dependencies": {
"@babel/traverse": "^7.27.1", "@babel/traverse": "^7.29.7",
"@babel/types": "^7.27.1" "@babel/types": "^7.29.7"
}, },
"engines": { "engines": {
"node": ">=6.9.0" "node": ">=6.9.0"
} }
}, },
"node_modules/@babel/helper-module-transforms": { "node_modules/@babel/helper-module-transforms": {
"version": "7.28.3", "version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz",
"integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==",
"devOptional": true, "devOptional": true,
"license": "MIT",
"dependencies": { "dependencies": {
"@babel/helper-module-imports": "^7.27.1", "@babel/helper-module-imports": "^7.29.7",
"@babel/helper-validator-identifier": "^7.27.1", "@babel/helper-validator-identifier": "^7.29.7",
"@babel/traverse": "^7.28.3" "@babel/traverse": "^7.29.7"
}, },
"engines": { "engines": {
"node": ">=6.9.0" "node": ">=6.9.0"
@@ -207,52 +215,57 @@
} }
}, },
"node_modules/@babel/helper-string-parser": { "node_modules/@babel/helper-string-parser": {
"version": "7.27.1", "version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz",
"integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==",
"devOptional": true, "devOptional": true,
"license": "MIT",
"engines": { "engines": {
"node": ">=6.9.0" "node": ">=6.9.0"
} }
}, },
"node_modules/@babel/helper-validator-identifier": { "node_modules/@babel/helper-validator-identifier": {
"version": "7.28.5", "version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz",
"integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==",
"devOptional": true, "devOptional": true,
"license": "MIT",
"engines": { "engines": {
"node": ">=6.9.0" "node": ">=6.9.0"
} }
}, },
"node_modules/@babel/helper-validator-option": { "node_modules/@babel/helper-validator-option": {
"version": "7.27.1", "version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz",
"integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==",
"devOptional": true, "devOptional": true,
"license": "MIT",
"engines": { "engines": {
"node": ">=6.9.0" "node": ">=6.9.0"
} }
}, },
"node_modules/@babel/helpers": { "node_modules/@babel/helpers": {
"version": "7.28.4", "version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz",
"integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==",
"devOptional": true, "devOptional": true,
"license": "MIT",
"dependencies": { "dependencies": {
"@babel/template": "^7.27.2", "@babel/template": "^7.29.7",
"@babel/types": "^7.28.4" "@babel/types": "^7.29.7"
}, },
"engines": { "engines": {
"node": ">=6.9.0" "node": ">=6.9.0"
} }
}, },
"node_modules/@babel/parser": { "node_modules/@babel/parser": {
"version": "7.28.5", "version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.7.tgz",
"integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==", "integrity": "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==",
"devOptional": true, "devOptional": true,
"license": "MIT",
"dependencies": { "dependencies": {
"@babel/types": "^7.28.5" "@babel/types": "^7.29.7"
}, },
"bin": { "bin": {
"parser": "bin/babel-parser.js" "parser": "bin/babel-parser.js"
@@ -262,31 +275,33 @@
} }
}, },
"node_modules/@babel/template": { "node_modules/@babel/template": {
"version": "7.27.2", "version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz",
"integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==",
"devOptional": true, "devOptional": true,
"license": "MIT",
"dependencies": { "dependencies": {
"@babel/code-frame": "^7.27.1", "@babel/code-frame": "^7.29.7",
"@babel/parser": "^7.27.2", "@babel/parser": "^7.29.7",
"@babel/types": "^7.27.1" "@babel/types": "^7.29.7"
}, },
"engines": { "engines": {
"node": ">=6.9.0" "node": ">=6.9.0"
} }
}, },
"node_modules/@babel/traverse": { "node_modules/@babel/traverse": {
"version": "7.28.5", "version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.5.tgz", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.7.tgz",
"integrity": "sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ==", "integrity": "sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==",
"devOptional": true, "devOptional": true,
"license": "MIT",
"dependencies": { "dependencies": {
"@babel/code-frame": "^7.27.1", "@babel/code-frame": "^7.29.7",
"@babel/generator": "^7.28.5", "@babel/generator": "^7.29.7",
"@babel/helper-globals": "^7.28.0", "@babel/helper-globals": "^7.29.7",
"@babel/parser": "^7.28.5", "@babel/parser": "^7.29.7",
"@babel/template": "^7.27.2", "@babel/template": "^7.29.7",
"@babel/types": "^7.28.5", "@babel/types": "^7.29.7",
"debug": "^4.3.1" "debug": "^4.3.1"
}, },
"engines": { "engines": {
@@ -294,13 +309,14 @@
} }
}, },
"node_modules/@babel/types": { "node_modules/@babel/types": {
"version": "7.28.5", "version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.7.tgz",
"integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==", "integrity": "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==",
"devOptional": true, "devOptional": true,
"license": "MIT",
"dependencies": { "dependencies": {
"@babel/helper-string-parser": "^7.27.1", "@babel/helper-string-parser": "^7.29.7",
"@babel/helper-validator-identifier": "^7.28.5" "@babel/helper-validator-identifier": "^7.29.7"
}, },
"engines": { "engines": {
"node": ">=6.9.0" "node": ">=6.9.0"
@@ -1098,9 +1114,9 @@
} }
}, },
"node_modules/@kri/common": { "node_modules/@kri/common": {
"version": "0.16.0", "version": "0.18.0",
"resolved": "https://gitea.kric.com/api/packages/KRi/npm/%40kri%2Fcommon/-/0.16.0/common-0.16.0.tgz", "resolved": "https://gitea.kric.com/api/packages/KRi/npm/%40kri%2Fcommon/-/0.18.0/common-0.18.0.tgz",
"integrity": "sha512-414uCJb4eRZ/lwdUxHu5/OyslgAAXcsCJ9ag33Awmq3eCEtnnwOlMai+hvjVF2m0jFfQUrek5en4On1PivacHg==", "integrity": "sha512-vd4oDG11GD9ZQmMrx/lDuGiM4CaXb0VVDoNy9zcbplhEbyl8F8eokML9UK9BOhScacF3jiamEEUkVOaqRHLgig==",
"license": "UNLICENSED", "license": "UNLICENSED",
"dependencies": { "dependencies": {
"clsx": "^2.1.1", "clsx": "^2.1.1",
@@ -1137,9 +1153,9 @@
} }
}, },
"node_modules/@next/env": { "node_modules/@next/env": {
"version": "16.2.4", "version": "16.2.10",
"resolved": "https://registry.npmjs.org/@next/env/-/env-16.2.4.tgz", "resolved": "https://registry.npmjs.org/@next/env/-/env-16.2.10.tgz",
"integrity": "sha512-dKkkOzOSwFYe5RX6y26fZgkSpVAlIOJKQHIiydQcrWH6y/97+RceSOAdjZ14Qa3zLduVUy0TXcn+EiM6t4rPgw==", "integrity": "sha512-zLPxg9M0MEHmygpj5OuxjQ+vHMiy/K7cSp74G8ecYolmgUWw0RwN02tF56npup/+qaI8JB97hQgS/r2Hb6QwVA==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/@next/eslint-plugin-next": { "node_modules/@next/eslint-plugin-next": {
@@ -1152,9 +1168,9 @@
} }
}, },
"node_modules/@next/swc-darwin-arm64": { "node_modules/@next/swc-darwin-arm64": {
"version": "16.2.4", "version": "16.2.10",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.2.4.tgz", "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.2.10.tgz",
"integrity": "sha512-OXTFFox5EKN1Ym08vfrz+OXxmCcEjT4SFMbNRsWZE99dMqt2Kcusl5MqPXcW232RYkMLQTy0hqgAMEsfEd/l2A==", "integrity": "sha512-v9IdJCa0H0mbo+8z5zwUpOk1Vj7RjkcI5uNYf5Ws1y6szf/p3Mzl9hLaST8SCt6L9h8NGnruZcd2+o0NTNwDhA==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -1168,9 +1184,9 @@
} }
}, },
"node_modules/@next/swc-darwin-x64": { "node_modules/@next/swc-darwin-x64": {
"version": "16.2.4", "version": "16.2.10",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-16.2.4.tgz", "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-16.2.10.tgz",
"integrity": "sha512-XhpVnUfmYWvD3YrXu55XdcAkQtOnvaI6wtQa8fuF5fGoKoxIUZ0kWPtcOfqJEWngFF/lOS9l3+O9CcownhiQxQ==", "integrity": "sha512-17IS0jJRViROGmA9uGdNR8VPJpfbnaVG7E9qhso5jDLkmyd0lSDORWxbcKINzcFqzZqGwGtMSnrFRxBpuUYjLQ==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -1184,9 +1200,9 @@
} }
}, },
"node_modules/@next/swc-linux-arm64-gnu": { "node_modules/@next/swc-linux-arm64-gnu": {
"version": "16.2.4", "version": "16.2.10",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-16.2.4.tgz", "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-16.2.10.tgz",
"integrity": "sha512-Mx/tjlNA3G8kg14QvuGAJ4xBwPk1tUHq56JxZ8CXnZwz1Etz714soCEzGQQzVMz4bEnGPowzkV6Xrp6wAkEWOQ==", "integrity": "sha512-GRQRsRtuciNJvB54AvvuQTiq0oZtFwa1owQqtZD8wwnGpM2L39MV22kpI72YSXLKIyY40LC66EiLFv4PiicXxg==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -1200,9 +1216,9 @@
} }
}, },
"node_modules/@next/swc-linux-arm64-musl": { "node_modules/@next/swc-linux-arm64-musl": {
"version": "16.2.4", "version": "16.2.10",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-16.2.4.tgz", "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-16.2.10.tgz",
"integrity": "sha512-iVMMp14514u7Nup2umQS03nT/bN9HurK8ufylC3FZNykrwjtx7V1A7+4kvhbDSCeonTVqV3Txnv0Lu+m2oDXNg==", "integrity": "sha512-zkN9MQYS7UQBro+FnISUq1itaQjXI9xqISzuQ+2bc921NcJ1x4yPCqrn77tVN6/dOOXaaWVX3k6/bR07pPwK+A==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -1216,9 +1232,9 @@
} }
}, },
"node_modules/@next/swc-linux-x64-gnu": { "node_modules/@next/swc-linux-x64-gnu": {
"version": "16.2.4", "version": "16.2.10",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-16.2.4.tgz", "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-16.2.10.tgz",
"integrity": "sha512-EZOvm1aQWgnI/N/xcWOlnS3RQBk0VtVav5Zo7n4p0A7UKyTDx047k8opDbXgBpHl4CulRqRfbw3QrX2w5UOXMQ==", "integrity": "sha512-iCVJnwvrPYECvA6WM/7+oo+OiTvedIKLxtCLAZP4xZR3nXa1zmzZyLPbYCmWvpd4CvMYF1EMTafd0ii3DygLvA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -1232,9 +1248,9 @@
} }
}, },
"node_modules/@next/swc-linux-x64-musl": { "node_modules/@next/swc-linux-x64-musl": {
"version": "16.2.4", "version": "16.2.10",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-16.2.4.tgz", "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-16.2.10.tgz",
"integrity": "sha512-h9FxsngCm9cTBf71AR4fGznDEDx1hS7+kSEiIRjq5kO1oXWm07DxVGZjCvk0SGx7TSjlUqhI8oOyz7NfwAdPoA==", "integrity": "sha512-ov2g4H0dHY9bPoOU83m91hWT7Iq5qy13bUnyyshLU3HGR1Ownn0X9QpmDPc5iIUaahTp7f7LeGAhV4DSFtackw==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -1248,9 +1264,9 @@
} }
}, },
"node_modules/@next/swc-win32-arm64-msvc": { "node_modules/@next/swc-win32-arm64-msvc": {
"version": "16.2.4", "version": "16.2.10",
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-16.2.4.tgz", "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-16.2.10.tgz",
"integrity": "sha512-3NdJV5OXMSOeJYijX+bjaLge3mJBlh4ybydbT4GFoB/2hAojWHtMhl3CYlYoMrjPuodp0nzFVi4Tj2+WaMg+Ow==", "integrity": "sha512-DwAnhLX76HQiFFQNgWlcK+JzlnD1rZ+UK/WY0ZMI/deXpvgnesjNYrqcfo1JzBuz4Kf7o3brIBL0glI1junatA==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -1264,9 +1280,9 @@
} }
}, },
"node_modules/@next/swc-win32-x64-msvc": { "node_modules/@next/swc-win32-x64-msvc": {
"version": "16.2.4", "version": "16.2.10",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-16.2.4.tgz", "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-16.2.10.tgz",
"integrity": "sha512-kMVGgsqhO5YTYODD9IPGGhA6iprWidQckK3LmPeW08PIFENRmgfb4MjXHO+p//d+ts2rpjvK5gXWzXSMrPl9cw==", "integrity": "sha512-0JXq3b85Jk9Jg4ntLUbXSPvoDw3gpZou7twuKdoFG2jOw635v7+IiXfTaa0TxVMyx78pUjnrVYwLgjKfX4e6/A==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -3961,9 +3977,9 @@
} }
}, },
"node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {
"version": "5.0.5", "version": "5.0.7",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz",
"integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", "integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -4630,9 +4646,9 @@
"dev": true "dev": true
}, },
"node_modules/baseline-browser-mapping": { "node_modules/baseline-browser-mapping": {
"version": "2.10.23", "version": "2.10.43",
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.23.tgz", "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.43.tgz",
"integrity": "sha512-xwVXGqevyKPsiuQdLj+dZMVjidjJV508TBqexND5HrF89cGdCYCJFB3qhcxRHSeMctdCfbR1jrxBajhDy7o29g==", "integrity": "sha512-AjYpR78kDWAY3Efj+cDTFH9t9SCoL7OoTp1BOb0mQV7S+6CiLwnWM3FyxhJtdPufDFKzmCSFoUncKjWgJEZTCQ==",
"license": "Apache-2.0", "license": "Apache-2.0",
"bin": { "bin": {
"baseline-browser-mapping": "dist/cli.cjs" "baseline-browser-mapping": "dist/cli.cjs"
@@ -4665,9 +4681,9 @@
} }
}, },
"node_modules/browserslist": { "node_modules/browserslist": {
"version": "4.28.0", "version": "4.28.6",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.0.tgz", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.6.tgz",
"integrity": "sha512-tbydkR/CxfMwelN0vwdP/pLkDwyAASZ+VfWm4EOwlB6SWhx1sYnWLqo8N5j0rAzPfzfRaxt0mM/4wPU/Su84RQ==", "integrity": "sha512-FQBYNK15VMslhLHpA7+n+n1GOlF1kId2xcCg7/j95f24AOF6VDYMNH4mFxF7KuaTdv627faazpOAjFzMrfJOUw==",
"devOptional": true, "devOptional": true,
"funding": [ "funding": [
{ {
@@ -4683,12 +4699,13 @@
"url": "https://github.com/sponsors/ai" "url": "https://github.com/sponsors/ai"
} }
], ],
"license": "MIT",
"dependencies": { "dependencies": {
"baseline-browser-mapping": "^2.8.25", "baseline-browser-mapping": "^2.10.42",
"caniuse-lite": "^1.0.30001754", "caniuse-lite": "^1.0.30001803",
"electron-to-chromium": "^1.5.249", "electron-to-chromium": "^1.5.389",
"node-releases": "^2.0.27", "node-releases": "^2.0.51",
"update-browserslist-db": "^1.1.4" "update-browserslist-db": "^1.2.3"
}, },
"bin": { "bin": {
"browserslist": "cli.js" "browserslist": "cli.js"
@@ -4763,9 +4780,9 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001754", "version": "1.0.30001805",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001754.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001805.tgz",
"integrity": "sha512-x6OeBXueoAceOmotzx3PO4Zpt4rzpeIFsSr6AAePTZxSkXiYDUmpypEl7e2+8NCd9bD7bXjqyef8CJYPC1jfxg==", "integrity": "sha512-52noaS3DubycKSXaU30TwPGIp+POyQSUVa5jBEq3vkRkY0kjyb3LQgvhU6WGyCcyXqVLWO0Cw0Q6BSdD0kUfVA==",
"funding": [ "funding": [
{ {
"type": "opencollective", "type": "opencollective",
@@ -4779,7 +4796,8 @@
"type": "github", "type": "github",
"url": "https://github.com/sponsors/ai" "url": "https://github.com/sponsors/ai"
} }
] ],
"license": "CC-BY-4.0"
}, },
"node_modules/cfb": { "node_modules/cfb": {
"version": "1.2.2", "version": "1.2.2",
@@ -5105,9 +5123,9 @@
} }
}, },
"node_modules/dompurify": { "node_modules/dompurify": {
"version": "3.4.10", "version": "3.4.12",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.10.tgz", "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.12.tgz",
"integrity": "sha512-0xzNv0e7oYC6yyuOGZIABPM4qtg3QxLFniDNPP4ZP90wR8Yq3zgwpRbrNiT4N3IKqDbbYFEJLV+JWEs19aZ//w==", "integrity": "sha512-zQvGet8Z2sWbQhCmfFz/T5QWH2oBmjnqK3qvOjaqaNLrLEF912WamU+ohnTp0TCep/MFVHpdJuCZEdFOdTnEFg==",
"license": "(MPL-2.0 OR Apache-2.0)", "license": "(MPL-2.0 OR Apache-2.0)",
"optionalDependencies": { "optionalDependencies": {
"@types/trusted-types": "^2.0.7" "@types/trusted-types": "^2.0.7"
@@ -5158,10 +5176,11 @@
"license": "0BSD" "license": "0BSD"
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.5.250", "version": "1.5.389",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.250.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.389.tgz",
"integrity": "sha512-/5UMj9IiGDMOFBnN4i7/Ry5onJrAGSbOGo3s9FEKmwobGq6xw832ccET0CE3CkkMBZ8GJSlUIesZofpyurqDXw==", "integrity": "sha512-cEto7aeOqBfU1D+c5py5pE+ooscKE75JifxLBdFUZsqAxRS6y7kebtxAZvICszSl05gPjYHDTjY+lXpyGvpJbg==",
"devOptional": true "devOptional": true,
"license": "ISC"
}, },
"node_modules/emoji-regex": { "node_modules/emoji-regex": {
"version": "9.2.2", "version": "9.2.2",
@@ -5367,6 +5386,7 @@
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
"integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
"devOptional": true, "devOptional": true,
"license": "MIT",
"engines": { "engines": {
"node": ">=6" "node": ">=6"
} }
@@ -6755,10 +6775,21 @@
"devOptional": true "devOptional": true
}, },
"node_modules/js-yaml": { "node_modules/js-yaml": {
"version": "4.1.1", "version": "4.3.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz",
"integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==",
"dev": true, "dev": true,
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/puzrin"
},
{
"type": "github",
"url": "https://github.com/sponsors/nodeca"
}
],
"license": "MIT",
"dependencies": { "dependencies": {
"argparse": "^2.0.1" "argparse": "^2.0.1"
}, },
@@ -6771,6 +6802,7 @@
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
"integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",
"devOptional": true, "devOptional": true,
"license": "MIT",
"bin": { "bin": {
"jsesc": "bin/jsesc" "jsesc": "bin/jsesc"
}, },
@@ -7113,9 +7145,20 @@
} }
}, },
"node_modules/linkify-it": { "node_modules/linkify-it": {
"version": "5.0.0", "version": "5.0.2",
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.2.tgz",
"integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", "integrity": "sha512-ONTm2jCMAVZjgQa/Fy1kScXsuOoF5NPTsoFBdE1KVIZ2vAh/r9+Bqo+0jINCBYnavTPQZz38QzFTme79ENoN3Q==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/puzrin"
},
{
"type": "github",
"url": "https://github.com/sponsors/markdown-it"
}
],
"license": "MIT",
"dependencies": { "dependencies": {
"uc.micro": "^2.0.0" "uc.micro": "^2.0.0"
} }
@@ -7163,6 +7206,7 @@
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
"integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
"devOptional": true, "devOptional": true,
"license": "ISC",
"dependencies": { "dependencies": {
"yallist": "^3.0.2" "yallist": "^3.0.2"
} }
@@ -7185,14 +7229,24 @@
} }
}, },
"node_modules/markdown-it": { "node_modules/markdown-it": {
"version": "14.1.1", "version": "14.3.0",
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.1.tgz", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.3.0.tgz",
"integrity": "sha512-BuU2qnTti9YKgK5N+IeMubp14ZUKUUw7yeJbkjtosvHiP0AZ5c8IAgEMk79D0eC8F23r4Ac/q8cAIFdm2FtyoA==", "integrity": "sha512-RCEsPjR+sr0x+AuYp601tKTkgFG4YEPLCzHST3cQ/fhlJkqAkz1L2/Qbp1j9qw5SBwQHFBoW8+hoN5xssOF0Tw==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/puzrin"
},
{
"type": "github",
"url": "https://github.com/sponsors/markdown-it"
}
],
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"argparse": "^2.0.1", "argparse": "^2.0.1",
"entities": "^4.4.0", "entities": "^4.5.0",
"linkify-it": "^5.0.0", "linkify-it": "^5.0.2",
"mdurl": "^2.0.0", "mdurl": "^2.0.0",
"punycode.js": "^2.3.1", "punycode.js": "^2.3.1",
"uc.micro": "^2.1.0" "uc.micro": "^2.1.0"
@@ -7304,12 +7358,12 @@
"dev": true "dev": true
}, },
"node_modules/next": { "node_modules/next": {
"version": "16.2.4", "version": "16.2.10",
"resolved": "https://registry.npmjs.org/next/-/next-16.2.4.tgz", "resolved": "https://registry.npmjs.org/next/-/next-16.2.10.tgz",
"integrity": "sha512-kPvz56wF5frc+FxlHI5qnklCzbq53HTwORaWBGdT0vNoKh1Aya9XC8aPauH4NJxqtzbWsS5mAbctm4cr+EkQ2Q==", "integrity": "sha512-2som5AVXb3kE6Yjine3/mNbBayYF58eguBWIVVUdr1y/L426xyVEgYxgBG+1QC34P2x5E+tcDup6XkuOAX3dCA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@next/env": "16.2.4", "@next/env": "16.2.10",
"@swc/helpers": "0.5.15", "@swc/helpers": "0.5.15",
"baseline-browser-mapping": "^2.9.19", "baseline-browser-mapping": "^2.9.19",
"caniuse-lite": "^1.0.30001579", "caniuse-lite": "^1.0.30001579",
@@ -7323,14 +7377,14 @@
"node": ">=20.9.0" "node": ">=20.9.0"
}, },
"optionalDependencies": { "optionalDependencies": {
"@next/swc-darwin-arm64": "16.2.4", "@next/swc-darwin-arm64": "16.2.10",
"@next/swc-darwin-x64": "16.2.4", "@next/swc-darwin-x64": "16.2.10",
"@next/swc-linux-arm64-gnu": "16.2.4", "@next/swc-linux-arm64-gnu": "16.2.10",
"@next/swc-linux-arm64-musl": "16.2.4", "@next/swc-linux-arm64-musl": "16.2.10",
"@next/swc-linux-x64-gnu": "16.2.4", "@next/swc-linux-x64-gnu": "16.2.10",
"@next/swc-linux-x64-musl": "16.2.4", "@next/swc-linux-x64-musl": "16.2.10",
"@next/swc-win32-arm64-msvc": "16.2.4", "@next/swc-win32-arm64-msvc": "16.2.10",
"@next/swc-win32-x64-msvc": "16.2.4", "@next/swc-win32-x64-msvc": "16.2.10",
"sharp": "^0.34.5" "sharp": "^0.34.5"
}, },
"peerDependencies": { "peerDependencies": {
@@ -7393,10 +7447,14 @@
} }
}, },
"node_modules/node-releases": { "node_modules/node-releases": {
"version": "2.0.27", "version": "2.0.51",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.51.tgz",
"integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", "integrity": "sha512-wRNIrw4DmVLKQlbgOMdkMx27Wrpzes2hh5Jtbi2bjPd+4wJstWIqP5A+lscnqbm0xxmT5Bpg8Lec5ItEBwx6BQ==",
"devOptional": true "devOptional": true,
"license": "MIT",
"engines": {
"node": ">=18"
}
}, },
"node_modules/object-assign": { "node_modules/object-assign": {
"version": "4.1.1", "version": "4.1.1",
@@ -9121,9 +9179,9 @@
} }
}, },
"node_modules/update-browserslist-db": { "node_modules/update-browserslist-db": {
"version": "1.1.4", "version": "1.2.3",
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz",
"integrity": "sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==", "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==",
"devOptional": true, "devOptional": true,
"funding": [ "funding": [
{ {
@@ -9139,6 +9197,7 @@
"url": "https://github.com/sponsors/ai" "url": "https://github.com/sponsors/ai"
} }
], ],
"license": "MIT",
"dependencies": { "dependencies": {
"escalade": "^3.2.0", "escalade": "^3.2.0",
"picocolors": "^1.1.1" "picocolors": "^1.1.1"
@@ -9393,7 +9452,8 @@
"version": "3.1.1", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
"devOptional": true "devOptional": true,
"license": "ISC"
}, },
"node_modules/yargs": { "node_modules/yargs": {
"version": "15.4.1", "version": "15.4.1",

View File

@@ -12,7 +12,7 @@
"@dnd-kit/core": "^6.3.1", "@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0", "@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2", "@dnd-kit/utilities": "^3.2.2",
"@kri/common": "^0.16.0", "@kri/common": "^0.18.0",
"@radix-ui/react-checkbox": "^1.3.3", "@radix-ui/react-checkbox": "^1.3.3",
"@radix-ui/react-dialog": "^1.1.15", "@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.16", "@radix-ui/react-dropdown-menu": "^2.1.16",

View File

@@ -36,6 +36,7 @@ import {
type ListFilter, type ListFilter,
type ListFilterTarget, type ListFilterTarget,
type listHeader, type listHeader,
type ListSearchUiState,
ListResetMode, ListResetMode,
type ListResetScope, type ListResetScope,
type ListUploadRequest, type ListUploadRequest,
@@ -64,6 +65,15 @@ const downloadArrayBuffer = (buffer: ArrayBuffer, filename: string, type = 'appl
downloadFile(new Blob([buffer], { type }), filename) downloadFile(new Blob([buffer], { type }), filename)
} }
const createEmptySearchUiState = (): ListSearchUiState => ({
searchText: '',
searchContactResult: [],
searchInterviewResult: [],
searchSurveyResult: [],
filterRows: [],
sorting: [],
})
const ListManagePage = () => { const ListManagePage = () => {
const router = useRouter() const router = useRouter()
const mounted = useMounted() const mounted = useMounted()
@@ -75,6 +85,8 @@ const ListManagePage = () => {
const [messageSendMode, setMessageSendMode] = useState<MessageSendMode>('email') const [messageSendMode, setMessageSendMode] = useState<MessageSendMode>('email')
const [selectedRows, setSelectedRows] = useState<ListTableRow[]>([]) const [selectedRows, setSelectedRows] = useState<ListTableRow[]>([])
const [currentListFilter, setCurrentListFilter] = useState<ListFilter>(() => createEmptyListFilter()) const [currentListFilter, setCurrentListFilter] = useState<ListFilter>(() => createEmptyListFilter())
const [filterSummary, setFilterSummary] = useState<string[]>([])
const [searchUiState, setSearchUiState] = useState<ListSearchUiState>(createEmptySearchUiState)
const [listRefreshKey, setListRefreshKey] = useState(0) const [listRefreshKey, setListRefreshKey] = useState(0)
const [pagination, setPagination] = useState<PaginationState>({ pageIndex: 0, pageSize: 25 }) const [pagination, setPagination] = useState<PaginationState>({ pageIndex: 0, pageSize: 25 })
const [restoredVisit, setRestoredVisit] = useState<LastListVisit | null>(null) const [restoredVisit, setRestoredVisit] = useState<LastListVisit | null>(null)
@@ -155,7 +167,13 @@ const ListManagePage = () => {
const handleStartContact = (row: ListTableRow) => { const handleStartContact = (row: ListTableRow) => {
const sid = String(row.sid ?? '') const sid = String(row.sid ?? '')
setLastListVisit({ prjctIdx, sid, pageIndex: pagination.pageIndex, pageSize: pagination.pageSize }) setLastListVisit({
prjctIdx,
sid,
pageIndex: pagination.pageIndex,
pageSize: pagination.pageSize,
...searchUiState,
})
router.push(`/list/contact?sid=${encodeURIComponent(sid)}`) router.push(`/list/contact?sid=${encodeURIComponent(sid)}`)
} }
@@ -171,10 +189,11 @@ const ListManagePage = () => {
const handleResetConfirm = async (payload: { target: ListFilterTarget; scope: ListResetScope }) => { const handleResetConfirm = async (payload: { target: ListFilterTarget; scope: ListResetScope }) => {
const listFilter = buildTargetFilter(payload.target) const listFilter = buildTargetFilter(payload.target)
await resetListMutation.mutateAsync({ const resetCount = await resetListMutation.mutateAsync({
resetMode: payload.scope === 'result-and-history' ? ListResetMode.HIST : ListResetMode.ALL, resetMode: payload.scope === 'result-and-history' ? ListResetMode.HIST : ListResetMode.ALL,
listFilter, listFilter,
}) })
alert(`${resetCount}건 삭제 되었습니다.`)
refreshList() refreshList()
} }
@@ -262,6 +281,7 @@ const ListManagePage = () => {
enableBatchEdit={canManageList} enableBatchEdit={canManageList}
refreshKey={listRefreshKey} refreshKey={listRefreshKey}
onCurrentFilterChange={setCurrentListFilter} onCurrentFilterChange={setCurrentListFilter}
onFilterSummaryChange={setFilterSummary}
onSelectedRowsChange={setSelectedRows} onSelectedRowsChange={setSelectedRows}
onRowClick={!canManageList ? handleStartContact : undefined} onRowClick={!canManageList ? handleStartContact : undefined}
onRowDoubleClick={canManageList ? handleStartContact : undefined} onRowDoubleClick={canManageList ? handleStartContact : undefined}
@@ -271,12 +291,14 @@ const ListManagePage = () => {
: undefined : undefined
} }
onPaginationChange={setPagination} onPaginationChange={setPagination}
initialSearchState={restoredForThisProject}
onSearchStateChange={setSearchUiState}
focusRowId={restoredForThisProject?.sid} focusRowId={restoredForThisProject?.sid}
/> />
{canManageList && ( {canManageList && (
<> <>
<ListResetDialog onConfirm={handleResetConfirm} /> <ListResetDialog filterSummary={filterSummary} onConfirm={handleResetConfirm} />
<ListUploadDialog <ListUploadDialog
onUpload={handleUploadConfirm} onUpload={handleUploadConfirm}
onDownloadTemplate={handleDownloadTemplate} onDownloadTemplate={handleDownloadTemplate}
@@ -288,12 +310,13 @@ const ListManagePage = () => {
headerRows={headerManageRows} headerRows={headerManageRows}
/> />
<ListHeaderManageDialog prjctIdx={prjctIdx} rows={headerManageRows} onConfirm={handleHeaderManageConfirm} /> <ListHeaderManageDialog prjctIdx={prjctIdx} rows={headerManageRows} onConfirm={handleHeaderManageConfirm} />
<ListDownloadDialog mode={downloadMode} onDownload={handleDownloadConfirm} /> <ListDownloadDialog mode={downloadMode} filterSummary={filterSummary} onDownload={handleDownloadConfirm} />
<MessageSendDialog <MessageSendDialog
mode={messageSendMode} mode={messageSendMode}
listHeaders={headerManageRows} listHeaders={headerManageRows}
currentFilter={currentListFilter} currentFilter={currentListFilter}
selectedRows={selectedRows} selectedRows={selectedRows}
filterSummary={filterSummary}
onSent={refreshList} onSent={refreshList}
/> />
<MessageHistoryDialog /> <MessageHistoryDialog />

View File

@@ -219,7 +219,7 @@ const UserManagePage = () => {
columns={columns} columns={columns}
data={viewList} data={viewList}
isClient={true} isClient={true}
selectMode='single' selectMode='none'
defaultPageSize={10} defaultPageSize={10}
pageSizeOptions={[10, 20, 30, 50]} pageSizeOptions={[10, 20, 30, 50]}
getRowId={(row) => row.userId} // row.id = userId getRowId={(row) => row.userId} // row.id = userId

View File

@@ -1,53 +0,0 @@
import {NextRequest, NextResponse} from "next/server";
import {RouteContext} from "@/types/common";
import {createNotihubApi} from "@/lib/http-server";
import {errorToResponse} from "@kri/common/http";
import type {BulkSendCreateRequest, BulkSendResponse, SendRequestBulk} from "@kri/common/noti-hub";
type MessageSendChannel = "sms" | "email";
const isSendChannel = (value: string): value is MessageSendChannel => value === "sms" || value === "email";
export const PUT = async (req: NextRequest, context: RouteContext) => {
try {
const {slug = []} = await context.params;
const [action, channel] = slug;
const notihubApi = await createNotihubApi();
if (action === "create-bulk" && channel && isSendChannel(channel)) {
const body: BulkSendCreateRequest | null = await req.json().catch(() => null);
if (!body) {
return NextResponse.json({message: "요청 바디가 없습니다."}, {status: 400});
}
const result = await notihubApi.put<string>(`/send-${channel}/create/bulk`, body);
return NextResponse.json(result, {status: 200});
}
return NextResponse.json({message: "Not found"}, {status: 404});
} catch (error: unknown) {
return errorToResponse(error);
}
};
export const POST = async (req: NextRequest, context: RouteContext) => {
try {
const {slug = []} = await context.params;
const [action, channel] = slug;
const notihubApi = await createNotihubApi();
if (action === "bulk" && channel && isSendChannel(channel)) {
const body: SendRequestBulk | null = await req.json().catch(() => null);
if (!body) {
return NextResponse.json({message: "요청 바디가 없습니다."}, {status: 400});
}
const result = await notihubApi.post<BulkSendResponse>(`/send-${channel}/bulk`, body);
return NextResponse.json(result, {status: 200});
}
return NextResponse.json({message: "Not found"}, {status: 404});
} catch (error: unknown) {
return errorToResponse(error);
}
};

View File

@@ -3,6 +3,7 @@
import { ReactNode, useEffect, useMemo, useState } from "react"; import { ReactNode, useEffect, useMemo, useState } from "react";
import { usePathname, useRouter } from "next/navigation"; import { usePathname, useRouter } from "next/navigation";
import { useMounted } from "@kri/common/hooks"; import { useMounted } from "@kri/common/hooks";
import { getCurrentPositionMeta } from "@kri/common/browser";
import { KriMainLayout } from "@/components/layout/KriMainLayout"; import { KriMainLayout } from "@/components/layout/KriMainLayout";
import { AppHeader } from "@/components/app-shell/AppHeader"; import { AppHeader } from "@/components/app-shell/AppHeader";
import { AppSidebar } from "@/components/app-shell/AppSidebar"; import { AppSidebar } from "@/components/app-shell/AppSidebar";
@@ -155,6 +156,13 @@ export default function AppMainLayout({ children, initialFontSize }: AppMainLayo
} }
}, [auth.user, mounted, router]); }, [auth.user, mounted, router]);
// 컨택결과 저장 시점에 GPS 권한 프롬프트가 뜨면 저장이 지연/누락될 수 있어,
// 로그인 후 메인 진입 시점에 미리 권한을 받아 위치를 캐시해둔다(결과는 사용하지 않음).
useEffect(() => {
if (!mounted || !auth.user) return;
void getCurrentPositionMeta();
}, [mounted, auth.user]);
useEffect(() => { useEffect(() => {
if (!mounted || !auth.user || hasRouteAccess) return; if (!mounted || !auth.user || hasRouteAccess) return;

View File

@@ -1,6 +1,7 @@
'use client' 'use client'
import type { ReactNode } from 'react' import type { ReactNode } from 'react'
import { useAtomValue } from 'jotai'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { import {
Dialog, Dialog,
@@ -12,6 +13,7 @@ import {
DialogTitle, DialogTitle,
} from '@/components/ui/dialog' } from '@/components/ui/dialog'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
import { loadingAtom } from '@/store/jotai/loading'
export interface KriDialogProps { export interface KriDialogProps {
open: boolean open: boolean
@@ -42,6 +44,8 @@ export function KriDialog({
bodyClassName, bodyClassName,
footerClassName, footerClassName,
}: KriDialogProps) { }: KriDialogProps) {
const isLoading = useAtomValue(loadingAtom)
const renderFooter = () => { const renderFooter = () => {
if (footer !== undefined) { if (footer !== undefined) {
if (footer === null) return null if (footer === null) return null
@@ -63,7 +67,16 @@ export function KriDialog({
return ( return (
<Dialog open={open} onOpenChange={onOpenChange}> <Dialog open={open} onOpenChange={onOpenChange}>
<DialogContent className={contentClassName} showCloseButton={showCloseButton}> <DialogContent
className={contentClassName}
showCloseButton={showCloseButton}
onInteractOutside={(e) => {
if (isLoading) e.preventDefault()
}}
onEscapeKeyDown={(e) => {
if (isLoading) e.preventDefault()
}}
>
<DialogHeader> <DialogHeader>
<DialogTitle>{title}</DialogTitle> <DialogTitle>{title}</DialogTitle>
{description ? <DialogDescription>{description}</DialogDescription> : null} {description ? <DialogDescription>{description}</DialogDescription> : null}

View File

@@ -18,6 +18,9 @@ export function KriLoadingOverlay({ open, label = '로딩 중', className, spinn
aria-live="polite" aria-live="polite"
aria-label={label} aria-label={label}
className={cn('fixed inset-0 z-[9999] flex items-center justify-center bg-black/70', className)} className={cn('fixed inset-0 z-[9999] flex items-center justify-center bg-black/70', className)}
onPointerDown={(e) => e.stopPropagation()}
onMouseDown={(e) => e.stopPropagation()}
onClick={(e) => e.stopPropagation()}
> >
<div className={cn('size-12 animate-spin rounded-full border-4 border-gray-400 border-t-white', spinnerClassName)} /> <div className={cn('size-12 animate-spin rounded-full border-4 border-gray-400 border-t-white', spinnerClassName)} />
<span className="sr-only">{label}</span> <span className="sr-only">{label}</span>

View File

@@ -74,6 +74,10 @@ export function DataTable<TData, TValue = unknown>({
const pagination = isClient ? internalPagination : (externalPagination ?? internalPagination) const pagination = isClient ? internalPagination : (externalPagination ?? internalPagination)
useEffect(() => {
setRowSelection({})
}, [pagination.pageIndex, pagination.pageSize, sorting])
const handlePaginationChange = useCallback<OnChangeFn<PaginationState>>( const handlePaginationChange = useCallback<OnChangeFn<PaginationState>>(
(updater) => { (updater) => {
if (isClient) { if (isClient) {
@@ -193,7 +197,7 @@ export function DataTable<TData, TValue = unknown>({
onClick={drag.wrapClick(() => handleRowClick(row))} onClick={drag.wrapClick(() => handleRowClick(row))}
onDoubleClick={onRowDoubleClick ? () => handleRowDoubleClick(row) : undefined} onDoubleClick={onRowDoubleClick ? () => handleRowDoubleClick(row) : undefined}
className={cn( className={cn(
'text-base [&>td]:px-2 [&>td]:py-0', 'text-base [&>td]:px-2 [&>td]:py-1',
(selectMode !== 'none' || onRowDoubleClick) && 'cursor-pointer', (selectMode !== 'none' || onRowDoubleClick) && 'cursor-pointer',
'data-[state=selected]:bg-muted data-[state=selected]:font-semibold', 'data-[state=selected]:bg-muted data-[state=selected]:font-semibold',
highlightRowIds?.includes(row.id) && 'bg-emerald-50', highlightRowIds?.includes(row.id) && 'bg-emerald-50',

View File

@@ -16,12 +16,12 @@ interface DataTablePaginationProps<TData> {
} }
export function DataTablePagination<TData>({ export function DataTablePagination<TData>({
table, table,
isClient, isClient,
totalCount, totalCount,
pageSizeOptions, pageSizeOptions,
paginationItemsToDisplay, paginationItemsToDisplay,
}: DataTablePaginationProps<TData>) { }: DataTablePaginationProps<TData>) {
'use no memo' 'use no memo'
const currentPage = table.getState().pagination.pageIndex + 1 const currentPage = table.getState().pagination.pageIndex + 1
@@ -33,66 +33,66 @@ export function DataTablePagination<TData>({
}) })
return ( return (
<div className="flex items-center justify-between gap-3 p-2 pt-0 max-sm:flex-col"> <div className="flex items-center justify-between gap-3 p-2 pt-0 max-sm:flex-col">
<p className="text-muted-foreground flex-1 whitespace-nowrap text-sm" aria-live="polite"> <p className="text-muted-foreground flex-1 whitespace-nowrap text-sm" aria-live="polite">
Page <span className="text-foreground">{currentPage}</span> of{' '} Page <span className="text-foreground">{currentPage}</span> of{' '}
<span className="text-foreground">{pageCount}</span> <span className="text-foreground">{pageCount}</span>
{!isClient && totalCount > 0 ? ( {!isClient && totalCount > 0 ? (
<span className="ml-2">(총 <span className="text-foreground">{totalCount}</span>건)</span> <span className="ml-2">(총 <span className="text-foreground">{totalCount}</span>건)</span>
) : null} ) : null}
</p> </p>
<div className="grow"> <div className="grow">
<Pagination> <Pagination>
<PaginationContent> <PaginationContent>
<PaginationItem> <PaginationItem>
<Button size="icon" variant="outline" onClick={() => table.firstPage()} disabled={!table.getCanPreviousPage()} aria-label="첫 페이지"> <Button size="icon" variant="outline" onClick={() => table.firstPage()} disabled={!table.getCanPreviousPage()} aria-label="첫 페이지">
<ChevronsLeftIcon aria-hidden="true" /> <ChevronsLeftIcon aria-hidden="true" />
</Button>
</PaginationItem>
<PaginationItem>
<Button size="icon" variant="outline" onClick={() => table.previousPage()} disabled={!table.getCanPreviousPage()} aria-label="이전 페이지">
<ChevronLeftIcon aria-hidden="true" />
</Button>
</PaginationItem>
{showLeftEllipsis ? <PaginationItem><PaginationEllipsis /></PaginationItem> : null}
{pages.map((page) => (
<PaginationItem key={page}>
<Button
size="icon"
variant={page === currentPage ? 'default' : 'ghost'}
onClick={() => table.setPageIndex(page - 1)}
aria-current={page === currentPage ? 'page' : undefined}
>
{page}
</Button> </Button>
</PaginationItem> </PaginationItem>
))} <PaginationItem>
{showRightEllipsis ? <PaginationItem><PaginationEllipsis /></PaginationItem> : null} <Button size="icon" variant="outline" onClick={() => table.previousPage()} disabled={!table.getCanPreviousPage()} aria-label="이전 페이지">
<PaginationItem> <ChevronLeftIcon aria-hidden="true" />
<Button size="icon" variant="outline" onClick={() => table.nextPage()} disabled={!table.getCanNextPage()} aria-label="다음 페이지"> </Button>
<ChevronRightIcon aria-hidden="true" /> </PaginationItem>
</Button> {showLeftEllipsis ? <PaginationItem><PaginationEllipsis /></PaginationItem> : null}
</PaginationItem> {pages.map((page) => (
<PaginationItem> <PaginationItem key={page}>
<Button size="icon" variant="outline" onClick={() => table.lastPage()} disabled={!table.getCanNextPage()} aria-label="마지막 페이지"> <Button
<ChevronsRightIcon aria-hidden="true" /> size="icon"
</Button> variant={page === currentPage ? 'default' : 'ghost'}
</PaginationItem> onClick={() => table.setPageIndex(page - 1)}
</PaginationContent> aria-current={page === currentPage ? 'page' : undefined}
</Pagination> >
</div> {page}
</Button>
</PaginationItem>
))}
{showRightEllipsis ? <PaginationItem><PaginationEllipsis /></PaginationItem> : null}
<PaginationItem>
<Button size="icon" variant="outline" onClick={() => table.nextPage()} disabled={!table.getCanNextPage()} aria-label="다음 페이지">
<ChevronRightIcon aria-hidden="true" />
</Button>
</PaginationItem>
<PaginationItem>
<Button size="icon" variant="outline" onClick={() => table.lastPage()} disabled={!table.getCanNextPage()} aria-label="마지막 페이지">
<ChevronsRightIcon aria-hidden="true" />
</Button>
</PaginationItem>
</PaginationContent>
</Pagination>
</div>
<div className="flex flex-1 justify-end"> <div className="flex flex-1 justify-end">
<Select value={String(table.getState().pagination.pageSize)} onValueChange={(value) => table.setPageSize(Number(value))}> <Select value={String(table.getState().pagination.pageSize)} onValueChange={(value) => table.setPageSize(Number(value))}>
<SelectTrigger className="w-fit whitespace-nowrap" aria-label="페이지당 개수"> <SelectTrigger className="w-fit whitespace-nowrap" aria-label="페이지당 개수">
<SelectValue placeholder="페이지당 개수" /> <SelectValue placeholder="페이지당 개수" />
</SelectTrigger> </SelectTrigger>
<SelectContent> <SelectContent>
{pageSizeOptions.map((size) => <SelectItem key={size} value={String(size)}>{size} / page</SelectItem>)} {pageSizeOptions.map((size) => <SelectItem key={size} value={String(size)}>{size} / page</SelectItem>)}
</SelectContent> </SelectContent>
</Select> </Select>
</div>
</div> </div>
</div>
) )
} }

View File

@@ -1,6 +1,6 @@
'use client' 'use client'
import { useEffect, useMemo, useState } from 'react' import { useEffect, useState } from 'react'
import { Plus, X } from 'lucide-react' import { Plus, X } from 'lucide-react'
import { KriDialog } from '@/components/common/KriDialog' import { KriDialog } from '@/components/common/KriDialog'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
@@ -12,12 +12,19 @@ import {
SelectTrigger, SelectTrigger,
SelectValue, SelectValue,
} from '@/components/ui/select' } from '@/components/ui/select'
import { KriSingleSelect } from '@/components/common/KriAutoComplete'
import ApplyFilterOption from './ListDialogOption/ApplyFilterOption'
import { useDialog } from '@/hooks/useDialog' import { useDialog } from '@/hooks/useDialog'
import type { DialogId } from '@/store/jotai/dialog' import type { DialogId } from '@/store/jotai/dialog'
import type { FilterValueOption, ListFilterTarget } from '@/types/list'
import { type ResultCode, ResultCodeType } from '@/types/project'
import { ListHeaderConst, LIST_BATCH_EDIT_FILE_DELETE_VALUE } from '@/const/listConst'
export type BatchEditOption = { export type BatchEditOption = {
id: number id: number
label: string label: string
listHderTy: number
valueOptions?: FilterValueOption[]
} }
export type BatchEditRow = { export type BatchEditRow = {
@@ -26,57 +33,74 @@ export type BatchEditRow = {
value: string value: string
} }
export type BatchEditResultCodes = Partial<Record<ResultCodeType, number>>
export type BatchEditPayload = {
rows: BatchEditRow[]
resultCodes: BatchEditResultCodes
target: ListFilterTarget
}
export type ListBatchEditDialogProps = { export type ListBatchEditDialogProps = {
dialogId?: DialogId dialogId?: DialogId
open?: boolean open?: boolean
onOpenChange?: (open: boolean) => void onOpenChange?: (open: boolean) => void
appliedFilters?: Record<number, string[]>
headerOptions: BatchEditOption[] headerOptions: BatchEditOption[]
resultCodes: ResultCode[]
filterSummary?: string[]
initialRows?: BatchEditRow[] initialRows?: BatchEditRow[]
onConfirm: (rows: BatchEditRow[]) => void | Promise<void> initialResultCodes?: BatchEditResultCodes
onConfirm: (payload: BatchEditPayload) => void | Promise<void>
} }
const createRow = (headerId: number): BatchEditRow => ({ const createRow = (headerId: number, value = ''): BatchEditRow => ({
id: crypto.randomUUID(), id: crypto.randomUUID(),
headerId, headerId,
value: '', value,
}) })
const NO_CHANGE = '__no_change__'
const resultCodeGroups: { type: ResultCodeType; label: string }[] = [
{ type: ResultCodeType.CONTACT, label: '컨택 결과' },
{ type: ResultCodeType.INTERVIEW, label: '면접 결과' },
{ type: ResultCodeType.SURVEY, label: '설문 결과' },
]
const ListBatchEditDialog = ({ const ListBatchEditDialog = ({
dialogId = 'listBatchEditDialog', dialogId = 'listBatchEditDialog',
open, open,
onOpenChange, onOpenChange,
appliedFilters = {},
headerOptions, headerOptions,
resultCodes,
filterSummary,
initialRows = [], initialRows = [],
initialResultCodes = {},
onConfirm, onConfirm,
}: ListBatchEditDialogProps) => { }: ListBatchEditDialogProps) => {
const { isDialogOpen, showDialog, hideDialog } = useDialog() const { isDialogOpen, showDialog, hideDialog } = useDialog()
const [rows, setRows] = useState<BatchEditRow[]>([]) const [rows, setRows] = useState<BatchEditRow[]>([])
const [resultCodeSelections, setResultCodeSelections] = useState<BatchEditResultCodes>({})
const [target, setTarget] = useState<ListFilterTarget>('filtered')
const [submitting, setSubmitting] = useState(false) const [submitting, setSubmitting] = useState(false)
const resolvedOpen = open ?? isDialogOpen(dialogId) const resolvedOpen = open ?? isDialogOpen(dialogId)
const defaultHeaderId = headerOptions[0]?.id ?? 0 const defaultHeaderId = headerOptions[0]?.id ?? 0
const isFileHeader = (headerId: number) => headerOptions.find((option) => option.id === headerId)?.listHderTy === ListHeaderConst.FILE
useEffect(() => { useEffect(() => {
if (!resolvedOpen) return if (!resolvedOpen) return
if (initialRows.length > 0) { if (initialRows.length > 0) {
setRows(initialRows.map((row) => ({ ...row }))) setRows(initialRows.map((row) => ({ ...row })))
return } else if (defaultHeaderId > 0) {
setRows([createRow(defaultHeaderId, isFileHeader(defaultHeaderId) ? LIST_BATCH_EDIT_FILE_DELETE_VALUE : '')])
} else {
setRows([])
} }
if (defaultHeaderId > 0) { setResultCodeSelections({ ...initialResultCodes })
setRows([createRow(defaultHeaderId)]) setTarget('filtered')
} }, [resolvedOpen, initialRows, initialResultCodes, defaultHeaderId])
}, [resolvedOpen, initialRows, defaultHeaderId])
const filterSummary = useMemo(() => {
return Object.entries(appliedFilters)
.map(([headerId, values]) => {
const headerLabel = headerOptions.find((opt) => opt.id === Number(headerId))?.label ?? headerId
return `${headerLabel}: ${values.join(', ')}`
})
.join(' / ')
}, [appliedFilters, headerOptions])
const handleOpenChange = (nextOpen: boolean) => { const handleOpenChange = (nextOpen: boolean) => {
onOpenChange?.(nextOpen) onOpenChange?.(nextOpen)
@@ -89,7 +113,7 @@ const ListBatchEditDialog = ({
const handleAddRow = () => { const handleAddRow = () => {
if (defaultHeaderId <= 0) return if (defaultHeaderId <= 0) return
setRows((prev) => [...prev, createRow(defaultHeaderId)]) setRows((prev) => [...prev, createRow(defaultHeaderId, isFileHeader(defaultHeaderId) ? LIST_BATCH_EDIT_FILE_DELETE_VALUE : '')])
} }
const handleRemoveRow = (id: string) => { const handleRemoveRow = (id: string) => {
@@ -97,23 +121,38 @@ const ListBatchEditDialog = ({
} }
const handleChangeHeader = (id: string, headerId: number) => { const handleChangeHeader = (id: string, headerId: number) => {
setRows((prev) => prev.map((row) => (row.id === id ? { ...row, headerId } : row))) const value = isFileHeader(headerId) ? LIST_BATCH_EDIT_FILE_DELETE_VALUE : ''
setRows((prev) => prev.map((row) => (row.id === id ? { ...row, headerId, value } : row)))
} }
const getValueOptions = (headerId: number) => headerOptions.find((option) => option.id === headerId)?.valueOptions
const handleChangeValue = (id: string, value: string) => { const handleChangeValue = (id: string, value: string) => {
setRows((prev) => prev.map((row) => (row.id === id ? { ...row, value } : row))) setRows((prev) => prev.map((row) => (row.id === id ? { ...row, value } : row)))
} }
const handleChangeResultCode = (type: ResultCodeType, value: string) => {
setResultCodeSelections((prev) => {
if (value === NO_CHANGE) {
const next = { ...prev }
delete next[type]
return next
}
return { ...prev, [type]: Number(value) }
})
}
const handleConfirm = async () => { const handleConfirm = async () => {
const normalized = rows.filter((row) => row.headerId > 0 && row.value.trim().length > 0) const normalized = rows.filter((row) => row.headerId > 0 && row.value.trim().length > 0)
if (normalized.length === 0) { const hasResultCodeChange = Object.keys(resultCodeSelections).length > 0
if (normalized.length === 0 && !hasResultCodeChange) {
alert('일괄 수정할 항목을 입력해주세요.') alert('일괄 수정할 항목을 입력해주세요.')
return return
} }
setSubmitting(true) setSubmitting(true)
try { try {
await onConfirm(normalized) await onConfirm({ rows: normalized, resultCodes: resultCodeSelections, target })
handleOpenChange(false) handleOpenChange(false)
} finally { } finally {
setSubmitting(false) setSubmitting(false)
@@ -138,13 +177,45 @@ const ListBatchEditDialog = ({
</> </>
} }
> >
<div className="rounded-md border px-4 py-3 text-sm"> <div className="rounded-md border p-4 space-y-4">
<p className="font-semibold mb-1">적용된 필터</p> <p className="text-lg font-semibold">적용 대상</p>
<p className="text-muted-foreground"> <ApplyFilterOption value={target} onValueChange={setTarget} idPrefix="batch-edit-target" filterSummary={filterSummary} />
{filterSummary.length > 0 ? filterSummary : '적용된 필터가 없습니다.'}
</p>
</div> </div>
<div className="rounded-md border p-4 space-y-3">
<p className="font-semibold text-sm">결과값 수정</p>
<div className="grid grid-cols-1 sm:grid-cols-3 gap-2">
{resultCodeGroups.map((group) => (
<div key={group.type} className="space-y-1">
<p className="text-sm text-muted-foreground">{group.label}</p>
<Select
value={
resultCodeSelections[group.type] !== undefined
? String(resultCodeSelections[group.type])
: NO_CHANGE
}
onValueChange={(v) => handleChangeResultCode(group.type, v)}
>
<SelectTrigger className="w-full">
<SelectValue placeholder="변경 안함" />
</SelectTrigger>
<SelectContent>
<SelectItem value={NO_CHANGE}>변경 안함</SelectItem>
{resultCodes
.filter((code) => code.resultCdTy === group.type && code.resultCd !== 0)
.map((code) => (
<SelectItem key={code.resultCdUUID} value={String(code.resultCd)}>
{code.resultCdLbl}
</SelectItem>
))}
</SelectContent>
</Select>
</div>
))}
</div>
</div>
<p className="font-semibold text-sm">항목값 수정</p>
<div className="rounded-md border overflow-hidden"> <div className="rounded-md border overflow-hidden">
<div className="h-11 px-4 border-b bg-muted grid grid-cols-[1fr_2fr_64px] items-center text-sm font-semibold"> <div className="h-11 px-4 border-b bg-muted grid grid-cols-[1fr_2fr_64px] items-center text-sm font-semibold">
<span>헤더</span> <span>헤더</span>
@@ -153,7 +224,11 @@ const ListBatchEditDialog = ({
</div> </div>
<div className="max-h-72 overflow-auto"> <div className="max-h-72 overflow-auto">
{rows.map((row) => ( {rows.map((row) => {
const valueOptions = getValueOptions(row.headerId)
const isFile = isFileHeader(row.headerId)
return (
<div <div
key={row.id} key={row.id}
className="h-12 px-4 border-b last:border-b-0 grid grid-cols-[1fr_2fr_64px] items-center gap-2" className="h-12 px-4 border-b last:border-b-0 grid grid-cols-[1fr_2fr_64px] items-center gap-2"
@@ -174,11 +249,27 @@ const ListBatchEditDialog = ({
</SelectContent> </SelectContent>
</Select> </Select>
<Input {isFile ? (
value={row.value} <p className="text-sm font-bold text-red-600">파일 삭제</p>
onChange={(e) => handleChangeValue(row.id, e.target.value)} ) : valueOptions !== undefined ? (
placeholder="수정할 값을 입력해주세요" <KriSingleSelect
/> items={valueOptions}
value={row.value}
onChange={(value) => handleChangeValue(row.id, value)}
getValue={(item) => item.value}
getLabel={(item) => item.label}
placeholder="값 선택"
heightClassName="h-9"
widthClassName="w-full"
className="w-full"
/>
) : (
<Input
value={row.value}
onChange={(e) => handleChangeValue(row.id, e.target.value)}
placeholder="수정할 값을 입력해주세요"
/>
)}
<div className="flex justify-center"> <div className="flex justify-center">
<Button <Button
@@ -192,7 +283,8 @@ const ListBatchEditDialog = ({
</Button> </Button>
</div> </div>
</div> </div>
))} )
})}
</div> </div>
</div> </div>

View File

@@ -11,28 +11,47 @@ type ApplyFilterGroupProps = {
value: ApplyFilterOptionValue value: ApplyFilterOptionValue
onValueChange: (value: ApplyFilterOptionValue) => void onValueChange: (value: ApplyFilterOptionValue) => void
idPrefix: string idPrefix: string
/** '필터 적용 대상만' 선택 시 보여줄, 사람이 읽을 수 있는 현재 필터 조건 목록 */
filterSummary?: string[]
} }
const ApplyFilterOption = ({ value, onValueChange, idPrefix }: ApplyFilterGroupProps) => { const ApplyFilterOption = ({ value, onValueChange, idPrefix, filterSummary }: ApplyFilterGroupProps) => {
return ( return (
<RadioGroup <div className="space-y-3">
value={value} <RadioGroup
onValueChange={(next) => onValueChange(next as ApplyFilterOptionValue)} value={value}
className="flex items-center gap-6 flex-wrap" onValueChange={(next) => onValueChange(next as ApplyFilterOptionValue)}
> className="flex items-center gap-6 flex-wrap"
<div className="flex items-center gap-2"> >
<RadioGroupItem value="selected" id={`${idPrefix}-selected`} /> <div className="flex items-center gap-2 cursor-pointer">
<Label className="text-base" htmlFor={`${idPrefix}-selected`}>선택 항목만</Label> <RadioGroupItem value="selected" id={`${idPrefix}-selected`} />
</div> <Label className="text-base" htmlFor={`${idPrefix}-selected`}>선택 항목만</Label>
<div className="flex items-center gap-2"> </div>
<RadioGroupItem value="filtered" id={`${idPrefix}-filtered`} /> <div className="flex items-center gap-2 cursor-pointer">
<Label className="text-base" htmlFor={`${idPrefix}-filtered`}>필터 적용 대상만</Label> <RadioGroupItem value="filtered" id={`${idPrefix}-filtered`} />
</div> <Label className="text-base" htmlFor={`${idPrefix}-filtered`}>필터 적용 대상만</Label>
<div className="flex items-center gap-2"> </div>
<RadioGroupItem value="all" id={`${idPrefix}-all`} /> <div className="flex items-center gap-2 cursor-pointer">
<Label className="text-base" htmlFor={`${idPrefix}-all`}>전체 대상</Label> <RadioGroupItem value="all" id={`${idPrefix}-all`} />
</div> <Label className="text-base" htmlFor={`${idPrefix}-all`}>전체 대상</Label>
</RadioGroup> </div>
</RadioGroup>
{value === 'filtered' && filterSummary !== undefined && (
<div className="rounded-md border px-4 py-3 text-sm">
<p className="font-semibold mb-1">적용된 필터</p>
{filterSummary.length > 0 ? (
<ul className="text-muted-foreground list-disc pl-4 space-y-0.5">
{filterSummary.map((line, index) => (
<li key={index}>{line}</li>
))}
</ul>
) : (
<p className="text-muted-foreground">적용된 필터가 없습니다.</p>
)}
</div>
)}
</div>
) )
} }

View File

@@ -17,6 +17,7 @@ export type ListDownloadDialogProps = {
open?: boolean open?: boolean
onOpenChange?: (open: boolean) => void onOpenChange?: (open: boolean) => void
mode: ListDownloadMode mode: ListDownloadMode
filterSummary?: string[]
onDownload: (payload: ListDownloadPayload) => void | Promise<void> onDownload: (payload: ListDownloadPayload) => void | Promise<void>
} }
@@ -32,6 +33,7 @@ const ListDownloadDialog = ({
open, open,
onOpenChange, onOpenChange,
mode, mode,
filterSummary,
onDownload, onDownload,
}: ListDownloadDialogProps) => { }: ListDownloadDialogProps) => {
const { isDialogOpen, showDialog, hideDialog } = useDialog() const { isDialogOpen, showDialog, hideDialog } = useDialog()
@@ -116,7 +118,7 @@ const ListDownloadDialog = ({
) : null} ) : null}
<div className="rounded-md border p-4 space-y-4"> <div className="rounded-md border p-4 space-y-4">
<p className="text-lg font-semibold">다운로드 범위</p> <p className="text-lg font-semibold">다운로드 범위</p>
<ApplyFilterOption value={target} onValueChange={setTarget} idPrefix="download-scope-target" /> <ApplyFilterOption value={target} onValueChange={setTarget} idPrefix="download-scope-target" filterSummary={filterSummary} />
</div> </div>
{mode === 'contact-history' ? ( {mode === 'contact-history' ? (
<div className="rounded-md border p-4 space-y-4"> <div className="rounded-md border p-4 space-y-4">

View File

@@ -26,7 +26,7 @@ export type ListFilterDialogProps = {
onConfirm: (rows: FilterRow[]) => void | Promise<void> onConfirm: (rows: FilterRow[]) => void | Promise<void>
} }
const operatorLabel: Record<FilterOperator, string> = { export const operatorLabel: Record<FilterOperator, string> = {
eq: '같음', eq: '같음',
neq: '다름', neq: '다름',
contains: '포함', contains: '포함',
@@ -117,7 +117,9 @@ const ListFilterDialog = ({
) )
const handleConfirm = async () => { const handleConfirm = async () => {
if (serializedRows.length === 0) { // rows가 아예 없으면 "필터를 전부 지우겠다"는 의도이므로 그대로 통과시킨다.
// rows는 있는데 값을 안 채워 serializedRows가 비면, 실수로 방치된 조건일 가능성이 높아 알려준다.
if (rows.length > 0 && serializedRows.length === 0) {
alert('필터 조건을 입력해주세요.') alert('필터 조건을 입력해주세요.')
return return
} }

View File

@@ -14,6 +14,7 @@ export type ListResetDialogProps = {
dialogId?: DialogId dialogId?: DialogId
open?: boolean open?: boolean
onOpenChange?: (open: boolean) => void onOpenChange?: (open: boolean) => void
filterSummary?: string[]
onConfirm: (payload: { target: ListFilterTarget; scope: ListResetScope }) => void | Promise<void> onConfirm: (payload: { target: ListFilterTarget; scope: ListResetScope }) => void | Promise<void>
} }
@@ -21,6 +22,7 @@ const ListResetDialog = ({
dialogId = 'listResetDialog', dialogId = 'listResetDialog',
open, open,
onOpenChange, onOpenChange,
filterSummary,
onConfirm, onConfirm,
}: ListResetDialogProps) => { }: ListResetDialogProps) => {
const { isDialogOpen, showDialog, hideDialog } = useDialog() const { isDialogOpen, showDialog, hideDialog } = useDialog()
@@ -73,6 +75,7 @@ const ListResetDialog = ({
value={target} value={target}
onValueChange={(v) => setTarget(v)} onValueChange={(v) => setTarget(v)}
idPrefix="list-reset-target" idPrefix="list-reset-target"
filterSummary={filterSummary}
/> />
</div> </div>

View File

@@ -213,7 +213,10 @@ const ListUploadDialog = ({
}), }),
[baseHeaderRows.length, compareRows, excelHeaders, hasCommonHeader], [baseHeaderRows.length, compareRows, excelHeaders, hasCommonHeader],
) )
const hasHeaderMismatch = headerCompareList.some(({ serverHeader, isMatched }) => !!serverHeader && !isMatched) const hasHeaderCountMismatch =
excelHeaders.length < compareRows.length || (hasCommonHeader && excelHeaders.length > compareRows.length)
const hasHeaderMismatch =
hasHeaderCountMismatch || headerCompareList.some(({ serverHeader, isMatched }) => !!serverHeader && !isMatched)
const renderHeaderTypeCell = ( const renderHeaderTypeCell = (
serverHeader: listHeader | undefined, serverHeader: listHeader | undefined,
@@ -316,6 +319,11 @@ const ListUploadDialog = ({
{selectedFile && excelHeaders.length > 0 && compareRows.length > 0 && ( {selectedFile && excelHeaders.length > 0 && compareRows.length > 0 && (
<div className="min-w-0 space-y-3"> <div className="min-w-0 space-y-3">
<Label className="text-lg font-semibold">헤더 비교</Label> <Label className="text-lg font-semibold">헤더 비교</Label>
{hasHeaderCountMismatch && (
<p className="text-sm text-red-600">
업로드 파일의 헤더 개수({excelHeaders.length}개)가 리스트 헤더 개수({compareRows.length}개)와 일치하지 않습니다.
</p>
)}
<div className="block w-full max-w-full overflow-x-scroll rounded-md border pb-1"> <div className="block w-full max-w-full overflow-x-scroll rounded-md border pb-1">
<div className="w-max whitespace-nowrap"> <div className="w-max whitespace-nowrap">
{headerCompareList.map(({ header, index, isMatched, isSettingRequired, serverHeader }) => { {headerCompareList.map(({ header, index, isMatched, isSettingRequired, serverHeader }) => {

View File

@@ -72,9 +72,14 @@ const MessageHistoryDialog = ({
const visibleRows = useMemo(() => { const visibleRows = useMemo(() => {
if (tab === 'email') return emailListQuery.data ?? [] if (tab === 'email') return emailListQuery.data ?? []
return [...(smsListQuery.data ?? []), ...(lmsListQuery.data ?? [])].sort((a, b) =>
(b.regDt ?? '').localeCompare(a.regDt ?? ''), // 문자 길이에 따라 SMS로 발송된 건도 자동으로 LMS/MMS로 전환될 수 있는데, 이 경우 두 목록 API가
) // 같은 bulkSendKey를 각각 반환해 합치면 행이 중복된다. bulkSendKey 기준으로 한 번만 남긴다.
const merged = new Map<string, BulkSendInfo>()
for (const row of [...(smsListQuery.data ?? []), ...(lmsListQuery.data ?? [])]) {
merged.set(row.bulkSendKey, row)
}
return Array.from(merged.values()).sort((a, b) => (b.regDt ?? '').localeCompare(a.regDt ?? ''))
}, [tab, emailListQuery.data, smsListQuery.data, lmsListQuery.data]) }, [tab, emailListQuery.data, smsListQuery.data, lmsListQuery.data])
const detailQuery = useBulkSendDetailQuery( const detailQuery = useBulkSendDetailQuery(

View File

@@ -3,23 +3,19 @@
import { useEffect, useMemo, useRef, useState } from 'react' import { useEffect, useMemo, useRef, useState } from 'react'
import { KriDialog } from '@/components/common/KriDialog' import { KriDialog } from '@/components/common/KriDialog'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label' import { Label } from '@/components/ui/label'
import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group' import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group'
import { KriDateTimePicker } from '@/components/common/KriDateTimePicker' import { KriDateTimePicker } from '@/components/common/KriDateTimePicker'
import { KriSingleSelect } from '@/components/common/KriAutoComplete' import { KriSingleSelect } from '@/components/common/KriAutoComplete'
import { useDialog } from '@/hooks/useDialog' import { useDialog } from '@/hooks/useDialog'
import { useAuth } from '@/hooks/useAuth'
import { useSelectedProject } from '@/hooks/useSelectedProject' import { useSelectedProject } from '@/hooks/useSelectedProject'
import { useListSearchQuery } from '@/query/list'
import { import {
useCreateBulkSendKeyMutation,
useMainTemplateIdxQuery, useMainTemplateIdxQuery,
useSendBulkMutation, useSendBulkMessageMutation,
useTemplateListQuery, useTemplateListQuery,
useTemplateQuery, useTemplateQuery,
} from '@/query/message' } from '@/query/message'
import {ChannelType, type DestInfo, TemplateSms, type TemplateSummary} from '@kri/common/noti-hub' import { ChannelType, TemplateSms, type TemplateSummary } from '@kri/common/noti-hub'
import { sanitizeHtmlForPreview } from '@/components/kri-editor/utils/sanitizeHtml' import { sanitizeHtmlForPreview } from '@/components/kri-editor/utils/sanitizeHtml'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
import { getNearestFutureDateTime } from '@/lib/datetime' import { getNearestFutureDateTime } from '@/lib/datetime'
@@ -28,18 +24,10 @@ import { createEmptyListFilter, type ListFilter, type ListFilterTarget, type lis
import { ListHeaderConst } from '@/const/listConst' import { ListHeaderConst } from '@/const/listConst'
import type { ListTableRow } from '@/components/table-column/ListTableColumn' import type { ListTableRow } from '@/components/table-column/ListTableColumn'
import ApplyFilterOption from './ListDialogOption/ApplyFilterOption' import ApplyFilterOption from './ListDialogOption/ApplyFilterOption'
import {KriEditor} from "@/components/kri-editor"; import { KriEditor } from '@/components/kri-editor'
import {clientEnv} from "@/lib/env.client";
export type MessageSendMode = 'email' | 'sms' export type MessageSendMode = 'email' | 'sms'
const MAX_TARGET_COUNT = 5000
const toTargetRow = (row: ListTableRow): { sid: string; itemList: Record<number, string> } => ({
sid: String(row.sid ?? ''),
itemList: (row.itemList as Record<number, string> | undefined) ?? {},
})
export type MessageSendDialogProps = { export type MessageSendDialogProps = {
dialogId?: DialogId dialogId?: DialogId
open?: boolean open?: boolean
@@ -48,6 +36,7 @@ export type MessageSendDialogProps = {
listHeaders: listHeader[] listHeaders: listHeader[]
currentFilter: ListFilter currentFilter: ListFilter
selectedRows: ListTableRow[] selectedRows: ListTableRow[]
filterSummary?: string[]
onSent?: () => void onSent?: () => void
} }
@@ -64,18 +53,15 @@ const MessageSendDialog = ({
listHeaders, listHeaders,
currentFilter, currentFilter,
selectedRows, selectedRows,
filterSummary,
onSent, onSent,
}: MessageSendDialogProps) => { }: MessageSendDialogProps) => {
const { isDialogOpen, showDialog, hideDialog } = useDialog() const { isDialogOpen, showDialog, hideDialog } = useDialog()
const { auth } = useAuth()
const { selectedProject } = useSelectedProject() const { selectedProject } = useSelectedProject()
const chnnlTy = mode === 'email' ? ChannelType.EMAIL : ChannelType.SMS const chnnlTy = mode === 'email' ? ChannelType.EMAIL : ChannelType.SMS
const [templateIdx, setTemplateIdx] = useState<number | null>(null) const [templateIdx, setTemplateIdx] = useState<number | null>(null)
const [senderEmail, setSenderEmail] = useState('')
const [senderName, setSenderName] = useState('')
const [senderNumber, setSenderNumber] = useState('')
const [scheduleType, setScheduleType] = useState<'instant' | 'reserve'>('instant') const [scheduleType, setScheduleType] = useState<'instant' | 'reserve'>('instant')
const [reserveAt, setReserveAt] = useState('') const [reserveAt, setReserveAt] = useState('')
const [targetHeaderId, setTargetHeaderId] = useState<number | null>(null) const [targetHeaderId, setTargetHeaderId] = useState<number | null>(null)
@@ -85,7 +71,6 @@ const MessageSendDialog = ({
const resolvedOpen = open ?? isDialogOpen(dialogId) const resolvedOpen = open ?? isDialogOpen(dialogId)
const prjctIdx = selectedProject?.prjctIdx ?? 0 const prjctIdx = selectedProject?.prjctIdx ?? 0
const prjctCd = selectedProject?.prjctCd ?? ''
const itrntPrjctCd = selectedProject?.itrntPrjctCd ?? '' const itrntPrjctCd = selectedProject?.itrntPrjctCd ?? ''
const enabled = resolvedOpen && !!selectedProject && prjctIdx > 0 const enabled = resolvedOpen && !!selectedProject && prjctIdx > 0
@@ -96,43 +81,23 @@ const MessageSendDialog = ({
const mainTemplateQuery = useMainTemplateIdxQuery(prjctIdx, chnnlTy, enabled) const mainTemplateQuery = useMainTemplateIdxQuery(prjctIdx, chnnlTy, enabled)
const mainTemplateIdx = mainTemplateQuery.data ?? null const mainTemplateIdx = mainTemplateQuery.data ?? null
const templateSenderName = selectedTemplate?.sendNm
const templateSenderEmail = selectedTemplate && 'sendEml' in selectedTemplate ? selectedTemplate.sendEml : undefined
const templateSenderTel = selectedTemplate && 'sendTel' in selectedTemplate ? selectedTemplate.sendTel : undefined
const headerType = mode === 'email' ? ListHeaderConst.EMAIL : ListHeaderConst.TEL_NUM const headerType = mode === 'email' ? ListHeaderConst.EMAIL : ListHeaderConst.TEL_NUM
const targetHeaderOptions = useMemo( const targetHeaderOptions = useMemo(
() => listHeaders.filter((header) => header.listHderTy === headerType), () => listHeaders.filter((header) => header.listHderTy === headerType),
[listHeaders, headerType], [listHeaders, headerType],
) )
// '전체'/'필터 적용 대상'은 현재 페이지에 보이는 행을 넘어설 수 있어 별도로 넓게 조회한다 const sendBulkMessageMutation = useSendBulkMessageMutation(mode, prjctIdx)
const bulkTargetFilter = target === 'all' ? createEmptyListFilter() : currentFilter
const bulkTargetEnabled = enabled && target !== 'selected'
const bulkTargetQuery = useListSearchQuery(
prjctIdx,
{
listFilter: bulkTargetFilter,
pageRequest: { pageIndex: 0, pageSize: MAX_TARGET_COUNT, sortBy: 'sid', sortDir: 'asc' },
},
bulkTargetEnabled,
)
const targetRows = useMemo(() => {
const rows = target === 'selected' ? selectedRows : (bulkTargetQuery.data?.content ?? [])
return rows.map(toTargetRow)
}, [target, selectedRows, bulkTargetQuery.data])
const targetTotalCount = target === 'selected' ? selectedRows.length : (bulkTargetQuery.data?.totalElements ?? 0)
const isTargetTruncated = target !== 'selected' && targetTotalCount > MAX_TARGET_COUNT
const createBulkKeyMutation = useCreateBulkSendKeyMutation(mode)
const sendBulkMutation = useSendBulkMutation(mode)
const mainTemplateAppliedRef = useRef(false) const mainTemplateAppliedRef = useRef(false)
useEffect(() => { useEffect(() => {
if (!resolvedOpen) return if (!resolvedOpen) return
setTemplateIdx(null) setTemplateIdx(null)
setSenderEmail('')
setSenderName('')
setSenderNumber('')
setScheduleType('instant') setScheduleType('instant')
setReserveAt('') setReserveAt('')
setTarget('selected') setTarget('selected')
@@ -147,14 +112,6 @@ const MessageSendDialog = ({
if (mainTemplateIdx) setTemplateIdx(mainTemplateIdx) if (mainTemplateIdx) setTemplateIdx(mainTemplateIdx)
}, [enabled, mainTemplateQuery.isSuccess, mainTemplateIdx]) }, [enabled, mainTemplateQuery.isSuccess, mainTemplateIdx])
// 템플릿 상세가 도착하면 발신 정보를 세팅한다 (발송 전 수정 가능)
useEffect(() => {
if (!selectedTemplate) return
setSenderName(selectedTemplate.sendNm)
if ('sendEml' in selectedTemplate) setSenderEmail(selectedTemplate.sendEml)
if ('sendTel' in selectedTemplate) setSenderNumber(selectedTemplate.sendTel)
}, [selectedTemplate])
useEffect(() => { useEffect(() => {
if (targetHeaderId !== null) return if (targetHeaderId !== null) return
const first = targetHeaderOptions[0] const first = targetHeaderOptions[0]
@@ -182,26 +139,15 @@ const MessageSendDialog = ({
setTemplateIdx(Number.isFinite(idx) && idx > 0 ? idx : null) setTemplateIdx(Number.isFinite(idx) && idx > 0 ? idx : null)
} }
const buildMsgParam = (itemList: Record<number, string>): Record<string, string> => { const buildListFilter = (): ListFilter => {
const param: Record<string, string> = {} if (target === 'all') return createEmptyListFilter()
listHeaders.forEach((header) => { if (target === 'selected') {
const value = itemList[header.listHderId]
if (value !== undefined) param[header.listHderNm] = value
})
return param
}
const buildDestInfoList = (): DestInfo[] => {
if (!targetHeaderId) return []
return targetRows.map(({ sid, itemList }) => {
const destValue = itemList[targetHeaderId] ?? ''
return { return {
sid, ...createEmptyListFilter(),
destEml: mode === 'email' ? destValue : undefined, sidSet: selectedRows.map((row) => String(row.sid ?? '')).filter((sid) => sid.length > 0),
destTel: mode === 'sms' ? destValue : undefined,
msgParam: buildMsgParam(itemList),
} }
}) }
return currentFilter
} }
const handleConfirm = async () => { const handleConfirm = async () => {
@@ -213,50 +159,39 @@ const MessageSendDialog = ({
alert(`수신 ${mode === 'email' ? '이메일' : '번호'} 헤더를 선택해 주세요.`) alert(`수신 ${mode === 'email' ? '이메일' : '번호'} 헤더를 선택해 주세요.`)
return return
} }
if (mode === 'email' && !senderEmail.trim()) { if (mode === 'email' && !templateSenderEmail) {
alert('발송자 메일을 입력해 주세요.') alert('선택한 템플릿에 발송자 메일이 등록되어 있지 않습니다. 템플릿 설정을 확인해 주세요.')
return return
} }
if (mode === 'sms' && !senderNumber.trim()) { if (mode === 'sms' && !templateSenderTel) {
alert('발송 번호를 입력해 주세요.') alert('선택한 템플릿에 발송 번호가 등록되어 있지 않습니다. 템플릿 설정을 확인해 주세요.')
return return
} }
if (scheduleType === 'reserve' && !reserveAt) { if (scheduleType === 'reserve' && !reserveAt) {
alert('예약 발송 일시를 선택해 주세요.') alert('예약 발송 일시를 선택해 주세요.')
return return
} }
if (isTargetTruncated) { const listFilter = buildListFilter()
alert(`수신 대상이 ${MAX_TARGET_COUNT}건을 초과합니다. 대상 범위를 좁혀 주세요.`) if (target === 'selected' && listFilter.sidSet.length === 0) {
return
}
const destInfoList = buildDestInfoList()
if (destInfoList.length === 0) {
alert('수신 대상이 없습니다.') alert('수신 대상이 없습니다.')
return return
} }
setSubmitting(true) setSubmitting(true)
try { try {
const bulkSendKey = await createBulkKeyMutation.mutateAsync({ const res = await sendBulkMessageMutation.mutateAsync({
reqstCmpn: auth.user?.userCmpn ?? '',
reqstUser: auth.user?.userId ?? '',
reqstSvc: clientEnv.REQUEST_SVC,
prjctCd,
tmplatIdx: templateIdx, tmplatIdx: templateIdx,
resve: scheduleType === 'reserve', resve: scheduleType === 'reserve',
sendDt: scheduleType === 'reserve' ? new Date(reserveAt).toISOString() : undefined, sendDt: scheduleType === 'reserve' ? new Date(reserveAt).toISOString() : undefined,
trgtCnt: destInfoList.length, listFilter,
destHeaderIds: [targetHeaderId],
}) })
await sendBulkMutation.mutateAsync({ if (res.failCount > 0) {
sendEml: mode === 'email' ? senderEmail : undefined, alert(`대상 ${res.targetCount}건 중 ${res.acceptCount}건 접수, ${res.failCount}건 실패했습니다.`)
sendTel: mode === 'sms' ? senderNumber : undefined, } else {
sendNm: senderName || undefined, alert(`대상 ${res.targetCount}건 발송 요청이 완료되었습니다.`)
bulkSendKey, }
destInfoList,
})
alert('발송 요청이 완료되었습니다.')
onSent?.() onSent?.()
handleOpenChange(false) handleOpenChange(false)
} catch (e) { } catch (e) {
@@ -304,17 +239,23 @@ const MessageSendDialog = ({
<div className="grid grid-cols-1 sm:grid-cols-2 gap-2"> <div className="grid grid-cols-1 sm:grid-cols-2 gap-2">
<div className="space-y-2"> <div className="space-y-2">
<Label className="text-base">발송자 메일</Label> <Label className="text-base">발송자 메일</Label>
<Input value={senderEmail} onChange={(e) => setSenderEmail(e.target.value)} /> <p className="text-sm rounded-md border px-3 py-2 h-9 flex items-center bg-muted/30">
{templateSenderEmail || '-'}
</p>
</div> </div>
<div className="space-y-2"> <div className="space-y-2">
<Label className="text-base">발송자 이름</Label> <Label className="text-base">발송자 이름</Label>
<Input value={senderName} onChange={(e) => setSenderName(e.target.value)} /> <p className="text-sm rounded-md border px-3 py-2 h-9 flex items-center bg-muted/30">
{templateSenderName || '-'}
</p>
</div> </div>
</div> </div>
) : ( ) : (
<div className="space-y-2"> <div className="space-y-2">
<Label className="text-base">발송 번호</Label> <Label className="text-base">발송 번호</Label>
<Input value={senderNumber} onChange={(e) => setSenderNumber(e.target.value)} /> <p className="text-sm rounded-md border px-3 py-2 h-9 flex items-center bg-muted/30">
{templateSenderTel || '-'}
</p>
</div> </div>
)} )}
@@ -360,11 +301,7 @@ const MessageSendDialog = ({
<div className="space-y-2 rounded-md border p-4"> <div className="space-y-2 rounded-md border p-4">
<Label className="text-base">수신 대상</Label> <Label className="text-base">수신 대상</Label>
<ApplyFilterOption value={target} onValueChange={setTarget} idPrefix="message-send-target" /> <ApplyFilterOption value={target} onValueChange={setTarget} idPrefix="message-send-target" filterSummary={filterSummary} />
<p className="text-sm text-muted-foreground">
대상 {targetTotalCount.toLocaleString()}건
{isTargetTruncated ? ` (최대 ${MAX_TARGET_COUNT.toLocaleString()}건까지만 발송 가능합니다)` : ''}
</p>
</div> </div>
</div> </div>

View File

@@ -1,6 +1,6 @@
'use client' 'use client'
import { useState, useEffect } from 'react' import { useEffect, useMemo, useState } from 'react'
import { KriDialog } from '@/components/common/KriDialog' import { KriDialog } from '@/components/common/KriDialog'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input' import { Input } from '@/components/ui/input'
@@ -15,6 +15,13 @@ import {apiError} from "@kri/common/http";
import {CONTACT_INTERVIEWER_ROLE, FW_TEAM, USER_NAME_REGEX} from "@/const/userConst"; import {CONTACT_INTERVIEWER_ROLE, FW_TEAM, USER_NAME_REGEX} from "@/const/userConst";
import {NONE_HTTP_ERROR, UNKNOWN_HTTP_ERROR} from "@kri/common/http"; import {NONE_HTTP_ERROR, UNKNOWN_HTTP_ERROR} from "@kri/common/http";
import type { CmpnInfo } from "@/types/cmpn"; import type { CmpnInfo } from "@/types/cmpn";
import { isExternalManager, isFieldWorkUser } from "@/utils/userRole";
// 외주사(EXTERNAL_USER_ROLE_GROUP)와 콜센터/컨택원/면접원(FW_USER_ROLE_GROUP)은 배정 체계가 완전히 달라
// 서로 넘나드는 권한 수정을 지원하지 않는다. 하나 새로 만들어서 넘기는 게 맞다.
const isCrossExternalFwRoleChange = (fromRole: number, toRole: number) =>
(isExternalManager(fromRole) && isFieldWorkUser(toRole)) ||
(isFieldWorkUser(fromRole) && isExternalManager(toRole))
export type UserUpsertDialogProps = { export type UserUpsertDialogProps = {
/** Jotai로 관리할 다이얼로그 ID */ /** Jotai로 관리할 다이얼로그 ID */
@@ -94,6 +101,13 @@ const UserUpsertDialog = ({
} }
}, [initialData, mode, resolvedOpen]) }, [initialData, mode, resolvedOpen])
// 수정 모드에서는 최초 권한 기준으로 외주사 ↔ 콜센터/컨택원/면접원 간 이동이 되는 선택지를 아예 뺀다.
const availableRoleArray = useMemo(() => {
if (mode === 'create' || initialData?.userRole == null) return userRoleArray
const initialRole = initialData.userRole
return userRoleArray.filter((item) => !isCrossExternalFwRoleChange(initialRole, Number(item.value)))
}, [mode, initialData?.userRole, userRoleArray])
const handleInputChange = <K extends keyof UserInfoSaveRequest>(field: K, value: UserInfoSaveRequest[K]) => { const handleInputChange = <K extends keyof UserInfoSaveRequest>(field: K, value: UserInfoSaveRequest[K]) => {
setFormData(prev => ({ setFormData(prev => ({
...prev, ...prev,
@@ -250,7 +264,7 @@ const UserUpsertDialog = ({
<div className="grid gap-2"> <div className="grid gap-2">
<Label>계정 권한</Label> <Label>계정 권한</Label>
<KriSelect <KriSelect
items={userRoleArray} items={availableRoleArray}
value={String(formData.userRole)} value={String(formData.userRole)}
getLabel={(item) => item.label} getLabel={(item) => item.label}
getValue={(item) => String(item.value)} getValue={(item) => String(item.value)}

View File

@@ -71,7 +71,7 @@ export function KriSidebar({
<Button <Button
key={item.id} key={item.id}
type="button" type="button"
variant={active ? 'secondary' : 'ghost'} variant={active ? 'default' : 'ghost'}
className="w-full justify-start" className="w-full justify-start"
disabled={item.disabled || !item.path} disabled={item.disabled || !item.path}
onClick={() => item.path && onNavigate?.(item.path, item)} onClick={() => item.path && onNavigate?.(item.path, item)}
@@ -86,7 +86,7 @@ export function KriSidebar({
<div key={item.id} className="space-y-1"> <div key={item.id} className="space-y-1">
<Button <Button
type="button" type="button"
variant={active ? 'secondary' : 'ghost'} variant={active ? 'default' : 'ghost'}
className="w-full justify-between" className="w-full justify-between"
disabled={item.disabled} disabled={item.disabled}
onClick={() => toggleItem(item.id)} onClick={() => toggleItem(item.id)}
@@ -107,7 +107,7 @@ export function KriSidebar({
<Button <Button
key={child.id} key={child.id}
type="button" type="button"
variant={childActive ? 'secondary' : 'ghost'} variant={childActive ? 'default' : 'ghost'}
className="w-full justify-start" className="w-full justify-start"
disabled={child.disabled || !child.path} disabled={child.disabled || !child.path}
onClick={() => child.path && onNavigate?.(child.path, child)} onClick={() => child.path && onNavigate?.(child.path, child)}

View File

@@ -8,6 +8,7 @@ import { KriDateTimePicker } from '@/components/common/KriDateTimePicker'
import CollapsibleHistorySection from '@/components/list-contact/CollapsibleHistorySection' import CollapsibleHistorySection from '@/components/list-contact/CollapsibleHistorySection'
import { useAddListEventMutation, useListEventHistoryQuery, useReserveMutation } from '@/query/list' import { useAddListEventMutation, useListEventHistoryQuery, useReserveMutation } from '@/query/list'
import { useSendResultBySidQuery } from '@/query/message' import { useSendResultBySidQuery } from '@/query/message'
import { useInternalInfoQuery } from '@/query/internal'
import { clientEnv } from '@/lib/env.client' import { clientEnv } from '@/lib/env.client'
import { ChannelType } from '@kri/common/noti-hub' import { ChannelType } from '@kri/common/noti-hub'
import type { SendResultInfo } from '@/types/message' import type { SendResultInfo } from '@/types/message'
@@ -17,6 +18,8 @@ import { CONTACT_INTERVIEWER_ROLE, FIELD_INTERVIEWER_ROLE } from '@/const/userCo
import { RESULT_CODE_RESERVATION, RESULT_CODE_UNUSED } from '@/const/projectConst' import { RESULT_CODE_RESERVATION, RESULT_CODE_UNUSED } from '@/const/projectConst'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
import { getNearestFutureDateTime } from '@/lib/datetime' import { getNearestFutureDateTime } from '@/lib/datetime'
import { useCtiLastCallHistId } from '@/hooks/useCtiLastCallHistId'
import { getCurrentPositionMeta } from '@kri/common/browser'
const RefreshIconButton = ({ onRefresh, isFetching }: { onRefresh: () => void; isFetching: boolean }) => ( const RefreshIconButton = ({ onRefresh, isFetching }: { onRefresh: () => void; isFetching: boolean }) => (
<Button <Button
@@ -43,7 +46,7 @@ type ContactEventSectionProps = {
showReservation?: boolean showReservation?: boolean
showInput?: boolean showInput?: boolean
submitting: boolean submitting: boolean
onSubmit: (resultCd: number, memo: string, resveDt: string) => Promise<void> onSubmit: (resultCd: number, memo: string, resveDt: string, listCallHistIdx: number | null) => Promise<void>
} }
const EventHistoryList = ({ const EventHistoryList = ({
@@ -118,8 +121,11 @@ const ContactEventSection = ({
const codes = resultCodes.filter((code) => code.resultCdTy === resultCodeType && code.resultCd !== RESULT_CODE_UNUSED) const codes = resultCodes.filter((code) => code.resultCdTy === resultCodeType && code.resultCd !== RESULT_CODE_UNUSED)
const isReservationSelected = resultCd === String(RESULT_CODE_RESERVATION) const isReservationSelected = resultCd === String(RESULT_CODE_RESERVATION)
const isContactType = resultCodeType === ResultCodeType.CONTACT
const historyQuery = useListEventHistoryQuery(prjctIdx, sid, true) const historyQuery = useListEventHistoryQuery(prjctIdx, sid, true)
const ctiLastCallHistId = useCtiLastCallHistId()
const listCallHistIdx = isContactType ? ctiLastCallHistId : null
const handleResultCdChange = (next: string) => { const handleResultCdChange = (next: string) => {
setResultCd(next) setResultCd(next)
@@ -137,8 +143,11 @@ const ContactEventSection = ({
alert('예약 날짜/시간을 선택해주세요.') alert('예약 날짜/시간을 선택해주세요.')
return return
} }
if (isContactType && !listCallHistIdx) {
if (!confirm('통화 기록이 없습니다. 계속 진행하시겠습니까?')) return
}
await onSubmit(Number(resultCd), memo, isReservationSelected ? resveDt : '') await onSubmit(Number(resultCd), memo, isReservationSelected ? resveDt : '', listCallHistIdx)
setMemo('') setMemo('')
setResveDt('') setResveDt('')
} }
@@ -287,25 +296,35 @@ const ListContactEventPanel = ({
}: ListContactEventPanelProps) => { }: ListContactEventPanelProps) => {
const addListEventMutation = useAddListEventMutation(prjctIdx, sid) const addListEventMutation = useAddListEventMutation(prjctIdx, sid)
const reserveMutation = useReserveMutation(prjctIdx, sid) const reserveMutation = useReserveMutation(prjctIdx, sid)
const internalInfoQuery = useInternalInfoQuery()
const showContactInput = userRole !== FIELD_INTERVIEWER_ROLE const showContactInput = userRole !== FIELD_INTERVIEWER_ROLE
const showInterviewInput = userRole !== CONTACT_INTERVIEWER_ROLE const showInterviewInput = userRole !== CONTACT_INTERVIEWER_ROLE
const handleAddEvent = (resultCodeType: ResultCodeType) => async (resultCd: number, memo: string, resveDt: string) => { const handleAddEvent =
await addListEventMutation.mutateAsync({ (resultCodeType: ResultCodeType) =>
prjctIdx, async (resultCd: number, memo: string, resveDt: string, listCallHistIdx: number | null) => {
sid: Number(sid), const geoMeta = await getCurrentPositionMeta()
resultCodeType,
resultCd,
memo,
})
if (resveDt) { await addListEventMutation.mutateAsync({
await reserveMutation.mutateAsync({ prjctIdx, sid: Number(sid), userId, resveDt }) prjctIdx,
sid: Number(sid),
resultCodeType,
resultCd,
listCallHistIdx,
meta: {
...geoMeta,
remoteAddr: internalInfoQuery.data?.clientIp,
},
memo,
})
if (resveDt) {
await reserveMutation.mutateAsync({ prjctIdx, sid: Number(sid), userId, resveDt })
}
alert('등록되었습니다.')
} }
alert('등록되었습니다.')
}
return ( return (
<div className="h-[80vh] space-y-4 overflow-y-auto pr-1"> <div className="h-[80vh] space-y-4 overflow-y-auto pr-1">
<ContactEventSection <ContactEventSection

View File

@@ -8,8 +8,8 @@ import { Input } from '@/components/ui/input'
import { DataTable } from '@/components/data-table/DataTable' import { DataTable } from '@/components/data-table/DataTable'
import type { DataTableColumn, SelectMode } from '@/components/data-table/DataTable.type' import type { DataTableColumn, SelectMode } from '@/components/data-table/DataTable.type'
import { KriMultiSelect } from '@/components/common/KriAutoComplete' import { KriMultiSelect } from '@/components/common/KriAutoComplete'
import ListBatchEditDialog, { type BatchEditRow } from '@/components/dialog/ListBatchEditDialog' import ListBatchEditDialog, { type BatchEditPayload, type BatchEditResultCodes, type BatchEditRow } from '@/components/dialog/ListBatchEditDialog'
import ListFilterDialog from '@/components/dialog/ListFilterDialog' import ListFilterDialog, { operatorLabel } from '@/components/dialog/ListFilterDialog'
import { useDialog } from '@/hooks/useDialog' import { useDialog } from '@/hooks/useDialog'
import { useListSearchQuery, useUpdateListMutation } from '@/query/list' import { useListSearchQuery, useUpdateListMutation } from '@/query/list'
import { getListColumns, LIST_IS_USE_LABEL, type ListTableRow } from '@/components/table-column/ListTableColumn' import { getListColumns, LIST_IS_USE_LABEL, type ListTableRow } from '@/components/table-column/ListTableColumn'
@@ -25,9 +25,11 @@ import {
type ListFilter, type ListFilter,
ListFilterMatchType, ListFilterMatchType,
ListFilterOperator, ListFilterOperator,
type ListFilterTarget,
type ListHeaderAssignType, type ListHeaderAssignType,
type ListOtherItemFilterCondition, type ListOtherItemFilterCondition,
type ListSearchRequest, type ListSearchRequest,
type ListSearchUiState,
} from '@/types/list' } from '@/types/list'
import { type ResultCode, ResultCodeType } from '@/types/project' import { type ResultCode, ResultCodeType } from '@/types/project'
import { import {
@@ -53,12 +55,16 @@ export type ListSearchTableProps = {
excludeFilterHeaderTypes?: number[] excludeFilterHeaderTypes?: number[]
externalAssignFilter?: { type: ListHeaderAssignType; values: string[]; condition?: 'assigned' | 'unassigned' } externalAssignFilter?: { type: ListHeaderAssignType; values: string[]; condition?: 'assigned' | 'unassigned' }
onCurrentFilterChange?: (filter: ListFilter) => void onCurrentFilterChange?: (filter: ListFilter) => void
onFilterSummaryChange?: (summary: string[]) => void
onSelectedRowsChange?: (rows: ListTableRow[]) => void onSelectedRowsChange?: (rows: ListTableRow[]) => void
onRowClick?: (row: ListTableRow) => void onRowClick?: (row: ListTableRow) => void
onRowDoubleClick?: (row: ListTableRow) => void onRowDoubleClick?: (row: ListTableRow) => void
maxTableHeight?: string maxTableHeight?: string
initialPagination?: PaginationState initialPagination?: PaginationState
onPaginationChange?: (pagination: PaginationState) => void onPaginationChange?: (pagination: PaginationState) => void
/** 뒤로 돌아왔을 때 검색창/필터/정렬을 그대로 복원하기 위한 초기값. 최초 마운트 시 한 번만 사용된다. */
initialSearchState?: ListSearchUiState
onSearchStateChange?: (state: ListSearchUiState) => void
focusRowId?: string focusRowId?: string
} }
@@ -157,23 +163,28 @@ export function ListSearchTable({
excludeFilterHeaderTypes, excludeFilterHeaderTypes,
externalAssignFilter, externalAssignFilter,
onCurrentFilterChange, onCurrentFilterChange,
onFilterSummaryChange,
onSelectedRowsChange, onSelectedRowsChange,
onRowClick, onRowClick,
onRowDoubleClick, onRowDoubleClick,
maxTableHeight = '66vh', maxTableHeight = '66vh',
initialPagination, initialPagination,
onPaginationChange, onPaginationChange,
initialSearchState,
onSearchStateChange,
focusRowId, focusRowId,
}: ListSearchTableProps) { }: ListSearchTableProps) {
const { showDialog } = useDialog() const { showDialog } = useDialog()
const [searchText, setSearchText] = useState('') const [searchText, setSearchText] = useState(initialSearchState?.searchText ?? '')
const [searchContactResult, setSearchContactResult] = useState<string[]>([]) const [searchContactResult, setSearchContactResult] = useState<string[]>(initialSearchState?.searchContactResult ?? [])
const [searchInterviewResult, setSearchInterviewResult] = useState<string[]>([]) const [searchInterviewResult, setSearchInterviewResult] = useState<string[]>(initialSearchState?.searchInterviewResult ?? [])
const [searchSurveyResult, setSearchSurveyResult] = useState<string[]>([]) const [searchSurveyResult, setSearchSurveyResult] = useState<string[]>(initialSearchState?.searchSurveyResult ?? [])
const [pagination, setPagination] = useState<PaginationState>(initialPagination ?? { pageIndex: 0, pageSize: 25 }) const [pagination, setPagination] = useState<PaginationState>(initialPagination ?? { pageIndex: 0, pageSize: 25 })
const [sorting, setSorting] = useState<SortingState>([]) const [sorting, setSorting] = useState<SortingState>(initialSearchState?.sorting ?? [])
const [filterRows, setFilterRows] = useState<FilterRow[]>([]) const [filterRows, setFilterRows] = useState<FilterRow[]>(initialSearchState?.filterRows ?? [])
const [batchRows, setBatchRows] = useState<BatchEditRow[]>([]) const [batchRows, setBatchRows] = useState<BatchEditRow[]>([])
const [batchResultCodes, setBatchResultCodes] = useState<BatchEditResultCodes>({})
const [selectedRows, setSelectedRows] = useState<ListTableRow[]>([])
const updateListMutation = useUpdateListMutation(prjctIdx) const updateListMutation = useUpdateListMutation(prjctIdx)
@@ -317,9 +328,98 @@ export function ListSearchTable({
userRole, userRole,
]) ])
const resultCodeLabel = useCallback(
(type: ResultCodeType, code: string) =>
resultCodes.find((item) => item.resultCdTy === type && String(item.resultCd) === code)?.resultCdLbl ?? code,
[resultCodes],
)
// ApplyFilterOption의 "필터 적용 대상만"을 고를 때 보여줄, 사람이 읽을 수 있는 현재 필터 조건 요약.
// 실제 서버로 보내는 listSearchRequest와 같은 유효성 조건(잠긴 헤더 제외, 빈 값 제외 등)을 따라간다.
const filterSummaryLines = useMemo<string[]>(() => {
const lines: string[] = []
const sidValues = toSidSet(searchText)
if (sidValues.length > 0) {
lines.push(`SID: ${sidValues.join(', ')}`)
}
const resultSummaryGroups: { label: string; type: ResultCodeType; values: string[] }[] = [
{ label: '컨택 결과', type: ResultCodeType.CONTACT, values: searchContactResult },
{ label: '면접 결과', type: ResultCodeType.INTERVIEW, values: searchInterviewResult },
{ label: '설문 결과', type: ResultCodeType.SURVEY, values: searchSurveyResult },
]
resultSummaryGroups.forEach(({ label, type, values }) => {
if (values.length === 0) return
lines.push(`${label}: ${values.map((value) => resultCodeLabel(type, value)).join(', ')}`)
})
filterRows.forEach((row) => {
const header = accessibleFilterHeaderById.get(row.headerId)
if (!header || lockedListFilterHeaderTypes.has(header.listHderTy)) return
if (row.operator === 'empty' || row.operator === 'notEmpty') {
lines.push(`${header.listHderNm} ${operatorLabel[row.operator]}`)
return
}
const valueOptions = getValueOptionsForHeader(header)
if (valueOptions !== undefined) {
if (row.multiValues.length === 0) return
const labels = row.multiValues.map(
(value) => valueOptions.find((option) => option.value === value)?.label ?? value,
)
lines.push(`${header.listHderNm} ${operatorLabel[row.operator]} ${labels.join(', ')}`)
return
}
if (row.textValue.trim().length === 0) return
lines.push(`${header.listHderNm} ${operatorLabel[row.operator]} ${row.textValue.trim()}`)
})
return lines
}, [
accessibleFilterHeaderById,
filterRows,
getValueOptionsForHeader,
lockedListFilterHeaderTypes,
resultCodeLabel,
searchContactResult,
searchInterviewResult,
searchSurveyResult,
searchText,
])
const listSearchQuery = useListSearchQuery(prjctIdx, listSearchRequest, enabled) const listSearchQuery = useListSearchQuery(prjctIdx, listSearchRequest, enabled)
const { refetch } = listSearchQuery const { refetch } = listSearchQuery
const buildTargetFilter = useCallback(
(target: ListFilterTarget): ListFilter => {
if (target === 'all') {
return applyListAccessFilter(createEmptyListFilter(), { userRole, userId, userCmpn })
}
if (target === 'selected') {
return applyListAccessFilter(
{
...createEmptyListFilter(),
sidSet: selectedRows.map((row) => String(row.sid ?? '')).filter((sid) => sid.length > 0),
},
{ userRole, userId, userCmpn },
)
}
return listSearchRequest.listFilter
},
[listSearchRequest.listFilter, selectedRows, userCmpn, userId, userRole],
)
const handleRowSelectionChange = useCallback(
(rows: ListTableRow[]) => {
setSelectedRows(rows)
onSelectedRowsChange?.(rows)
},
[onSelectedRowsChange],
)
const columns = useMemo<DataTableColumn<ListTableRow, unknown>[]>(() => { const columns = useMemo<DataTableColumn<ListTableRow, unknown>[]>(() => {
if (!listHeaders.length) return [] if (!listHeaders.length) return []
return getListColumns(listHeaders, resultCodes, userRole) return getListColumns(listHeaders, resultCodes, userRole)
@@ -335,11 +435,15 @@ export function ListSearchTable({
const headerOptions = useMemo( const headerOptions = useMemo(
() => () =>
accessibleListHeaders.map((header) => ({ accessibleListHeaders
id: header.listHderId, .filter((header) => header.listHderTy !== ListHeaderConst.SID && !isAssignHeaderType(header.listHderTy))
label: header.listHderNm, .map((header) => ({
})), id: header.listHderId,
[accessibleListHeaders], label: header.listHderNm,
listHderTy: header.listHderTy,
valueOptions: getValueOptionsForHeader(header),
})),
[accessibleListHeaders, getValueOptionsForHeader],
) )
const filterHeaderOptions = useMemo<FilterHeaderOption[]>( const filterHeaderOptions = useMemo<FilterHeaderOption[]>(
@@ -363,12 +467,14 @@ export function ListSearchTable({
setPagination((prev) => ({ ...prev, pageIndex: 0 })) setPagination((prev) => ({ ...prev, pageIndex: 0 }))
} }
const handleBatchConfirm = async (rows: BatchEditRow[]) => { const handleBatchConfirm = async ({ rows, resultCodes: resultCodeSelections, target }: BatchEditPayload) => {
setBatchRows(rows) setBatchRows(rows)
setBatchResultCodes(resultCodeSelections)
const updateContents = Object.fromEntries(rows.map((row) => [String(row.headerId), row.value])) const updateContents = Object.fromEntries(rows.map((row) => [String(row.headerId), row.value]))
await updateListMutation.mutateAsync({ await updateListMutation.mutateAsync({
updateContents, updateContents,
listFilter: listSearchRequest.listFilter, updateResultCodes: resultCodeSelections,
listFilter: buildTargetFilter(target),
}) })
await listSearchQuery.refetch() await listSearchQuery.refetch()
} }
@@ -377,6 +483,29 @@ export function ListSearchTable({
onCurrentFilterChange?.(listSearchRequest.listFilter) onCurrentFilterChange?.(listSearchRequest.listFilter)
}, [listSearchRequest.listFilter, onCurrentFilterChange]) }, [listSearchRequest.listFilter, onCurrentFilterChange])
useEffect(() => {
onFilterSummaryChange?.(filterSummaryLines)
}, [filterSummaryLines, onFilterSummaryChange])
useEffect(() => {
onSearchStateChange?.({
searchText,
searchContactResult,
searchInterviewResult,
searchSurveyResult,
filterRows,
sorting,
})
}, [
searchText,
searchContactResult,
searchInterviewResult,
searchSurveyResult,
filterRows,
sorting,
onSearchStateChange,
])
useEffect(() => { useEffect(() => {
onPaginationChange?.(pagination) onPaginationChange?.(pagination)
}, [pagination, onPaginationChange]) }, [pagination, onPaginationChange])
@@ -478,7 +607,7 @@ export function ListSearchTable({
onPaginationChange={setPagination} onPaginationChange={setPagination}
onSortingChange={setSorting} onSortingChange={setSorting}
selectMode={selectMode} selectMode={selectMode}
onRowSelectionChange={onSelectedRowsChange} onRowSelectionChange={handleRowSelectionChange}
onRowClick={onRowClick} onRowClick={onRowClick}
onRowDoubleClick={onRowDoubleClick} onRowDoubleClick={onRowDoubleClick}
pageSizeOptions={[25, 50, 100]} pageSizeOptions={[25, 50, 100]}
@@ -490,8 +619,10 @@ export function ListSearchTable({
{enableBatchEdit ? ( {enableBatchEdit ? (
<ListBatchEditDialog <ListBatchEditDialog
headerOptions={headerOptions} headerOptions={headerOptions}
appliedFilters={Object.fromEntries(filterRows.map((row) => [row.headerId, row.multiValues]))} resultCodes={resultCodes}
filterSummary={filterSummaryLines}
initialRows={batchRows} initialRows={batchRows}
initialResultCodes={batchResultCodes}
onConfirm={handleBatchConfirm} onConfirm={handleBatchConfirm}
/> />
) : null} ) : null}

View File

@@ -57,7 +57,7 @@ function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
<tr <tr
data-slot="table-row" data-slot="table-row"
className={cn( className={cn(
"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", "hover:bg-primary/20 data-[state=selected]:bg-muted border-b transition-colors",
className className
)} )}
{...props} {...props}

View File

@@ -71,3 +71,6 @@ export const LIST_HEADER_TYPE_OPTIONS = LIST_HEADER_TYPE_ORDER.map((value) => ({
value, value,
label: LIST_HEADER_TYPE_LABEL[value], label: LIST_HEADER_TYPE_LABEL[value],
})) satisfies ReadonlyArray<{ value: ListHeaderOptionType; label: string }>; })) satisfies ReadonlyArray<{ value: ListHeaderOptionType; label: string }>;
// 일괄 수정에서 FILE 헤더 항목값으로 이 값을 보내면 서버가 업로드된 파일을 삭제 처리한다.
export const LIST_BATCH_EDIT_FILE_DELETE_VALUE = "FILE_DELETE";

View File

@@ -0,0 +1,8 @@
"use client";
import { useSyncExternalStore } from "react";
import { ctiClient } from "@/lib/cti/ctiClient";
export function useCtiLastCallHistId() {
return useSyncExternalStore(ctiClient.subscribe, ctiClient.getLastCallHistId, () => null);
}

View File

@@ -1,7 +1,7 @@
import { clientEnv } from "@/lib/env.client"; import { clientEnv } from "@/lib/env.client";
import { nextApi } from "@/lib/http-client"; import { nextApi } from "@/lib/http-client";
import { CTI_AGENT_GROUP, CTI_AGENT_STATUS } from "@/const/ctiConst"; import { CTI_AGENT_GROUP, CTI_AGENT_STATUS } from "@/const/ctiConst";
import type { ListCallHistRequest } from "@/types/list"; import type { ListCallHist, ListCallHistRequest } from "@/types/list";
// TEMP_CTI_LOG: 배포 후 CTI 연동 오류를 콘솔에서 바로 확인하기 위한 임시 로그. // TEMP_CTI_LOG: 배포 후 CTI 연동 오류를 콘솔에서 바로 확인하기 위한 임시 로그.
// 안정화되면 "TEMP_CTI_LOG"로 검색해서 이 파일의 관련 로그를 전부 제거할 것. // 안정화되면 "TEMP_CTI_LOG"로 검색해서 이 파일의 관련 로그를 전부 제거할 것.
@@ -35,6 +35,7 @@ let currentConnectionKey: string | null = null;
let currentLoginParams: CtiLoginParams | null = null; let currentLoginParams: CtiLoginParams | null = null;
let agentStatus: string | null = null; let agentStatus: string | null = null;
let currentCallContext: CtiCallContext | null = null; let currentCallContext: CtiCallContext | null = null;
let lastCallHistId: number | null = null;
const listeners = new Set<() => void>(); const listeners = new Set<() => void>();
@@ -52,11 +53,17 @@ const setAgentStatus = (next: string | null) => {
notify(); notify();
}; };
// 통화 종료(CallClosed) 시 리스트 통화 이력 저장 API로 전달한다. const setLastCallHistId = (next: number | null) => {
lastCallHistId = next;
notify();
};
// 통화 세션 시작(StartSessionRecord)/종료(CallClosed) 시 리스트 통화 이력 저장 API로 전달한다.
// listHderId/prjctIdx/sid는 WS 메시지에 없어서 makeCall 시점에 캐시해둔 currentCallContext에서 가져온다. // listHderId/prjctIdx/sid는 WS 메시지에 없어서 makeCall 시점에 캐시해둔 currentCallContext에서 가져온다.
const saveCallHistory = (parsed: Record<string, unknown>) => { // clearContextAfter=false: StartSessionRecord는 같은 통화의 CallClosed가 이어서 오므로 컨텍스트를 유지한다.
const saveCallHistory = (parsed: Record<string, unknown>, options: { clearContextAfter: boolean }) => {
if (!currentCallContext) { if (!currentCallContext) {
console.warn("[CTI][TEMP_LOG] CallClosed received but no call context cached", parsed); // TEMP_CTI_LOG console.warn("[CTI][TEMP_LOG] call history event received but no call context cached", parsed); // TEMP_CTI_LOG
return; return;
} }
@@ -80,11 +87,19 @@ const saveCallHistory = (parsed: Record<string, unknown>) => {
}; };
console.log("[CTI][TEMP_LOG] saving call history", { prjctIdx, sid, body }); // TEMP_CTI_LOG console.log("[CTI][TEMP_LOG] saving call history", { prjctIdx, sid, body }); // TEMP_CTI_LOG
nextApi.put(`/list-call-hist/${prjctIdx}/${sid}`, body).catch((error) => { nextApi
console.error("[CTI][TEMP_LOG] failed to save call history", error); // TEMP_CTI_LOG .put<ListCallHist>(`/list-call-hist/${prjctIdx}/${sid}`, body)
}); .then((result) => {
console.log("[CTI][TEMP_LOG] call history saved, listCallHistIdx =", result?.listCallHistIdx); // TEMP_CTI_LOG
setLastCallHistId(result?.listCallHistIdx ?? null);
})
.catch((error) => {
console.error("[CTI][TEMP_LOG] failed to save call history", error); // TEMP_CTI_LOG
});
currentCallContext = null; if (options.clearContextAfter) {
currentCallContext = null;
}
}; };
// WS 서버 -> 클라이언트로 오는 메시지는 ZCommand가 기준값이다. // WS 서버 -> 클라이언트로 오는 메시지는 ZCommand가 기준값이다.
@@ -107,9 +122,14 @@ const handleIncomingMessage = (raw: unknown) => {
setAgentStatus(status); setAgentStatus(status);
break; break;
} }
case "StartSessionRecord": {
console.log("[CTI][TEMP_LOG] StartSessionRecord ->", parsed); // TEMP_CTI_LOG
saveCallHistory(parsed, { clearContextAfter: false });
break;
}
case "CallClosed": { case "CallClosed": {
console.log("[CTI][TEMP_LOG] CallClosed ->", parsed); // TEMP_CTI_LOG console.log("[CTI][TEMP_LOG] CallClosed ->", parsed); // TEMP_CTI_LOG
saveCallHistory(parsed); saveCallHistory(parsed, { clearContextAfter: true });
break; break;
} }
default: default:
@@ -155,6 +175,7 @@ const logout = () => {
currentConnectionKey = null; currentConnectionKey = null;
currentLoginParams = null; currentLoginParams = null;
currentCallContext = null; currentCallContext = null;
setLastCallHistId(null);
}; };
const connectAndLogin = (params: CtiLoginParams) => { const connectAndLogin = (params: CtiLoginParams) => {
@@ -229,10 +250,12 @@ export const ctiClient = {
}, },
getConnectionState: () => connectionState, getConnectionState: () => connectionState,
getAgentStatus: () => agentStatus, getAgentStatus: () => agentStatus,
getLastCallHistId: () => lastCallHistId,
makeCall: (params: CtiMakeCallParams) => { makeCall: (params: CtiMakeCallParams) => {
if (!currentAgentLoginId || !currentLoginParams) return; if (!currentAgentLoginId || !currentLoginParams) return;
console.log("[CTI][TEMP_LOG] makeCall", params); // TEMP_CTI_LOG console.log("[CTI][TEMP_LOG] makeCall", params); // TEMP_CTI_LOG
currentCallContext = { prjctIdx: params.prjctIdx, sid: params.sid, listHderId: params.listHderId }; currentCallContext = { prjctIdx: params.prjctIdx, sid: params.sid, listHderId: params.listHderId };
setLastCallHistId(null); // 새 통화 시작, 이전 통화의 listCallHistIdx는 더 이상 유효하지 않음
send({ send({
ZCommand: "MakeCall", ZCommand: "MakeCall",
AgentLoginID: currentAgentLoginId, AgentLoginID: currentAgentLoginId,

View File

@@ -4,11 +4,8 @@ import { keepPreviousData, useMutation, useQuery, useQueryClient } from "@tansta
import { nextApi } from "@/lib/http-client"; import { nextApi } from "@/lib/http-client";
import { qk } from "@/query/key/keys"; import { qk } from "@/query/key/keys";
import type { import type {
BulkSendCreateRequest,
BulkSendInfo, BulkSendInfo,
BulkSendResponse,
ChannelType, ChannelType,
SendRequestBulk,
SendResultSummaryRequest, SendResultSummaryRequest,
SendResultSummaryResponse, SendResultSummaryResponse,
Template, Template,
@@ -107,26 +104,6 @@ export function useUploadTemplateBodyImageMutation(itrntPrjctCd: string) {
}); });
} }
/**
* 발송키 생성 (PUT /send-{sms,email}/create/bulk)
*/
export function useCreateBulkSendKeyMutation(channel: MessageSendChannel) {
return useMutation({
mutationFn: (req: BulkSendCreateRequest) =>
nextApi.put<string>(`/message-send/create-bulk/${channel}`, req),
});
}
/**
* bulkSendKey 기반 벌크 발송 (POST /send-{sms,email}/bulk)
*/
export function useSendBulkMutation(channel: MessageSendChannel) {
return useMutation({
mutationFn: (req: SendRequestBulk) =>
nextApi.post<BulkSendResponse>(`/message-send/bulk/${channel}`, req),
});
}
/** /**
* 대량발송 리스트 조회 (GET /report/bulk-list/{sendTy}/{reqstSvc}/{prjctCd}) * 대량발송 리스트 조회 (GET /report/bulk-list/{sendTy}/{reqstSvc}/{prjctCd})
*/ */

View File

@@ -145,7 +145,19 @@ export const createEmptyListFilter = (): ListFilter => ({
otherItemConditions: [], otherItemConditions: [],
}); });
export type LastListVisit = { // ListSearchTable의 검색/필터 UI 상태 중, 페이지를 떠났다가 돌아왔을 때 "같은 목록·같은 순서"를
// 재현하기 위해 함께 기억해야 하는 부분. pageIndex만 기억하면 필터가 없어져 목록 순서가 달라져서
// 엉뚱한 페이지로 안내하게 된다(예: "SID 30~40" 필터를 걸면 SID 30이 1페이지지만, 필터 없이는 2페이지일 수 있음).
export type ListSearchUiState = {
searchText: string;
searchContactResult: string[];
searchInterviewResult: string[];
searchSurveyResult: string[];
filterRows: FilterRow[];
sorting: { id: string; desc: boolean }[];
};
export type LastListVisit = ListSearchUiState & {
prjctIdx: number; prjctIdx: number;
sid: string; sid: string;
pageIndex: number; pageIndex: number;
@@ -181,14 +193,24 @@ export type ListUploadHistory = {
export type ListUpdateRequest = { export type ListUpdateRequest = {
updateContents: Record<string, string>; updateContents: Record<string, string>;
updateResultCodes?: Partial<Record<ResultCodeType, number>>;
listFilter: ListFilter; listFilter: ListFilter;
}; };
export type ListEventInsertMeta = {
latitude?: number;
longitude?: number;
accuracy?: number;
remoteAddr?: string;
};
export type ListEventInsertRequest = { export type ListEventInsertRequest = {
prjctIdx: number; prjctIdx: number;
sid: number; sid: number;
resultCodeType: ResultCodeType; resultCodeType: ResultCodeType;
resultCd: number; resultCd: number;
listCallHistIdx?: number | null;
meta?: ListEventInsertMeta;
memo: string; memo: string;
}; };
@@ -244,6 +266,15 @@ export type ListCallHistRequest = {
recordFileName: string; recordFileName: string;
}; };
export type ListCallHist = ListCallHistRequest & {
listCallHistIdx: number;
prjctIdx: number;
sid: number;
endDt?: string;
regUser: string;
regDt: string;
};
export type ListReserveRequest = { export type ListReserveRequest = {
prjctIdx: number; prjctIdx: number;
sid: number; sid: number;