@extends('layouts.header')
@section('content')
@php
$temp=0;
$converted_array=array();
$temparray[]=array();
$ViewAllReport=$GetUserReportAccess['ViewAllReport'];
$CreateReportAccess=$GetUserReportAccess['CreateReport'];
$EditReport=$GetUserReportAccess['EditReport'];
foreach ($Configured_DefaultFilters as $keyz=>$key) {
if($key->DisplayType==4 || $key->DisplayType==14)
{
// [{name:field_name+"Range",value:Conditions},{name:field_name,value:""},{name:"to"+field_name,value:""}]
$range=$key->FieldName."Range";
$to="to".$key->FieldName;
//$converted_array[]=array("name"=>"$range","value"=>$key->Conditions);
//$converted_array[]=array("name"=>$key->FieldName,"value"=>"");
//$converted_array[]=array("name"=>"$to","value"=>"");
$temparray[$temp][]=array("name"=>"$range","value"=>$key->Conditions);
$temparray[$temp][]=array("name"=>$key->FieldName,"value"=>"");
$temparray[$temp][]=array("name"=>"$to","value"=>"");
$temp++;
}
else
{
$converted_array[]=array("name"=>$key->FieldName,"value"=>$key->Conditions);
}
}
if($temp>0)
{
if($temparray[$temp-1]!="")
{
// to get recently modified date field, updated on 19th Nov '21
$converted_array[]=$temparray[$temp-1][0];
$converted_array[]=$temparray[$temp-1][1];
$converted_array[]=$temparray[$temp-1][2];
}
}
$data_form=json_encode($converted_array);
$ReportName="";
$Description="";
$PrimaryModuleId="";
$results_obj = json_decode($data_array);
$fieldList_array = json_decode($field_list);
$ReportName=$results_obj[0]->ReportName;
$Description=$results_obj[0]->Description;
$ReportId=$results_obj[0]->ReportId;
$PrimaryModuleId=$results_obj[0]->PrimaryModuleId;
$ReportType=$results_obj[0]->ReportType;
$Description=$results_obj[0]->Description;
$pass_array=array("RowId"=>"$ReportId");
$link_array=array("ModuleId"=>"$ModuleId"); // on 18th Feb '22
@endphp