Files
jongryangje/app/Views/admin/designated_shop/show.php

95 lines
4.2 KiB
PHP
Raw Normal View History

<?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>