feat: add designated shop detail and PII masking updates
Rebase current admin changes on top of origin/main and exclude local artifacts from tracking to reduce push payload. Made-with: Cursor
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
<?php helper('pii_mask'); ?>
|
||||
<?= view('components/print_header', ['printTitle' => '지정판매소 목록']) ?>
|
||||
<section class="border-b border-gray-300 p-2 shrink-0 bg-control-panel">
|
||||
<div class="flex flex-wrap items-center justify-between gap-y-2">
|
||||
<span class="text-sm font-bold text-gray-700">지정판매소 목록</span>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="<?= base_url('admin/designated-shops/export') ?>" class="no-print border border-btn-excel-border text-btn-excel-text px-3 py-1 rounded-sm text-sm hover:bg-green-50 transition">엑셀저장</a>
|
||||
<a href="<?= mgmt_url('designated-shops/export') ?>" class="no-print border border-btn-excel-border text-btn-excel-text px-3 py-1 rounded-sm text-sm hover:bg-green-50 transition">엑셀저장</a>
|
||||
<button onclick="window.print()" class="no-print border border-btn-print-border text-gray-600 px-3 py-1 rounded-sm text-sm hover:bg-gray-50 transition">인쇄</button>
|
||||
<a href="<?= base_url('admin/designated-shops/create') ?>" class="bg-btn-search text-white px-4 py-1.5 rounded-sm flex items-center gap-1 text-sm shadow hover:opacity-90 transition border border-transparent">지정판매소 등록</a>
|
||||
<a href="<?= mgmt_url('designated-shops/create') ?>" class="bg-btn-search text-white px-4 py-1.5 rounded-sm flex items-center gap-1 text-sm shadow hover:opacity-90 transition border border-transparent">지정판매소 등록</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- P2-15: 다조건 검색 -->
|
||||
<section class="p-2 bg-white border-b border-gray-200 no-print">
|
||||
<form method="GET" action="<?= base_url('admin/designated-shops') ?>" class="flex flex-wrap items-center gap-2">
|
||||
<form method="GET" action="<?= mgmt_url('designated-shops') ?>" class="flex flex-wrap items-center gap-2">
|
||||
<label class="text-sm text-gray-600">상호명</label>
|
||||
<input type="text" name="ds_name" value="<?= esc($dsName ?? '') ?>" placeholder="상호명 검색" class="border border-gray-300 rounded px-2 py-1 text-sm w-40"/>
|
||||
<label class="text-sm text-gray-600">구군코드</label>
|
||||
@@ -29,7 +30,7 @@
|
||||
<option value="3" <?= ($dsState ?? '') === '3' ? 'selected' : '' ?>>직권해지</option>
|
||||
</select>
|
||||
<button type="submit" class="bg-btn-search text-white px-4 py-1 rounded-sm text-sm">조회</button>
|
||||
<a href="<?= base_url('admin/designated-shops') ?>" class="border border-gray-300 text-gray-600 px-3 py-1 rounded-sm text-sm hover:bg-gray-50">초기화</a>
|
||||
<a href="<?= mgmt_url('designated-shops') ?>" class="border border-gray-300 text-gray-600 px-3 py-1 rounded-sm text-sm hover:bg-gray-50">초기화</a>
|
||||
</form>
|
||||
</section>
|
||||
<div class="border border-gray-300 overflow-auto mt-2">
|
||||
@@ -50,19 +51,26 @@
|
||||
</thead>
|
||||
<tbody class="text-right">
|
||||
<?php foreach ($list as $row): ?>
|
||||
<tr>
|
||||
<td class="text-center"><?= esc($row->ds_idx) ?></td>
|
||||
<tr class="hover:bg-gray-50">
|
||||
<td class="text-center">
|
||||
<a href="<?= mgmt_url('designated-shops/show/' . (int) $row->ds_idx) ?>" class="text-blue-600 hover:underline"><?= esc($row->ds_idx) ?></a>
|
||||
</td>
|
||||
<td class="text-left pl-2"><?= esc($lgMap[$row->ds_lg_idx] ?? '') ?></td>
|
||||
<td class="text-left pl-2"><?= esc($row->ds_shop_no) ?></td>
|
||||
<td class="text-left pl-2"><?= esc($row->ds_name) ?></td>
|
||||
<td class="text-left pl-2"><?= esc($row->ds_rep_name) ?></td>
|
||||
<td class="text-left pl-2">
|
||||
<a href="<?= mgmt_url('designated-shops/show/' . (int) $row->ds_idx) ?>" class="text-blue-600 hover:underline"><?= esc($row->ds_shop_no) ?></a>
|
||||
</td>
|
||||
<td class="text-left pl-2">
|
||||
<a href="<?= mgmt_url('designated-shops/show/' . (int) $row->ds_idx) ?>" class="text-blue-600 font-medium hover:underline"><?= esc($row->ds_name) ?></a>
|
||||
</td>
|
||||
<td class="text-left pl-2"><?= esc(mask_person_name($row->ds_rep_name ?? null)) ?></td>
|
||||
<td class="text-left pl-2"><?= esc($row->ds_biz_no) ?></td>
|
||||
<td class="text-left pl-2"><?= esc($row->ds_va_number) ?></td>
|
||||
<td class="text-center"><?= (int) $row->ds_state === 1 ? '정상' : ((int) $row->ds_state === 2 ? '폐업' : '직권해지') ?></td>
|
||||
<td class="text-left pl-2"><?= esc($row->ds_regdate ?? '') ?></td>
|
||||
<td class="text-center">
|
||||
<a href="<?= base_url('admin/designated-shops/edit/' . (int) $row->ds_idx) ?>" class="text-blue-600 hover:underline text-sm">수정</a>
|
||||
<form action="<?= base_url('admin/designated-shops/delete/' . (int) $row->ds_idx) ?>" method="POST" class="inline ml-1" onsubmit="return confirm('이 지정판매소를 삭제하시겠습니까?');">
|
||||
<a href="<?= mgmt_url('designated-shops/show/' . (int) $row->ds_idx) ?>" class="text-gray-700 hover:underline text-sm mr-1">상세</a>
|
||||
<a href="<?= mgmt_url('designated-shops/edit/' . (int) $row->ds_idx) ?>" class="text-blue-600 hover:underline text-sm">수정</a>
|
||||
<form action="<?= mgmt_url('designated-shops/delete/' . (int) $row->ds_idx) ?>" method="POST" class="inline ml-1" onsubmit="return confirm('이 지정판매소를 삭제하시겠습니까?');">
|
||||
<?= csrf_field() ?>
|
||||
<button type="submit" class="text-red-600 hover:underline text-sm">삭제</button>
|
||||
</form>
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
<?php
|
||||
helper('pii_mask');
|
||||
?>
|
||||
<?= view('components/print_header', ['printTitle' => '지정판매소 지도']) ?>
|
||||
<section class="border-b border-gray-300 p-2 shrink-0 bg-control-panel">
|
||||
<div class="flex flex-wrap items-center justify-between gap-y-2">
|
||||
@@ -25,7 +28,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
var geocoder = new kakao.maps.services.Geocoder();
|
||||
var shops = <?= json_encode(array_map(function($s) {
|
||||
return ['name' => $s->ds_name, 'addr' => $s->ds_addr ?? '', 'rep' => $s->ds_rep_name ?? '', 'tel' => $s->ds_tel ?? ''];
|
||||
return ['name' => $s->ds_name, 'addr' => $s->ds_addr ?? '', 'rep' => mask_person_name($s->ds_rep_name ?? null), 'tel' => $s->ds_tel ?? ''];
|
||||
}, $shops), JSON_UNESCAPED_UNICODE) ?>;
|
||||
|
||||
var bounds = new kakao.maps.LatLngBounds();
|
||||
|
||||
94
app/Views/admin/designated_shop/show.php
Normal file
94
app/Views/admin/designated_shop/show.php
Normal file
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
$shop = $shop ?? null;
|
||||
$currentLg = $currentLg ?? null;
|
||||
$stateLabel = $stateLabel ?? '';
|
||||
$can_edit = $can_edit ?? false;
|
||||
if ($shop === null) {
|
||||
return;
|
||||
}
|
||||
helper('pii_mask');
|
||||
$val = static fn (?string $s): string => $s !== null && $s !== '' ? $s : '—';
|
||||
$dispMask = static function (string $masked): string {
|
||||
return $masked !== '' ? $masked : '—';
|
||||
};
|
||||
?>
|
||||
<section class="border-b border-gray-300 p-2 shrink-0 bg-control-panel">
|
||||
<div class="flex flex-wrap items-center justify-between gap-2">
|
||||
<span class="text-sm font-bold text-gray-700">지정판매소 정보</span>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="<?= mgmt_url('designated-shops') ?>" class="border border-gray-300 text-gray-600 px-3 py-1 rounded-sm text-sm hover:bg-gray-50">목록</a>
|
||||
<?php if ($can_edit): ?>
|
||||
<a href="<?= mgmt_url('designated-shops/edit/' . (int) $shop->ds_idx) ?>" class="bg-btn-search text-white px-3 py-1 rounded-sm text-sm hover:opacity-90">수정</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div class="border border-gray-300 p-4 mt-2 bg-white max-w-3xl space-y-3 text-sm">
|
||||
<?php if ($currentLg !== null): ?>
|
||||
<div class="flex flex-wrap gap-2 border-b border-gray-100 pb-2">
|
||||
<span class="font-bold text-gray-700 w-28 shrink-0">지자체</span>
|
||||
<span><?= esc($currentLg->lg_name) ?> <span class="text-gray-500">(<?= esc($currentLg->lg_code) ?>)</span></span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<span class="font-bold text-gray-700 w-28 shrink-0">판매소번호</span>
|
||||
<span class="font-mono"><?= esc($shop->ds_shop_no) ?></span>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<span class="font-bold text-gray-700 w-28 shrink-0">구코드</span>
|
||||
<span class="font-mono"><?= esc($val($shop->ds_gugun_code ?? null)) ?></span>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<span class="font-bold text-gray-700 w-28 shrink-0">상호명</span>
|
||||
<span class="font-semibold"><?= esc($shop->ds_name) ?></span>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<span class="font-bold text-gray-700 w-28 shrink-0">사업자번호</span>
|
||||
<span><?= esc($val($shop->ds_biz_no ?? null)) ?></span>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<span class="font-bold text-gray-700 w-28 shrink-0">대표자명</span>
|
||||
<span><?= esc($dispMask(mask_person_name($shop->ds_rep_name ?? null))) ?></span>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<span class="font-bold text-gray-700 w-28 shrink-0">가상계좌</span>
|
||||
<span><?= esc($val($shop->ds_va_number ?? null)) ?></span>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<span class="font-bold text-gray-700 w-28 shrink-0">우편번호</span>
|
||||
<span><?= esc($val($shop->ds_zip ?? null)) ?></span>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<span class="font-bold text-gray-700 w-28 shrink-0">도로명주소</span>
|
||||
<span><?= esc($val($shop->ds_addr ?? null)) ?></span>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<span class="font-bold text-gray-700 w-28 shrink-0">지번주소</span>
|
||||
<span><?= esc($val($shop->ds_addr_jibun ?? null)) ?></span>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<span class="font-bold text-gray-700 w-28 shrink-0">일반전화</span>
|
||||
<span><?= esc($val($shop->ds_tel ?? null)) ?></span>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<span class="font-bold text-gray-700 w-28 shrink-0">대표 휴대전화</span>
|
||||
<span><?= esc($dispMask(mask_mobile_phone($shop->ds_rep_phone ?? null))) ?></span>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<span class="font-bold text-gray-700 w-28 shrink-0">이메일</span>
|
||||
<span><?= esc($val($shop->ds_email ?? null)) ?></span>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<span class="font-bold text-gray-700 w-28 shrink-0">지정일자</span>
|
||||
<span><?= esc($val($shop->ds_designated_at ?? null)) ?></span>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<span class="font-bold text-gray-700 w-28 shrink-0">영업상태</span>
|
||||
<span><?= esc($stateLabel) ?></span>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<span class="font-bold text-gray-700 w-28 shrink-0">등록일시</span>
|
||||
<span><?= esc($val($shop->ds_regdate ?? null)) ?></span>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user