Add deep links for pending approval notifications
This commit is contained in:
1 parent
ce8982dba9
commit
4c95edb678
9 files changed
+191
-34
No files matched your search
@@ -54,7 +54,8 @@ public sealed class GradesController(
|
||||
CancellationToken cancellationToken = default,
|
||||
Guid? collegeId = null,
|
||||
string? teacherKeyword = null,
|
||||
string? classKeyword = null)
|
||||
string? classKeyword = null,
|
||||
Guid? sheetId = null)
|
||||
{
|
||||
page = Math.Max(1, page);
|
||||
pageSize = Math.Clamp(pageSize, 10, 50);
|
||||
@@ -69,6 +70,9 @@ public sealed class GradesController(
|
||||
if (status.HasValue)
|
||||
source = source.Where(x => db.GradeSheets.Any(sheet =>
|
||||
sheet.TeachingTaskId == x.Id && sheet.Status == status.Value));
|
||||
if (sheetId.HasValue)
|
||||
source = source.Where(x => db.GradeSheets.Any(sheet =>
|
||||
sheet.TeachingTaskId == x.Id && sheet.Id == sheetId.Value));
|
||||
if (!string.IsNullOrWhiteSpace(keyword))
|
||||
{
|
||||
keyword = keyword.Trim();
|
||||
@@ -582,7 +586,7 @@ public sealed class GradesController(
|
||||
"成绩单待审核",
|
||||
$"《{courseName}》成绩已提交,请及时审核。",
|
||||
collegeId,
|
||||
"/grades",
|
||||
$"/grades?sheetId={sheet.Id}",
|
||||
cancellationToken,
|
||||
NotificationCategory.Grade);
|
||||
return NoContent();
|
||||
|
||||
Reference in new issue
Block a user