feat: 대시보드 구분선 디자인 전환, 폰트 확대 및 버그 수정

This commit is contained in:
2026-06-12 08:49:04 +09:00
parent 0c1977f707
commit 8a3727ea61
22 changed files with 2238 additions and 1813 deletions

View File

@@ -11,6 +11,7 @@ export interface MasterAssetData {
network: any[];
survey: any[];
pcParts: any[];
partsMaster: any[];
equipment: any[];
officeSupplies: any[];
swInternal: any[];
@@ -41,6 +42,7 @@ export interface AppState {
masterData: MasterAssetData;
activeCharts: any[];
currentUserRole: 'admin' | 'user';
listFilters?: Record<string, any>;
}
// 초기 상태
@@ -50,10 +52,11 @@ export const state: AppState = {
viewMode: 'location',
activeCharts: [],
currentUserRole: 'user',
listFilters: {},
masterData: {
users: [],
pc: [], server: [], storage: [], network: [],
survey: [], pcParts: [], equipment: [], officeSupplies: [],
survey: [], pcParts: [], partsMaster: [], equipment: [], officeSupplies: [],
swInternal: [], swExternal: [], cloud: [], domain: [],
cost: [], vip: [],
subSw: [], permSw: [],
@@ -160,3 +163,69 @@ export async function deleteAsset(category: string, assetId: string) {
}
return false;
}
export async function savePartsMaster(component: any) {
try {
const url = `${API_BASE_URL}/api/hardware-components/save`;
const response = await fetch(url, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(component)
});
if (response.ok) {
await loadMasterDataFromDB(); // 전역 상태 갱신
return true;
}
} catch (err) {
console.error('부품 마스터 저장 실패:', err);
}
return false;
}
export async function deletePartsMaster(id: number) {
try {
const url = `${API_BASE_URL}/api/hardware-components/${id}`;
const response = await fetch(url, { method: 'DELETE' });
if (response.ok) {
await loadMasterDataFromDB(); // 전역 상태 갱신
return true;
}
} catch (err) {
console.error('부품 마스터 삭제 실패:', err);
}
return false;
}
export async function saveSystemUser(user: any) {
try {
const url = `${API_BASE_URL}/api/system-users/save`;
const response = await fetch(url, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(user)
});
if (response.ok) {
await loadMasterDataFromDB(); // 전역 상태 갱신
return true;
}
} catch (err) {
console.error('사용자 정보 저장 실패:', err);
}
return false;
}
export async function deleteSystemUser(id: string) {
try {
const url = `${API_BASE_URL}/api/system-users/${id}`;
const response = await fetch(url, { method: 'DELETE' });
if (response.ok) {
await loadMasterDataFromDB(); // 전역 상태 갱신
return true;
}
} catch (err) {
console.error('사용자 정보 삭제 실패:', err);
}
return false;
}