Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions backend/app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace HiEvents\Console;

use HiEvents\Jobs\Message\SendScheduledMessagesJob;
use HiEvents\Jobs\Waitlist\ProcessExpiredWaitlistOffersJob;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

Expand All @@ -11,6 +12,7 @@ class Kernel extends ConsoleKernel
protected function schedule(Schedule $schedule): void
{
$schedule->job(new SendScheduledMessagesJob)->everyMinute()->withoutOverlapping();
$schedule->job(new ProcessExpiredWaitlistOffersJob)->everyMinute()->withoutOverlapping();
}

protected function commands(): void
Expand Down
11 changes: 11 additions & 0 deletions backend/app/DomainObjects/Enums/CapacityChangeDirection.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace HiEvents\DomainObjects\Enums;

enum CapacityChangeDirection
{
use BaseEnum;

case INCREASED;
case DECREASED;
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ abstract class EventSettingDomainObjectAbstract extends \HiEvents\DomainObjects\
final public const HOMEPAGE_THEME_SETTINGS = 'homepage_theme_settings';
final public const PASS_PLATFORM_FEE_TO_BUYER = 'pass_platform_fee_to_buyer';
final public const ALLOW_ATTENDEE_SELF_EDIT = 'allow_attendee_self_edit';
final public const WAITLIST_ENABLED = 'waitlist_enabled';
final public const WAITLIST_AUTO_PROCESS = 'waitlist_auto_process';
final public const WAITLIST_OFFER_TIMEOUT_MINUTES = 'waitlist_offer_timeout_minutes';

protected int $id;
protected int $event_id;
Expand Down Expand Up @@ -119,6 +122,9 @@ abstract class EventSettingDomainObjectAbstract extends \HiEvents\DomainObjects\
protected array|string|null $homepage_theme_settings = null;
protected bool $pass_platform_fee_to_buyer = false;
protected bool $allow_attendee_self_edit = true;
protected bool $waitlist_enabled = false;
protected bool $waitlist_auto_process = false;
protected ?int $waitlist_offer_timeout_minutes = null;

public function toArray(): array
{
Expand Down Expand Up @@ -177,6 +183,9 @@ public function toArray(): array
'homepage_theme_settings' => $this->homepage_theme_settings ?? null,
'pass_platform_fee_to_buyer' => $this->pass_platform_fee_to_buyer ?? null,
'allow_attendee_self_edit' => $this->allow_attendee_self_edit ?? null,
'waitlist_enabled' => $this->waitlist_enabled ?? null,
'waitlist_auto_process' => $this->waitlist_auto_process ?? null,
'waitlist_offer_timeout_minutes' => $this->waitlist_offer_timeout_minutes ?? null,
];
}

Expand Down Expand Up @@ -774,4 +783,37 @@ public function getAllowAttendeeSelfEdit(): bool
{
return $this->allow_attendee_self_edit;
}

public function setWaitlistEnabled(bool $waitlist_enabled): self
{
$this->waitlist_enabled = $waitlist_enabled;
return $this;
}

public function getWaitlistEnabled(): bool
{
return $this->waitlist_enabled;
}

public function setWaitlistAutoProcess(bool $waitlist_auto_process): self
{
$this->waitlist_auto_process = $waitlist_auto_process;
return $this;
}

public function getWaitlistAutoProcess(): bool
{
return $this->waitlist_auto_process;
}

public function setWaitlistOfferTimeoutMinutes(?int $waitlist_offer_timeout_minutes): self
{
$this->waitlist_offer_timeout_minutes = $waitlist_offer_timeout_minutes;
return $this;
}

public function getWaitlistOfferTimeoutMinutes(): ?int
{
return $this->waitlist_offer_timeout_minutes;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ abstract class ProductDomainObjectAbstract extends \HiEvents\DomainObjects\Abstr
final public const START_COLLAPSED = 'start_collapsed';
final public const IS_HIGHLIGHTED = 'is_highlighted';
final public const HIGHLIGHT_MESSAGE = 'highlight_message';
final public const WAITLIST_ENABLED = 'waitlist_enabled';

protected int $id;
protected int $event_id;
Expand Down Expand Up @@ -63,6 +64,7 @@ abstract class ProductDomainObjectAbstract extends \HiEvents\DomainObjects\Abstr
protected bool $start_collapsed = false;
protected bool $is_highlighted = false;
protected ?string $highlight_message = null;
protected ?bool $waitlist_enabled = null;

public function toArray(): array
{
Expand Down Expand Up @@ -93,6 +95,7 @@ public function toArray(): array
'start_collapsed' => $this->start_collapsed ?? null,
'is_highlighted' => $this->is_highlighted ?? null,
'highlight_message' => $this->highlight_message ?? null,
'waitlist_enabled' => $this->waitlist_enabled ?? null,
];
}

Expand Down Expand Up @@ -381,4 +384,15 @@ public function getHighlightMessage(): ?string
{
return $this->highlight_message;
}

public function setWaitlistEnabled(?bool $waitlist_enabled): self
{
$this->waitlist_enabled = $waitlist_enabled;
return $this;
}

public function getWaitlistEnabled(): ?bool
{
return $this->waitlist_enabled;
}
}
Loading
Loading