From 6c7dc4252f379efa24e1343e01284e3c912f14ea Mon Sep 17 00:00:00 2001 From: Venix <30481900+venix12@users.noreply.github.com> Date: Thu, 14 Dec 2023 03:39:49 +0100 Subject: [PATCH] alphabetize --- app/Transformers/ContestTransformer.php | 8 ++++---- resources/js/contest-judge/entry.tsx | 2 +- resources/js/interfaces/contest-json.ts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Transformers/ContestTransformer.php b/app/Transformers/ContestTransformer.php index 79ff8d632b6..d3205f46e68 100644 --- a/app/Transformers/ContestTransformer.php +++ b/app/Transformers/ContestTransformer.php @@ -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 diff --git a/resources/js/contest-judge/entry.tsx b/resources/js/contest-judge/entry.tsx index 5707eed8489..86d3ad463e2 100644 --- a/resources/js/contest-judge/entry.tsx +++ b/resources/js/contest-judge/entry.tsx @@ -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'; diff --git a/resources/js/interfaces/contest-json.ts b/resources/js/interfaces/contest-json.ts index 2623f506d2a..715d862cb23 100644 --- a/resources/js/interfaces/contest-json.ts +++ b/resources/js/interfaces/contest-json.ts @@ -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[]; }