star-cloud/resources/views/admin/sales/partials/batch-result-banner.blade.php
terrylee ce9e52efd9 fix(sales): 批次下載 CSV 連結加 download 屬性,避免觸發全域導航遮罩卡住畫面
全域連結攔截器(layouts/admin)點 <a href> 會顯示導航載入遮罩,但檔案下載不換頁、
遮罩不會關閉,導致畫面卡在模糊+進度條停在~95%。加 download 屬性即可被攔截器豁免。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 15:27:38 +08:00

30 lines
1.8 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@if(session('code_batch'))
@php($batch = session('code_batch'))
<div class="luxury-card rounded-3xl p-6 border border-emerald-500/30 bg-emerald-500/5 flex flex-col sm:flex-row sm:items-center gap-4 animate-luxury-in">
<div class="flex items-center gap-3 flex-1">
<div class="w-11 h-11 rounded-2xl bg-emerald-500/15 text-emerald-500 flex items-center justify-center shrink-0">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M5 13l4 4L19 7" />
</svg>
</div>
<div>
<p class="text-sm font-black text-slate-800 dark:text-white">{{ __('Batch generated successfully') }}</p>
<p class="text-xs font-bold text-slate-500">
{{ __('Batch No') }}: <span class="font-mono text-cyan-600 dark:text-cyan-400">{{ $batch['batch_no'] }}</span>
· {{ $batch['count'] }} {{ __('codes') }}
</p>
</div>
</div>
{{-- download 屬性讓全域連結攔截器layouts/admin跳過「導航載入遮罩」
否則檔案下載不會換頁、遮罩不會關閉,畫面會卡在模糊狀態。 --}}
<a href="{{ $batch['download_url'] }}" download
class="btn-luxury-primary whitespace-nowrap flex items-center justify-center gap-2">
<svg class="w-4 h-4 stroke-[2.5]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round"
d="M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M7.5 12l4.5 4.5m0 0l4.5-4.5M12 3v13.5" />
</svg>
{{ __('Download List (CSV)') }}
</a>
</div>
@endif