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

308 lines
No EOL
15 KiB
PHP

@extends('layouts.layout-2-without')
@section('content')
@if($homeparty_user === null)
<h4 class="font-weight-bold py-2 mb-2 d-flex justify-content-between align-items-center w-100 ">
<div>{{ __('homeparty.homeparty') }} / {{ $homeparty->name }} - {{ $homeparty->date }}</div>
</h4>
@if(Session::has('alert-save'))
<div class="alert alert-dark-secondary alert-dismissible fade show">
<div class="font-weight-bold">
{{__('saved')}}:
{{ __('homeparty.your_data_has_been_successfully_created_have_fun') }}
</div>
</div>
@endif
<div class="card mb-4">
<div class="card-body">
<div class="row">
<div class="col-md-6">
<h4 class="font-weight-normal mb-0">
@if($homeparty_host)
@if($homeparty_host->billing_salutation === 'mr')
{{ __('homeparty.your_host') }}
@else
{{ __('homeparty.your_hostess') }}
@endif
@endif
</h4>
<div class="media align-items-center py-3 mb-3 mt-0">
<img src="{{ asset('images/avatar.png') }}" alt="" class="d-block ui-w-80 rounded-circle">
<div class="media-body ml-4">
<div class="text-body text-big font-weight-semibold mb-0">
@if($homeparty_host)
{{$homeparty_host->billing_firstname}} {{$homeparty_host->billing_lastname}}
@endif
</div>
<div class="text-muted mb-2"><i class="ion ion-md-mail pr-1"></i>
@if($homeparty_host)
{{ $homeparty_host->billing_email }}
@endif
</div>
<div class="text-muted mb-2"><i class="ion ion-md-phone-portrait pr-2"></i>
@if($homeparty_host)
{{ $homeparty_host->billing_phone }}
@endif
</div>
</div>
</div>
</div>
<div class="col-md-6">
<h4 class="font-weight-normal mb-0">{{ __('homeparty.your_MIVITA_advice') }}</h4>
<div class="media align-items-center py-3 mb-3 mt-0">
<img src="{{ asset('images/avatar.png') }}" alt="" class="d-block ui-w-80 rounded-circle">
<div class="media-body ml-4">
<div class="text-body text-big font-weight-semibold mb-0">
@if($mivita_member)
{{ $mivita_member->account->first_name }} {{ $mivita_member->account->last_name }}
@endif
</div>
<div class="text-muted mb-2"><i class="ion ion-md-mail pr-1"></i>
@if($mivita_member)
{{ $mivita_member->email }}
@endif
</div>
<div class="text-muted mb-2"><i class="ion ion-md-phone-portrait pr-2"></i>
@if($mivita_member)
{{ $mivita_member->account->getPhoneNumber() }}
@endif
</div>
</div>
</div>
</div>
</div>
</div>
<div class="progress rounded-0" style="height: 2px;">
<div class="progress-bar" style="width: 100%;"></div>
</div>
<div class="card-body pt-3 pb-3">
<h4 class="font-weight-normal mb-2">{{ __('homeparty.invitation') }} </h4>
{{$homeparty->getLangOrDefault('description', false)}}
</div>
<div class="card-body pt-0">
<div class="row">
<div class="col">
<div class="text-muted small">{{ __('order.date') }} </div>
<div class="font-weight-bold">{{$homeparty->date}}</div>
</div>
<div class="col">
<div class="text-muted small">{{ __('homeparty.event_place') }} </div>
<div class="font-weight-bold">{{$homeparty->place}} / @if($homeparty->country) {{ $homeparty->country->getLocated() }} @endif</div>
</div>
<div class="col">
<div class="text-muted small">{{ __('Street') }} / {{ __('House number') }}</div>
<div class="font-weight-bold">
@if($homeparty_host)
{{ $homeparty_host->billing_address }}
@endif
</div>
</div>
<div class="col">
<div class="text-muted small">{{ __('Postcode') }} &amp; {{ __('City') }}</div>
<div class="font-weight-bold">
@if($homeparty_host)
{{ $homeparty_host->billing_zipcode }} {{ $homeparty_host->billing_city }}
@endif
</div>
</div>
<div class="col">
<div class="text-muted small">{{ __('Country') }}</div>
<div class="font-weight-bold">
@if($homeparty_host && $homeparty_host->billing_country)
{{ $homeparty_host->billing_country->de }}
@endif
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
@php($g_count = 1)
@foreach($homeparty->homeparty_guests as $homeparty_user)
<div class="card mb-3">
<div class="card-body d-flex justify-content-between align-items-start pt-3 pb-3">
<div>
<div class="text-body text-big font-weight-semibold">
@if($homeparty_user->is_host)
<span class="text-muted">{{ __('homeparty.host') }}: </span>
@else
<span class="text-muted">{{ __('homeparty.guest') }} {{$g_count++}}: </span>
@endif
{{$homeparty_user->billing_firstname}} {{$homeparty_user->billing_lastname}}
</div>
</div>
</div>
</div>
@endforeach
</div>
</div>
<a href="{{route('homeparty', [$homeparty->token, 'new'])}}" class="btn btn-md btn-secondary rounded-pill"><span class="ion ion-md-person-add"></span>&nbsp; {{ __('homeparty.add_as_guest') }} </a>
@else
<h4 class="font-weight-bold py-2 mb-2 d-flex justify-content-between align-items-center w-100 ">
<div>{{ __('homeparty.homeparty') }} / {{ $homeparty->name }} - {{ $homeparty->date }}</div>
<a href="{{route('homeparty', [$homeparty->token])}}" class="btn btn-sm btn-default float-right">{{ __('back') }}</a>
</h4>
{!! Form::open(['action' => route('homeparty', [$homeparty->token, $homeparty_user->id]), 'class' => 'form-horizontal', 'id'=>'homeparty-user-form-validation']) !!}
@if(Session::has('alert-save'))
<div class="alert alert-dark-secondary alert-dismissible fade show">
<div class="font-weight-bold">
{{__('saved')}}: {{__('The changes have been saved.')}}
</div>
</div>
@endif
@if ($errors->any())
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
</div>
@endif
<div class="card mb-4">
<div class="col-md-12 px-4 pt-4">
<h6 class="mb-2">{{ __('homeparty.enter_your_personal_data_for_homeparty') }}</h6>
<p>{{ __('homeparty.data_protection_reasons_your_personal_data_will_not_be_shown') }}</p>
<hr>
</div>
<h5 class="card-header">
<div class="row">
<div class="col-xs-12 col-sm-6">
@if($homeparty_user->is_host) {{ __('homeparty.host') }}, @else {{ __('homeparty.guest') }} , @endif {{ __('homeparty.invoice_address') }}
</div>
<div class="col-xs-12 col-sm-6">
<span class="text-tiny float-right">* {{trans('register.required_fields')}}</span>
<span class="d-none d-lg-inline">{{ __('Delivery address') }}</span>
</div>
</div>
</h5>
@include('user.homeparty._edit')
<hr class="mt-0">
<div class="form-row px-4">
<div class="form-group mb-0">
<label class="custom-control custom-checkbox m-2 ">
<input type="checkbox" class="custom-control-input" name="checkbox_datenverarbeitung" id="checkbox_datenverarbeitung" required>
<span class="custom-control-label secondary">
<span class="fa fa-angle-double-left text-primary fa-lg"></span>
{!! __('homeparty.acceptect_data_protection', ['datenschutz'=>'<button type="button" class="btn btn-outline-primary btn-xs update_modal_data_load" data-url="https://my.mivita.test/loading/modal" data-data="data_protection" data-target="#modal-loading">'.__('homeparty.data_protection').'</button>']) !!}
{{ __('homeparty.revoke_consent_at_any_time') }}
</span>
</label>
</div>
</div>
<div class="form-row px-4">
<div class="form-group">
<label class="custom-control custom-checkbox m-2">
<input type="checkbox" class="custom-control-input" name="checkbox_daten_completely" id="checkbox_daten_completely">
<span class="custom-control-label secondary">
<span class="fa fa-angle-double-left text-primary fa-lg"></span>
{{ __('homeparty.confirm_my_data_is_correct_and_complete') }}
</span>
</label>
</div>
</div>
</div>
<div class="text-left mt-3">
<button type="submit" class="btn btn-secondary mr-2 mb-2" name="action" value="homeparty-user-store"> @if($homeparty_user->id) {{ __('save changes') }} @else {{ __('sended') }} @endif</button>&nbsp;
</div>
{!! Form::close() !!}
<script type="application/javascript">
$( document ).ready(function() {
// Shipping Address show|hide
$("#same_as_billing").on("change", function () {
$('#show_shipping_address').slideToggle(200, function () {
// scroll down to shipping area.
if ($('#show_shipping_address').is(":visible")) {
_scrollTo('#show_shipping_address', 20);
}
});
});
$.extend( $.validator.messages, {
required: "{{__('account.validator_required')}}",
maxlength: $.validator.format( "{{__('account.validator_maxlength')}}" ),
minlength: $.validator.format( "{{__('account.validator_minlength')}}" ),
rangelength: $.validator.format( "{{__('account.validator_rangelength')}}" ),
email: "{{__('account.validator_email')}}",
url: "{{__('account.validator_url')}}",
date: "{{__('account.validator_date')}}",
number: "{{__('account.validator_number')}}",
digits: "{{__('account.validator_digits')}}",
equalTo: "{{__('account.validator_equalTo')}}",
range: $.validator.format( "{{__('account.validator_range')}}" ),
max: $.validator.format( "{{__('account.validator_max')}}" ),
min: $.validator.format( "{{__('account.validator_min')}}" ),
creditcard: "{{__('account.validator_creditcard')}}"
});
// Set up validator
$('#homeparty-user-form-validation').validate({
errorPlacement: function errorPlacement(error, element) {
$(element).parents('.form-group').append(
error.addClass('invalid-feedback small d-block')
)
},
highlight: function (element) {
if ($(element).hasClass('selectpicker')) {
$(element).parent().addClass('is-invalid');
}
$(element).addClass('is-invalid');
},
unhighlight: function (element) {
$(element).removeClass('is-invalid');
$(element).parents('.form-group').find('.is-invalid').removeClass('is-invalid');
},
messages : {
required: "{{__('This field is required.')}}",
country_id : {
required: "{{__('This field is required.')}}",
},
salutation : {
required: "{{__('please specify')}}",
},
first_name : {
required: "{{__('This field is required.')}}",
},
last_name : {
required: "{{__('This field is required.')}}",
},
zipcode : {
required: "{{__('This field is required.')}}",
},
address : {
required: "{{__('This field is required.')}}",
},
city : {
required: "{{__('This field is required.')}}",
}
},
onkeyup: false
});
});
</script>
@endif
@endsection