Merge branch 'feature/NominatimFunctionAdjustment' into 'develop'
Feature/nominatim function adjustment See merge request witelgroup/rms_v2!25
This commit is contained in:
@@ -581,7 +581,7 @@ class CoridorsController extends Controller
|
|||||||
$data = RoadItemsProject::with('files')->find($request->id);
|
$data = RoadItemsProject::with('files')->find($request->id);
|
||||||
break;
|
break;
|
||||||
case "2":
|
case "2":
|
||||||
$data = RoadPatrolProject::find($request->id);
|
$data = RoadPatrol::find($request->id);
|
||||||
break;
|
break;
|
||||||
case "3":
|
case "3":
|
||||||
$collection = \App\Models\ContractSubItems::whereId($request->id)->get();
|
$collection = \App\Models\ContractSubItems::whereId($request->id)->get();
|
||||||
@@ -725,13 +725,13 @@ class CoridorsController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( in_array(2, $typeArrays) ) {
|
if ( in_array(2, $typeArrays) ) {
|
||||||
$roadPatrolProject = RoadPatrolProject::whereIn('start_way_id', $idArrays)
|
$roadPatrolProject = RoadPatrol::whereIn('start_way_id', $idArrays)
|
||||||
->orWhereIn('end_way_id', $idArrays)
|
->orWhereIn('end_way_id', $idArrays)
|
||||||
// ->when($date_to , function ($query) use ($date_to, $date_from) {
|
// ->when($date_to , function ($query) use ($date_to, $date_from) {
|
||||||
->whereBetween('created_at', [$date_from . ' 00:00:00', $date_to . ' 23:59:59'])
|
->whereBetween('created_at', [$date_from . ' 00:00:00', $date_to . ' 23:59:59'])
|
||||||
// })
|
// })
|
||||||
->whereNotNull('start_lat')
|
->whereNotNull('start_lat')
|
||||||
->select('start_lat', 'start_lng', 'id')
|
->select('start_lat', 'start_lon', 'id')
|
||||||
->get();
|
->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -290,8 +290,8 @@ class RoadItemsProjectController extends Controller
|
|||||||
'city_id' => Auth::user()->city_id,
|
'city_id' => Auth::user()->city_id,
|
||||||
'city_fa' => Auth::user()->city_fa,
|
'city_fa' => Auth::user()->city_fa,
|
||||||
'user_name' => Auth::user()->name,
|
'user_name' => Auth::user()->name,
|
||||||
'start_way_id' => $nominatimService->get_way_id_from_nominatim(),
|
'start_way_id' => $nominatimService->get_way_id_from_nominatim($start_coordinates[0], $start_coordinates[1]),
|
||||||
'end_way_id' => $end_coordinates ? $nominatimService->get_way_id_from_nominatim() : null,
|
'end_way_id' => $end_coordinates ? $nominatimService->get_way_id_from_nominatim($end_coordinates[0], $end_coordinates[1]) : null,
|
||||||
'unit_fa' => $info_item->sub_item_unit,
|
'unit_fa' => $info_item->sub_item_unit,
|
||||||
'created_at_fa' => verta(\Carbon\Carbon::now())->format('Y-m-d H:i:s'),
|
'created_at_fa' => verta(\Carbon\Carbon::now())->format('Y-m-d H:i:s'),
|
||||||
'info_id' => $info_item->id,
|
'info_id' => $info_item->id,
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ class SafetyAndPrivacyController extends Controller
|
|||||||
'activity_date_time' => $request->activity_date." ".$request->activity_time,
|
'activity_date_time' => $request->activity_date." ".$request->activity_time,
|
||||||
'edare_shahri_id' => auth()->user()->edarate_shahri_id,
|
'edare_shahri_id' => auth()->user()->edarate_shahri_id,
|
||||||
'edare_shahri_name' => auth()->user()->edarate_shahri_name,
|
'edare_shahri_name' => auth()->user()->edarate_shahri_name,
|
||||||
'way_id' => $nominatimService->get_way_id_from_nominatim(),
|
'way_id' => $nominatimService->get_way_id_from_nominatim($coordinates[0], $coordinates[1]),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($request->has('recognize_picture')) {
|
if ($request->has('recognize_picture')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user