merge: remote main updates into ux_setting with style preservation

- Resolved conflicts in state.ts, HwDashboard.ts, ListFactory.ts, and PartsMasterListView.ts
- Prioritized latest functional logic from main branch (Job Spec mapping, Matrix calculations)
- Maintained Vercel-inspired UI styling and unified CSS classes from ux_setting branch
- Synchronized PC status toggle visibility rules with latest main branch changes
This commit is contained in:
2026-06-17 13:08:59 +09:00
10 changed files with 1135 additions and 160 deletions

View File

@@ -160,6 +160,16 @@ export const PAGE_DESCRIPTIONS: Record<string, { title: string; description: str
title: '임직원 사용자 관리',
description: 'IT 자산 할당 및 관리의 기준이 되는 사내 임직원(사용자) 정보를 데이터베이스 기반으로 직접 등록하고 수정합니다.',
icon: 'users'
},
'부품 마스터': {
title: '부품 표준 정보 관리',
description: 'PC 사양 적정성 평가의 기준이 되는 부품 표준 정보 및 등급별 감점 점수를 관리합니다.',
icon: 'cpu'
},
'직무별 기준 사양': {
title: '직무별 기준 사양 관리',
description: 'BIM 모델러, 개발자, 엔지니어 등 사내 직무별 권장 하드웨어 기준 및 성능 합격 점수를 관리합니다.',
icon: 'sliders'
}
};

View File

@@ -28,7 +28,10 @@ export const state: AppState = {
swInternal: [], swExternal: [], cloud: [], domain: [],
cost: [], vip: [],
hw: [], sw: [],
swUsers: [], logs: []
swUsers: [], logs: [],
jobSpecs: [],
subSw: [],
permSw: []
}
};
@@ -46,6 +49,7 @@ export async function loadMasterDataFromDB() {
state.masterData = {
...state.masterData,
...data,
jobSpecs: data.jobSpecs || [],
logs: (data.logs || []).map((l: any) => ({
...l,
assetId: l.asset_id || l.assetId,
@@ -196,3 +200,37 @@ export async function deleteSystemUser(id: string) {
}
return false;
}
export async function saveJobSpec(spec: any) {
try {
const url = `${API_BASE_URL}/api/job-specs/save`;
const response = await fetch(url, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(spec)
});
if (response.ok) {
await loadMasterDataFromDB(); // 전역 상태 갱신
return true;
}
} catch (err) {
console.error('직무별 기준 사양 저장 실패:', err);
}
return false;
}
export async function deleteJobSpec(id: number) {
try {
const url = `${API_BASE_URL}/api/job-specs/${id}`;
const response = await fetch(url, { method: 'DELETE' });
if (response.ok) {
await loadMasterDataFromDB(); // 전역 상태 갱신
return true;
}
} catch (err) {
console.error('직무별 기준 사양 삭제 실패:', err);
}
return false;
}

View File

@@ -288,11 +288,12 @@ export function calculatePcScoreDeductive(cpu: string, ram: string, gpu: string,
/**
* 성능 점수 기준 등급 뱃지 메타 정보 가져오기
*/
export function getPcGrade(score: number): { name: string; class: string; color: string } {
export function getPcGrade(score: number, isWin11Incompatible?: boolean): { name: string; class: string; color: string } {
if (score >= 85) return { name: '최상급', class: 'b-purple', color: '#7C3AED' };
if (score >= 70) return { name: '상급', class: 'b-primary', color: '#4F46E5' };
if (score >= 40) return { name: '중급', class: 'b-green', color: '#10B981' };
return { name: '보급', class: 'b-yellow', color: '#F59E0B' };
if (score >= 20 && !isWin11Incompatible) return { name: '보급', class: 'b-yellow', color: '#F59E0B' };
return { name: '교체 대상', class: 'badge-danger', color: '#EF4444' };
}
/**