Small Bugfixes

This commit is contained in:
2026-05-26 20:29:01 +02:00
parent 83bbd6f7d3
commit 710e27c344
4 changed files with 9 additions and 11 deletions
@@ -64,7 +64,7 @@ const props = defineProps({
<th style="padding-bottom: 20px" colspan="2">Förderung</th>
<td style="padding-bottom: 20px" colspan="2">
{{ props.event.supportPerson.readable }}<br />
<label style="font-size: 9pt;">({{ props.event.supportPersonIndex }} / Tag p.P.)</label>
<label style="font-size: 9pt;">({{ props.event.supportPersonValue }} / Tag p.P.)</label>
</td>
</tr>
@@ -98,7 +98,7 @@ const props = defineProps({
<tr>
<th style="padding-top: 20px; font-size: 12pt !important;" colspan="2">Budget</th>
<td v-if="props.event.totalBalance.expected.value >= 0" style="color: #4caf50; font-weight: bold; padding-top: 20px; font-size: 12pt !important;">
<td v-if="props.event.totalBalance.estimated.value >= 0" style="color: #4caf50; font-weight: bold; padding-top: 20px; font-size: 12pt !important;">
{{ props.event.totalBalance.estimated.readable }}
</td>
<td v-else style="color: #f44336; font-weight: bold; padding-top: 20px; font-size: 12pt !important;">
+5 -8
View File
@@ -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(),
[
+1
View File
@@ -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']);