Small Bugfixes
This commit is contained in:
@@ -64,7 +64,7 @@ const props = defineProps({
|
|||||||
<th style="padding-bottom: 20px" colspan="2">Förderung</th>
|
<th style="padding-bottom: 20px" colspan="2">Förderung</th>
|
||||||
<td style="padding-bottom: 20px" colspan="2">
|
<td style="padding-bottom: 20px" colspan="2">
|
||||||
{{ props.event.supportPerson.readable }}<br />
|
{{ 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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ const props = defineProps({
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th style="padding-top: 20px; font-size: 12pt !important;" colspan="2">Budget</th>
|
<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 }}
|
{{ props.event.totalBalance.estimated.readable }}
|
||||||
</td>
|
</td>
|
||||||
<td v-else style="color: #f44336; font-weight: bold; padding-top: 20px; font-size: 12pt !important;">
|
<td v-else style="color: #f44336; font-weight: bold; padding-top: 20px; font-size: 12pt !important;">
|
||||||
|
|||||||
@@ -26,17 +26,14 @@ class EventParticipantResource extends JsonResource
|
|||||||
}
|
}
|
||||||
|
|
||||||
$presenceDays = $this->resource->arrival_date->diff($this->resource->departure_date)->days;
|
$presenceDays = $this->resource->arrival_date->diff($this->resource->departure_date)->days;
|
||||||
$presenceDaysSupport = $presenceDays;
|
if ($presenceDays === 0) {
|
||||||
|
$presenceDays = 1;
|
||||||
if ($presenceDaysSupport === 0) {
|
|
||||||
$presenceDaysSupport = 1;
|
$presenceDaysSupport = 1;
|
||||||
} else {
|
} else {
|
||||||
$presenceDaysSupport = $presenceDaysSupport - 1;
|
$presenceDaysSupport = $presenceDays;
|
||||||
|
$presenceDays++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return array_merge(
|
return array_merge(
|
||||||
$this->resource->toArray(),
|
$this->resource->toArray(),
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ class EventResource extends JsonResource{
|
|||||||
$returnArray['totalParticipantCount'] = $this->event->participants()->count();
|
$returnArray['totalParticipantCount'] = $this->event->participants()->count();
|
||||||
|
|
||||||
$returnArray['supportPersonIndex'] = $this->event->support_per_person->toString();
|
$returnArray['supportPersonIndex'] = $this->event->support_per_person->toString();
|
||||||
|
$returnArray['supportPersonValue'] = $this->event->support_per_person->getAmount();
|
||||||
$returnArray['supportPerson'] = $this->calculateSupportPerPerson($returnArray['participants']);
|
$returnArray['supportPerson'] = $this->calculateSupportPerPerson($returnArray['participants']);
|
||||||
|
|
||||||
$returnArray['income'] = $this->calculateIncomes($returnArray['participants'], $returnArray['supportPerson']['amount']);
|
$returnArray['income'] = $this->calculateIncomes($returnArray['participants'], $returnArray['supportPerson']['amount']);
|
||||||
|
|||||||
Reference in New Issue
Block a user