feat: 자산 관리 가이드 추가 및 테이블 스타일 개선
This commit is contained in:
@@ -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>
|
||||
`;
|
||||
|
||||
|
||||
@@ -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'); });
|
||||
|
||||
@@ -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'); });
|
||||
|
||||
@@ -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>
|
||||
`;
|
||||
|
||||
@@ -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;">
|
||||
|
||||
Reference in New Issue
Block a user