feat: tkreport/tkqc UX 개선 - 신고 완료 모달, 크로스시스템 배너, AI 도우미 가시성
- 신고 제출 후 alert → 성공 모달로 교체 (신고현황/새신고 버튼) - cross-nav.js: tkreport 페이지 상단 크로스시스템 네비게이션 배너 - report-status.html: AI 신고 도우미 버튼 추가 - common-header.js: tkqc 헤더에 "신고" 외부 링크 추가 - 배포 스크립트/가이드 추가 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
42
system2-report/web/js/cross-nav.js
Normal file
42
system2-report/web/js/cross-nav.js
Normal file
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* 크로스시스템 네비게이션 배너
|
||||
* tkreport 페이지 상단에 시스템 간 이동 링크를 제공
|
||||
*/
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var path = window.location.pathname;
|
||||
var host = window.location.hostname;
|
||||
var protocol = window.location.protocol;
|
||||
|
||||
// tkqc URL 결정
|
||||
var tkqcUrl;
|
||||
if (host.includes('technicalkorea.net')) {
|
||||
tkqcUrl = protocol + '//tkqc.technicalkorea.net';
|
||||
} else {
|
||||
tkqcUrl = protocol + '//' + host + ':30200';
|
||||
}
|
||||
|
||||
// 현재 페이지 판별
|
||||
var isIssueReport = path.includes('issue-report');
|
||||
var isReportStatus = path.includes('report-status');
|
||||
var isChatReport = path.includes('chat-report');
|
||||
|
||||
var nav = document.createElement('div');
|
||||
nav.id = 'crossNav';
|
||||
nav.innerHTML =
|
||||
'<a href="/pages/safety/issue-report.html" class="cn-link' + (isIssueReport ? ' cn-active' : '') + '">신고하기</a>' +
|
||||
'<a href="/pages/safety/report-status.html" class="cn-link' + (isReportStatus ? ' cn-active' : '') + '">신고현황</a>' +
|
||||
'<a href="/pages/safety/chat-report.html" class="cn-link' + (isChatReport ? ' cn-active' : '') + '">AI 도우미</a>' +
|
||||
'<a href="' + tkqcUrl + '" class="cn-link cn-external">부적합관리(TKQC) →</a>';
|
||||
|
||||
var style = document.createElement('style');
|
||||
style.textContent =
|
||||
'#crossNav{display:flex;align-items:center;gap:0.25rem;padding:0.5rem 0.75rem;background:#1e293b;overflow-x:auto;-webkit-overflow-scrolling:touch;}' +
|
||||
'.cn-link{color:rgba(255,255,255,0.7);text-decoration:none;font-size:0.8125rem;font-weight:500;padding:0.25rem 0.625rem;border-radius:0.375rem;white-space:nowrap;transition:background 0.15s,color 0.15s;-webkit-tap-highlight-color:transparent;}' +
|
||||
'.cn-link:hover,.cn-link:active{color:#fff;background:rgba(255,255,255,0.1);}' +
|
||||
'.cn-active{color:#fff !important;background:rgba(255,255,255,0.15) !important;font-weight:600;}' +
|
||||
'.cn-external{margin-left:auto;color:#38bdf8;border:1px solid rgba(56,189,248,0.3);font-size:0.75rem;}' +
|
||||
'.cn-external:hover,.cn-external:active{background:rgba(56,189,248,0.15);color:#7dd3fc;}';
|
||||
|
||||
document.head.appendChild(style);
|
||||
document.body.insertBefore(nav, document.body.firstChild);
|
||||
});
|
||||
@@ -1185,8 +1185,7 @@ async function submitReport() {
|
||||
const data = await response.json();
|
||||
|
||||
if (data.success) {
|
||||
alert('신고가 등록되었습니다.');
|
||||
window.location.href = '/pages/safety/my-reports.html';
|
||||
document.getElementById('successModal').style.display = 'flex';
|
||||
} else {
|
||||
throw new Error(data.error || '신고 등록 실패');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user