diff --git a/config/invoiceshelf.php b/config/invoiceshelf.php index 95cea065..fba7c1d3 100644 --- a/config/invoiceshelf.php +++ b/config/invoiceshelf.php @@ -346,21 +346,16 @@ return [ 'ability' => 'view-expense', 'model' => Expense::class, ], - // TODO: remove env check once the module management os implemented. - ...( - env('APP_ENV', 'production') == 'development' ? [ - [ - 'title' => 'navigation.modules', - 'group' => 3, - 'link' => '/admin/modules', - 'icon' => 'PuzzlePieceIcon', - 'name' => 'Modules', - 'owner_only' => true, - 'ability' => '', - 'model' => '', - ], - ] : [] - ), + [ + 'title' => 'navigation.modules', + 'group' => 3, + 'link' => '/admin/modules', + 'icon' => 'PuzzlePieceIcon', + 'name' => 'Modules', + 'owner_only' => false, + 'ability' => 'manage modules', + 'model' => '', + ], [ 'title' => 'navigation.members', 'group' => 3, @@ -430,6 +425,17 @@ return [ 'ability' => '', 'model' => '', ], + [ + 'title' => 'navigation.modules', + 'group' => 1, + 'link' => '/admin/administration/modules', + 'icon' => 'PuzzlePieceIcon', + 'name' => 'AdminModules', + 'owner_only' => false, + 'super_admin_only' => true, + 'ability' => '', + 'model' => '', + ], [ 'title' => 'navigation.settings', 'group' => 1, diff --git a/resources/scripts/features/admin/index.ts b/resources/scripts/features/admin/index.ts index 64e64cc5..0453838c 100644 --- a/resources/scripts/features/admin/index.ts +++ b/resources/scripts/features/admin/index.ts @@ -18,3 +18,19 @@ export { default as AdminSettingsView } from './views/AdminSettingsView.vue' export { default as AdminCompanyDropdown } from './components/AdminCompanyDropdown.vue' export { default as AdminUserDropdown } from './components/AdminUserDropdown.vue' + +// Modules (super-admin marketplace browser) +export { + adminModuleRoutes, + useModuleStore, + ModuleIndexView, + ModuleDetailView, + ModuleCard, +} from './modules' +export type { + ModuleState, + ModuleStore, + ModuleDetailResponse, + ModuleDetailMeta, + InstallationStep, +} from './modules' diff --git a/resources/scripts/features/company/modules/components/ModuleCard.vue b/resources/scripts/features/admin/modules/components/ModuleCard.vue similarity index 97% rename from resources/scripts/features/company/modules/components/ModuleCard.vue rename to resources/scripts/features/admin/modules/components/ModuleCard.vue index 022fccfd..bd1e5445 100644 --- a/resources/scripts/features/company/modules/components/ModuleCard.vue +++ b/resources/scripts/features/admin/modules/components/ModuleCard.vue @@ -1,7 +1,7 @@