feat: GBLS 리브랜딩 + 매뉴얼 보강 + 워크스페이스/코드관리 UX 개선

리브랜딩
- 서비스명 "종량제 시스템" → "GBLS", 헤더 로고에 풀네임(Garbage Bag Logistics System) 병기
  (gov-portal·공통 브랜드·로그인/welcome 셸·타이틀·푸터 전반)

매뉴얼
- 신규 페이지 [로그인·회원가입·계정](01_account.md): 가입 항목·관리자 승인·2차 인증 흐름
- [화면 구성·워크스페이스·단축키]에 계정 전환 시 탭 초기화 안내 추가

워크스페이스(탭)
- 탭 전환 시 좌측 사이드바 강조 동기화(메뉴 없는 화면은 강조 해제, 경로 폴백 매칭)
- 소메뉴 좌측 아이콘(▸/·) 전부 제거 — 활성 메뉴는 배경 강조로만 구분
- 탭을 사용자(mb_idx)별로 격리: 다른 아이디 로그인 시 이전 탭 복원 안 함
- 사이드바 FAQ 링크 제거(자주 묻는 질문은 매뉴얼에 통합)

기본 코드관리 화면
- 업무현황 카드 스타일로 재디자인(가벼운 표·상태/범위 pill·단일 구분선)
- render()에 $bare 옵션 추가 → 이미 카드형인 화면은 바깥 래퍼 생략

기타
- .claude/settings.local.json(개인 권한 설정) .gitignore 추가
- e2e: 워크스페이스(동기화·계정격리) + 매뉴얼(계정·단축키·검색) 케이스 보강

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
taekyoungc
2026-06-09 14:43:24 +09:00
parent 7e32f579e8
commit 4d9343e980
32 changed files with 273 additions and 109 deletions

View File

