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

{{ $threatAction->threat->threat_name }}

@endsection @section('content') {!! html()->modelForm($threatAction, 'POST', route('opportunity-action.update', base64_encode($threatAction->id)))->id('opportunityActionForm')->open() !!}
{{-- Action Name --}}
{!! html()->label('Action Name *', 'action_name') !!} {!! html()->text('action_name')->id('inputActionName')->placeholder('Enter Action name ...')->class('form-control')->required() !!}
{{-- Threat --}}
@php $config = [ "placeholder" => "Select Opportunity", "allowClear" => false, ]; @endphp Opportunity * @foreach($threatOptions as $key => $value) @endforeach {!! html()->hidden('threat_id', $threatAction->threat_id)->id('hiddenThreatId') !!}
{{-- Action Type --}}
{!! html()->label('Action Type *', 'action_type') !!} {!! html()->select('action_type', ['' => 'Select Phase', 'Long Term Solution' => 'Long Term Solution', 'Interim Mitigation' => 'Interim Mitigation'], $threatAction->action_type) ->id('inputActionType') ->class('form-control custom-select') ->required() !!}
{{-- Assign to Contact --}}
@php $config = [ "placeholder" => "Select a user", "allowClear" => false, ]; @endphp Assigned to Action Owner* @foreach(App\Models\Threat::getUsers($threatAction->assign_to_contact_id ?? '') as $key => $label) @endforeach
{{-- Status --}}
{!! html()->label('Status *', 'status') !!} {!! html()->select('status', ['' => 'Select Status', 'Open' => 'Open', 'Completed' => 'Completed', 'In Progress' => 'In Progress', 'On Hold' => 'On Hold', 'Cancelled' => 'Cancelled'], $threatAction->status) ->id('Status') ->class('form-control custom-select') ->required() !!}
{{-- Start Date --}}
@php $config = ['format' => 'DD-MM-YYYY']; @endphp
{{-- Description --}}
{!! html()->label('Description *', 'description') !!} {!! html()->textarea('description')->class('form-control')->placeholder('Enter Description ...')->rows(3)->required() !!}
{{-- Commentary --}}
{!! html()->label('Commentary *', 'commentary') !!} {!! html()->textarea('commentary')->class('form-control')->placeholder('Enter Commentary ...')->rows(3)->required() !!}
{{-- Due Date --}}
{{-- Send Notification Email --}}
{!! html()->label('Send Notification Email', 'is_email_notification') !!}
@if($threatAction->is_email_notification == 1) {!! html()->checkbox('is_email_notification', 1, true) ->class('form-check-input') ->id('is_email_notification') !!} @else {!! html()->checkbox('is_email_notification', 0, false) ->class('form-check-input') ->id('is_email_notification') !!} @endif
{{-- Completion Date --}}
{!! html()->label('Completion Date', 'completion_date') !!}

{{ $threatAction->completion_date ? \Carbon\Carbon::parse($threatAction->completion_date)->format('d-m-Y') : 'N/A' }}

{{ $threatAction->modifiedBy->full_name ?? 'N/A' }}

{{ $threatAction->createdBy->full_name ?? 'N/A' }}

{{ optional($threatAction->last_modified_at)->format('d-m-Y h:i A') }}

{{ optional($threatAction->created_at)->format('d-m-Y h:i A') }}

{!! html()->a('javascript:history.go(-1)', 'Cancel')->class('btn btn-default') !!} {!! html()->submit('Save Changes')->id('opportunity-action-save-button')->class('btn btn-success float-right') !!}
{!! html()->form()->close() !!} @endsection @push('js') @endpush