@extends('admin.layouts.master') @section('breadcrumb')

Store

@stop @section('content')
{{ ucfirst($store->name) }} @if(!$store->is_deleted) Active @else Inactive @endif
View Logs View Configured Data Events @if(env('APP_ENV') == 'local') @endif
@php $total_processed_jobs= $store->processed_jobs()->count(); @endphp @php $active_trial = \App\Entities\PlansHistory::where('shop_id', $store->shop_id) ->where('charge_status', 'ACTIVE') ->where('charge_type', 'recurring') ->where('is_trial', true) ->whereNotNull('trial_ends_at') ->latest('created_at') ->first(); @endphp @if($active_trial) @endif
Shop Name
{{ $store->name }}
Total Registered Events
{{ $store->registeredEventsAndChannels ->count() }}
Active Events
{{ $store->registeredEventsAndChannels->where('status',1)->count() }}
User Plan
{{ ucfirst($store->current_plan_type ?? "N/A") }} @php $active_trial = \App\Entities\PlansHistory::where('shop_id', $store->shop_id) ->where('charge_status', 'ACTIVE') ->where('charge_type', 'recurring') ->where('is_trial', true) ->whereNotNull('trial_ends_at') ->latest('created_at') ->first(); @endphp @if($active_trial) @php $trialEndsAt = \Carbon\Carbon::parse($active_trial->trial_ends_at); $isTrialActive = $trialEndsAt->isFuture(); @endphp @if($isTrialActive)
On Trial @else
Trial Ended @endif @endif
First Installation DateTime
{{ $store->created_at }}
Address
{{ $store->address}}
Shop Owner
{{ $store->shop_owner }}
Total Registered Channels
{{ $store->registeredEventsAndChannels ->groupBy('channel_id') ->count() }}
Active Channels
{{ $store->registeredEventsAndChannels ->where('status',1) ->groupBy('channel_id') ->count() }}
Unlimited allowed quota by Admin
{{ $store->allowed_unlimited_plan?"Yes":"No" }}
Last Opened
{{ ($store->last_opened) }}
Province
{{ $store->province}}
MyShopify Domain
{{ $store->myshopify_domain }}
Total Processed Jobs
{{ $total_processed_jobs }}
Remaining Jobs
{{ (allowed_webhooks_tasks($store->current_plan_type, $store))-$total_processed_jobs }}
Usage Based Charge API Tries
{{ $store->usage_based_charge_api_tries }}
Uninstalled At
@if($store->uninstalled_at) {{ $store->uninstalled_at }} @endif
Language
{{ ($store->primary_locale) }}
Domain
{{ $store->domain }}
Trial Status
@if($active_trial) @php $trialEndsAt = \Carbon\Carbon::parse($active_trial->trial_ends_at); $isTrialActive = $trialEndsAt->isFuture(); @endphp @if($isTrialActive) Active Trial @else Trial Ended @endif @else No Trial @endif
Trial Started
@if($active_trial) {{ $active_trial->created_at->format('M j, Y g:i A') }} @else N/A @endif
Shopify Plan Name
{{ $store->shopify_plan_name }}
Shop Timezone
{{ $store->timezone }}
Trial Ends At
{{ \Carbon\Carbon::parse($active_trial->trial_ends_at)->format('M j, Y g:i A') }}
Trial Days
{{ $active_trial->trial_days ?? 'N/A' }} days
Time Remaining
@php $trialEndsAt = \Carbon\Carbon::parse($active_trial->trial_ends_at); $now = \Carbon\Carbon::now(); $daysRemaining = $now->diffInDays($trialEndsAt, false); $hoursRemaining = $now->diffInHours($trialEndsAt, false); @endphp @if($hoursRemaining > 0) @if($daysRemaining > 0) {{ $daysRemaining }} {{ $daysRemaining == 1 ? 'day' : 'days' }} left @else {{ $hoursRemaining }} {{ $hoursRemaining == 1 ? 'hour' : 'hours' }} left @endif @else Expired @endif
Has Used Trial
{{ $store->has_used_trial ? 'Yes' : 'No' }}
Owner Email
{{ $store->email }}
Plans History
@php // Task 13: prefer the paginated $plansHistory from the controller; fall back to // the (unpaginated) relationship so the view still works if it isn't passed. $store_plans_history = $plansHistory ?? $store->plans_history->sortByDesc('id'); @endphp @foreach($store_plans_history as $plans_history) @endforeach
Plan Type Charge Status Charge Type Created At Price Description Charge ID Balance Remaining Risk Level Trial Info
{{ ucfirst($plans_history->plan_type) }} @php $statusClasses = ['ACTIVE' => 'badge-primary','FAILED' => 'badge-error','PENDING'=> 'badge-warning',]; $badgeClass = $statusClasses[$plans_history->charge_status] ?? 'badge-warning'; @endphp {{ $plans_history->charge_status ?? 'None' }} {{ ucwords(str_replace('_', ' ', $plans_history->charge_type)) }} {{ $plans_history->created_at }} {{ $plans_history->price }} {{ $plans_history->description }} {{ $plans_history->charge_id }} {{ $plans_history->balance_remaining }} {{ $plans_history->risk_level }} @if($plans_history->is_trial)
Trial @if($plans_history->trial_days)
{{ $plans_history->trial_days }} days @endif @if($plans_history->trial_ends_at)
Ends: {{ \Carbon\Carbon::parse($plans_history->trial_ends_at)->format('M j, Y') }} @endif
@else No Trial @endif
@if(isset($plansHistory) && method_exists($plansHistory, 'links'))
{!! $plansHistory->links('pagination::bootstrap-4') !!}
@endif
@stop