mivita/resources/views/user/homeparty/guests.blade.php
Kevin Adametz bfa3bb1df4 08 2024
2024-08-05 12:05:24 +02:00

135 lines
7.4 KiB
PHP

@extends('layouts.layout-2')
@section('content')
<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>
@if(!$homeparty->completed)
<a href="{{route('user_homeparty_guest_detail', [$homeparty->id, 'new'])}}" class="btn btn-sm btn-secondary rounded-pill d-block float-right"><span class="ion ion-md-person-add"></span>&nbsp; Gast anlegen</a>
@endif
</h4>
<div class="row">
<div class="col-12">
@php($g_count = 1)
@foreach($homeparty->homeparty_users as $homeparty_user)
<div class="card mb-3">
<div class="card-body d-flex justify-content-between align-items-start pb-2">
@if(!$homeparty->completed)
<div>
@if($homeparty_user->is_host)
<a href="{{route('user_homeparty_detail', [$homeparty->id, 13])}}" class="text-body text-big font-weight-semibold">
<span class="text-muted">{{ __('homeparty.host') }} </span>
@else
<a href="{{route('user_homeparty_guest_detail', [$homeparty->id, $homeparty_user->id])}}" class="text-body text-big font-weight-semibold">
<span class="text-muted">{{ __('homeparty.guest') }} {{$g_count++}} </span>
@endif
{{$homeparty_user->billing_firstname}} {{$homeparty_user->billing_lastname}}</a>
{{-- <span class="badge badge-success align-text-bottom ml-1">offen ...</span> --}}
</div>
<div>
@if($homeparty_user->is_host)
<a href="{{route('user_homeparty_detail', [$homeparty->id, 13])}}" class="btn btn-sm btn-secondary mr-2"><i class="fa fa-edit"></i> {{ __('edit') }}</a>
@else
<a href="{{route('user_homeparty_guest_detail', [$homeparty->id, $homeparty_user->id])}}" class="text-body text-big font-weight-semibold">
@endif
<div class="btn-group project-actions">
@if($homeparty_user->is_host)
<span class="ion ion-md-trash text-muted" data-toggle="tooltip" title="{{ __('homeparty.host_can_not_delete') }} "></span>
@else
<a href="{{ route('user_homeparty_delete', ['hpu', $homeparty->id, $homeparty_user->id]) }}"
class="" onclick="return confirm('{{ __('homeparty.guest_delete_really') }} ');">
<span class="ion ion-md-trash text-danger"></span>
</a>
@endif
</div>
</div>
@else
<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>
{{-- <span class="badge badge-success align-text-bottom ml-1">offen ...</span> --}}
</div>
@endif
</div>
<div class="progress rounded-0" style="height: 2px;">
<div class="progress-bar" style="width: 100%;"></div>
</div>
<div class="card-body pt-0 mt-2">
<div class="row">
<div class="col">
<div class="text-muted small">{{ __('Address') }}</div>
<div class="font-weight-bold">{{$homeparty_user->billing_address}}
{{$homeparty_user->billing_zipcode}}
{{$homeparty_user->city}}
@if($homeparty_user->billing_country_id){{ $homeparty_user->billing_country->getLocated() }}@endif
</div>
</div>
<div class="col">
<div class="text-muted small">{{ __('Phone') }}</div>
<div class="font-weight-bold">{{$homeparty_user->billing_phone}}</div>
</div>
<div class="col">
<div class="text-muted small">{{ __('E-Mail') }}</div>
<div class="font-weight-bold">{{$homeparty_user->billing_email}}</div>
</div>
</div>
</div>
</div>
@endforeach
@if(!$homeparty->completed)
<div class="card">
<div class="card-body py-3">
<div class="form-group mb-0">
<label class="form-label">{{ __('homeparty.invitation_link_for_guests') }} <span class="text-muted"> ({{ __('homeparty.let_your_guests_fill_in_their_own_details') }})</span></label>
<div class="input-group">
<span class="input-group-prepend">
<button class="btn btn-sm btn-secondary" type="button" title="{{ __('homeparty.copy') }}" data-clipboard-demo data-clipboard-target="#homeparty_link_{{$homeparty->id}}"><i class="ion ion-ios-copy"></i> {{ __('homeparty.copy_link') }}</button>
</span>
<input type="text" class="form-control" name="homeparty_link_{{$homeparty->id}}" value="{{ $homeparty->getTokenLink() }}" id="homeparty_link_{{$homeparty->id}}" placeholder="">
</div>
</div>
</div>
</div>
@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_homeparty_order', [$homeparty->id])}}" class="btn btn-sm btn-secondary mr-2 mb-2"><i class="ion ion-md-basket"></i> {{ __('homeparty.order') }}</a>
<a href="{{route('user_homepartys')}}" class="btn btn-sm btn-default mb-2">{{ __('back_to_overview') }}</a>
</div>
<script>
$( document ).ready(function() {
var clipboardDemos = new ClipboardJS('[data-clipboard-demo]');
clipboardDemos.on('success', function (e) {
e.clearSelection();
$(e.trigger).tooltip('enable').tooltip('show');
});
clipboardDemos.on('error', function (e) {
console.error('Action:', e.action);
console.error('Trigger:', e.trigger);
});
$('button[data-clipboard-demo]').on('mouseout', function () {
$(this).tooltip('disable');
})
});
</script>
@endsection