Shifts Book - modified return View () to point to Index not /Index, added Map keys in the view data
This commit is contained in:
Родитель
3fe0a35093
Коммит
482a140023
|
@ -252,7 +252,9 @@ namespace Project.Zap.Controllers
|
|||
this.logger.LogInformation("No locations, so redirecting to location view");
|
||||
return Redirect("/Locations");
|
||||
}
|
||||
return View("/Index", await this.GetShifts(locations));
|
||||
ViewData["AzureMapsKey"] = this.configuration["AzureMapsSubscriptionKey"];
|
||||
|
||||
return View("Index", await this.GetShifts(locations));
|
||||
}
|
||||
|
||||
Location location = await this.GetLocation(viewModel.LocationName);
|
||||
|
@ -278,7 +280,9 @@ namespace Project.Zap.Controllers
|
|||
this.logger.LogInformation("No locations, so redirecting to location view");
|
||||
return Redirect("/Locations");
|
||||
}
|
||||
return View("/Index", await this.GetShifts(locations));
|
||||
ViewData["AzureMapsKey"] = this.configuration["AzureMapsSubscriptionKey"];
|
||||
|
||||
return View("Index", await this.GetShifts(locations));
|
||||
}
|
||||
|
||||
shift.EmployeeId = id.Value;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
@if (ViewData.ContainsKey("ValidationError"))
|
||||
{
|
||||
<div class="alert alert-danger">
|
||||
<strong>@ViewData["ValidationError"]</strong> @ViewData["ValidationError"]
|
||||
<strong>@ViewData["ValidationError"]</strong>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче