Merge branch 'main' into commuters

This commit is contained in:
yoon 2025-02-21 14:53:24 +09:00
commit 0df7c5aec9
11 changed files with 763 additions and 1196 deletions

781
package-lock.json generated
View File

@ -84,6 +84,18 @@
"node": ">=6.9.0" "node": ">=6.9.0"
} }
}, },
"node_modules/@babel/helper-annotate-as-pure/node_modules/@babel/types": {
"version": "7.26.7",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/helper-string-parser": "^7.25.9",
"@babel/helper-validator-identifier": "^7.25.9"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-member-expression-to-functions": { "node_modules/@babel/helper-member-expression-to-functions": {
"version": "7.25.9", "version": "7.25.9",
"dev": true, "dev": true,
@ -128,6 +140,18 @@
"node": ">=6.9.0" "node": ">=6.9.0"
} }
}, },
"node_modules/@babel/helper-member-expression-to-functions/node_modules/@babel/types": {
"version": "7.26.7",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/helper-string-parser": "^7.25.9",
"@babel/helper-validator-identifier": "^7.25.9"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-member-expression-to-functions/node_modules/@jridgewell/gen-mapping": { "node_modules/@babel/helper-member-expression-to-functions/node_modules/@jridgewell/gen-mapping": {
"version": "0.3.8", "version": "0.3.8",
"dev": true, "dev": true,
@ -223,6 +247,18 @@
"node": ">=6.9.0" "node": ">=6.9.0"
} }
}, },
"node_modules/@babel/helper-module-imports/node_modules/@babel/types": {
"version": "7.26.7",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/helper-string-parser": "^7.25.9",
"@babel/helper-validator-identifier": "^7.25.9"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-module-imports/node_modules/@jridgewell/gen-mapping": { "node_modules/@babel/helper-module-imports/node_modules/@jridgewell/gen-mapping": {
"version": "0.3.8", "version": "0.3.8",
"dev": true, "dev": true,
@ -286,7 +322,16 @@
} }
}, },
"node_modules/@babel/helper-optimise-call-expression/node_modules/@babel/types": { "node_modules/@babel/helper-optimise-call-expression/node_modules/@babel/types": {
"dev": true "version": "7.26.7",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/helper-string-parser": "^7.25.9",
"@babel/helper-validator-identifier": "^7.25.9"
},
"engines": {
"node": ">=6.9.0"
}
}, },
"node_modules/@babel/helper-plugin-utils": { "node_modules/@babel/helper-plugin-utils": {
"version": "7.26.5", "version": "7.26.5",
@ -340,6 +385,18 @@
"node": ">=6.9.0" "node": ">=6.9.0"
} }
}, },
"node_modules/@babel/helper-skip-transparent-expression-wrappers/node_modules/@babel/types": {
"version": "7.26.7",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/helper-string-parser": "^7.25.9",
"@babel/helper-validator-identifier": "^7.25.9"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-skip-transparent-expression-wrappers/node_modules/@jridgewell/gen-mapping": { "node_modules/@babel/helper-skip-transparent-expression-wrappers/node_modules/@jridgewell/gen-mapping": {
"version": "0.3.8", "version": "0.3.8",
"dev": true, "dev": true,
@ -426,6 +483,17 @@
"node": ">=6.0.0" "node": ">=6.0.0"
} }
}, },
"node_modules/@babel/parser/node_modules/@babel/types": {
"version": "7.26.7",
"license": "MIT",
"dependencies": {
"@babel/helper-string-parser": "^7.25.9",
"@babel/helper-validator-identifier": "^7.25.9"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/template": { "node_modules/@babel/template": {
"version": "7.25.9", "version": "7.25.9",
"dev": true, "dev": true,
@ -439,10 +507,10 @@
"node": ">=6.9.0" "node": ">=6.9.0"
} }
}, },
"node_modules/@babel/types": { "node_modules/@babel/template/node_modules/@babel/types": {
"version": "7.26.9", "version": "7.26.7",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.9.tgz", "dev": true,
"integrity": "sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==", "license": "MIT",
"dependencies": { "dependencies": {
"@babel/helper-string-parser": "^7.25.9", "@babel/helper-string-parser": "^7.25.9",
"@babel/helper-validator-identifier": "^7.25.9" "@babel/helper-validator-identifier": "^7.25.9"
@ -542,10 +610,9 @@
} }
}, },
"node_modules/@eslint/js": { "node_modules/@eslint/js": {
"version": "9.20.0", "version": "9.19.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.20.0.tgz",
"integrity": "sha512-iZA07H9io9Wn836aVTytRaNqh00Sad+EamwOVJT12GTLw1VGMFV/4JaME+JjLtr9fiGaoWgYnS54wrfWsSs4oQ==",
"dev": true, "dev": true,
"license": "MIT",
"engines": { "engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0" "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
} }
@ -649,14 +716,16 @@
}, },
"node_modules/@octokit/auth-token": { "node_modules/@octokit/auth-token": {
"version": "4.0.0", "version": "4.0.0",
"license": "MIT", "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz",
"integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==",
"engines": { "engines": {
"node": ">= 18" "node": ">= 18"
} }
}, },
"node_modules/@octokit/core": { "node_modules/@octokit/core": {
"version": "5.2.0", "version": "5.2.0",
"license": "MIT", "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.0.tgz",
"integrity": "sha512-1LFfa/qnMQvEOAdzlQymH0ulepxbxnCYAKJZfMci/5XJyIHWgEYnDmgnKakbTh7CH2tFQ5O60oYDvns4i9RAIg==",
"dependencies": { "dependencies": {
"@octokit/auth-token": "^4.0.0", "@octokit/auth-token": "^4.0.0",
"@octokit/graphql": "^7.1.0", "@octokit/graphql": "^7.1.0",
@ -672,7 +741,8 @@
}, },
"node_modules/@octokit/endpoint": { "node_modules/@octokit/endpoint": {
"version": "9.0.6", "version": "9.0.6",
"license": "MIT", "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.6.tgz",
"integrity": "sha512-H1fNTMA57HbkFESSt3Y9+FBICv+0jFceJFPWDePYlR/iMGrwM5ph+Dd4XRQs+8X+PUFURLQgX9ChPfhJ/1uNQw==",
"dependencies": { "dependencies": {
"@octokit/types": "^13.1.0", "@octokit/types": "^13.1.0",
"universal-user-agent": "^6.0.0" "universal-user-agent": "^6.0.0"
@ -683,7 +753,8 @@
}, },
"node_modules/@octokit/graphql": { "node_modules/@octokit/graphql": {
"version": "7.1.0", "version": "7.1.0",
"license": "MIT", "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.1.0.tgz",
"integrity": "sha512-r+oZUH7aMFui1ypZnAvZmn0KSqAUgE1/tUXIWaqUCa1758ts/Jio84GZuzsvUkme98kv0WFY8//n0J1Z+vsIsQ==",
"dependencies": { "dependencies": {
"@octokit/request": "^8.3.0", "@octokit/request": "^8.3.0",
"@octokit/types": "^13.0.0", "@octokit/types": "^13.0.0",
@ -695,11 +766,13 @@
}, },
"node_modules/@octokit/openapi-types": { "node_modules/@octokit/openapi-types": {
"version": "23.0.1", "version": "23.0.1",
"license": "MIT" "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g=="
}, },
"node_modules/@octokit/plugin-paginate-rest": { "node_modules/@octokit/plugin-paginate-rest": {
"version": "11.3.1", "version": "11.3.1",
"license": "MIT", "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.1.tgz",
"integrity": "sha512-ryqobs26cLtM1kQxqeZui4v8FeznirUsksiA+RYemMPJ7Micju0WSkv50dBksTuZks9O5cg4wp+t8fZ/cLY56g==",
"dependencies": { "dependencies": {
"@octokit/types": "^13.5.0" "@octokit/types": "^13.5.0"
}, },
@ -712,7 +785,8 @@
}, },
"node_modules/@octokit/plugin-request-log": { "node_modules/@octokit/plugin-request-log": {
"version": "4.0.1", "version": "4.0.1",
"license": "MIT", "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-4.0.1.tgz",
"integrity": "sha512-GihNqNpGHorUrO7Qa9JbAl0dbLnqJVrV8OXe2Zm5/Y4wFkZQDfTreBzVmiRfJVfE4mClXdihHnbpyyO9FSX4HA==",
"engines": { "engines": {
"node": ">= 18" "node": ">= 18"
}, },
@ -722,7 +796,8 @@
}, },
"node_modules/@octokit/plugin-rest-endpoint-methods": { "node_modules/@octokit/plugin-rest-endpoint-methods": {
"version": "13.2.2", "version": "13.2.2",
"license": "MIT", "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.2.2.tgz",
"integrity": "sha512-EI7kXWidkt3Xlok5uN43suK99VWqc8OaIMktY9d9+RNKl69juoTyxmLoWPIZgJYzi41qj/9zU7G/ljnNOJ5AFA==",
"dependencies": { "dependencies": {
"@octokit/types": "^13.5.0" "@octokit/types": "^13.5.0"
}, },
@ -735,7 +810,8 @@
}, },
"node_modules/@octokit/request": { "node_modules/@octokit/request": {
"version": "8.4.1", "version": "8.4.1",
"license": "MIT", "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.1.tgz",
"integrity": "sha512-qnB2+SY3hkCmBxZsR/MPCybNmbJe4KAlfWErXq+rBKkQJlbjdJeS85VI9r8UqeLYLvnAenU8Q1okM/0MBsAGXw==",
"dependencies": { "dependencies": {
"@octokit/endpoint": "^9.0.6", "@octokit/endpoint": "^9.0.6",
"@octokit/request-error": "^5.1.1", "@octokit/request-error": "^5.1.1",
@ -748,7 +824,8 @@
}, },
"node_modules/@octokit/request-error": { "node_modules/@octokit/request-error": {
"version": "5.1.1", "version": "5.1.1",
"license": "MIT", "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.1.tgz",
"integrity": "sha512-v9iyEQJH6ZntoENr9/yXxjuezh4My67CBSu9r6Ve/05Iu5gNgnisNWOsoJHTP6k0Rr0+HQIpnH+kyammu90q/g==",
"dependencies": { "dependencies": {
"@octokit/types": "^13.1.0", "@octokit/types": "^13.1.0",
"deprecation": "^2.0.0", "deprecation": "^2.0.0",
@ -760,7 +837,8 @@
}, },
"node_modules/@octokit/rest": { "node_modules/@octokit/rest": {
"version": "20.1.1", "version": "20.1.1",
"license": "MIT", "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-20.1.1.tgz",
"integrity": "sha512-MB4AYDsM5jhIHro/dq4ix1iWTLGToIGk6cWF5L6vanFaMble5jTX/UBQyiv05HsWnwUtY8JrfHy2LWfKwihqMw==",
"dependencies": { "dependencies": {
"@octokit/core": "^5.0.2", "@octokit/core": "^5.0.2",
"@octokit/plugin-paginate-rest": "11.3.1", "@octokit/plugin-paginate-rest": "11.3.1",
@ -773,7 +851,8 @@
}, },
"node_modules/@octokit/types": { "node_modules/@octokit/types": {
"version": "13.8.0", "version": "13.8.0",
"license": "MIT", "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"dependencies": { "dependencies": {
"@octokit/openapi-types": "^23.0.1" "@octokit/openapi-types": "^23.0.1"
} }
@ -1130,7 +1209,8 @@
}, },
"node_modules/before-after-hook": { "node_modules/before-after-hook": {
"version": "2.2.3", "version": "2.2.3",
"license": "Apache-2.0" "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
"integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="
}, },
"node_modules/birpc": { "node_modules/birpc": {
"version": "0.2.19", "version": "0.2.19",
@ -1216,26 +1296,6 @@
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
} }
}, },
"node_modules/browserslist/node_modules/caniuse-lite": {
"version": "1.0.30001700",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001700.tgz",
"integrity": "sha512-2S6XIXwaE7K7erT8dY+kLQcpa5ms63XlRkMkReXjle+kf6c5g38vyMl+Z5y8dSxOFDhcFe+nxnn261PLxBSQsQ==",
"dev": true,
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/caniuse-lite"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
]
},
"node_modules/bundle-name": { "node_modules/bundle-name": {
"version": "4.1.0", "version": "4.1.0",
"dev": true, "dev": true,
@ -1299,6 +1359,25 @@
"node": ">=6" "node": ">=6"
} }
}, },
"node_modules/caniuse-lite": {
"version": "1.0.30001697",
"dev": true,
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/caniuse-lite"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"license": "CC-BY-4.0"
},
"node_modules/chalk": { "node_modules/chalk": {
"version": "4.1.2", "version": "4.1.2",
"dev": true, "dev": true,
@ -1517,7 +1596,8 @@
}, },
"node_modules/deprecation": { "node_modules/deprecation": {
"version": "2.3.1", "version": "2.3.1",
"license": "ISC" "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
}, },
"node_modules/dompurify": { "node_modules/dompurify": {
"version": "3.2.4", "version": "3.2.4",
@ -1611,336 +1691,6 @@
"@esbuild/win32-x64": "0.21.5" "@esbuild/win32-x64": "0.21.5"
} }
}, },
"node_modules/esbuild/node_modules/@esbuild/aix-ppc64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
"integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==",
"cpu": [
"ppc64"
],
"optional": true,
"os": [
"aix"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild/node_modules/@esbuild/android-arm": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz",
"integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==",
"cpu": [
"arm"
],
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild/node_modules/@esbuild/android-arm64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz",
"integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild/node_modules/@esbuild/android-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz",
"integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild/node_modules/@esbuild/darwin-arm64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz",
"integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild/node_modules/@esbuild/darwin-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz",
"integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild/node_modules/@esbuild/freebsd-arm64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz",
"integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild/node_modules/@esbuild/freebsd-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz",
"integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild/node_modules/@esbuild/linux-arm": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz",
"integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==",
"cpu": [
"arm"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild/node_modules/@esbuild/linux-arm64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz",
"integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild/node_modules/@esbuild/linux-ia32": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz",
"integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==",
"cpu": [
"ia32"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild/node_modules/@esbuild/linux-loong64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz",
"integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==",
"cpu": [
"loong64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild/node_modules/@esbuild/linux-mips64el": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz",
"integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==",
"cpu": [
"mips64el"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild/node_modules/@esbuild/linux-ppc64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz",
"integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==",
"cpu": [
"ppc64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild/node_modules/@esbuild/linux-riscv64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz",
"integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==",
"cpu": [
"riscv64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild/node_modules/@esbuild/linux-s390x": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz",
"integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==",
"cpu": [
"s390x"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild/node_modules/@esbuild/linux-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz",
"integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild/node_modules/@esbuild/netbsd-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz",
"integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"netbsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild/node_modules/@esbuild/openbsd-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz",
"integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"openbsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild/node_modules/@esbuild/sunos-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz",
"integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"sunos"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild/node_modules/@esbuild/win32-arm64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz",
"integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild/node_modules/@esbuild/win32-ia32": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz",
"integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==",
"cpu": [
"ia32"
],
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild/node_modules/@esbuild/win32-x64": { "node_modules/esbuild/node_modules/@esbuild/win32-x64": {
"version": "0.21.5", "version": "0.21.5",
"cpu": [ "cpu": [
@ -1975,17 +1725,16 @@
} }
}, },
"node_modules/eslint": { "node_modules/eslint": {
"version": "9.20.1", "version": "9.19.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-9.20.1.tgz",
"integrity": "sha512-m1mM33o6dBUjxl2qb6wv6nGNwCAsns1eKtaQ4l/NPHeTvhiUPbtdfMyktxN4B3fgHIgsYh1VT3V9txblpQHq+g==",
"dev": true, "dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.12.1", "@eslint-community/regexpp": "^4.12.1",
"@eslint/config-array": "^0.19.0", "@eslint/config-array": "^0.19.0",
"@eslint/core": "^0.11.0", "@eslint/core": "^0.10.0",
"@eslint/eslintrc": "^3.2.0", "@eslint/eslintrc": "^3.2.0",
"@eslint/js": "9.20.0", "@eslint/js": "9.19.0",
"@eslint/plugin-kit": "^0.2.5", "@eslint/plugin-kit": "^0.2.5",
"@humanfs/node": "^0.16.6", "@humanfs/node": "^0.16.6",
"@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/module-importer": "^1.0.1",
@ -2134,18 +1883,6 @@
"url": "https://opencollective.com/eslint" "url": "https://opencollective.com/eslint"
} }
}, },
"node_modules/eslint/node_modules/@eslint/core": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.11.0.tgz",
"integrity": "sha512-DWUB2pksgNEb6Bz2fggIy1wh6fGgZP4Xyy/Mt0QZPiloKKXerbqq9D3SBQTlCRYOrcRPu4vuz+CGjwdfqxnoWA==",
"dev": true,
"dependencies": {
"@types/json-schema": "^7.0.15"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
"node_modules/espree": { "node_modules/espree": {
"version": "10.3.0", "version": "10.3.0",
"dev": true, "dev": true,
@ -3025,7 +2762,8 @@
}, },
"node_modules/once": { "node_modules/once": {
"version": "1.4.0", "version": "1.4.0",
"license": "ISC", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"dependencies": { "dependencies": {
"wrappy": "1" "wrappy": "1"
} }
@ -3432,222 +3170,6 @@
"fsevents": "~2.3.2" "fsevents": "~2.3.2"
} }
}, },
"node_modules/rollup/node_modules/@rollup/rollup-android-arm-eabi": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.34.4.tgz",
"integrity": "sha512-gGi5adZWvjtJU7Axs//CWaQbQd/vGy8KGcnEaCWiyCqxWYDxwIlAHFuSe6Guoxtd0SRvSfVTDMPd5H+4KE2kKA==",
"cpu": [
"arm"
],
"optional": true,
"os": [
"android"
]
},
"node_modules/rollup/node_modules/@rollup/rollup-android-arm64": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.34.4.tgz",
"integrity": "sha512-1aRlh1gqtF7vNPMnlf1vJKk72Yshw5zknR/ZAVh7zycRAGF2XBMVDAHmFQz/Zws5k++nux3LOq/Ejj1WrDR6xg==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"android"
]
},
"node_modules/rollup/node_modules/@rollup/rollup-darwin-arm64": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.34.4.tgz",
"integrity": "sha512-drHl+4qhFj+PV/jrQ78p9ch6A0MfNVZScl/nBps5a7u01aGf/GuBRrHnRegA9bP222CBDfjYbFdjkIJ/FurvSQ==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"darwin"
]
},
"node_modules/rollup/node_modules/@rollup/rollup-darwin-x64": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.34.4.tgz",
"integrity": "sha512-hQqq/8QALU6t1+fbNmm6dwYsa0PDD4L5r3TpHx9dNl+aSEMnIksHZkSO3AVH+hBMvZhpumIGrTFj8XCOGuIXjw==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"darwin"
]
},
"node_modules/rollup/node_modules/@rollup/rollup-freebsd-arm64": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.34.4.tgz",
"integrity": "sha512-/L0LixBmbefkec1JTeAQJP0ETzGjFtNml2gpQXA8rpLo7Md+iXQzo9kwEgzyat5Q+OG/C//2B9Fx52UxsOXbzw==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"freebsd"
]
},
"node_modules/rollup/node_modules/@rollup/rollup-freebsd-x64": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.34.4.tgz",
"integrity": "sha512-6Rk3PLRK+b8L/M6m/x6Mfj60LhAUcLJ34oPaxufA+CfqkUrDoUPQYFdRrhqyOvtOKXLJZJwxlOLbQjNYQcRQfw==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"freebsd"
]
},
"node_modules/rollup/node_modules/@rollup/rollup-linux-arm-gnueabihf": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.34.4.tgz",
"integrity": "sha512-kmT3x0IPRuXY/tNoABp2nDvI9EvdiS2JZsd4I9yOcLCCViKsP0gB38mVHOhluzx+SSVnM1KNn9k6osyXZhLoCA==",
"cpu": [
"arm"
],
"optional": true,
"os": [
"linux"
]
},
"node_modules/rollup/node_modules/@rollup/rollup-linux-arm-musleabihf": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.34.4.tgz",
"integrity": "sha512-3iSA9tx+4PZcJH/Wnwsvx/BY4qHpit/u2YoZoXugWVfc36/4mRkgGEoRbRV7nzNBSCOgbWMeuQ27IQWgJ7tRzw==",
"cpu": [
"arm"
],
"optional": true,
"os": [
"linux"
]
},
"node_modules/rollup/node_modules/@rollup/rollup-linux-arm64-gnu": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.34.4.tgz",
"integrity": "sha512-7CwSJW+sEhM9sESEk+pEREF2JL0BmyCro8UyTq0Kyh0nu1v0QPNY3yfLPFKChzVoUmaKj8zbdgBxUhBRR+xGxg==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"linux"
]
},
"node_modules/rollup/node_modules/@rollup/rollup-linux-arm64-musl": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.34.4.tgz",
"integrity": "sha512-GZdafB41/4s12j8Ss2izofjeFXRAAM7sHCb+S4JsI9vaONX/zQ8cXd87B9MRU/igGAJkKvmFmJJBeeT9jJ5Cbw==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"linux"
]
},
"node_modules/rollup/node_modules/@rollup/rollup-linux-loongarch64-gnu": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.34.4.tgz",
"integrity": "sha512-uuphLuw1X6ur11675c2twC6YxbzyLSpWggvdawTUamlsoUv81aAXRMPBC1uvQllnBGls0Qt5Siw8reSIBnbdqQ==",
"cpu": [
"loong64"
],
"optional": true,
"os": [
"linux"
]
},
"node_modules/rollup/node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.34.4.tgz",
"integrity": "sha512-KvLEw1os2gSmD6k6QPCQMm2T9P2GYvsMZMRpMz78QpSoEevHbV/KOUbI/46/JRalhtSAYZBYLAnT9YE4i/l4vg==",
"cpu": [
"ppc64"
],
"optional": true,
"os": [
"linux"
]
},
"node_modules/rollup/node_modules/@rollup/rollup-linux-riscv64-gnu": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.34.4.tgz",
"integrity": "sha512-wcpCLHGM9yv+3Dql/CI4zrY2mpQ4WFergD3c9cpRowltEh5I84pRT/EuHZsG0In4eBPPYthXnuR++HrFkeqwkA==",
"cpu": [
"riscv64"
],
"optional": true,
"os": [
"linux"
]
},
"node_modules/rollup/node_modules/@rollup/rollup-linux-s390x-gnu": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.34.4.tgz",
"integrity": "sha512-nLbfQp2lbJYU8obhRQusXKbuiqm4jSJteLwfjnunDT5ugBKdxqw1X9KWwk8xp1OMC6P5d0WbzxzhWoznuVK6XA==",
"cpu": [
"s390x"
],
"optional": true,
"os": [
"linux"
]
},
"node_modules/rollup/node_modules/@rollup/rollup-linux-x64-gnu": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.34.4.tgz",
"integrity": "sha512-JGejzEfVzqc/XNiCKZj14eb6s5w8DdWlnQ5tWUbs99kkdvfq9btxxVX97AaxiUX7xJTKFA0LwoS0KU8C2faZRg==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"linux"
]
},
"node_modules/rollup/node_modules/@rollup/rollup-linux-x64-musl": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.34.4.tgz",
"integrity": "sha512-/iFIbhzeyZZy49ozAWJ1ZR2KW6ZdYUbQXLT4O5n1cRZRoTpwExnHLjlurDXXPKEGxiAg0ujaR9JDYKljpr2fDg==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"linux"
]
},
"node_modules/rollup/node_modules/@rollup/rollup-win32-arm64-msvc": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.34.4.tgz",
"integrity": "sha512-qORc3UzoD5UUTneiP2Afg5n5Ti1GAW9Gp5vHPxzvAFFA3FBaum9WqGvYXGf+c7beFdOKNos31/41PRMUwh1tpA==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"win32"
]
},
"node_modules/rollup/node_modules/@rollup/rollup-win32-ia32-msvc": {
"version": "4.34.4",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.34.4.tgz",
"integrity": "sha512-5g7E2PHNK2uvoD5bASBD9aelm44nf1w4I5FEI7MPHLWcCSrR8JragXZWgKPXk5i2FU3JFfa6CGZLw2RrGBHs2Q==",
"cpu": [
"ia32"
],
"optional": true,
"os": [
"win32"
]
},
"node_modules/rollup/node_modules/@rollup/rollup-win32-x64-msvc": { "node_modules/rollup/node_modules/@rollup/rollup-win32-x64-msvc": {
"version": "4.34.4", "version": "4.34.4",
"cpu": [ "cpu": [
@ -3659,19 +3181,6 @@
"win32" "win32"
] ]
}, },
"node_modules/rollup/node_modules/fsevents": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
"hasInstallScript": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"node_modules/run-applescript": { "node_modules/run-applescript": {
"version": "7.0.0", "version": "7.0.0",
"dev": true, "dev": true,
@ -3895,7 +3404,8 @@
}, },
"node_modules/universal-user-agent": { "node_modules/universal-user-agent": {
"version": "6.0.1", "version": "6.0.1",
"license": "ISC" "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz",
"integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ=="
}, },
"node_modules/universalify": { "node_modules/universalify": {
"version": "2.0.1", "version": "2.0.1",
@ -4043,7 +3553,8 @@
}, },
"node_modules/vite-plugin-mkcert": { "node_modules/vite-plugin-mkcert": {
"version": "1.17.6", "version": "1.17.6",
"license": "MIT", "resolved": "https://registry.npmjs.org/vite-plugin-mkcert/-/vite-plugin-mkcert-1.17.6.tgz",
"integrity": "sha512-4JR1RN0HEg/w17eRQJ/Ve2pSa6KCVQcQO6yKtIaKQCFDyd63zGfXHWpygBkvvRSpqa0GcqNKf0fjUJ0HiJQXVQ==",
"dependencies": { "dependencies": {
"@octokit/rest": "^20.1.1", "@octokit/rest": "^20.1.1",
"axios": "^1.7.4", "axios": "^1.7.4",
@ -4382,6 +3893,18 @@
"node": ">=6.9.0" "node": ">=6.9.0"
} }
}, },
"node_modules/vite-plugin-vue-inspector/node_modules/@babel/types": {
"version": "7.26.7",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/helper-string-parser": "^7.25.9",
"@babel/helper-validator-identifier": "^7.25.9"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/vite-plugin-vue-inspector/node_modules/@jridgewell/gen-mapping": { "node_modules/vite-plugin-vue-inspector/node_modules/@jridgewell/gen-mapping": {
"version": "0.3.8", "version": "0.3.8",
"dev": true, "dev": true,
@ -4481,19 +4004,6 @@
"semver": "bin/semver.js" "semver": "bin/semver.js"
} }
}, },
"node_modules/vite/node_modules/fsevents": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
"hasInstallScript": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"node_modules/vue": { "node_modules/vue": {
"version": "3.5.13", "version": "3.5.13",
"license": "MIT", "license": "MIT",
@ -4656,7 +4166,8 @@
}, },
"node_modules/wrappy": { "node_modules/wrappy": {
"version": "1.0.2", "version": "1.0.2",
"license": "ISC" "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
}, },
"node_modules/xml-name-validator": { "node_modules/xml-name-validator": {
"version": "4.0.0", "version": "4.0.0",

View File

@ -9,15 +9,13 @@
:showDetail="false" :showDetail="false"
:author="true" :author="true"
:isLike="!isLike" :isLike="!isLike"
:isPassword="isPassword" :isCommentPassword="comment.isCommentPassword"
@editClick="editClick" @editClick="$emit('editClick', comment)"
@deleteClick="deleteClick" @deleteClick="$emit('deleteClick', comment)"
@submitPassword="submitPassword"
@updateReaction="handleUpdateReaction" @updateReaction="handleUpdateReaction"
@toggleEdit="toggleEdit(true)"
/> />
<!-- 댓글 비밀번호 입력창 (익명일 경우) --> <!-- 댓글 비밀번호 입력창 (익명일 경우) -->
<div v-if="isPassword && unknown" class="mt-3 w-25 ms-auto"> <div v-if="isCommentPassword && unknown" class="mt-3 w-25 ms-auto">
<div class="input-group"> <div class="input-group">
<input <input
type="password" type="password"
@ -25,17 +23,17 @@
v-model="password" v-model="password"
placeholder="비밀번호 입력" placeholder="비밀번호 입력"
/> />
<button class="btn btn-primary" @click="submitPassword">확인</button> <button class="btn btn-primary" @click="logPasswordAndEmit">확인</button>
</div> </div>
<span v-if="passwordAlert" class="invalid-feedback d-block text-start">{{ passwordAlert }}</span> <span v-if="passwordCommentAlert" class="invalid-feedback d-block text-start">{{ passwordCommentAlert }}</span>
</div> </div>
<div class="mt-6"> <div class="mt-6">
<template v-if="isEditTextarea"> <template v-if="comment.isEditTextarea">
<textarea v-model="editedContent" class="form-control"></textarea> <textarea v-model="localEditedContent" class="form-control"></textarea>
<div class="mt-2 d-flex justify-content-end"> <div class="mt-2 d-flex justify-content-end">
<button class="btn btn-secondary me-2" @click="cancelEdit">취소</button> <button class="btn btn-secondary me-2" @click="$emit('cancelEdit', comment)">취소</button>
<button class="btn btn-primary" @click="submitEdit">수정</button> <button class="btn btn-primary" @click="submitEdit">수정</button>
</div> </div>
</template> </template>
@ -68,8 +66,7 @@
</template> </template>
<script setup> <script setup>
import axios from '@api'; import { defineProps, defineEmits, ref, computed, watch } from 'vue';
import { defineProps, defineEmits, ref } from 'vue';
import BoardProfile from './BoardProfile.vue'; import BoardProfile from './BoardProfile.vue';
import BoardCommentArea from './BoardCommentArea.vue'; import BoardCommentArea from './BoardCommentArea.vue';
import PlusButton from '../button/PlusBtn.vue'; import PlusButton from '../button/PlusBtn.vue';
@ -95,14 +92,21 @@ const props = defineProps({
type: Boolean, type: Boolean,
default: false default: false
}, },
isPassword: { isCommentPassword: {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
passwordCommentAlert: {
type: String,
default: false
}
}); });
// emits // emits
const emit = defineEmits(['submitComment', 'updateReaction', 'toggleEdit',]); const emit = defineEmits(['submitComment', 'updateReaction', 'editClick', 'deleteClick', 'submitPassword', 'submitEdit', 'cancelEdit']);
const password = ref('');
const localEditedContent = ref(props.comment.content);
// //
const isComment = ref(false); const isComment = ref(false);
@ -110,26 +114,9 @@ const toggleComment = () => {
isComment.value = !isComment.value; isComment.value = !isComment.value;
}; };
// &
const password = ref('');
const passwordAlert = ref('');
const isPassword = ref(false);
const isEditTextarea = ref(false);
const lastClickedButton = ref("");
const toggleEdit = (status) => {
if (props.unknown) {
isPassword.value = status; //
lastClickedButton.value = "edit";
} else {
isEditTextarea.value = status; //
}
};
// //
const submitComment = (newComment) => { const submitComment = (newComment) => {
emit('submitComment', { parentId: props.comment.commentId, ...newComment }); emit('submitComment', { parentId: props.comment.commentId, ...newComment });
isComment.value = false; isComment.value = false;
}; };
@ -143,103 +130,21 @@ const handleUpdateReaction = (reactionData) => {
}; };
// //
const editClick = () => { const logPasswordAndEmit = () => {
if (props.unknown) { emit('submitPassword', props.comment, password.value);
console.log('수정') password.value = "";
togglePassword("edit");
}
}; };
const deleteClick = () => { watch(() => props.comment.isEditTextarea, (newVal) => {
if (props.unknown) { if (newVal) {
console.log('삭제') localEditedContent.value = props.comment.content;
togglePassword("delete");
} }
}; });
const togglePassword = (button) => { //
if (lastClickedButton.value === button) {
isPassword.value = !isPassword.value;
} else {
isPassword.value = true;
}
lastClickedButton.value = button;
};
// const deleteComment = async () => {
// if (!confirm(" ?")) return;
// try {
// console.log(" :");
// console.log(" ID:", props.comment.commentId);
// console.log(" ID:", props.comment.boardId);
// console.log(" :", props.unknown ? " ( )" : " ( )");
// const response = await axios.delete(`board/${props.comment.commentId}`, {
// data: { LOCCMTSEQ: props.comment.commentId }
// });
// console.log("📌 :", response.data);
// if (response.data.code === 200) {
// console.log(" !");
// // emit("commentDeleted", props.comment.commentId);
// } else {
// console.log(" :", response.data.message);
// // alert(" .");
// }
// } catch (error) {
// console.log("🚨 :", error);
// alert(" .");
// }
// };
//
const submitPassword = async () => {
if (!password.value) {
passwordAlert.value = "비밀번호를 입력해주세요.";
return;
}
console.log(props.comment.commentId)
try {
const response = await axios.post(`board/${props.comment.commentId}/password`, {
LOCCMTPWD: password.value,
LOCCMTSEQ: 288,
});
console.log("응답!!!!!!!!", response); //
console.log("응답 데이터:", response.data);
if (response.data.code === 200 && response.data.data === true) {
console.log('되는거니')
// deleteComment()
// // password.value = '';
// // isPassword.value = false;
// // isEditTextarea.value = true;
} else {
passwordAlert.value = "비밀번호가 일치하지 않습니다.";
}
} catch (error) {
passwordAlert.value = "비밀번호 검증 중 오류가 발생했습니다.";
}
};
const editedContent = ref(props.comment.content);
//
const cancelEdit = () => {
isEditTextarea.value = false;
};
//
const submitEdit = () => { const submitEdit = () => {
emit('submitComment', { commentId: props.comment.commentId, content: editedContent.value }); emit('submitEdit', props.comment, localEditedContent.value);
isEditTextarea.value = false; //
}; };
</script> </script>

