Skip to content

Commit

Permalink
Merge pull request #180 from xdorro/v2
Browse files Browse the repository at this point in the history
V2.0.4
  • Loading branch information
anhnmt authored Aug 28, 2021
2 parents 3e333ef + ffc1945 commit 0ddc4b6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Backend/Areas/Admin/Controllers/ChequesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ private List<Notifications> CreateNotification(Cheques cheque, string message)
Content = message,
Status = (int) NotificationStatus.Unread,
PkType = (int) NotificationType.Cheque,
PkId = cheque.ChequeBookId,
PkId = cheque.ChequeId,
}
};

Expand Down
16 changes: 7 additions & 9 deletions Backend/Controllers/ChequesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,13 @@ public ActionResult Detail(int id)
var account = accounts.Get(user.AccountId);
var cheque = cheques.Get(id);

if (chequebooks.CheckDuplicate(x => x.ChequeBookId == cheque.ChequeBookId && x.AccountId == account.AccountId))
{
var chequeDetail = new ChequesViewModel(cheque);
return View(chequeDetail);
}
else
{
if (!chequebooks.CheckDuplicate(x =>
x.ChequeBookId == cheque.ChequeBookId && x.AccountId == account.AccountId))
return RedirectToAction("NotFound", "Error");
}

var chequeDetail = new ChequesViewModel(cheque);
return View(chequeDetail);

}

public ActionResult GetData(int chequeBookId)
Expand Down Expand Up @@ -450,7 +448,7 @@ private List<Notifications> CreateNotification(Cheques cheque, string message)
Content = message,
Status = (int) NotificationStatus.Unread,
PkType = (int) NotificationType.Cheque,
PkId = cheque.ChequeBookId,
PkId = cheque.ChequeId,
}
};

Expand Down
2 changes: 1 addition & 1 deletion Backend/Hubs/ChatHub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public string ReadNotification(int notificationId)
return "/Transactions/TransactionsDetails/" + notification.PkId;

case (int) NotificationType.Cheque:
return "/Cheques/?ChequeBookId=" + notification.PkId;
return "/Cheques/Detail/" + notification.PkId;
}
}
catch (Exception ex)
Expand Down

0 comments on commit 0ddc4b6

Please sign in to comment.