Fixed bug with editing manual entries.

This commit is contained in:
Daniel Wathen
2023-01-11 12:52:21 -07:00
parent f23c7136c0
commit 7bd530e72b
3 changed files with 5 additions and 5 deletions

View File

@ -15,7 +15,7 @@ namespace ReportingServices.UI.Controllers
public ProductionReportController(ILogger<ProductionReportController> logger) public ProductionReportController(ILogger<ProductionReportController> logger)
{ {
_logger = logger; _logger = logger;
_baseDBUrl = "http://localhost:50201/api/"; _baseDBUrl = "https://localhost:7196/api/";
_logger.LogInformation("Base Database Address: {baseUrl}", _baseDBUrl); _logger.LogInformation("Base Database Address: {baseUrl}", _baseDBUrl);
} }

View File

@ -160,7 +160,7 @@
@for (int i = 20; i < 80; i++) @for (int i = 20; i < 80; i++)
{ {
string isMatching = ""; string isMatching = "";
string[] bottleChanges = Model.BottleChanges.Split(','); string[] bottleChanges = !string.IsNullOrEmpty(Model.BottleChanges) ? Model.BottleChanges.Split(',') : new string[0];
for (int j = 0; j < bottleChanges.Length; j++) for (int j = 0; j < bottleChanges.Length; j++)
{ {
@ -191,7 +191,7 @@
@for (int i = 20; i < 80; i++) @for (int i = 20; i < 80; i++)
{ {
string isMatching = ""; string isMatching = "";
string[] dailyPartChanges = Model.DailyPartChanges.Split(','); string[] dailyPartChanges = !string.IsNullOrEmpty(Model.DailyPartChanges) ? Model.DailyPartChanges.Split(',') : new string[0];
for (int j = 0; j < dailyPartChanges.Length; j++) for (int j = 0; j < dailyPartChanges.Length; j++)
{ {
@ -222,7 +222,7 @@
@for (int i = 20; i < 80; i++) @for (int i = 20; i < 80; i++)
{ {
string isMatching = ""; string isMatching = "";
string[] weeklyPartChanges = Model.WeeklyPartChanges.Split(','); string[] weeklyPartChanges = !string.IsNullOrEmpty(Model.WeeklyPartChanges) ? Model.WeeklyPartChanges.Split(',') : new string[0];
for (int j = 0; j < weeklyPartChanges.Length; j++) for (int j = 0; j < weeklyPartChanges.Length; j++)
{ {

View File

@ -1 +1 @@
{"OperatorHeadcountDays":0,"OperatorHeadcountNights":0,"OperatorCallOutsDays":0,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":0,"EngineeringHeadcountNights":0,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":0,"MaintenanceHeadcountNights":0,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":0,"BottleChanges":null,"DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30"} {"OperatorHeadcountDays":0,"OperatorHeadcountNights":0,"OperatorCallOutsDays":0,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":0,"EngineeringHeadcountNights":0,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":0,"MaintenanceHeadcountNights":0,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":0,"BottleChanges":null,"DailyPartChanges":null,"WeeklyPartChanges":null}