Merge pull request 'Small fixes' (#11) from dev-4.5.3 into main
Reviewed-on: #11
This commit was merged in pull request #11.
This commit is contained in:
@@ -68,6 +68,11 @@ class SignupController extends CommonController {
|
|||||||
|
|
||||||
public function signUp(int $eventId, Request $request) {
|
public function signUp(int $eventId, Request $request) {
|
||||||
$event = $this->events->getById($eventId, false);
|
$event = $this->events->getById($eventId, false);
|
||||||
|
|
||||||
|
if (!$event->registration_allowed || new \DateTime() > $event->start_date) {
|
||||||
|
return response()->json(['status' => 'closed'], 403);
|
||||||
|
}
|
||||||
|
|
||||||
$eventResource = $event->toResource();
|
$eventResource = $event->toResource();
|
||||||
$registrationData = $request->input('registration_data');
|
$registrationData = $request->input('registration_data');
|
||||||
$siblingReduction = $registrationData['sibling'] === 'true';
|
$siblingReduction = $registrationData['sibling'] === 'true';
|
||||||
|
|||||||
@@ -99,10 +99,14 @@ function close() {
|
|||||||
|
|
||||||
<div class="signup-body">
|
<div class="signup-body">
|
||||||
<SignupForm
|
<SignupForm
|
||||||
|
v-if="props.event.registrationAllowed"
|
||||||
:event="props.event"
|
:event="props.event"
|
||||||
:participantData="props.participantData ?? {}"
|
:participantData="props.participantData ?? {}"
|
||||||
:localGroups="props.localGroups ?? []"
|
:localGroups="props.localGroups ?? []"
|
||||||
/>
|
/>
|
||||||
|
<p v-else class="signup-closed-notice">
|
||||||
|
Die Anmeldung für diese Veranstaltung ist geschlossen.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</shadowed-box>
|
</shadowed-box>
|
||||||
@@ -220,6 +224,14 @@ function close() {
|
|||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.signup-closed-notice {
|
||||||
|
text-align: center;
|
||||||
|
padding: 24px;
|
||||||
|
color: #991b1b;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
/* ─── Tablet (640–1023px) ─── */
|
/* ─── Tablet (640–1023px) ─── */
|
||||||
@media (max-width: 1023px) {
|
@media (max-width: 1023px) {
|
||||||
.signup-box {
|
.signup-box {
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class EditController extends CommonController{
|
|||||||
$currentEvents = $this->costUnits->getCostUnitsForNewInvoice(CostUnitType::COST_UNIT_TYPE_EVENT);
|
$currentEvents = $this->costUnits->getCostUnitsForNewInvoice(CostUnitType::COST_UNIT_TYPE_EVENT);
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'invoice' => new InvoiceResource($invoice)->toArray(),
|
'invoice' => new InvoiceResource($newInvoice)->toArray(),
|
||||||
'status' => 'success',
|
'status' => 'success',
|
||||||
'costUnits' => array_merge($runningJobs, $currentEvents),
|
'costUnits' => array_merge($runningJobs, $currentEvents),
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class EventResource extends JsonResource{
|
|||||||
'accountIban' => $this->event->account_iban,
|
'accountIban' => $this->event->account_iban,
|
||||||
'alcoholicsAge' => $this->event->alcoholics_age,
|
'alcoholicsAge' => $this->event->alcoholics_age,
|
||||||
'sendWeeklyReports' => $this->event->send_weekly_report,
|
'sendWeeklyReports' => $this->event->send_weekly_report,
|
||||||
'registrationAllowed' => $this->event->registration_allowed,
|
'registrationAllowed' => $this->event->registration_allowed && new \DateTime() <= $this->event->start_date,
|
||||||
'archived' => $this->event->archived,
|
'archived' => $this->event->archived,
|
||||||
'earlyBirdEnd' => ['internal' => $this->event->early_bird_end->format('Y-m-d'), 'formatted' => $this->event->early_bird_end->format('d.m.Y')],
|
'earlyBirdEnd' => ['internal' => $this->event->early_bird_end->format('Y-m-d'), 'formatted' => $this->event->early_bird_end->format('d.m.Y')],
|
||||||
'registrationFinalEnd' => ['internal' => $this->event->registration_final_end->format('Y-m-d'), 'formatted' => $this->event->registration_final_end->format('d.m.Y')],
|
'registrationFinalEnd' => ['internal' => $this->event->registration_final_end->format('Y-m-d'), 'formatted' => $this->event->registration_final_end->format('d.m.Y')],
|
||||||
|
|||||||
Reference in New Issue
Block a user