@extends('adminlte::page') @section('title', 'Action Details ') @section('content_header')

@if ($shortTermThreat) {{ $shortTermThreat->threat_title }} - Action Details @else Action Details @endif

@endsection @section('content') {!! html()->form( isset($action) ? 'PUT' : 'POST', isset($action) ? route('shorttermthreataction.update', base64_encode($action->id)) : route('shorttermthreataction.store'), )->id('shortTermThreatActionForm')->open() !!}
{!! html()->label('Action Name *', 'action_name') !!} {!! html()->text('action_name')->class('form-control')->placeholder('Enter Action Name ...')->value($action->action_name ?? '') !!}
{!! html()->label('Short Term Threat *', 'threat_id') !!} {!! html()->select( 'threat_id', ['' => 'Select Threat'] + ($shortTermThreatList ? (is_array($shortTermThreatList) ? $shortTermThreatList : [$shortTermThreatList->id => $shortTermThreatList->threat_title]) : []), )->class('form-control select2')->value($action->threat_id ?? ($shortTermThreat?->id ?? '')) !!}
{!! html()->label('Assign to Contact *', 'assign_to_contact_id') !!} {!! html()->select('assign_to_contact_id', ['' => 'Select User'] + $userOptions)->class('form-control select2')->value($action->assign_to_contact_id ?? '')->id('sel2User') !!}
{!! html()->label('Status *', 'status') !!} {!! html()->select('status', ['' => 'Select Status'] + \App\Models\ShortTermThreatAction::statuses())->class('form-control custom-select select2')->value($action->status ?? '') !!}
{!! html()->label('Start Date *', 'start_date') !!} {!! html()->text('start_date')->class('form-control datetimepicker')->placeholder('Choose a start date...')->placeholder('DD-MM-YYYY')->attributes([ 'data-toggle' => 'datetimepicker', 'data-target' => '#start_date', ])->value(isset($action) && $action->start_date ? $action->start_date->format('d-m-Y') : '') !!}
{!! html()->label('Due Date *', 'due_date') !!} {!! html()->text('due_date')->class('form-control datetimepicker')->placeholder('Choose a due date...')->placeholder('DD-MM-YYYY')->attributes([ 'data-toggle' => 'datetimepicker', 'data-target' => '#due_date', ])->value(isset($action) && $action->due_date ? $action->due_date->format('d-m-Y') : '') !!}
{!! html()->label('Description *', 'action_description') !!} {!! html()->textarea('action_description')->class('form-control')->rows(3)->placeholder('Enter Description ...')->value($action->action_description ?? '') !!}
{!! html()->checkbox('is_email_notification', isset($action) && $action->is_email_notification)->class('form-check-input') !!} {!! html()->label('Send Notification Email', 'is_email_notification')->class('form-check-label') !!}

{{ isset($action->completion_date) ? $action->completion_date->format('d-m-Y') : 'N/A' }}

{{ $action->modifier->full_name ?? '-' }}

{{ $action->creator->full_name ?? '-' }}

{{ isset($action->modified_at) ? $action->modified_at->format(config('constants.date_format')) : '-' }}

{{ isset($action->created_at) ? $action->created_at->format(config('constants.date_format')) : '-' }}

Cancel
{!! html()->form()->close() !!} @endsection @push('js') @endpush