@extends('layouts.main_frontend') @php $ref_no = $name = $level = $description = $category = $category_description = ''; $subcategory = $subcategory_description = $impact_area = $risktype_description = $business_areas = ''; $unit = $comments = $control_type = $control_title = $control_description = ''; $control_comments = $status = $control_reference_code= ''; $ref_no = $risk->reference_no; $name = $risk->name; $level = $risk->risk_level_id; $description = $risk->description; $category = $risk->risk_category_id; $category_description = $risk->risk_category_description; $subcategory = $risk->risk_subcategory_id; $subcategory_description = $risk->risk_subcategory_description; $impact_area = $risk->area_of_impact; $risktype_description = $risk->risktype_description; $business_areas = $risk->business_areas_impacted; $unit = $risk->unit_id; $owner['name'] = $risk->owner_name; $comments = $risk->comments; $control_reference_code = $risk->control_reference_no; $control_type = $risk->control_type; $control_title = $risk->control_title; $control_description = $risk->control_details; $control_comments = $risk->control_comments; $is_draft = $risk->is_draft; $status = $risk->status; if(!empty(old('name'))){ $ref_no = old('ref_no'); $name = old('name'); $level = old('level'); $description = old('description'); $category = old('category'); $category_description = old('category_description'); $subcategory = old('subcategory'); $subcategory_description = old('subcategory_description'); $impact_area = old('impact_area'); $risktype_description = old('risktype_description'); $business_areas = old('business_areas'); $unit = old('unit'); $comments = old('comments'); $control_type = old('control_type'); $control_title = old('control_title'); $control_description = old('control_description'); $control_comments = old('control_comments'); $status = old('status'); $control_reference_code = old('control_reference_code'); } @endphp @section('title','RCSA - Edit Risk') @section('main-content') @csrf Edit Risk {{ implode(',', $errors->all()) }} Risk Ref No. {!! $errors->first('reference_no', ':message') !!} Risk Event Name* {!! $errors->first('name', ':message') !!} Risk Level* Select Risk Level @foreach($levels as $id=>$name) risk_level_id : old('level')) == $id ? 'selected' : '' }}>{{$name}} @endforeach {!! $errors->first('level', ':message') !!} Description* {{$description}} {!! $errors->first('description', ':message') !!} Categorization Risk Category* Select Risk Category @if($riskCat) risk_category_id : old('category')) == $riskCat->id ? 'selected' : '' }}>{{$riskCat->name}} @endif {!! $errors->first('category', ':message') !!} Others (Note: This required if above field value is Others.) {{$risk->risk_category_description ?? old('category_description ')}} {!! $errors->first('category_description', ':message') !!} Risk Sub Category Select Risk Sub Category @if($riskSubCat) risk_subcategory_id : old('subcategory')) == $riskSubCat->id ? 'selected' : '' }}>{{$riskSubCat->name}} @endif {!! $errors->first('subcategory', ':message') !!} Others (Note: This required if above field value is Others.) {{$subcategory_description ?? old('subcategory_description ')}} {!! $errors->first('subcategory_description', ':message') !!} Type of Risk* @foreach($impact_areas as $id=>$name) {{$name}} @endforeach {!! $errors->first('impact_area[]', ':message') !!} Others (Note: This required if above field value is Others.) {{$risktype_description}} {!! $errors->first('risktype_description', ':message') !!} Business Areas Impacted @if($units) @foreach($units as $id=>$name) {{$name}} @endforeach @endif {!! $errors->first('unit_impact[]', ':message') !!} Ownership Details Owner Select Owner Name @if($organizationUnit) @foreach($organizationUnit as $key => $val) owner_name) ? $val->id : old('owner_id')) == $risk->owner_name ? 'selected' : '' }}>{{$val->name}} @endforeach @endif {!! $errors->first('owner_id', ':message') !!} Owner Organization {!! $errors->first('organization_id', ':message') !!} Department / Business Entity / Process {!! $errors->first('unit_id', ':message') !!} Comments {{$comments}} {!! $errors->first('comments', ':message') !!} Upload Supporting Documents Supports : pdf / word / excel / jpg {!! $errors->first('risk_files', ':message') !!} @foreach($risk['files'] as $files) @if(isset($files->file_name) && ($files->type == 'r')) Uploaded Documents @if($files->mime=='jpg') @else @endif {{ basename($files->file_name) }} {{ formatSizeUnits($files->id) }} @endif @endforeach Cancel Next Add Control @if($controlDetailsArr) @foreach($controlDetailsArr as $control) Control Reference Code {!! $errors->first('control_ref_code[]', ':message') !!} Business Unit*
:message
Supports : pdf / word / excel / jpg
{{ basename($files->file_name) }}