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:
@@ -81,7 +81,7 @@ async function loadWorkers() {
|
||||
const selectWorker = document.getElementById('individualWorker');
|
||||
workers.forEach(worker => {
|
||||
const option = document.createElement('option');
|
||||
option.value = worker.worker_id;
|
||||
option.value = worker.user_id;
|
||||
option.textContent = `${worker.worker_name} (${worker.employment_status === 'employed' ? '재직' : '퇴사'})`;
|
||||
selectWorker.appendChild(option);
|
||||
});
|
||||
@@ -293,7 +293,7 @@ async function autoCalculateAnnualLeave() {
|
||||
}
|
||||
|
||||
// 작업자의 입사일 조회
|
||||
const worker = workers.find(w => w.worker_id == workerId);
|
||||
const worker = workers.find(w => w.user_id == workerId);
|
||||
if (!worker || !worker.hire_date) {
|
||||
showToast('작업자의 입사일 정보가 없습니다', 'error');
|
||||
return;
|
||||
@@ -308,7 +308,7 @@ async function autoCalculateAnnualLeave() {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
worker_id: workerId,
|
||||
user_id: workerId,
|
||||
hire_date: worker.hire_date,
|
||||
year: year
|
||||
})
|
||||
@@ -369,7 +369,7 @@ async function submitIndividualVacation() {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
worker_id: workerId,
|
||||
user_id: workerId,
|
||||
vacation_type_id: typeId,
|
||||
year: year,
|
||||
total_days: parseFloat(totalDays),
|
||||
@@ -520,7 +520,7 @@ async function previewBulkAllocation() {
|
||||
const hireDate = worker.hire_date;
|
||||
if (!hireDate) {
|
||||
return {
|
||||
worker_id: worker.worker_id,
|
||||
user_id: worker.user_id,
|
||||
worker_name: worker.worker_name,
|
||||
hire_date: '-',
|
||||
years_worked: '-',
|
||||
@@ -534,7 +534,7 @@ async function previewBulkAllocation() {
|
||||
const yearsWorked = calculateYearsWorked(hireDate, year);
|
||||
|
||||
return {
|
||||
worker_id: worker.worker_id,
|
||||
user_id: worker.user_id,
|
||||
worker_name: worker.worker_name,
|
||||
hire_date: hireDate,
|
||||
years_worked: yearsWorked,
|
||||
@@ -656,7 +656,7 @@ async function submitBulkAllocation() {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
worker_id: item.worker_id,
|
||||
user_id: item.user_id,
|
||||
hire_date: item.hire_date,
|
||||
year: year
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user