Skip to content

Commit

Permalink
do not show publish button if goal is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
adelikat committed Jan 30, 2024
1 parent 78bf096 commit 68dd00d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion TASVideos/Pages/Submissions/Models/SubmissionDisplayModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ public class SubmissionDisplayModel : ISubmissionDisplay
public bool IsCataloged => SystemId.HasValue
&& SystemFrameRateId.HasValue
&& GameId > 0
&& GameVersionId > 0;
&& GameVersionId > 0
&& GameGoalId > 0;

[Display(Name = "Start Type")]
public MovieStartType? StartType { get; set; }
Expand Down Expand Up @@ -100,4 +101,5 @@ public class SubmissionDisplayModel : ISubmissionDisplay
internal int? SystemId { get; set; }
internal int? SystemFrameRateId { get; set; }
public int? GameVersionId { get; set; }
internal int? GameGoalId { get; set; }
}
3 changes: 2 additions & 1 deletion TASVideos/Pages/Submissions/View.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ public async Task<IActionResult> OnGet()
TopicId = s.TopicId,
Warnings = s.Warnings,
CycleCount = s.CycleCount,
Annotations = s.Annotations
Annotations = s.Annotations,
GameGoalId = s.GameGoalId
})
.SingleOrDefaultAsync();

Expand Down

0 comments on commit 68dd00d

Please sign in to comment.