refactor: integrate software assets into unified schema and optimize backend API
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user