Skip to content

Commit

Permalink
Various fixes (#896)
Browse files Browse the repository at this point in the history
Co-authored-by: Sukhvinder Bhullar <[email protected]>
  • Loading branch information
sukhybhullar-nimble and Sukhvinder Bhullar authored Oct 10, 2024
1 parent f9e4f08 commit f8399fb
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void FailsWhenGivenUnsupportedColumn()
var result = validator.Validate(table);

result.IsValid.Should().BeFalse();
result.ErrorMessage.Should().Be("File has a invalid column header: LocalPlace");
result.ErrorMessage.Should().Be("File has an invalid column header: LocalPlace");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
@model Dfe.ManageFreeSchoolProjects.Pages.BulkEdit.BulkEditCompleteModel
@{
ViewData["Title"] = "Confirmation";
var plural = Model.Count > 1 ? "s" : "";
var confirmationMessage = Model.Count + $" free school project{plural} edited";
}


Expand All @@ -10,7 +12,7 @@

<div class="govuk-panel govuk-panel--confirmation">
<h1 class="govuk-panel__title">
@Model.Count free school projects edited
@confirmationMessage
</h1>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</div>
}

@if (Model.Rows == null || Model.Rows.Any() || Model.HasErrors)
@if (Model.Rows == null || (Model.Rows.Any() && Model.HasErrors))
{
@if (@Model.FileError != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public async Task<IActionResult> OnPostAsync()
else
{
var errorCount = Rows.Count(x => x.Cells.Any(y => !string.IsNullOrEmpty(y.Error)));
FileError = $"The upload tab has {errorCount} validation errors";
FileError = $"The enter data tab has {errorCount} validation errors";
SetToUpdateMultipleFields();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public FileValidationResult Validate(DataTable table)
return new FileValidationResult
{
IsValid = false,
ErrorMessage = $"File has a invalid column header: {column.ColumnName}"
ErrorMessage = $"File has an invalid column header: {column.ColumnName}"
};
}
}
Expand Down

0 comments on commit f8399fb

Please sign in to comment.