@extends("app.layout.base") @section("title") Ugentlige aktiviteter @endsection @section("content")

{{ __('msg.ugentligaktiviteter') }}

@if(count(\App\Notification::query()->where("user_id", "=", auth()->user()->id)->get()) > 0)
× {{__('msg.aktivitetaflyst')}} @foreach(\App\Notification::query()->where("user_id", "=", auth()->user()->id)->get() as $notification)

{{ $notification->message }}{{ __("msg.canceled") }}

@endforeach
@endif @if(!$multiEvents->isEmpty()) @if($multiEvents->contains('week', $Week)) {{-- If any of the menues in the menu table has the number of the week in the 'week' column, do this --}} @foreach($multiEvents as $multiEvent) @if($multiEvent->week == $Week)

{{ date('l', strtotime($multiEvent->date)) }}

{{$multiEvent->name}}

{{__('msg.af')}}: {{$multiEvent->accountable}}

{{$multiEvent->description}}

{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($multiEvent->date))->format('d/m/Y \k\l\. H:i') }}

@if (count(\App\UserEvent::query()->where('multiple_event_id', '=', $multiEvent->id)->where('user_id', '=', Auth::user()->id)->get()) > 0) {{__('msg.afmeld')}} @else {{-- ^ If you're already participating in the event, then show a ´cancel´ button - v Else show a ´participate´ button --}} {{__('msg.tilmeld')}} @endif $multiEvent->id ])}}">{{__('msg.sedeltagere')}}
@endif @endforeach @else

{{__('msg.dereringenugentligeaktiviteter')}}!

@endif @endif
@endsection @section("scripts") @endsection