From d8f549d390fdfa58378718c1e00d46e90c2b52c5 Mon Sep 17 00:00:00 2001 From: twsystem1004 Date: Wed, 8 Jul 2026 05:51:25 +0000 Subject: [PATCH] =?UTF-8?q?feat(=E6=A9=9F=E5=8F=B0=E8=A8=AD=E5=AE=9A):=20?= =?UTF-8?q?=E9=87=91=E6=B5=81=E9=85=8D=E7=BD=AE=E9=98=B2=E5=91=86=E7=A2=BA?= =?UTF-8?q?=E8=AA=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 機台編輯頁「金流與發票」區塊,若金流配置維持「不使用」(未選), 按「儲存變更」時跳出原生 confirm 提示,確認才送出。純前端提醒, 後端 payment_config_id 仍為 nullable。 Co-Authored-By: Claude Opus 4.8 (1M context) --- lang/en.json | 1 + lang/zh_TW.json | 1 + resources/views/admin/basic-settings/machines/edit.blade.php | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/lang/en.json b/lang/en.json index 7c5fa20..2d49c90 100644 --- a/lang/en.json +++ b/lang/en.json @@ -1584,6 +1584,7 @@ "Payment Amount": "Payment Amount", "Payment Buffer Seconds": "Payment Buffer Seconds", "Payment Config": "Payment Config", + "No payment config is selected (Not Used). Save this machine without any payment config?": "No payment config is selected (Not Used). Save this machine without any payment config?", "Payment Configuration": "Payment Configuration", "Payment Configuration created successfully.": "Payment Configuration created successfully.", "Payment Configuration deleted successfully.": "Payment Configuration deleted successfully.", diff --git a/lang/zh_TW.json b/lang/zh_TW.json index df7ed1f..806adcb 100644 --- a/lang/zh_TW.json +++ b/lang/zh_TW.json @@ -1585,6 +1585,7 @@ "Payment Amount": "支付金額", "Payment Buffer Seconds": "金流緩衝時間(s)", "Payment Config": "金流配置", + "No payment config is selected (Not Used). Save this machine without any payment config?": "尚未選擇金流配置(目前為「不使用」)。確定要在沒有金流配置的情況下儲存嗎?", "Payment Configuration": "客戶金流設定", "Payment Configuration created successfully.": "金流設定已成功建立。", "Payment Configuration deleted successfully.": "金流設定已成功刪除。", diff --git a/resources/views/admin/basic-settings/machines/edit.blade.php b/resources/views/admin/basic-settings/machines/edit.blade.php index 48de703..2fe52f2 100644 --- a/resources/views/admin/basic-settings/machines/edit.blade.php +++ b/resources/views/admin/basic-settings/machines/edit.blade.php @@ -75,6 +75,11 @@ })); return; } + if (!this.$el.payment_config_id.value.trim()) { + if (!confirm('{{ __("No payment config is selected (Not Used). Save this machine without any payment config?") }}')) { + return; + } + } this.$el.submit(); } }" @submit.prevent="submitForm" action="{{ route('admin.basic-settings.machines.update', $machine) }}" method="POST" enctype="multipart/form-data" class="space-y-6">