Example #1
0
        public IActionResult Geofence(int departmentGroupId)
        {
            var model = new GeofenceView();

            model.Group = _departmentGroupsService.GetGroupById(departmentGroupId);

            if (model.Group.DepartmentId != DepartmentId)
            {
                Unauthorized();
            }

            model.Coordinates = _departmentGroupsService.GetMapCenterCoordinatesForGroup(departmentGroupId);

            return(View(model));
        }
Example #2
0
        public async Task <IActionResult> Geofence(int departmentGroupId)
        {
            var model = new GeofenceView();

            model.Group = await _departmentGroupsService.GetGroupByIdAsync(departmentGroupId);

            if (model.Group.DepartmentId != DepartmentId)
            {
                Unauthorized();
            }

            model.Coordinates = await _departmentGroupsService.GetMapCenterCoordinatesForGroupAsync(departmentGroupId);

            return(View(model));
        }