diff --git a/app/Domains/Event/Views/Partials/ParticipationSummary.vue b/app/Domains/Event/Views/Partials/ParticipationSummary.vue index 3c605bd..f8f10b0 100644 --- a/app/Domains/Event/Views/Partials/ParticipationSummary.vue +++ b/app/Domains/Event/Views/Partials/ParticipationSummary.vue @@ -64,7 +64,7 @@ const props = defineProps({ Förderung {{ props.event.supportPerson.readable }}
- + @@ -98,7 +98,7 @@ const props = defineProps({ Budget - + {{ props.event.totalBalance.estimated.readable }} diff --git a/app/Resources/EventParticipantResource.php b/app/Resources/EventParticipantResource.php index 8107f91..62ed6e2 100644 --- a/app/Resources/EventParticipantResource.php +++ b/app/Resources/EventParticipantResource.php @@ -26,17 +26,14 @@ class EventParticipantResource extends JsonResource } $presenceDays = $this->resource->arrival_date->diff($this->resource->departure_date)->days; - $presenceDaysSupport = $presenceDays; - - if ($presenceDaysSupport === 0) { - $presenceDaysSupport = 1; + if ($presenceDays === 0) { + $presenceDays = 1; + $presenceDaysSupport = 1; } else { - $presenceDaysSupport = $presenceDaysSupport - 1; + $presenceDaysSupport = $presenceDays; + $presenceDays++; } - - - return array_merge( $this->resource->toArray(), [ diff --git a/app/Resources/EventResource.php b/app/Resources/EventResource.php index ca7428a..632146d 100644 --- a/app/Resources/EventResource.php +++ b/app/Resources/EventResource.php @@ -89,6 +89,7 @@ class EventResource extends JsonResource{ $returnArray['totalParticipantCount'] = $this->event->participants()->count(); $returnArray['supportPersonIndex'] = $this->event->support_per_person->toString(); + $returnArray['supportPersonValue'] = $this->event->support_per_person->getAmount(); $returnArray['supportPerson'] = $this->calculateSupportPerPerson($returnArray['participants']); $returnArray['income'] = $this->calculateIncomes($returnArray['participants'], $returnArray['supportPerson']['amount']); diff --git a/version b/version index fdc6698..cca25a9 100644 --- a/version +++ b/version @@ -1 +1 @@ -4.4.0 +4.4.1