View File

@ -8,13 +8,16 @@
<BoardComment <BoardComment
:unknown="unknown" :unknown="unknown"
:comment="comment" :comment="comment"
:isPassword="isPassword" :isCommentPassword="comment.isCommentPassword"
:isEditTextarea="isEditTextarea" :isEditTextarea="comment.isEditTextarea"
@editClick="editClick" :passwordCommentAlert="passwordCommentAlert"
@deleteClick="deleteClick" @editClick="$emit('editClick', comment)"
@deleteClick="$emit('deleteClick', comment)"
@submitPassword="submitPassword" @submitPassword="submitPassword"
@submitComment="submitComment" @submitComment="submitComment"
@commentDeleted="handleCommentDeleted" @commentDeleted="handleCommentDeleted"
@submitEdit="(comment, editedContent) => $emit('submitEdit', comment, editedContent)"
@cancelEdit="$emit('cancelEdit', comment)"
@updateReaction="(reactionData) => handleUpdateReaction(reactionData, comment.commentId, comment.boardId)" @updateReaction="(reactionData) => handleUpdateReaction(reactionData, comment.commentId, comment.boardId)"
/> />
</li> </li>
@ -35,17 +38,21 @@ const props = defineProps({
type: Boolean, type: Boolean,
default: true, default: true,
}, },
isPassword: { isCommentPassword: {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
isEditTextarea: { isEditTextarea: {
type: Boolean, type: Boolean,
default: false, default: false,
},
passwordCommentAlert: {
type: String,
default: false
} }
}); });
const emit = defineEmits(['submitComment', 'updateReaction', 'editClick']); const emit = defineEmits(['submitComment', 'updateReaction', 'editClick', 'submitPassword', 'clearPassword']);
const submitComment = (replyData) => { const submitComment = (replyData) => {
emit('submitComment', replyData); emit('submitComment', replyData);
@ -61,8 +68,7 @@ const handleUpdateReaction = (reactionData, commentId, boardId) => {
emit('updateReaction', updatedReactionData); emit('updateReaction', updatedReactionData);
} }
const editClick = (data) => { const submitPassword = (comment, password) => {
emit('editClick', data); emit('submitPassword', comment, password);
}; };
</script> </script>

View File

@ -31,23 +31,10 @@
<BoardRecommendBtn <BoardRecommendBtn
v-if="isLike" v-if="isLike"
:boardId="boardId" :boardId="boardId"
:comment="props.comment" :comment="comment"
@updateReaction="handleUpdateReaction" @updateReaction="handleUpdateReaction"
/> >
</BoardRecommendBtn>
<!-- 비밀번호 입력창 (익명일 경우) -->
<div v-if="isPassword && unknown" class="mt-3">
<div class="input-group">
<input
type="password"
class="form-control"
v-model="password"
placeholder="비밀번호 입력"
/>
<button class="btn btn-primary" @click="$emit('submitPassword', password)">확인</button>
</div>
<span v-if="props.passwordAlert" class="invalid-feedback d-block text-start">{{ props.passwordAlert }}</span>
</div>
</div> </div>
</div> </div>
</template> </template>
@ -58,9 +45,6 @@ import DeleteButton from '../button/DeleteBtn.vue';
import EditButton from '../button/EditBtn.vue'; import EditButton from '../button/EditBtn.vue';
import BoardRecommendBtn from '../button/BoardRecommendBtn.vue'; import BoardRecommendBtn from '../button/BoardRecommendBtn.vue';
// Vue Router
const password = ref('');
// Props // Props
const props = defineProps({ const props = defineProps({
comment: { comment: {
@ -77,7 +61,7 @@ const props = defineProps({
}, },
profileName: { profileName: {
type: String, type: String,
default: '익명 사용자', default: '익명',
}, },
unknown: { unknown: {
type: Boolean, type: Boolean,
@ -107,18 +91,10 @@ const props = defineProps({
isLike: { isLike: {
type: Boolean, type: Boolean,
default: false, default: false,
},
isPassword: {
type: Boolean,
default: false,
},
passwordAlert: {
type: String,
default: false,
} }
}); });
const emit = defineEmits(['togglePasswordInput', 'updateReaction', 'editClick', 'deleteClick', 'updatePasswordAlert']); const emit = defineEmits(['updateReaction', 'editClick', 'deleteClick']);
// //
const editClick = () => { const editClick = () => {
@ -131,11 +107,6 @@ const deleteClick = () => {
}; };
const handleUpdateReaction = (reactionData) => { const handleUpdateReaction = (reactionData) => {
// console.log("🔥 BoardProfile / ");
// console.log("📌 ID:", props.boardId);
// console.log("📌 ID ( ):", props.comment?.commentId);
// console.log("📌 reactionData:", reactionData);
emit("updateReaction", { emit("updateReaction", {
boardId: props.boardId, boardId: props.boardId,
commentId: props.comment?.commentId, commentId: props.comment?.commentId,

View File

@ -8,9 +8,13 @@
</template> </template>
<script setup> <script setup>
import { ref, watch } from 'vue'; import { ref, computed } from 'vue';
const props = defineProps({ const props = defineProps({
comment: {
type: Object,
required: true,
},
likeClicked : { likeClicked : {
type : Boolean, type : Boolean,
default : false, default : false,
@ -49,21 +53,13 @@ const emit = defineEmits(['updateReaction']);
const likeClicked = ref(props.likeClicked); const likeClicked = ref(props.likeClicked);
const dislikeClicked = ref(props.dislikeClicked); const dislikeClicked = ref(props.dislikeClicked);
const likeCount = ref(props.likeCount); const likeCount = computed(() => props.comment?.likeCount ?? props.likeCount);
const dislikeCount = ref(props.dislikeCount); const dislikeCount = computed(() => props.comment?.dislikeCount ?? props.dislikeCount);
// likeCount dislikeCount
watch(() => props.likeCount, (newVal) => {
likeCount.value = newVal;
});
watch(() => props.dislikeCount, (newVal) => {
dislikeCount.value = newVal;
});
const handleLike = () => { const handleLike = () => {
const isLike = !likeClicked.value; const isLike = !likeClicked.value;
const isDislike = false; const isDislike = false;
emit('updateReaction', { boardId: props.boardId, commentId: props.commentId, isLike, isDislike }); emit('updateReaction', { boardId: props.boardId, commentId: props.commentId, isLike, isDislike });
likeClicked.value = isLike; likeClicked.value = isLike;
dislikeClicked.value = false; dislikeClicked.value = false;
@ -72,6 +68,7 @@ const handleLike = () => {
const handleDislike = () => { const handleDislike = () => {
const isDislike = !dislikeClicked.value; const isDislike = !dislikeClicked.value;
const isLike = false; const isLike = false;
emit('updateReaction', { boardId: props.boardId, commentId: props.commentId, isLike, isDislike }); emit('updateReaction', { boardId: props.boardId, commentId: props.commentId, isLike, isDislike });
dislikeClicked.value = isDislike; dislikeClicked.value = isDislike;
likeClicked.value = false; likeClicked.value = false;

View File

@ -13,6 +13,7 @@
:maxLength="maxlength" :maxLength="maxlength"
:placeholder="title" :placeholder="title"
:disabled="disabled" :disabled="disabled"
:min="min"
/> />
<div class="invalid-feedback" :class="isAlert ? 'display-block' : ''"> <div class="invalid-feedback" :class="isAlert ? 'display-block' : ''">
{{ title }} 확인해주세요. {{ title }} 확인해주세요.
@ -64,6 +65,10 @@ const props = defineProps({
disabled: { disabled: {
type: Boolean, type: Boolean,
default: false, default: false,
},
min: {
type: String,
default: '',
} }
}); });

View File

@ -122,6 +122,9 @@ const addCategory = (data) => {
: null; : null;
const newValue = lastCategory ? lastCategory.value + 1 : 600101; const newValue = lastCategory ? lastCategory.value + 1 : 600101;
// console.log('lastCategory', lastCategory);
// console.log('newValue', newValue);
axios.post('worddict/insertCategory', { axios.post('worddict/insertCategory', {
CMNCODNAM: data CMNCODNAM: data
}).then(res => { }).then(res => {
@ -131,8 +134,14 @@ const addCategory = (data) => {
localCateList.value = [newCategory, ...localCateList.value]; localCateList.value = [newCategory, ...localCateList.value];
selectedCategory.value = newCategory.value; selectedCategory.value = newCategory.value;
// console.log('newCategory', newCategory);
// console.log('localCateList.value', localCateList.value);
// console.log('selectedCategory.value', selectedCategory.value);
// //
emit('update:cateList', localCateList.value); emit('update:cateList', localCateList.value);
} else if(res.data.message == '이미 존재하는 카테고리명입니다.') {
toastStore.onToast(res.data.message, 'e');
} }
}).catch(err => { }).catch(err => {
console.error('카테고리 추가 중 오류:', err); console.error('카테고리 추가 중 오류:', err);
@ -145,11 +154,11 @@ const addCategory = (data) => {
// //
const editWord = (data) => { const editWord = (data) => {
console.log('📌 수정할 데이터:', data); // console.log('📌 :', data);
console.log('📌 수정할 데이터:', data.id); // console.log('📌 :', data.id);
console.log('📌 수정할 데이터:', data.category); // console.log('📌 :', data.category);
console.log('📌 수정할 데이터:', data.title); // console.log('📌 :', data.title);
console.log('📌 수정할 데이터:', $common.deltaAsJson(data.content)); // console.log('📌 :', $common.deltaAsJson(data.content));
if (!data.id) { if (!data.id) {
console.error('❌ 수정할 데이터의 ID가 없습니다.'); console.error('❌ 수정할 데이터의 ID가 없습니다.');
@ -208,7 +217,6 @@ const toggleCheck = (event) => {
top: 1.2rem; top: 1.2rem;
} }
.admin-chk { .admin-chk {
position: absolute; position: absolute;
left: -0.5rem; left: -0.5rem;

View File

@ -61,7 +61,7 @@
📌 {{ notice.title }} 📌 {{ notice.title }}
<i v-if="notice.img" class="bi bi-image me-1"></i> <i v-if="notice.img" class="bi bi-image me-1"></i>
<i v-if="notice.hasAttachment" class="bi bi-paperclip"></i> <i v-if="notice.hasAttachment" class="bi bi-paperclip"></i>
<span v-if="isNewPost(notice.date)" class="badge bg-danger text-white ms-2 fs-tiny">N</span> <span v-if="isNewPost(notice.rawDate)" class="badge bg-danger text-white ms-2 fs-tiny">N</span>
</td> </td>
<td class="text-center">{{ notice.author }}</td> <td class="text-center">{{ notice.author }}</td>
<td class="text-center">{{ notice.date }}</td> <td class="text-center">{{ notice.date }}</td>
@ -78,7 +78,7 @@
{{ post.title }} {{ post.title }}
<i v-if="post.img" class="bi bi-image me-1"></i> <i v-if="post.img" class="bi bi-image me-1"></i>
<i v-if="post.hasAttachment" class="bi bi-paperclip"></i> <i v-if="post.hasAttachment" class="bi bi-paperclip"></i>
<span v-if="isNewPost(post.date)" class="badge bg-danger text-white ms-2 fs-tiny">N</span> <span v-if="isNewPost(post.rawDate)" class="badge bg-danger text-white ms-2 fs-tiny">N</span>
</td> </td>
<td class="text-center">{{ post.author }}</td> <td class="text-center">{{ post.author }}</td>
<td class="text-center">{{ post.date }}</td> <td class="text-center">{{ post.date }}</td>
@ -199,6 +199,7 @@ const fetchGeneralPosts = async (page = 1) => {
id: totalPosts - ((page - 1) * selectedSize.value) - index, id: totalPosts - ((page - 1) * selectedSize.value) - index,
title: post.title, title: post.title,
author: post.author || '익명', author: post.author || '익명',
rawDate: post.date,
date: formatDate(post.date), // date: formatDate(post.date), //
views: post.cnt || 0, views: post.cnt || 0,
hasAttachment: post.hasAttachment || false, hasAttachment: post.hasAttachment || false,
@ -239,6 +240,7 @@ const fetchNoticePosts = async () => {
title: post.title, title: post.title,
author: post.author || '관리자', author: post.author || '관리자',
date: formatDate(post.date), date: formatDate(post.date),
rawDate: post.date,
views: post.cnt || 0, views: post.cnt || 0,
hasAttachment: post.hasAttachment || false, hasAttachment: post.hasAttachment || false,
img: post.firstImageUrl || null img: post.firstImageUrl || null

View File

@ -98,9 +98,17 @@
<BoardCommentList <BoardCommentList
:unknown="unknown" :unknown="unknown"
:comments="comments" :comments="comments"
:isCommentPassword="isCommentPassword"
:isEditTextarea="isEditTextarea"
:passwordCommentAlert="passwordCommentAlert"
@editClick="editComment"
@deleteClick="deleteComment"
@updateReaction="handleCommentReaction" @updateReaction="handleCommentReaction"
@submitComment="handleCommentReply" @submitComment="handleCommentReply"
@submitPassword="submitCommentPassword"
@commentDeleted="handleCommentDeleted" @commentDeleted="handleCommentDeleted"
@cancelEdit="handleCancelEdit"
@submitEdit="handleSubmitEdit"
/> />
<Pagination <Pagination
v-if="pagination.pages" v-if="pagination.pages"
@ -141,7 +149,7 @@ const comments = ref([]);
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
const currentBoardId = ref(Number(route.params.id)); const currentBoardId = ref(Number(route.params.id));
const unknown = computed(() => profileName.value === '익명 사용자'); const unknown = computed(() => profileName.value === '익명');
const currentUserId = ref('김자바'); // id const currentUserId = ref('김자바'); // id
const authorId = ref(null); // id const authorId = ref(null); // id
@ -150,8 +158,12 @@ const isAuthor = computed(() => currentUserId.value === authorId.value);
const password = ref(''); const password = ref('');
const passwordAlert = ref(""); const passwordAlert = ref("");
const passwordCommentAlert = ref("");
const isPassword = ref(false); const isPassword = ref(false);
const isCommentPassword = ref(false);
const lastClickedButton = ref(""); const lastClickedButton = ref("");
const lastCommentClickedButton = ref("");
const isEditTextarea = ref(false);
const pagination = ref({ const pagination = ref({
currentPage: 1, currentPage: 1,
@ -178,10 +190,10 @@ const fetchBoardDetails = async () => {
// API // API
// const boardDetail = data.boardDetail || {}; // const boardDetail = data.boardDetail || {};
profileName.value = data.author || '익명 사용자'; profileName.value = data.author || '익명';
// //
profileName.value = '익명 사용자'; // profileName.value = 'null;
// : // :
authorId.value = data.author; authorId.value = data.author;
@ -241,9 +253,8 @@ const handleCommentReaction = async ({ boardId, commentId, isLike, isDislike })
LOCGOBBAD: isDislike ? 'T' : 'F' LOCGOBBAD: isDislike ? 'T' : 'F'
}); });
console.log("댓글 좋아요 API 응답 데이터:", response.data); // console.log(" API :", response.data);
// /
await fetchComments(); await fetchComments();
} catch (error) { } catch (error) {
@ -251,7 +262,7 @@ const handleCommentReaction = async ({ boardId, commentId, isLike, isDislike })
} }
}; };
// // ( )
const fetchComments = async (page = 1) => { const fetchComments = async (page = 1) => {
try { try {
// //
@ -266,7 +277,7 @@ const fetchComments = async (page = 1) => {
commentId: comment.LOCCMTSEQ, // ID commentId: comment.LOCCMTSEQ, // ID
boardId: comment.LOCBRDSEQ, boardId: comment.LOCBRDSEQ,
parentId: comment.LOCCMTPNT, // ID parentId: comment.LOCCMTPNT, // ID
author: comment.author || "익명 사용자", author: comment.author || '익명',
content: comment.LOCCMTRPY, content: comment.LOCCMTRPY,
likeCount: comment.likeCount || 0, likeCount: comment.likeCount || 0,
dislikeCount: comment.dislikeCount || 0, dislikeCount: comment.dislikeCount || 0,
@ -274,7 +285,9 @@ const fetchComments = async (page = 1) => {
dislikeClicked: comment.dislikeClicked || false, dislikeClicked: comment.dislikeClicked || false,
createdAtRaw: new Date(comment.LOCCMTRDT), // createdAtRaw: new Date(comment.LOCCMTRDT), //
createdAt: formattedDate(comment.LOCCMTRDT), // createdAt: formattedDate(comment.LOCCMTRDT), //
children: [] // children: [], //
// isCommentPassword: false, //
// isEditTextarea: false //
})); }));
for (const comment of commentsList) { for (const comment of commentsList) {
@ -284,7 +297,7 @@ const fetchComments = async (page = 1) => {
params: { LOCCMTPNT: comment.commentId } params: { LOCCMTPNT: comment.commentId }
}); });
// console.log(`📌 (${comment.commentId} ):`, replyResponse.data); // console.log(` (${comment.commentId} ):`, replyResponse.data);
if (replyResponse.data.data) { if (replyResponse.data.data) {
comment.children = replyResponse.data.data.map(reply => ({ comment.children = replyResponse.data.data.map(reply => ({
@ -323,14 +336,14 @@ const fetchComments = async (page = 1) => {
navigateLastPage: response.data.data.navigateLastPage // navigateLastPage: response.data.data.navigateLastPage //
}; };
console.log("📌 댓글 목록:", comments.value); // console.log("📌 :", comments.value);
} catch (error) { } catch (error) {
console.log('댓글 목록 불러오기 오류:', error); console.log('댓글 목록 불러오기 오류:', error);
} }
}; };
const isSubmitting = ref(false);
// //
const handleCommentSubmit = async ({ comment, password }) => { const handleCommentSubmit = async ({ comment, password }) => {
// if (unknown.value && !password) { // if (unknown.value && !password) {
@ -342,6 +355,9 @@ const handleCommentSubmit = async ({ comment, password }) => {
// return; // return;
// } // }
//
if (isSubmitting.value) return;
isSubmitting.value = true;
try { try {
const response = await axios.post(`board/${currentBoardId.value}/comment`, { const response = await axios.post(`board/${currentBoardId.value}/comment`, {
@ -350,10 +366,9 @@ const handleCommentSubmit = async ({ comment, password }) => {
LOCCMTPWD: password, LOCCMTPWD: password,
LOCCMTPNT: 1 LOCCMTPNT: 1
}); });
// console.log(' 1212121212:', response.data);
if (response.status === 200) { if (response.status === 200) {
console.log('댓글 작성 성공:', response.data.message); // console.log(' :', response.data.message);
await fetchComments(); await fetchComments();
} else { } else {
console.log('댓글 작성 실패:', response.data.message); console.log('댓글 작성 실패:', response.data.message);
@ -364,15 +379,15 @@ const handleCommentSubmit = async ({ comment, password }) => {
}; };
// // ( `BoardCommentList` )
const handleCommentReply = async (reply) => { const handleCommentReply = async (reply) => {
try { try {
console.log('대댓글 작성 요청 데이터:', { // console.log(' :', {
LOCBRDSEQ: currentBoardId.value, // LOCBRDSEQ: currentBoardId.value,
LOCCMTRPY: reply.comment, // LOCCMTRPY: reply.comment,
LOCCMTPWD: reply.password || null, // LOCCMTPWD: reply.password || null,
LOCCMTPNT: reply.parentId // LOCCMTPNT: reply.parentId
}); // });
const response = await axios.post(`board/${currentBoardId.value}/comment`, { const response = await axios.post(`board/${currentBoardId.value}/comment`, {
LOCBRDSEQ: currentBoardId.value, LOCBRDSEQ: currentBoardId.value,
@ -382,11 +397,11 @@ const handleCommentReply = async (reply) => {
}); });
// //
console.log('대댓글 작성 응답:', { // console.log(' :', {
status: response.status, // status: response.status,
data: response.data, // data: response.data,
headers: response.headers // headers: response.headers
}); // });
if (response.status === 200) { if (response.status === 200) {
if (response.data.code === 200) { // if (response.data.code === 200) { //
@ -406,6 +421,7 @@ const handleCommentReply = async (reply) => {
} }
} }
//
const editClick = (unknown) => { const editClick = (unknown) => {
if (unknown) { if (unknown) {
togglePassword("edit"); togglePassword("edit");
@ -414,6 +430,7 @@ const editClick = (unknown) => {
} }
}; };
//
const deleteClick = (unknown) => { const deleteClick = (unknown) => {
if (unknown) { if (unknown) {
togglePassword("delete"); togglePassword("delete");
@ -422,6 +439,64 @@ const deleteClick = (unknown) => {
} }
}; };
// ( )
const editComment = (comment) => {
if (comment.isEditTextarea) {
//
comment.isEditTextarea = false;
return;
}
if (unknown.value) {
toggleCommentPassword(comment, "edit");
} else {
comment.isEditTextarea = true;
}
// comments.value.forEach(c => {
// c.isEditTextarea = false;
// c.isCommentPassword = false;
// });
// if (comment.unknown) {
// comment.isCommentPassword = true;
// } else {
// comment.isEditTextarea = true;
// }
}
// ( )
const deleteComment = (comment) => {
if (unknown.value) {
if (comment.isEditTextarea) {
// ,
comment.isEditTextarea = false;
comment.isCommentPassword = true;
} else {
//
toggleCommentPassword(comment, "delete");
}
} else {
//
comments.value = comments.value.filter(c => c.commentId !== comment.commentId);
}
};
//
const toggleCommentPassword = (comment, button) => {
if (lastCommentClickedButton.value === button && comment.isCommentPassword) {
comment.isCommentPassword = false;
} else {
//
comments.value.forEach(c => (c.isCommentPassword = false));
//
comment.isCommentPassword = true;
}
lastCommentClickedButton.value = button;
};
const togglePassword = (button) => { const togglePassword = (button) => {
if (lastClickedButton.value === button) { if (lastClickedButton.value === button) {
isPassword.value = !isPassword.value; isPassword.value = !isPassword.value;
@ -431,13 +506,12 @@ const togglePassword = (button) => {
lastClickedButton.value = button; lastClickedButton.value = button;
}; };
//
const submitPassword = async () => { const submitPassword = async () => {
if (!password.value) { if (!password.value) {
passwordAlert.value = "비밀번호를 입력해주세요."; passwordAlert.value = "비밀번호를 입력해주세요.";
return; return;
} }
// console.log("📌 : submitPassword "); // console.log("📌 : submitPassword ");
try { try {
@ -476,6 +550,39 @@ const submitPassword = async () => {
} }
}; };
// ( )
const submitCommentPassword = async (comment, password) => {
if (!password) {
passwordCommentAlert.value = "비밀번호를 입력해주세요.";
return;
}
try {
const response = await axios.post(`board/comment/${comment.commentId}/password`, {
LOCCMTPWD: password,
LOCCMTSEQ: comment.commentId,
});
if (response.data.code === 200 && response.data.data === true) {
comment.isCommentPassword = false;
if (lastCommentClickedButton.value === "edit") {
comment.isEditTextarea = true;
// handleSubmitEdit(comment, comment.content);
} else if (lastCommentClickedButton.value === "delete") {
deleteReplyComment(comment)
}
lastCommentClickedButton.value = null;
} else {
passwordCommentAlert.value = "비밀번호가 일치하지 않습니다.";
}
} catch (error) {
passwordCommentAlert.value = "비밀번호가 일치하지 않습니다";
}
};
//
const deletePost = async () => { const deletePost = async () => {
if (confirm("정말 삭제하시겠습니까?")) { if (confirm("정말 삭제하시겠습니까?")) {
try { try {
@ -499,6 +606,53 @@ const deletePost = async () => {
} }
}; };
// ( )
const deleteReplyComment = async (comment) => {
if (!confirm("정말 이 댓글을 삭제하시겠습니까?")) return;
// console.log(" ID:", comment);
try {
const response = await axios.delete(`board/comment/${comment.commentId}`, {
data: { LOCCMTSEQ: comment.commentId }
});
// console.log(" :", response.data);
if (response.data.code === 200) {
// console.log(" !");
await fetchComments();
} else {
// console.log(" :", response.data.message);
alert("댓글 삭제에 실패했습니다.");
}
} catch (error) {
console.log("댓글 삭제 중 오류 발생:", error);
alert("댓글 삭제 중 오류가 발생했습니다.");
}
};
// ( )
const handleSubmitEdit = async (comment, editedContent) => {
try {
const response = await axios.put(`board/comment/${comment.commentId}`, {
LOCCMTSEQ: comment.commentId,
LOCCMTRPY: editedContent
});
//
comment.content = editedContent;
comment.isEditTextarea = false;
} catch (error) {
console.error("댓글 수정 중 오류 발생:", error);
}
};
// ( )
const handleCancelEdit = (comment) => {
console.log("BoardView.vue - 댓글 수정 취소:", comment);
comment.isEditTextarea = false;
};
// //
const handlePageChange = (page) => { const handlePageChange = (page) => {
if (page !== pagination.value.currentPage) { if (page !== pagination.value.currentPage) {

View File

@ -1,307 +1,304 @@
<template> <template>
<div class="vacation-management"> <div class="vacation-management">
<div class="container-xxl flex-grow-1 container-p-y"> <div class="container-xxl flex-grow-1 container-p-y">
<div class="card app-calendar-wrapper"> <div class="card app-calendar-wrapper">
<div class="row g-0"> <div class="row g-0">
<div class="col app-calendar-content"> <div class="col app-calendar-content">
<div class="card shadow-none border-0"> <div class="card shadow-none border-0">
<ProfileList <ProfileList
@profileClick="handleProfileClick" @profileClick="handleProfileClick"
:remainingVacationData="remainingVacationData" :remainingVacationData="remainingVacationData"
/> />
<div class="card-body w-75 p-3 align-self-center"> <div class="card-body w-75 p-3 align-self-center">
<VacationModal <!-- 모달에 필터링된 연차 목록 전달 -->
<VacationModal
v-if="isModalOpen" v-if="isModalOpen"
:isOpen="isModalOpen" :isOpen="isModalOpen"
:myVacations="myVacations" :myVacations="filteredMyVacations"
:receivedVacations="receivedVacations" :receivedVacations="filteredReceivedVacations"
:userColors="userColors" :userColors="userColors"
@close="isModalOpen = false" @close="isModalOpen = false"
/> />
<VacationGrantModal <VacationGrantModal
v-if="isGrantModalOpen" v-if="isGrantModalOpen"
:isOpen="isGrantModalOpen" :isOpen="isGrantModalOpen"
:targetUser="selectedUser" :targetUser="selectedUser"
:remainingQuota="remainingVacationData[selectedUser?.MEMBERSEQ] || 0" :remainingQuota="remainingVacationData[selectedUser?.MEMBERSEQ] || 0"
@close="isGrantModalOpen = false" @close="isGrantModalOpen = false"
@updateVacation="fetchRemainingVacation" @updateVacation="fetchRemainingVacation"
/> />
<full-calendar <full-calendar
ref="fullCalendarRef" ref="fullCalendarRef"
:options="calendarOptions" :options="calendarOptions"
class="flatpickr-calendar-only" class="flatpickr-calendar-only"
/> />
<HalfDayButtons <HalfDayButtons
@toggleHalfDay="toggleHalfDay" @toggleHalfDay="toggleHalfDay"
@addVacationRequests="saveVacationChanges" @addVacationRequests="saveVacationChanges"
/> />
</div>
</div> </div>
</div>
</div> </div>
</div> </div>
</div>
</div> </div>
</div>
</div> </div>
</template> </template>
<script setup> <script setup>
import FullCalendar from "@fullcalendar/vue3"; import { reactive, ref, onMounted, nextTick, computed } from "vue";
import dayGridPlugin from "@fullcalendar/daygrid"; import axios from "@api";
import interactionPlugin from "@fullcalendar/interaction"; import FullCalendar from "@fullcalendar/vue3";
import "flatpickr/dist/flatpickr.min.css"; import dayGridPlugin from "@fullcalendar/daygrid";
import "@/assets/css/app-calendar.css"; import interactionPlugin from "@fullcalendar/interaction";
import { reactive, ref, onMounted, nextTick } from "vue"; import "flatpickr/dist/flatpickr.min.css";
import axios from "@api"; import "@/assets/css/app-calendar.css";
import "bootstrap-icons/font/bootstrap-icons.css"; import "bootstrap-icons/font/bootstrap-icons.css";
import HalfDayButtons from "@c/button/HalfDayButtons.vue"; import HalfDayButtons from "@c/button/HalfDayButtons.vue";
import ProfileList from "@c/vacation/ProfileList.vue"; import ProfileList from "@c/vacation/ProfileList.vue";
import { useUserStore } from "@s/userList"; import VacationModal from "@c/modal/VacationModal.vue";
import VacationModal from "@c/modal/VacationModal.vue" import VacationGrantModal from "@c/modal/VacationGrantModal.vue";
import { useUserInfoStore } from "@s/useUserInfoStore"; import { useUserStore } from "@s/userList";
import VacationGrantModal from "@c/modal/VacationGrantModal.vue"; import { useUserInfoStore } from "@s/useUserInfoStore";
import { fetchHolidays } from "@c/calendar/holiday.js"; import { fetchHolidays } from "@c/calendar/holiday.js";
const userStore = useUserInfoStore(); const userStore = useUserInfoStore();
const userListStore = useUserStore(); const userListStore = useUserStore();
const userList = ref([]); const userList = ref([]);
const userColors = ref({}); const userColors = ref({});
const myVacations = ref([]); // const myVacations = ref([]); // " "
const receivedVacations = ref([]); // const receivedVacations = ref([]); // " "
const isModalOpen = ref(false); const isModalOpen = ref(false);
const remainingVacationData = ref({}); const remainingVacationData = ref({});
// ( )
const modalYear = ref(new Date().getFullYear());
const modalMonth = ref(String(new Date().getMonth() + 1).padStart(2, "0"));
const lastRemainingYear = ref(new Date().getFullYear());
const isGrantModalOpen = ref(false); const isGrantModalOpen = ref(false);
const selectedUser = ref(null); const selectedUser = ref(null);
// FullCalendar // FullCalendar
const fullCalendarRef = ref(null); const fullCalendarRef = ref(null);
const calendarEvents = ref([]); // FullCalendar (API + ) const calendarEvents = ref([]);
const selectedDates = ref(new Map()); // const selectedDates = ref(new Map());
const halfDayType = ref(null); const halfDayType = ref(null);
const vacationCodeMap = ref({}); // const vacationCodeMap = ref({});
const holidayDates = ref(new Set());
const fetchedEvents = ref([]);
// (YYYY-MM-DD ) ( ) const calendarOptions = reactive({
const holidayDates = ref(new Set()); plugins: [dayGridPlugin, interactionPlugin],
const fetchedEvents = ref([]); // API (, ) initialView: "dayGridMonth",
headerToolbar: {
left: "today",
center: "title",
right: "prev,next",
},
locale: "ko",
selectable: false,
dateClick: handleDateClick,
datesSet: handleMonthChange,
events: calendarEvents,
});
// FullCalendar (events calendarEvents ) onMounted(async () => {
const calendarOptions = reactive({ await userStore.userInfo();
plugins: [dayGridPlugin, interactionPlugin], await fetchRemainingVacation();
initialView: "dayGridMonth", });
headerToolbar: {
left: "today",
center: "title",
right: "prev,next",
},
locale: "ko",
selectable: false,
dateClick: handleDateClick,
datesSet: handleMonthChange,
events: calendarEvents,
});
onMounted(async () => { const fetchRemainingVacation = async () => {
await userStore.userInfo(); try {
await fetchRemainingVacation(); const response = await axios.get("vacation/remaining");
}); if (response.status === 200) {
remainingVacationData.value = response.data.data.reduce((acc, vacation) => {
const fetchRemainingVacation = async () => { acc[vacation.employeeId] = vacation.remainingQuota;
try { return acc;
const response = await axios.get("vacation/remaining"); }, {});
if (response.status === 200) {
remainingVacationData.value = response.data.data.reduce((acc, vacation) => {
acc[vacation.employeeId] = vacation.remainingQuota;
return acc;
}, {});
}
} catch (error) {
console.error("🚨 남은 연차 데이터를 불러오지 못했습니다:", error);
}
};
//
const handleProfileClick = async (user) => {
try {
if (user.MEMBERSEQ === userStore.user.id) {
//
const response = await axios.get(`vacation/history`);
if (response.status === 200 && response.data) {
myVacations.value = response.data.data.usedVacations || [];
receivedVacations.value = response.data.data.receivedVacations || [];
isModalOpen.value = true; //
isGrantModalOpen.value = false;
} else {
console.warn("❌ 연차 내역을 불러오지 못했습니다.");
} }
} else { } catch (error) {
// console.error("🚨 남은 연차 데이터를 불러오지 못했습니다:", error);
selectedUser.value = user;
isGrantModalOpen.value = true; //
isModalOpen.value = false;
} }
} catch (error) { };
console.error("🚨 연차 데이터 불러오기 실패:", error);
//
const handleProfileClick = async (user) => {
try {
if (user.MEMBERSEQ === userStore.user.id) {
const response = await axios.get(`vacation/history`);
if (response.status === 200 && response.data) {
myVacations.value = response.data.data.usedVacations || [];
receivedVacations.value = response.data.data.receivedVacations || [];
isModalOpen.value = true;
//
modalYear.value = new Date().getFullYear();
modalMonth.value = String(new Date().getMonth() + 1).padStart(2, "0");
isGrantModalOpen.value = false;
} else {
console.warn("❌ 연차 내역을 불러오지 못했습니다.");
}
} else {
selectedUser.value = user;
isGrantModalOpen.value = true;
isModalOpen.value = false;
}
} catch (error) {
console.error("🚨 연차 데이터 불러오기 실패:", error);
}
};
const fetchUserList = async () => {
try {
await userListStore.fetchUserList();
userList.value = userListStore.userList;
if (!userList.value.length) {
console.warn("📌 사용자 목록이 비어 있음!");
return;
}
userColors.value = {};
userList.value.forEach((user) => {
userColors.value[user.MEMBERSEQ] = user.usercolor || "#FFFFFF";
});
} catch (error) {
console.error("📌 사용자 목록 불러오기 오류:", error);
}
};
const fetchVacationCodes = async () => {
try {
const response = await axios.get("vacation/codes");
if (response.status === 200 && response.data) {
vacationCodeMap.value = response.data.data.reduce((acc, item) => {
acc[item.code] = item.name;
return acc;
}, {});
} else {
console.warn("❌ 공통 코드 데이터를 불러오지 못했습니다.");
}
} catch (error) {
console.error("🚨 공통 코드 API 호출 실패:", error);
}
};
const getVacationType = (typeCode) => {
return vacationCodeMap.value[typeCode] || "기타";
};
// computed: modalYear
const filteredMyVacations = computed(() => {
const filtered = myVacations.value.filter(vac => {
console.log(vac)
const year = vac.date ? vac.date.split("T")[0].substring(0, 4) : null;
console.log("vacation year:", year, "modalYear:", modalYear.value);
return year === String(modalYear.value);
});
console.log("filteredMyVacations:", filtered);
return filtered;
});
const filteredReceivedVacations = computed(() => {
return receivedVacations.value.filter(vac => {
console.log(
vac.date,
vac.date ? vac.date.split("T")[0].substring(0, 4) : null,
modalYear.value
);
return vac.date && vac.date.split("T")[0].substring(0, 4) === String(modalYear.value);
});
});
function updateCalendarEvents() {
const selectedEvents = Array.from(selectedDates.value)
.filter(([date, type]) => type !== "delete")
.map(([date, type]) => ({
title: getVacationType(type),
start: date,
backgroundColor: "rgb(113 212 243 / 76%)",
textColor: "#fff",
display: "background",
classNames: [getVacationTypeClass(type), "selected-event"]
}));
const filteredFetchedEvents = fetchedEvents.value.filter(event => {
if (event.saved) {
return selectedDates.value.get(event.start) !== "delete";
}
return true;
});
calendarEvents.value = [...filteredFetchedEvents, ...selectedEvents];
} }
};
const fetchUserList = async () => { const getVacationTypeClass = (type) => {
try { if (type === "700101") return "half-day-am";
await userListStore.fetchUserList(); if (type === "700102") return "half-day-pm";
userList.value = userListStore.userList; return "full-day";
};
if (!userList.value.length) { function handleDateClick(info) {
console.warn("📌 사용자 목록이 비어 있음!"); const clickedDateStr = info.dateStr;
const clickedDate = info.date;
const todayStr = new Date().toISOString().split("T")[0];
if (
clickedDate.getDay() === 0 ||
clickedDate.getDay() === 6 ||
holidayDates.value.has(clickedDateStr) ||
clickedDateStr < todayStr
) {
return; return;
} }
if (selectedDates.value.has(clickedDateStr)) {
userColors.value = {}; selectedDates.value.delete(clickedDateStr);
userList.value.forEach((user) => { updateCalendarEvents();
userColors.value[user.MEMBERSEQ] = user.usercolor || "#FFFFFF"; return;
}); }
} catch (error) { const unsentVacation = myVacations.value.find(
console.error("📌 사용자 목록 불러오기 오류:", error); (vac) => vac.LOCVACUDT && vac.LOCVACUDT.startsWith(clickedDateStr) && !vac.LOCVACRMM
} );
}; if (unsentVacation) {
selectedDates.value.set(clickedDateStr, "delete");
const fetchVacationCodes = async () => {
try {
const response = await axios.get("vacation/codes");
if (response.status === 200 && response.data) {
//
vacationCodeMap.value = response.data.data.reduce((acc, item) => {
acc[item.code] = item.name; // code key, name value
return acc;
}, {});
} else { } else {
console.warn("❌ 공통 코드 데이터를 불러오지 못했습니다."); const type = halfDayType.value
? (halfDayType.value === "AM" ? "700101" : "700102")
: "700103";
selectedDates.value.set(clickedDateStr, type);
} }
} catch (error) { halfDayType.value = null;
console.error("🚨 공통 코드 API 호출 실패:", error);
}
};
// 🔹 typeCode code
const getVacationType = (typeCode) => {
return vacationCodeMap.value[typeCode] || "기타";
};
function updateCalendarEvents() {
// ( ): type "delete"
const selectedEvents = Array.from(selectedDates.value)
.filter(([date, type]) => type !== "delete")
.map(([date, type]) => ({
title: getVacationType(type),
start: date,
backgroundColor: "rgb(113 212 243 / 76%)",
textColor: "#fff", //
display: "background",
classNames: [getVacationTypeClass(type), "selected-event"]
}));
// ,
//
const filteredFetchedEvents = fetchedEvents.value.filter(event => {
if (event.saved) { // saved
return selectedDates.value.get(event.start) !== "delete";
}
return true;
});
calendarEvents.value = [...filteredFetchedEvents, ...selectedEvents];
}
/**
* 반차 유형에 따라 클래스명 지정 (색상 변경 없이 영역만 조정)
*/
const getVacationTypeClass = (type) => {
if (type === "700101") return "half-day-am"; //
if (type === "700102") return "half-day-pm"; //
return "full-day"; //
};
/**
* 날짜 클릭 이벤트
* - 주말(, ) 공휴일은 클릭되지 않음
* - 클릭 해당 날짜를 selectedDates에 추가 또는 제거한 updateCalendarEvents() 호출
*/
function handleDateClick(info) {
const clickedDateStr = info.dateStr; // "YYYY-MM-DD"
const clickedDate = info.date;
const todayStr = new Date().toISOString().split("T")[0];
// , ,
if (
clickedDate.getDay() === 0 ||
clickedDate.getDay() === 6 ||
holidayDates.value.has(clickedDateStr) ||
clickedDateStr < todayStr
) {
return;
}
// :
if (selectedDates.value.has(clickedDateStr)) {
selectedDates.value.delete(clickedDateStr);
updateCalendarEvents(); updateCalendarEvents();
return;
} }
// ( ) function toggleHalfDay(type) {
const unsentVacation = myVacations.value.find( halfDayType.value = halfDayType.value === type ? null : type;
(vac) => vac.LOCVACUDT && vac.LOCVACUDT.startsWith(clickedDateStr) && !vac.LOCVACRMM
);
if (unsentVacation) {
// , "delete" (, )
selectedDates.value.set(clickedDateStr, "delete");
} else {
// : halfDayType
const type = halfDayType.value
? (halfDayType.value === "AM" ? "700101" : "700102")
: "700103";
selectedDates.value.set(clickedDateStr, type);
} }
halfDayType.value = null; async function fetchVacationData(year, month) {
updateCalendarEvents();
}
/**
* 오전/오후 반차 버튼 토글
*/
function toggleHalfDay(type) {
halfDayType.value = halfDayType.value === type ? null : type;
}
/**
* 백엔드에서 휴가 데이터를 가져와 이벤트로 변환
*/
async function fetchVacationData(year, month) {
try { try {
const response = await axios.get(`vacation/list/${year}/${month}`); const response = await axios.get(`vacation/list/${year}/${month}`);
if (response.status === 200) { if (response.status === 200) {
const vacationList = response.data; const vacationList = response.data;
// ( ) // modalYear
myVacations.value = vacationList.filter( if (modalYear.value !== year) {
(vac) => vac.MEMBERSEQ === userStore.user.id myVacations.value = vacationList.filter(
); (vac) => vac.MEMBERSEQ === userStore.user.id
// saved );
modalYear.value = year;
// modalMonth ( )
}
//
const events = vacationList const events = vacationList
.filter((vac) => !vac.LOCVACRMM) // () .filter((vac) => !vac.LOCVACRMM)
.map((vac) => { .map((vac) => {
let dateStr = vac.LOCVACUDT.split("T")[0]; let dateStr = vac.LOCVACUDT ? vac.LOCVACUDT.split("T")[0] : "";
let backgroundColor = userColors.value[vac.MEMBERSEQ] || "#FFFFFF"; let backgroundColor = userColors.value[vac.MEMBERSEQ] || "#FFFFFF";
return { return {
title: getVacationType(vac.LOCVACTYP), title: getVacationType(vac.LOCVACTYP),
start: dateStr, start: dateStr,
backgroundColor, backgroundColor,
classNames: [getVacationTypeClass(vac.LOCVACTYP)], classNames: [getVacationTypeClass(vac.LOCVACTYP)],
saved: true, // saved saved: true,
}; };
}) })
.filter((event) => event !== null); .filter((event) => event.start);
return events; return events;
} else { } else {
console.warn("📌 휴가 데이터를 불러오지 못함"); console.warn("📌 휴가 데이터를 불러오지 못함");
@ -313,94 +310,80 @@ halfDayType.value = halfDayType.value === type ? null : type;
} }
} }
/** async function saveVacationChanges() {
* 휴가 요청 추가 (선택된 날짜를 백엔드로 전송) const selectedDatesArray = Array.from(selectedDates.value);
*/ const vacationsToAdd = selectedDatesArray
async function saveVacationChanges() { .filter(([date, type]) => type !== "delete")
// : selectedDates type "delete" .filter(([date, type]) =>
const selectedDatesArray = Array.from(selectedDates.value); !myVacations.value.some(vac => vac.LOCVACUDT && vac.LOCVACUDT.startsWith(date)) ||
const vacationsToAdd = selectedDatesArray myVacations.value.some(vac => vac.LOCVACUDT && vac.LOCVACUDT.startsWith(date) && vac.LOCVACRMM)
.filter(([date, type]) => type !== "delete") )
.filter(([date, type]) => .map(([date, type]) => ({ date, type }));
// , (LOCVACRMM) const vacationsToDelete = myVacations.value
!myVacations.value.some(vac => vac.LOCVACUDT.startsWith(date)) || .filter(vac => {
myVacations.value.some(vac => vac.LOCVACUDT.startsWith(date) && vac.LOCVACRMM) if (!vac.LOCVACUDT) return false;
) const date = vac.LOCVACUDT.split("T")[0];
.map(([date, type]) => ({ date, type })); return selectedDates.value.get(date) === "delete" && !vac.LOCVACRMM;
})
// : , .map(vac => {
// "delete" const id = vac.LOCVACSEQ;
const vacationsToDelete = myVacations.value return typeof id === "number" ? Number(id) : id;
.filter(vac => { });
const date = vac.LOCVACUDT.split("T")[0]; try {
// "delete" const response = await axios.post("vacation/batchUpdate", {
return selectedDates.value.get(date) === "delete" && !vac.LOCVACRMM; add: vacationsToAdd,
}) delete: vacationsToDelete
.map(vac => { });
const id = vac.LOCVACSEQ ; if (response.data && response.data.status === "OK") {
return typeof id === "number" ? Number(id) : id; alert("✅ 휴가 변경 사항이 저장되었습니다.");
}); await fetchRemainingVacation();
const currentDate = fullCalendarRef.value.getApi().getDate();
try { await loadCalendarData(currentDate.getFullYear(), currentDate.getMonth() + 1);
const response = await axios.post("vacation/batchUpdate", { selectedDates.value.clear();
add: vacationsToAdd, updateCalendarEvents();
delete: vacationsToDelete } else {
}); alert("❌ 휴가 저장 중 오류가 발생했습니다.");
if (response.data && response.data.status === "OK") { }
alert("✅ 휴가 변경 사항이 저장되었습니다."); } catch (error) {
await fetchRemainingVacation(); console.error("🚨 휴가 변경 저장 실패:", error);
const currentDate = fullCalendarRef.value.getApi().getDate(); alert("❌ 휴가 저장 요청에 실패했습니다.");
await loadCalendarData(currentDate.getFullYear(), currentDate.getMonth() + 1);
// :
selectedDates.value.clear();
updateCalendarEvents();
} else {
alert("❌ 휴가 저장 중 오류가 발생했습니다.");
} }
} catch (error) {
console.error("🚨 휴가 변경 저장 실패:", error);
alert("❌ 휴가 저장 요청에 실패했습니다.");
} }
}
/** function handleMonthChange(viewInfo) {
* 달력 변경 호출 (FullCalendar의 datesSet 옵션) const currentDate = viewInfo.view.currentStart;
*/ const year = currentDate.getFullYear();
function handleMonthChange(viewInfo) { const month = String(currentDate.getMonth() + 1).padStart(2, "0");
const currentDate = viewInfo.view.currentStart; loadCalendarData(year, month);
const year = currentDate.getFullYear(); }
const month = String(currentDate.getMonth() + 1).padStart(2, "0");
loadCalendarData(year, month);
}
/** async function loadCalendarData(year, month) {
* 지정한 월의 데이터를 로드 (휴가, 공휴일 데이터를 병렬 요청) if (lastRemainingYear.value !== year) {
*/ await fetchRemainingVacation();
async function loadCalendarData(year, month) { lastRemainingYear.value = year;
fetchedEvents.value = []; }
const [vacationEvents, holidayEvents] = await Promise.all([ fetchedEvents.value = [];
fetchVacationData(year, month), const [vacationEvents, holidayEvents] = await Promise.all([
fetchHolidays(year, month), fetchVacationData(year, month),
]); fetchHolidays(year, month),
// Set ]);
holidayDates.value = new Set(holidayEvents.map((event) => event.start)); holidayDates.value = new Set(holidayEvents.map((event) => event.start));
fetchedEvents.value = [...vacationEvents, ...holidayEvents]; fetchedEvents.value = [...vacationEvents, ...holidayEvents];
updateCalendarEvents(); updateCalendarEvents();
await nextTick(); await nextTick();
fullCalendarRef.value.getApi().refetchEvents(); fullCalendarRef.value.getApi().refetchEvents();
} }
// onMounted(async () => {
onMounted(async () => { await fetchUserList();
await fetchUserList(); // await fetchVacationCodes();
await fetchVacationCodes(); const today = new Date();
const today = new Date(); const year = today.getFullYear();
const year = today.getFullYear(); const month = String(today.getMonth() + 1).padStart(2, "0");
const month = String(today.getMonth() + 1).padStart(2, "0"); await loadCalendarData(year, month);
await loadCalendarData(year, month); });
}); </script>
</script>
<style> <style>
/* 스타일 정의 */
</style> </style>

View File

@ -48,7 +48,7 @@
v-for="item in wordList" v-for="item in wordList"
:key="item.WRDDICSEQ" :key="item.WRDDICSEQ"
:item="item" :item="item"
:cateList="cateList" v-model:cateList="cateList"
@refreshWordList="getwordList" @refreshWordList="getwordList"
@updateChecked="updateCheckedItems" @updateChecked="updateCheckedItems"
/> />
@ -61,7 +61,7 @@
</div> </div>
<button v-if="isAnyChecked" class="btn btn-danger admin-del-btn"> <button v-if="isAnyChecked" class="btn btn-danger admin-del-btn" @click="deleteCheckedItems">
<i class="bx bx-trash"></i> <i class="bx bx-trash"></i>
</button> </button>
@ -209,18 +209,43 @@
const updateCheckedItems = (checked, id, name) => { const updateCheckedItems = (checked, id, name) => {
if (checked) { if (checked) {
checkedItems.value.push(id); checkedItems.value.push(id);
checkedNames.value.push(name); checkedNames.value.push(Number(name));
} else { } else {
checkedItems.value = checkedItems.value.filter(item => item !== id); checkedItems.value = checkedItems.value.filter(item => item !== id);
checkedNames.value = checkedNames.value.filter(item => item !== name); checkedNames.value = checkedNames.value.filter(item => item !== name);
} }
// name // name
console.log("현재 체크된 name 값:", checkedNames.value); // console.log(" name :", checkedNames.value);
}; };
const isAnyChecked = computed(() => checkedItems.value.length > 0); const isAnyChecked = computed(() => checkedItems.value.length > 0);
//
const deleteCheckedItems = () => {
// console.log(" name :", Object.values(checkedNames.value));
axios.patch('worddict/deleteword', {
idList: Object.values(checkedNames.value)
})
.then(res => {
if (res.data.status == 'OK') {
toastStore.onToast('용어 삭제가 완료되었습니다.', 's');
isWriteVisible.value = false;
getwordList();
//
checkedItems.value = [];
checkedNames.value = [];
}
})
.catch(error => {
console.error('삭제 요청 중 오류 발생:', error);
toastStore.onToast('오류가 발생했습니다. 다시 시도해주세요.', 'e');
});
};
</script> </script>
<style scoped> <style scoped>