feat: 지자체 전환 현재 선택 표시 + 전화주문 결제구분 기본 가상계좌
- 지자체 전환 화면에서 현재 작업 지자체 라디오 체크 + '현재 선택' 배지 - 전화 주문 접수 결제구분 기본값을 가상계좌로 설정 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -22,10 +22,13 @@ class SelectLocalGovernment extends BaseController
|
||||
->orderBy('lg_name', 'ASC')
|
||||
->findAll();
|
||||
|
||||
$currentLgIdx = (int) (session()->get('admin_selected_lg_idx') ?? 0);
|
||||
|
||||
return view('admin/layout', [
|
||||
'title' => '지자체 선택',
|
||||
'content' => view('admin/select_local_government/index', [
|
||||
'list' => $list,
|
||||
'currentLgIdx' => $currentLgIdx,
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -7,11 +7,18 @@
|
||||
<?php else: ?>
|
||||
<form action="<?= base_url('admin/select-local-government') ?>" method="POST" class="space-y-3">
|
||||
<?= csrf_field() ?>
|
||||
<?php $currentLgIdx = (int) ($currentLgIdx ?? 0); ?>
|
||||
<ul class="space-y-2">
|
||||
<?php foreach ($list as $lg): ?>
|
||||
<?php $isCurrent = ((int) $lg->lg_idx === $currentLgIdx); ?>
|
||||
<li class="flex items-center gap-2">
|
||||
<input type="radio" name="lg_idx" id="lg_<?= $lg->lg_idx ?>" value="<?= (int) $lg->lg_idx ?>" class="rounded border-gray-300 text-blue-600 focus:ring-blue-500"/>
|
||||
<input type="radio" name="lg_idx" id="lg_<?= $lg->lg_idx ?>" value="<?= (int) $lg->lg_idx ?>" <?= $isCurrent ? 'checked' : '' ?> class="rounded border-gray-300 text-blue-600 focus:ring-blue-500"/>
|
||||
<label for="lg_<?= $lg->lg_idx ?>" class="text-sm font-medium text-gray-800 cursor-pointer"><?= esc($lg->lg_name) ?> (<?= esc($lg->lg_code) ?>)</label>
|
||||
<?php if ($isCurrent): ?>
|
||||
<span class="inline-flex items-center gap-1 text-xs font-semibold text-emerald-700 bg-emerald-50 border border-emerald-200 rounded-full px-2 py-0.5">
|
||||
<i class="fa-solid fa-check"></i> 현재 선택
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<select id="payment-type" class="border border-gray-300 rounded px-3 py-1.5 text-sm w-40" name="so_payment_type" required>
|
||||
<option value="">선택</option>
|
||||
<option value="이체">이체</option>
|
||||
<option value="가상계좌">가상계좌</option>
|
||||
<option value="가상계좌" selected>가상계좌</option>
|
||||
</select>
|
||||
<span id="payment-guide" class="text-xs text-gray-500"></span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user