Compare commits
2
Commits
dc74c07ef4
...
0ce35d4c38
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ce35d4c38 | ||
|
|
f220904742 |
@@ -3,9 +3,9 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev -p 3003",
|
||||
"dev": "next dev -p 3004",
|
||||
"build": "next build",
|
||||
"start": "next start -p 3003",
|
||||
"start": "next start -p 3004",
|
||||
"lint": "next lint",
|
||||
"lint:fsd": "steiger ."
|
||||
},
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"name": "as",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev -p 3004",
|
||||
"build": "next build",
|
||||
"start": "next start -p 3004",
|
||||
"lint": "next lint",
|
||||
"lint:fsd": "steiger .",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:coverage": "vitest run --coverage",
|
||||
"test:e2e": "playwright test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@common/assets": "workspace:*",
|
||||
"@common/auth": "workspace:*",
|
||||
"@common/components": "workspace:*",
|
||||
"@common/network": "workspace:*",
|
||||
"@dnd-kit/core": "^6.3.1",
|
||||
"@dnd-kit/sortable": "^10.0.0",
|
||||
"@dnd-kit/utilities": "^3.2.2",
|
||||
"@faker-js/faker": "^9.9.0",
|
||||
"@frontend-opensource/use-react-hooks": "^1.1.4",
|
||||
"@hookform/resolvers": "^4.1.3",
|
||||
"@radix-ui/react-tooltip": "^1.2.8",
|
||||
"@tanstack/react-query": "^5.75.5",
|
||||
"@tanstack/react-query-devtools": "^5.75.5",
|
||||
"@tanstack/react-table": "^8.21.2",
|
||||
"axios": "^1.8.1",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"dayjs": "^1.11.13",
|
||||
"js-cookie": "^3.0.5",
|
||||
"lucide-react": "^0.474.0",
|
||||
"next": "15.5.18",
|
||||
"react-hook-form": "^7.54.2",
|
||||
"tus-js-client": "^4.3.1",
|
||||
"zod": "^3.24.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3",
|
||||
"@hookform/devtools": "^4.4.0",
|
||||
"@playwright/test": "^1.61.1",
|
||||
"@testing-library/jest-dom": "^7.0.1",
|
||||
"@testing-library/react": "^16.3.3",
|
||||
"@types/js-cookie": "^3.0.6",
|
||||
"@vitejs/plugin-react": "^4.7.0",
|
||||
"@vitejs/plugin-react-oxc": "^0.4.3",
|
||||
"eslint": "^9.0.0",
|
||||
"eslint-config-next": "15.3.8",
|
||||
"eslint-plugin-react-hooks": "^5.0.0",
|
||||
"jsdom": "^30.1.2",
|
||||
"postcss": "^8.4.49",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier-plugin-tailwindcss": "^0.6.11",
|
||||
"steiger": "^0.5.11",
|
||||
"tailwindcss": "^3.4.14",
|
||||
"typescript": "^5.7.2",
|
||||
"vite": "^8.3.3",
|
||||
"vitest": "^5.0.3"
|
||||
}
|
||||
}
|
||||
@@ -6,8 +6,11 @@ export function hasCurrentUserPendingApprovalRequest(
|
||||
): boolean {
|
||||
if (!currentUserUuid) return false;
|
||||
|
||||
const normalizedUserUuid = currentUserUuid.toLowerCase();
|
||||
return list.some(
|
||||
(row) => row.aprvrUuid === currentUserUuid && row.atrzPrgrsSttsComCd === "ATRZ_PRGRS_002",
|
||||
(row) =>
|
||||
row.aprvrUuid?.toLowerCase() === normalizedUserUuid &&
|
||||
row.atrzPrgrsSttsComCd === "ATRZ_PRGRS_002",
|
||||
);
|
||||
}
|
||||
|
||||
@@ -17,7 +20,10 @@ export function findCurrentUserPendingApprovalRequest(
|
||||
): ElaprDocPrgrsResponseDto | undefined {
|
||||
if (!currentUserUuid) return undefined;
|
||||
|
||||
const normalizedUserUuid = currentUserUuid.toLowerCase();
|
||||
return list?.find(
|
||||
(row) => row.aprvrUuid === currentUserUuid && row.atrzPrgrsSttsComCd === "ATRZ_PRGRS_002",
|
||||
(row) =>
|
||||
row.aprvrUuid?.toLowerCase() === normalizedUserUuid &&
|
||||
row.atrzPrgrsSttsComCd === "ATRZ_PRGRS_002",
|
||||
);
|
||||
}
|
||||
|
||||
@@ -201,13 +201,14 @@ function FloatingActionButtons({
|
||||
userInfo?.userUnqId,
|
||||
);
|
||||
const currentUserPrgrsRow = elaprPrgrsForPending.find(
|
||||
(row) => row.aprvrUuid === userInfo?.userUnqId,
|
||||
(row) => row.aprvrUuid?.toLowerCase() === userInfo?.userUnqId?.toLowerCase(),
|
||||
);
|
||||
const userPendingPrgrs = elaprPrgrsForPending.find(
|
||||
(row) =>
|
||||
row.aprvrUuid === userInfo?.userUnqId &&
|
||||
row.aprvrUuid?.toLowerCase() === userInfo?.userUnqId?.toLowerCase() &&
|
||||
row.atrzPrgrsSttsComCd === "ATRZ_PRGRS_002",
|
||||
);
|
||||
const userBranchId = userPendingPrgrs?.branchId ?? currentUserPrgrsRow?.branchId;
|
||||
const userBranchSeCd = (userPendingPrgrs?.branchSeCd ?? currentUserPrgrsRow?.branchSeCd) as
|
||||
| "SP"
|
||||
| "SF"
|
||||
@@ -255,7 +256,10 @@ function FloatingActionButtons({
|
||||
if (!isForkJoin || !userBranchSeCd) return undefined;
|
||||
|
||||
// 1. elaprBranchList API 응답에서 사용자 브랜치 상태 확인
|
||||
const matchedBranch = elaprBranchList.find((b) => b.branchSeCd === userBranchSeCd);
|
||||
// 현재 결재선(2차 차수 등)의 고유 branchId로 우선 매칭하고, 없으면 findLast로 최신 차수 브랜치 매칭
|
||||
const matchedBranch = userBranchId
|
||||
? elaprBranchList.find((b) => b.branchId === userBranchId)
|
||||
: elaprBranchList.findLast((b) => b.branchSeCd === userBranchSeCd);
|
||||
if (matchedBranch?.branchSttsCd) {
|
||||
return matchedBranch.branchSttsCd;
|
||||
}
|
||||
@@ -281,7 +285,15 @@ function FloatingActionButtons({
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}, [elaprBranchList, elaprPrgrsForPending, isForkJoin, prgrsSttsComCd, supplementDmndBranch, userBranchSeCd]);
|
||||
}, [
|
||||
elaprBranchList,
|
||||
elaprPrgrsForPending,
|
||||
isForkJoin,
|
||||
prgrsSttsComCd,
|
||||
supplementDmndBranch,
|
||||
userBranchId,
|
||||
userBranchSeCd,
|
||||
]);
|
||||
|
||||
const isBranchInProgress =
|
||||
isForkJoin && userBranchSttsCd === "IN_PROGRESS" && dtlInstCd === "ROLE_USER01";
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ module.exports = {
|
||||
cwd: './apps/as',
|
||||
|
||||
script: 'node_modules/next/dist/bin/next',
|
||||
args: 'start -p 3003',
|
||||
args: 'start -p 3004',
|
||||
|
||||
error_file: './logs/cm-error.log',
|
||||
out_file: './logs/cm-out.log',
|
||||
|
||||
Reference in New Issue
Block a user