refactor: worker_id → user_id 전체 마이그레이션 (Phase 1-4)
sso_users.user_id를 단일 식별자로 통합. JWT에서 worker_id 제거, department_id/is_production 추가. 백엔드 15개 모델, 11개 컨트롤러, 4개 서비스, 7개 라우트, 프론트엔드 32+ JS/11+ HTML 변환. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -255,11 +255,11 @@ function analyzeDashboardData() {
|
||||
// 작업자별 데이터 그룹화
|
||||
const workerWorkData = {};
|
||||
workData.forEach(work => {
|
||||
const workerId = work.worker_id;
|
||||
if (!workerWorkData[workerId]) {
|
||||
workerWorkData[workerId] = [];
|
||||
const userId = work.user_id;
|
||||
if (!workerWorkData[userId]) {
|
||||
workerWorkData[userId] = [];
|
||||
}
|
||||
workerWorkData[workerId].push(work);
|
||||
workerWorkData[userId].push(work);
|
||||
});
|
||||
|
||||
// 전체 통계 계산
|
||||
@@ -272,7 +272,7 @@ function analyzeDashboardData() {
|
||||
|
||||
// 작업자별 상세 분석 (개선된 버전)
|
||||
const workerAnalysis = workers.map(worker => {
|
||||
const workerWorks = workerWorkData[worker.worker_id] || [];
|
||||
const workerWorks = workerWorkData[worker.user_id] || [];
|
||||
const workerHours = workerWorks.reduce((sum, work) => sum + parseFloat(work.work_hours || 0), 0);
|
||||
|
||||
// 작업 유형 분석 (실제 이름으로)
|
||||
@@ -455,7 +455,7 @@ function createWorkerRow(worker) {
|
||||
<div class="update-time ${updateClass}">${updateTimeText}</div>
|
||||
</td>
|
||||
<td>
|
||||
<button class="detail-btn" onclick="showWorkerDetailSafe('${worker.worker_id}')">
|
||||
<button class="detail-btn" onclick="showWorkerDetailSafe('${worker.user_id}')">
|
||||
📋 상세
|
||||
</button>
|
||||
</td>
|
||||
@@ -479,7 +479,7 @@ function formatDateTime(date) {
|
||||
// 작업자 상세 모달 표시 (안전한 버전)
|
||||
function showWorkerDetailSafe(workerId) {
|
||||
// 현재 분석된 데이터에서 해당 작업자 찾기
|
||||
const worker = filteredWorkData.find(w => w.worker_id == workerId);
|
||||
const worker = filteredWorkData.find(w => w.user_id == workerId);
|
||||
if (!worker) {
|
||||
showMessage('작업자 정보를 찾을 수 없습니다.', 'error');
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user