{!! Form::open(['url' => action([\Modules\Crm\Http\Controllers\ScheduleController::class, 'update'], ['follow_up' => $schedule->id]), 'method' => 'put', 'id' => 'edit_schedule' ]) !!}

@lang('crm::lang.edit_schedule')

@php if($schedule_for == 'lead' || $schedule->customer->type == 'lead') { $label = __('crm::lang.lead'); } else { $label = __('contact.customer'); } @endphp
{!! Form::label('title', __('crm::lang.title') . ':*' )!!} {!! Form::text('title', $schedule->title, ['class' => 'form-control', 'required' ]) !!}
{!! Form::label('contact_id', $label .':*') !!} {!! Form::select('contact_id', $customers, $schedule->contact_id, ['class' => 'form-control select2', 'placeholder' => __('messages.please_select'), 'required', 'style' => 'width: 100%;']); !!}
{!! Form::label('status', __('sale.status') .':') !!} {!! Form::select('status', $statuses, $schedule->status, ['class' => 'form-control select2', 'placeholder' => __('messages.please_select'), 'style' => 'width: 100%;', 'id' => 'follow_up_edit_status']); !!}
{!! Form::label('start_datetime', __('crm::lang.start_datetime') . ':*' )!!} {!! Form::text('start_datetime', !empty($schedule->start_datetime) ? @format_datetime($schedule->start_datetime) : '', ['class' => 'form-control datetimepicker', 'required', 'readonly']) !!}
{!! Form::label('end_datetime', __('crm::lang.end_datetime') . ':*' )!!} {!! Form::text('end_datetime', !empty($schedule->end_datetime) ? @format_datetime($schedule->end_datetime) : '', ['class' => 'form-control datetimepicker', 'required', 'readonly']) !!}
{!! Form::label('description', __('lang_v1.description') . ':') !!} {!! Form::textarea('description', $schedule->description, ['class' => 'form-control ', 'id' => 'schedule_description']); !!}
{!! Form::label('schedule_type', __('crm::lang.schedule_type') .':*') !!} {!! Form::select('schedule_type', $follow_up_types, $schedule->schedule_type, ['class' => 'form-control select2', 'placeholder' => __('messages.please_select'), 'required', 'style' => 'width: 100%;']); !!}
{!! Form::label('followup_category_id', __('crm::lang.followup_category') .':*') !!} {!! Form::select('followup_category_id', $followup_category, $schedule->followup_category_id, ['class' => 'form-control select2', 'required', 'style' => 'width: 100%;', 'placeholder' => __('messages.please_select')]); !!}
{!! Form::label('user_id', __('crm::lang.assgined') .':*') !!} {!! Form::select('user_id[]', $users, $schedule->users->pluck('id'), ['class' => 'form-control select2', 'multiple', 'required', 'style' => 'width: 100%;']); !!}
@show_tooltip(__('crm::lang.send_schedule_notificatoion'))
{!! Form::label('notify_via', __('crm::lang.notify_via') .':*') !!}
{!! Form::label('notify_before', __('crm::lang.notify_before') . ':*') !!}
{!! Form::number('notify_before', $schedule->notify_before, ['class' => 'form-control width-40 pull-left', 'placeholder' => __('crm::lang.notify_before'), 'required']); !!} {!! Form::select('notify_type', $notify_type, $schedule->notify_type, ['class' => 'form-control width-60 pull-left']); !!}
{!! Form::close() !!}