mivita/resources/views/user/homeparty/order.blade.php
2020-12-16 20:03:51 +01:00

235 lines
No EOL
9.2 KiB
PHP

@extends('layouts.layout-2')
@section('content')
<style>
.table-small {
font-size: 0.9em;
width: auto;
}
.table-small td {
padding: 0.225rem 1rem 0.225rem 0;
}
.btn-md-extra {
padding: 0.3rem 0.6rem;
font-size: 0.8rem;
line-height: 1.5;
border-radius: 0.25rem;
}
.md-btn-extra {
width: calc(1.7rem + 2px) !important;
line-height: 1.5rem;
}
.form-control.input-extra {
padding: 0.28rem 0.6rem;
font-size: 0.8rem;
font-weight: 500;
min-height: calc(1.8rem + 2px);
height: calc(1.8rem + 2px);
width: 44px;
}
.input-group-min-w {
min-width: 102px;
}
.img-extra {
min-width:55px;
max-height: 120px;
}
.table td.border-top {
border: none;
border-top: 1px solid #ccccdb;
}
.table td {
border: none;
}
.table th {
border: none;
border-bottom: 1px solid #c3c3d2;
}
@media (max-width: 767px) {
.default-style:not([dir=rtl]) div.card-datatable table.dataTable thead th:first-child,
.default-style:not([dir=rtl]) div.card-datatable table.dataTable tbody td:first-child,
.default-style:not([dir=rtl]) div.card-datatable table.dataTable tfoot th:first-child {
padding-left: 0.6rem !important;
}
.img-extra {
min-width:35px;
max-height: 160px;
}
}
.table .foot-small td {
padding: 0.225rem 0.625rem;
}
.table .text-body {
font-size: 0.9em;
}
.table .options a.auto-delete-product {
font-size: 0.7em;
font-weight: bold;
text-transform: uppercase;
}
.table .min-width-80 {
min-width: 160px;
}
</style>
<h4 class="font-weight-bold py-2 mb-2 d-flex justify-content-between align-items-center w-100 ">
<div>{{ __('navigation.my_homeparty') }} / {{ $homeparty->name }} - {{ $homeparty->date }}</div>
<a href="{{route('user_homepartys')}}" class="btn btn-sm btn-default float-right">zurück</a>
</h4>
{!! Form::open(['url' => route('user_homeparty_order', [$homeparty->id]), 'class' => 'form-horizontal', 'id'=>'homeparty-order-form']) !!}
<div class="card mb-4">
<h5 class="card-header">
<div class="row">
<div class="col-12">
<div class="d-flex justify-content-between align-items-center w-100">
<div>Bestellung anlegen</div>
<div class="float-right">
<a href="{{route('user_homeparty_detail', [$homeparty->id])}}" class="btn btn-sm btn-secondary mr-2 mb-1"><i class="ion ion-ios-cog"></i> Verwalten</a>
<a href="{{route('user_homeparty_guests', [$homeparty->id])}}" class="btn btn-sm btn-secondary mr-2 mb-1"><i class="ion ion-md-person-add"></i> Gäste anlegen</a>
</div>
</div>
</div>
</div>
</h5>
<div class="card-body">
<div class="row">
<div class="col-md-6">
<h6>Lieferadresse Gastgeber/in <a href="{{route('user_homeparty_guest_detail', [$homeparty->id, $homeparty->homeparty_host->id])}}"><i class="fa fa-edit"></i> </a></h6>
@include('user.homeparty._address', ['homeparty_user' => $homeparty->homeparty_host])
</div>
{{-- TODO Berechnung Bonus --}}
<div class="col-md-6">
<h6>Aktuelle Bonusansicht</h6>
<div id="insert_show_bonus">
@include('user.homeparty.show_bonus', ['homeparty' => $homeparty])
</div>
</div>
</div>
</div>
</div>
@if($homeparty->homeparty_host)
<div class="card mb-3">
<h5 class="card-header">
<div class="row">
<div class="col-12">
<div class="d-flex justify-content-between align-items-center w-100">
<div>Bestellung Gastgeber/in {{$homeparty->homeparty_host->billing_firstname}} {{$homeparty->homeparty_host->billing_lastname}}</div>
</div>
</div>
<div class="col-12">
<button type="button" class="btn btn-sm btn-secondary btn-block mt-2" data-toggle="modal" data-target="#modals-load-content"
data-id="{{ $homeparty->id }}"
data-action="homeparty-add-product"
data-user_id="{{$homeparty->homeparty_host->id}}"
data-route="{{ route('modal_load') }}"><i class="fa fa-plus-circle"></i> Produkt hinzufügen</button>
</div>
</div>
</h5>
<div class="card-body">
<div class="insert_show_products_order" id="insert_show_products_order_{{$homeparty->homeparty_host->id}}" data-homeparty-id="{{ $homeparty->id }}" data-homeparty-user-id="{{$homeparty->homeparty_host->id}}">
@include('user.homeparty.show_products_order', ['homeparty_guest' => $homeparty->homeparty_host])
</div>
</div>
</div>
@endif
@if($homeparty->homeparty_guests)
@php($g_count = 1)
@foreach($homeparty->homeparty_guests as $homeparty_guest)
<div class="card mb-3">
<h5 class="card-header">
<div class="row">
<div class="col-12">
<div class="d-flex justify-content-between align-items-center w-100">
<div>Bestellung {!! $g_count++ !!}. Gast {{$homeparty_guest->billing_firstname}} {{$homeparty_guest->billing_lastname}}</div>
</div>
</div>
<div class="col-12">
<button type="button" class="btn btn-sm btn-secondary btn-block mt-2" data-toggle="modal" data-target="#modals-load-content"
data-id="{{ $homeparty->id }}"
data-action="homeparty-add-product"
data-user_id="{{$homeparty_guest->id}}"
data-route="{{ route('modal_load') }}"><i class="fa fa-plus-circle"></i> Produkt hinzufügen</button>
</div>
</div>
</h5>
<div class="card-body">
<div class="insert_show_products_order" id="insert_show_products_order_{{$homeparty_guest->id}}" data-homeparty-id="{{ $homeparty->id }}" data-homeparty-user-id="{{$homeparty_guest->id}}">
@include('user.homeparty.show_products_order', ['homeparty_guest' => $homeparty_guest])
</div>
</div>
</div>
@endforeach
@endif
<hr>
<div class="card mb-4">
<h5 class="card-header">
<div class="row">
<div class="col-12">
<div class="d-flex justify-content-between align-items-center w-100">
<div>Gesamtübersicht</div>
</div>
</div>
</div>
</h5>
{{-- TODO Berechnung des WK --}}
<div class="card-body">
<div id="insert_show_total_order">
@include('user.homeparty.show_total_order', ['homeparty' => $homeparty])
</div>
<hr>
@if($homeparty->homeparty_host && $homeparty->homeparty_host->isAddress())
<div class="float-right">
<button type="submit" class="btn btn-secondary"><i class="ion ion-ios-redo"></i> bestätigen und weiter zur Kasse</button>
</div>
<br><br>
<em class="small text-center"> <i class="fa fa-lock"></i> Du wirst auf unseren checkout Server weitergeletet, die Verbindung ist SSL verschlüsselt.</em>
@else
<div class="alert alert-warning">
Die Bestellung kann erst abgesendet werden, wenn die Lieferadresse Gastgeber/in angelegt ist. <a href="{{route('user_homeparty_guest_detail', [$homeparty->id, $homeparty->homeparty_host->id])}}"><i class="fa fa-edit"></i> </a></h6>
</div>
@endif
</div>
</div>
<div class="text-left mt-3">
<a href="{{route('user_homeparty_detail', [$homeparty->id])}}" class="btn btn-sm btn-secondary mr-2 mb-2"><i class="ion ion-ios-cog"></i> Homparty verwalten</a>
<a href="{{route('user_homepartys')}}" class="btn btn-sm btn-default mb-2">zurück zur Übersicht</a>
</div>
{!! Form::close() !!}
@endsection
@section('scripts')
<script src="{{ asset('/js/iq-homeparty-cart.js') }}?v=1{{ get_file_last_time('/js/iq-homeparty-cart.js') }}"></script>
<script type="application/javascript">
var iqHomepartyCart = IqHomepartyCart.init();
$( document ).ready(function() {
});
</script>
@endsection