@extends('admin.layouts.master') @section('title', __('Invest Dashboard')) @php use App\Enums\InvestmentStatus; use Illuminate\Support\Arr; $currency = base_currency(); $plans = []; $renderIvGraph = !empty($ivGraph) && array_sum($ivGraph) > 0; $renderTopSchemeGraph = !empty($topSchemeGraph) && array_sum($topSchemeGraph) > 0; foreach ($activePlans as $name => $data) { $plans['name'][] = $name; $plans['colors'][] = $data['color']; $plans['data'][] = $data['count']; } @endphp @section('content')

{{ __("Investment Insight") }}

{{ __("Here is an insight of what's going on.") }}

{{ __("Actived Investment") }}

{{ __("The amount of investment currently actived.") }}

{{ to_amount(data_get($activeInvest, 'amount'), $currency) }} {{ $currency }}
{{ to_amount(data_get($activeInvest, 'since.amount'), $currency) }} {{ __("since last week") }}
{{ __("Profit to Pay") }}
{{ to_amount(data_get($activeInvest, 'profit'), $currency) }} {{ $currency }}
{{ __("Active Plans") }}
{{ data_get($activeInvest, 'plan') }} @if( data_get($activeInvest, 'diff.plan') !== 0 ) {{ abs(data_get($activeInvest, 'diff.plan')) }}% @endif
@if ($renderIvGraph) @endif
{{ data_get($ivGraphDate, 'start') }}
{{ data_get($ivGraphDate, 'end') }}
{{ __("Actived Investment Plan") }}

{{ __("The invested plans that currently actived.") }}

@if(!empty($activePlans))
@if (!empty($plans)) @endif
@foreach($activePlans as $name => $data)
{{ $name }}
{{ $data['count'] }} {{ $data['percentage'] }}%
@endforeach
@else
{{ __("Available data is not enough to display chart.") }}
@endif
{{ __("Investment Overview") }}

{{ __("The overview of investment.") }} {{ __("View Investment") }}

{{ __("Total Investment") }}
{{ to_amount(data_get($stats, 'month.amount'), $currency) }} {{ $currency }} @if(data_get($stats, 'month.diff.amount') !== 0) {{ abs(data_get($stats, 'month.diff.amount')) }}% @endif
{{ __("Investment Amount") }}
{{ data_get($stats, 'month.plan') }} @if(data_get($stats, 'month.diff.plan') !== 0) {{ abs(data_get($stats, 'month.diff.plan')) }}% @endif
{{ __("Plans") }}
{{ to_amount(data_get($stats, 'month.profit'), $currency) }} {{ $currency }}
{{ __("Paid Profit") }}
{{ __("Investment in Last Month") }}
{{ to_amount(data_get($stats, 'month.last.amount'), $currency) }} {{ $currency }}
{{ __("Investment Amount") }}
{{ to_amount(data_get($stats, 'month.last.profit'), $currency) }} {{ $currency }}
{{ __("Paid Profit") }}
{{ __("Total Investment") }}
{{ to_amount(data_get($stats, 'year.amount'), $currency) }} {{ $currency }} @if(data_get($stats, 'year.diff.amount') !== 0) {{ abs(data_get($stats, 'year.diff.amount')) }}% @endif
{{ __("Investment Amount") }}
{{ data_get($stats, 'year.plan') }} @if(data_get($stats, 'year.diff.plan') !== 0) {{ abs(data_get($stats, 'year.diff.plan')) }}% @endif
{{ __("Plans") }}
{{ to_amount(data_get($stats, 'year.profit'), $currency) }} {{ $currency }}
{{ __("Paid Profit") }}
{{ __("Investment in Last Year") }}
{{ to_amount(data_get($stats, 'year.last.amount'), $currency) }} {{ $currency }}
{{ __("Investment Amount") }}
{{ to_amount(data_get($stats, 'year.last.profit'), $currency) }} {{ $currency }}
{{ __("Paid Profit") }}
{{ __("Total Investment") }}
{{ to_amount(data_get($stats, 'all.amount'), $currency) }} {{ $currency }}
{{ __("Investment Amount") }}
{{ data_get($stats, 'all.plan') }}
{{ __("Plans") }}
{{ to_amount(data_get($stats, 'all.profit'), $currency) }} {{ $currency }}
{{ __("Paid Profit") }}
{{ __("Investment in This Year") }}
{{ to_amount(data_get($stats, 'year.amount'), $currency) }} {{ $currency }}
{{ __("Investment Amount") }}
{{ to_amount(data_get($stats, 'year.profit'), $currency) }} {{ $currency }}
{{ __("Paid Profit") }}
{{ __("Top Invested Scheme") }}

{{ __("In last 30 days top invested plans.") }}

@if(!empty($topPlans))
@foreach ($topPlans as $name => $data)
{{ $name }}
{{ $data['count'] }}
@endforeach
@else
{{ __("Available data is not enough to display chart.") }}
@endif
@if ($renderTopSchemeGraph)
@endif
{{ __("Recent Investment") }}
{{ __("Plan") }}
{{ __("Investor") }}
{{ __("Date") }}
{{ __("Amount") }}
 
 
@if(filled($recent)) @foreach ($recent as $iv)
{{ $iv->code }}
{{ $iv->scheme['name'] }} - {{ $iv->calc_details }}
{!! user_avatar($iv->user, 'xs') !!}
{{ $iv->user->name }}
{{ show_date($iv->order_at) }}
{{ $iv->total }} {{ $currency }}
@if($iv->status === InvestmentStatus::ACTIVE)
@elseif($iv->status === InvestmentStatus::PENDING) {{ __("Pending") }} @elseif($iv->status === InvestmentStatus::COMPLETED) {{ __("Completed") }} @elseif($iv->status === InvestmentStatus::CANCELLED) {{ __("Cancelled") }} @endif
@endforeach @else
{{ __("No recent investment available!") }}
@endif
@endsection @push('scripts') @if ($renderIvGraph || $renderTopSchemeGraph || !empty($plans)) @endif @endpush