@include('layouts.partials.messages')

{!! $title !!}

@if($type != 6) @endif
{!! Form::open([ 'route' => 'admin.calendar.update', 'method' => 'POST', 'id' => 'ajaxSave', ]) !!}
@if($type != 7) @if($type != 6 )
{!! Form::text('title',$result['title'],['class'=>'form-control','readonly'=>true]) !!} {{----}}
@else
{!! Form::textarea('comment',$result['comment'],['class'=>'form-control','size'=>'5x5']) !!} {{----}}
@endif @endif @if($result['selected_week_days'] != '' && $type == 7)
@php $selectedMSW = explode(',',$result['selected_week_days']) ?? []; $weekDays = getWeekDayShortNames(); array_unshift($weekDays, 'Sun'); unset($weekDays[7]); @endphp @foreach($weekDays as $dayNo => $days) @php $isMSWChecked = in_array($dayNo , $selectedMSW); @endphp @endforeach
@endif @if($type == 5)
{!! Form::textarea('comment',$result['message'],['class'=>'form-control','size'=>'5x5','readonly'=>true]) !!}
@endif
{!! Form::text('start_date',$result['start_date'],['class'=>'form-control __itm_start_date datepicker-input-sch']) !!} {{----}}
@if($type != 5)
{!! Form::text('end_date',$result['end_date'],['class'=>'form-control __itm_end_date datepicker-input-sch']) !!} {{----}}
@endif @if($type == 7) @php $fields= getField(['private_points','company_points','student_points','multiplicator_skip_date']); @endphp
{!! Form::text('multiplicator_skip_date',isset($fields['multiplicator_skip_date']) ? $fields['multiplicator_skip_date'] : '', ['class' => 'form-control','id'=> 'datePick']) !!}
@endif @if($result['description'] != '' && $type != 6)
{!! Form::textarea('description',$result['description'] ?? '',['class'=>'form-control','size'=>'5x5','readonly'=>true]) !!} {{----}}
@endif
@if($type == 5)
{{Form::label('user_type', __('notifications.users'), ['class' => 'control-label mb-2'])}} @if($result['user_type'] == 0) {!! __('notifications.both') !!} @elseif($result['user_type'] == 1) {!! __('notifications.users') !!} @else {!! __('notifications.company') !!} @endif
@if($result['notification_type'] != "")
{{Form::label('notification_type', __('notifications.notification_type'), ['class' => 'control-label mb-2'])}} @php $notiType = $result['notification_type'] ?? null; @endphp {!! pushNotificationPayloadType($notiType) !!}
{{Form::label('notification_type', $result['source_label'], ['class' => 'control-label mb-2'])}} {!! $result['source_name'] !!}
@endif @endif @if($type == 6 && $result['description'] != "")
@php $history = json_decode($result['description'],true); @endphp
    @foreach($history as $backlog)
  • {!! $backlog['old'] !!}

    {!! dateFormat($backlog['date'] ,DISPLAY_DATETIME3) ." (". $backlog['admin_name'] .")" !!}
  • @endforeach
@endif @if(!empty($result['stores']))

{!! implode(', ',$result['stores']) !!}

@endif @if($result['featured_image'] != '')

@endif @if($result['image'] != '')
@if($type == 2) @php $images = json_decode($result['image']); @endphp
    @foreach($images as $img)
  • @endforeach
@else

@endif
@endif @if($type == 7)
{!! Form::label('private_points',__('website_setting.private_points'),['class' => 'control-label mb-2 ']) !!}
{!! Form::text('private_points',isset($fields['private_points']) ? $fields['private_points'] : '',['class' => 'form-control']) !!}
{!! Form::label('company_points',__('website_setting.company_points'),['class' => 'control-label mb-2 ']) !!}
{!! Form::text('company_points',isset($fields['company_points']) ? $fields['company_points'] : '',['class' => 'form-control']) !!}
{!! Form::label('student_points',__('website_setting.student_points'),['class' => 'control-label mb-2 ']) !!}
{!! Form::text('student_points',isset($fields['student_points']) ? $fields['student_points'] : '',['class' => 'form-control']) !!}
@endif
@if($type == 6 && strtotime(dateFormat($result['start_date'])) > strtotime(currentDate())) @endif
{!! Form::close() !!}