diff --git a/app/Http/Controllers/Admin/EventHealthAllowanceCrudController.php b/app/Http/Controllers/Admin/EventHealthAllowanceCrudController.php index 2040441..076d915 100644 --- a/app/Http/Controllers/Admin/EventHealthAllowanceCrudController.php +++ b/app/Http/Controllers/Admin/EventHealthAllowanceCrudController.php @@ -23,6 +23,7 @@ class EventHealthAllowanceCrudController extends CrudController //use \Backpack\CRUD\app\Http\Controllers\Operations\DeleteOperation; //use \Backpack\CRUD\app\Http\Controllers\Operations\ShowOperation; use \Backpack\CRUD\app\Http\Controllers\Operations\UpdateOperation { update as traitUpdate; } + use \RedSquirrelStudio\LaravelBackpackExportOperation\ExportOperation; /** @@ -37,6 +38,57 @@ class EventHealthAllowanceCrudController extends CrudController CRUD::setEntityNameStrings('活動:反轉代謝新人生', '活動:反轉代謝新人生'); } + protected function setupExportOperation() + { + CRUD::addColumns([ + [ + 'name' => 'id', + 'label' => 'ID', + 'type' => 'text', + 'prefix' => 'A-' + ], + [ + 'name' => 'check_state', + 'label' => '審核狀態', + 'type' => 'select_from_array', + 'options' => ['1' => '未審核 ', '2' => '通過 〇', '3' => '未通過 ✖'], + ], + [ + 'name' => 'hospital_name', + 'label' => '就醫院所', + 'type' => 'text', + ], + [ + 'name' => 'name', + 'label' => '姓名', + 'type' => 'text', + ], + [ + 'name' => 'twid', + 'label' => '身份證', + 'type' => 'text', + ], + [ + 'name' => 'phone', + 'label' => '手機號碼', + 'type' => 'text', + ], + [ + 'name' => 'email', + 'label' => 'Email', + 'type' => 'text', + ], + [ + 'name' => 'address', + 'label' => '地址', + 'type' => 'textarea', + ], + ]); + + $this->setupListOperation(); + $this->disableUserConfiguration(); + } + /** * Define what happens when the List operation is loaded. * @@ -45,7 +97,42 @@ class EventHealthAllowanceCrudController extends CrudController */ protected function setupListOperation() { + CRUD::filter('審核狀態') + ->type('dropdown') + ->values([ + 1 => '未審核', + 2 => '通過 〇', + 3 => '未通過 ✖' + + ]) + ->whenActive(function($value) { + CRUD::addClause('where', 'check_state', $value); + }); + CRUD::filter('ID') + ->type('text') + ->whenActive(function($value) { + CRUD::addClause('where', 'id', $value); + }); + CRUD::filter('就醫院所') + ->type('text') + ->whenActive(function($value) { + CRUD::addClause('where', 'hospital_name', 'LIKE', "%$value%"); + }); + CRUD::filter('姓名') + ->type('text') + ->whenActive(function($value) { + CRUD::addClause('where', 'name', 'LIKE', "%$value%"); + }); + $this->crud->addColumns([ + [ + 'name' => 'id', + 'label' => '報名流水號', + 'type' => 'text', + 'value' => function($entry) { + return 'C-'. str_pad($entry->id, 6, '0', STR_PAD_LEFT); + } + ], [ 'name' => 'created_at', 'label' => '登記時間', @@ -68,7 +155,11 @@ class EventHealthAllowanceCrudController extends CrudController 'label' => '姓名', 'type' => 'text' ], - + [ + 'name' => 'hospital_name', + 'label' => '就醫院所', + 'type' => 'text', + ], ]); } @@ -142,7 +233,7 @@ class EventHealthAllowanceCrudController extends CrudController 'url' => function ($crud) { $entry = $crud->getCurrentEntry(); $path = str_replace("uploads/", "", $entry->record_card_img_src); - return $path ? route('storage.serve', $path) : "about:blank"; + return $path ? route('storage.serve', $path) : ""; }, 'width' => '400px', 'height' => '300px', @@ -157,7 +248,7 @@ class EventHealthAllowanceCrudController extends CrudController 'url' => function ($crud) { $entry = $crud->getCurrentEntry(); $path = str_replace("uploads/", "", $entry->twid_front_img_src); - return $path ? route('storage.serve', $path) : "about:blank"; + return $path ? route('storage.serve', $path) : ""; }, 'width' => '400px', 'height' => '300px', @@ -172,7 +263,7 @@ class EventHealthAllowanceCrudController extends CrudController 'url' => function ($crud) { $entry = $crud->getCurrentEntry(); $path = str_replace("uploads/", "", $entry->twid_back_img_src); - return $path ? route('storage.serve', $path) : "about:blank"; + return $path ? route('storage.serve', $path) : ""; }, 'width' => '400px', 'height' => '300px', @@ -187,7 +278,7 @@ class EventHealthAllowanceCrudController extends CrudController 'url' => function ($crud) { $entry = $crud->getCurrentEntry(); $path = str_replace("uploads/", "", $entry->exam_1st_img_src); - return $path ? route('storage.serve', $path) : "about:blank"; + return $path ? route('storage.serve', $path) : ""; }, 'width' => '400px', 'height' => '300px', @@ -202,7 +293,7 @@ class EventHealthAllowanceCrudController extends CrudController 'url' => function ($crud) { $entry = $crud->getCurrentEntry(); $path = str_replace("uploads/", "", $entry->exam_2nd_img_src); - return $path ? route('storage.serve', $path) : "about:blank"; + return $path ? route('storage.serve', $path) : ""; }, 'width' => '400px', 'height' => '300px', @@ -230,12 +321,15 @@ class EventHealthAllowanceCrudController extends CrudController "title" => "反轉代謝新人生 皮蛇疫苗加碼補 審核通過!", "body" => "恭喜您審核通過!" ."\n\n登記資料:" + ."\n流水號: C-".str_pad($entry->id, 6, '0', STR_PAD_LEFT) ."\n就醫院所:".$entry->hospital_name ."\n姓名:".$entry->name ."\n身份證字號:".substr($entry->twid,0,2)."xxxx".substr($entry->twid,-4) ."\n行動電話:".$entry->phone ."\n電子信箱:".$entry->email ."\n收件地址:".$entry->address + ."\n\n中獎公告:本活動將於10月抽出得獎名單並公告於「活動網站/最新消息」及「桃園市政府衛生局網站/訊息公告/最新消息」。" + , ])); } catch (Exception $ex) { @@ -250,6 +344,7 @@ class EventHealthAllowanceCrudController extends CrudController ."\n請依以下理由重新上活動網站登記" ."\n理由:".$entry->check_reson ."\n\n登記資料:" + ."\n流水號: C-".str_pad($entry->id, 6, '0', STR_PAD_LEFT) ."\n就醫院所:".$entry->hospital_name ."\n姓名:".$entry->name ."\n身份證字號:".substr($entry->twid,0,2)."xxxx".substr($entry->twid,-4) diff --git a/app/Http/Controllers/Admin/EventImprovedHealthCrudController.php b/app/Http/Controllers/Admin/EventImprovedHealthCrudController.php index 8681c71..b3b377b 100644 --- a/app/Http/Controllers/Admin/EventImprovedHealthCrudController.php +++ b/app/Http/Controllers/Admin/EventImprovedHealthCrudController.php @@ -23,6 +23,7 @@ class EventImprovedHealthCrudController extends CrudController //use \Backpack\CRUD\app\Http\Controllers\Operations\DeleteOperation; //use \Backpack\CRUD\app\Http\Controllers\Operations\ShowOperation; use \Backpack\CRUD\app\Http\Controllers\Operations\UpdateOperation { update as traitUpdate; } + use \RedSquirrelStudio\LaravelBackpackExportOperation\ExportOperation; /** * Configure the CrudPanel object. Apply settings to all operations. @@ -36,6 +37,57 @@ class EventImprovedHealthCrudController extends CrudController CRUD::setEntityNameStrings('活動:健康達標GO', '活動:健康達標GO'); } + protected function setupExportOperation() + { + CRUD::addColumns([ + [ + 'name' => 'id', + 'label' => 'ID', + 'type' => 'text', + 'prefix' => 'A-' + ], + [ + 'name' => 'check_state', + 'label' => '審核狀態', + 'type' => 'select_from_array', + 'options' => ['1' => '未審核 ', '2' => '通過 〇', '3' => '未通過 ✖'], + ], + [ + 'name' => 'hospital_name', + 'label' => '就醫院所', + 'type' => 'text', + ], + [ + 'name' => 'name', + 'label' => '姓名', + 'type' => 'text', + ], + [ + 'name' => 'twid', + 'label' => '身份證', + 'type' => 'text', + ], + [ + 'name' => 'phone', + 'label' => '手機號碼', + 'type' => 'text', + ], + [ + 'name' => 'email', + 'label' => 'Email', + 'type' => 'text', + ], + [ + 'name' => 'address', + 'label' => '地址', + 'type' => 'textarea', + ], + ]); + + $this->setupListOperation(); + $this->disableUserConfiguration(); + } + /** * Define what happens when the List operation is loaded. * @@ -44,7 +96,42 @@ class EventImprovedHealthCrudController extends CrudController */ protected function setupListOperation() { + CRUD::filter('審核狀態') + ->type('dropdown') + ->values([ + 1 => '未審核', + 2 => '通過 〇', + 3 => '未通過 ✖' + + ]) + ->whenActive(function($value) { + CRUD::addClause('where', 'check_state', $value); + }); + CRUD::filter('ID') + ->type('text') + ->whenActive(function($value) { + CRUD::addClause('where', 'id', $value); + }); + CRUD::filter('就醫院所') + ->type('text') + ->whenActive(function($value) { + CRUD::addClause('where', 'hospital_name', 'LIKE', "%$value%"); + }); + CRUD::filter('姓名') + ->type('text') + ->whenActive(function($value) { + CRUD::addClause('where', 'name', 'LIKE', "%$value%"); + }); + $this->crud->addColumns([ + [ + 'name' => 'id', + 'label' => '報名流水號', + 'type' => 'text', + 'value' => function($entry) { + return 'B-'. str_pad($entry->id, 6, '0', STR_PAD_LEFT); + } + ], [ 'name' => 'created_at', 'label' => '登記時間', @@ -67,7 +154,11 @@ class EventImprovedHealthCrudController extends CrudController 'label' => '姓名', 'type' => 'text' ], - + [ + 'name' => 'hospital_name', + 'label' => '就醫院所', + 'type' => 'text', + ], ]); } @@ -140,7 +231,7 @@ class EventImprovedHealthCrudController extends CrudController 'url' => function ($crud) { $entry = $crud->getCurrentEntry(); $path = str_replace("uploads/", "", $entry->record_card_img_src); - return $path ? route('storage.serve', $path) : "about:blank"; + return $path ? route('storage.serve', $path) : ""; }, 'width' => '400px', 'height' => '300px', @@ -155,7 +246,7 @@ class EventImprovedHealthCrudController extends CrudController 'url' => function ($crud) { $entry = $crud->getCurrentEntry(); $path = str_replace("uploads/", "", $entry->twid_front_img_src); - return $path ? route('storage.serve', $path) : "about:blank"; + return $path ? route('storage.serve', $path) : ""; }, 'width' => '400px', 'height' => '300px', @@ -170,7 +261,7 @@ class EventImprovedHealthCrudController extends CrudController 'url' => function ($crud) { $entry = $crud->getCurrentEntry(); $path = str_replace("uploads/", "", $entry->twid_back_img_src); - return $path ? route('storage.serve', $path) : "about:blank"; + return $path ? route('storage.serve', $path) : ""; }, 'width' => '400px', 'height' => '300px', @@ -185,7 +276,22 @@ class EventImprovedHealthCrudController extends CrudController 'url' => function ($crud) { $entry = $crud->getCurrentEntry(); $path = str_replace("uploads/", "", $entry->exam_img_src); - return $path ? route('storage.serve', $path) : "about:blank"; + return $path ? route('storage.serve', $path) : ""; + }, + 'width' => '400px', + 'height' => '300px', + 'extra_attributes' => [ + 'sandbox' => 'allow-same-origin allow-scripts allow-popups', // Security: Restrict iframe + 'allow' => 'fullscreen', + ], + 'hint' => '', + ]); + + CRUD::iframe('exam2_img_src', '檢查報告2', [ + 'url' => function ($crud) { + $entry = $crud->getCurrentEntry(); + $path = str_replace("uploads/", "", $entry->exam2_img_src); + return $path ? route('storage.serve', $path) : ""; }, 'width' => '400px', 'height' => '300px', @@ -213,12 +319,15 @@ class EventImprovedHealthCrudController extends CrudController "title" => "健康達標GO 大獎汽車不是夢 審核通過!", "body" => "恭喜您審核通過!" ."\n\n登記資料:" + ."\n流水號: B-".str_pad($entry->id, 6, '0', STR_PAD_LEFT) ."\n就醫院所:".$entry->hospital_name ."\n姓名:".$entry->name ."\n身份證字號:".substr($entry->twid,0,2)."xxxx".substr($entry->twid,-4) ."\n行動電話:".$entry->phone ."\n電子信箱:".$entry->email ."\n收件地址:".$entry->address + ."\n\n中獎公告:本活動將於10月抽出得獎名單並公告於「活動網站/最新消息」及「桃園市政府衛生局網站/訊息公告/最新消息」。" + , ])); } catch (Exception $ex) { @@ -233,6 +342,7 @@ class EventImprovedHealthCrudController extends CrudController ."\n請依以下理由重新上活動網站登記" ."\n理由:".$entry->check_reson ."\n\n登記資料:" + ."\n流水號: B-".str_pad($entry->id, 6, '0', STR_PAD_LEFT) ."\n就醫院所:".$entry->hospital_name ."\n姓名:".$entry->name ."\n身份證字號:".substr($entry->twid,0,2)."xxxx".substr($entry->twid,-4) diff --git a/app/Http/Controllers/Admin/EventMetabolismCrudController.php b/app/Http/Controllers/Admin/EventMetabolismCrudController.php index d08bcdf..f1753ac 100644 --- a/app/Http/Controllers/Admin/EventMetabolismCrudController.php +++ b/app/Http/Controllers/Admin/EventMetabolismCrudController.php @@ -23,6 +23,7 @@ class EventMetabolismCrudController extends CrudController //use \Backpack\CRUD\app\Http\Controllers\Operations\DeleteOperation; //use \Backpack\CRUD\app\Http\Controllers\Operations\ShowOperation; use \Backpack\CRUD\app\Http\Controllers\Operations\UpdateOperation { update as traitUpdate; } + use \RedSquirrelStudio\LaravelBackpackExportOperation\ExportOperation; /** @@ -37,6 +38,57 @@ class EventMetabolismCrudController extends CrudController CRUD::setEntityNameStrings('活動:符合代謝新收案', '活動:符合代謝新收案'); } + protected function setupExportOperation() + { + CRUD::addColumns([ + [ + 'name' => 'id', + 'label' => 'ID', + 'type' => 'text', + 'prefix' => 'A-' + ], + [ + 'name' => 'check_state', + 'label' => '審核狀態', + 'type' => 'select_from_array', + 'options' => ['1' => '未審核 ', '2' => '通過 〇', '3' => '未通過 ✖'], + ], + [ + 'name' => 'hospital_name', + 'label' => '就醫院所', + 'type' => 'text', + ], + [ + 'name' => 'name', + 'label' => '姓名', + 'type' => 'text', + ], + [ + 'name' => 'twid', + 'label' => '身份證', + 'type' => 'text', + ], + [ + 'name' => 'phone', + 'label' => '手機號碼', + 'type' => 'text', + ], + [ + 'name' => 'email', + 'label' => 'Email', + 'type' => 'text', + ], + [ + 'name' => 'address', + 'label' => '地址', + 'type' => 'textarea', + ], + ]); + + $this->setupListOperation(); + $this->disableUserConfiguration(); + } + /** * Define what happens when the List operation is loaded. * @@ -45,7 +97,42 @@ class EventMetabolismCrudController extends CrudController */ protected function setupListOperation() { + CRUD::filter('審核狀態') + ->type('dropdown') + ->values([ + 1 => '未審核', + 2 => '通過 〇', + 3 => '未通過 ✖' + + ]) + ->whenActive(function($value) { + CRUD::addClause('where', 'check_state', $value); + }); + CRUD::filter('ID') + ->type('text') + ->whenActive(function($value) { + CRUD::addClause('where', 'id', $value); + }); + CRUD::filter('就醫院所') + ->type('text') + ->whenActive(function($value) { + CRUD::addClause('where', 'hospital_name', 'LIKE', "%$value%"); + }); + CRUD::filter('姓名') + ->type('text') + ->whenActive(function($value) { + CRUD::addClause('where', 'name', 'LIKE', "%$value%"); + }); + $this->crud->addColumns([ + [ + 'name' => 'id', + 'label' => '報名流水號', + 'type' => 'text', + 'value' => function($entry) { + return 'A-'. str_pad($entry->id, 6, '0', STR_PAD_LEFT); + } + ], [ 'name' => 'created_at', 'label' => '登記時間', @@ -68,6 +155,11 @@ class EventMetabolismCrudController extends CrudController 'label' => '姓名', 'type' => 'text' ], + [ + 'name' => 'hospital_name', + 'label' => '就醫院所', + 'type' => 'text', + ], ]); } @@ -142,7 +234,7 @@ class EventMetabolismCrudController extends CrudController 'url' => function ($crud) { $entry = $crud->getCurrentEntry(); $path = str_replace("uploads/", "", $entry->record_card_img_src); - return $path ? route('storage.serve', $path) : "about:blank"; + return $path ? route('storage.serve', $path) : ""; }, 'width' => '400px', 'height' => '300px', @@ -157,7 +249,7 @@ class EventMetabolismCrudController extends CrudController 'url' => function ($crud) { $entry = $crud->getCurrentEntry(); $path = str_replace("uploads/", "", $entry->twid_front_img_src); - return $path ? route('storage.serve', $path) : "about:blank"; + return $path ? route('storage.serve', $path) : ""; }, 'width' => '400px', 'height' => '300px', @@ -172,7 +264,7 @@ class EventMetabolismCrudController extends CrudController 'url' => function ($crud) { $entry = $crud->getCurrentEntry(); $path = str_replace("uploads/", "", $entry->twid_back_img_src); - return $path ? route('storage.serve', $path) : "about:blank"; + return $path ? route('storage.serve', $path) : ""; }, 'width' => '400px', 'height' => '300px', @@ -201,12 +293,15 @@ class EventMetabolismCrudController extends CrudController "title" => "符合代謝新收案 早鳥報名最划算 審核通過!", "body" => "恭喜您審核通過!" ."\n\n登記資料:" + ."\n流水號: A-".str_pad($entry->id, 6, '0', STR_PAD_LEFT) ."\n就醫院所:".$entry->hospital_name ."\n姓名:".$entry->name ."\n身份證字號:".substr($entry->twid,0,2)."xxxx".substr($entry->twid,-4) ."\n行動電話:".$entry->phone ."\n電子信箱:".$entry->email ."\n收件地址:".$entry->address + ."\n\n中獎公告:本活動將於10月抽出得獎名單並公告於「活動網站/最新消息」及「桃園市政府衛生局網站/訊息公告/最新消息」。" + ."\n禮券發送方式說明:凡報名經審核通過者,我們將於3個工作天內,將 7-ELEVEN 電子禮券序號寄送至您報名時所填寫的電子信箱,敬請留意收信。" , ])); } catch (Exception $ex) { @@ -221,6 +316,7 @@ class EventMetabolismCrudController extends CrudController ."\n請依以下理由重新上活動網站登記" ."\n理由:".$entry->check_reson ."\n\n登記資料:" + ."\n流水號: A-".str_pad($entry->id, 6, '0', STR_PAD_LEFT) ."\n就醫院所:".$entry->hospital_name ."\n姓名:".$entry->name ."\n身份證字號:".substr($entry->twid,0,2)."xxxx".substr($entry->twid,-4) diff --git a/app/Http/Controllers/HealthAllowanceFillFormController.php b/app/Http/Controllers/HealthAllowanceFillFormController.php index 9931d55..0d70c4d 100644 --- a/app/Http/Controllers/HealthAllowanceFillFormController.php +++ b/app/Http/Controllers/HealthAllowanceFillFormController.php @@ -351,6 +351,7 @@ class HealthAllowanceFillFormController extends Controller Mail::to($request->input('email'))->send(new EventNotifyMail([ "title" => "反轉代謝新人生 皮蛇疫苗加碼補 登記成功!", "body" => "登記資料:" + ."\n流水號: C-".str_pad($eventItem->id, 6, '0', STR_PAD_LEFT) ."\n就醫院所:".$request->input('hospital_name') ."\n姓名:".$request->input('name') ."\n身份證字號:".substr($request->input('twid'),0,2)."xxxx".substr($request->input('twid'),-4) diff --git a/app/Http/Controllers/ImprovedHealthFillFormController.php b/app/Http/Controllers/ImprovedHealthFillFormController.php index 9e1b4df..68f1b79 100644 --- a/app/Http/Controllers/ImprovedHealthFillFormController.php +++ b/app/Http/Controllers/ImprovedHealthFillFormController.php @@ -261,6 +261,36 @@ class ImprovedHealthFillFormController extends Controller throw new \Exception('請上傳檢查報告。'); } + $fileName = $request->input('fileExam2FileName'); + if ($fileName && $request->filled('fileExam2Base64')) { + $fileBase64 = $request->input('fileExam2Base64'); + $fileData = base64_decode($fileBase64); + $fileExt = pathinfo($fileName, PATHINFO_EXTENSION); + if (!in_array($fileExt, $acceptExt)) { + throw new \Exception('檢查報告檔案 副檔名錯誤,只接受.jpg/.jpeg/.png/.pdf'); + } + $mimeType = $finfo->buffer($fileData); + if (!in_array($mimeType, $allowedMimeTypes)) { + throw new \Exception('檢查報告檔案 檔案類型錯誤,只接受.jpg/.jpeg/.png/.pdf'); + } + if ($mimeType != 'application/pdf') { + $image = $manager->read($fileData); + $image->scaleDown(2048, 2048); + $fileData = $image->toJpeg(50); + $fileExt = 'jpg'; + } + if ($eventItem->exam2_img_src) { + try { + Storage::disk('local')->delete($eventItem->exam2_img_src); + } catch (\Exception $ex2) { + + } + } + $fileName = $eventItem->twid . "_Exam2_" . $uploadTime . "." . $fileExt; + Storage::disk('local')->put($uploadPath. '/' . $fileName, $fileData); + $eventItem->exam2_img_src = $uploadPath.'/'.$fileName; + } + // $file = $request->file('fileRecordCard'); // if ($file) { // $fileExt = $file->getClientOriginalExtension(); @@ -310,6 +340,7 @@ class ImprovedHealthFillFormController extends Controller Mail::to($request->input('email'))->send(new EventNotifyMail([ "title" => "健康達標GO 大獎汽車不是夢 登記成功!", "body" => "登記資料:" + ."\n流水號: B-".str_pad($eventItem->id, 6, '0', STR_PAD_LEFT) ."\n就醫院所:".$request->input('hospital_name') ."\n姓名:".$request->input('name') ."\n身份證字號:".substr($request->input('twid'),0,2)."xxxx".substr($request->input('twid'),-4) diff --git a/app/Http/Controllers/MetabolismFillFormController.php b/app/Http/Controllers/MetabolismFillFormController.php index 7a0d858..4b95209 100644 --- a/app/Http/Controllers/MetabolismFillFormController.php +++ b/app/Http/Controllers/MetabolismFillFormController.php @@ -267,6 +267,7 @@ class MetabolismFillFormController extends Controller Mail::to($request->input('email'))->send(new EventNotifyMail([ "title" => "符合代謝新收案 早鳥報名最划算 登記成功!", "body" => "登記資料:" + ."\n流水號: A-".str_pad($eventItem->id, 6, '0', STR_PAD_LEFT) ."\n就醫院所:".$request->input('hospital_name') ."\n姓名:".$request->input('name') ."\n身份證字號:".substr($request->input('twid'),0,2)."xxxx".substr($request->input('twid'),-4) diff --git a/app/Http/Requests/EventHealthAllowanceRequest.php b/app/Http/Requests/EventHealthAllowanceRequest.php index 7cdcfc3..44046f9 100644 --- a/app/Http/Requests/EventHealthAllowanceRequest.php +++ b/app/Http/Requests/EventHealthAllowanceRequest.php @@ -19,7 +19,7 @@ class EventHealthAllowanceRequest extends FormRequest 'twid' => 'required|isNI', 'phone' => 'required|phone:TW', 'email' => 'required|email', - 'address' => 'required|min:5', + 'address' => ['required','regex:/^(\d{3})\s+([\p{Han}]{2,4}[縣市])\s+([\p{Han}]{2,4}[鎮鄉市區])\s+([\p{Han}]+[里村])\s+(.+)$/u'], 'check_reson' => 'required_if:check_state,3', ]; } @@ -51,6 +51,7 @@ class EventHealthAllowanceRequest extends FormRequest return [ 'twid.is_n_i' => '身份證字號驗證有誤', 'phone.phone' => '行動電話驗證有誤', + 'address.regex' => '收件地址格式有誤,請填寫完整。', 'check_reson.required_if' => '當審核狀態為「未通過」時,必需填寫「審核回應」欄位' ]; } diff --git a/app/Http/Requests/EventImprovedHealthRequest.php b/app/Http/Requests/EventImprovedHealthRequest.php index e8449aa..f445ec8 100644 --- a/app/Http/Requests/EventImprovedHealthRequest.php +++ b/app/Http/Requests/EventImprovedHealthRequest.php @@ -31,7 +31,7 @@ class EventImprovedHealthRequest extends FormRequest 'twid' => 'required|isNI', 'phone' => 'required|phone:TW', 'email' => 'required|email', - 'address' => 'required|min:5', + 'address' => ['required','regex:/^(\d{3})\s+([\p{Han}]{2,4}[縣市])\s+([\p{Han}]{2,4}[鎮鄉市區])\s+([\p{Han}]+[里村])\s+(.+)$/u'], 'check_reson' => 'required_if:check_state,3', ]; } @@ -63,6 +63,7 @@ class EventImprovedHealthRequest extends FormRequest return [ 'twid.is_n_i' => '身份證字號驗證有誤', 'phone.phone' => '行動電話驗證有誤', + 'address.regex' => '收件地址格式有誤,請填寫完整。', 'check_reson.required_if' => '當審核狀態為「未通過」時,必需填寫「審核回應」欄位' ]; } diff --git a/app/Http/Requests/EventMetabolismRequest.php b/app/Http/Requests/EventMetabolismRequest.php index e7f74f1..3a3f5cd 100644 --- a/app/Http/Requests/EventMetabolismRequest.php +++ b/app/Http/Requests/EventMetabolismRequest.php @@ -31,7 +31,7 @@ class EventMetabolismRequest extends FormRequest 'twid' => 'required|isNI', 'phone' => 'required|phone:TW', 'email' => 'required|email', - 'address' => 'required|min:5', + 'address' => ['required','regex:/^(\d{3})\s+([\p{Han}]{2,4}[縣市])\s+([\p{Han}]{2,4}[鎮鄉市區])\s+([\p{Han}]+[里村])\s+(.+)$/u'], 'check_reson' => 'required_if:check_state,3', ]; } @@ -63,6 +63,7 @@ class EventMetabolismRequest extends FormRequest return [ 'twid.is_n_i' => '身份證字號驗證有誤', 'phone.phone' => '行動電話驗證有誤', + 'address.regex' => '收件地址格式有誤,請填寫完整。', 'check_reson.required_if' => '當審核狀態為「未通過」時,必需填寫「審核回應」欄位' ]; } diff --git a/composer.json b/composer.json index ffd2170..0e7a92d 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,8 @@ "laravel/sanctum": "^3.3", "laravel/tinker": "^2.8", "laravel/ui": "^4.6", - "propaganistas/laravel-phone": "^5.3" + "propaganistas/laravel-phone": "^5.3", + "redsquirrelstudio/laravel-backpack-export-operation": "^1.1" }, "require-dev": { "backpack/generators": "^4.0", diff --git a/composer.lock b/composer.lock index 41bfd7f..03b2222 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "789a05aa01186c38069e456722b68963", + "content-hash": "7d91f48cc9ec37699b8f3e6718df3353", "packages": [ { "name": "backpack/activity-log", @@ -768,6 +768,166 @@ }, "time": "2024-09-10T14:09:25+00:00" }, + { + "name": "composer/pcre", + "version": "3.3.2", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<1.11.10" + }, + "require-dev": { + "phpstan/phpstan": "^1.12 || ^2", + "phpstan/phpstan-strict-rules": "^1 || ^2", + "phpunit/phpunit": "^8 || ^9" + }, + "type": "library", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + }, + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.3.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-11-12T16:29:46+00:00" + }, + { + "name": "composer/semver", + "version": "3.4.3", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", + "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.11", + "symfony/phpunit-bridge": "^3 || ^7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.4.3" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-09-19T14:15:21+00:00" + }, { "name": "creativeorange/gravatar", "version": "v1.0.25", @@ -1755,6 +1915,67 @@ }, "time": "2024-12-26T03:57:07+00:00" }, + { + "name": "ezyang/htmlpurifier", + "version": "v4.18.0", + "source": { + "type": "git", + "url": "https://github.com/ezyang/htmlpurifier.git", + "reference": "cb56001e54359df7ae76dc522d08845dc741621b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/cb56001e54359df7ae76dc522d08845dc741621b", + "reference": "cb56001e54359df7ae76dc522d08845dc741621b", + "shasum": "" + }, + "require": { + "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" + }, + "require-dev": { + "cerdic/css-tidy": "^1.7 || ^2.0", + "simpletest/simpletest": "dev-master" + }, + "suggest": { + "cerdic/css-tidy": "If you want to use the filter 'Filter.ExtractStyleBlocks'.", + "ext-bcmath": "Used for unit conversion and imagecrash protection", + "ext-iconv": "Converts text to and from non-UTF-8 encodings", + "ext-tidy": "Used for pretty-printing HTML" + }, + "type": "library", + "autoload": { + "files": [ + "library/HTMLPurifier.composer.php" + ], + "psr-0": { + "HTMLPurifier": "library/" + }, + "exclude-from-classmap": [ + "/library/HTMLPurifier/Language/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "Edward Z. Yang", + "email": "admin@htmlpurifier.org", + "homepage": "http://ezyang.com" + } + ], + "description": "Standards compliant HTML filter written in PHP", + "homepage": "http://htmlpurifier.org/", + "keywords": [ + "html" + ], + "support": { + "issues": "https://github.com/ezyang/htmlpurifier/issues", + "source": "https://github.com/ezyang/htmlpurifier/tree/v4.18.0" + }, + "time": "2024-11-01T03:51:45+00:00" + }, { "name": "facade/ignition-contracts", "version": "1.0.2", @@ -3472,6 +3693,271 @@ ], "time": "2024-09-21T08:32:55+00:00" }, + { + "name": "maatwebsite/excel", + "version": "3.1.64", + "source": { + "type": "git", + "url": "https://github.com/SpartnerNL/Laravel-Excel.git", + "reference": "e25d44a2d91da9179cd2d7fec952313548597a79" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/e25d44a2d91da9179cd2d7fec952313548597a79", + "reference": "e25d44a2d91da9179cd2d7fec952313548597a79", + "shasum": "" + }, + "require": { + "composer/semver": "^3.3", + "ext-json": "*", + "illuminate/support": "5.8.*||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0||^12.0", + "php": "^7.0||^8.0", + "phpoffice/phpspreadsheet": "^1.29.9", + "psr/simple-cache": "^1.0||^2.0||^3.0" + }, + "require-dev": { + "laravel/scout": "^7.0||^8.0||^9.0||^10.0", + "orchestra/testbench": "^6.0||^7.0||^8.0||^9.0||^10.0", + "predis/predis": "^1.1" + }, + "type": "library", + "extra": { + "laravel": { + "aliases": { + "Excel": "Maatwebsite\\Excel\\Facades\\Excel" + }, + "providers": [ + "Maatwebsite\\Excel\\ExcelServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Maatwebsite\\Excel\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Patrick Brouwers", + "email": "patrick@spartner.nl" + } + ], + "description": "Supercharged Excel exports and imports in Laravel", + "keywords": [ + "PHPExcel", + "batch", + "csv", + "excel", + "export", + "import", + "laravel", + "php", + "phpspreadsheet" + ], + "support": { + "issues": "https://github.com/SpartnerNL/Laravel-Excel/issues", + "source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.64" + }, + "funding": [ + { + "url": "https://laravel-excel.com/commercial-support", + "type": "custom" + }, + { + "url": "https://github.com/patrickbrouwers", + "type": "github" + } + ], + "time": "2025-02-24T11:12:50+00:00" + }, + { + "name": "maennchen/zipstream-php", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/maennchen/ZipStream-PHP.git", + "reference": "6187e9cc4493da94b9b63eb2315821552015fca9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/6187e9cc4493da94b9b63eb2315821552015fca9", + "reference": "6187e9cc4493da94b9b63eb2315821552015fca9", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "ext-zlib": "*", + "php-64bit": "^8.1" + }, + "require-dev": { + "ext-zip": "*", + "friendsofphp/php-cs-fixer": "^3.16", + "guzzlehttp/guzzle": "^7.5", + "mikey179/vfsstream": "^1.6", + "php-coveralls/php-coveralls": "^2.5", + "phpunit/phpunit": "^10.0", + "vimeo/psalm": "^5.0" + }, + "suggest": { + "guzzlehttp/psr7": "^2.4", + "psr/http-message": "^2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "ZipStream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paul Duncan", + "email": "pabs@pablotron.org" + }, + { + "name": "Jonatan Männchen", + "email": "jonatan@maennchen.ch" + }, + { + "name": "Jesse Donat", + "email": "donatj@gmail.com" + }, + { + "name": "András Kolesár", + "email": "kolesar@kolesar.hu" + } + ], + "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.", + "keywords": [ + "stream", + "zip" + ], + "support": { + "issues": "https://github.com/maennchen/ZipStream-PHP/issues", + "source": "https://github.com/maennchen/ZipStream-PHP/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/maennchen", + "type": "github" + } + ], + "time": "2024-10-10T12:33:01+00:00" + }, + { + "name": "markbaker/complex", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPComplex.git", + "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/95c56caa1cf5c766ad6d65b6344b807c1e8405b9", + "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "^9.3", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with complex numbers", + "homepage": "https://github.com/MarkBaker/PHPComplex", + "keywords": [ + "complex", + "mathematics" + ], + "support": { + "issues": "https://github.com/MarkBaker/PHPComplex/issues", + "source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.2" + }, + "time": "2022-12-06T16:21:08+00:00" + }, + { + "name": "markbaker/matrix", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPMatrix.git", + "reference": "728434227fe21be27ff6d86621a1b13107a2562c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/728434227fe21be27ff6d86621a1b13107a2562c", + "reference": "728434227fe21be27ff6d86621a1b13107a2562c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "^9.3", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "^4.0", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "sebastian/phpcpd": "^4.0", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Matrix\\": "classes/src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@demon-angel.eu" + } + ], + "description": "PHP Class for working with matrices", + "homepage": "https://github.com/MarkBaker/PHPMatrix", + "keywords": [ + "mathematics", + "matrix", + "vector" + ], + "support": { + "issues": "https://github.com/MarkBaker/PHPMatrix/issues", + "source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.1" + }, + "time": "2022-12-02T22:17:43+00:00" + }, { "name": "mklkj/tinymce-i18n", "version": "24.12.30", @@ -4010,6 +4496,112 @@ ], "time": "2024-11-21T10:36:35+00:00" }, + { + "name": "phpoffice/phpspreadsheet", + "version": "1.29.10", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", + "reference": "c80041b1628c4f18030407134fe88303661d4e4e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/c80041b1628c4f18030407134fe88303661d4e4e", + "reference": "c80041b1628c4f18030407134fe88303661d4e4e", + "shasum": "" + }, + "require": { + "composer/pcre": "^1||^2||^3", + "ext-ctype": "*", + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "ext-zip": "*", + "ext-zlib": "*", + "ezyang/htmlpurifier": "^4.15", + "maennchen/zipstream-php": "^2.1 || ^3.0", + "markbaker/complex": "^3.0", + "markbaker/matrix": "^3.0", + "php": "^7.4 || ^8.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0", + "psr/simple-cache": "^1.0 || ^2.0 || ^3.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-main", + "dompdf/dompdf": "^1.0 || ^2.0 || ^3.0", + "friendsofphp/php-cs-fixer": "^3.2", + "mitoteam/jpgraph": "^10.3", + "mpdf/mpdf": "^8.1.1", + "phpcompatibility/php-compatibility": "^9.3", + "phpstan/phpstan": "^1.1", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^8.5 || ^9.0", + "squizlabs/php_codesniffer": "^3.7", + "tecnickcom/tcpdf": "^6.5" + }, + "suggest": { + "dompdf/dompdf": "Option for rendering PDF with PDF Writer", + "ext-intl": "PHP Internationalization Functions", + "mitoteam/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", + "mpdf/mpdf": "Option for rendering PDF with PDF Writer", + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "https://blog.maartenballiauw.be" + }, + { + "name": "Mark Baker", + "homepage": "https://markbakeruk.net" + }, + { + "name": "Franck Lefevre", + "homepage": "https://rootslabs.net" + }, + { + "name": "Erik Tilt" + }, + { + "name": "Adrien Crivelli" + } + ], + "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", + "keywords": [ + "OpenXML", + "excel", + "gnumeric", + "ods", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "support": { + "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.10" + }, + "time": "2025-02-08T02:56:14+00:00" + }, { "name": "phpoption/phpoption", "version": "1.9.3", @@ -4977,6 +5569,55 @@ ], "time": "2024-04-27T21:32:50+00:00" }, + { + "name": "redsquirrelstudio/laravel-backpack-export-operation", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/redsquirrelstudio/laravel-backpack-export-operation.git", + "reference": "e070e055a2e7c5f24c6228fb92d67b5c790fe6cc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/redsquirrelstudio/laravel-backpack-export-operation/zipball/e070e055a2e7c5f24c6228fb92d67b5c790fe6cc", + "reference": "e070e055a2e7c5f24c6228fb92d67b5c790fe6cc", + "shasum": "" + }, + "require": { + "backpack/crud": "^5.0|^6.0", + "maatwebsite/excel": "^3.1" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "RedSquirrelStudio\\LaravelBackpackExportOperation\\Providers\\ExportOperationProvider" + ] + } + }, + "autoload": { + "psr-4": { + "RedSquirrelStudio\\LaravelBackpackExportOperation\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Lewis Raggett", + "email": "lewisraggett17@gmail.com", + "homepage": "https://github.com/redsquirrelstudio" + } + ], + "description": "An operation to make configurable exports for your CRUDs using the Backpack api you know and love", + "support": { + "issues": "https://github.com/redsquirrelstudio/laravel-backpack-export-operation/issues", + "source": "https://github.com/redsquirrelstudio/laravel-backpack-export-operation/tree/1.1.0" + }, + "time": "2024-12-03T15:39:09+00:00" + }, { "name": "select2/select2", "version": "4.0.13", @@ -7840,87 +8481,6 @@ }, "time": "2024-10-15T10:41:40+00:00" }, - { - "name": "composer/semver", - "version": "3.4.3", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", - "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.11", - "symfony/phpunit-bridge": "^3 || ^7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "support": { - "irc": "ircs://irc.libera.chat:6697/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.4.3" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2024-09-19T14:15:21+00:00" - }, { "name": "dragon-code/contracts", "version": "2.24.0", diff --git a/config/backpack/operations/export.php b/config/backpack/operations/export.php new file mode 100644 index 0000000..3a10346 --- /dev/null +++ b/config/backpack/operations/export.php @@ -0,0 +1,20 @@ + ExportLog::class, + + //Filesystem disk to store uploaded export files + 'disk' => env('FILESYSTEM_DISK', 'local'), + + //Path to store uploaded export files + 'path' => env('BACKPACK_EXPORT_FILE_PATH', 'exports'), + + //Queue to dispatch export jobs to + 'queue' => env('QUEUE_CONNECTION', 'sync'), +]; diff --git a/config/backpack/theme-tabler.php b/config/backpack/theme-tabler.php index 1a8c95c..6960e67 100644 --- a/config/backpack/theme-tabler.php +++ b/config/backpack/theme-tabler.php @@ -39,6 +39,7 @@ return [ * - boom! */ 'styles' => [ + 'https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.11.5/css/lightbox.min.css', base_path('vendor/backpack/theme-tabler/resources/assets/css/color-adjustments.css'), base_path('vendor/backpack/theme-tabler/resources/assets/css/colors.css'), ], diff --git a/config/backpack/ui.php b/config/backpack/ui.php index 39b2a3f..bae12c3 100644 --- a/config/backpack/ui.php +++ b/config/backpack/ui.php @@ -115,6 +115,7 @@ return [ // JS files that are loaded in all pages, using Laravel's asset() helper 'scripts' => [ + 'https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.11.5/js/lightbox.min.js', // 'js/example.js', // 'https://cdn.jsdelivr.net/npm/vue@2.4.4/dist/vue.min.js', // 'https://cdn.jsdelivr.net/npm/react@16/umd/react.production.min.js', diff --git a/database/migrations/2024_01_28_134646_create_export_log_table.php b/database/migrations/2024_01_28_134646_create_export_log_table.php new file mode 100644 index 0000000..aface41 --- /dev/null +++ b/database/migrations/2024_01_28_134646_create_export_log_table.php @@ -0,0 +1,35 @@ +id(); + $table->bigInteger('user_id')->index('export_log_user_id')->nullable(); + $table->text('file_path')->nullable(); + $table->string('file_type')->default('csv'); + $table->string('disk')->default('local'); + $table->text('model'); + $table->longText('config')->nullable(); + $table->dateTime('started_at')->nullable(); + $table->dateTime('completed_at')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('export_log'); + } +}; diff --git a/lang/vendor/export-operation/zh_TW/export.php b/lang/vendor/export-operation/zh_TW/export.php new file mode 100644 index 0000000..50f9822 --- /dev/null +++ b/lang/vendor/export-operation/zh_TW/export.php @@ -0,0 +1,29 @@ + '匯出', + 'export_entity' => '匯出 :entity', + 'include_all' => '全部包含', + 'exclude_all' => '全部排除', + 'include' => '包含', + 'exclude' => '排除', + 'column' => '欄位', + 'include_in_export' => '包含在匯出中', + 'confirm_export' => '確認匯出', + 'file_type' => '檔案類型', + 'no_filter' => '尚未選擇任何篩選條件,將匯出整個表格!!', + 'enabled_filters' => '啟用的篩選條件', + 'filters' => '篩選條件', + 'entries' => '條目', + 'values' => '值', + 'csv' => 'CSV', + 'xls' => 'XLS', + 'xlsx' => 'XLSX', + 'ods' => 'ODS', + 'pdf' => 'PDF', + 'your_export_is_being_generated' => '您的匯出正在生成,請稍候...', + 'your_export_is_complete' => '您的匯出已完成。如果未自動下載,請點擊下面的按鈕。', + 'click_to_download' => '點擊此處下載您的匯出檔案', + 'please_include_at_least_one' => '請至少包含一個欄位進行匯出', + 'your_export_will_be_processed' => '感謝您,您的匯出將在後台處理', +]; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 900ceb1..891a31c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,9 @@ "requires": true, "packages": { "": { + "dependencies": { + "lightbox2": "^2.11.5" + }, "devDependencies": { "@popperjs/core": "^2.11.6", "axios": "^1.6.4", @@ -1507,6 +1510,11 @@ "vite": "^5.0.0 || ^6.0.0" } }, + "node_modules/lightbox2": { + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/lightbox2/-/lightbox2-2.11.5.tgz", + "integrity": "sha512-IsDqv/D9pjgh7GvwTNvmHF98+nrIcOD17fraXgtx8ivq469y95l5ycLi6SeZAZHdeyD3cGLjYwbDX8SRfWx5fA==" + }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", diff --git a/package.json b/package.json index 9a0b5bf..97551a3 100644 --- a/package.json +++ b/package.json @@ -12,5 +12,8 @@ "laravel-vite-plugin": "^1.0.0", "sass": "^1.56.1", "vite": "^5.0.0" + }, + "dependencies": { + "lightbox2": "^2.11.5" } } diff --git a/public/assets/images/health_allowance_intro_01.jpg b/public/assets/images/health_allowance_intro_01.jpg index e54f625..ff52a05 100644 Binary files a/public/assets/images/health_allowance_intro_01.jpg and b/public/assets/images/health_allowance_intro_01.jpg differ diff --git a/resources/views/event-notify-mail.blade.php b/resources/views/event-notify-mail.blade.php index 9d25b0c..97c747c 100644 --- a/resources/views/event-notify-mail.blade.php +++ b/resources/views/event-notify-mail.blade.php @@ -11,6 +11,7 @@
活動網站網址:https://health.goodcake.tw/
+客服電話:(02) 2297-0109 / 客服信箱:info@shibasays.com
- Ⓒ2025 桃園市政府衛生局-定期追蹤不落拍-健康管理醫起來-活動網站 -