UX 개선 — 처리이력 페이지 admin 접근 시 안내 메시지 추가

admin 계정으로 정비사 처리이력 접근 시 '직접 등록한
조치만 표시된다'는 안내와 관리자 신고 목록 링크 제공

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
byun
2026-06-01 16:56:18 +09:00
parent 012f87d75e
commit 5ebd0a6ae7

View File

@@ -74,6 +74,16 @@
Auth.require(['mechanic','admin']);
Auth.renderNav(document.getElementById('navUser'));
// admin 계정으로 접근 시 안내
if (Auth.role() === 'admin') {
document.querySelector('.main').insertAdjacentHTML('afterbegin',
`<div class="alert" style="background:#FFF8E6;border:1px solid #FFD600;border-radius:8px;padding:12px 16px;margin-bottom:16px;font-size:13px;">
⚠️ 현재 <strong>관리자(${Auth.name()})</strong> 계정으로 접속 중입니다.
처리이력은 해당 계정이 직접 등록한 조치만 표시됩니다.
정비사 이력 전체는 <a href="/pages/admin/reports.html" style="color:var(--accent);font-weight:700">관리자 신고 목록</a>에서 확인하세요.
</div>`);
}
const RESULT_LABEL = {
done: '✅ 완료',
in_progress: '🔧 진행중',