fix: 목록 관리 페이지 공통 헤더 표시 문제 해결
- showSection 함수에서 공통 헤더 현재 페이지 상태 업데이트 로직 추가 - 목록 관리 및 보고서 섹션에 상단 여백 추가 (헤더 가림 방지) - 공통 헤더에 updateCurrentPage 메서드 추가 Changes: - index.html: showSection에서 헤더 상태 업데이트, 섹션별 padding-top 추가 - common-header.js: updateCurrentPage 메서드 추가 Fixes: 목록 관리 페이지에서 공통 헤더가 보이지 않는 문제
This commit is contained in:
@@ -344,7 +344,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- 목록 관리 섹션 -->
|
<!-- 목록 관리 섹션 -->
|
||||||
<section id="listSection" class="hidden container mx-auto px-4 py-6">
|
<section id="listSection" class="hidden container mx-auto px-4 py-6" style="padding-top: 120px;">
|
||||||
<div class="bg-white rounded-xl shadow-sm p-6">
|
<div class="bg-white rounded-xl shadow-sm p-6">
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<div class="flex justify-between items-center mb-4">
|
<div class="flex justify-between items-center mb-4">
|
||||||
@@ -403,7 +403,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- 보고서 섹션 -->
|
<!-- 보고서 섹션 -->
|
||||||
<section id="summarySection" class="hidden container mx-auto px-4 py-6">
|
<section id="summarySection" class="hidden container mx-auto px-4 py-6" style="padding-top: 120px;">
|
||||||
<div class="bg-white rounded-xl shadow-sm p-6">
|
<div class="bg-white rounded-xl shadow-sm p-6">
|
||||||
<div class="flex justify-between items-center mb-6">
|
<div class="flex justify-between items-center mb-6">
|
||||||
<h2 class="text-lg font-semibold text-gray-800">작업 보고서</h2>
|
<h2 class="text-lg font-semibold text-gray-800">작업 보고서</h2>
|
||||||
@@ -593,7 +593,18 @@
|
|||||||
// 선택된 섹션 표시
|
// 선택된 섹션 표시
|
||||||
document.getElementById(section + 'Section').classList.remove('hidden');
|
document.getElementById(section + 'Section').classList.remove('hidden');
|
||||||
|
|
||||||
// 네비게이션 활성화는 공통 헤더에서 처리됨
|
// 공통 헤더 현재 페이지 업데이트
|
||||||
|
if (window.commonHeader && currentUser) {
|
||||||
|
let pageName = 'issues_create'; // 기본값
|
||||||
|
if (section === 'list') {
|
||||||
|
pageName = 'issues_manage';
|
||||||
|
} else if (section === 'summary') {
|
||||||
|
pageName = 'reports';
|
||||||
|
} else if (section === 'report') {
|
||||||
|
pageName = 'issues_create';
|
||||||
|
}
|
||||||
|
window.commonHeader.updateCurrentPage(pageName);
|
||||||
|
}
|
||||||
|
|
||||||
// 부적합 등록 섹션으로 전환 시 프로젝트 다시 로드 (모바일 대응)
|
// 부적합 등록 섹션으로 전환 시 프로젝트 다시 로드 (모바일 대응)
|
||||||
if (section === 'report') {
|
if (section === 'report') {
|
||||||
|
|||||||
@@ -140,6 +140,15 @@ class CommonHeader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 현재 페이지 업데이트
|
||||||
|
* @param {string} pageName - 새로운 페이지 이름
|
||||||
|
*/
|
||||||
|
updateCurrentPage(pageName) {
|
||||||
|
this.currentPage = pageName;
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 헤더 HTML 생성
|
* 헤더 HTML 생성
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user