diff --git a/app/Http/Controllers/Admin/EventController.php b/app/Http/Controllers/Admin/EventController.php
new file mode 100644
index 0000000..f39f0ba
--- /dev/null
+++ b/app/Http/Controllers/Admin/EventController.php
@@ -0,0 +1,16 @@
+ function($query) {
- $query->withCount('scoreSheets');
- },'room.judges'])->get();
- self::$completeAuditions = $auditions->filter(function ($audition) {
- return $audition->scoringIsComplete();
- });
- return self::$completeAuditions;
-
- }
public static function deadlineNotPast()
{
@@ -157,7 +145,7 @@ class Audition extends Model
);
}
- /*
+ /**
* Ensures judges_count property is always available
*/
public function getJudgesCountAttribute()
@@ -168,43 +156,4 @@ class Audition extends Model
return $this->attributes['judges_count'];
}
- public function scoredEntries()
- {
- return $this->entries->filter(function($entry) {
- return $entry->score_sheets_count >= $this->judges()->count();
- });
- }
-
- public function rankedEntries()
- {
- if (! $this->rankedEntries) {
- $entries = $this->entries()->with(['audition.scoringGuide.subscores', 'scoreSheets.judge'])->get();
- $entries = $entries->all();
- usort($entries, function ($a, $b) {
- $aScores = $a->finalScoresArray();
- $bScores = $b->finalScoresArray();
-
- $length = min(count($aScores), count($bScores));
- for ($i = 0; $i < $length; $i++) {
- if ($aScores[$i] !== $bScores[$i]) {
- return $bScores[$i] - $aScores[$i];
- }
- }
- return 0;
- });
- $collection = new \Illuminate\Database\Eloquent\Collection($entries);
- $this->rankedEntries = $collection;
- }
- return $this->rankedEntries;
- }
-
- public function scoringIsComplete()
- {
- if (self::$completeAuditions) {
- // check and see if this audition is in the list of complete auditions
- return self::$completeAuditions->contains('id', $this->id);
- }
-
- return $this->scoredEntries()->count() == $this->entries->count();
- }
}
diff --git a/resources/views/admin/event/index.blade.php b/resources/views/admin/event/index.blade.php
new file mode 100644
index 0000000..615e27c
--- /dev/null
+++ b/resources/views/admin/event/index.blade.php
@@ -0,0 +1,39 @@
+
+ Events
+
+
+ Manage Events
+
+
+ About Events in AuditionAdmin
+
+ {{-- move help text to a popout modal --}}
+
Events generally refer to the performance for a group of auditions
+
Every audition is assigned to one event
+
An event cannot be deleted without first deleting all of its auditions
+
Students will not be allowed to be seated in multiple auditions for the same event
+
If no student will ever be able to accept more than one seat, all auditions should be in one event
+
If you have, for example, concert bands and jazz bands that perform at different times, and a student can make both, you should create the concert auditions in one event, and the jazz auditions in another event.
+
+ @endforeach
+
+ {{-- The final row will allow for the creation of an event --}}
+
+
+
+
+
+
diff --git a/resources/views/components/help-modal.blade.php b/resources/views/components/help-modal.blade.php
new file mode 100644
index 0000000..8dbf181
--- /dev/null
+++ b/resources/views/components/help-modal.blade.php
@@ -0,0 +1,42 @@
+