[FIX] 修正取貨碼有效期限固定為 24 小時的問題
1. 建立取貨碼時,隱藏的「自訂日期」欄位會被預填為明天並隨表單送出,導致後端 expires_at 永遠為 filled,固定套用約 24 小時。 2. 時數模式時 disabled 掉 expires_at 欄位,自訂日期模式時 disabled 掉 expires_hours 欄位,使停用欄位不被提交。 3. 修正後時數滑桿與自訂日期可各自正確生效,取貨碼有效期限依使用者設定產生。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
231cff9574
commit
6ca3fa8a6b
@ -330,6 +330,7 @@ transition-all duration-300",
|
||||
<div class="flex items-center gap-6 mb-6">
|
||||
<div class="flex-1 relative">
|
||||
<input type="range" name="expires_hours" x-model="expiresHours" min="1" max="168"
|
||||
:disabled="expiryMode !== 'hours'"
|
||||
class="w-full h-1.5 bg-slate-200 dark:bg-slate-700/50 rounded-lg appearance-none cursor-pointer accent-cyan-500">
|
||||
</div>
|
||||
<div class="shrink-0 w-24 py-3 bg-white dark:bg-slate-900 rounded-2xl border border-slate-200 dark:border-slate-700 shadow-sm text-center">
|
||||
@ -351,7 +352,8 @@ transition-all duration-300",
|
||||
<div x-show="expiryMode === 'date'" x-transition>
|
||||
<div class="relative group mb-6">
|
||||
<input type="text" name="expires_at" x-model="customExpiry"
|
||||
x-init="const fp = flatpickr($el, {
|
||||
:disabled="expiryMode !== 'date'"
|
||||
x-init="const fp = flatpickr($el, {
|
||||
enableTime: true,
|
||||
dateFormat: 'Y-m-d H:i',
|
||||
time_24hr: true,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user