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
parent
f76ea32076
commit
b8afe0cb70
|
|
@ -155,7 +155,7 @@ class Index extends Component
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
return view('livewire.checkout.index', [
|
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');
|
])->layout('layouts.app');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -268,7 +268,7 @@
|
||||||
<label class="flex items-start gap-3 cursor-pointer group">
|
<label class="flex items-start gap-3 cursor-pointer group">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
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"
|
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">
|
<span class="text-[11px] text-amber-800 leading-relaxed">
|
||||||
|
|
@ -278,7 +278,7 @@
|
||||||
<label class="flex items-start gap-3 cursor-pointer group">
|
<label class="flex items-start gap-3 cursor-pointer group">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
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"
|
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">
|
<span class="text-[11px] text-amber-800 leading-relaxed">
|
||||||
|
|
@ -310,7 +310,7 @@
|
||||||
<button
|
<button
|
||||||
wire:click="startCheckout"
|
wire:click="startCheckout"
|
||||||
wire:loading.attr="disabled"
|
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">
|
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">
|
<span wire:loading.remove wire:target="startCheckout">
|
||||||
<x-heroicon-o-arrow-path class="w-4 h-4 inline-block mr-1 opacity-70"/>
|
<x-heroicon-o-arrow-path class="w-4 h-4 inline-block mr-1 opacity-70"/>
|
||||||
|
|
@ -328,7 +328,7 @@
|
||||||
<button
|
<button
|
||||||
wire:click="startCheckout"
|
wire:click="startCheckout"
|
||||||
wire:loading.attr="disabled"
|
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">
|
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">
|
<span wire:loading.remove wire:target="startCheckout">
|
||||||
<x-heroicon-o-lock-closed class="w-4 h-4 inline-block mr-1 opacity-70"/>
|
<x-heroicon-o-lock-closed class="w-4 h-4 inline-block mr-1 opacity-70"/>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue