@ozdao/prometheus-framework 0.2.253 → 0.2.254

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. package/dist/chats.server.js +110 -0
  2. package/dist/chats.server.mjs +111 -0
  3. package/dist/files.server.js +12 -3
  4. package/dist/files.server.mjs +12 -3
  5. package/dist/prometheus-framework/src/modules/chats/chats.client.cjs +31 -0
  6. package/dist/prometheus-framework/src/modules/chats/chats.client.cjs.map +1 -0
  7. package/dist/prometheus-framework/src/modules/chats/chats.client.js +31 -0
  8. package/dist/prometheus-framework/src/modules/chats/chats.client.js.map +1 -0
  9. package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +330 -330
  10. package/dist/prometheus-framework/src/modules/pages/pages.client.js +330 -330
  11. package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.cjs +3 -2
  12. package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.cjs.map +1 -1
  13. package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.js +4 -3
  14. package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.js.map +1 -1
  15. package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.cjs +7 -5
  16. package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.cjs.map +1 -1
  17. package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.js +7 -5
  18. package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.js.map +1 -1
  19. package/dist/prometheus-framework/src/modules/reports/reports.client.cjs +21 -2
  20. package/dist/prometheus-framework/src/modules/reports/reports.client.cjs.map +1 -1
  21. package/dist/prometheus-framework/src/modules/reports/reports.client.js +20 -1
  22. package/dist/prometheus-framework/src/modules/reports/reports.client.js.map +1 -1
  23. package/dist/reports.server.js +21 -8
  24. package/dist/reports.server.mjs +21 -8
  25. package/package.json +9 -1
  26. package/src/modules/chats/chats.client.js +48 -0
  27. package/src/modules/chats/chats.server.js +32 -0
  28. package/src/modules/files/files.server.js +17 -7
  29. package/src/modules/products/components/layouts/Marketplace.vue +1 -0
  30. package/src/modules/products/components/pages/Catalog.vue +5 -3
  31. package/src/modules/reports/models/report.model.js +4 -4
  32. package/src/modules/reports/reports.client.js +35 -14
  33. package/src/modules/reports/reports.server.js +27 -8
@@ -1,5 +1,5 @@
1
- module.exports = (mongoose) => {
2
- const ReportSchema = new mongoose.Schema({
1
+ module.exports = (db) => {
2
+ const ReportSchema = new db.mongoose.Schema({
3
3
  status: {
4
4
  type: String,
5
5
  enum: [
@@ -41,7 +41,7 @@ module.exports = (mongoose) => {
41
41
  required: true,
42
42
  },
43
43
  target: { // заменяем 'organization' на 'target', так как это может быть или User, или Organization
44
- type: mongoose.Schema.Types.ObjectId,
44
+ type: db.mongoose.Schema.Types.ObjectId,
45
45
  ref: function (value) {
46
46
  if (this.type === 'user') return 'User';
47
47
  if (this.type === 'organization') return 'Organization';
@@ -52,7 +52,7 @@ module.exports = (mongoose) => {
52
52
  timestamps: { currentTime: () => Date.now() }
53
53
  });
54
54
 
55
- const Report = mongoose.model("Report", ReportSchema);
55
+ const Report = db.mongoose.model("Report", ReportSchema);
56
56
 
57
57
  return Report;
58
58
  };
@@ -1,17 +1,38 @@
1
- // Importing Vue components from the components directory
2
- // import Profile from './components/pages/Profile.vue';
3
- // import ProfileEdit from './components/pages/ProfileEdit.vue';
1
+ // Store
2
+ import * as storeReports from './store/reports.js';
4
3
 
5
- // Importing Vuex store modules from the store directory
6
- import * as reportsStore from './store/reports.js';
4
+ // Router
5
+ // import { createReportsRoutes } from './router/reports';
7
6
 
8
- // Importing Vue Router routes from the router directory
9
- // import usersRoutes from './router/reports.js';
7
+ // Views
8
+ // Предполагаем, что у нас есть компонент для отображения отчетов
9
+ // import ReportPage from './components/pages/ReportPage.vue';
10
10
 
11
- // Exporting components, store modules, and routes
12
- export {
13
- // Profile,
14
- // ProfileEdit,
15
- reportsStore,
16
- // usersRoutes
17
- };
11
+ // Пример функции инициализации для модуля отчетов
12
+ function initializeReports(app, store, router, options = {}) {
13
+ const route = options.route || 'Home';
14
+
15
+ // const routesReports = createReportsRoutes();
16
+
17
+ // router.addRoute(route, routesReports);
18
+
19
+ store.addStore('reports', storeReports);
20
+ }
21
+
22
+ const ModuleReports = {
23
+ initialize: initializeReports,
24
+ views: {
25
+ store: {
26
+ storeReports
27
+ },
28
+ router: {
29
+ // createReportsRoutes
30
+ },
31
+ components: {
32
+ // Pages
33
+ // ReportPage
34
+ }
35
+ }
36
+ }
37
+
38
+ export default ModuleReports;
@@ -1,13 +1,32 @@
1
- // Importing controllers from the controllers directory
2
- const reportsController = require('./controllers/reports.controller.js');
3
- // Importing routes from the routes directory
1
+ // Импортируем контроллеры
2
+ const ReportsController = require('./controllers/reports.controller.js');
3
+
4
+ // Импортируем роуты
4
5
  const reportsRoutes = require('./routes/reports.routes.js');
5
- // Models
6
+
7
+ // Импортируем модели
6
8
  const ReportModel = require('./models/report.model.js');
7
9
 
8
- // Exporting controllers, routes, and models
10
+ function initializeReports(app, db, origins, publicPath) {
11
+ // Настраиваем модели в объекте базы данных
12
+ db.report = ReportModel(db);
13
+
14
+ // Настраиваем маршруты, если объект приложения передан
15
+ if (app) {
16
+ reportsRoutes(app, db, origins, publicPath);
17
+ }
18
+ }
19
+
20
+ // Экспортируем функцию инициализации, контроллеры, роуты и модели
9
21
  module.exports = {
10
- reportsController,
11
- reportsRoutes,
12
- ReportModel
22
+ initialize: initializeReports,
23
+ models: {
24
+ ReportModel,
25
+ },
26
+ routes: {
27
+ reportsRoutes,
28
+ },
29
+ controllers: {
30
+ ReportsController,
31
+ }
13
32
  };