Permission fixes and washing reservation fixes
This commit is contained in:
@@ -15,13 +15,20 @@
|
||||
@csrf
|
||||
<label for="time">Tidspunkt:</label>
|
||||
<input type="datetime-local" name="time" id="time" required>
|
||||
<label for="machine">Vaskemaskine:</label>
|
||||
<select name="machine" id="machine" required>
|
||||
<label for="machine_id">Vaskemaskine:</label>
|
||||
<select name="machine_id" id="machine_id" required>
|
||||
<option disabled selected value> -- Vælg Vaskemaskine -- </option>
|
||||
@foreach($machines as $machine)
|
||||
<option value="{{ $machine->id }}">{{ $machine->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<label for="user_id">Bruger:</label>
|
||||
<select name="user_id" id="user_id" required>
|
||||
<option disabled selected value> -- Vælg Bruger -- </option>
|
||||
@foreach($users as $user)
|
||||
<option value="{{ $user->id }}">{{ ucfirst($user->name_first) }} {{ ucfirst($user->name_last) }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Opret">
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</tr>
|
||||
@foreach($reservations as $reservation)
|
||||
<tr>
|
||||
<td>{{ \App\WashingMachine::query()->find($reservation->machine)->name }}</td>
|
||||
<td>{{ \App\WashingMachine::query()->find($reservation->machine_id)->name }}</td>
|
||||
<td>{{ $reservation->time }}</td>
|
||||
<td><a href="{{ route('washing-reservations.edit', ['washing_reservation' => $reservation]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><form method="post" action="{{ route('washing-reservations.destroy', ['washing_reservation' => $reservation]) }}" class="w-100 nostyle">
|
||||
|
||||
Reference in New Issue
Block a user