mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for ninja plan selector
This commit is contained in:
parent
af8f559466
commit
84c4c5b527
@ -35,7 +35,7 @@ class NinjaPlanController extends Controller
|
|||||||
|
|
||||||
$account = $company->account;
|
$account = $company->account;
|
||||||
|
|
||||||
if (Ninja::isHosted() && MultiDB::findAndSetDbByContactKey($contact_key) && $client_contact = ClientContact::where('contact_key', $contact_key)->first())
|
if (MultiDB::findAndSetDbByContactKey($contact_key) && $client_contact = ClientContact::where('contact_key', $contact_key)->first())
|
||||||
{
|
{
|
||||||
|
|
||||||
nlog("Ninja Plan Controller - Found and set Client Contact");
|
nlog("Ninja Plan Controller - Found and set Client Contact");
|
||||||
|
@ -15,7 +15,7 @@ input:checked ~ .dot {
|
|||||||
background-color: #48bb78;
|
background-color: #48bb78;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="container flex flex-wrap pt-4 pb-10 m-auto mt-6 md:mt-15 lg:px-12 xl:px-16" x-data="{show: true}">
|
<div class="container flex flex-wrap pt-4 pb-10 m-auto mt-6 md:mt-15 lg:px-16 xl:px-16" x-data="{show: true}">
|
||||||
<div class="w-full px-0 lg:px-4">
|
<div class="w-full px-0 lg:px-4">
|
||||||
<h2 class="px-12 text-base font-bold text-center md:text-2xl text-blue-700">
|
<h2 class="px-12 text-base font-bold text-center md:text-2xl text-blue-700">
|
||||||
Choose your plan
|
Choose your plan
|
||||||
@ -61,10 +61,22 @@ input:checked ~ .dot {
|
|||||||
<p class="text-xs text-center uppercase text-white">
|
<p class="text-xs text-center uppercase text-white">
|
||||||
monthly
|
monthly
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<div class="py-2 text-sm my-3 text-white">Unlimited clients, invoices, quotes</div>
|
||||||
|
<hr>
|
||||||
|
<div class="py-2 text-sm my-3 text-white">10 professional invoice & quote template designs</div>
|
||||||
|
<hr>
|
||||||
|
<div class="py-2 text-sm my-3 text-white">Remove "Created by Invoice Ninja" from invoices</div>
|
||||||
|
<hr>
|
||||||
|
<div class="py-2 text-sm my-3 text-white">Enable emails to be sent via Gmail</div>
|
||||||
|
<hr>
|
||||||
|
<div class="py-2 text-sm my-3 text-white">+ Much more!</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-col items-center justify-center w-full h-full py-6 rounded-b-lg bg-blue-700">
|
<div class="flex flex-col items-center justify-center w-full h-full py-6 rounded-b-lg bg-blue-700">
|
||||||
<p class="text-xl text-white">
|
<p class="text-xl text-white">
|
||||||
Sign up!
|
Single User
|
||||||
</p>
|
</p>
|
||||||
<a type="button" class="w-5/6 py-2 mt-2 font-semibold text-center uppercase bg-white border border-transparent rounded text-blue-500" href="https://invoiceninja.invoicing.co/client/subscriptions/WJxbojagwO/purchase">
|
<a type="button" class="w-5/6 py-2 mt-2 font-semibold text-center uppercase bg-white border border-transparent rounded text-blue-500" href="https://invoiceninja.invoicing.co/client/subscriptions/WJxbojagwO/purchase">
|
||||||
Purchase
|
Purchase
|
||||||
@ -78,33 +90,44 @@ input:checked ~ .dot {
|
|||||||
<label class="flex flex-col rounded-lg shadow-lg relative cursor-pointer hover:shadow-2xl">
|
<label class="flex flex-col rounded-lg shadow-lg relative cursor-pointer hover:shadow-2xl">
|
||||||
<div class="w-full px-4 py-8 rounded-t-lg bg-blue-500">
|
<div class="w-full px-4 py-8 rounded-t-lg bg-blue-500">
|
||||||
<h3 class="mx-auto text-base font-semibold text-center underline text-white group-hover:text-white">
|
<h3 class="mx-auto text-base font-semibold text-center underline text-white group-hover:text-white">
|
||||||
Enterprise (1-2 Users)
|
Enterprise Plan
|
||||||
</h3>
|
</h3>
|
||||||
<p class="text-5xl font-bold text-center text-white">
|
<p class="text-5xl font-bold text-center text-white" id="m_plan_price">
|
||||||
$14
|
$14
|
||||||
</p>
|
</p>
|
||||||
<p class="text-xs text-center uppercase text-white">
|
<p class="text-xs text-center uppercase text-white">
|
||||||
monthly
|
monthly
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<div class="py-2 text-sm my-3 text-white">Multi users and advanced permissions per user</div>
|
||||||
|
<hr>
|
||||||
|
<div class="py-2 text-sm my-3 text-white">Attach files to emails & client side portal!</div>
|
||||||
|
<hr>
|
||||||
|
<div class="py-2 text-sm my-3 text-white">Branded client portal: "https://Billing.YourCompany.com"</div>
|
||||||
|
<hr>
|
||||||
|
<div class="py-2 text-sm my-3 text-white">Custom background to invoices & quotes</div>
|
||||||
|
<hr>
|
||||||
|
<div class="py-2 text-sm my-3 text-white">+ Much more!</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col items-center justify-center w-full h-full py-6 rounded-b-lg bg-blue-700">
|
<div class="flex flex-col items-center justify-center w-full h-full py-6 rounded-b-lg bg-blue-700">
|
||||||
<p class="text-xl text-white">
|
<p class="text-xl text-white">
|
||||||
Sign up!
|
<select id="users_monthly" class="bg-white text-black appearance-none border-none inline-block py-0 pl-3 pr-2 rounded leading-tight w-full">
|
||||||
|
<option value="7LDdwRb1YK" selected>1-2 Users</option>
|
||||||
|
<option value="MVyb8mdvAZ">3-5 Users</option>
|
||||||
|
<option value="WpmbkR5azJ">6-10 Users</option>
|
||||||
|
<option value="k8mepY2aMy">11-20 Users</option>
|
||||||
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<a type="button" class="w-5/6 py-2 mt-2 font-semibold text-center uppercase bg-white border border-transparent rounded text-blue-500" href="https://invoiceninja.invoicing.co/client/subscriptions/7LDdwRb1YK/purchase">
|
<button id="handleMonthlyClick" class="w-5/6 py-2 mt-2 font-semibold text-center uppercase bg-white border border-transparent rounded text-blue-500">
|
||||||
Purchase
|
Purchase
|
||||||
</a>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Annual Plans -->
|
<!-- Annual Plans -->
|
||||||
<div class="flex flex-wrap items-center justify-center py-4 pt-0" x-show=" !show ">
|
<div class="flex flex-wrap items-center justify-center py-4 pt-0" x-show=" !show ">
|
||||||
<div class="w-full p-4 md:w-1/2 lg:w-1/2">
|
<div class="w-full p-4 md:w-1/2 lg:w-1/2">
|
||||||
@ -119,6 +142,17 @@ input:checked ~ .dot {
|
|||||||
<p class="text-xs text-center uppercase text-white">
|
<p class="text-xs text-center uppercase text-white">
|
||||||
yearly
|
yearly
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<div class="py-2 text-sm my-3 text-white">Unlimited clients, invoices, quotes</div>
|
||||||
|
<hr>
|
||||||
|
<div class="py-2 text-sm my-3 text-white">10 professional invoice & quote template designs</div>
|
||||||
|
<hr>
|
||||||
|
<div class="py-2 text-sm my-3 text-white">Remove "Created by Invoice Ninja" from invoices</div>
|
||||||
|
<hr>
|
||||||
|
<div class="py-2 text-sm my-3 text-white">Enable emails to be sent via Gmail</div>
|
||||||
|
<hr>
|
||||||
|
<div class="py-2 text-sm my-3 text-white">+ Much more!</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="flex flex-col items-center justify-center w-full h-full py-6 rounded-b-lg bg-blue-700"
|
class="flex flex-col items-center justify-center w-full h-full py-6 rounded-b-lg bg-blue-700"
|
||||||
@ -137,24 +171,40 @@ input:checked ~ .dot {
|
|||||||
<label class="flex flex-col rounded-lg shadow-lg relative cursor-pointer hover:shadow-2xl">
|
<label class="flex flex-col rounded-lg shadow-lg relative cursor-pointer hover:shadow-2xl">
|
||||||
<div class="w-full px-4 py-8 rounded-t-lg bg-blue-500">
|
<div class="w-full px-4 py-8 rounded-t-lg bg-blue-500">
|
||||||
<h3 class="mx-auto text-base font-semibold text-center underline text-white group-hover:text-white">
|
<h3 class="mx-auto text-base font-semibold text-center underline text-white group-hover:text-white">
|
||||||
Enterprise (1-2 Users)
|
Enterprise Plan
|
||||||
</h3>
|
</h3>
|
||||||
<p class="text-5xl font-bold text-center text-white">
|
<p class="text-5xl font-bold text-center text-white" id="y_plan_price">
|
||||||
$140
|
$140
|
||||||
</p>
|
</p>
|
||||||
<p class="text-xs text-center uppercase text-white">
|
<p class="text-xs text-center uppercase text-white">
|
||||||
yearly
|
yearly
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<div class="py-2 text-sm my-3 text-white">Multi users and advanced permissions per user</div>
|
||||||
|
<hr>
|
||||||
|
<div class="py-2 text-sm my-3 text-white">Attach files to emails & client side portal!</div>
|
||||||
|
<hr>
|
||||||
|
<div class="py-2 text-sm my-3 text-white">Branded client portal: "https://Billing.YourCompany.com"</div>
|
||||||
|
<hr>
|
||||||
|
<div class="py-2 text-sm my-3 text-white">Custom background to invoices & quotes</div>
|
||||||
|
<hr>
|
||||||
|
<div class="py-2 text-sm my-3 text-white">+ Much more!</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="flex flex-col items-center justify-center w-full h-full py-6 rounded-b-lg bg-blue-700"
|
class="flex flex-col items-center justify-center w-full h-full py-6 rounded-b-lg bg-blue-700"
|
||||||
>
|
>
|
||||||
<p class="text-xl text-white">
|
<p class="text-xl text-white">
|
||||||
Buy 10 months get 2 free!
|
<select id="users_yearly" class="bg-white text-black appearance-none border-none inline-block py-0 pl-3 pr-2 rounded leading-tight w-full">
|
||||||
|
<option value="LYqaQWldnj" selected>1-2 Users</option>
|
||||||
|
<option value="kQBeX6mbyK">3-5 Users</option>
|
||||||
|
<option value="GELe32Qd69">6-10 Users</option>
|
||||||
|
<option value="MVyb86oevA">11-20 Users</option>
|
||||||
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<a type="button" class="w-5/6 py-2 mt-2 font-semibold text-center uppercase bg-white border border-transparent rounded text-blue-500" href="https://invoiceninja.invoicing.co/client/subscriptions/LYqaQWldnj/purchase">
|
<button id="handleYearlyClick" class="w-5/6 py-2 mt-2 font-semibold text-center uppercase bg-white border border-transparent rounded text-blue-500" >
|
||||||
Purchase
|
Purchase
|
||||||
</a>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@ -167,5 +217,42 @@ input:checked ~ .dot {
|
|||||||
|
|
||||||
@push('footer')
|
@push('footer')
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
var users_yearly = 'LYqaQWldnj';
|
||||||
|
var users_monthly = '7LDdwRb1YK';
|
||||||
|
|
||||||
|
document.getElementById('users_yearly').addEventListener('change', function() {
|
||||||
|
users_yearly = this.value;
|
||||||
|
document.getElementById('y_plan_price').innerHTML = price_map.get(this.value);
|
||||||
|
});
|
||||||
|
|
||||||
|
document.getElementById('users_monthly').addEventListener('change', function() {
|
||||||
|
users_monthly = this.value;
|
||||||
|
document.getElementById('m_plan_price').innerHTML = price_map.get(this.value);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
document.getElementById('handleYearlyClick').addEventListener('click', function() {
|
||||||
|
location.href = 'https://invoiceninja.invoicing.co/client/subscriptions/' + users_yearly + '/purchase';
|
||||||
|
});
|
||||||
|
|
||||||
|
document.getElementById('handleMonthlyClick').addEventListener('click', function() {
|
||||||
|
location.href = 'https://invoiceninja.invoicing.co/client/subscriptions/' + users_monthly + '/purchase';
|
||||||
|
});
|
||||||
|
|
||||||
|
const price_map = new Map();
|
||||||
|
//monthly
|
||||||
|
price_map.set('7LDdwRb1YK', '$14');
|
||||||
|
price_map.set('MVyb8mdvAZ', '$26');
|
||||||
|
price_map.set('WpmbkR5azJ', '$36');
|
||||||
|
price_map.set('k8mepY2aMy', '$44');
|
||||||
|
//yearly
|
||||||
|
price_map.set('LYqaQWldnj', '$140');
|
||||||
|
price_map.set('kQBeX6mbyK', '$260');
|
||||||
|
price_map.set('GELe32Qd69', '$360');
|
||||||
|
price_map.set('MVyb86oevA', '$440');
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
@endpush
|
@endpush
|
||||||
|
Loading…
x
Reference in New Issue
Block a user