@extends('layouts.app') @section('title', __('superadmin::lang.superadmin') . ' | Business') @section('content') @include('superadmin::layouts.nav') @php $tenantDatabase = \App\TenantDatabase::where('business_id', $business->id)->first(); $b2bPortalSetting = class_exists(\Modules\B2BPortal\Entities\B2BPortalSetting::class) ? \Modules\B2BPortal\Entities\B2BPortalSetting::where('business_id', $business->id)->first() : null; @endphp

@lang( 'superadmin::lang.view_business' ) {{$business->name}}

{{ $business->name }}

@lang('business.business_name')

{{ $business->name }}

@lang('business.currency')

{{ $business->currency->currency }}

@lang('business.tax_number1')

@if(!empty($business->tax_number_1)) {{ $business->tax_label_1 }}: {{ $business->tax_number_1 }} @endif

@lang('business.tax_number2')

@if(!empty($business->tax_number_2)) {{ $business->tax_label_2 }}: {{ $business->tax_number_2 }} @endif

@lang('business.time_zone')

{{ $business->time_zone }}

@lang('business.is_active') @if($business->is_active == 0)

Inactive

@else

Active

@endif @lang('business.created_by') @if(!empty($created_by))

{{$created_by->surname}} {{$created_by->first_name}} {{$created_by->last_name}}

@endif
@lang('business.owner') @if(!empty($business->owner))

{{$business->owner->surname}} {{$business->owner->first_name}} {{$business->owner->last_name}}

@endif @lang('business.email')

{{$business->owner->email}}

@lang('business.mobile')

{{$business->owner->contact_no}}

@lang('business.address')

{{$business->owner->address}}

@if(!empty($business->logo)) Business Logo @endif
@if(!empty($b2bPortalSetting) && !empty($b2bPortalSetting->custom_domain))

B2B Storefront Custom Domain

Domain

{{ $b2bPortalSetting->custom_domain }}

Customer should point CNAME/A record to this POS server before verification.

Current Status

{{ ucfirst($b2bPortalSetting->domain_status ?: 'pending') }}

{!! Form::open(['route' => ['superadmin.b2b_domain.status', $b2bPortalSetting->id], 'method' => 'post']) !!}
{!! Form::select('domain_status', ['pending' => 'Pending', 'verified' => 'Verified', 'disabled' => 'Disabled'], $b2bPortalSetting->domain_status ?: 'pending', ['class' => 'form-control']) !!}
{!! Form::close() !!}
@endif

Tenant Database

@if(!empty(optional($tenantDatabase)->last_error)) @endif
Database Name {{ optional($tenantDatabase)->database_name ?? 'Not created yet' }}
Status @if(!empty($tenantDatabase)) {{ ucfirst($tenantDatabase->status) }} @else Pending @endif
Created At {{ optional(optional($tenantDatabase)->created_database_at)->format('d M Y, h:i A') ?? '-' }}
Migrated At {{ optional(optional($tenantDatabase)->migrated_at)->format('d M Y, h:i A') ?? '-' }}
Last Backup {{ optional(optional($tenantDatabase)->last_backup_at)->format('d M Y, h:i A') ?? '-' }}
Last Error {{ $tenantDatabase->last_error }}
{!! Form::open(['route' => ['superadmin.business.tenant_database.create', $business->id], 'method' => 'post']) !!} {!! Form::close() !!} {!! Form::open(['route' => ['superadmin.business.tenant_database.provision', $business->id], 'method' => 'post', 'style' => 'margin-top: 10px;']) !!} {!! Form::close() !!}
Phase 1: Users/login remain in the central master database. Tenant DB is prepared for business data separation.

php artisan tenant:provision {{ $business->id }}, CLI: php artisan tenant:create-db {{ $business->id }}, php artisan tenant:status {{ $business->id }}, php artisan tenant:backup {{ $business->id }}

Domain / Subdomain Setup

{!! Form::open(['route' => ['superadmin.business.domain_settings', $business->id], 'method' => 'post']) !!}
{!! Form::label('subdomain', 'Subdomain slug:') !!} {!! Form::text('subdomain', $business->subdomain ?? null, ['class' => 'form-control', 'placeholder' => 'example: rajkotstore']) !!}

Use with wildcard DNS, for example rajkotstore.your-pos-domain.com.

{!! Form::label('custom_domain', 'Custom domain:') !!} {!! Form::text('custom_domain', $business->custom_domain ?? null, ['class' => 'form-control', 'placeholder' => 'pos.customerstore.com']) !!}

Customer should point A/CNAME DNS to this POS server.

{!! Form::label('domain_status', 'Status:') !!} {!! Form::select('domain_status', ['pending' => 'Pending', 'verified' => 'Verified', 'disabled' => 'Disabled'], $business->domain_status ?? 'pending', ['class' => 'form-control']) !!}
DNS setup: For custom domains, add a CNAME to your main POS domain or an A record to this server IP. For subdomains, configure wildcard DNS *.your-pos-domain.com to this server.
{!! Form::close() !!}

@lang( 'superadmin::lang.business_location' )

@foreach($business->locations as $location) @endforeach
Name Location ID Landmark city Zip Code State Country
{{ $location->name }} {{ $location->location_id }} {{ $location->landmark }} {{ $location->city }} {{ $location->zip_code }} {{ $location->state }} {{ $location->country }}

@lang( 'superadmin::lang.package_subscription' )

@foreach($business->subscriptions as $subscription) @endforeach
Package Name Start Date Trail End Date End Date Paid Via Payment Transaction ID Created At Created By
{{ $subscription->package_details['name'] }} @if(!empty($subscription->start_date)){{@format_date($subscription->start_date)}}@endif @if(!empty($subscription->trial_end_date)){{@format_date($subscription->trial_end_date)}}@endif @if(!empty($subscription->end_date)){{@format_date($subscription->end_date)}}@endif {{ $subscription->paid_via }} {{ $subscription->payment_transaction_id }} {{ $subscription->created_at }} @if(!empty($subscription->created_user)) {{$subscription->created_user->user_full_name}} @endif
@component('components.widget', ['class' => 'box-default', 'title' => __( 'user.all_users' )]) @can('user.view')
@lang( 'business.username' ) @lang( 'user.name' ) @lang( 'user.role' ) @lang( 'business.email' ) @lang( 'messages.action' )
@endcan @endcomponent @include('superadmin::business.update_password_modal')
@stop @section('javascript') @endsection