refactor: 프론트엔드 SSO 인증 통합 및 API 경로 정리
- Gateway 로그인/포탈 페이지 SSO 연동 - System1 web/fastapi-bridge API base URL 동적 설정 - SSO 토큰 기반 인증 흐름 통일 - deprecated JS 파일 삭제 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -22,7 +22,6 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('🏗️ 작업장 관리 페이지 초기화 시작 (레거시)');
|
||||
loadAllData();
|
||||
});
|
||||
|
||||
@@ -70,7 +69,6 @@ async function loadCategories() {
|
||||
}
|
||||
|
||||
categories = categoryData;
|
||||
console.log(`✅ 카테고리 ${categories.length}개 로드 완료`);
|
||||
} catch (error) {
|
||||
console.error('카테고리 로딩 오류:', error);
|
||||
categories = [];
|
||||
@@ -244,7 +242,6 @@ async function loadImageWithRegions(imageUrl, categoryId) {
|
||||
});
|
||||
|
||||
if (regions.length > 0) {
|
||||
console.log(`✅ 레이아웃 미리보기에 ${regions.length}개 영역 표시 완료`);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('영역 로드 오류:', error);
|
||||
@@ -510,7 +507,6 @@ async function saveCategory() {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('💾 저장할 카테고리 데이터:', categoryData);
|
||||
|
||||
let response;
|
||||
if (categoryId) {
|
||||
@@ -576,7 +572,6 @@ async function loadWorkplaces() {
|
||||
}
|
||||
|
||||
workplaces = workplaceData;
|
||||
console.log(`✅ 작업장 ${workplaces.length}개 로드 완료`);
|
||||
} catch (error) {
|
||||
console.error('작업장 로딩 오류:', error);
|
||||
workplaces = [];
|
||||
@@ -758,7 +753,6 @@ async function saveWorkplace() {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('💾 저장할 작업장 데이터:', workplaceData);
|
||||
|
||||
let response;
|
||||
if (workplaceId) {
|
||||
@@ -1018,7 +1012,6 @@ async function loadWorkplaceEquipments(workplaceId) {
|
||||
// 해당 작업장에 할당된 설비 목록 저장
|
||||
existingEquipments = equipments;
|
||||
|
||||
console.log(`✅ 작업장 ${workplaceId}의 설비 ${equipments.length}개 로드 완료 (지도 영역: ${workplaceEquipmentRegions.length}개)`);
|
||||
} catch (error) {
|
||||
console.error('설비 로드 오류:', error);
|
||||
workplaceEquipmentRegions = [];
|
||||
@@ -1039,7 +1032,6 @@ async function loadAllEquipments() {
|
||||
}
|
||||
|
||||
allEquipments = equipments;
|
||||
console.log(`✅ 전체 설비 ${allEquipments.length}개 로드 완료`);
|
||||
} catch (error) {
|
||||
console.error('전체 설비 로드 오류:', error);
|
||||
allEquipments = [];
|
||||
@@ -1442,11 +1434,10 @@ function renderWorkplaceEquipmentList() {
|
||||
function updateEquipmentSelectDropdown() {
|
||||
const selectEl = document.getElementById('equipmentSelectInput');
|
||||
if (!selectEl) {
|
||||
console.warn('⚠️ equipmentSelectInput 요소를 찾을 수 없습니다');
|
||||
console.warn(' equipmentSelectInput 요소를 찾을 수 없습니다');
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`📋 드롭다운 업데이트: 전체 설비 ${allEquipments.length}개`);
|
||||
|
||||
// 전체 설비 중에서 아직 어떤 지도에도 배치되지 않은 설비만 표시
|
||||
// map_x_percent가 null이면 지도에 배치되지 않은 설비
|
||||
@@ -1454,13 +1445,11 @@ function updateEquipmentSelectDropdown() {
|
||||
eq.map_x_percent == null || eq.map_x_percent === ''
|
||||
);
|
||||
|
||||
console.log(`📋 지도에 미배치된 설비: ${availableEquipments.length}개`);
|
||||
|
||||
// 이 작업장에 이미 배치된 설비는 제외 (현재 작업장에서 방금 배치한 경우)
|
||||
const registeredIds = workplaceEquipmentRegions.map(r => r.equipment_id);
|
||||
const unregisteredEquipments = availableEquipments.filter(eq => !registeredIds.includes(eq.equipment_id));
|
||||
|
||||
console.log(`📋 선택 가능한 설비: ${unregisteredEquipments.length}개`);
|
||||
|
||||
let options = '<option value="">-- 기존 설비 선택 --</option>';
|
||||
|
||||
@@ -1710,7 +1699,6 @@ function initFullscreenCanvas(imageUrl) {
|
||||
fsCanvas.ontouchmove = handleFsTouchMove;
|
||||
fsCanvas.ontouchend = endFsDraw;
|
||||
|
||||
console.log('✅ 전체화면 캔버스 초기화 완료');
|
||||
};
|
||||
|
||||
img.onerror = function() {
|
||||
|
||||
Reference in New Issue
Block a user