@extends('layouts.frontendDashboard.master') @section('title', 'Settings') @section("body-start")
@endsection @section("content")
@csrf
@php $viewAvailabilityCount = App\Models\SupportAgentSetting::where('view_availability', 1)->whereNull('user_id')->count(); $editAvailabilityCount = App\Models\SupportAgentSetting::where('edit_availability', 1)->whereNull('user_id')->count(); @endphp @foreach($viewableColumns as $item) @php $table = $item['table_name']; $column = $item['column_name']; $supportManagersetting = App\Models\SupportManagerSetting::where('column_name', $column)->where('table_name',$table)->first(); $supportAgentsetting = App\Models\SupportAgentSetting::where('column_name', $column)->whereNull('user_id')->where('table_name',$table)->first(); @endphp @php $supportAgentViewAvailibility = App\Models\SupportAgentSetting::where('column_name', $column)->where('table_name',$table)->where('user_id',auth()->user()->id)->first(); $viewAgentAvailabilityUnChecked = ""; $viewAgentAvailabilityChecked = ""; if($supportAgentViewAvailibility) { if($supportAgentViewAvailibility->view_availability == 1) { $viewAgentAvailabilityChecked = "checked"; } else { $viewAgentAvailabilityUnChecked = "checked"; } } else { $viewAgentAvailabilityChecked = "checked"; } $editAgentAvailabilityUnChecked = ""; $editAgentAvailabilityChecked = ""; if($supportAgentViewAvailibility) { if($supportAgentViewAvailibility->edit_availability == 1) { $editAgentAvailabilityChecked = "checked"; } else { $editAgentAvailabilityUnChecked = "checked"; } } else { $editAgentAvailabilityChecked = "checked"; } @endphp @endforeach
# {{__('Table Name') }} {{__('Column Name') }} @if($viewAvailabilityCount > 7)
@endif {{__('View Columns') }}
@if($editAvailabilityCount > 7)
@endif {{__('Edit Columns') }}
{{ $loop->iteration }} {{ $table}} {{ $supportManagersetting->display_name }} @if($column == 'project_name' || $column == 'total_share' || $column == 'share_price' || $column == 'project_id' || $column == 'investment_date' || $column == 'share' || $column == 'user_id') @else
@endif
@if($supportAgentsetting && $supportAgentsetting->edit_availability == 1) @if($column == 'project_name' || $column == 'total_share' || $column == 'share_price' || $column == 'project_id' || $column == 'investment_date' || $column == 'share' || $column == 'user_id') @else
@endif @endif
@endsection @push('scripts') @endpush