fix: Checkout-Button sofort via Alpine $wire freischalten, Features-Sort stabilisieren

- wire:model.live + :disabled="!$wire.rightAcknowledged || !$wire.waiverConfirmed"
  → Button reagiert clientseitig ohne Server-Roundtrip
- orderBy('sort')->orderBy('id') → stabile Feature-Reihenfolge beim Billing-Wechsel

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
boban 2026-04-20 19:51:46 +02:00
parent f76ea32076
commit b8afe0cb70
2 changed files with 5 additions and 5 deletions

View File

@ -155,7 +155,7 @@ class Index extends Component
public function render()
{
return view('livewire.checkout.index', [
'features' => $this->plan->features()->with('group')->orderBy('sort')->get(),
'features' => $this->plan->features()->with('group')->orderBy('sort')->orderBy('id')->get(),
])->layout('layouts.app');
}
}

View File

@ -268,7 +268,7 @@
<label class="flex items-start gap-3 cursor-pointer group">
<input
type="checkbox"
wire:model="rightAcknowledged"
wire:model.live="rightAcknowledged"
class="mt-0.5 rounded border-amber-300 text-amber-500 focus:ring-amber-400 shrink-0"
/>
<span class="text-[11px] text-amber-800 leading-relaxed">
@ -278,7 +278,7 @@
<label class="flex items-start gap-3 cursor-pointer group">
<input
type="checkbox"
wire:model="waiverConfirmed"
wire:model.live="waiverConfirmed"
class="mt-0.5 rounded border-amber-300 text-amber-500 focus:ring-amber-400 shrink-0"
/>
<span class="text-[11px] text-amber-800 leading-relaxed">
@ -310,7 +310,7 @@
<button
wire:click="startCheckout"
wire:loading.attr="disabled"
@if(!$rightAcknowledged || !$waiverConfirmed) disabled @endif
:disabled="!$wire.rightAcknowledged || !$wire.waiverConfirmed"
class="w-full flex items-center justify-center gap-2 px-5 py-3.5 rounded-xl bg-indigo-600 text-white font-semibold hover:bg-indigo-700 active:scale-95 transition-all shadow-sm shadow-indigo-200 disabled:opacity-60">
<span wire:loading.remove wire:target="startCheckout">
<x-heroicon-o-arrow-path class="w-4 h-4 inline-block mr-1 opacity-70"/>
@ -328,7 +328,7 @@
<button
wire:click="startCheckout"
wire:loading.attr="disabled"
@if(!$rightAcknowledged || !$waiverConfirmed) disabled @endif
:disabled="!$wire.rightAcknowledged || !$wire.waiverConfirmed"
class="w-full flex items-center justify-center gap-2 px-5 py-3.5 rounded-xl bg-indigo-600 text-white font-semibold hover:bg-indigo-700 active:scale-95 transition-all shadow-sm shadow-indigo-200 disabled:opacity-60">
<span wire:loading.remove wire:target="startCheckout">
<x-heroicon-o-lock-closed class="w-4 h-4 inline-block mr-1 opacity-70"/>