major ui updates
This commit is contained in:
@@ -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,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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user