Implement global table sorting, dashboard UI enhancements, and secret cloud access
This commit is contained in:
@@ -11,7 +11,6 @@ export function renderSwDashboard(container: HTMLElement) {
|
||||
|
||||
let subCost2026 = 0;
|
||||
let permCost2026 = 0;
|
||||
let cloudCost2026 = 0;
|
||||
|
||||
const currentYear = new Date().getFullYear();
|
||||
|
||||
@@ -22,8 +21,8 @@ export function renderSwDashboard(container: HTMLElement) {
|
||||
const costByCat: Record<string, number> = {};
|
||||
categories.forEach(c => costByCat[c] = 0);
|
||||
|
||||
// 통합 SW 데이터
|
||||
const allSw = [...state.masterData.subSw, ...state.masterData.permSw, ...state.masterData.cloud];
|
||||
// 통합 SW 데이터 (클라우드 제외)
|
||||
const allSw = [...state.masterData.subSw, ...state.masterData.permSw];
|
||||
|
||||
allSw.forEach(sw => {
|
||||
const userMapping = state.masterData.swUsers.find(u => u.sw_id === sw.id);
|
||||
@@ -44,7 +43,6 @@ export function renderSwDashboard(container: HTMLElement) {
|
||||
if (sw.구매일 && sw.구매일.startsWith('2026')) {
|
||||
if (sw.type === '구독SW') subCost2026 += price;
|
||||
else if (sw.type === '영구SW') permCost2026 += price;
|
||||
else if (sw.type === '클라우드') cloudCost2026 += price;
|
||||
|
||||
if (costByCorp[sw.법인] !== undefined) costByCorp[sw.법인] += price;
|
||||
if (sw.분야 && costByCat[sw.분야] !== undefined) costByCat[sw.분야] += price;
|
||||
@@ -60,7 +58,6 @@ export function renderSwDashboard(container: HTMLElement) {
|
||||
const cost = Number(log.cost) || 0;
|
||||
if (asset.type === '구독SW') subCost2026 += cost;
|
||||
else if (asset.type === '영구SW') permCost2026 += cost;
|
||||
else if (asset.type === '클라우드') cloudCost2026 += cost;
|
||||
|
||||
if (costByCorp[asset.법인] !== undefined) costByCorp[asset.법인] += cost;
|
||||
if (asset.분야 && costByCat[asset.분야] !== undefined) costByCat[asset.분야] += cost;
|
||||
@@ -124,7 +121,7 @@ export function renderSwDashboard(container: HTMLElement) {
|
||||
|
||||
<h3 class="dashboard-section-title">2026년 누적 도입 비용 분석</h3>
|
||||
|
||||
<div style="display:grid; grid-template-columns: repeat(3, 1fr); gap:1.5rem; margin-bottom:1.5rem;">
|
||||
<div style="display:grid; grid-template-columns: repeat(2, 1fr); gap:1.5rem; margin-bottom:1.5rem;">
|
||||
<div class="dashboard-card" style="min-height:auto;">
|
||||
<span style="font-size:1rem; font-weight:700; color:var(--text-main);">구독 SW 누적 비용 (2026)</span>
|
||||
<div style="font-size: 0.8125rem; color:var(--text-muted); margin-bottom: 1rem;">갱신 및 추가 비용 합계</div>
|
||||
@@ -137,12 +134,6 @@ export function renderSwDashboard(container: HTMLElement) {
|
||||
<div style="font-size: 2rem; font-weight:700; color:#3b82f6;">₩ ${permCost2026.toLocaleString()}</div>
|
||||
<div style="width: 100%; height: 4px; background-color: #3b82f6; border-radius: 2px; margin-top: 0.5rem;"></div>
|
||||
</div>
|
||||
<div class="dashboard-card" style="min-height:auto;">
|
||||
<span style="font-size:1rem; font-weight:700; color:var(--text-main);">클라우드 누적 비용 (2026)</span>
|
||||
<div style="font-size: 0.8125rem; color:var(--text-muted); margin-bottom: 1rem;">월별 청구액 누적 합계</div>
|
||||
<div style="font-size: 2rem; font-weight:700; color:#f59e0b;">₩ ${cloudCost2026.toLocaleString()}</div>
|
||||
<div style="width: 100%; height: 4px; background-color: #f59e0b; border-radius: 2px; margin-top: 0.5rem;"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user