Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public partial class FrameworksController
[Route("/Framework/{frameworkId}/Comments/")]
public IActionResult InsertComment(int frameworkId, string comment)
{
if (comment == "") return RedirectToAction("ViewFramework", new { tabname = "Comments", frameworkId });
if (string.IsNullOrWhiteSpace(comment)) return RedirectToAction("ViewFramework", new { tabname = "Comments", frameworkId });
var adminId = GetAdminId();
var newCommentId = frameworkService.InsertComment(frameworkId, adminId, comment, null);
frameworkNotificationService.SendCommentNotifications(adminId, frameworkId, newCommentId, comment, null, null);
Expand All @@ -30,7 +30,7 @@ public IActionResult ViewThread(int frameworkId, int commentId)
[Route("/Framework/{frameworkId}/Comments/{commentId}")]
public IActionResult InsertReply(int frameworkId, int commentId, string comment, string parentComment)
{
if (comment == "") return RedirectToAction("ViewThread", new { frameworkId, commentId });
if (string.IsNullOrWhiteSpace(comment)) return RedirectToAction("ViewThread", new { frameworkId, commentId });
var adminId = GetAdminId();
var newCommentId = frameworkService.InsertComment(frameworkId, adminId, comment, commentId);
frameworkNotificationService.SendCommentNotifications(adminId, frameworkId, newCommentId, comment, commentId, parentComment);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public IActionResult SubmitFrameworkReview(int frameworkId, int reviewId, string
{
var adminId = GetAdminId();
int? commentId = null;
if(comment != null) commentId = frameworkService.InsertComment(frameworkId, adminId, comment, null);
if(!string.IsNullOrWhiteSpace(comment)) commentId = frameworkService.InsertComment(frameworkId, adminId, comment, null);
frameworkService.SubmitFrameworkReview(frameworkId, reviewId, signedOff, commentId);
frameworkNotificationService.SendReviewOutcomeNotification(reviewId);
return RedirectToAction("ViewFramework", "Frameworks", new { frameworkId , tabname = "Structure"});
Expand Down