fix: resolve all TypeScript build errors after Setting branch merge
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { state, saveHardwareAsset, deleteHardwareAsset } from '../../core/state';
|
||||
import { HardwareAsset } from '../../core/excelHandler';
|
||||
import { closeModals } from './BaseModal';
|
||||
import { openModal } from './BaseModal';
|
||||
import { ASSET_SCHEMA, UI_TEXT } from '../../core/schema';
|
||||
import { createIcons, History, Plus, X, Save, Edit2, RotateCcw, Paperclip } from 'lucide';
|
||||
import { CORP_LIST, ORG_LIST, HW_TYPE_LIST, LOCATION_DATA, TYPE_PREFIX_MAP } from './SharedData';
|
||||
@@ -383,11 +383,10 @@ export function initHwModal(onSave: () => void, closeModalsCb: () => void) {
|
||||
{ key: ASSET_SCHEMA.MODEL.key, label: ASSET_SCHEMA.MODEL.ui }
|
||||
];
|
||||
|
||||
const isNewAsset = !currentAsset || !currentAsset.자산코드;
|
||||
|
||||
if (isNewAsset) {
|
||||
if (!currentAsset || !currentAsset.자산코드) {
|
||||
diffLogs.push('자산 신규 등록');
|
||||
} else {
|
||||
const asset = currentAsset!;
|
||||
const newIp = String(getFieldValue('hw-IP주소') || getFieldValue('hw-IP주소-non-server') || '').trim();
|
||||
const newLocation = String(isOpType ? extracted[ASSET_SCHEMA.STORE_LOC.key] : getCombinedLocation('hw-위치-빌딩', 'hw-위치-상세', 'hw-위치-기타') || '').trim();
|
||||
|
||||
@@ -396,19 +395,19 @@ export function initHwModal(onSave: () => void, closeModalsCb: () => void) {
|
||||
let newVal = '';
|
||||
|
||||
if (f.key === ASSET_SCHEMA.IP_ADDR.key) {
|
||||
oldVal = String(currentAsset[ASSET_SCHEMA.IP_ADDR.key] || '').trim();
|
||||
oldVal = String(asset[ASSET_SCHEMA.IP_ADDR.key] || '').trim();
|
||||
newVal = newIp;
|
||||
} else if (f.key === ASSET_SCHEMA.LOCATION.key) {
|
||||
oldVal = String(currentAsset[ASSET_SCHEMA.LOCATION.key] || '').trim();
|
||||
oldVal = String(asset[ASSET_SCHEMA.LOCATION.key] || '').trim();
|
||||
newVal = newLocation;
|
||||
} else if (f.key === ASSET_SCHEMA.MANAGER_MAIN.key) {
|
||||
oldVal = String(currentAsset[ASSET_SCHEMA.MANAGER_MAIN.key] || '').trim();
|
||||
oldVal = String(asset[ASSET_SCHEMA.MANAGER_MAIN.key] || '').trim();
|
||||
newVal = String(extracted[ASSET_SCHEMA.MANAGER_MAIN.key] || '').trim();
|
||||
} else if (f.key === '상세용도') {
|
||||
oldVal = String(currentAsset.상세용도 || '').trim();
|
||||
oldVal = String(asset.상세용도 || '').trim();
|
||||
newVal = String((extracted.type !== 'PC' && extracted.type !== '개인PC') ? extracted.type : (extracted.상세용도 || '')).trim();
|
||||
} else {
|
||||
oldVal = String((currentAsset as any)[f.key] || '').trim();
|
||||
oldVal = String((asset as any)[f.key] || '').trim();
|
||||
newVal = String(extracted[f.key] || '').trim();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user