@extends('central.super.layout')
@section('title', __('super.tenants.tenant') . ' ' . $tenant->id)
@section('content')
{{ __('super.custom_domains.subtitle') }}
@if($tenant->customDomains->isNotEmpty())
@foreach($tenant->customDomains as $cd)
{{ $cd->domain }}
@if($cd->is_verified)
{{ __('super.custom_domains.status_verified') }}
@else
{{ __('super.custom_domains.status_pending') }}
@endif
@if($cd->is_primary)
{{ __('super.custom_domains.primary_badge') }}
@endif
{{ __('super.custom_domains.ssl_' . $cd->ssl_status) }}
{{ __('super.custom_domains.last_check') }}:
{{ $cd->last_check_at ? $cd->last_check_at->diffForHumans() : __('super.custom_domains.never_checked') }}
@if(!$cd->is_verified && $cd->last_check_error)
{{ $cd->last_check_error }}
@endif
@if(!$cd->is_verified)
@elseif(!$cd->is_primary)
@endif
@endforeach
{{-- DNS instructions accordion --}}
{{ __('super.custom_domains.dns_instructions_title') }}
{{ __('super.custom_domains.dns_intro') }}
@foreach($tenant->customDomains as $cd)
@continue($cd->is_verified)
-
{{ $cd->domain }}
{{ __('super.custom_domains.dns_cname_label') }}:
{{ __('super.custom_domains.dns_cname_value', ['host' => $centralHost]) }}
{{ __('super.custom_domains.dns_a_label') }}:
{{ __('super.custom_domains.dns_a_value', ['host' => $centralHost]) }}
{{ __('super.custom_domains.dns_txt_label') }}:
{{ __('super.custom_domains.dns_txt_value', ['domain' => $cd->domain, 'token' => $cd->verification_token]) }}
@endforeach
{{ __('super.custom_domains.ssl_hint') }}
@endif
{{-- Add form --}}
{{-- Approve & Provision (visible only for PENDING tenants) --}}
@if($tenant->isPending())
@php
$approvePlan = $tenant->subscription?->plan;
$approveIsFreeOrTrial = $approvePlan && ($approvePlan->isFree() || $approvePlan->hasTrial());
$approveHasPaidPayment = $tenant->payments()->where('status', 'paid')->exists();
$approveCanApprove = $approveIsFreeOrTrial || $approveHasPaidPayment;
$approveIsShared = \App\Models\Central\GeneralSetting::instance()->isSharedHosting();
@endphp
@if(! $approveCanApprove)
{{ __('central.PaymentRequiredBeforeApproval') }}
{{ __('central.PaymentRequiredDesc') }}
@else
@endif
@endif
{{-- Admin Actions (only for provisioned tenants) --}}
@if(in_array($tenant->status, ['active', 'suspended', 'cancelled']))
{{-- Re-run Migrations --}}
{{-- Re-seed --}}
{{-- Re-provision (Full Re-install) --}}
{{-- Reset Database (Drop & Migrate) --}}
@endif
{{-- Database Configuration (only for provisioned tenants) --}}
@if(in_array($tenant->status, ['active', 'suspended', 'cancelled']))
@php
$dbCreds = $tenant->getEffectiveDatabaseCredentials();
$isCustomCreds = $tenant->hasDatabaseCredentials();
@endphp
{{-- Credential source indicator --}}
@if($isCustomCreds)
{{ __('central.AdminConfiguredShared') }}
@else
{{ __('central.AutoProvisionedVps') }}
@endif
{{-- Read-only view --}}
-
{{ __('central.DbHost') }}
{{ $dbCreds['host'] }}
-
{{ __('central.DbName') }}
{{ $dbCreds['database'] }}
-
{{ __('central.DbUsername') }}
{{ $dbCreds['username'] }}
-
{{ __('central.DbPassword') }}
{{ $isCustomCreds ? '••••••••' : __('central.FromEnv') }}
-
{{ __('central.DbPort') }}
{{ $dbCreds['port'] }}
{{-- Edit Database Credentials (separate card, toggled from the Database Configuration card) --}}
@if(count($tenantUsers) > 0)
| # |
{{ __('central.UserCol') }} |
{{ __('central.EmailCol') }} |
{{ __('central.Role') }} |
{{ __('central.StatusCol') }} |
{{ __('central.Action') }} |
@foreach($tenantUsers as $tUser)
| {{ $tUser->id }} |
{{ $tUser->firstname }} {{ $tUser->lastname }}
@if((int) $tUser->id === 1)
{{ __('central.Owner') }}
@endif
|
{{ $tUser->email }} |
@php $role = $tUser->roles->first(); @endphp
@if($role)
{{ $role->name }}
@else
—
@endif
|
@if($tUser->statut)
{{ __('central.Active') }}
@else
{{ __('central.Blocked') }}
@endif
|
@if($tUser->statut)
@else
@endif
|
@endforeach
@if($tenantUserCount > 5)
@endif
@else
{{ __('central.NoUsersForTenant') }}
@endif