@extends('adminlte::page') @section('title', isset($shortTermThreat) ? 'ST Threat Details' : 'ST Threat Details') @section('content_header')

ST Threat Details

@endsection @section('content') @if (isset($shortTermThreat)) {!! html()->form('POST', route('shorttermthreats.update', base64_encode($shortTermThreat->id)))->id('ShortTermThreatFormSubmit')->open() !!} @else {!! html()->form('POST', route('shorttermthreats.store'))->id('ShortTermThreatFormSubmit')->open() !!} @endif @csrf @if (isset($shortTermThreat))
@endif

General Information

{{-- Threat Title and Priority --}}
{!! html()->label('ST Threat Title *', 'threat_title')->toHtml() !!} {!! html()->text('threat_title')->class('form-control')->value($shortTermThreat->threat_title ?? '')->placeholder('Enter Threat Title') !!}
{!! html()->label('Priority *', 'priority')->toHtml() !!} {!! html()->select('priority', ['' => 'Select Priority'] + $priorityOptions)->class('form-control')->value($shortTermThreat->priority ?? '') !!}
{{-- Workstream and Status --}}
{!! html()->label('Workstream *', 'workstream_id')->toHtml() !!} {!! html()->select('workstream_id', ['' => 'Select Workstream'] + $workstreamOptions)->class('form-control')->value($shortTermThreat->workstream_id ?? '')->id('sel2Workstream') !!}
{!! html()->label('ST Threat Status *', 'short_term_threat_status')->toHtml() !!} {!! html()->select('short_term_threat_status', ['' => 'Select Status'] + $statusOptions)->class('form-control')->value($shortTermThreat->short_term_threat_status ?? '') !!}
{{-- Site and Production Unit --}}
{!! html()->label('Site *', 'master_site_id')->toHtml() !!} {!! html()->select('master_site_id', ['' => 'Select Site'] + $masterSites)->class('form-control')->value($shortTermThreat->master_site_id ?? '')->id('master_site_id') !!}
{!! html()->label('Production Unit *', 'master_production_unit_id')->toHtml() !!} {!! html()->select('master_production_unit_id', ['' => 'Select Production Unit'] + $productionUnits)->class('form-control')->value($shortTermThreat->master_production_unit_id ?? '')->id('sel2ProductionUnit') !!}
{{-- Unit and Threat Owner --}}
{!! html()->label('Unit *', 'master_unit_id')->toHtml() !!} {!! html()->select('master_unit_id', ['' => 'Select Unit'] + $unitOptions)->class('form-control')->value($shortTermThreat->master_unit_id ?? '')->id('sel2Unit') !!}
{!! html()->label('ST Threat Owner *', 'threat_owner_id')->toHtml() !!} {!! html()->select('threat_owner_id', ['' => 'Select ST Threat Owner'] + $users)->class('form-control')->value($shortTermThreat->threat_owner_id ?? '')->id('sel2ThreatOwner') !!}
{{-- Hashtag and Due Date --}}
{!! html()->label('Hashtag #', 'hashtag')->toHtml() !!}
{!! html()->text('hashtag')->class('form-control')->value($shortTermThreat->hashtag ?? '')->placeholder('Hashtag')->id('inputHashtag')->attribute('readonly', true) !!}
{!! html()->label('Due Date *', 'due_date')->toHtml() !!} {!! html()->text('due_date')->class('form-control')->placeholder('DD-MM-YYYY')->value(isset($shortTermThreat->due_date) ? $shortTermThreat->due_date->format('d-m-Y') : '')->attributes([ 'data-toggle' => 'datetimepicker', 'data-target' => '#due_date', ]) !!}
{{-- Description --}}
{!! html()->label('Description *', 'description')->toHtml() !!} {!! html()->textarea('description')->class('form-control')->rows(4)->placeholder('Enter Description')->value($shortTermThreat->description ?? '') !!}
{!! html()->label('Remarks', 'remarks')->toHtml() !!} {!! html()->textarea('remarks')->class('form-control')->rows(4)->placeholder('Enter Remarks')->value($shortTermThreat->remarks ?? '') !!}
@if (isset($shortTermThreat))
{!! html()->label('Date Reported', 'inputDateReported') !!} {!! html()->text('date_reported')->class('form-control')->id('inputDateReported')->value(isset($shortTermThreat->created_at) ? $shortTermThreat->created_at->format('d-m-Y') : '')->attribute('disabled', true) !!}
{!! html()->label('Created by', 'inputCreatedBy') !!} {!! html()->text('created_by')->class('form-control')->id('inputCreatedBy')->value(isset($shortTermThreat->creator) ? $shortTermThreat->creator->full_name : '')->attribute('disabled', true) !!}
{!! html()->label('ST Threat ID', 'inputThreatID') !!} {!! html()->text('short_term_threat_id')->class('form-control')->id('inputThreatID')->value(isset($shortTermThreat->id) ? $shortTermThreat->short_term_record_id : '')->attribute('disabled', true) !!}
{!! html()->label('Overdue Days', 'inputOverdueDays') !!} {!! html()->text('overdue_days')->class('form-control')->id('inputOverdueDays')->value(isset($shortTermThreat->overdue_days) ? $shortTermThreat->overdue_days : '')->attribute('disabled', true) !!}
@endif
{{-- /.card-body --}}
{{-- /.card --}}
{{-- Action Buttons --}}
@if (isset($shortTermThreat)) Cancel @else Cancel @endif
{!! html()->form()->close() !!} @include('backend.short_term_threats.short-term-threat-action', [ 'shortTermThreat' => $shortTermThreat ?? null, ]) @if (isset($shortTermThreat)) @include('backend.short_term_threats.move-to-threat-modal', [ 'shortTermThreat' => $shortTermThreat ?? null, ]) @endif @endsection @push('js') @endpush