feat: 자산 관리 가이드 추가 및 테이블 스타일 개선

This commit is contained in:
2026-04-22 16:32:57 +09:00
parent fca9f5caf8
commit fdc29b23c1
22 changed files with 1309 additions and 131 deletions

View File

@@ -1,5 +1,6 @@
import { state } from '../../core/state';
import { openSwModal } from '../../components/Modal/SWModal';
import { formatPrice } from '../../core/utils';
import { createIcons, Cloud, CreditCard, DollarSign } from 'lucide';
export function renderCloudList(container: HTMLElement) {
@@ -93,7 +94,7 @@ export function renderCloudList(container: HTMLElement) {
<td>${asset.||''}</td>
<td style="text-align:center;">${paymentBadge}</td>
<td style="text-align:center;">${asset. ? asset. + '일' : ''}</td>
<td style="text-align:right; font-weight:600;">${asset. ? Number(asset.).toLocaleString() : '0'}</td>
<td style="text-align:right; font-weight:600;">${asset. ? '₩ ' + formatPrice(asset.) : '0'}</td>
<td>${asset.||''}</td>
`;

View File

@@ -1,6 +1,6 @@
import { state } from '../../core/state';
import { openHwModal } from '../../components/Modal/HWModal';
import { formatInline, sortAssets } from '../../core/utils';
import { formatInline, sortAssets, formatPrice } from '../../core/utils';
import { createIcons, RefreshCcw } from 'lucide';
export function renderEquipmentList(container: HTMLElement) {
@@ -65,7 +65,7 @@ export function renderEquipmentList(container: HTMLElement) {
<td>${formatInline(asset.)}</td>
<td>${formatInline(asset._정 || asset.)}</td>
<td>${asset.||''}</td>
<td>${asset.||''}</td>
<td>${formatPrice(asset.)}</td>
<td><button class="btn btn-outline btn-sm">수정</button></td>
`;
tr.addEventListener('click', (e) => { if (!(e.target as HTMLElement).closest('button')) openHwModal(asset, 'view'); });

View File

@@ -1,6 +1,6 @@
import { state } from '../../core/state';
import { openHwModal } from '../../components/Modal/HWModal';
import { formatInline, sortAssets } from '../../core/utils';
import { formatInline, sortAssets, formatPrice } from '../../core/utils';
import { createIcons, RefreshCcw } from 'lucide';
export function renderMobileList(container: HTMLElement) {
@@ -65,7 +65,7 @@ export function renderMobileList(container: HTMLElement) {
<td>${formatInline(asset.)}</td>
<td>${formatInline(asset._정 || asset.)}</td>
<td>${asset.||''}</td>
<td>${asset.||''}</td>
<td>${formatPrice(asset.)}</td>
<td><button class="btn btn-outline btn-sm">수정</button></td>
`;
tr.addEventListener('click', (e) => { if (!(e.target as HTMLElement).closest('button')) openHwModal(asset, 'view'); });

View File

@@ -1,6 +1,6 @@
import { state } from '../../core/state';
import { openPcModal } from '../../components/Modal/PCModal';
import { formatInline, sortAssets } from '../../core/utils';
import { formatInline, sortAssets, formatPrice } from '../../core/utils';
import { createIcons, Paperclip, RefreshCcw } from 'lucide';
export function renderPcList(container: HTMLElement) {
@@ -70,7 +70,7 @@ export function renderPcList(container: HTMLElement) {
<td>${asset.RAM||''}</td>
<td>${formatInline(storage)}</td>
<td>${asset.||''}</td>
<td>${asset.||''}</td>
<td>${formatPrice(asset.)}</td>
<td style="text-align:center;">${asset. ? '<i data-lucide="paperclip" class="text-primary"></i>' : '-'}</td>
<td><button class="btn btn-outline btn-sm">수정</button></td>
`;

View File

@@ -1,7 +1,7 @@
import { state } from '../../core/state';
import { openSwModal } from '../../components/Modal/SWModal';
import { openSwUserModal } from '../../components/Modal/SWUserModal';
import { sortAssets } from '../../core/utils';
import { sortAssets, formatPrice } from '../../core/utils';
import { CORP_LIST } from '../../components/Modal/SharedData';
import { generateOptionsHTML } from '../../components/Modal/ModalUtils';
import { createIcons, Edit2, Users, RefreshCcw } from 'lucide';
@@ -28,7 +28,7 @@ export function renderSwList(container: HTMLElement) {
</select>
</div>
<div class="search-item">
<label>구매법인</label>
<label>법인</label>
<select id="filter-corp">${generateOptionsHTML(CORP_LIST, '', true)}</select>
</div>
<button id="btn-reset-filters" class="btn btn-outline btn-reset">
@@ -46,11 +46,12 @@ export function renderSwList(container: HTMLElement) {
<th style="text-align:center;">No.</th>
<th style="text-align:center;">상태</th>
<th style="text-align:center;">분야</th>
<th style="text-align:center;">구매법인</th>
<th style="text-align:center;">법인</th>
<th style="text-align:center;">부서</th>
<th style="text-align:center;">제품명</th>
<th style="text-align:center;">구매일</th>
${isSub ? '<th style="text-align:center;">구독일</th>' : ''}
<th style="text-align:center;">시작일</th>
<th style="text-align:center;">만료일</th>
<th style="text-align:center;">금액</th>
<th style="text-align:center;">수량</th>
<th style="text-align:center;">사용가능</th>
@@ -82,7 +83,7 @@ export function renderSwList(container: HTMLElement) {
tbody.innerHTML = '';
if (filtered.length === 0) {
tbody.innerHTML = `<tr><td colspan="${isSub ? 12 : 11}" style="text-align:center; padding: 3rem; color: var(--text-muted);">검색 결과가 없습니다.</td></tr>`;
tbody.innerHTML = `<tr><td colspan="13" style="text-align:center; padding: 3rem; color: var(--text-muted);">검색 결과가 없습니다.</td></tr>`;
return;
}
@@ -94,9 +95,8 @@ export function renderSwList(container: HTMLElement) {
let statusHtml = '';
if (isSub) {
let isExpired = false;
if (asset.) {
const parts = asset..split('~');
const endDateStr = parts[parts.length - 1].trim().replace(/\./g, '-');
if (asset.) {
const endDateStr = asset..replace(/\./g, '-');
const endDate = new Date(endDateStr);
if (!isNaN(endDate.getTime())) {
endDate.setHours(23, 59, 59, 999);
@@ -121,8 +121,9 @@ export function renderSwList(container: HTMLElement) {
<td>${asset.||''}</td>
<td>${asset.}</td>
<td style="text-align:center;">${asset.||''}</td>
${isSub ? `<td style="text-align:center;">${asset.||''}</td>` : ''}
<td style="text-align:right;">${asset.||'0'}</td>
<td style="text-align:center;">${asset.||''}</td>
<td style="text-align:center;">${asset.||''}</td>
<td style="text-align:right;">${formatPrice(asset.)}</td>
<td style="text-align:center;">${qty}</td>
<td style="text-align:center;"><strong style="color: ${avail > 0 ? 'var(--primary-color)' : 'var(--danger)'}">${avail}</strong></td>
<td style="display:flex; justify-content:center; align-items:center; gap:0.5rem;">