Files
bm/public_html/resources/views/admin/reservations/edit.blade.php
2025-09-24 13:26:28 +02:00

142 lines
5.0 KiB
PHP

@extends('layout')
@section('content')
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<h1>Reservierung bearbeiten</h1>
{!! Form::model($order,['method' => 'PATCH','route'=>['reservations.update',$order->id]]) !!}
<?php $user = $order->user()->withTrashed()->first()?>
{{$user->email}}
<div class="form-group">
@if($order->paid)
<div class="inline field">
<div class="ui toggle checkbox">
<input type="checkbox" tabindex="0" class="hidden" name="paid" checked="checked">
<label>Bezahlt</label>
</div>
</div>
@else
<div class="inline field">
<div class="ui toggle checkbox">
<input type="checkbox" tabindex="0" class="hidden" name="paid" id="paid">
<label>Bezahlt</label>
</div>
</div>
@endif
<br/><br/>
{!! Form::text('date',$order->paiddate,['class'=>'form-control', 'id' => 'date']) !!}
<br /><br />
@if($order->porto)
<div class="inline field">
<div class="ui toggle checkbox">
<input type="checkbox" tabindex="0" class="hidden" name="porto" checked="checked">
<label>Porto</label>
</div>
</div>
@else
<div class="inline field">
<div class="ui toggle checkbox">
<input type="checkbox" tabindex="0" class="hidden" name="porto">
<label>Porto</label>
</div>
</div>
@endif
<br/><br/>
<?php
$currPaymentmethod = $order->singleseatusers()->orderBy('id', 'desc')->first()->paymentmethod()->first();
?>
Bezahlart:
<select name="paymentmethod">
@foreach($paymentmethods as $paymentmethod)
@if($paymentmethod->id === $currPaymentmethod->id)
<option value="{{$paymentmethod->id}}" selected="selected">{{$paymentmethod->name}}</option>
@else
<option value="{{$paymentmethod->id}}">{{$paymentmethod->name}}</option>
@endif
@endforeach
</select>
<br/>
<br/>
{!! Form::label('notes', 'Notizen:') !!}
{!! Form::text('notes', null, ['class' => ' form-control']) !!}
<br/><br/>
Tickets: <br/>
@foreach($order->singleseatusers()->get() as $ssu)
<?php
$currentConc = \App\Concession::find($ssu->event_concessions_id);
?>
<select name="concession[]">
@foreach($concessions as $conc)
@if($conc->id === $currentConc->id)
<option value="{{$conc->id}}" selected="selected">
@if($ssu->paymentmethod_id == 5)
Bezahlt mit Kulturkarte
@else
{{$conc->name}}
@endif
</option>
@else
<option value="{{$conc->id}}">{{$conc->name}}</option>
@endif
@endforeach
</select>
<a href="/admin/deletesingleseat/{{$ssu->id}}"><i class="fa fa-trash" aria-hidden="true"></i></a>
@if($ssu->singleSeat->seat->event->reservation->name == "Mit Tischwahl")
Reihe {{14-$ssu->singleSeat->x}}, Platz {{$ssu->singleSeat->y}}
@else
{{$ssu->calcSeatName()}}
@endif
Kategorie {{$ssu->singleSeat()->first()->category}}
@if($currPaymentmethod->id != 5)
<a href="/admin/orderPayWithCultureCard/{{$ssu->id}}">ZU KULTURKARTENBESTELLUNG UMWANDELN</a>
@endif
<br/>
@endforeach
@if(!is_null($order->amountBuffett))
{{$order->amountBuffett}} x Buffett-Karten
@endif
<br/><br/>
<div class="form-group">
{!! Form::submit('Update', ['class' => 'btn btn-primary', 'id' => 'update_reservation_submit']) !!}
</div>
{!! Form::close() !!}
@endsection
@section('scripts')
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$(document).ready(function () {
$('.ui.checkbox')
.checkbox().first().checkbox({
onChecked: function() {
$("#date").show();
},
onUnchecked: function() {
$("#date").hide();
},
});
@if(!$order->paid)
$("#date").hide();
@endif
$("#date").datepicker({dateFormat: 'yy-mm-dd'});
});
</script>
@endsection