fix: 플래시 메시지 중복 표시 제거

레이아웃(embed/portal)에서 이미 success/error 를 표시하므로 뷰 안의 중복 출력 제거.
일괄입고·스캐너입고·전화주문 화면에서 메시지가 한 번만 표시됨.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
taekyoungc
2026-06-15 13:31:38 +09:00
parent b9dd24082c
commit 77c7d3e119
3 changed files with 3 additions and 22 deletions

View File

@@ -3,16 +3,7 @@
</section> </section>
<div class="border border-gray-300 rounded-lg p-4 mt-2 bg-white"> <div class="border border-gray-300 rounded-lg p-4 mt-2 bg-white">
<?php if (session()->getFlashdata('success')): ?> <?php /* success·error 플래시는 레이아웃(embed/portal)에서 한 번만 표시 — 중복 방지. (검증 errors 목록만 여기서 표시) */ ?>
<div class="mb-3 border border-emerald-300 bg-emerald-50 text-emerald-800 px-3 py-2 rounded-sm text-sm">
<?= esc(session()->getFlashdata('success')) ?>
</div>
<?php endif; ?>
<?php if (session()->getFlashdata('error')): ?>
<div class="mb-3 border border-red-300 bg-red-50 text-red-700 px-3 py-2 rounded-sm text-sm">
<?= esc(session()->getFlashdata('error')) ?>
</div>
<?php endif; ?>
<?php $flashErrors = session()->getFlashdata('errors'); ?> <?php $flashErrors = session()->getFlashdata('errors'); ?>
<?php if (is_array($flashErrors) && $flashErrors !== []): ?> <?php if (is_array($flashErrors) && $flashErrors !== []): ?>
<div class="mb-3 border border-red-300 bg-red-50 text-red-700 px-3 py-2 rounded-sm text-sm"> <div class="mb-3 border border-red-300 bg-red-50 text-red-700 px-3 py-2 rounded-sm text-sm">

View File

@@ -6,12 +6,7 @@
</div> </div>
</section> </section>
<?php if (session()->getFlashdata('success')): ?> <?php /* 플래시 메시지는 레이아웃(embed/portal)에서 한 번만 표시한다 — 중복 출력 방지 */ ?>
<div class="mt-2 border border-green-300 bg-green-50 text-green-800 px-3 py-2 text-sm"><?= esc((string) session()->getFlashdata('success')) ?></div>
<?php endif; ?>
<?php if (session()->getFlashdata('error')): ?>
<div class="mt-2 border border-red-300 bg-red-50 text-red-800 px-3 py-2 text-sm"><?= esc((string) session()->getFlashdata('error')) ?></div>
<?php endif; ?>
<section class="p-2 bg-white border border-gray-300 rounded-lg mt-2"> <section class="p-2 bg-white border border-gray-300 rounded-lg mt-2">
<form method="get" action="<?= base_url('bag/receiving/batch') ?>" class="flex flex-wrap items-center gap-2"> <form method="get" action="<?= base_url('bag/receiving/batch') ?>" class="flex flex-wrap items-center gap-2">

View File

@@ -6,12 +6,7 @@
</div> </div>
</section> </section>
<?php if (session()->getFlashdata('success')): ?> <?php /* 플래시 메시지는 레이아웃(embed/portal)에서 한 번만 표시 — 중복 출력 방지 */ ?>
<div class="mt-2 border border-green-300 bg-green-50 text-green-800 px-3 py-2 text-sm"><?= esc((string) session()->getFlashdata('success')) ?></div>
<?php endif; ?>
<?php if (session()->getFlashdata('error')): ?>
<div class="mt-2 border border-red-300 bg-red-50 text-red-800 px-3 py-2 text-sm"><?= esc((string) session()->getFlashdata('error')) ?></div>
<?php endif; ?>
<section class="p-2 bg-white border border-gray-300 rounded-lg mt-2"> <section class="p-2 bg-white border border-gray-300 rounded-lg mt-2">
<form method="get" action="<?= base_url('bag/receiving/scanner') ?>" class="flex flex-wrap items-end gap-2"> <form method="get" action="<?= base_url('bag/receiving/scanner') ?>" class="flex flex-wrap items-end gap-2">