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 @@ -52,6 +52,15 @@ public function down(): void
return;
}

// SQLite refuses to drop a column while an index still references it.
foreach (['gmail_thread_id', 'gmail_message_id', 'notify_email'] as $column) {
if (Schema::hasColumn('support_approvals', $column)) {
Schema::table('support_approvals', function (Blueprint $table) use ($column) {
$table->dropIndex('support_approvals_'.$column.'_index');
});
}
}

Schema::table('support_approvals', function (Blueprint $table) {
$columns = array_filter([
Schema::hasColumn('support_approvals', 'gmail_thread_id') ? 'gmail_thread_id' : null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ public function up(): void

public function down(): void
{
// SQLite refuses to drop a column while an index still references it.
if (Schema::hasColumn('support_cases', 'cursor_agent_id')) {
Schema::table('support_cases', function (Blueprint $table) {
$table->dropIndex('support_cases_cursor_agent_id_index');
});
}

Schema::table('support_cases', function (Blueprint $table) {
foreach (['cursor_agent_id', 'cursor_agent_status', 'cursor_pr_url', 'live_promotion_pr_url'] as $column) {
if (Schema::hasColumn('support_cases', $column)) {
Expand Down
8 changes: 7 additions & 1 deletion resources/views/online-calendar/oc-index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,15 @@ class="absolute top-0 right-0 h-full max-w-[calc(70vw)] object-cover hidden md:b
</div>
</div>
</section>
</section>
@endsection

{{-- Rendered outside <main id="app"> on purpose. Vue mounts there with the runtime
compiler, which clears the container and rebuilds every node from the server HTML,
discarding Livewire's event listeners so the filters stop responding. --}}
@section('non-vue-content')
<section class="font-['Blinker'] overflow-hidden">
@livewire('online-calendar')

</section>
@endsection

Expand Down
22 changes: 22 additions & 0 deletions tests/Feature/OnlineEventsWorkflowTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,28 @@ public function featured_activities_page_shows_all_upcoming_open_online_events()
->assertDontSee($pendingEvent->title);
}

#[Test]
public function featured_activities_calendar_renders_outside_the_vue_root(): void
{
$this->seed('RolesAndPermissionsSeeder');

$html = $this->get('/featured-activities')->assertStatus(200)->getContent();

$nonVueStart = strpos($html, '<main id="non-vue"');
$component = strpos($html, 'wire:snapshot');

$this->assertNotFalse($nonVueStart, 'Layout should expose the non-vue region.');
$this->assertNotFalse($component, 'Calendar component should render.');

// Vue mounts on <main id="app"> with the runtime compiler, which clears the
// container and rebuilds every node, stripping Livewire's event listeners.
$this->assertGreaterThan(
$nonVueStart,
$component,
'The calendar must render inside <main id="non-vue">, otherwise Vue destroys its Livewire bindings and the filters stop responding.'
);
}

#[Test]
public function featured_activities_month_filter_only_shows_events_for_selected_month(): void
{
Expand Down
Loading