From 90de5935129291db49fbdbbe14a35b68fbca07bf Mon Sep 17 00:00:00 2001 From: carlobeltrame Date: Thu, 25 Jul 2024 23:55:12 +0200 Subject: [PATCH] Display filled-in evaluation grids on participant detail --- app/Models/Participant.php | 7 +++++ lang/de/t.php | 5 +++- resources/views/participant-detail.blade.php | 29 +++++++++++++++++++- 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/app/Models/Participant.php b/app/Models/Participant.php index fb8bced4..67613d1d 100644 --- a/app/Models/Participant.php +++ b/app/Models/Participant.php @@ -83,6 +83,13 @@ public function participant_groups() return $this->belongsToMany('App\Models\ParticipantGroup', 'participant_groups_participants'); } + /** + * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany + */ + public function evaluation_grids() { + return $this->belongsToMany(EvaluationGrid::class, 'evaluation_grids_participants'); + } + public function getPositiveAttribute() { return $this->observations()->where('impression', '=', '2'); } diff --git a/lang/de/t.php b/lang/de/t.php index 42890a86..e3eb2c0a 100644 --- a/lang/de/t.php +++ b/lang/de/t.php @@ -93,7 +93,7 @@ "block" => "Block", "model_name" => "Beurteilungsraster", "participants" => "TN", - "user" => "Beurteilt von", + "user" => "Erstellt von", ), "evaluation_grid_row" => array( "notes" => "Bemerkungen", @@ -676,6 +676,9 @@ "num_observations" => "{0}Bisher keine Beobachtungen.|{1}Erst eine Beobachtung. Da geht noch mehr!|[2,*]:count Beobachtungen, davon :positive mit positivem, :neutral mit neutralem und :negative mit negativem Eindruck.", "observations_without_category" => "Beobachtungen ohne Kategorie", "observations_without_requirement" => "Beobachtungen ohne Anforderung", + "evaluation_grids" => array( + "title" => "Beurteilungsraster", + ), "feedbacks" => array( "title" => "Rückmeldungen", ), diff --git a/resources/views/participant-detail.blade.php b/resources/views/participant-detail.blade.php index b7c70dae..a4707631 100644 --- a/resources/views/participant-detail.blade.php +++ b/resources/views/participant-detail.blade.php @@ -51,7 +51,6 @@ - @if ($participant->feedbacks()->count()) @@ -79,6 +78,34 @@ @endif + @if ($participant->evaluation_grids()->count()) + + + + + + + + + + + + @endif +