@extends('layouts.app') @section('title', 'সমিতি কিপার লাইট — সমিতি') @php function tk($paisa) { return '৳ ' . number_format(((int) $paisa) / 100, 0); } function tkf($taka) { return '৳ ' . number_format((float) $taka, 0); } $modeLabel = ['owner' => 'মালিক', 'garage' => 'সংগ্রহ', 'both' => 'দুটোই']; $suspended = (int) $organization->status === 0; @endphp @section('content')

{{ $organization->name }} @if ($suspended) বন্ধ @else চালু @endif

{{ $modeLabel[$organization->business_mode] ?? 'ব্যবসা' }} @if ($owner) · মালিক: {{ $owner->name }} ({{ $owner->phone }}) @endif · তৈরি: {{ $organization->created_at?->format('d/m/Y') }}

@if ($owner)
@csrf
@endif
@csrf
মডিউল এডিট ফিরুন
@include('partials.alerts') {{-- ===== KPI cards ===== --}}
@php // [label, value, icon, hex colour, is-money] $kpis = [ ['মোট আয়', $stats['income_total'], 'bi-cash-stack', '#16a34a', true], ['মোট খরচ', $stats['expense_total'], 'bi-bag-dash', '#ef4444', true], ['এই মাসের লাভ', $stats['month_profit'], 'bi-graph-up-arrow', '#10b981', true], ]; @endphp @foreach ($kpis as [$label, $val, $icon, $hex, $money])

{{ $money ? tk($val) : number_format($val) }}

{{ $label }}

@endforeach
{{-- ===== Left: wallets + tables ===== --}}
{{-- Wallets --}}
নগদ অবস্থা (অ্যাকাউন্ট ব্যালেন্স)
@php $walletTotal = 0; @endphp @foreach ($wallets as $name => $bal) @php $walletTotal += $bal; @endphp

{{ $name }}

{{ tkf($bal) }}
@endforeach

মোট হাতে {{ tkf($walletTotal) }}
মোট আয়: {{ tk($stats['income_total']) }}
মোট খরচ: {{ tk($stats['expense_total']) }}
{{-- ===== Right: this month + services + subscription + owner + modules ===== --}}
{{-- This month + new-module services (at a glance) --}}
এই মাস ও সেবা
এই মাসের আয়{{ tk($stats['month_income']) }}
এই মাসের খরচ{{ tk($stats['month_expense']) }}
এই মাসের লাভ{{ tk($stats['month_profit']) }}

SMS ব্যালেন্স {{ number_format($services['sms_balance']) }} টি
সাপোর্ট মেসেজ {{ number_format($services['support_messages']) }} @if ($services['support_unread'] > 0){{ $services['support_unread'] }} নতুন@endif
{{-- Plan & member usage (active members vs plan ceiling) --}}
প্ল্যান ও সদস্য ব্যবহার
বর্তমান প্ল্যান {{ $usage['plan_name'] }} @if ($usage['pinned'])পিন করা@endif
সক্রিয় সদস্য {{ number_format($usage['active_members']) }} / {{ number_format($usage['max_members']) }}
সদস্য সীমার {{ $usage['percent'] }}% ব্যবহৃত {{-- Pin the org to a named somity plan (Free/Starter/Standard/Pro). Writes subscriptions.plan_key, which PlanGate::planFor honours. --}}
@csrf @method('PUT')
{{-- Subscription --}}
সাবস্ক্রিপশন
@if ($subscription)
প্ল্যান{{ $subscription->plan_name ?? $subscription->plan ?? '—' }}
অবস্থা{{ $subscription->status ?? '—' }}
@if (!empty($subscription->ends_at))
শেষ তারিখ{{ \Illuminate\Support\Carbon::parse($subscription->ends_at)->format('d/m/Y') }}
@endif @else

কোনো সক্রিয় সাবস্ক্রিপশন নেই।

@if (!empty($organization->subscription_ends_at))
মেয়াদ{{ $organization->subscription_ends_at->format('d/m/Y') }}
@endif @endif
{{-- Owner + staff --}}
মালিক ও কর্মী ({{ $staffCount }})
@if ($owner)
{{ $owner->name }} মালিক
{{ $owner->phone }}
@endif @forelse ($staff as $s)
{{ $s->name }}
{{ $s->phone }}
@empty

কোনো কর্মী নেই।

@endforelse
{{-- Modules --}}
মডিউল
পরিবর্তন
@foreach ($registry as $key => $mod)
{{ $mod['name'] ?? $key }} @if ($enabled[$key]) চালু @else বন্ধ @endif
@endforeach
@endsection