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:
@@ -147,7 +147,7 @@ userForm?.addEventListener('submit', async e => {
|
||||
password: document.getElementById('password').value.trim(),
|
||||
name: document.getElementById('name').value.trim(),
|
||||
access_level: document.getElementById('access_level').value,
|
||||
worker_id: document.getElementById('worker_id').value || null
|
||||
user_id: document.getElementById('user_id').value || null
|
||||
};
|
||||
|
||||
try {
|
||||
@@ -206,13 +206,13 @@ async function loadUsers() {
|
||||
|
||||
list.forEach(item => {
|
||||
item.access_level = accessLabels[item.access_level] || item.access_level;
|
||||
item.worker_id = item.worker_id || '-';
|
||||
item.user_id = item.user_id || '-';
|
||||
|
||||
// 행 생성
|
||||
const tr = document.createElement('tr');
|
||||
|
||||
// 데이터 컬럼
|
||||
['user_id', 'username', 'name', 'access_level', 'worker_id'].forEach(key => {
|
||||
['user_id', 'username', 'name', 'access_level', 'user_id'].forEach(key => {
|
||||
const td = document.createElement('td');
|
||||
td.textContent = item[key] || '-';
|
||||
tr.appendChild(td);
|
||||
@@ -267,7 +267,7 @@ async function loadUsers() {
|
||||
}
|
||||
|
||||
async function loadWorkerOptions() {
|
||||
const select = document.getElementById('worker_id');
|
||||
const select = document.getElementById('user_id');
|
||||
if (!select) return;
|
||||
|
||||
try {
|
||||
@@ -289,8 +289,8 @@ async function loadWorkerOptions() {
|
||||
if (Array.isArray(workers)) {
|
||||
workers.forEach(w => {
|
||||
const opt = document.createElement('option');
|
||||
opt.value = w.worker_id;
|
||||
opt.textContent = `${w.worker_name} (${w.worker_id})`;
|
||||
opt.value = w.user_id;
|
||||
opt.textContent = `${w.worker_name} (${w.user_id})`;
|
||||
select.appendChild(opt);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user