@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.
- package/dist/chats.server.js +110 -0
- package/dist/chats.server.mjs +111 -0
- package/dist/files.server.js +12 -3
- package/dist/files.server.mjs +12 -3
- package/dist/prometheus-framework/src/modules/chats/chats.client.cjs +31 -0
- package/dist/prometheus-framework/src/modules/chats/chats.client.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/chats/chats.client.js +31 -0
- package/dist/prometheus-framework/src/modules/chats/chats.client.js.map +1 -0
- package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +330 -330
- package/dist/prometheus-framework/src/modules/pages/pages.client.js +330 -330
- package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.cjs +3 -2
- package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.js +4 -3
- package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.cjs +7 -5
- package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.js +7 -5
- package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/reports/reports.client.cjs +21 -2
- package/dist/prometheus-framework/src/modules/reports/reports.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/reports/reports.client.js +20 -1
- package/dist/prometheus-framework/src/modules/reports/reports.client.js.map +1 -1
- package/dist/reports.server.js +21 -8
- package/dist/reports.server.mjs +21 -8
- package/package.json +9 -1
- package/src/modules/chats/chats.client.js +48 -0
- package/src/modules/chats/chats.server.js +32 -0
- package/src/modules/files/files.server.js +17 -7
- package/src/modules/products/components/layouts/Marketplace.vue +1 -0
- package/src/modules/products/components/pages/Catalog.vue +5 -3
- package/src/modules/reports/models/report.model.js +4 -4
- package/src/modules/reports/reports.client.js +35 -14
- package/src/modules/reports/reports.server.js +27 -8
@@ -1,5 +1,5 @@
|
|
1
|
-
module.exports = (
|
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
|
-
//
|
2
|
-
|
3
|
-
// import ProfileEdit from './components/pages/ProfileEdit.vue';
|
1
|
+
// Store
|
2
|
+
import * as storeReports from './store/reports.js';
|
4
3
|
|
5
|
-
//
|
6
|
-
import
|
4
|
+
// Router
|
5
|
+
// import { createReportsRoutes } from './router/reports';
|
7
6
|
|
8
|
-
//
|
9
|
-
//
|
7
|
+
// Views
|
8
|
+
// Предполагаем, что у нас есть компонент для отображения отчетов
|
9
|
+
// import ReportPage from './components/pages/ReportPage.vue';
|
10
10
|
|
11
|
-
//
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
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
|
-
//
|
2
|
-
const
|
3
|
-
|
1
|
+
// Импортируем контроллеры
|
2
|
+
const ReportsController = require('./controllers/reports.controller.js');
|
3
|
+
|
4
|
+
// Импортируем роуты
|
4
5
|
const reportsRoutes = require('./routes/reports.routes.js');
|
5
|
-
|
6
|
+
|
7
|
+
// Импортируем модели
|
6
8
|
const ReportModel = require('./models/report.model.js');
|
7
9
|
|
8
|
-
|
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
|
-
|
11
|
-
|
12
|
-
|
22
|
+
initialize: initializeReports,
|
23
|
+
models: {
|
24
|
+
ReportModel,
|
25
|
+
},
|
26
|
+
routes: {
|
27
|
+
reportsRoutes,
|
28
|
+
},
|
29
|
+
controllers: {
|
30
|
+
ReportsController,
|
31
|
+
}
|
13
32
|
};
|