Spaces:
Runtime error
Runtime error
Download TaskTrackingSystem.Shared/Models/Notification/NotificationNavigation.cs from Yuruyuruu/task-tracking-system: direct link, hf CLI and curl.
- Browser
- Download file 772 Bytes
-
https://huggingface.co/spaces/Yuruyuruu/task-tracking-system/resolve/main/TaskTrackingSystem.Shared/Models/Notification/NotificationNavigation.cs
- Command line
-
hf download hf://spaces/Yuruyuruu/task-tracking-system/TaskTrackingSystem.Shared/Models/Notification/NotificationNavigation.cs
-
curl -L -o NotificationNavigation.cs https://huggingface.co/spaces/Yuruyuruu/task-tracking-system/resolve/main/TaskTrackingSystem.Shared/Models/Notification/NotificationNavigation.cs
772 Bytes
| namespace TaskTrackingSystem.Shared.Models.Notification; | |
| public static class NotificationNavigation | |
| { | |
| public static string BuildTargetUrl(string sourceType, long sourceId, byte notificationType) | |
| { | |
| if (string.Equals(sourceType, "project", StringComparison.OrdinalIgnoreCase)) | |
| { | |
| return $"/projects/{sourceId}/tasks"; | |
| } | |
| if (string.Equals(sourceType, "task", StringComparison.OrdinalIgnoreCase)) | |
| { | |
| var isCommentThread = notificationType is (byte)NotificationType.CommentAdded or (byte)NotificationType.Mention; | |
| return isCommentThread | |
| ? $"/tasks/{sourceId}/details?tab=comments" | |
| : $"/tasks/{sourceId}/details"; | |
| } | |
| return "/dashboard"; | |
| } | |
| } | |