增加後台圖檔旋轉功能。加強報名地址檢查。修正前台文字。增加前後台報名欄位。設定報名欄位TWID為UNIQUE。修正前台報名可以連續送出的問題。

This commit is contained in:
Eric Li
2025-06-19 12:02:27 +08:00
parent 32b04d09c3
commit 7529061de5
17 changed files with 171 additions and 15 deletions

View File

@ -54,6 +54,11 @@ class ImprovedHealthFillFormController extends Controller
} else {
$enable = false;
}
$passCount = EventImprovedHealth::where('check_state', 2)->count();
if ($passCount >= $eventInfo['limit']) {
$enable = false;
}
}
return view('improved_health', [
@ -96,6 +101,10 @@ class ImprovedHealthFillFormController extends Controller
} else {
throw new \Exception('活動已截止。');
}
$passCount = EventImprovedHealth::where('check_state', 2)->count();
if ($passCount >= $eventInfo['limit']) {
throw new \Exception('活動已截止。');
}
}
DB::beginTransaction();
@ -116,6 +125,7 @@ class ImprovedHealthFillFormController extends Controller
if ($eventItem->check_state == 2) {
throw new \Exception('您已經登記審查通過。');
}
$eventItem->disease_type = $request->input('disease_type');
$eventItem->hospital_name = $request->input('hospital_name');
$eventItem->name = $request->input('name');
$eventItem->phone = $request->input('phone');