@extends('layouts.app') @section('title', __('lang_v1.manage_modules')) @php $card_class = 'tw-flex tw-flex-col tw-p-4 tw-bg-white tw-shadow-sm tw-rounded-xl tw-ring-1 tw-ring-gray-200 hover:tw-shadow-md tw-transition-all tw-duration-200'; $badge_class = 'tw-dw-badge tw-dw-badge-sm tw-border tw-font-semibold tw-whitespace-nowrap'; @endphp @section('content')

@lang('lang_v1.manage_modules') Only superadmin can access manage modules

Regenerate @show_tooltip("
1. Regenerate/publish modules css/js to fix not found issue.
2. Publish api module oauth files")
@php $pending_install_count = collect($modules)->where('is_installed', false)->count(); $update_count = collect($modules)->filter(function ($module) { return $module['is_installed'] && ! empty($module['version']['is_update_available']); })->count(); $notice_class = 'module_filter tw-flex tw-items-center tw-gap-2 tw-px-4 tw-py-2.5 tw-rounded-xl tw-border tw-text-sm tw-font-semibold tw-transition-all'; @endphp @if($pending_install_count || $update_count)
@if($update_count) @endif @if($pending_install_count) @endif @lang('lang_v1.show_all_modules')
@endif

@lang('lang_v1.your_modules')

@php //Modules needing action first: updates, then not installed, then installed. $sorted_modules = collect($modules)->sortBy(function ($module) { $has_update = $module['is_installed'] && ! empty($module['version']['is_update_available']); $rank = $has_update ? 0 : ($module['is_installed'] ? 2 : 1); return $rank.strtolower($module['name']); }); @endphp
#
@lang('lang_v1.modules')
@lang('sale.status')
@lang('lang_v1.version')
@foreach($sorted_modules as $module) @php $is_installed = $module['is_installed']; $has_update = $is_installed && ! empty($module['version']['is_update_available']); @endphp
{{ $loop->iteration }}

{{ $module['name'] }}

{{ $module['description'] }}

@if($has_update) @lang('lang_v1.update_available') @elseif($is_installed) @lang('lang_v1.installed') @else @lang('lang_v1.not_installed') @endif
@lang('lang_v1.version'): @if($has_update) {{ $module['version']['installed_version'] }} → {{ $module['version']['available_version'] }} @elseif($is_installed) {{ $module['version']['installed_version'] }} @else – @endif
@method('DELETE') @csrf
@endforeach
@if(! empty($buy_modules))

@lang('lang_v1.get_more_modules')

@foreach($buy_modules as $buy_module)

{{ $buy_module['name'] }}

{{ $buy_module['description'] }}

@endforeach
@endif
@endsection @section('javascript') @endsection