diff --git a/OngekiScoreLog/app/Http/Controllers/AdminController.php b/OngekiScoreLog/app/Http/Controllers/AdminController.php
index 4e88c4a..d148878 100644
--- a/OngekiScoreLog/app/Http/Controllers/AdminController.php
+++ b/OngekiScoreLog/app/Http/Controllers/AdminController.php
@@ -69,7 +69,26 @@ public function GetConfig(){
return view('admin/config', compact(['result']));
}
- public function GetAggregate(){
+ public function GetBattle(){
+ $result = \App\AggregateBattleScore::all();
+ $difficultyToStr = [
+ 0 => 'Basic',
+ 1 => 'Advanced',
+ 2 => 'Expert',
+ 3 => 'Master',
+ 10 => 'Lunatic',
+ ];
+
+ $musics = [];
+ $temp = \App\MusicData::all();
+ foreach ($temp as $value) {
+ $musics[$value->id] = $value->title;
+ }
+ return view('admin/battle', compact(['result', 'musics', 'difficultyToStr']));
+ }
+
+
+ public function GetOverDamage(){
$result = \App\AggregateOverdamage::all();
$difficultyToStr = [
0 => 'Basic',
@@ -84,7 +103,7 @@ public function GetAggregate(){
foreach ($temp as $value) {
$musics[$value->id] = $value->title;
}
- return view('admin/aggregate', compact(['result', 'musics', 'difficultyToStr']));
+ return view('admin/overdamage', compact(['result', 'musics', 'difficultyToStr']));
}
/**
diff --git a/OngekiScoreLog/resources/views/admin/_submenu.blade.php b/OngekiScoreLog/resources/views/admin/_submenu.blade.php
index 54f4825..efa36de 100644
--- a/OngekiScoreLog/resources/views/admin/_submenu.blade.php
+++ b/OngekiScoreLog/resources/views/admin/_submenu.blade.php
@@ -12,9 +12,16 @@
@endif
config
-@if (isset($active) && $active === 'aggregate')
+@if (isset($active) && $active === 'battle')
@else
@endif
-aggregate
+battle
+
+@if (isset($active) && $active === 'overdamage')
+
+@else
+
+@endif
+overdamage
diff --git a/OngekiScoreLog/resources/views/admin/battle.blade.php b/OngekiScoreLog/resources/views/admin/battle.blade.php
new file mode 100644
index 0000000..3ec9f11
--- /dev/null
+++ b/OngekiScoreLog/resources/views/admin/battle.blade.php
@@ -0,0 +1,52 @@
+@extends('layouts.app')
+
+@section('title', '管理ページ')
+@section('hero_title', "管理ページ")
+@section('hero_subtitle', "config")
+
+@section('submenu')
+ @include('admin/_submenu', ['active' => 'battle'])
+@endsection
+
+@section('additional_footer')
+
+@endsection
+
+@section('content')
+
+ 集計一覧
+
+
+
+
+ id |
+ title |
+ 難易度 |
+ max |
+ updated_at |
+
+
+
+
+ id |
+ title |
+ 難易度 |
+ max |
+ updated_at |
+
+
+
+ @foreach ($result as $key => $value)
+
+ {{$value->id}} |
+ {{$musics[$value->song_id]}} |
+ {{substr($difficultyToStr[$value->difficulty], 0, 3)}} |
+ {{$value->max}}{{number_format($value->max)}} |
+ {{$value->updated_at}} |
+
+ @endforeach
+
+
+
+
+@endsection
diff --git a/OngekiScoreLog/resources/views/admin/aggregate.blade.php b/OngekiScoreLog/resources/views/admin/overdamage.blade.php
similarity index 97%
rename from OngekiScoreLog/resources/views/admin/aggregate.blade.php
rename to OngekiScoreLog/resources/views/admin/overdamage.blade.php
index 76151a6..39c3825 100644
--- a/OngekiScoreLog/resources/views/admin/aggregate.blade.php
+++ b/OngekiScoreLog/resources/views/admin/overdamage.blade.php
@@ -5,7 +5,7 @@
@section('hero_subtitle', "config")
@section('submenu')
- @include('admin/_submenu', ['active' => 'aggregate'])
+ @include('admin/_submenu', ['active' => 'overdamage'])
@endsection
@section('additional_footer')
diff --git a/OngekiScoreLog/resources/views/layouts/components/user/song_status_battlescore.blade.php b/OngekiScoreLog/resources/views/layouts/components/user/song_status_battlescore.blade.php
index 33beb6e..9324420 100644
--- a/OngekiScoreLog/resources/views/layouts/components/user/song_status_battlescore.blade.php
+++ b/OngekiScoreLog/resources/views/layouts/components/user/song_status_battlescore.blade.php
@@ -60,7 +60,7 @@
0.00% |
@else
{{-- 1位ではないので計算 --}}
- {{number_format((floor((($s->over_damage_high_score) / ($topRankerScore[$s->song_id . "_" . $s->difficulty])) * 100) / 100), 2)}}% |
+ {{number_format(($s->battle_high_score / $topRankerScore[$s->song_id . "_" . $s->difficulty]) * 100, 2)}}% |
@endif
@else
?% |
diff --git a/OngekiScoreLog/routes/web.php b/OngekiScoreLog/routes/web.php
index 67cb5bd..bbc3399 100644
--- a/OngekiScoreLog/routes/web.php
+++ b/OngekiScoreLog/routes/web.php
@@ -58,7 +58,8 @@
Route::group(['middleware' => ['auth', 'can:admin']], function () {
Route::get('/admin', 'AdminController@GetIndex');
Route::get('/admin/config', 'AdminController@GetConfig');
- Route::get('/admin/aggregate', 'AdminController@GetAggregate');
+ Route::get('/admin/battle', 'AdminController@GetBattle');
+ Route::get('/admin/overdamage', 'AdminController@GetOverDamage');
Route::get('/admin/apply/{type}/{action?}', 'AdminController@GetApply');
Route::get('/admin/generate/battle-score', 'AdminController@GetGenerateBattleScore');
Route::get('/admin/generate/over-damage', 'AdminController@GetGenerateOverDamage');