refactor: integrate software assets into unified schema and optimize backend API
This commit is contained in:
@@ -95,8 +95,7 @@ export function renderSwList(container: HTMLElement) {
|
||||
}
|
||||
|
||||
filtered.forEach((asset, idx) => {
|
||||
const mapping = state.masterData.swUsers.find(u => u.sw_id === asset.id);
|
||||
const assigned = mapping ? (mapping.userData || []).length : 0;
|
||||
const assigned = state.masterData.swUsers.filter(u => u.sw_id === asset.id).length;
|
||||
const qty = typeof asset.수량 === 'number' ? asset.수량 : parseInt(asset.수량||'0', 10);
|
||||
const avail = qty - assigned;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user