@extends('adminlte::blank') @section('title', 'Short Term Threat Details') @section('content_header')

Short Term Threat Details

@endsection @section('content') {!! html()->form('POST', route('shorttermthreats.update', base64_encode($threat->id)))->id('ShortTermThreatFormSubmit')->open() !!}
{!! html()->hidden('view_mode', 1)->id('viewMode') !!} {{-- Threat Title --}}
{!! html()->label('ST Threat Title *', 'threat_title') !!} {!! html()->text('threat_title', $threat->threat_title)->class('form-control')->value($threat->threat_title ?? '')->id('inputShortThreatName')->attribute('disabled', true) !!}
{{-- Priority / Workstream / Threat Status --}}
{!! html()->label('Priority *', 'priority') !!} {!! html()->select('priority', ['' => 'Select Priority'] + array_combine($priorityOptions, $priorityOptions))->class('form-control custom-select')->value($threat->priority ?? '')->id('inputPriority')->attribute('disabled', true) !!}
{!! html()->label('Workstream *', 'workstream_id') !!} {!! html()->select('workstream_id', ['' => 'Select Workstream'] + $workstreamOptions, $threat->workstream_id)->class('form-control')->id('sel2Workstream')->value($threat->workstream_id ?? '')->attribute('disabled', true) !!}
{!! html()->label('ST Threat Status *', 'short_term_threat_status') !!} {!! html()->select( 'short_term_threat_status', ['' => 'Select Status'] + array_combine($statusOptions, $statusOptions), $threat->short_term_threat_status, )->value($threat->short_term_threat_status ?? '')->class('form-control custom-select')->id('inputThreatStatus')->attribute('disabled', true) !!}
{{-- Site / Production Unit / Unit --}}
{!! html()->label('Site *', 'master_site_id') !!} {!! html()->select('master_site_id', ['' => 'Select Site'] + $masterSites, $threat->master_site_id)->class('form-control custom-select')->id('inputSite')->value($threat->master_site_id ?? '')->attribute('disabled', true) !!}
{!! html()->label('Production Unit *', 'master_production_unit_id') !!} {!! html()->select( 'master_production_unit_id', ['' => 'Select Production Unit'] + $productionUnits, $threat->master_production_unit_id, )->class('form-control custom-select')->value($threat->master_production_unit_id ?? '')->id('inputProductionUnit')->attribute('disabled', true) !!}
{!! html()->label('Unit *', 'master_unit_id') !!} {!! html()->select('master_unit_id', ['' => 'Select Unit'] + $unitOptions, $threat->master_unit_id)->class('form-control custom-select')->id('inputUnit')->value($threat->master_unit_id ?? '')->attribute('disabled', true) !!}
{{-- Threat Owner / Hashtag / Due Date --}}
{!! html()->label('Threat Owner *', 'threat_owner_id') !!} {!! html()->select('threat_owner_id', ['' => 'Select ST Threat Owner'] + $users, $threat->threat_owner_id)->class('form-control')->value($threat->threat_owner_id ?? '')->id('sel2ThreatOwner')->attribute('disabled', true) !!}
{!! html()->label('Hashtag #', 'hashtag')->toHtml() !!}
{!! html()->text('hashtag')->class('form-control')->value($threat->hashtag ?? '')->placeholder('Hashtag')->id('inputHashtag')->attribute('readonly', true) !!} @if ($threat->short_term_threat_status != 'Closed-Move to Threats')
@endif
{!! html()->label('Due Date *', 'due_date') !!} {!! html()->text('due_date', $threat->due_date ? $threat->due_date->format('d-m-Y') : '')->class('form-control')->id('ShortTermThreatDueDate')->attributes([ 'disabled' => true, 'data-toggle' => 'datetimepicker', 'data-target' => '#due_date', ]) !!}
{{-- Description --}}
{!! html()->label('Description *', 'description') !!} {!! html()->textarea('description', $threat->description)->class('form-control')->rows(4)->attribute('disabled', true) !!}
{{-- Remarks --}}
{!! html()->label('Remarks', 'remarks') !!} {!! html()->textarea('remarks', $threat->remarks)->class('form-control')->rows(4)->attribute('disabled', true) !!}
{{-- Date Reported / Created By / Threat ID / Overdue Days --}}
{!! html()->label('Date Reported', 'created_at') !!}

{{ optional($threat->created_at)->format('d-m-Y') }}

{!! html()->label('Created By', 'created_by') !!}

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

{!! html()->label('ST Threat ID', 'threat_id') !!}

{{ $threat->short_term_record_id ?? '-' }}

{!! html()->label('Overdue Days', 'overdue_days') !!}

{{ $threat->overdue_days ?? 0 }}

Cancel
{{-- @if ($threat->short_term_threat_status != 'Closed-Move to Threats' && (auth()->user()->role === \App\Models\User::$user_types_names['Admin'] || auth()->id() === $threat->created_by || auth()->id() === $threat->threat_owner_id)) --}} @if ($threat->short_term_threat_status != 'Closed-Move to Threats')
@endif
{!! html()->form()->close() !!}
@endsection @push('js') @endpush