fix(tkuser): hire_date 지원 + 부서 팀장 타부서 선택 허용
- findAll()에 hire_date 추가, update()에 hire_date 처리 - 사용자 편집 모달에 입사일 input 추가 - 사용자 목록에 입사일 뱃지 표시 (미등록 시 주황 경고) - 부서 팀장 드롭다운: 전체 사용자 optgroup 방식으로 변경 - u.id → u.user_id 버그 수정 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -79,7 +79,7 @@ async function findById(userId) {
|
||||
async function findAll() {
|
||||
const db = getPool();
|
||||
const [rows] = await db.query(
|
||||
'SELECT user_id, username, name, department, department_id, role, system1_access, system2_access, system3_access, is_active, last_login, created_at FROM sso_users WHERE partner_company_id IS NULL ORDER BY user_id'
|
||||
'SELECT user_id, username, name, department, department_id, role, system1_access, system2_access, system3_access, is_active, last_login, created_at, hire_date FROM sso_users WHERE partner_company_id IS NULL ORDER BY user_id'
|
||||
);
|
||||
return rows;
|
||||
}
|
||||
@@ -108,6 +108,7 @@ async function update(userId, data) {
|
||||
if (data.system2_access !== undefined) { fields.push('system2_access = ?'); values.push(data.system2_access); }
|
||||
if (data.system3_access !== undefined) { fields.push('system3_access = ?'); values.push(data.system3_access); }
|
||||
if (data.is_active !== undefined) { fields.push('is_active = ?'); values.push(data.is_active); }
|
||||
if (data.hire_date !== undefined) { fields.push('hire_date = ?'); values.push(data.hire_date || null); }
|
||||
if (data.password) {
|
||||
fields.push('password_hash = ?');
|
||||
values.push(await hashPassword(data.password));
|
||||
|
||||
Reference in New Issue
Block a user