Fixed washing machine reservation, creation, edit and deletion
This commit is contained in:
@@ -6,22 +6,26 @@
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('washing-reservations.edit', ['id' => $reservations->id]) }}" class="text-white">Rediger Vaske Reservationer</a> /
|
||||
<a href="{{ route('washing-reservations.edit', ['washing_reservation' => $washing_reservation]) }}" class="text-white">Rediger Vaske Reservationer</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<h1>Rediger Booking:</h1>
|
||||
<form method="post" action="">
|
||||
<form method="post" action="{{ route('washing-reservations.update', ['washing_reservation' => $washing_reservation ]) }}">
|
||||
@csrf
|
||||
<label for="name_first">Fornavn:</label>
|
||||
<input type="text" name="name_first" id="name_first" value="{Fornavn}" required>
|
||||
<label for="name_last">Efternavn:</label>
|
||||
<input type="text" name="name_last" id="name_last" value="{Efternavn}" required>
|
||||
<input type="password" id="password2" value="{Password}" required>
|
||||
<label for="tel">Telefon nr:</label>
|
||||
<input type="tel" name="phone" id="tel" value="{Telefon}" required>
|
||||
<select>
|
||||
<option>Vaskemaskine 1</option>
|
||||
@method("put")
|
||||
<label for="time">Tidspunkt:</label>
|
||||
<input type="datetime-local" name="time" id="time" value="{{ $washing_reservation->time }}" required>
|
||||
<label for="machine">Vaskemaskine:</label>
|
||||
<select name="machine" id="machine" required>
|
||||
<option disabled value> -- Vælg Vaskemaskine -- </option>
|
||||
@foreach($machines as $machine)
|
||||
@if($machine->id == $washing_reservation->machine)
|
||||
<option selected value="{{ $machine->id }}">{{ $machine->name }}</option>
|
||||
@else
|
||||
<option value="{{ $machine->id }}">{{ $machine->name }}</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user