diff --git a/app/Http/Controllers/CalendarController.php b/app/Http/Controllers/CalendarController.php index 552399c..933df86 100644 --- a/app/Http/Controllers/CalendarController.php +++ b/app/Http/Controllers/CalendarController.php @@ -2,23 +2,22 @@ namespace App\Http\Controllers; -use Illuminate\Http\Request; use App\Models\Event; -use Carbon\Carbon; +use Illuminate\Http\Request; class CalendarController extends Controller { /** * Display a listing of the resource. * - * @return \Illuminate\Http\Response + * @return array */ public function index() { $calendar_events = array(); $events = Event::all(); $category_array =['#A8D8B9', '#7DB9DE','#E6E5A3', '#9B90C2', '#E87A90']; // 0 => 爬山(綠色), 1 => 溯溪(藍色), 2 => 社課(黃色), 3 => 開會(紫色), 4' => 山防(紅色) - $category = ['0' => "出隊 | ", '1' => "出隊 | ", '2' => "社課 | ", '3' => "討論 | ", '4' => "山防 | "]; + $category = ['0' => "出隊 | ", '1' => "溯溪 | ", '2' => "社課 | ", '3' => "討論 | ", '4' => "山防 | "]; foreach ($events as $event) { $calendar_events[] = [ 'id' => $event->id, @@ -28,7 +27,7 @@ public function index() 'color' => $category_array[$event->category], ]; } - + return $calendar_events; } /** diff --git a/app/Http/Controllers/JudgementController.php b/app/Http/Controllers/JudgementController.php index a054f46..637180c 100644 --- a/app/Http/Controllers/JudgementController.php +++ b/app/Http/Controllers/JudgementController.php @@ -52,4 +52,14 @@ public function rule() return view('judgement.rule'); } + /** + * 顯示評分紀錄規則 + * + * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View + */ + public function pointRule() + { + return view('judgement.pointRule'); + } + } diff --git a/database/migrations/2024_06_15_201813_add_create_user_and_modify_user_to_judgements_table.php b/database/migrations/2024_06_15_201813_add_create_user_and_modify_user_to_judgements_table.php index 4ea72fd..dfd6f01 100644 --- a/database/migrations/2024_06_15_201813_add_create_user_and_modify_user_to_judgements_table.php +++ b/database/migrations/2024_06_15_201813_add_create_user_and_modify_user_to_judgements_table.php @@ -14,7 +14,7 @@ class AddCreateUserAndModifyUserToJudgementsTable extends Migration public function up() { Schema::table('judgements', function (Blueprint $table) { - $table->unsignedBigInteger('create_user')->nullable()->after('created_at'); // 假設 'id' 是表中的第一個欄位 + $table->unsignedBigInteger('create_user')->nullable()->after('created_at'); $table->unsignedBigInteger('modify_user')->nullable()->after('create_user'); }); } diff --git a/database/migrations/2024_07_07_161156_add_comments_to_course_records_table.php b/database/migrations/2024_07_07_161156_add_comments_to_course_records_table.php new file mode 100644 index 0000000..3d364a9 --- /dev/null +++ b/database/migrations/2024_07_07_161156_add_comments_to_course_records_table.php @@ -0,0 +1,46 @@ +comment = '社課登記表,紀錄有誰報名過社課'; + $table->unsignedBigInteger('user_id')->comment('使用者 ID')->change(); + $table->unsignedBigInteger('course_id')->comment('社課 ID')->change(); + $table->unsignedBigInteger('create_user')->after('updated_at')->nullable()->comment('建立者 ID'); + $table->unsignedBigInteger('modify_user')->after('create_user')->nullable()->comment('更新者 ID'); + }); + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('course_records', function (Blueprint $table) { + // Remove added columns + $table->dropColumn('create_user'); + $table->dropColumn('modify_user'); + + // Remove comments + $table->unsignedBigInteger('user_id')->comment(null)->change(); + $table->unsignedBigInteger('course_id')->comment(null)->change(); + $table->timestamp('created_at')->nullable()->comment(null)->change(); + $table->timestamp('updated_at')->nullable()->comment(null)->change(); + $table->comment = null; + }); + } +} diff --git a/database/migrations/2024_07_07_163641_add_comments_to_courses_table.php b/database/migrations/2024_07_07_163641_add_comments_to_courses_table.php new file mode 100644 index 0000000..26f45ae --- /dev/null +++ b/database/migrations/2024_07_07_163641_add_comments_to_courses_table.php @@ -0,0 +1,53 @@ +unsignedBigInteger('create_user')->nullable()->comment('建立者 ID'); + $table->unsignedBigInteger('modify_user')->nullable()->comment('更新者 ID'); + + $table->comment = '社課資訊表,紀錄社課詳細資訊'; + $table->string('title', 50)->comment('標題')->change(); + $table->string('videoURL', 255)->nullable()->comment('影片 URL')->change(); + $table->string('pptURL', 255)->nullable()->comment('PPT URL')->change(); + $table->string('image', 255)->comment('圖片路徑')->change(); + $table->date('date')->comment('社課日期')->change(); + $table->string('speaker', 255)->comment('講者')->change(); + $table->string('location', 255)->comment('地點')->change(); + $table->text('description')->comment('社課簡介')->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('courses', function (Blueprint $table) { + $table->dropColumn('create_user'); + $table->dropColumn('modify_user'); + $table->string('title', 50)->comment(null)->change(); + $table->string('videoURL', 255)->nullable()->comment(null)->change(); + $table->string('pptURL', 255)->nullable()->comment(null)->change(); + $table->string('image', 255)->comment(null)->change(); + $table->date('date')->comment(null)->change(); + $table->string('speaker', 255)->comment(null)->change(); + $table->string('location', 255)->comment(null)->change(); + $table->text('description')->comment(null)->change(); + $table->comment = null; + }); + } +} diff --git a/database/migrations/2024_07_07_164331_add_comments_to_equipments_table.php b/database/migrations/2024_07_07_164331_add_comments_to_equipments_table.php new file mode 100644 index 0000000..f468a08 --- /dev/null +++ b/database/migrations/2024_07_07_164331_add_comments_to_equipments_table.php @@ -0,0 +1,53 @@ +unsignedBigInteger('create_user')->nullable()->comment('建立者 ID'); + $table->unsignedBigInteger('modify_user')->nullable()->comment('更新者 ID'); + + $table->comment = '裝備資訊表'; + $table->string('name', 255)->nullable()->comment('裝備種類:大背包、睡袋、睡墊 ...')->change(); + $table->string('description', 255)->comment('裝備簡介')->change(); + $table->string('image', 255)->nullable()->comment('圖片路徑')->change(); + $table->date('bought_date')->nullable()->comment('購買日期')->change(); + $table->smallInteger('status')->default(0)->comment('是否出租(0 = 未借出, 1 = 借出, 2 = 遺失)')->change(); + $table->integer('size')->nullable()->comment('裝備尺寸')->change(); + $table->integer('member_price')->comment('社員租借費用')->change(); + $table->integer('normal_price')->comment('非社員租借非用')->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('equipments', function (Blueprint $table) { + $table->dropColumn('create_user'); + $table->dropColumn('modify_user'); + $table->comment = null; + $table->string('name', 255)->nullable()->comment(null)->change(); + $table->string('description', 255)->comment(null)->change(); + $table->string('image', 255)->nullable()->comment(null)->change(); + $table->date('bought_date')->nullable()->comment(null)->change(); + $table->smallInteger('status')->default(0)->comment(null)->change(); + $table->integer('size')->nullable()->comment(null)->change(); + $table->integer('member_price')->comment(null)->change(); + $table->integer('normal_price')->comment(null)->change(); + }); + } +} diff --git a/database/migrations/2024_07_07_171146_add_comments_to_events_table.php b/database/migrations/2024_07_07_171146_add_comments_to_events_table.php new file mode 100644 index 0000000..fc0a04c --- /dev/null +++ b/database/migrations/2024_07_07_171146_add_comments_to_events_table.php @@ -0,0 +1,45 @@ +comment = '行事曆活動記錄表'; + $table->string('title')->comment('活動名稱')->change(); + $table->datetime('start')->comment('開始時間')->change(); + $table->datetime('end')->comment('結束時間')->change(); + $table->integer('category')->comment('活動種類(0 = 出隊, 1 = 溯溪, 2 = 社課, 3 = 討論, 4 = 山防')->change(); + $table->unsignedBigInteger('create_user')->nullable()->comment('建立者 ID'); + $table->unsignedBigInteger('modify_user')->nullable()->comment('更新者 ID'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('events', function (Blueprint $table) { + $table->dropColumn('create_user'); + $table->dropColumn('modify_user'); + $table->comment = null; + $table->string('title')->comment(null)->change(); + $table->datetime('start')->comment(null)->change(); + $table->datetime('end')->comment(null)->change(); + $table->integer('category')->comment(null)->change(); + }); + } +} diff --git a/database/migrations/2024_07_07_172344_add_comments_to_faqs_table.php b/database/migrations/2024_07_07_172344_add_comments_to_faqs_table.php new file mode 100644 index 0000000..ced2f98 --- /dev/null +++ b/database/migrations/2024_07_07_172344_add_comments_to_faqs_table.php @@ -0,0 +1,40 @@ +comment = 'QA 紀錄表'; // Table comment + $table->string('question')->comment('問題')->change(); + $table->longText('answer')->comment('答案')->change(); + $table->unsignedBigInteger('create_user')->nullable()->comment('建立者 ID'); + $table->unsignedBigInteger('modify_user')->nullable()->comment('更新者 ID'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('faqs', function (Blueprint $table) { + $table->dropColumn('create_user'); + $table->dropColumn('modify_user'); + $table->comment = null; + $table->string('question')->comment(null)->change(); + $table->longText('answer')->comment(null)->change(); + }); + } +} diff --git a/database/migrations/2024_07_07_172642_add_comments_to_judgements_table.php b/database/migrations/2024_07_07_172642_add_comments_to_judgements_table.php new file mode 100644 index 0000000..cb58a08 --- /dev/null +++ b/database/migrations/2024_07_07_172642_add_comments_to_judgements_table.php @@ -0,0 +1,61 @@ +comment = '隊伍難度評分表'; + $table->string('name')->comment('隊伍名稱')->change(); + $table->integer('normal_day')->comment('傳統路天數')->change(); + $table->integer('abnormal_day')->comment('非傳統路天數')->change(); + $table->integer('level')->comment('路況分級')->change(); + $table->integer('road')->comment('路跡級別')->change(); + $table->integer('terrain')->comment('地形級別')->change(); + $table->integer('plant')->comment('植被級別')->change(); + $table->integer('energy')->comment('體力級別')->change(); + $table->integer('water')->comment('多背水天數')->change(); + $table->string('result_level')->comment('難度等級')->change(); + $table->integer('score')->comment('難度總分')->change(); + $table->integer('trip_tag')->default(0)->comment('行程(0 = 一般行程, 1 = 壓縮行程, 2 = 寬鬆行程')->change(); + $table->unsignedBigInteger('create_user')->nullable()->comment('建立者 ID')->change(); + $table->unsignedBigInteger('modify_user')->nullable()->comment('更新者 ID')->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('judgements', function (Blueprint $table) { + $table->comment = null; + $table->string('name')->comment(null)->change(); + $table->integer('normal_day')->comment(null)->change(); + $table->integer('abnormal_day')->comment(null)->change(); + $table->integer('level')->comment(null)->change(); + $table->integer('road')->comment(null)->change(); + $table->integer('terrain')->comment(null)->change(); + $table->integer('plant')->comment(null)->change(); + $table->integer('energy')->comment(null)->change(); + $table->integer('water')->comment(null)->change(); + $table->string('result_level')->comment(null)->change(); + $table->integer('score')->comment(null)->change(); + $table->integer('trip_tag')->comment(null)->change(); + $table->unsignedBigInteger('create_user')->comment(null)->change(); + $table->unsignedBigInteger('modify_user')->comment(null)->change(); + }); + } +} diff --git a/database/migrations/2024_07_07_174152_add_comments_to_posts_table.php b/database/migrations/2024_07_07_174152_add_comments_to_posts_table.php new file mode 100644 index 0000000..9ee3c06 --- /dev/null +++ b/database/migrations/2024_07_07_174152_add_comments_to_posts_table.php @@ -0,0 +1,46 @@ +comment = '公告資訊表'; + $table->integer('type')->comment('類型(0 = 隊伍, 1 = 社課, 2 = 其他')->change(); + $table->smallInteger('pin')->default(0)->comment('是否置頂 (0 = 否, 1 = 是)')->change(); + $table->string('title', 50)->comment('標題')->change(); + $table->text('content')->comment('內容')->change(); + $table->datetime('expired_at')->comment('過期時間')->change(); + $table->unsignedBigInteger('create_user')->nullable()->comment('建立者 ID'); + $table->unsignedBigInteger('modify_user')->nullable()->comment('更新者 ID'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('posts', function (Blueprint $table) { + $table->comment = null; + $table->integer('type')->comment(null)->change(); + $table->smallInteger('pin')->default(0)->comment(null)->change(); + $table->string('title', 50)->comment(null)->change(); + $table->text('content')->comment(null)->change(); + $table->datetime('expired_at')->comment(null)->change(); + $table->unsignedBigInteger('create_user')->nullable()->comment(null)->change(); + $table->unsignedBigInteger('modify_user')->nullable()->comment(null)->change(); + }); + } +} diff --git a/database/migrations/2024_07_07_180208_add_comments_to_record_comment_replies_table.php b/database/migrations/2024_07_07_180208_add_comments_to_record_comment_replies_table.php new file mode 100644 index 0000000..eb392b5 --- /dev/null +++ b/database/migrations/2024_07_07_180208_add_comments_to_record_comment_replies_table.php @@ -0,0 +1,42 @@ +comment = '紀錄評論回覆表'; + $table->text('content')->comment('回覆內容')->change(); + $table->unsignedBigInteger('record_comment_id')->comment('評論 ID')->change(); + $table->unsignedBigInteger('record_id')->comment('記錄 ID')->change(); + $table->unsignedBigInteger('create_user')->nullable()->comment('建立者 ID'); + $table->unsignedBigInteger('modify_user')->nullable()->comment('更新者 ID'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('record_comment_replies', function (Blueprint $table) { + $table->comment = null; + $table->text('content')->comment(null)->change(); + $table->unsignedBigInteger('record_comment_id')->comment(null)->change(); + $table->unsignedBigInteger('record_id')->comment(null)->change(); + $table->unsignedBigInteger('create_user')->nullable()->comment(null)->change();; + $table->unsignedBigInteger('modify_user')->nullable()->comment(null)->change();; + }); + } +} diff --git a/database/migrations/2024_07_07_180649_add_comments_to_record_comments_table.php b/database/migrations/2024_07_07_180649_add_comments_to_record_comments_table.php new file mode 100644 index 0000000..6276b18 --- /dev/null +++ b/database/migrations/2024_07_07_180649_add_comments_to_record_comments_table.php @@ -0,0 +1,40 @@ +comment = '紀錄評論表'; + $table->text('content')->comment('評論內容')->change(); + $table->unsignedBigInteger('record_id')->comment('記錄 ID')->change(); + $table->unsignedBigInteger('create_user')->nullable()->comment('建立者 ID'); + $table->unsignedBigInteger('modify_user')->nullable()->comment('更新者 ID'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('record_comments', function (Blueprint $table) { + $table->comment = null; + $table->text('content')->comment(null)->change(); + $table->unsignedBigInteger('record_id')->comment(null)->change(); + $table->unsignedBigInteger('create_user')->nullable()->comment(null)->change();; + $table->unsignedBigInteger('modify_user')->nullable()->comment(null)->change();; + }); + } +} diff --git a/database/migrations/2024_07_07_180927_add_comments_to_records_table.php b/database/migrations/2024_07_07_180927_add_comments_to_records_table.php new file mode 100644 index 0000000..b699658 --- /dev/null +++ b/database/migrations/2024_07_07_180927_add_comments_to_records_table.php @@ -0,0 +1,49 @@ +comment = '隊伍記錄表'; + $table->string('name')->comment('路線名稱')->change(); + $table->string('image')->comment('圖片路徑')->change(); + $table->text('content')->comment('紀錄內容')->change(); + $table->smallInteger('category')->comment('種類(0 = 中級山, 1 = 高山, 2 = 溯溪)')->change(); + $table->date('start_date')->comment('開始日期')->change(); + $table->date('end_date')->comment('結束日期')->change(); + $table->longText('description')->comment('路線簡介')->change(); + $table->unsignedBigInteger('create_user')->nullable()->comment('建立者 ID'); + $table->unsignedBigInteger('modify_user')->nullable()->comment('更新者 ID'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('records', function (Blueprint $table) { + $table->string('name')->comment(null)->change(); + $table->string('image')->comment(null)->change(); + $table->text('content')->comment(null)->change(); + $table->smallInteger('category')->comment(null)->change(); + $table->date('start_date')->comment(null)->change(); + $table->date('end_date')->comment(null)->change(); + $table->longText('description')->comment(null)->change(); + $table->unsignedBigInteger('create_user')->nullable()->comment(null)->change(); + $table->unsignedBigInteger('modify_user')->nullable()->comment(null)->change(); + }); + } +} diff --git a/database/migrations/2024_07_07_181337_add_comments_to_rental_equipment_table.php b/database/migrations/2024_07_07_181337_add_comments_to_rental_equipment_table.php new file mode 100644 index 0000000..76af641 --- /dev/null +++ b/database/migrations/2024_07_07_181337_add_comments_to_rental_equipment_table.php @@ -0,0 +1,40 @@ +comment = '裝備租借紀錄對應表'; + $table->integer('equipment_id')->comment('裝備 ID')->change(); + $table->integer('rental_id')->comment('租借紀錄 ID')->change(); + $table->unsignedBigInteger('create_user')->nullable()->comment('建立者 ID'); + $table->unsignedBigInteger('modify_user')->nullable()->comment('更新者 ID'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('rental_equipment', function (Blueprint $table) { + $table->comment = null; + $table->integer('equipment_id')->comment(null)->change(); + $table->integer('rental_id')->comment(null)->change(); + $table->unsignedBigInteger('create_user')->nullable()->comment(null)->change(); + $table->unsignedBigInteger('modify_user')->nullable()->comment(null)->change(); + }); + } +} diff --git a/database/migrations/2024_07_07_181850_add_comments_to_rentals_table.php b/database/migrations/2024_07_07_181850_add_comments_to_rentals_table.php new file mode 100644 index 0000000..fa358c3 --- /dev/null +++ b/database/migrations/2024_07_07_181850_add_comments_to_rentals_table.php @@ -0,0 +1,46 @@ +comment = '租借記錄表'; + $table->unsignedBigInteger('user_id')->comment('租借者 ID')->change(); + $table->date('rental_date')->comment('租借日期')->change(); + $table->date('return_date')->comment('預計歸還日期')->change(); + $table->date('actual_return_date')->comment('實際歸還日期')->change(); + $table->integer('rental_amount')->comment('租借總金額')->change(); + $table->unsignedBigInteger('create_user')->nullable()->comment('建立者 ID'); + $table->unsignedBigInteger('modify_user')->nullable()->comment('更新者 ID'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('rentals', function (Blueprint $table) { + $table->comment = null; + $table->unsignedBigInteger('user_id')->comment(null)->change(); + $table->date('rental_date')->comment(null)->change(); + $table->date('return_date')->comment(null)->change(); + $table->date('actual_return_date')->comment(null)->change(); + $table->integer('rental_amount')->comment(null)->change(); + $table->unsignedBigInteger('create_user')->nullable()->comment(null)->change(); + $table->unsignedBigInteger('modify_user')->nullable()->comment(null)->change(); + }); + } +} diff --git a/database/migrations/2024_07_07_182204_add_comments_to_users_table.php b/database/migrations/2024_07_07_182204_add_comments_to_users_table.php new file mode 100644 index 0000000..f06d96f --- /dev/null +++ b/database/migrations/2024_07_07_182204_add_comments_to_users_table.php @@ -0,0 +1,56 @@ +comment = '使用者表'; + $table->string('identifier')->nullable()->comment('學號')->change(); + $table->string('name_zh')->comment('中文名稱')->change(); + $table->string('email')->comment('電子信箱')->change(); + $table->string('name_en')->comment('英文名字')->change(); + $table->string('nickname')->nullable()->comment('暱稱')->change(); + $table->string('phone')->nullable()->comment('手機')->change(); + $table->integer('role')->default(0)->comment('角色')->change(); + $table->integer('token_tg')->nullable()->comment('Telegram Token')->change(); + $table->integer('token_line')->nullable()->comment('LINE Token')->change(); + $table->string('remember_token')->nullable()->comment('Remember Token')->change(); + $table->unsignedBigInteger('create_user')->nullable()->comment('建立者 ID'); + $table->unsignedBigInteger('modify_user')->nullable()->comment('更新者 ID'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function (Blueprint $table) { + $table->comment = null; + $table->string('identifier')->nullable()->comment(null)->change(); + $table->string('name_zh')->comment(null)->change(); + $table->string('email')->comment(null)->change(); + $table->string('name_en')->comment(null)->change(); + $table->string('nickname')->nullable()->comment(null)->change(); + $table->string('phone')->nullable()->comment(null)->change(); + $table->integer('role')->default(0)->comment(null)->change(); + $table->integer('token_tg')->nullable()->comment(null)->change(); + $table->integer('token_line')->nullable()->comment(null)->change(); + $table->string('remember_token')->nullable()->comment(null)->change(); + $table->unsignedBigInteger('create_user')->nullable()->comment(null)->change(); + $table->unsignedBigInteger('modify_user')->nullable()->comment(null)->change(); + }); + } +} diff --git a/database/migrations/2024_07_16_231935_create_trips_table.php b/database/migrations/2024_07_16_231935_create_trips_table.php new file mode 100644 index 0000000..8ad4223 --- /dev/null +++ b/database/migrations/2024_07_16_231935_create_trips_table.php @@ -0,0 +1,48 @@ +id(); + $table->unsignedBigInteger('leader_id')->comment('領隊 id'); + $table->integer('expected_cadre_count')->comment('預計幹部人數'); + $table->integer('expected_member_count')->comment('預計隊員人數'); + $table->string('name')->comment('隊伍名稱'); + $table->text('description')->comment('隊伍簡介'); + $table->smallInteger('category')->comment('隊伍分類'); + $table->date('start_date')->comment('隊伍開始日期'); + $table->date('end_date')->comment('隊伍結束日期'); + $table->string('image')->comment('封面圖片路徑'); + $table->decimal('expected_fee', 8, 2)->comment('預期隊費'); + $table->decimal('actual_fee', 8, 2)->nullable()->comment('實際隊費'); + $table->dateTime('registration_open')->comment('報名開始時間'); + $table->dateTime('registration_close')->comment('報名結束時間'); + $table->dateTime('pre_departure_time')->nullable()->comment('行前會時間'); + $table->integer('judgements_id')->comment('隊伍難度 id'); + $table->unsignedBigInteger('create_user')->nullable()->comment('建立者 ID'); + $table->unsignedBigInteger('modify_user')->nullable()->comment('更新者 ID'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('trips'); + } +} diff --git a/database/migrations/2024_07_16_231937_create_trip_members_table.php b/database/migrations/2024_07_16_231937_create_trip_members_table.php new file mode 100644 index 0000000..bdaa899 --- /dev/null +++ b/database/migrations/2024_07_16_231937_create_trip_members_table.php @@ -0,0 +1,36 @@ +id(); + $table->integer('users_id')->comment('隊員 id'); + $table->integer('trips_id')->comment('隊伍 id'); + $table->integer('role')->comment('職位(0: 隊員, 1: 公文, 2: 菜單, 3: 總務, 4: 器材, 5: 紀錄, 6: 保險, 7: 交通, 8: 入山, 9:採買, 10: 醫藥, 11: 氣象)'); + $table->unsignedBigInteger('create_user')->nullable()->comment('建立者 ID'); + $table->unsignedBigInteger('modify_user')->nullable()->comment('更新者 ID'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('trip_members'); + } +} diff --git a/public/sitemap.xml b/public/sitemap.xml index 51f71c4..24e6916 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -1,69 +1,3 @@ - - - http://ncumt.student.ncu.edu.tw/ - 2023-06-01T23:56:42+08:00 - daily - 0.8 - - - http://ncumt.student.ncu.edu.tw/faq - 2023-06-01T23:56:42+08:00 - daily - 0.8 - - - http://ncumt.student.ncu.edu.tw/course - 2023-06-01T23:56:42+08:00 - daily - 0.8 - - - http://ncumt.student.ncu.edu.tw/judgement - 2023-06-01T23:56:42+08:00 - daily - 0.8 - - - http://ncumt.student.ncu.edu.tw/record - 2023-06-01T23:56:42+08:00 - daily - 0.8 - - - http://ncumt.student.ncu.edu.tw/comingsoon - 2023-06-01T23:56:42+08:00 - daily - 0.8 - - - http://ncumt.student.ncu.edu.tw/portal - 2023-06-01T23:56:42+08:00 - daily - 0.8 - - - http://ncumt.student.ncu.edu.tw/record/9 - 2023-06-01T23:56:42+08:00 - daily - 0.8 - - - http://ncumt.student.ncu.edu.tw/record/12 - 2023-06-01T23:56:43+08:00 - daily - 0.8 - - - http://ncumt.student.ncu.edu.tw/record/10 - 2023-06-01T23:56:43+08:00 - daily - 0.8 - - - http://ncumt.student.ncu.edu.tw/portal/login - 2023-06-01T23:56:43+08:00 - daily - 0.8 - + diff --git a/resources/views/basic/navbar.blade.php b/resources/views/basic/navbar.blade.php index ec61fbe..8699890 100644 --- a/resources/views/basic/navbar.blade.php +++ b/resources/views/basic/navbar.blade.php @@ -21,6 +21,7 @@
  • 評分系統
  • 評分紀錄
  • 評分規則
  • +
  • 分數計算
  • @guest
  • 所有紀錄
  • diff --git a/resources/views/judgement/includes/rule.blade.php b/resources/views/judgement/includes/rule.blade.php index 3ee0bd7..638e6d8 100644 --- a/resources/views/judgement/includes/rule.blade.php +++ b/resources/views/judgement/includes/rule.blade.php @@ -189,3 +189,5 @@ + + diff --git a/resources/views/judgement/pointRule.blade.php b/resources/views/judgement/pointRule.blade.php new file mode 100644 index 0000000..bf212f3 --- /dev/null +++ b/resources/views/judgement/pointRule.blade.php @@ -0,0 +1,122 @@ +@extends('basic.main') + +@section('title', '評分標準') + +@section('content') +
    +
    +
    +
    +

    分數計算規則

    +
    +
    +

    天數

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    天數傳統路分數非傳統路分數
    1510
    21015
    31020
    41525
    51530
    62035
    72040
    82045
    9+2550
    +
    + +

    路況

    + 路況分數 = 路況分數 + (路跡 * 0.3 + 地形 * 0.4 + 植被 * 0.3) * 1.5 +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    路況分級分數
    1
    11
    三a21
    三b26
    四a31
    四b36
    +
    + +

    體力

    + 體力分數 = 體力分級 * 7 + 背水天數 * 2 + +

    行程加權

    + 壓縮行程 -> 總分 * 1.1 + 寬鬆行程 -> 總分 * 0.9 +
    +
    +
    +
    +@endsection diff --git a/resources/views/trip/tripList.blade.php b/resources/views/trip/tripList.blade.php new file mode 100644 index 0000000..922486d --- /dev/null +++ b/resources/views/trip/tripList.blade.php @@ -0,0 +1,341 @@ +@extends('basic.main') + +@section('title', '隊伍報名列表') + +@section('content') + + +
    +
    +
    +
    +{{--

    Search Results

    --}} + +
    + + + +
    + +

    北坑溪古道-日向到雪見

    +

    預期隊費 +
    + 隊伍難度 +

    +
    +
    +

    領隊:易靖程

    +
    +
    +
    +
    + +
    + + + +
    + +

    17 Pictures of Medium Length Hair in Layers That Will Inspire + Your New Haircut

    +

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Distinctio placeat + exercitationem magni voluptates dolore. Tenetur fugiat voluptates quas.

    +
    +
    +
    +

    Wade Warren

    +
    +
    +
    +
    + +
    + + + +
    + +

    The Best Homemade Masks for Face (keep the Pimples Away) +

    +

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Distinctio placeat + exercitationem magni voluptates dolore. Tenetur fugiat voluptates quas.

    +
    +
    +
    +

    Wade Warren

    +
    +
    +
    +
    + +
    + + + +
    + +

    10 Life-Changing Hacks Every Working Mom Should Know

    +

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Distinctio placeat + exercitationem magni voluptates dolore. Tenetur fugiat voluptates quas.

    +
    +
    +
    +

    Wade Warren

    +
    +
    +
    +
    + +
    + + + +
    + +

    9 Half-up/half-down Hairstyles for Long and Medium Hair +

    +

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Distinctio placeat + exercitationem magni voluptates dolore. Tenetur fugiat voluptates quas.

    +
    +
    +
    +

    Wade Warren

    +
    +
    +
    +
    + + +
    +
    + + 1 + 2 + 3 + 4 + 5 + +
    +
    + +
    + +{{--
    --}} +{{-- --}} +{{--
    --}} + +{{-- --}} + +{{--
    --}} + +{{-- --}} +{{-- --}} + +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} + +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} + +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} + +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} + +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} + +{{-- --}} +{{--
    --}} +{{--
    --}} +{{-- --}} +{{--

    Life Insurance And Pregnancy: A Working Mom’s Guide--}} +{{--

    --}} +{{-- Jenny Wilson--}} +{{--
    --}} + +{{--
    --}} +{{-- --}} +{{--

    The Best Homemade Masks for Face (keep the Pimples--}} +{{-- Away)

    --}} +{{-- Jenny Wilson--}} +{{--
    --}} + +{{--
    --}} +{{-- --}} +{{--

    10 Life-Changing Hacks Every Working Mom Should--}} +{{-- Know

    --}} +{{-- Jenny Wilson--}} +{{--
    --}} + +{{--
    --}} +{{-- --}} +{{--

    How to Avoid Distraction and Stay Focused During Video--}} +{{-- Calls?

    --}} +{{-- Jenny Wilson--}} +{{--
    --}} + +{{--
    --}} +{{-- --}} +{{--

    17 Pictures of Medium Length Hair in Layers That Will--}} +{{-- Inspire Your New Haircut

    --}} +{{-- Jenny Wilson--}} +{{--
    --}} + +{{--
    --}} +{{-- --}} +{{--

    9 Half-up/half-down Hairstyles for Long and Medium--}} +{{-- Hair

    --}} +{{-- Jenny Wilson--}} +{{--
    --}} + +{{--
    --}} + +{{--
    --}} +{{--
    --}} + +{{--
    --}} +{{--

    Video

    --}} +{{--
    --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{--
    --}} +{{--
    --}} + +{{--
    --}} +{{--

    Categories

    --}} +{{-- --}} +{{--
    --}} + +{{--
    --}} +{{--

    Tags

    --}} +{{-- --}} +{{--
    --}} + +{{--
    --}} + +
    +
    +
    + +@endsection diff --git a/routes/web.php b/routes/web.php index c264d77..55f8ac8 100644 --- a/routes/web.php +++ b/routes/web.php @@ -25,6 +25,10 @@ | */ +Route::get('/trip/list', function () { + return view('trip.tripList'); +}); + Route::fallback(function () { return redirect()->route('index'); }); @@ -44,6 +48,7 @@ Route::get('/judgement', [JudgementController::class, 'index'])->name('judgement.index'); Route::get('/judgement/record', [JudgementController::class, 'record'])->name('judgement.record'); Route::get('/judgement/rule', [JudgementController::class, 'rule'])->name('judgement.rule'); +Route::get('/judgement/pointRule', [JudgementController::class, 'pointRule'])->name('judgement.pointRule'); Route::get('/faq', [FaqController::class, 'index'])->name('faq.index'); Route::get('/record', [RecordController::class, 'index'])->name('record.index'); Route::get('/record/show/{id}', [RecordController::class, 'show'])->name('record.show');