From 0516acba789f350f45fce685db27e057353a6dc8 Mon Sep 17 00:00:00 2001 From: Neerholt Date: Wed, 19 Aug 2020 15:30:39 +0200 Subject: [PATCH 1/2] v0.10.10e - Made a hide show filter button, not done but works, css fix tomorrow --- .../resources/views/admin/users/index.blade.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/skolehjem/resources/views/admin/users/index.blade.php b/skolehjem/resources/views/admin/users/index.blade.php index 86ef422..a333484 100644 --- a/skolehjem/resources/views/admin/users/index.blade.php +++ b/skolehjem/resources/views/admin/users/index.blade.php @@ -15,9 +15,12 @@
@csrf - +
+ + +
@@ -105,6 +108,15 @@ } }); }); + + + + + //Show hide search filter + $("#filterButton").click(function(){ + $('#showHideCheckbox').toggle(); + }); + From a145c88e2c29f6072780fa80ccb9977172dfffb2 Mon Sep 17 00:00:00 2001 From: Anders Date: Thu, 20 Aug 2020 12:18:30 +0200 Subject: [PATCH 2/2] v0.10.10f - You can no longer see your own reservations if they're an hour past due (Samt with admin) --- .../washing-reservations/index.blade.php | 29 +++++++++------- .../app/washing-reservations/index.blade.php | 33 ++++++++++++------- 2 files changed, 38 insertions(+), 24 deletions(-) diff --git a/skolehjem/resources/views/admin/washing-reservations/index.blade.php b/skolehjem/resources/views/admin/washing-reservations/index.blade.php index 89b9b10..a227b3b 100644 --- a/skolehjem/resources/views/admin/washing-reservations/index.blade.php +++ b/skolehjem/resources/views/admin/washing-reservations/index.blade.php @@ -10,6 +10,9 @@ @endsection @section("content") + @@ -19,19 +22,21 @@ @foreach($reservations as $reservation) - - - - - - + + + + + - + + + + + @endif @endforeach
LokationDelete
{{ \App\Location::query()->find(\App\WashingMachine::query()->find($reservation->machine_id)->location_id)->name }}{{ \App\WashingMachine::query()->find($reservation->machine_id)->name }}{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($reservation->time))->format('d/m/Y \k\l\. H:i') }}{{ ucfirst(\App\User::query()->find($reservation->user_id)->name_first) }} {{ ucfirst(\App\User::query()->find($reservation->user_id)->name_last) }}
- @csrf - @method("delete") + @if(date('Y-m-d H:i:s', strtotime('-1 hour')) < $reservation->time) +
{{ \App\Location::query()->find(\App\WashingMachine::query()->find($reservation->machine_id)->location_id)->name }}{{ \App\WashingMachine::query()->find($reservation->machine_id)->name }}{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($reservation->time))->format('d/m/Y \k\l\. H:i') }}{{ ucfirst(\App\User::query()->find($reservation->user_id)->name_first) }} {{ ucfirst(\App\User::query()->find($reservation->user_id)->name_last) }} + @csrf + @method("delete") - - -
diff --git a/skolehjem/resources/views/app/washing-reservations/index.blade.php b/skolehjem/resources/views/app/washing-reservations/index.blade.php index a82dd51..a40b800 100644 --- a/skolehjem/resources/views/app/washing-reservations/index.blade.php +++ b/skolehjem/resources/views/app/washing-reservations/index.blade.php @@ -4,23 +4,32 @@ @endsection @section("content") +

{{__('msg.dinereservationer')}}

@foreach($reservations as $reservation) -
-

{{ \App\WashingMachine::query()->find($reservation->machine_id)->name }}

-
- {{__('msg.tid')}}: {{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($reservation->time))->format('d/m/Y \k\l\. H:i') }} -
$reservation ]) }}"> - @csrf - @method("delete") - - -
+ @if(date('Y-m-d H:i:s', strtotime('-1 hour')) < $reservation->time) +
+

{{ \App\WashingMachine::query()->find($reservation->machine_id)->name }}

+
+ {{__('msg.tid')}}: {{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($reservation->time))->format('d/m/Y \k\l\. H:i') }} +
$reservation ]) }}"> + @csrf + @method("delete") + + +
+
-
+ + @endif @endforeach - @if(count($reservations) < 1) + @if(count($reservations) < 1 || $washingreservations == 0)

{{__('msg.duharingenreservationer')}}.

@else {{ $reservations->links() }}