@extends('admin.layout.master') @section('title','ROLE MAPPING MANAGEMENT') @section ('content')

{{__('obs.role')}} {{__('obs.mapping')}} {{__('obs.create')}}

@if(!$actionSteps)

@endif
@php $dataObj = []; @endphp @forelse($steps as $key=> $step) @php if($actionSteps && $acStp = $actionSteps->where('step_id', $step->id)->first()) { $arr = $acStp->toArray(); unset($arr['mappings']); $arr['admins'] = $acStp['mappings']->pluck('admin_id')->toArray(); $arr['role_id'] = $acStp['mappings']->first()->role_id; $dataObj[] = $arr; $admins = $roles->where('id', $arr['role_id'])->first()->admins; } else { $dataObj[] = [ 'id'=> null, 'action_id'=> request()->action_id??$actions->first()->id, 'step_id'=> '', 'order_sl'=> '', 'is_required'=> 0, 'edit_type'=> 0, 'is_final'=> 0, 'forward_to'=> '', 'amount_from'=> '', 'amount_to'=> '', 'role_id'=> $roles->first()->id, 'admins'=> [], ]; $admins = $roles->first()->admins; } @endphp @empty @endforelse
{{__('obs.sl')}} {{__('obs.step')}} {{__('obs.step')}} {{__('obs.serial')}} {{__('obs.role')}} {{__('obs.users')}} {{__('obs.is_required')}} {{__('obs.amount_range')}} {{__('obs.is_final')}} {{__('obs.forward_to')}}
{{$key+1}}
@endsection @section('script') @stop