Skip to content

Commit

Permalink
alphabetize
Browse files Browse the repository at this point in the history
  • Loading branch information
venix12 committed Dec 14, 2023
1 parent 31d9727 commit 6c7dc42
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions app/Transformers/ContestTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ public function includeEntries(Contest $contest)
return $this->collection($contest->entriesByType(Auth::user()), new ContestEntryTransformer());
}

public function includeScoringCategories(Contest $contest): Collection
public function includeMaxJudgingScore(Contest $contest): Primitive
{
return $this->collection($contest->scoringCategories, new ContestScoringCategoryTransformer());
return $this->primitive((int) $contest->scoring_categories_sum_max_value);
}

public function includeMaxJudgingScore(Contest $contest): Primitive
public function includeScoringCategories(Contest $contest): Collection
{
return $this->primitive((int) $contest->scoring_categories_sum_max_value);
return $this->collection($contest->scoringCategories, new ContestScoringCategoryTransformer());
}

public function includeUsersVotedCount(Contest $contest): ResourceInterface
Expand Down
2 changes: 1 addition & 1 deletion resources/js/contest-judge/entry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

import BigButton from 'components/big-button';
import ContestEntryJson from 'interfaces/contest-entry-json';
import ContestScoringCategoryJson from 'interfaces/contest-scoring-category-json';
import ContestJudgeScoreJson from 'interfaces/contest-judge-score-json';
import ContestJudgeVoteJson from 'interfaces/contest-judge-vote-json';
import ContestScoringCategoryJson from 'interfaces/contest-scoring-category-json';
import { route } from 'laroute';
import { action, computed, makeObservable, observable, runInAction, toJS } from 'mobx';
import { observer } from 'mobx-react';
Expand Down
2 changes: 1 addition & 1 deletion resources/js/interfaces/contest-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import ContestScoringCategoryJson from './contest-scoring-category-json';
export default interface ContestJson {
entries?: ContestEntryJson[];
id: number;
scoring_categories?: ContestScoringCategoryJson[];
max_judging_score?: number;
name: string;
scoring_categories?: ContestScoringCategoryJson[];
}

0 comments on commit 6c7dc42

Please sign in to comment.