@extends('admin.layouts.app') @section('title', __('groups.title')) @section('header', __('groups.title')) @section('breadcrumb') {{ __('groups.title') }} @endsection @section('header-actions') {{ __('groups.new') }} @endsection @section('content') @php $groupIcons = require resource_path('views/admin/groups/icon_map.php'); $typeColors = [ 'community' => ['bg'=>'rgba(64,81,137,0.12)', 'color'=>'#405189'], 'campaign' => ['bg'=>'rgba(240,101,72,0.12)', 'color'=>'#f06548'], 'chapter' => ['bg'=>'rgba(10,179,156,0.12)', 'color'=>'#0ab39c'], 'committee' => ['bg'=>'rgba(122,90,248,0.12)', 'color'=>'#7a5af8'], 'team' => ['bg'=>'rgba(247,184,75,0.12)', 'color'=>'#f7b84b'], ]; $defaultTypeIcons = [ 'community' => 'users', 'campaign' => 'megaphone', 'chapter' => 'bookmark', 'committee' => 'building', 'team' => 'bolt', ]; @endphp
@forelse($groups as $group) @php $tc = $typeColors[$group->type] ?? ['bg'=>'rgba(108,117,125,0.12)','color'=>'#6c757d']; $iconKey = $group->icon ?: ($defaultTypeIcons[$group->type] ?? 'users'); $iconPath= $groupIcons[$iconKey] ?? $groupIcons['users']; @endphp @empty @endforelse
{{ __('groups.col_name') }} {{ __('groups.col_type') }} {{ __('groups.col_privacy') }} {{ __('groups.col_members') }} {{ __('common.status') }}
{!! $iconPath !!}
{{ $group->name }}
{{ __('groups.type.' . $group->type, [], null) ?: $group->type }} {{ __('groups.privacy.' . $group->privacy, [], null) ?: $group->privacy }} {{ $group->people_count + $group->users_count }} {{ $group->is_active ? __('common.active') : __('common.inactive') }}
@csrf @method('DELETE')
{{ __('groups.empty') }}
@if($groups->hasPages())
{{ $groups->links() }}
@endif
{{-- CREATE MODAL --}} {{-- EDIT MODAL --}} @push('scripts') @endpush @endsection