diff --git a/src/components/Modal/SWModal.ts b/src/components/Modal/SWModal.ts index ca98fe6..e47156a 100644 --- a/src/components/Modal/SWModal.ts +++ b/src/components/Modal/SWModal.ts @@ -28,6 +28,7 @@ const SW_FIELD_MAP: Record = { '수량': ASSET_SCHEMA.QTY.key, '금액': ASSET_SCHEMA.PRICE.key, '구매일': ASSET_SCHEMA.PURCHASE_YM.key, + '시작일': '시작일', '납품업체': ASSET_SCHEMA.VENDOR.key, '비고': ASSET_SCHEMA.REMARKS.key, '플랫폼명': ASSET_SCHEMA.PLATFORM.key, @@ -79,10 +80,11 @@ const SW_FORM_HTML = `
관리 및 비고
-
-
+
+
+
-
+
@@ -127,6 +129,7 @@ function applySwTypeUI(type: string) { const keyGroup = document.getElementById('sw-license-key-group'); const typeGroup = document.getElementById('sw-license-type-group'); const expiryGroup = document.getElementById('sw-expiry-group'); + const startGroup = document.getElementById('sw-start-group'); if (type === '클라우드') { cloudFields.forEach(el => (el as HTMLElement).style.display = 'flex'); @@ -140,10 +143,12 @@ function applySwTypeUI(type: string) { if (keyGroup) keyGroup.style.display = 'none'; if (typeGroup) typeGroup.style.display = 'flex'; if (expiryGroup) expiryGroup.style.display = 'flex'; + if (startGroup) startGroup.style.display = 'flex'; } else if (type === '영구SW') { if (keyGroup) keyGroup.style.display = 'flex'; if (typeGroup) typeGroup.style.display = 'none'; - if (expiryGroup) expiryGroup.style.display = 'none'; // 영구는 유지보수 기간이 비고에 들어가는 경우가 많아 만료일 숨김 처리 + if (expiryGroup) expiryGroup.style.display = 'none'; + if (startGroup) startGroup.style.display = 'flex'; } } } @@ -212,11 +217,7 @@ export function initSwModal(onSave: () => void, closeModalsCb: () => void) { if (currentSwAsset) openSwModal(currentSwAsset, 'view'); }); - // YYYYMM 입력 제한 로직 (숫자 6자리) - document.getElementById('sw-구매일')?.addEventListener('input', (e) => { - const target = e.target as HTMLInputElement; - target.value = target.value.replace(/[^0-9]/g, '').substring(0, 6); - }); + // 날짜 필드는 type="date"로 변경되어 별도 제한 로직 불필요 saveBtn.addEventListener('click', () => { if (!currentSwAsset) return; diff --git a/src/components/Navigation.ts b/src/components/Navigation.ts index 7cabde5..5565586 100644 --- a/src/components/Navigation.ts +++ b/src/components/Navigation.ts @@ -7,7 +7,7 @@ const MENU_CONFIG = { }, sw: { label: '소프트웨어', - tabs: ['대시보드', '구독SW', '영구SW'] + tabs: ['대시보드', '구독SW', '영구SW', '클라우드'] }, ops: { label: '운영 서비스', diff --git a/src/views/SW_Table.ts b/src/views/SW_Table.ts index 4802425..e350b86 100644 --- a/src/views/SW_Table.ts +++ b/src/views/SW_Table.ts @@ -34,6 +34,8 @@ export function renderSWTable(mainContent: HTMLElement) { } else if (state.activeCategory === 'sw') { if (tab === '구독SW' || tab === '영구SW') { renderSwList(container); + } else if (tab === '클라우드') { + renderCloudList(container); } else { container.innerHTML = `
"${tab}" 탭에 대한 소프트웨어 리스트 뷰가 정의되지 않았습니다.
`; }