mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 18:54:30 -04:00
Add Cart component and cart view for billing portal
This commit is contained in:
parent
488733651f
commit
1b92542d55
34
app/Livewire/BillingPortal/Cart/Cart.php
Normal file
34
app/Livewire/BillingPortal/Cart/Cart.php
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
|
*
|
||||||
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com)
|
||||||
|
*
|
||||||
|
* @license https://www.elastic.co/licensing/elastic-license
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Livewire\BillingPortal\Cart;
|
||||||
|
|
||||||
|
use App\Libraries\MultiDB;
|
||||||
|
use App\Models\Subscription;
|
||||||
|
use Livewire\Component;
|
||||||
|
|
||||||
|
class Cart extends Component
|
||||||
|
{
|
||||||
|
public Subscription $subscription;
|
||||||
|
|
||||||
|
public array $context;
|
||||||
|
|
||||||
|
public function handleSubmit()
|
||||||
|
{
|
||||||
|
$this->dispatch('purchase.next');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render()
|
||||||
|
{
|
||||||
|
return view('billing-portal.v3.cart.cart');
|
||||||
|
}
|
||||||
|
}
|
32
resources/views/billing-portal/v3/cart/cart.blade.php
Normal file
32
resources/views/billing-portal/v3/cart/cart.blade.php
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<div>
|
||||||
|
<livewire:billing-portal.cart.recurring-products
|
||||||
|
:subscription="$subscription"
|
||||||
|
:context="$context"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<livewire:billing-portal.cart.one-time-products
|
||||||
|
:subscription="$subscription"
|
||||||
|
:context="$context"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<livewire:billing-portal.cart.optional-recurring-products
|
||||||
|
:subscription="$subscription"
|
||||||
|
:context="$context"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<livewire:billing-portal.cart.optional-one-time-products
|
||||||
|
:subscription="$subscription"
|
||||||
|
:context="$context"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div class="mt-3">
|
||||||
|
<form wire:submit="handleSubmit">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="button button-block bg-primary text-white mt-4"
|
||||||
|
>
|
||||||
|
{{ ctrans('texts.next') }}
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
Loading…
x
Reference in New Issue
Block a user