@@ -12,32 +12,40 @@ $showKindActions = $canManageKinds;
$selectedKindId = (int) ($selectedKind->ck_idx ?? 0);
$colCount = 6 + ($showKindActions ? 1 : 0);
$detailColCount = 7 + ($canManageDetails ? 1 : 0);
/** 상태 배지 (업무현황 스타일의 가벼운 pill) */
$stateBadge = static function (int $state): string {
return $state === 1
? '<span class="inline-block px-2 py-0.5 rounded-full text-[11px] font-medium bg-emerald-50 text-emerald-700">사용</span>'
: '<span class="inline-block px-2 py-0.5 rounded-full text-[11px] font-medium bg-gray-100 text-gray-500">미사용</span>';
};
?>
<div class="grid grid-cols-1 xl:grid-cols-2 gap-4">
<section>
<div class="flex flex-wrap items-center justify-between gap-2 mb-2 border-b pb-1">
<h3 class="text-base font-bold text-gray-700">기본코드 종류</h3>
<div class="flex flex-wrap items-center gap-2 text-xs sm:text-sm">
<?php if ($canManageKinds): ?>
<a href="<?= base_url('admin/code-kinds/create') ?>" class="inline-flex items-center rounded bg-[#243a5e] px-3 py-1.5 text-white shadow hover:opacity-90">기본코드 등록</a>
<?php else: ?>
<span class="text-gray-500">코드 종류 등록·수정은 super admin·본부 관리자만 가능합니다.</span>
<?php endif; ?>
</div>
<!-- 기본코드 종류 -->
<section class="rounded-xl bg-white border border-gray-200 p-4 shadow-sm">
<div class="flex flex-wrap items-center justify-between gap-2 mb-3">
<h2 class="text-sm font-bold text-gray-900"><i class="fa-solid fa-layer-group text-blue-600 mr-1"></i>기본코드 종류</h2>
<?php if ($canManageKinds): ?>
<a href="<?= base_url('admin/code-kinds/create') ?>" class="inline-flex items-center rounded-lg bg-[#243a5e] px-3 py-1.5 text-white text-xs font-semibold shadow-sm hover:opacity-90">기본코드 등록</a>
<?php else: ?>
<span class="text-gray-400 text-[11px]">코드 종류 등록·수정은 super admin·본부 관리자만 가능합니다.</span>
<?php endif; ?>
</div>
<div class="border border-gray-300 overflow-auto">
<table class="data-table w-full">
<thead><tr>
<th class="w-14">번호</th>
<th class="w-24">코드</th>
<th>코드</th>
<th class="w-24">세부코드</th>
<th class="w-20">상태</th>
<th class="w-40">등록일</th>
<?php if ($showKindActions): ?>
<th class="w-36">작업</th>
<?php endif; ?>
</tr></thead>
<div class="overflow-auto">
<table class="w-full text-[13px]">
<thead>
<tr class="text-left text-[11px] font-semibold text-gray-500 border-b border-gray-200">
<th class="py-2.5 px-2 w-12 text-center">번호</th>
<th class="py-2.5 px-2 w-20">코드</th>
<th class="py-2.5 px-2">코드</th>
<th class="py-2.5 px-2 w-20 text-center">세부코드</th>
<th class="py-2.5 px-2 w-16 text-center">상태</th>
<th class="py-2.5 px-2 w-32">등록일</th>
<?php if ($showKindActions): ?>
<th class="py-2.5 px-2 w-28 text-center">작업</th>
<?php endif; ?>
</tr>
</thead>
<tbody>
<?php if (! empty($codeKinds)): ?>
<?php $i = 0; foreach ($codeKinds as $row): $i++; ?>
@@ -45,16 +53,16 @@ $detailColCount = 7 + ($canManageDetails ? 1 : 0);
$isSelected = (int) $row->ck_idx === $selectedKindId;
$detailUrl = base_url('bag/code-kinds?ck_idx=' . (int) $row->ck_idx);
?>
<tr class="<?= $isSelected ? 'bg-blue-50' : '' ?> cursor-pointer hover:bg-blue-50"
<tr class="border-b border-gray-200 last:border-0 cursor-pointer hover:bg-blue-50/60 <?= $isSelected ? 'bg-blue-50' : '' ?>"
onclick="window.location.href='<?= esc($detailUrl, 'attr') ?>'">
<td class="text-center"><?= (string) $i ?></td>
<td class="text-center font-mono"><?= esc($row->ck_code) ?></td>
<td><?= esc($row->ck_name) ?></td>
<td class="text-center"><?= (int) ($countMap[$row->ck_idx] ?? 0) ?>개</td>
<td class="text-center"><?= (int) ($row->ck_state ?? 0) === 1 ? '사용' : '미사용' ?></td>
<td class="text-left"><?= esc($row->ck_regdate ?? '') ?></td>
<td class="py-2.5 px-2 text-center text-gray-500"><?= (string) $i ?></td>
<td class="py-2.5 px-2 text-center font-mono text-gray-700"><?= esc($row->ck_code) ?></td>
<td class="py-2.5 px-2 font-medium text-gray-900"><?= esc($row->ck_name) ?></td>
<td class="py-2.5 px-2 text-center text-gray-600"><?= (int) ($countMap[$row->ck_idx] ?? 0) ?>개</td>
<td class="py-2.5 px-2 text-center"><?= $stateBadge((int) ($row->ck_state ?? 0)) ?></td>
<td class="py-2.5 px-2 text-gray-500 text-[12px]"><?= esc($row->ck_regdate ?? '') ?></td>
<?php if ($showKindActions): ?>
<td class="text-center text-sm" onclick="event.stopPropagation()">
<td class="py-2.5 px-2 text-center text-xs" onclick="event.stopPropagation()">
<a href="<?= base_url('admin/code-kinds/edit/' . (int) $row->ck_idx) ?>" class="text-blue-600 hover:underline mr-1">수정</a>
<form action="<?= base_url('admin/code-kinds/delete/' . (int) $row->ck_idx) ?>" method="POST" class="inline" onsubmit="return confirm('이 코드 종류를 삭제하시겠습니까?');">
<?= csrf_field() ?>
@@ -65,42 +73,43 @@ $detailColCount = 7 + ($canManageDetails ? 1 : 0);
</tr>
<?php endforeach; ?>
<?php else: ?>
<tr><td colspan="<?= (string) $colCount ?>" class="text-center text-gray-400 py-4">등록된 코드 종류가 없습니다.</td></tr>
<tr><td colspan="<?= (string) $colCount ?>" class="text-center text-gray-400 py-6">등록된 코드 종류가 없습니다.</td></tr>
<?php endif; ?>
</tbody>
</table>
</div>
</section>
<section>
<div class="flex flex-wrap items-center justify-between gap-2 mb-2 border-b pb-1">
<h3 class="text-base font-bold text-gray-700">
세부코드
<!-- 세부코드 -->
<section class="rounded-xl bg-white border border-gray-200 p-4 shadow-sm">
<div class="flex flex-wrap items-center justify-between gap-2 mb-3">
<h2 class="text-sm font-bold text-gray-900">
<i class="fa-solid fa-list-ul text-emerald-600 mr-1"></i>세부코드
<?php if ($selectedKind !== null): ?>
— <?= esc($selectedKind->ck_name) ?> (<?= esc($selectedKind->ck_code) ?>)
<span class="font-medium text-gray-400">— <?= esc($selectedKind->ck_name) ?> (<?= esc($selectedKind->ck_code) ?>)</span>
<?php endif; ?>
</h3>
</h2>
<?php if ($canManageDetails && $selectedKind !== null): ?>
<a href="<?= base_url('admin/code-details/' . (int) $selectedKind->ck_idx . '/create') ?>" class="inline-flex items-center rounded bg-[#243a5e] px-3 py-1.5 text-white shadow hover:opacity-90 text-sm">세부코드 등록</a>
<a href="<?= base_url('admin/code-details/' . (int) $selectedKind->ck_idx . '/create') ?>" class="inline-flex items-center rounded-lg bg-[#243a5e] px-3 py-1.5 text-white text-xs font-semibold shadow-sm hover:opacity-90">세부코드 등록</a>
<?php endif; ?>
</div>
<?php if ($selectedKind === null): ?>
<div class="border border-gray-300 rounded p-6 text-center text-gray-500">왼쪽에서 코드 종류를 선택해 주세요.</div>
<div class="py-10 text-center text-sm text-gray-400">왼쪽에서 코드 종류를 선택해 주세요.</div>
<?php else: ?>
<div class="border border-gray-300 overflow-auto">
<table class="data-table w-full">
<div class="overflow-auto">
<table class="w-full text-[13px]">
<thead>
<tr>
<th class="w-16">번호</th>
<th class="w-24">코드</th>
<th>코드명</th>
<th class="w-24">범위</th>
<th class="w-20">정렬</th>
<th class="w-20">상태</th>
<th class="w-40">등록일</th>
<tr class="text-left text-[11px] font-semibold text-gray-500 border-b border-gray-200">
<th class="py-2.5 px-2 w-12 text-center">번호</th>
<th class="py-2.5 px-2 w-20">코드</th>
<th class="py-2.5 px-2">코드명</th>
<th class="py-2.5 px-2 w-16 text-center">범위</th>
<th class="py-2.5 px-2 w-14 text-center">정렬</th>
<th class="py-2.5 px-2 w-16 text-center">상태</th>
<th class="py-2.5 px-2 w-32">등록일</th>
<?php if ($canManageDetails): ?>
<th class="w-28">작업</th>
<th class="py-2.5 px-2 w-24 text-center">작업</th>
<?php endif; ?>
</tr>
</thead>
@@ -111,16 +120,18 @@ $detailColCount = 7 + ($canManageDetails ? 1 : 0);
$isPlatform = (($row->cd_source ?? 'platform') === 'platform' && (int) ($row->cd_lg_idx ?? 0) === 0);
$scopeLabel = $isPlatform ? '공통' : '지자체';
?>
<tr>
<td class="text-center"><?= (string) $dNo ?></td>
<td class="text-center font-mono"><?= esc($row->cd_code) ?></td>
<td><?= esc($row->cd_name) ?></td>
<td class="text-center text-xs"><?= esc($scopeLabel) ?></td>
<td class="text-center"><?= (int) ($row->cd_sort ?? 0) ?></td>
<td class="text-center"><?= (int) ($row->cd_state ?? 0) === 1 ? '사용' : '미사용' ?></td>
<td class="text-left"><?= esc($row->cd_regdate ?? '') ?></td>
<tr class="border-b border-gray-200 last:border-0 hover:bg-gray-50">
<td class="py-2.5 px-2 text-center text-gray-500"><?= (string) $dNo ?></td>
<td class="py-2.5 px-2 text-center font-mono text-gray-700"><?= esc($row->cd_code) ?></td>
<td class="py-2.5 px-2 font-medium text-gray-900"><?= esc($row->cd_name) ?></td>
<td class="py-2.5 px-2 text-center">
<span class="inline-block px-2 py-0.5 rounded-full text-[11px] font-medium <?= $isPlatform ? 'bg-blue-50 text-blue-700' : 'bg-amber-50 text-amber-700' ?>"><?= esc($scopeLabel) ?></span>
</td>
<td class="py-2.5 px-2 text-center text-gray-600"><?= (int) ($row->cd_sort ?? 0) ?></td>
<td class="py-2.5 px-2 text-center"><?= $stateBadge((int) ($row->cd_state ?? 0)) ?></td>
<td class="py-2.5 px-2 text-gray-500 text-[12px]"><?= esc($row->cd_regdate ?? '') ?></td>
<?php if ($canManageDetails): ?>
<td class="text-center text-sm">
<td class="py-2.5 px-2 text-center text-xs">
<?php if (! empty($rowCanEdit[$row->cd_idx])): ?>
<a href="<?= base_url('admin/code-details/edit/' . (int) $row->cd_idx) ?>" class="text-blue-600 hover:underline">수정</a>
<form action="<?= base_url('admin/code-details/delete/' . (int) $row->cd_idx) ?>" method="POST" class="ml-1 inline" onsubmit="return confirm('이 세부코드를 삭제하시겠습니까?');">
@@ -135,7 +146,7 @@ $detailColCount = 7 + ($canManageDetails ? 1 : 0);
</tr>
<?php endforeach; ?>
<?php else: ?>
<tr><td colspan="<?= (string) $detailColCount ?>" class="text-center text-gray-400 py-4">등록된 세부코드가 없습니다.</td></tr>
<tr><td colspan="<?= (string) $detailColCount ?>" class="text-center text-gray-400 py-6">등록된 세부코드가 없습니다.</td></tr>
<?php endif; ?>
</tbody>
</table>