M3 Integration fixes
This commit is contained in:
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
+5
-3
@@ -11,6 +11,8 @@ use Modules\Platform\app\Models\PlatformPrice;
|
||||
|
||||
class PlatformPriceController extends Controller
|
||||
{
|
||||
private const MIN_ZERO = self::MIN_ZERO;
|
||||
|
||||
/**
|
||||
* Display the customer-facing platform pricing cards.
|
||||
*/
|
||||
@@ -101,12 +103,12 @@ class PlatformPriceController extends Controller
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'strapline' => ['nullable', 'string', 'max:255'],
|
||||
'description' => ['nullable', 'string', 'max:2000'],
|
||||
'monthly_amount' => ['required', 'numeric', 'min:0', 'max:999999.99'],
|
||||
'annual_amount' => ['nullable', 'numeric', 'min:0', 'max:999999.99'],
|
||||
'monthly_amount' => ['required', 'numeric', self::MIN_ZERO, 'max:999999.99'],
|
||||
'annual_amount' => ['nullable', 'numeric', self::MIN_ZERO, 'max:999999.99'],
|
||||
'currency' => ['required', 'string', 'size:3'],
|
||||
'badge_label' => ['nullable', 'string', 'max:60'],
|
||||
'features' => ['nullable', 'string', 'max:4000'],
|
||||
'sort_order' => ['required', 'integer', 'min:0', 'max:65535'],
|
||||
'sort_order' => ['required', 'integer', self::MIN_ZERO, 'max:65535'],
|
||||
'is_featured' => ['nullable', 'boolean'],
|
||||
'is_active' => ['nullable', 'boolean'],
|
||||
]);
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
+1
@@ -64,6 +64,7 @@
|
||||
<h2 class="text-lg font-semibold text-slate-950 dark:text-white">Recent companies</h2>
|
||||
<div class="mt-4 overflow-hidden rounded-xl border border-slate-200 dark:border-slate-800">
|
||||
<table class="min-w-full divide-y divide-slate-200 text-sm dark:divide-slate-800">
|
||||
<caption class="sr-only">Data table</caption>
|
||||
<thead
|
||||
class="bg-slate-50 text-left text-xs uppercase tracking-wide text-slate-500 dark:bg-slate-900 dark:text-slate-400">
|
||||
<tr>
|
||||
|
||||
Regular → Executable
+9
-6
@@ -11,20 +11,22 @@
|
||||
<h2 class="text-lg font-bold text-zinc-900 dark:text-white">Issue licence key</h2>
|
||||
<form method="POST" action="{{ route('platform.licenses.store') }}" class="mt-5 grid gap-4 md:grid-cols-5">
|
||||
@csrf
|
||||
<select name="company_id" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
|
||||
<select aria-label="Company Id" name="company_id" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
|
||||
@foreach ($companies as $company)
|
||||
<option value="{{ $company->id }}">{{ $company->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<input name="label" placeholder="Licence label"
|
||||
class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950" required>
|
||||
<select name="plan" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
|
||||
<label for="sonar-input-959b26bb51" class="visually-hidden">Licence label</label>
|
||||
<input name="label" placeholder="Licence label"
|
||||
class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950" required id="sonar-input-959b26bb51">
|
||||
<select aria-label="Plan" name="plan" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
|
||||
<option>standard</option>
|
||||
<option>professional</option>
|
||||
<option>enterprise</option>
|
||||
</select>
|
||||
<input name="max_users" type="number" value="10"
|
||||
class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950" required>
|
||||
<label for="sonar-input-d9d34872cd" class="visually-hidden">max users</label>
|
||||
<input name="max_users" type="number" value="10"
|
||||
class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950" required id="sonar-input-d9d34872cd">
|
||||
<button
|
||||
class="rounded-xl bg-zinc-900 px-4 py-2 font-semibold text-white dark:bg-white dark:text-zinc-900">Issue</button>
|
||||
</form>
|
||||
@@ -32,6 +34,7 @@
|
||||
<div
|
||||
class="overflow-x-auto rounded-2xl bg-white shadow-sm ring-1 ring-zinc-200 dark:bg-zinc-900 dark:ring-zinc-800">
|
||||
<table class="min-w-full text-sm">
|
||||
<caption class="sr-only">Data table</caption>
|
||||
<thead>
|
||||
<tr class="border-b">
|
||||
<th class="p-4 text-left">Company</th>
|
||||
|
||||
Regular → Executable
Regular → Executable
+12
-8
@@ -7,24 +7,27 @@
|
||||
<h2 class="text-lg font-bold text-zinc-900 dark:text-white">Add payment or override</h2>
|
||||
<form method="POST" action="{{ route('platform.payments.store') }}" class="mt-5 grid gap-4 md:grid-cols-6">
|
||||
@csrf
|
||||
<select name="company_id" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
|
||||
<select aria-label="Company Id" name="company_id" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
|
||||
@foreach ($companies as $company)
|
||||
<option value="{{ $company->id }}">{{ $company->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<input name="amount" type="number" value="0"
|
||||
class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950" required>
|
||||
<input name="currency" value="gbp"
|
||||
class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950" required>
|
||||
<select name="status" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
|
||||
<label for="sonar-input-654d959f2a" class="visually-hidden">amount</label>
|
||||
<input name="amount" type="number" value="0"
|
||||
class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950" required id="sonar-input-654d959f2a">
|
||||
<label for="sonar-input-e17e77c7c9" class="visually-hidden">currency</label>
|
||||
<input name="currency" value="gbp"
|
||||
class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950" required id="sonar-input-e17e77c7c9">
|
||||
<select aria-label="Status" name="status" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
|
||||
<option>paid</option>
|
||||
<option>pending</option>
|
||||
<option>failed</option>
|
||||
<option>refunded</option>
|
||||
<option>override</option>
|
||||
</select>
|
||||
<input name="description" placeholder="Description"
|
||||
class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
|
||||
<label for="sonar-input-0a3d32bbe3" class="visually-hidden">Description</label>
|
||||
<input name="description" placeholder="Description"
|
||||
class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950" id="sonar-input-0a3d32bbe3">
|
||||
<button
|
||||
class="rounded-xl bg-zinc-900 px-4 py-2 font-semibold text-white dark:bg-white dark:text-zinc-900">Add</button>
|
||||
</form>
|
||||
@@ -32,6 +35,7 @@
|
||||
<div
|
||||
class="overflow-x-auto rounded-2xl bg-white shadow-sm ring-1 ring-zinc-200 dark:bg-zinc-900 dark:ring-zinc-800">
|
||||
<table class="min-w-full text-sm">
|
||||
<caption class="sr-only">Data table</caption>
|
||||
<thead>
|
||||
<tr class="border-b">
|
||||
<th class="p-4 text-left">Company</th>
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
+1
-1
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Modules\Company\Http\Controllers\CompanyController;
|
||||
use Modules\Platform\app\Http\Controllers\LicenseKeyController;
|
||||
use Modules\Platform\app\Http\Controllers\PaymentController;
|
||||
use Modules\Platform\app\Http\Controllers\PlatformDashboardController;
|
||||
use Modules\Platform\app\Http\Controllers\PlatformPriceController;
|
||||
use Modules\Platform\app\Http\Controllers\StripeWebhookController;
|
||||
use Modules\Company\Http\Controllers\CompanyController;
|
||||
|
||||
Route::middleware(['auth', 'verified', 'tenant.assigned'])
|
||||
->prefix('platform')
|
||||
|
||||
Regular → Executable
Regular → Executable
Reference in New Issue
Block a user