diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index a18537c..748ff8b 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -36,15 +36,6 @@ class UserController extends Controller ->with('o',$o); } - public function dashboard() - { - $user = Auth::user(); - $user->load('systems.addresses.zone.domain.echoareas'); - - return view('dashboard') - ->with('user',$user); - } - public function link(Request $request) { if ($request->post()) { diff --git a/app/Models/System.php b/app/Models/System.php index abcf296..717e115 100644 --- a/app/Models/System.php +++ b/app/Models/System.php @@ -71,6 +71,7 @@ class System extends Model ->where('addresses.active',TRUE) ->where('zones.active',TRUE) ->where('domains.active',TRUE) + ->orderBy('domains.name') ->FTNorder() ->orderBy('role','ASC'); } diff --git a/app/Models/User.php b/app/Models/User.php index abd6b94..1aabe28 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -102,7 +102,6 @@ class User extends Authenticatable implements MustVerifyEmail */ public function isZC(): bool { - $this->load(['systems.addresses']); return $this->zc()->count() > 0; } diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index 6a5d248..8c000ac 100644 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -3,57 +3,77 @@ Dashboard @endsection +@php($user->load(['systems.akas.zone.domain.echoareas','systems.akas.echoareas'])) + @section('content')
System Addresses | |
---|---|
{{ $o->name }} | -{!! $o->akas->pluck('ftn')->join(' ') !!} |
-
System Addresses |
---|
Available Echos | |
---|---|
{{ $o->name }} | -{!! $o->addresses->pluck('zone.domain.echoareas')->flatten()->pluck('name')->unique()->sort()->join(', ') !!} | -
You are not linked to any BBS systems. Start here to link to your first.
- @endif -
+ {{ $o->name }} ({{ $sec=$user->systems->pluck('akas')->flatten()->filter(function($item) use ($o) { return $item->zone->domain_id === $o->id; })->max('security') ?? '-' }}) + {{ ($sub=$user->systems->pluck('akas')->flatten()->pluck('echoareas')->flatten()->filter(function($item) use ($o) { return $item->domain_id === $o->id; }))->count() }} Subscribed + |
+ + @foreach ($o->echoareas->sortBy('name') as $eo) + {{ $eo->name }} + @endforeach + | +
---|
You are not linked to any BBS systems. Start here to link to your first.
+ @endif @endsection @section('page-css') @@ -162,7 +182,7 @@ name: 'Networks', colorByPoint: true, data: [ - @foreach(($xx=$user->systems->pluck('addresses')->flatten()->pluck('zone.domain')->unique(function($item) { return $item->name; })->sortBy('name')) as $do) + @foreach($dl as $do) { name: '{{ $do->name }}', y: {{ $do->daily_area_stats()->sum('y') }}, @@ -176,7 +196,7 @@ colorByPoint: true, pointPlacement: 0.1, data: [ - @foreach($xx as $do) + @foreach($dl as $do) { name: '{{ $do->name }}', y: {{ $do->daily_area_stats(FALSE,$user->systems)->sum('y') }}, @@ -195,7 +215,7 @@ } }, series: [ - @foreach($xx as $do) + @foreach($dl as $do) { name: '{{ $do->name }}', id: 'n-{{ $do->name }}', @@ -203,7 +223,7 @@ }, @endforeach - @foreach($xx as $do) + @foreach($dl as $do) { name: '{{ $do->name }}', id: 'ny-{{ $do->name }}', diff --git a/routes/web.php b/routes/web.php index 97143f4..52ac462 100644 --- a/routes/web.php +++ b/routes/web.php @@ -52,7 +52,7 @@ Route::get('system/view/{o}',[SystemController::class,'view']) Route::get('search',[HomeController::class,'search']); Route::middleware(['auth','verified','activeuser'])->group(function () { - Route::get('dashboard',[UserController::class,'dashboard']); + Route::view('dashboard','dashboard'); /* DOMAIN PATHS */ Route::view('domain','domain.home');