refactor: integrate software assets into unified schema and optimize backend API

This commit is contained in:
2026-04-30 09:34:29 +09:00
parent 68cb5f9767
commit 2af79cdad3
6 changed files with 363 additions and 451 deletions

View File

@@ -25,8 +25,7 @@ export function renderSwDashboard(container: HTMLElement) {
const allSw = [...state.masterData.subSw, ...state.masterData.permSw];
allSw.forEach(sw => {
const userMapping = state.masterData.swUsers.find(u => u.sw_id === sw.id);
const assigned = userMapping ? (userMapping.userData ? userMapping.userData.length : 0) : 0;
const assigned = state.masterData.swUsers.filter(u => u.sw_id === sw.id).length;
const qty = typeof sw. === 'number' ? sw.수량 : parseInt(sw.||'0', 10);
const priceStr = sw. ? String(sw.).replace(/,/g, '') : '0';
const price = parseInt(priceStr, 10) || 0;