1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-23 09:51:35 +02:00
invoiceninja/resources/views/billing-portal/v3/index.blade.php

34 lines
1.3 KiB
PHP
Raw Normal View History

2024-02-08 19:55:44 +01:00
@extends('portal.ninja2020.layout.clean')
@section('meta_title', ctrans('texts.purchase'))
@section('body')
@livewire('billing-portal.purchase', ['subscription' => $subscription, 'db' => $subscription->company->db, 'hash' => $hash, 'request_data' => $request_data, 'campaign' => request()->query('campaign') ?? null])
@stop
2024-02-19 18:16:27 +01:00
@push('footer')
<script>
document.addEventListener('livewire:init', () => {
Livewire.on('purchase.submit', () => {
setTimeout(() => {
document.getElementById('payment-method-form').submit()
}, 2000);
});
const target = document.getElementById('container');
const observer = new MutationObserver((mutationsList) => {
for (const mutation of mutationsList) {
if (mutation.type === 'childList' || mutation.type === 'subtree') {
setTimeout(() => {
document.getElementById('spinner').classList.add('hidden');
document.getElementById('container').classList.remove('hidden');
}, 1500);
}
}
});
observer.observe(target, { childList: true, subtree: true })
2024-02-19 18:16:27 +01:00
});
</script>
@endpush