update map variables to use env variables, fix link for itinerary report and add active link for case_itinerary
This commit is contained in:
parent
133d99d297
commit
8d97ab0345
@ -42,6 +42,8 @@ class ItineraryController extends AbstractController
|
|||||||
#[Route('/itinerary/report', name: 'app_report_itinerary')]
|
#[Route('/itinerary/report', name: 'app_report_itinerary')]
|
||||||
public function reportItinerary(Request $request, #[CurrentUser()] ?User $user): Response
|
public function reportItinerary(Request $request, #[CurrentUser()] ?User $user): Response
|
||||||
{
|
{
|
||||||
|
$this->navLinks['case_itinerary'] = NavList::PRESENT_LINK;
|
||||||
|
|
||||||
$this->msgs = $this->entityManager->getRepository(Messages::class)->getUnreadMessages($user);
|
$this->msgs = $this->entityManager->getRepository(Messages::class)->getUnreadMessages($user);
|
||||||
$this->notificationCount = $this->entityManager->getRepository(Messages::class)->getUnreadMessageCount($user);
|
$this->notificationCount = $this->entityManager->getRepository(Messages::class)->getUnreadMessageCount($user);
|
||||||
|
|
||||||
@ -76,6 +78,8 @@ class ItineraryController extends AbstractController
|
|||||||
#[Route('/itinerary/map', name: 'app_map_itinerary')]
|
#[Route('/itinerary/map', name: 'app_map_itinerary')]
|
||||||
public function mapItinerary(Request $request, #[CurrentUser()] ?User $user): Response
|
public function mapItinerary(Request $request, #[CurrentUser()] ?User $user): Response
|
||||||
{
|
{
|
||||||
|
$this->navLinks['case_itinerary'] = NavList::PRESENT_LINK;
|
||||||
|
|
||||||
$case = null;
|
$case = null;
|
||||||
if ($request->getPayload()->get('caseId')) {
|
if ($request->getPayload()->get('caseId')) {
|
||||||
$case = $this->entityManager->getRepository(MemberCase::class)->find($request->getPayload()->get('caseId'));
|
$case = $this->entityManager->getRepository(MemberCase::class)->find($request->getPayload()->get('caseId'));
|
||||||
@ -93,8 +97,8 @@ class ItineraryController extends AbstractController
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
$map = new Map('default');
|
$map = new Map('default');
|
||||||
$map->center(new Point(39.768502, -86.157918))
|
$map->center(new Point($_ENV['MAP_CENTER_LAT'], $_ENV['MAP_CENTER_LON']))
|
||||||
->zoom(9)
|
->zoom($_ENV['MAP_ZOOM_LEVEL'])
|
||||||
;
|
;
|
||||||
|
|
||||||
$total_distance = 0;
|
$total_distance = 0;
|
||||||
@ -148,7 +152,7 @@ class ItineraryController extends AbstractController
|
|||||||
[
|
[
|
||||||
'breadcrumbs' => [
|
'breadcrumbs' => [
|
||||||
new Breadcrumb($this->generateUrl('app_my_cases'), 'My Cases'),
|
new Breadcrumb($this->generateUrl('app_my_cases'), 'My Cases'),
|
||||||
new Breadcrumb($this->generateUrl('app_itinerary_report'), 'Itinerary Report'),
|
new Breadcrumb($this->generateUrl('app_report_itinerary'), 'Itinerary Report'),
|
||||||
],
|
],
|
||||||
'notifications' => $this->msgs,
|
'notifications' => $this->msgs,
|
||||||
'notificationCount' => $this->notificationCount,
|
'notificationCount' => $this->notificationCount,
|
||||||
|
Loading…
Reference in New Issue
Block a user