feat(modules): relocate marketplace browser to super-admin context

The module marketplace browser UI (ModuleIndexView, ModuleDetailView,
ModuleCard, the four-step installer store) was filed under
features/company/modules/ only by historical accident — it's authorized via
the manage modules ability (super-admin-only) and conceptually belongs in the
admin context, not the company context.

- Move features/company/modules/{store.ts, views/ModuleIndexView.vue,
  views/ModuleDetailView.vue, components/ModuleCard.vue} to
  features/admin/modules/.
- Update hardcoded /admin/modules/... paths in the moved files to
  /admin/administration/modules/... so the breadcrumbs and ModuleCard
  navigation target the new admin-context routes.
- Tighten the four-step installer's silent catch {} blocks in the moved
  store.ts: errors were being swallowed, now they dispatch through the
  global notification store instead.
- New features/admin/modules/routes.ts declares admin.modules.index +
  admin.modules.view as children of /admin/administration with
  meta.isSuperAdmin: true.
- features/admin/{index,routes}.ts re-export and mount the relocated routes.
- config/invoiceshelf.php gains a new AdminModules entry in admin_menu
  pointing at /admin/administration/modules with super_admin_only: true.
- The dev-gated navigation.modules entry in main_menu is replaced (not
  deleted) with a non-gated entry pointing at the new company-context
  Active Modules index page that lands in the next commit. The
  ability is set to manage modules so non-owners can't see it.

The new company-context Active Modules index, schema-driven settings page,
and dynamic sidebar group are introduced in subsequent commits.
This commit is contained in:
Darko Gjorgjijoski
2026-04-09 00:28:59 +02:00
parent b2b7a07e0c
commit 84725b2dfa
9 changed files with 286 additions and 18 deletions

View File

@@ -1,4 +1,5 @@
import type { RouteRecordRaw } from 'vue-router'
import { adminModuleRoutes } from './modules/routes'
const CompanyLayout = () => import('../../layouts/CompanyLayout.vue')
const AdminDashboardView = () => import('./views/AdminDashboardView.vue')
@@ -64,6 +65,7 @@ export const adminRoutes: RouteRecordRaw[] = [
isSuperAdmin: true,
},
},
...adminModuleRoutes,
{
path: 'settings',
name: 'admin.settings',