Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public function __invoke(UpsertCheckInListRequest $request, int $eventId): JsonR
expiresAt: $request->validated('expires_at'),
activatesAt: $request->validated('activates_at'),
eventOccurrenceId: $request->validated('event_occurrence_id'),
publicShowAttendeeNotes: $request->validated('public_show_attendee_notes') ?? true,
publicShowQuestionAnswers: $request->validated('public_show_question_answers') ?? true,
publicShowOrderDetails: $request->validated('public_show_order_details') ?? true,
publicShowAttendeeNotes: $request->validated('public_show_attendee_notes') ?? false,
publicShowQuestionAnswers: $request->validated('public_show_question_answers') ?? false,
publicShowOrderDetails: $request->validated('public_show_order_details') ?? false,
)
);
} catch (UnrecognizedProductIdException $exception) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public function __invoke(UpsertCheckInListRequest $request, int $eventId, int $c
activatesAt: $request->validated('activates_at'),
id: $checkInListId,
eventOccurrenceId: $request->validated('event_occurrence_id'),
publicShowAttendeeNotes: $request->validated('public_show_attendee_notes') ?? true,
publicShowQuestionAnswers: $request->validated('public_show_question_answers') ?? true,
publicShowOrderDetails: $request->validated('public_show_order_details') ?? true,
publicShowAttendeeNotes: $request->validated('public_show_attendee_notes') ?? false,
publicShowQuestionAnswers: $request->validated('public_show_question_answers') ?? false,
publicShowOrderDetails: $request->validated('public_show_order_details') ?? false,
)
);
} catch (UnrecognizedProductIdException $exception) {
Expand Down
1 change: 1 addition & 0 deletions backend/app/Mail/Order/OrderFailed.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function content(): Content
'order' => $this->order,
'organizer' => $this->organizer,
'eventSettings' => $this->eventSettings,
'supportEmail' => $this->eventSettings->getSupportEmail() ?: $this->organizer->getEmail(),
'eventUrl' => sprintf(
Url::getFrontEndUrlFromConfig(Url::EVENT_HOMEPAGE),
$this->event->getId(),
Expand Down
1 change: 1 addition & 0 deletions backend/app/Models/OrderApplicationFee.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ protected function getCastMap(): array
{
return [
'metadata' => 'array',
'amount' => 'float',
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public function __construct(
public ?string $activatesAt = null,
public ?int $id = null,
public ?int $eventOccurrenceId = null,
public bool $publicShowAttendeeNotes = true,
public bool $publicShowQuestionAnswers = true,
public bool $publicShowOrderDetails = true,
public bool $publicShowAttendeeNotes = false,
public bool $publicShowQuestionAnswers = false,
public bool $publicShowOrderDetails = false,
) {}
}
6 changes: 3 additions & 3 deletions backend/app/Services/Domain/Event/CreateEventService.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ private function createSystemDefaultCheckInList(EventDomainObject $event): void
'short_id' => IdHelper::shortId(IdHelper::CHECK_IN_LIST_PREFIX),
'name' => __('Default check-in'),
'is_system_default' => true,
'public_show_attendee_notes' => true,
'public_show_question_answers' => true,
'public_show_order_details' => true,
'public_show_attendee_notes' => false,
'public_show_question_answers' => false,
'public_show_order_details' => false,
]);
}

Expand Down
3 changes: 3 additions & 0 deletions backend/app/Services/Domain/Event/DuplicateEventService.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,9 @@ private function cloneCheckInLists(
->setExpiresAt($checkInList->getExpiresAt())
->setActivatesAt($checkInList->getActivatesAt())
->setEventOccurrenceId($newOccurrenceId)
->setPublicShowAttendeeNotes($checkInList->getPublicShowAttendeeNotes())
->setPublicShowQuestionAnswers($checkInList->getPublicShowQuestionAnswers())
->setPublicShowOrderDetails($checkInList->getPublicShowOrderDetails())
->setEventId($newEventId),
productIds: $checkInList->getProducts()
?->map(fn ($product) => $oldProductToNewProductMap[$product->getId()])?->toArray() ?? [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ public function up(): void
{
DB::transaction(function () {
// Step 1: Create one occurrence per existing event (with short_id).
// Skip when columns are already dropped (the migration previously reached
// Step 5) and skip individual events that already have an occurrence so a
// retry after partial completion succeeds rather than crashing.
// start_date/end_date are read here and intentionally retained on the
// events table (never dropped). Skip individual events that already have
// an occurrence so a retry after partial completion succeeds.
if (Schema::hasColumn('events', 'start_date')) {
DB::table('events')->select('id', 'start_date', 'end_date', 'created_at')->orderBy('id')->chunk(500, function ($events) {
$eventIds = $events->pluck('id')->all();
Expand Down Expand Up @@ -71,36 +71,11 @@ public function up(): void
Schema::table('attendees', function (Blueprint $table) {
$table->foreignId('event_occurrence_id')->nullable(false)->change();
});

// Step 5: Drop start_date and end_date from events (no-op if already dropped).
if (Schema::hasColumn('events', 'start_date')) {
Schema::table('events', function (Blueprint $table) {
$table->dropColumn(['start_date', 'end_date']);
});
}
});
}

public function down(): void
{
// Re-add date columns to events
Schema::table('events', function (Blueprint $table) {
$table->timestamp('start_date')->nullable();
$table->timestamp('end_date')->nullable();
});

// Restore dates from occurrences
DB::statement('
UPDATE events e
SET start_date = (
SELECT MIN(eo.start_date) FROM event_occurrences eo WHERE eo.event_id = e.id
),
end_date = (
SELECT MAX(eo.end_date) FROM event_occurrences eo WHERE eo.event_id = e.id
)
');

// Null out occurrence FKs and make nullable again
DB::statement('UPDATE attendees SET event_occurrence_id = NULL');

Schema::table('attendees', function (Blueprint $table) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
public function up(): void
{
Schema::table('check_in_lists', function (Blueprint $table) {
$table->boolean('public_show_attendee_notes')->default(true);
$table->boolean('public_show_question_answers')->default(true);
$table->boolean('public_show_order_details')->default(true);
$table->boolean('public_show_attendee_notes')->default(false);
$table->boolean('public_show_question_answers')->default(false);
$table->boolean('public_show_order_details')->default(false);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ public function up(): void
'name' => 'Default check-in',
'description' => null,
'is_system_default' => true,
'public_show_attendee_notes' => true,
'public_show_question_answers' => true,
'public_show_order_details' => true,
'public_show_attendee_notes' => false,
'public_show_question_answers' => false,
'public_show_order_details' => false,
'created_at' => now(),
'updated_at' => now(),
]);
Expand Down
4 changes: 4 additions & 0 deletions backend/routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@
Route::get('/', function () {
return view('welcome');
});

Route::get('/up', function () {
return response()->json(['status' => 'ok']);
});
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected function setUp(): void

// Create user with account
$password = 'password123';
$this->user = User::factory()->password($password)->withAccount()->create();
$this->user = User::factory()->password($password)->withAccount()->create(['locale' => 'en']);

// Get the account created by withAccount()
$this->account = $this->user->accounts()->first();
Expand Down
Loading
Loading