mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for subscription switching
This commit is contained in:
parent
97e7f55bc0
commit
0d9b40dcb6
@ -54,6 +54,6 @@ class SubscriptionPlanSwitchController extends Controller
|
|||||||
|
|
||||||
public function not_availabe()
|
public function not_availabe()
|
||||||
{
|
{
|
||||||
abort(404, 'ewwo');
|
abort(404, 'Not Available');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,6 @@ class SubscriptionPlanSwitch extends Component
|
|||||||
|
|
||||||
$this->dispatch('redirectRoute', ['route' => $response]);
|
$this->dispatch('redirectRoute', ['route' => $response]);
|
||||||
|
|
||||||
// return redirect($response);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function render()
|
public function render()
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
@if(!$state['payment_initialised'])
|
@if(!$state['payment_initialised'])
|
||||||
@foreach($this->methods as $method)
|
@foreach($this->methods as $method)
|
||||||
<button
|
<button
|
||||||
wire:click="handleMethodSelectingEvent('{{ $method['company_gateway_id'] }}', '{{ $method['gateway_type_id'] }}')"
|
wire:click="handleMethodSelectingEvent('{{ $method['company_gateway_id'] }}', '{{ $method['gateway_type_id'] }}'); $wire.$refresh();"
|
||||||
class="px-3 py-2 border bg-white rounded mr-4 hover:border-blue-600">
|
class="px-3 py-2 border bg-white rounded mr-4 hover:border-blue-600">
|
||||||
{{ $method['label'] }}
|
{{ $method['label'] }}
|
||||||
</button>
|
</button>
|
||||||
@ -80,11 +80,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script defer>
|
<script>
|
||||||
window.addEventListener('redirectRoute', event => {
|
|
||||||
|
|
||||||
window.location.href = event.detail.route;
|
document.addEventListener('livewire:init', () => {
|
||||||
|
|
||||||
|
Livewire.on('redirectRoute', (event) => {
|
||||||
|
window.location.href = event[0].route;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</div>
|
</div>
|
Loading…
x
Reference in New Issue
Block a user