major ui updates

This commit is contained in:
Mark Gregory
2026-06-12 15:11:51 +01:00
parent 3c9b39d83b
commit 7bc8f20ed5
154 changed files with 3796 additions and 4117 deletions
@@ -2,7 +2,6 @@
namespace Modules\Platform\Providers;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\ServiceProvider;
use Modules\Platform\app\Http\Middleware\EnsureLicensedTenant;
@@ -16,7 +15,7 @@ class PlatformServiceProvider extends ServiceProvider
*/
public function register(): void
{
$this->mergeConfigFrom(__DIR__ . '/../config/platform.php', 'platform');
$this->mergeConfigFrom(__DIR__.'/../config/platform.php', 'platform');
}
/**
@@ -24,10 +23,10 @@ class PlatformServiceProvider extends ServiceProvider
*/
public function boot(): void
{
$this->loadViewsFrom(__DIR__ . '/../resources/views', 'platform');
$this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
$this->loadViewsFrom(__DIR__.'/../resources/views', 'platform');
$this->loadMigrationsFrom(__DIR__.'/../database/migrations');
Route::middleware('web')->group(__DIR__ . '/../routes/web.php');
Route::middleware('web')->group(__DIR__.'/../routes/web.php');
app('router')->aliasMiddleware('tenant.assigned', EnsureTenantAssigned::class);
app('router')->aliasMiddleware('tenant.licensed', EnsureLicensedTenant::class);
@@ -72,7 +72,7 @@ class PlatformDashboardController extends Controller
/**
* Build the company usage chart series.
*
* @param Collection<int, Company> $companies
* @param Collection<int, Company> $companies
* @return array<int, array{label: string, data: array<int, int>}>
*/
private function companyUsageChartSeries(Collection $companies): array
@@ -11,7 +11,6 @@ use Modules\Platform\app\Models\PlatformPrice;
class PlatformPriceController extends Controller
{
/**
* Display the customer-facing platform pricing cards.
*/
@@ -98,7 +97,7 @@ class PlatformPriceController extends Controller
private function validatedPriceData(Request $request, ?PlatformPrice $price = null): array
{
$data = $request->validate([
'code' => ['nullable', 'string', 'max:40', 'unique:platform_prices,code,' . ($price?->id ?? 'NULL')],
'code' => ['nullable', 'string', 'max:40', 'unique:platform_prices,code,'.($price?->id ?? 'NULL')],
'name' => ['required', 'string', 'max:255'],
'strapline' => ['nullable', 'string', 'max:255'],
'description' => ['nullable', 'string', 'max:2000'],
+2 -1
View File
@@ -2,6 +2,7 @@
namespace Modules\Platform\app\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
@@ -35,7 +36,7 @@ class Company extends Model
public function users(): HasMany
{
return $this->hasMany(\App\Models\User::class);
return $this->hasMany(User::class);
}
public function licenseKeys(): HasMany
+1 -1
View File
@@ -28,7 +28,7 @@ class LicenseKey extends Model
public static function issueFor(Company $company, string $label, string $plan = 'standard', int $maxUsers = 10): string
{
$plainKey = 'WMS-' . Str::upper(Str::random(32));
$plainKey = 'WMS-'.Str::upper(Str::random(32));
self::create([
'company_id' => $company->id,
@@ -48,7 +48,7 @@ class PlatformPrice extends Model
'gbp' => '£',
'eur' => '€',
'usd' => '$',
default => strtoupper($this->currency) . ' ',
default => strtoupper($this->currency).' ',
};
}
@@ -61,7 +61,7 @@ class PlatformPrice extends Model
return '—';
}
return $this->currencySymbol() . number_format($amount / 100, 2);
return $this->currencySymbol().number_format($amount / 100, 2);
}
/**
@@ -2,7 +2,6 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
-1
View File
@@ -8,7 +8,6 @@ use Modules\Platform\app\Http\Controllers\PlatformDashboardController;
use Modules\Platform\app\Http\Controllers\PlatformPriceController;
use Modules\Platform\app\Http\Controllers\StripeWebhookController;
Route::middleware(['auth', 'verified', 'tenant.assigned'])
->prefix('platform')
->name('platform.')