mivita/resources/views/user/homeparty/order.blade.php
2025-08-12 18:01:59 +02:00

279 lines
No EOL
12 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@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;
}
.bg-warning-light {
background-color: rgba(255, 217, 80, 0.6) !important;
}
</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">{{ __('back') }}</a>
</h4>
@if(Session::has('custom-error'))
<div class="alert alert-dark-warning alert-dismissible fade show">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>{{ Session::get('custom-error') }}</strong>
</div>
@endif
@if($userHistoryPaymentOrder && $userHistoryPaymentOrder->status > 2)
<h6 class="alert badge-{{$userHistoryPaymentOrder->getStatusColor()}}"> {{__('membership.payment_has_been_made') }}: {{ trans('payment.status.'.$userHistoryPaymentOrder->getStatusType())}}</h6>
@endif
<div class="card mb-4">
<div class="card-body">
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">{{ __('payment.ordering_country') }}</div>
{{ App\Services\UserService::getOrderInfo('billing_state') }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">{{ __('payment.country_of_delivery') }}</div>
{{ App\Services\UserService::getOrderInfo('shipping_state') }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">{{ __('payment.VAT') }}</div>
{{ App\Services\UserService::getOrderInfo('tax_free') }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">{{ __('payment.reverse_charge_procedure') }}</div>
{{ App\Services\UserService::getOrderInfo('user_reverse_charge') }}
</div>
</div>
<i>{{ __('order.delivery_country_can_no_longer_be_changed') }}</i>
</div>
</div>
{!! Form::open(['action' => 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>{{ __('homeparty.order_create') }}</div>
@if(!$homeparty->completed)
<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> {{ __('homeparty.manage') }}</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> {{ __('homeparty.create_guests') }}</a>
</div>
@endif
</div>
</div>
</div>
</h5>
<div class="card-body">
<div class="row">
<div class="col-md-6">
<h6>{{ __('Delivery address') }}
@if(!$homeparty->completed)
<a href="{{route('user_homeparty_detail', [$homeparty->id, 13])}}"><i class="fa fa-edit"></i> </a>
@endif
</h6>
@include('user.homeparty._address', ['homeparty_user' => $homeparty->homeparty_host])
</div>
{{-- TODO Berechnung Bonus --}}
<div class="col-md-6">
<h6>{{ __('homeparty.current_bonus_view') }}</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>{{ __('homeparty.order_host') }} {{$homeparty->homeparty_host->billing_firstname}} {{$homeparty->homeparty_host->billing_lastname}}</div>
</div>
</div>
@if(!$homeparty->completed)
<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> {{ __('homeparty.add_product') }}</button>
</div>
@endif
</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>{{ __('homeparty.order') }} {!! $g_count++ !!}. {{ __('homeparty.guest') }} {{$homeparty_guest->billing_firstname}} {{$homeparty_guest->billing_lastname}}</div>
</div>
</div>
@if(!$homeparty->completed)
<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> {{ __('homeparty.add_product') }}</button>
</div>
@endif
</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>{{ __('homeparty.general_overview') }}</div>
</div>
</div>
</div>
</h5>
<div class="card-body">
<div id="insert_show_total_order">
@include('user.homeparty.show_total_order', ['homeparty' => $homeparty])
</div>
@if(!$homeparty->completed)
<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> {{ __('order.confirm_and_proceed_to_checkout') }}</button>
</div>
<br><br>
<em class="small text-center"> <i class="fa fa-lock"></i> {{ __('payment.checkout_ssl_server') }}</em>
@else
<div class="alert alert-warning">
{{ __('homeparty.order_can_be_send_delivery_address_info') }} <a href="{{route('user_homeparty_guest_detail', [$homeparty->id, $homeparty->homeparty_host->id])}}"><i class="fa fa-edit"></i> </a></h6>
</div>
@endif
@endif
</div>
</div>
<div class="text-left mt-3">
@if(!$homeparty->completed)
<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> {{ __('homeparty.homeparty_manage') }}</a>
@endif
<a href="{{route('user_homepartys')}}" class="btn btn-sm btn-default mb-2">{{ __('back_to_overview') }}</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