From d1378d127a954bc95a52babb194ab2ea78ea95e3 Mon Sep 17 00:00:00 2001 From: JooWangi Date: Mon, 29 Jun 2026 10:03:07 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20PC=20=EB=93=B1=EA=B8=89=20=EB=B1=83?= =?UTF-8?q?=EC=A7=80=20=EC=83=89=EC=83=81=20CSS=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EB=B0=8F=20Win11=20=EB=B6=88=EA=B0=80=20PC=20=EA=B5=90?= =?UTF-8?q?=EC=B2=B4=20=EB=8C=80=EC=83=81=20=EB=93=B1=EA=B8=89=20=EA=B0=95?= =?UTF-8?q?=EC=A0=9C=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.js | 18 +- src/components/Modal/JobSpecModal.ts | 219 ++----- src/components/Modal/UserModal.ts | 128 ++-- src/core/filterHandler.ts | 93 ++- src/core/utils.ts | 7 +- src/styles/common.css | 772 +++++++++++++++++------- src/styles/dashboard.css | 835 +++++++++++++------------- src/views/Dashboard/SwDashboard.ts | 50 +- src/views/List/PartsMasterListView.ts | 80 +-- src/views/List/UserListView.ts | 5 +- 10 files changed, 1263 insertions(+), 944 deletions(-) diff --git a/server.js b/server.js index 18a5d95..29ec757 100644 --- a/server.js +++ b/server.js @@ -41,11 +41,19 @@ const pool = mysql.createPool({ ram_standard VARCHAR(100), gpu_standard VARCHAR(100), min_score INT DEFAULT 0, + required_grade VARCHAR(50) DEFAULT '중급', remarks TEXT, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; `); + + // 테이블이 이미 존재할 경우를 대비하여 required_grade 컬럼 안전 추가 + try { + await connection.query("ALTER TABLE job_spec_standards ADD COLUMN required_grade VARCHAR(50) DEFAULT '중급'"); + } catch (err) { + // 이미 컬럼이 존재하면 에러가 나므로 통과합니다. + } console.log('✅ job_spec_standards table verification completed.'); } catch (err) { console.error('❌ Failed to verify/create job_spec_standards table:', err); @@ -586,19 +594,19 @@ app.get('/api/job-specs', async (req, res) => { // 6.7.2. Save Job Spec Standard (Add or Update) app.post('/api/job-specs/save', async (req, res) => { - const { id, job_name, cpu_standard, ram_standard, gpu_standard, min_score, remarks } = req.body; + const { id, job_name, cpu_standard, ram_standard, gpu_standard, min_score, required_grade, remarks } = req.body; let connection; try { connection = await pool.getConnection(); if (id) { await connection.query( - 'UPDATE job_spec_standards SET job_name = ?, cpu_standard = ?, ram_standard = ?, gpu_standard = ?, min_score = ?, remarks = ? WHERE id = ?', - [job_name, cpu_standard, ram_standard, gpu_standard, min_score, remarks, id] + 'UPDATE job_spec_standards SET job_name = ?, cpu_standard = ?, ram_standard = ?, gpu_standard = ?, min_score = ?, required_grade = ?, remarks = ? WHERE id = ?', + [job_name, cpu_standard || '', ram_standard || '', gpu_standard || '', min_score || 0, required_grade || '중급', remarks || '', id] ); } else { await connection.query( - 'INSERT INTO job_spec_standards (job_name, cpu_standard, ram_standard, gpu_standard, min_score, remarks) VALUES (?, ?, ?, ?, ?, ?)', - [job_name, cpu_standard, ram_standard, gpu_standard, min_score, remarks] + 'INSERT INTO job_spec_standards (job_name, cpu_standard, ram_standard, gpu_standard, min_score, required_grade, remarks) VALUES (?, ?, ?, ?, ?, ?, ?)', + [job_name, cpu_standard || '', ram_standard || '', gpu_standard || '', min_score || 0, required_grade || '중급', remarks || ''] ); } res.json({ success: true }); diff --git a/src/components/Modal/JobSpecModal.ts b/src/components/Modal/JobSpecModal.ts index 336b384..3a9179e 100644 --- a/src/components/Modal/JobSpecModal.ts +++ b/src/components/Modal/JobSpecModal.ts @@ -10,93 +10,47 @@ class JobSpecModal extends BaseModal { } protected renderFrameHTML(): string { - const sharedStyle = 'height: 38px !important; box-sizing: border-box !important; font-size: 13px; margin: 0;'; - const inputStyle = sharedStyle; - return `