Merge all feature branches into main and optimize core architecture
This commit is contained in:
@@ -138,6 +138,7 @@ const HW_FORM_HTML = `
|
||||
</div>
|
||||
`;
|
||||
|
||||
<<<<<<< HEAD
|
||||
function renderHwHistory(assetId: string) {
|
||||
const container = document.getElementById('hw-history-list');
|
||||
if (!container) return;
|
||||
@@ -150,6 +151,27 @@ function renderHwHistory(assetId: string) {
|
||||
<div class="history-details">${l.details.replace(/\n/g, '<br>')}</div>
|
||||
</div>
|
||||
`).join('');
|
||||
=======
|
||||
export function openHwModal(asset: HardwareAsset, mode: 'view' | 'add' | 'edit' = 'view') {
|
||||
currentAsset = asset;
|
||||
const modal = document.getElementById('hw-asset-modal')!;
|
||||
|
||||
// 1. 잠금 상태 통합 제어 (데이터 유무가 아닌 호출 mode에만 의존)
|
||||
setEditLock('hw-asset-form', mode, {
|
||||
saveBtnId: 'btn-save-hw-asset',
|
||||
revertBtnId: 'btn-revert-hw-edit',
|
||||
generateBtnId: 'btn-generate-hw-code'
|
||||
});
|
||||
|
||||
isEditMode = (mode === 'add' || mode === 'edit');
|
||||
|
||||
// 2. 데이터 바인딩
|
||||
fillHwFormData(asset);
|
||||
|
||||
modal.classList.remove('hidden');
|
||||
applyTypeSpecificUI(asset.type);
|
||||
createIcons({ icons: { Paperclip } });
|
||||
>>>>>>> origin/SW_Table
|
||||
}
|
||||
|
||||
function applyTypeSpecificUI(type: string) {
|
||||
|
||||
Reference in New Issue
Block a user