feat: migrate ServerPC data to asset_pc, enhance filters with location, and standardize page headers
- 서버PC 자산을 asset_pc 테이블로 통합 마이그레이션 및 스키마 확장 (위치, IP 정보 복구 완료) - 하드웨어 자산 페이지의 구매법인 필터를 자산위치 필터로 교체 및 동적 데이터 바인딩 적용 - 모든 자산 리스트 페이지 상단에 설명(Description) 필드 추가 및 헤더 표준화 - 상세 모달 내 삭제 버튼 기능 구현 및 서버PC 용도 필드 노출 오류 수정 - 현 사용조직 필터 리스트가 비어있던 DOM 셀렉터 버그 수정
This commit is contained in:
@@ -1,7 +1,27 @@
|
||||
import { PAGE_DESCRIPTIONS } from './schema';
|
||||
|
||||
/**
|
||||
* ITAM 공통 유틸리티 함수
|
||||
*/
|
||||
|
||||
/**
|
||||
* 페이지 헤더(타이틀 및 설명) 렌더링
|
||||
*/
|
||||
export function renderPageHeader(container: HTMLElement, pageId: string) {
|
||||
const config = PAGE_DESCRIPTIONS[pageId];
|
||||
if (!config) return;
|
||||
|
||||
const header = document.createElement('div');
|
||||
header.className = 'page-header';
|
||||
header.innerHTML = `
|
||||
<div class="page-title-group">
|
||||
<h2 class="page-title"><i data-lucide="${config.icon}"></i> ${config.title}</h2>
|
||||
<p class="page-description">${config.description}</p>
|
||||
</div>
|
||||
`;
|
||||
container.appendChild(header);
|
||||
}
|
||||
|
||||
/**
|
||||
* 숫자에 천 단위 콤마 추가 (금액 표시용)
|
||||
*/
|
||||
@@ -131,20 +151,11 @@ export function dynamicSort<T>(list: T[], key: string, direction: 'asc' | 'desc'
|
||||
}
|
||||
|
||||
/**
|
||||
* 목록 뷰용 액션 버튼 HTML 생성 (양식, 업로드, 엑셀저장, 자산추가)
|
||||
* 목록 뷰용 액션 버튼 HTML 생성 (자산추가)
|
||||
*/
|
||||
export function getActionButtonsHTML(): string {
|
||||
return `
|
||||
<div class="search-actions">
|
||||
<button id="btn-download-template" class="btn btn-outline" title="통합 양식 다운로드">
|
||||
<i data-lucide="download"></i> 양식
|
||||
</button>
|
||||
<label for="excel-upload" class="btn btn-outline" title="엑셀 파일 업로드">
|
||||
<i data-lucide="upload"></i> 업로드
|
||||
</label>
|
||||
<button id="btn-export-excel" class="btn btn-primary" title="일괄 엑셀 저장">
|
||||
<i data-lucide="file-spreadsheet"></i> 엑셀저장
|
||||
</button>
|
||||
<button id="btn-add-asset" class="btn btn-primary">
|
||||
<i data-lucide="plus"></i> 자산추가
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user