Merge branch 'master' of https://github.com/sebathefox/skolehjem-webapp
Conflicts: skolehjem/routes/web.php
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="" class="text-white">Opret Kontakt</a> /
|
||||
<a href="{{ route('contacts.create') }}" class="text-white">Opret Kontakt</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="" class="text-white">Slet Kontakt</a> /
|
||||
<a href="{{ route('contacts.destroy') }}" class="text-white">Slet Kontakt</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="" class="text-white">Vis Kontakter</a> /
|
||||
<a href="{{ route('contacts.index', [ 'contacts' => $contacts ]) }}" class="text-white">Vis Kontakter</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
@@ -30,7 +30,7 @@
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
<button class="w-100 nostyle" onclick="return confirm('Are you sure you want to delete?');" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="" class="text-white">Slet Kontakt</a> /
|
||||
<a href="{{ route('contacts.destroy') }}" class="text-white">Slet Kontakt</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="" class="text-white">Opbevar Kontakt</a> /
|
||||
<a href="{{ route('contacts.store') }}" class="text-white">Opbevar Kontakt</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
<button class="w-100 nostyle" onclick="return confirm('Are you sure you want to delete?');" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
<button onclick="return confirm('Are you sure you want to delete?');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -19,6 +19,15 @@
|
||||
<a href="{{ route('users.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Bruger</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="segment">
|
||||
<h3 class="text-white">Roller</h3>
|
||||
<div class="row">
|
||||
<a href="{{ route("roles.index") }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Roller</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a href="{{ route('roles.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Rolle</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="segment">
|
||||
<h3 class="text-white">Menuplan</h3>
|
||||
<div class="row">
|
||||
@@ -67,6 +76,15 @@
|
||||
{{-- <a href="{{ route('staff.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Personal</a>--}}
|
||||
{{-- </div>--}}
|
||||
{{-- </div>--}}
|
||||
<div class="segment">
|
||||
<h3 class="text-white">Kontakter</h3>
|
||||
<div class="row">
|
||||
<a href="{{ route("contacts.index") }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Kontakter</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a href="{{ route('contacts.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Kontakt</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="segment">
|
||||
<h3 class="text-white">Feedback</h3>
|
||||
<div class="row">
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
<h1>Opret Menuplan:</h1>
|
||||
<form action="{{ action('MenuPlanController@store') }}" method="post">
|
||||
@csrf
|
||||
<label for="week">Uge nr.</label>
|
||||
<input type="number" name="week" id="week" min="1" max="53" placeholder="1" required>
|
||||
<label for="monday">Mandag:</label>
|
||||
<input type="text" name="monday" id="monday" placeholder="Hawaii Pizza" required>
|
||||
<label for="tuesday">Tirsdag:</label>
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
<form method="post" action="{{ route("menu-plans.update", [ "menu_plan" => $menuplan ]) }}">
|
||||
@csrf
|
||||
@method("PUT")
|
||||
<label for="mandag">Uge:</label>
|
||||
<input type="number" name="week" id="week" min="1" max="53" value="{{ $menuplan->week }}" required>
|
||||
<label for="mandag">Mandag:</label>
|
||||
<input type="text" name="monday" id="mandag" value="{{ $menuplan->monday }}" required>
|
||||
<label for="tirsdag">Tirsdag:</label>
|
||||
@@ -23,6 +25,6 @@
|
||||
<label for="torsdag">Torsdag:</label>
|
||||
<input type="text" name="thursday" id="torsdag" value="{{ $menuplan->thursday }}" required>
|
||||
|
||||
<input type="submit" class="btn btn-dark text-white" value="Opret Menuplan">
|
||||
<input type="submit" class="btn btn-dark text-white" value="Rediger Menuplan">
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
@section("content")
|
||||
<table class="tbl">
|
||||
<tr>
|
||||
<th>Uge</th>
|
||||
<th>Mandag</th>
|
||||
<th>Tirsdag</th>
|
||||
<th>Onsdag</th>
|
||||
@@ -21,6 +22,7 @@
|
||||
</tr>
|
||||
@foreach($menuPlans as $menuplan)
|
||||
<tr>
|
||||
<td>{{$menuplan->week}}</td>
|
||||
<td>{{$menuplan->monday}}</td>
|
||||
<td>{{$menuplan->tuesday}}</td>
|
||||
<td>{{$menuplan->wednesday}}</td>
|
||||
@@ -30,7 +32,7 @@
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
<button onclick="return confirm('Are you sure you want to delete?');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
@extends("admin.layout.base")
|
||||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Rolle - Opret
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('roles.create') }}" class="text-white">Opret Rolle</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<h1>Opret Rolle:</h1>
|
||||
<form method="post" action="{{ route("roles.store") }}">
|
||||
@csrf
|
||||
<label for="name">Navn:</label>
|
||||
<input type="text" name="name" id="name" placeholder="Admin" required>
|
||||
<label for="name">Beskrivelse:</label>
|
||||
<input type="text" name="description" id="description" placeholder="Admin rollen bruges til administratorene" required>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Opret">
|
||||
</form>
|
||||
@endsection
|
||||
+2
-3
@@ -2,13 +2,12 @@
|
||||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Home - Logud
|
||||
Rolle - Fjern
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('staff.logout') }}" class="text-white">Logud</a> /
|
||||
<a href="{{ route('roles.delete') }}" class="text-white">Fjern Rolle</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,23 @@
|
||||
@extends("admin.layout.base")
|
||||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Rolle - Rediger
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('roles.edit', ['role' => $role]) }}" class="text-white">Rediger Rolle</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<h1>Rediger Rolle:</h1>
|
||||
<form method="post" action="{{ route("roles.update", ['role' => $role]) }}">
|
||||
@csrf
|
||||
@method("put")
|
||||
<label for="name">Navn:</label>
|
||||
<input type="text" name="name" id="name" placeholder="Admin" value="{{ $role->name }}" required>
|
||||
<label for="name">Beskrivelse:</label>
|
||||
<input type="text" name="description" id="description" placeholder="Admin rollen bruges til administratorene" value="{{ $role->description }}" required>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
||||
</form>
|
||||
@endsection
|
||||
@@ -0,0 +1,35 @@
|
||||
@extends("admin.layout.base")
|
||||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Rolle - Vis
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('roles.index') }}" class="text-white">Vis Roller</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<table class="tbl">
|
||||
<tr>
|
||||
<th>Navn</th>
|
||||
<th>Beskrivelse</th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
</tr>
|
||||
@foreach($roles as $role)
|
||||
<tr>
|
||||
<td>{{ $role->name }}</td>
|
||||
<td>{{ $role->description }}</td>
|
||||
<td><a href="{{ route("roles.edit", [ "role" => $role->id ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><form method="post" action="{{ route("roles.destroy", [ "role" => $role ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button onclick="return confirm('Are you sure you want to delete?');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
@endsection
|
||||
+2
-2
@@ -2,11 +2,11 @@
|
||||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Personal - Vis
|
||||
Rolle - Vis
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('staff.index') }}" class="text-white">Vis Personal</a> /
|
||||
<a href="{{ route('rolle.index') }}" class="text-white">Vis Brugere</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
+3
-2
@@ -2,12 +2,13 @@
|
||||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Personal - Fjern
|
||||
Rolle - Opret
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('staff.delete') }}" class="text-white">Fjern Personal</a> /
|
||||
<a href="{{ route('roles.create') }}" class="text-white">Opret Roller</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
Rollen blev (ikke) oprettet.
|
||||
@endsection
|
||||
+3
-3
@@ -2,13 +2,13 @@
|
||||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Personal - Rediger
|
||||
Rolle - Rediger
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('staff.edit') }}" class="text-white">Rediger Personal</a> /
|
||||
<a href="{{ route('roles.edit', ['role' => $role]) }}" class="text-white">Rediger Rolle</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
Din Personal blev (ikke) redigeret.
|
||||
Din rolle blev (ikke) redigeret.
|
||||
@endsection
|
||||
@@ -1,30 +0,0 @@
|
||||
@extends("admin.layout.base")
|
||||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Personal - Opret
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('staff.create') }}" class="text-white">Opret Personal</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<h1>Opret Personal:</h1>
|
||||
<form method="post" action="{{ route("staff.store") }}">
|
||||
@csrf
|
||||
<label for="name_first">Fornavn:</label>
|
||||
<input type="text" name="name_first" id="name_first" placeholder="Fornavn" required>
|
||||
<label for="name_last">Efternavn:</label>
|
||||
<input type="text" name="name_last" id="name_last" placeholder="Efternavn" required>
|
||||
<label for="email">Email:</label>
|
||||
<input type="email" name="email" id="email" placeholder="x@y.z" required>
|
||||
<label for="password1">Password:</label>
|
||||
<input type="password" name="password" placeholder="Password" id="password1" required>
|
||||
<label for="password2">Bekræft Password:</label>
|
||||
<input type="password" id="password2" placeholder="Bekræft Password" required>
|
||||
<label for="tel">Telefon nr:</label>
|
||||
<input type="tel" name="phone" id="tel" placeholder="12345678" pattern="[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}" required>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Opret">
|
||||
</form>
|
||||
@endsection
|
||||
@@ -1,31 +0,0 @@
|
||||
@extends("admin.layout.base")
|
||||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Personal - Rediger
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('staff.edit', ['staff' => $staff]) }}" class="text-white">Rediger Personal</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<h1>Rediger Personal:</h1>
|
||||
<form method="post" action="{{ route("staff.update", ['staff' => $staff]) }}">
|
||||
@csrf
|
||||
@method("put")
|
||||
<label for="name_first">Fornavn:</label>
|
||||
<input type="text" name="name_first" id="name_first" value="{{ $staff->name_first }}" required>
|
||||
<label for="name_last">Efternavn:</label>
|
||||
<input type="text" name="name_last" id="name_last" value="{{ $staff->name_last }}" required>
|
||||
<label for="email">Email:</label>
|
||||
<input type="email" name="email" id="email" value="{{ $staff->email }}" required>
|
||||
<label for="password1">Password:</label>
|
||||
<input type="password" name="password" id="password1" value="" required>
|
||||
<label for="password2">Confirm Password:</label>
|
||||
<input type="password" id="password2" value="" required>
|
||||
<label for="tel">Telefon nr:</label>
|
||||
<input type="tel" name="phone" id="tel" value="{{ $staff->phone }}" required>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
||||
</form>
|
||||
@endsection
|
||||
@@ -1,41 +0,0 @@
|
||||
@extends("admin.layout.base")
|
||||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Personal - Vis
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('staff.index') }}" class="text-white">Vis Personal</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<table class="tbl">
|
||||
<tr>
|
||||
<th>Fornavn</th>
|
||||
<th>Efternavn</th>
|
||||
<th>Email</th>
|
||||
<th>Tlf nr</th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
</tr>
|
||||
@foreach($staffs as $staff)
|
||||
<tr>
|
||||
<td>{{ $staff->name_first }}</td>
|
||||
<td>{{ $staff->name_last }}</td>
|
||||
<td>{{ $staff->email }}</td>
|
||||
<td>{{ $staff->phone }}</td>
|
||||
<td><a href="{{ route("staff.edit", [ "staff" => $staff->id ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><form method="post" action="{{ route("staff.destroy", [ "staff" => $staff->id ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
{{ $staffs->links() }}
|
||||
@endsection
|
||||
@@ -1,27 +0,0 @@
|
||||
@extends("app.layout.base")
|
||||
|
||||
@section("title")
|
||||
Login
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<main style="background-color: #00788a; height: 100%;">
|
||||
<div class="brand">
|
||||
<img src="{{URL::asset('/images/logos/Logo-hvid.svg')}}" alt="Syddansk Erhvervsskole">
|
||||
</div>
|
||||
<form action="" method="post">
|
||||
@csrf
|
||||
<input class="appinput" type="email" name="email" placeholder="Email" required>
|
||||
<input class="appinput" type="password" name="password" placeholder="Password" required>
|
||||
<label class="toggle">
|
||||
<input class="toggle__input" type="checkbox" name="rememberpassword">
|
||||
<span class="toggle__label">
|
||||
<span class="toggle__text text-white">Remember password</span>
|
||||
</span>
|
||||
</label>
|
||||
<input class="btn btn-dark" type="submit" value="Sign in">
|
||||
<button class="btn" onclick="window.location = '';">Sign up</button>
|
||||
</form>
|
||||
<a class="text-white text-center" href="">Forgot password?</a>
|
||||
</main>
|
||||
@endsection
|
||||
@@ -1,14 +0,0 @@
|
||||
@extends("admin.layout.base")
|
||||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Personal - Opret
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('staff.create') }}" class="text-white">Opret Personal</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
Personal blev (ikke) oprettet.
|
||||
@endsection
|
||||
@@ -25,11 +25,12 @@
|
||||
<input type="password" id="password2" placeholder="Bekræft Password" required>
|
||||
<label for="tel">Telefon nr:</label>
|
||||
<input type="tel" name="phone" id="tel" placeholder="12345678" pattern="[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}" required>
|
||||
<label for="role">Rolle:</label>
|
||||
<select name="role" id="role" class="mb-2" required>
|
||||
<option value="admin">Admin</option>
|
||||
<option value="staff">Personale</option>
|
||||
<option value="resident">Beboer</option>
|
||||
<label for="roles">Rolle:</label>
|
||||
<select name="roles[]" id="roles" class="mb-2" multiple="multiple" required>
|
||||
<option disabled selected value> -- Vælg Rolle(r) -- </option>
|
||||
@foreach($roles as $role)
|
||||
<option value="{{ $role->name }}">{{ $role->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Opret">
|
||||
</form>
|
||||
|
||||
@@ -27,10 +27,11 @@
|
||||
<label for="tel">Telefon nr:</label>
|
||||
<input type="tel" name="phone" id="tel" value="{{ $user->phone }}" required>
|
||||
<label for="role">Rolle:</label>
|
||||
<select name="role" id="role" class="mb-2" required>
|
||||
<option value="admin">Admin</option>
|
||||
<option value="staff">Personale</option>
|
||||
<option value="resident">Beboer</option>
|
||||
<select name="roles[]" id="roles" class="mb-2" multiple="multiple" required>
|
||||
<option disabled selected value> -- Vælg Rolle(r) -- </option>
|
||||
@foreach($roles as $role)
|
||||
<option value="{{ $role->name }}">{{ $role->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
||||
</form>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<th>Efternavn</th>
|
||||
<th>Email</th>
|
||||
<th>Tlf nr</th>
|
||||
<th>Rolle</th>
|
||||
<th>Rolle(r)</th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
</tr>
|
||||
@@ -26,13 +26,21 @@
|
||||
<td>{{ $user->name_last }}</td>
|
||||
<td>{{ $user->email }}</td>
|
||||
<td>{{ $user->phone }}</td>
|
||||
<td>{{ $user->roles }}</td>
|
||||
<td>
|
||||
@for($i = 0; $i < count($user->roles); $i++)
|
||||
@if(count($user->roles)-1 != $i)
|
||||
{{$user->roles[$i]->name}},
|
||||
@else
|
||||
{{$user->roles[$i]->name}}
|
||||
@endif
|
||||
@endfor
|
||||
</td>
|
||||
<td><a href="{{ route("users.edit", [ "user" => $user->id ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><form method="post" action="{{ route("users.destroy", [ "user" => $user ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
<button class="w-100 nostyle" onclick="return confirm('Are you sure you want to delete?');" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -20,7 +20,13 @@
|
||||
<tr>
|
||||
<td>{Navn}</td>
|
||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td>
|
||||
<td><form method="post" action="{{ route("washing-machines.destroy", [ "machine" => $machine ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button class="w-100 nostyle" onclick="return confirm('Are you sure you want to delete?');" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
<button class="w-100 nostyle" onclick="return confirm('Are you sure you want to delete?');" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user