change the report/map routes into v2
This commit is contained in:
@@ -98,9 +98,9 @@ class Cities implements FromView, ShouldAutoSize, WithEvents, WithDrawings
|
|||||||
|
|
||||||
$query .= " group by edarat_id order by province_id ASC;";
|
$query .= " group by edarat_id order by province_id ASC;";
|
||||||
|
|
||||||
$item_data = DB::select(DB::raw($query));
|
$item_data = DB::select($query);
|
||||||
|
|
||||||
|
|
||||||
|
$array = array();
|
||||||
foreach ($item_data as $key => $value) {
|
foreach ($item_data as $key => $value) {
|
||||||
$array[$value->province_id]['city'][$value->edarat_id]['data']['MarematRooyeCount']= $value->MarematRooyeCount;
|
$array[$value->province_id]['city'][$value->edarat_id]['data']['MarematRooyeCount']= $value->MarematRooyeCount;
|
||||||
$array[$value->province_id]['city'][$value->edarat_id]['data']['PaksaziCount']= $value->PaksaziCount;
|
$array[$value->province_id]['city'][$value->edarat_id]['data']['PaksaziCount']= $value->PaksaziCount;
|
||||||
@@ -165,7 +165,8 @@ class Cities implements FromView, ShouldAutoSize, WithEvents, WithDrawings
|
|||||||
return view('excel.CurrentActivities.Report1-City', [
|
return view('excel.CurrentActivities.Report1-City', [
|
||||||
'roads' => $array,
|
'roads' => $array,
|
||||||
'fromFa' => $fromDate,
|
'fromFa' => $fromDate,
|
||||||
'toFa' => $toDate
|
'toFa' => $toDate,
|
||||||
|
'has_province_filter' => $province ? true : false,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ class Provinces implements FromView, ShouldAutoSize, WithEvents, WithDrawings
|
|||||||
|
|
||||||
$query .= " group by province_id;";
|
$query .= " group by province_id;";
|
||||||
|
|
||||||
$item_data = DB::select(DB::raw($query));
|
$item_data = DB::select($query);
|
||||||
|
|
||||||
$sum['MarematRooyeCount'] = 0;
|
$sum['MarematRooyeCount'] = 0;
|
||||||
$sum['PaksaziCount'] = 0;
|
$sum['PaksaziCount'] = 0;
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class Cities implements FromView, ShouldAutoSize, WithEvents, WithDrawings
|
|||||||
|
|
||||||
$query .= " AND activity_date_time BETWEEN '{$fromDate}' AND '{$toDate}' GROUP BY city_id ORDER BY province_id ASC;";
|
$query .= " AND activity_date_time BETWEEN '{$fromDate}' AND '{$toDate}' GROUP BY city_id ORDER BY province_id ASC;";
|
||||||
|
|
||||||
$data = DB::select(DB::raw($query));
|
$data = DB::select($query);
|
||||||
|
|
||||||
$temp =[];
|
$temp =[];
|
||||||
foreach ($data as $key => $value) {
|
foreach ($data as $key => $value) {
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ class Province implements FromView, ShouldAutoSize, WithEvents, WithDrawings
|
|||||||
|
|
||||||
$query .= " AND activity_date_time BETWEEN '{$fromDate}' AND '{$toDate}' GROUP BY province_id ORDER BY province_id ASC;";
|
$query .= " AND activity_date_time BETWEEN '{$fromDate}' AND '{$toDate}' GROUP BY province_id ORDER BY province_id ASC;";
|
||||||
|
|
||||||
$data = DB::select(DB::raw($query));
|
$data = DB::select($query);
|
||||||
|
|
||||||
|
|
||||||
$countryQuery = "SELECT
|
$countryQuery = "SELECT
|
||||||
@@ -121,7 +121,7 @@ class Province implements FromView, ShouldAutoSize, WithEvents, WithDrawings
|
|||||||
|
|
||||||
$countryQuery .= " AND activity_date_time BETWEEN '{$fromDate}' AND '{$toDate}';";
|
$countryQuery .= " AND activity_date_time BETWEEN '{$fromDate}' AND '{$toDate}';";
|
||||||
|
|
||||||
$country = DB::select(DB::raw($countryQuery));
|
$country = DB::select($countryQuery);
|
||||||
|
|
||||||
|
|
||||||
return view('excel.CurrentActivities.Report2-Province', [
|
return view('excel.CurrentActivities.Report2-Province', [
|
||||||
|
|||||||
@@ -74,49 +74,50 @@ class HomeProjectController extends Controller
|
|||||||
'data' => $projectsArray
|
'data' => $projectsArray
|
||||||
], 200);
|
], 200);
|
||||||
}
|
}
|
||||||
|
// sharareh begin
|
||||||
|
// public function getFastReactionProjectPoints(Request $request)
|
||||||
|
// {
|
||||||
|
// $province = $request->province_id;
|
||||||
|
// $edare_shahri = $request->edare_shahri_id;
|
||||||
|
// $status = $request->status;
|
||||||
|
// $rms_status = $request->rms_status;
|
||||||
|
|
||||||
public function getFastReactionProjectPoints(Request $request)
|
// if ($request->date_from && $request->date_to) {
|
||||||
{
|
// $date_from = $request->date_from.' 00:00:00';
|
||||||
$province = $request->province_id;
|
// $date_to = $request->date_to.' 23:59:59';
|
||||||
$edare_shahri = $request->edare_shahri_id;
|
// } else {
|
||||||
$status = $request->status;
|
// $date_from = Date('Y-m-d');
|
||||||
$rms_status = $request->rms_status;
|
// $date_to = new \DateTime('tomorrow');
|
||||||
|
// $date_to = $date_to->format('Y-m-d');
|
||||||
|
// }
|
||||||
|
|
||||||
if ($request->date_from && $request->date_to) {
|
// $projects = RoadObserved::select('id', 'lng', 'lat','status')
|
||||||
$date_from = $request->date_from.' 00:00:00';
|
// ->whereBetween('created_at', [$date_from, $date_to])
|
||||||
$date_to = $request->date_to.' 23:59:59';
|
// ->when($province, function ($query) use ($province) {
|
||||||
} else {
|
// return $query->where('province_id', $province);
|
||||||
$date_from = Date('Y-m-d');
|
// })
|
||||||
$date_to = new \DateTime('tomorrow');
|
// ->when($rms_status, function ($query) use ($rms_status) {
|
||||||
$date_to = $date_to->format('Y-m-d');
|
// if ($rms_status == 2) {
|
||||||
}
|
// return $query->where('rms_status', '<>',0);
|
||||||
|
// } else {
|
||||||
$projects = RoadObserved::select('id', 'lng', 'lat','status')
|
// return $query->where('rms_status', 0);
|
||||||
->whereBetween('created_at', [$date_from, $date_to])
|
// }
|
||||||
->when($province, function ($query) use ($province) {
|
// })
|
||||||
return $query->where('province_id', $province);
|
// ->when($edare_shahri, function ($query) use ($edare_shahri) {
|
||||||
})
|
// return $query->where('edarate_shahri_id', $edare_shahri);
|
||||||
->when($rms_status, function ($query) use ($rms_status) {
|
// })
|
||||||
if ($rms_status == 2) {
|
// ->when($status, function ($query) use ($status) {
|
||||||
return $query->where('rms_status', '<>',0);
|
// return $query->where('status', $status);
|
||||||
} else {
|
// })
|
||||||
return $query->where('rms_status', 0);
|
// // ->toSql();
|
||||||
}
|
// ->get();
|
||||||
})
|
// return response()->json([
|
||||||
->when($edare_shahri, function ($query) use ($edare_shahri) {
|
// 'status' => 'succeed',
|
||||||
return $query->where('edarate_shahri_id', $edare_shahri);
|
// 'message' => '',
|
||||||
})
|
// 'data' => $projects
|
||||||
->when($status, function ($query) use ($status) {
|
// ], 200);
|
||||||
return $query->where('status', $status);
|
// }
|
||||||
})
|
// sharareh begin
|
||||||
// ->toSql();
|
|
||||||
->get();
|
|
||||||
return response()->json([
|
|
||||||
'status' => 'succeed',
|
|
||||||
'message' => '',
|
|
||||||
'data' => $projects
|
|
||||||
], 200);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getFastReactionProjectPointsFor141(Request $request)
|
public function getFastReactionProjectPointsFor141(Request $request)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -430,56 +430,58 @@ class RoadItemsProjectController extends Controller
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
////// function show items on map
|
////// function show items on map
|
||||||
public function show_item(Request $request)
|
// sharareh begin
|
||||||
{
|
// public function show_item(Request $request)
|
||||||
$province = $request->province_id;
|
// {
|
||||||
$city = $request->city_id;
|
// $province = $request->province_id;
|
||||||
$sub = $request->sub_id;
|
// $city = $request->city_id;
|
||||||
|
// $sub = $request->sub_id;
|
||||||
|
|
||||||
if ($request->date_from && $request->date_to) {
|
// if ($request->date_from && $request->date_to) {
|
||||||
$date_from = $request->date_from.' 00:00:00';
|
// $date_from = $request->date_from.' 00:00:00';
|
||||||
$date_to = $request->date_to.' 23:59:59';
|
// $date_to = $request->date_to.' 23:59:59';
|
||||||
} else {
|
// } else {
|
||||||
$date_from = Date('Y-m-d');
|
// $date_from = Date('Y-m-d');
|
||||||
$date_to = new \DateTime('tomorrow');
|
// $date_to = new \DateTime('tomorrow');
|
||||||
$date_to = $date_to->format('Y-m-d');
|
// $date_to = $date_to->format('Y-m-d');
|
||||||
}
|
// }
|
||||||
|
// $datass = DB::table('road_items_projects')
|
||||||
|
// ->where('is_new', 1)
|
||||||
|
// ->when($province, function ($query, $province) {
|
||||||
|
// return $query->where('road_items_projects.province_id', $province);
|
||||||
|
// })
|
||||||
|
// ->when($city, function ($query, $city) {
|
||||||
|
// return $query->where('road_items_projects.city_id', $city);
|
||||||
|
// })
|
||||||
|
// ->when($sub, function ($query, $sub) {
|
||||||
|
// return $query->where('sub_items', 'like', '%"'.$sub.'"%');
|
||||||
|
// })
|
||||||
|
// ->when($request->item, function ($query) use ($request) {
|
||||||
|
// if ($request->item > 0) {
|
||||||
|
// return $query->where('item', $request->item);
|
||||||
|
// }
|
||||||
|
// return $query;
|
||||||
|
// })
|
||||||
|
// ->when(!is_null($request->status), function ($query) use ($request) {
|
||||||
|
// return $query->where('status', $request->status);
|
||||||
|
// })
|
||||||
|
// ->leftJoin('users', 'users.id', '=', 'road_items_projects.user_id')
|
||||||
|
// ->whereBetween('road_items_projects.activity_date', [
|
||||||
|
// $date_from,
|
||||||
|
// $date_to,
|
||||||
|
// ])
|
||||||
|
// ->select('road_items_projects.id as i', 'start_lat as l', 'start_lng as g', 'status')
|
||||||
|
// ->get();
|
||||||
|
// // dd($datass);
|
||||||
|
|
||||||
$datass = DB::table('road_items_projects')
|
// return response()->json([
|
||||||
->where('is_new', 1)
|
// 'status' => 'succeed',
|
||||||
->when($province, function ($query, $province) {
|
// 'count' => count($datass),
|
||||||
return $query->where('road_items_projects.province_id', $province);
|
// 'message' => '',
|
||||||
})
|
// 'data' => $datass
|
||||||
->when($city, function ($query, $city) {
|
// ], 200);
|
||||||
return $query->where('road_items_projects.city_id', $city);
|
// }
|
||||||
})
|
// sharareh end
|
||||||
->when($sub, function ($query, $sub) {
|
|
||||||
return $query->where('sub_items', 'like', '%"'.$sub.'"%');
|
|
||||||
})
|
|
||||||
->when($request->item, function ($query) use ($request) {
|
|
||||||
if ($request->item > 0) {
|
|
||||||
return $query->where('item', $request->item);
|
|
||||||
}
|
|
||||||
return $query;
|
|
||||||
})
|
|
||||||
->when(!is_null($request->status), function ($query) use ($request) {
|
|
||||||
return $query->where('status', $request->status);
|
|
||||||
})
|
|
||||||
->leftJoin('users', 'users.id', '=', 'road_items_projects.user_id')
|
|
||||||
->whereBetween('road_items_projects.activity_date', [
|
|
||||||
$date_from,
|
|
||||||
$date_to,
|
|
||||||
])
|
|
||||||
->select('road_items_projects.id as i', 'start_lat as l', 'start_lng as g', 'status')
|
|
||||||
->get();
|
|
||||||
|
|
||||||
return response()->json([
|
|
||||||
'status' => 'succeed',
|
|
||||||
'count' => count($datass),
|
|
||||||
'message' => '',
|
|
||||||
'data' => $datass
|
|
||||||
], 200);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function table3InRoadItemProject(Request $request)
|
public function table3InRoadItemProject(Request $request)
|
||||||
|
|||||||
@@ -44,12 +44,17 @@ class RoadItemsReportController extends Controller
|
|||||||
$date_to = Date('Y-m-d');
|
$date_to = Date('Y-m-d');
|
||||||
$date_to = $date_to . ' 23:59:59';
|
$date_to = $date_to . ' 23:59:59';
|
||||||
}
|
}
|
||||||
|
|
||||||
$item = $request->item;
|
$item = $request->item;
|
||||||
$all = array();
|
$all = array();
|
||||||
$all = DB::select(DB::raw(
|
$all = DB::select(
|
||||||
'SELECT sub_item AS t,COUNT(*) AS c,CAST(SUM(CASE WHEN sub_item_data>0 THEN sub_item_data ELSE ABS(sub_item_data) END) AS UNSIGNED) AS s,province_id AS p FROM road_items_projects WHERE item = '.$item.' AND activity_date_time BETWEEN "'.$from_date.'" AND "'.$date_to.'" and status = 1 GROUP BY p, sub_item'));
|
'SELECT sub_item AS t,COUNT(*) AS c,CAST(SUM(CASE WHEN sub_item_data>0 THEN sub_item_data ELSE ABS(sub_item_data) END) AS UNSIGNED) AS s,province_id AS p FROM road_items_projects WHERE item = ' . $item . ' AND activity_date_time BETWEEN "' . $from_date . '" AND "' . $date_to . '" and status = 1 GROUP BY p, sub_item'
|
||||||
$country =DB::select(DB::raw(
|
);
|
||||||
'SELECT sub_item AS t,COUNT(*) AS c,CAST(SUM(CASE WHEN sub_item_data>0 THEN sub_item_data ELSE ABS(sub_item_data) END) AS UNSIGNED) AS s, -1 AS p FROM road_items_projects WHERE item = '.$item.' AND activity_date_time BETWEEN "'.$from_date.'" AND "'.$date_to.'" and status = 1 GROUP BY sub_item'));
|
|
||||||
|
$country = DB::select(
|
||||||
|
'SELECT sub_item AS t,COUNT(*) AS c,CAST(SUM(CASE WHEN sub_item_data>0 THEN sub_item_data ELSE ABS(sub_item_data) END) AS UNSIGNED) AS s, -1 AS p FROM road_items_projects WHERE item = ' . $item . ' AND activity_date_time BETWEEN "' . $from_date . '" AND "' . $date_to . '" and status = 1 GROUP BY sub_item'
|
||||||
|
);
|
||||||
|
|
||||||
$items_fa = InfoItem::where('item', $item)->get();
|
$items_fa = InfoItem::where('item', $item)->get();
|
||||||
foreach ($all as $value) {
|
foreach ($all as $value) {
|
||||||
foreach ($items_fa as $val) {
|
foreach ($items_fa as $val) {
|
||||||
@@ -58,13 +63,16 @@ class RoadItemsReportController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return response()->json([
|
return response()->json(
|
||||||
|
[
|
||||||
'status' => 'succeed',
|
'status' => 'succeed',
|
||||||
'message' => '',
|
'message' => '',
|
||||||
'data' => $all,
|
'data' => $all,
|
||||||
'country' => $country,
|
'country' => $country,
|
||||||
'items_fa' => $items_fa
|
'items_fa' => $items_fa
|
||||||
], 200);
|
],
|
||||||
|
200
|
||||||
|
);
|
||||||
}
|
}
|
||||||
public function get_items_city(Request $request)
|
public function get_items_city(Request $request)
|
||||||
{
|
{
|
||||||
@@ -81,8 +89,11 @@ class RoadItemsReportController extends Controller
|
|||||||
$item = $request->item;
|
$item = $request->item;
|
||||||
$province = $request->province_id;
|
$province = $request->province_id;
|
||||||
$all = array();
|
$all = array();
|
||||||
$all = DB::select(DB::raw(
|
$all = DB::select(
|
||||||
'SELECT sub_item AS t,COUNT(*) AS c,CAST(SUM(CASE WHEN sub_item_data>0 THEN sub_item_data ELSE ABS(sub_item_data) END) AS UNSIGNED) AS s,province_id AS p, edarat_id AS ci FROM road_items_projects WHERE item = '.$item.' AND province_id = '.$province.' AND activity_date_time BETWEEN "'.$from_date.'" AND "'.$date_to.'" and status = 1 GROUP BY ci, sub_item'));
|
DB::raw(
|
||||||
|
'SELECT sub_item AS t,COUNT(*) AS c,CAST(SUM(CASE WHEN sub_item_data>0 THEN sub_item_data ELSE ABS(sub_item_data) END) AS UNSIGNED) AS s,province_id AS p, edarat_id AS ci FROM road_items_projects WHERE item = ' . $item . ' AND province_id = ' . $province . ' AND activity_date_time BETWEEN "' . $from_date . '" AND "' . $date_to . '" and status = 1 GROUP BY ci, sub_item'
|
||||||
|
)
|
||||||
|
);
|
||||||
$items_fa = InfoItem::where('item', $item)->get();
|
$items_fa = InfoItem::where('item', $item)->get();
|
||||||
foreach ($all as $value) {
|
foreach ($all as $value) {
|
||||||
foreach ($items_fa as $val) {
|
foreach ($items_fa as $val) {
|
||||||
@@ -144,7 +155,8 @@ class RoadItemsReportController extends Controller
|
|||||||
SELECT COUNT(*) AS s,-1 AS p,77 AS i FROM road_patrols
|
SELECT COUNT(*) AS s,-1 AS p,77 AS i FROM road_patrols
|
||||||
WHERE road_patrols.province_id = " . $province_id . " and road_patrols.start_time BETWEEN '" . $from_date . " 00:00:00' and '" . $date_to . " 23:59:59'";
|
WHERE road_patrols.province_id = " . $province_id . " and road_patrols.start_time BETWEEN '" . $from_date . " 00:00:00' and '" . $date_to . " 23:59:59'";
|
||||||
}
|
}
|
||||||
$data = DB::select(DB::raw($sql));
|
|
||||||
|
$data = DB::select($sql);
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status' => 'succeed',
|
'status' => 'succeed',
|
||||||
@@ -173,11 +185,62 @@ class RoadItemsReportController extends Controller
|
|||||||
road_patrols.start_time between '" . $from_date . " 00:00:00' and '" . $date_to . " 23:59:59'
|
road_patrols.start_time between '" . $from_date . " 00:00:00' and '" . $date_to . " 23:59:59'
|
||||||
and province_id= '" . $p . "' GROUP BY c";
|
and province_id= '" . $p . "' GROUP BY c";
|
||||||
|
|
||||||
$data = DB::select(DB::raw($sql));
|
$data = DB::select($sql);
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status' => 'succeed',
|
'status' => 'succeed',
|
||||||
'message' => '',
|
'message' => '',
|
||||||
'data' => $data,
|
'data' => $data,
|
||||||
], 200);
|
], 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function map(Request $request)
|
||||||
|
{
|
||||||
|
$province = $request->province_id;
|
||||||
|
$city = $request->city_id;
|
||||||
|
$sub = $request->sub_id;
|
||||||
|
|
||||||
|
if ($request->date_from && $request->date_to) {
|
||||||
|
$date_from = $request->date_from.' 00:00:00';
|
||||||
|
$date_to = $request->date_to.' 23:59:59';
|
||||||
|
} else {
|
||||||
|
$date_from = Date('Y-m-d');
|
||||||
|
$date_to = new \DateTime('tomorrow');
|
||||||
|
$date_to = $date_to->format('Y-m-d');
|
||||||
|
}
|
||||||
|
$datass = DB::table('road_items_projects')
|
||||||
|
->where('is_new', 1)
|
||||||
|
->when($province, function ($query, $province) {
|
||||||
|
return $query->where('road_items_projects.province_id', $province);
|
||||||
|
})
|
||||||
|
->when($city, function ($query, $city) {
|
||||||
|
return $query->where('road_items_projects.city_id', $city);
|
||||||
|
})
|
||||||
|
->when($sub, function ($query, $sub) {
|
||||||
|
return $query->where('sub_items', 'like', '%"'.$sub.'"%');
|
||||||
|
})
|
||||||
|
->when($request->item, function ($query) use ($request) {
|
||||||
|
if ($request->item > 0) {
|
||||||
|
return $query->where('item', $request->item);
|
||||||
|
}
|
||||||
|
return $query;
|
||||||
|
})
|
||||||
|
->when(!is_null($request->status), function ($query) use ($request) {
|
||||||
|
return $query->where('status', $request->status);
|
||||||
|
})
|
||||||
|
->leftJoin('users', 'users.id', '=', 'road_items_projects.user_id')
|
||||||
|
->whereBetween('road_items_projects.activity_date', [
|
||||||
|
$date_from,
|
||||||
|
$date_to,
|
||||||
|
])
|
||||||
|
->select('road_items_projects.id as i', 'start_lat as l', 'start_lng as g', 'status')
|
||||||
|
->get();
|
||||||
|
// dd($datass);
|
||||||
|
|
||||||
|
return response()->json([
|
||||||
|
'status' => 'succeed',
|
||||||
|
'count' => count($datass),
|
||||||
|
'message' => '',
|
||||||
|
'data' => $datass
|
||||||
|
], 200);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ use App\Facades\Sms\Sms;
|
|||||||
use Illuminate\Support\Facades\Gate;
|
use Illuminate\Support\Facades\Gate;
|
||||||
use App\Facades\Otp\Otp;
|
use App\Facades\Otp\Otp;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
|
use App\Models\RoadObserved;
|
||||||
use App\Models\RoadPatrol;
|
use App\Models\RoadPatrol;
|
||||||
use App\Models\RoadItemsProject;
|
use App\Models\RoadItemsProject;
|
||||||
use App\Models\EdarateShahri;
|
use App\Models\EdarateShahri;
|
||||||
@@ -501,6 +501,49 @@ class RoadPatrolProjectController extends Controller
|
|||||||
], 200);
|
], 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function map(Request $request)
|
||||||
|
{
|
||||||
|
$province = $request->province_id;
|
||||||
|
$edare_shahri = $request->edare_shahri_id;
|
||||||
|
$status = $request->status;
|
||||||
|
$rms_status = $request->rms_status;
|
||||||
|
|
||||||
|
if ($request->date_from && $request->date_to) {
|
||||||
|
$date_from = $request->date_from.' 00:00:00';
|
||||||
|
$date_to = $request->date_to.' 23:59:59';
|
||||||
|
} else {
|
||||||
|
$date_from = Date('Y-m-d');
|
||||||
|
$date_to = new \DateTime('tomorrow');
|
||||||
|
$date_to = $date_to->format('Y-m-d');
|
||||||
|
}
|
||||||
|
|
||||||
|
$projects = RoadObserved::select('id', 'lng', 'lat','status')
|
||||||
|
->whereBetween('created_at', [$date_from, $date_to])
|
||||||
|
->when($province, function ($query) use ($province) {
|
||||||
|
return $query->where('province_id', $province);
|
||||||
|
})
|
||||||
|
->when($rms_status, function ($query) use ($rms_status) {
|
||||||
|
if ($rms_status == 2) {
|
||||||
|
return $query->where('rms_status', '<>',0);
|
||||||
|
} else {
|
||||||
|
return $query->where('rms_status', 0);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
->when($edare_shahri, function ($query) use ($edare_shahri) {
|
||||||
|
return $query->where('edarate_shahri_id', $edare_shahri);
|
||||||
|
})
|
||||||
|
->when($status, function ($query) use ($status) {
|
||||||
|
return $query->where('status', $status);
|
||||||
|
})
|
||||||
|
// ->toSql();
|
||||||
|
->get();
|
||||||
|
return response()->json([
|
||||||
|
'status' => 'succeed',
|
||||||
|
'message' => '',
|
||||||
|
'data' => $projects
|
||||||
|
], 200);
|
||||||
|
}
|
||||||
|
|
||||||
public function detail(RoadPatrol $road_patrol)
|
public function detail(RoadPatrol $road_patrol)
|
||||||
{
|
{
|
||||||
return response()->json($road_patrol, 200);
|
return response()->json($road_patrol, 200);
|
||||||
|
|||||||
64
app/Providers/TelescopeServiceProvider.php
Normal file
64
app/Providers/TelescopeServiceProvider.php
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Gate;
|
||||||
|
use Laravel\Telescope\IncomingEntry;
|
||||||
|
use Laravel\Telescope\Telescope;
|
||||||
|
use Laravel\Telescope\TelescopeApplicationServiceProvider;
|
||||||
|
|
||||||
|
class TelescopeServiceProvider extends TelescopeApplicationServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Register any application services.
|
||||||
|
*/
|
||||||
|
public function register(): void
|
||||||
|
{
|
||||||
|
// Telescope::night();
|
||||||
|
|
||||||
|
$this->hideSensitiveRequestDetails();
|
||||||
|
|
||||||
|
$isLocal = $this->app->environment('local');
|
||||||
|
|
||||||
|
Telescope::filter(function (IncomingEntry $entry) use ($isLocal) {
|
||||||
|
return $isLocal ||
|
||||||
|
$entry->isReportableException() ||
|
||||||
|
$entry->isFailedRequest() ||
|
||||||
|
$entry->isFailedJob() ||
|
||||||
|
$entry->isScheduledTask() ||
|
||||||
|
$entry->hasMonitoredTag();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prevent sensitive request details from being logged by Telescope.
|
||||||
|
*/
|
||||||
|
protected function hideSensitiveRequestDetails(): void
|
||||||
|
{
|
||||||
|
if ($this->app->environment('local')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Telescope::hideRequestParameters(['_token']);
|
||||||
|
|
||||||
|
Telescope::hideRequestHeaders([
|
||||||
|
'cookie',
|
||||||
|
'x-csrf-token',
|
||||||
|
'x-xsrf-token',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register the Telescope gate.
|
||||||
|
*
|
||||||
|
* This gate determines who can access Telescope in non-local environments.
|
||||||
|
*/
|
||||||
|
protected function gate(): void
|
||||||
|
{
|
||||||
|
Gate::define('viewTelescope', function ($user) {
|
||||||
|
return in_array($user->email, [
|
||||||
|
//
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,7 +7,7 @@ trait ReceiptReportAble
|
|||||||
{
|
{
|
||||||
public static function cityReceiptData($from_date, $date_to, $province_id): array
|
public static function cityReceiptData($from_date, $date_to, $province_id): array
|
||||||
{
|
{
|
||||||
return DB::select(DB::raw(
|
return DB::select(
|
||||||
'SELECT
|
'SELECT
|
||||||
city_fa,
|
city_fa,
|
||||||
city_id,
|
city_id,
|
||||||
@@ -25,13 +25,13 @@ trait ReceiptReportAble
|
|||||||
where created_at BETWEEN "'.$from_date.'" AND "'.$date_to.'" AND province_id ='.$province_id.'
|
where created_at BETWEEN "'.$from_date.'" AND "'.$date_to.'" AND province_id ='.$province_id.'
|
||||||
GROUP BY city_id
|
GROUP BY city_id
|
||||||
'
|
'
|
||||||
));
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function provinceReceiptData($from_date, $date_to) : array {
|
public static function provinceReceiptData($from_date, $date_to) : array {
|
||||||
|
|
||||||
return DB::select(DB::raw(
|
return DB::select(
|
||||||
'SELECT
|
'SELECT
|
||||||
"کشوری" as province_fa,
|
"کشوری" as province_fa,
|
||||||
-1 as province_id,
|
-1 as province_id,
|
||||||
@@ -67,7 +67,7 @@ trait ReceiptReportAble
|
|||||||
where created_at BETWEEN "'.$from_date.'" AND "'.$date_to.'"
|
where created_at BETWEEN "'.$from_date.'" AND "'.$date_to.'"
|
||||||
GROUP BY province_id
|
GROUP BY province_id
|
||||||
'
|
'
|
||||||
));
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ trait ReportAble
|
|||||||
{
|
{
|
||||||
public static function edarehPatrolData($from_date, $date_to, $province_id): array
|
public static function edarehPatrolData($from_date, $date_to, $province_id): array
|
||||||
{
|
{
|
||||||
return DB::select(DB::raw(
|
return DB::select(
|
||||||
'SELECT
|
'SELECT
|
||||||
province_fa,
|
province_fa,
|
||||||
province_id,
|
province_id,
|
||||||
@@ -34,13 +34,12 @@ trait ReportAble
|
|||||||
FROM `road_patrols` rp where rp.province_id = "'.$province_id.'" AND rp.start_time BETWEEN "'.$from_date.'" AND "'.$date_to.'") temp
|
FROM `road_patrols` rp where rp.province_id = "'.$province_id.'" AND rp.start_time BETWEEN "'.$from_date.'" AND "'.$date_to.'") temp
|
||||||
GROUP BY edare_id
|
GROUP BY edare_id
|
||||||
'
|
'
|
||||||
));
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function provincePatrolData($from_date, $date_to) : array {
|
public static function provincePatrolData($from_date, $date_to) : array {
|
||||||
|
|
||||||
return DB::select(DB::raw(
|
return DB::select('SELECT
|
||||||
'SELECT
|
|
||||||
"کشوری" as province_fa,
|
"کشوری" as province_fa,
|
||||||
-1 as province_id,
|
-1 as province_id,
|
||||||
COUNT(*) tedade,
|
COUNT(*) tedade,
|
||||||
@@ -81,9 +80,8 @@ trait ReportAble
|
|||||||
(SELECT COUNT(*) FROM `observed_items` oii WHERE rp.`id`= oii.road_patrol_id AND oii.road_item_id IS NOT NULL AND priority IS NOT NULL) AS tedad_mavarede_peygiri_shode,
|
(SELECT COUNT(*) FROM `observed_items` oii WHERE rp.`id`= oii.road_patrol_id AND oii.road_item_id IS NOT NULL AND priority IS NOT NULL) AS tedad_mavarede_peygiri_shode,
|
||||||
(SELECT COUNT(*) FROM `observed_items` oii WHERE rp.`id`= oii.road_patrol_id AND oii.road_item_id IS NOT NULL AND priority IS NULL) AS tedad_faliyat_sabt_shode
|
(SELECT COUNT(*) FROM `observed_items` oii WHERE rp.`id`= oii.road_patrol_id AND oii.road_item_id IS NOT NULL AND priority IS NULL) AS tedad_faliyat_sabt_shode
|
||||||
FROM `road_patrols` rp where rp.start_time BETWEEN "'.$from_date.'" AND "'.$date_to.'") temp
|
FROM `road_patrols` rp where rp.start_time BETWEEN "'.$from_date.'" AND "'.$date_to.'") temp
|
||||||
GROUP BY province_id
|
GROUP BY province_id'
|
||||||
'
|
);
|
||||||
));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -53,7 +53,7 @@ trait SafetyAndPrivacyReportAble
|
|||||||
$all[$value->id]["id"] = $value->id;
|
$all[$value->id]["id"] = $value->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$temp = DB::select(DB::raw("SELECT COUNT(*) as qty,info_id, step,step_fa, info_fa FROM safety_and_privacy where created_at BETWEEN '".$from_date."' and '".$date_to."' GROUP BY info_id,step"));
|
$temp = DB::select("SELECT COUNT(*) as qty,info_id, step,step_fa, info_fa FROM safety_and_privacy where created_at BETWEEN '".$from_date."' and '".$date_to."' GROUP BY info_id,step");
|
||||||
|
|
||||||
$sum = 0;
|
$sum = 0;
|
||||||
foreach ($temp as $key => $value) {
|
foreach ($temp as $key => $value) {
|
||||||
@@ -62,7 +62,7 @@ trait SafetyAndPrivacyReportAble
|
|||||||
$all[0]["sum"] = $sum;
|
$all[0]["sum"] = $sum;
|
||||||
}
|
}
|
||||||
|
|
||||||
$temp = DB::select(DB::raw("SELECT province_id, COUNT(*) as qty,info_id, step,step_fa, info_fa FROM safety_and_privacy where created_at BETWEEN '".$from_date."' and '".$date_to."' GROUP BY info_id,step,province_id order by province_id"));
|
$temp = DB::select("SELECT province_id, COUNT(*) as qty,info_id, step,step_fa, info_fa FROM safety_and_privacy where created_at BETWEEN '".$from_date."' and '".$date_to."' GROUP BY info_id,step,province_id order by province_id");
|
||||||
$province_id_flag = "";
|
$province_id_flag = "";
|
||||||
$sum = 0;
|
$sum = 0;
|
||||||
|
|
||||||
|
|||||||
2
bootstrap/cache/services.php
vendored
2
bootstrap/cache/services.php
vendored
@@ -41,6 +41,7 @@
|
|||||||
37 => 'App\\Providers\\AuthServiceProvider',
|
37 => 'App\\Providers\\AuthServiceProvider',
|
||||||
38 => 'App\\Providers\\EventServiceProvider',
|
38 => 'App\\Providers\\EventServiceProvider',
|
||||||
39 => 'App\\Providers\\RouteServiceProvider',
|
39 => 'App\\Providers\\RouteServiceProvider',
|
||||||
|
40 => 'App\\Providers\\TelescopeServiceProvider',
|
||||||
),
|
),
|
||||||
'eager' =>
|
'eager' =>
|
||||||
array (
|
array (
|
||||||
@@ -70,6 +71,7 @@
|
|||||||
23 => 'App\\Providers\\AuthServiceProvider',
|
23 => 'App\\Providers\\AuthServiceProvider',
|
||||||
24 => 'App\\Providers\\EventServiceProvider',
|
24 => 'App\\Providers\\EventServiceProvider',
|
||||||
25 => 'App\\Providers\\RouteServiceProvider',
|
25 => 'App\\Providers\\RouteServiceProvider',
|
||||||
|
26 => 'App\\Providers\\TelescopeServiceProvider',
|
||||||
),
|
),
|
||||||
'deferred' =>
|
'deferred' =>
|
||||||
array (
|
array (
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
"hekmatinasser/verta": "^8.3",
|
"hekmatinasser/verta": "^8.3",
|
||||||
"laravel/framework": "^10.10",
|
"laravel/framework": "^10.10",
|
||||||
"laravel/sanctum": "^3.2",
|
"laravel/sanctum": "^3.2",
|
||||||
"laravel/telescope": "^4.15",
|
"laravel/telescope": "^4.17",
|
||||||
"laravel/tinker": "^2.8",
|
"laravel/tinker": "^2.8",
|
||||||
"laravel/ui": "^4.4",
|
"laravel/ui": "^4.4",
|
||||||
"maatwebsite/excel": "^3.1",
|
"maatwebsite/excel": "^3.1",
|
||||||
|
|||||||
14
composer.lock
generated
14
composer.lock
generated
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "b524a354e1f7590b60e114a8881b1f4f",
|
"content-hash": "687a4c2a80c569c39332ff856097dafd",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "beberlei/assert",
|
"name": "beberlei/assert",
|
||||||
@@ -2171,16 +2171,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/telescope",
|
"name": "laravel/telescope",
|
||||||
"version": "v4.17.5",
|
"version": "v4.17.6",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/telescope.git",
|
"url": "https://github.com/laravel/telescope.git",
|
||||||
"reference": "2c5295261d1459e4f9b157c407a663a6685f3ddf"
|
"reference": "2d453dc629b27e8cf39fb1217aba062f8c54e690"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/telescope/zipball/2c5295261d1459e4f9b157c407a663a6685f3ddf",
|
"url": "https://api.github.com/repos/laravel/telescope/zipball/2d453dc629b27e8cf39fb1217aba062f8c54e690",
|
||||||
"reference": "2c5295261d1459e4f9b157c407a663a6685f3ddf",
|
"reference": "2d453dc629b27e8cf39fb1217aba062f8c54e690",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -2236,9 +2236,9 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/laravel/telescope/issues",
|
"issues": "https://github.com/laravel/telescope/issues",
|
||||||
"source": "https://github.com/laravel/telescope/tree/v4.17.5"
|
"source": "https://github.com/laravel/telescope/tree/v4.17.6"
|
||||||
},
|
},
|
||||||
"time": "2024-01-30T15:41:45+00:00"
|
"time": "2024-02-08T15:04:38+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/tinker",
|
"name": "laravel/tinker",
|
||||||
|
|||||||
@@ -178,6 +178,7 @@ return [
|
|||||||
// App\Providers\BroadcastServiceProvider::class,
|
// App\Providers\BroadcastServiceProvider::class,
|
||||||
App\Providers\EventServiceProvider::class,
|
App\Providers\EventServiceProvider::class,
|
||||||
App\Providers\RouteServiceProvider::class,
|
App\Providers\RouteServiceProvider::class,
|
||||||
|
App\Providers\TelescopeServiceProvider::class,
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|||||||
189
config/telescope.php
Normal file
189
config/telescope.php
Normal file
@@ -0,0 +1,189 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Laravel\Telescope\Http\Middleware\Authorize;
|
||||||
|
use Laravel\Telescope\Watchers;
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Telescope Domain
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is the subdomain where Telescope will be accessible from. If the
|
||||||
|
| setting is null, Telescope will reside under the same domain as the
|
||||||
|
| application. Otherwise, this value will be used as the subdomain.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'domain' => env('TELESCOPE_DOMAIN'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Telescope Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is the URI path where Telescope will be accessible from. Feel free
|
||||||
|
| to change this path to anything you like. Note that the URI will not
|
||||||
|
| affect the paths of its internal API that aren't exposed to users.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'path' => env('TELESCOPE_PATH', 'telescope'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Telescope Storage Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This configuration options determines the storage driver that will
|
||||||
|
| be used to store Telescope's data. In addition, you may set any
|
||||||
|
| custom options as needed by the particular driver you choose.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'driver' => env('TELESCOPE_DRIVER', 'database'),
|
||||||
|
|
||||||
|
'storage' => [
|
||||||
|
'database' => [
|
||||||
|
'connection' => env('DB_CONNECTION', 'mysql'),
|
||||||
|
'chunk' => 1000,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Telescope Master Switch
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option may be used to disable all Telescope watchers regardless
|
||||||
|
| of their individual configuration, which simply provides a single
|
||||||
|
| and convenient way to enable or disable Telescope data storage.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'enabled' => env('TELESCOPE_ENABLED', true),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Telescope Route Middleware
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These middleware will be assigned to every Telescope route, giving you
|
||||||
|
| the chance to add your own middleware to this list or change any of
|
||||||
|
| the existing middleware. Or, you can simply stick with this list.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'middleware' => [
|
||||||
|
'web',
|
||||||
|
Authorize::class,
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Allowed / Ignored Paths & Commands
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following array lists the URI paths and Artisan commands that will
|
||||||
|
| not be watched by Telescope. In addition to this list, some Laravel
|
||||||
|
| commands, like migrations and queue commands, are always ignored.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'only_paths' => [
|
||||||
|
// 'api/*'
|
||||||
|
],
|
||||||
|
|
||||||
|
'ignore_paths' => [
|
||||||
|
'livewire*',
|
||||||
|
'nova-api*',
|
||||||
|
'pulse*',
|
||||||
|
],
|
||||||
|
|
||||||
|
'ignore_commands' => [
|
||||||
|
//
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Telescope Watchers
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following array lists the "watchers" that will be registered with
|
||||||
|
| Telescope. The watchers gather the application's profile data when
|
||||||
|
| a request or task is executed. Feel free to customize this list.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'watchers' => [
|
||||||
|
Watchers\BatchWatcher::class => env('TELESCOPE_BATCH_WATCHER', true),
|
||||||
|
|
||||||
|
Watchers\CacheWatcher::class => [
|
||||||
|
'enabled' => env('TELESCOPE_CACHE_WATCHER', true),
|
||||||
|
'hidden' => [],
|
||||||
|
],
|
||||||
|
|
||||||
|
Watchers\ClientRequestWatcher::class => env('TELESCOPE_CLIENT_REQUEST_WATCHER', true),
|
||||||
|
|
||||||
|
Watchers\CommandWatcher::class => [
|
||||||
|
'enabled' => env('TELESCOPE_COMMAND_WATCHER', true),
|
||||||
|
'ignore' => [],
|
||||||
|
],
|
||||||
|
|
||||||
|
Watchers\DumpWatcher::class => [
|
||||||
|
'enabled' => env('TELESCOPE_DUMP_WATCHER', true),
|
||||||
|
'always' => env('TELESCOPE_DUMP_WATCHER_ALWAYS', false),
|
||||||
|
],
|
||||||
|
|
||||||
|
Watchers\EventWatcher::class => [
|
||||||
|
'enabled' => env('TELESCOPE_EVENT_WATCHER', true),
|
||||||
|
'ignore' => [],
|
||||||
|
],
|
||||||
|
|
||||||
|
Watchers\ExceptionWatcher::class => env('TELESCOPE_EXCEPTION_WATCHER', true),
|
||||||
|
|
||||||
|
Watchers\GateWatcher::class => [
|
||||||
|
'enabled' => env('TELESCOPE_GATE_WATCHER', true),
|
||||||
|
'ignore_abilities' => [],
|
||||||
|
'ignore_packages' => true,
|
||||||
|
'ignore_paths' => [],
|
||||||
|
],
|
||||||
|
|
||||||
|
Watchers\JobWatcher::class => env('TELESCOPE_JOB_WATCHER', true),
|
||||||
|
|
||||||
|
Watchers\LogWatcher::class => [
|
||||||
|
'enabled' => env('TELESCOPE_LOG_WATCHER', true),
|
||||||
|
'level' => 'error',
|
||||||
|
],
|
||||||
|
|
||||||
|
Watchers\MailWatcher::class => env('TELESCOPE_MAIL_WATCHER', true),
|
||||||
|
|
||||||
|
Watchers\ModelWatcher::class => [
|
||||||
|
'enabled' => env('TELESCOPE_MODEL_WATCHER', true),
|
||||||
|
'events' => ['eloquent.*'],
|
||||||
|
'hydrations' => true,
|
||||||
|
],
|
||||||
|
|
||||||
|
Watchers\NotificationWatcher::class => env('TELESCOPE_NOTIFICATION_WATCHER', true),
|
||||||
|
|
||||||
|
Watchers\QueryWatcher::class => [
|
||||||
|
'enabled' => env('TELESCOPE_QUERY_WATCHER', true),
|
||||||
|
'ignore_packages' => true,
|
||||||
|
'ignore_paths' => [],
|
||||||
|
'slow' => 100,
|
||||||
|
],
|
||||||
|
|
||||||
|
Watchers\RedisWatcher::class => env('TELESCOPE_REDIS_WATCHER', true),
|
||||||
|
|
||||||
|
Watchers\RequestWatcher::class => [
|
||||||
|
'enabled' => env('TELESCOPE_REQUEST_WATCHER', true),
|
||||||
|
'size_limit' => env('TELESCOPE_RESPONSE_SIZE_LIMIT', 64),
|
||||||
|
'ignore_http_methods' => [],
|
||||||
|
'ignore_status_codes' => [200],
|
||||||
|
],
|
||||||
|
|
||||||
|
Watchers\ScheduleWatcher::class => env('TELESCOPE_SCHEDULE_WATCHER', true),
|
||||||
|
Watchers\ViewWatcher::class => env('TELESCOPE_VIEW_WATCHER', true),
|
||||||
|
],
|
||||||
|
];
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/** @var \Illuminate\Database\Eloquent\Factory $factory */
|
|
||||||
|
|
||||||
use App\Models\User;
|
|
||||||
use Faker\Generator as Faker;
|
|
||||||
use Illuminate\Support\Str;
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Model Factories
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This directory should contain each of the model factory definitions for
|
|
||||||
| your application. Factories provide a convenient way to generate new
|
|
||||||
| model instances for testing / seeding your application's database.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
$factory->define(User::class, function (Faker $faker) {
|
|
||||||
return [
|
|
||||||
'name' => $faker->name,
|
|
||||||
'email' => $faker->unique()->safeEmail,
|
|
||||||
'email_verified_at' => now(),
|
|
||||||
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
|
||||||
'remember_token' => Str::random(10),
|
|
||||||
];
|
|
||||||
});
|
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
//variables
|
//variables
|
||||||
const get_rahdari_projects_by_filter_api = "/v2/contract/report/map";
|
const get_rahdari_projects_by_filter_api = "/v2/contract/report/map";
|
||||||
const get_road_items_by_filter_api = "/api/get-items-on-map";
|
const get_road_items_by_filter_api = "/v2/road_items/report/map";
|
||||||
const get_road_patrols_by_filter_api = "/v2/road_patrols/report/map";
|
const get_road_patrols_by_filter_api = "/v2/road_patrols/report/map";
|
||||||
const get_safety_and_privacy_by_filter_api = "/v2/safety_and_privacy/report/map";
|
const get_safety_and_privacy_by_filter_api = "/v2/safety_and_privacy/report/map";
|
||||||
const get_road_observations_by_filter_api = "/public/homeprojects/fast/points";
|
const get_road_observations_by_filter_api = "/v2/road_observations/report/map";
|
||||||
|
|
||||||
const get_rahdari_projects_by_id = "/v2/rahdari_projects/project/";
|
const get_rahdari_projects_by_id = "/v2/rahdari_projects/project/";
|
||||||
const get_road_items_by_id = "/public/projects/road-items/";
|
const get_road_items_by_id = "/public/projects/road-items/";
|
||||||
const get_road_patrols_by_id = "/v2/road_patrols/report/";
|
const get_road_patrols_by_id = "/v2/road_patrols/report/";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ var fromDateshowrizitem, toDateshowrizitem;
|
|||||||
var PERMISSIONS = []
|
var PERMISSIONS = []
|
||||||
var PROVINCES = [];
|
var PROVINCES = [];
|
||||||
var gozareshtable;
|
var gozareshtable;
|
||||||
var EXCEL_API = "https://rms.rmto.ir/v2/road_patrols/report/excel";
|
var EXCEL_API = "/v2/road_patrols/report/excel";
|
||||||
|
|
||||||
|
|
||||||
function checkfunctionS(obj) {
|
function checkfunctionS(obj) {
|
||||||
@@ -15,7 +15,7 @@ function checkfunctionS(obj) {
|
|||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
let reqUrl = "https://rms.rmto.ir/public/contents/provinces";
|
let reqUrl = "/public/contents/provinces";
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: reqUrl,
|
url: reqUrl,
|
||||||
@@ -105,10 +105,10 @@ $(document).ready(function () {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
$.getScript('https://rms.rmto.ir/version2/js/dashboard_pages/road_patrols/test.js');
|
$.getScript('/version2/js/dashboard_pages/road_patrols/test.js');
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "https://rms.rmto.ir/webapi/user/get-permission",
|
url: "/webapi/user/get-permission",
|
||||||
type: "GET",
|
type: "GET",
|
||||||
cache: false,
|
cache: false,
|
||||||
async: false,
|
async: false,
|
||||||
@@ -162,7 +162,7 @@ $("#sorttestitems").on("click", function() {
|
|||||||
$("#gozarehtowntable")
|
$("#gozarehtowntable")
|
||||||
.DataTable()
|
.DataTable()
|
||||||
.ajax.url(
|
.ajax.url(
|
||||||
"https://rms.rmto.ir/v2/road_patrols/report/province_patrol_data" +
|
"/v2/road_patrols/report/province_patrol_data" +
|
||||||
"?from_date=" +
|
"?from_date=" +
|
||||||
date_from +
|
date_from +
|
||||||
"&date_to=" +
|
"&date_to=" +
|
||||||
@@ -207,7 +207,7 @@ function rendertable(PROVINCES) {
|
|||||||
|
|
||||||
processing: true,
|
processing: true,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: "https://rms.rmto.ir/v2/road_patrols/report/province_patrol_data",
|
url: "/v2/road_patrols/report/province_patrol_data",
|
||||||
type: "GET",
|
type: "GET",
|
||||||
dataSrc: function (json) {
|
dataSrc: function (json) {
|
||||||
let temp = []
|
let temp = []
|
||||||
|
|||||||
@@ -85,6 +85,7 @@
|
|||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
@if( !$has_province_filter)
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" style="text-align: center;border:1px solid black;background-color: #DAEEF3;">{{$road['province_name']}}</td>
|
<td colspan="2" style="text-align: center;border:1px solid black;background-color: #DAEEF3;">{{$road['province_name']}}</td>
|
||||||
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">{{ $road['all']['MarematRooyeCount']}}</td>
|
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">{{ $road['all']['MarematRooyeCount']}}</td>
|
||||||
@@ -105,6 +106,7 @@
|
|||||||
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">{{ $road['all']['EmergencyCount']}}</td>
|
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">{{ $road['all']['EmergencyCount']}}</td>
|
||||||
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">{{ $road['all']['Count']}}</td>
|
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">{{ $road['all']['Count']}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -293,7 +293,10 @@ Route::middleware('cors')->get('road-observed/pending', 'RoadObservationControll
|
|||||||
|
|
||||||
///// items and sub items
|
///// items and sub items
|
||||||
Route::middleware('cors:api')->get('/get-items-and-subs', 'TotalRahdariProjectsReportController@get_sub_items');
|
Route::middleware('cors:api')->get('/get-items-and-subs', 'TotalRahdariProjectsReportController@get_sub_items');
|
||||||
Route::middleware('cors:api')->get('/get-items-on-map', 'RoadItemsProjectController@show_item');
|
|
||||||
|
// sharareh begin
|
||||||
|
// Route::middleware('cors:api')->get('/get-items-on-map', 'RoadItemsProjectController@show_item');
|
||||||
|
// sharareh end
|
||||||
|
|
||||||
Route::middleware('cors:api')->get('/public/rahdarKhanehMapFilter', 'RahdariPointController@MapFilterForRahdarkhaneh');
|
Route::middleware('cors:api')->get('/public/rahdarKhanehMapFilter', 'RahdariPointController@MapFilterForRahdarkhaneh');
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user