TASKS-1823 WebManager module

This commit is contained in:
Igor Martyniuk
2026-08-28 08:35:58 +00:00
parent fdb2cf3837
commit c93d8c025b
654 changed files with 26232 additions and 6075 deletions
+14
View File
@@ -0,0 +1,14 @@
import { NotepadText } from 'lucide-react';
import { IntlShape } from 'react-intl';
import { MenuItem } from '#app/config/types';
import { MODULE_NAME_LABEL, MODULE_PERMISSION_VIEW, MODULE_ROOT_PATH } from './meta';
export default (intl: IntlShape): MenuItem => ({
title: intl.formatMessage({
id: `MODULES.${MODULE_NAME_LABEL.toUpperCase()}.TITLE`,
defaultMessage: MODULE_NAME_LABEL
}),
icon: NotepadText,
path: MODULE_ROOT_PATH,
permissions: [MODULE_PERMISSION_VIEW]
});
@@ -0,0 +1,9 @@
import arTranslation from './translation/ar.json';
import enTranslation from './translation/en.json';
import ukTranslation from './translation/ua.json';
export default {
en: enTranslation,
ar: arTranslation,
uk: ukTranslation
};
@@ -0,0 +1,9 @@
export const MODULE_NAME = '{{name}}'
export const MODULE_NAME_LABEL = MODULE_NAME.replace(/^./, (char) => char.toUpperCase()); // prettier-ignore
export const MODULE_API_ENDPOINT = '/' + MODULE_NAME
export const MODULE_ROOT_PATH = '/' + MODULE_NAME
export const MODULE_PERMISSION_ROOT = MODULE_NAME + 's'
export const MODULE_PERMISSION_CREATE = MODULE_PERMISSION_ROOT + '.create'
export const MODULE_PERMISSION_UPDATE = MODULE_PERMISSION_ROOT + '.update'
export const MODULE_PERMISSION_DELETE = MODULE_PERMISSION_ROOT + '.delete'
export const MODULE_PERMISSION_VIEW = MODULE_PERMISSION_ROOT + '.view'
@@ -0,0 +1,14 @@
import { AppModuleConfig } from '#app/services/modules/types';
import menu from './menu';
import messages from './messages';
import routes from './routing';
export default {
id: 'template',
area: 'business',
routeScope: 'protected',
order: 100,
routes,
menu,
messages
} satisfies AppModuleConfig;
@@ -0,0 +1,30 @@
/**
* Handles all module related routes.
* This component is mounted at /[moduleName]/* in the main application router.
*/
import { Navigate } from 'react-router-dom';
import ListPage from '../pages/ListPage';
import Layout from '../view/layouts/Layout';
import { MODULE_ROOT_PATH } from './meta';
export default {
path: MODULE_ROOT_PATH,
children: [
{ index: true, element: <Navigate to="list" replace /> },
{
path: `${MODULE_ROOT_PATH}/*`,
element: <Navigate to="/error/404" replace />
},
{
path: '',
element: <Layout />,
children: [
{
path: 'list',
element: <ListPage />
}
]
}
]
};
@@ -0,0 +1,3 @@
{
"MODULES.TEMPLATE.TITLE": "قالب الوحدة"
}
@@ -0,0 +1,3 @@
{
"MODULES.TEMPLATE.TITLE": "Module template"
}
@@ -0,0 +1,3 @@
{
"MODULES.TEMPLATE.TITLE": "Шаблон модуля"
}