@hed-hog/core 0.0.163 → 0.0.166
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dashboard/dashboard/dashboard.controller.d.ts +13 -1
- package/dist/dashboard/dashboard/dashboard.controller.d.ts.map +1 -1
- package/dist/dashboard/dashboard/dashboard.controller.js +3 -4
- package/dist/dashboard/dashboard/dashboard.controller.js.map +1 -1
- package/dist/dashboard/dashboard/dashboard.service.d.ts +14 -4
- package/dist/dashboard/dashboard/dashboard.service.d.ts.map +1 -1
- package/dist/dashboard/dashboard/dashboard.service.js +20 -10
- package/dist/dashboard/dashboard/dashboard.service.js.map +1 -1
- package/dist/dashboard/dashboard-component/dashboard-component.controller.d.ts +15 -0
- package/dist/dashboard/dashboard-component/dashboard-component.controller.d.ts.map +1 -1
- package/dist/dashboard/dashboard-component/dashboard-component.service.d.ts +15 -2
- package/dist/dashboard/dashboard-component/dashboard-component.service.d.ts.map +1 -1
- package/dist/dashboard/dashboard-component/dashboard-component.service.js +25 -2
- package/dist/dashboard/dashboard-component/dashboard-component.service.js.map +1 -1
- package/dist/dashboard/dashboard-component/dto/create.dto.d.ts +4 -0
- package/dist/dashboard/dashboard-component/dto/create.dto.d.ts.map +1 -1
- package/dist/dashboard/dashboard-component/dto/create.dto.js +15 -0
- package/dist/dashboard/dashboard-component/dto/create.dto.js.map +1 -1
- package/dist/dashboard/dashboard-component/dto/update.dto.d.ts +4 -0
- package/dist/dashboard/dashboard-component/dto/update.dto.d.ts.map +1 -1
- package/dist/dashboard/dashboard-component/dto/update.dto.js +15 -0
- package/dist/dashboard/dashboard-component/dto/update.dto.js.map +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.controller.d.ts +27 -8
- package/dist/dashboard/dashboard-core/dashboard-core.controller.d.ts.map +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.controller.js +8 -6
- package/dist/dashboard/dashboard-core/dashboard-core.controller.js.map +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.service.d.ts +27 -8
- package/dist/dashboard/dashboard-core/dashboard-core.service.d.ts.map +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.service.js +98 -46
- package/dist/dashboard/dashboard-core/dashboard-core.service.js.map +1 -1
- package/dist/dashboard/dashboard-item/dashboard-item.controller.d.ts +3 -0
- package/dist/dashboard/dashboard-item/dashboard-item.controller.d.ts.map +1 -1
- package/dist/dashboard/dashboard-item/dashboard-item.service.d.ts +3 -0
- package/dist/dashboard/dashboard-item/dashboard-item.service.d.ts.map +1 -1
- package/dist/dashboard/dashboard-item/dto/index.d.ts +2 -0
- package/dist/dashboard/dashboard-item/dto/index.d.ts.map +1 -1
- package/dist/dashboard/dashboard-item/dto/index.js +4 -1
- package/dist/dashboard/dashboard-item/dto/index.js.map +1 -1
- package/dist/dashboard/dashboard-item/dto/update-layout.dto.d.ts +12 -0
- package/dist/dashboard/dashboard-item/dto/update-layout.dto.d.ts.map +1 -0
- package/dist/dashboard/dashboard-item/dto/update-layout.dto.js +52 -0
- package/dist/dashboard/dashboard-item/dto/update-layout.dto.js.map +1 -0
- package/hedhog/data/menu.yaml +28 -4
- package/hedhog/query/add-description-to-dashboard-component-locale.sql +99 -0
- package/hedhog/query/add-widget-metadata.sql +21 -0
- package/hedhog/query/fix-dashboard-stat-keys.sql +82 -0
- package/package.json +4 -4
- package/src/dashboard/dashboard/dashboard.controller.ts +2 -2
- package/src/dashboard/dashboard/dashboard.service.ts +25 -9
- package/src/dashboard/dashboard-component/dashboard-component.service.ts +30 -3
- package/src/dashboard/dashboard-component/dto/create.dto.ts +13 -1
- package/src/dashboard/dashboard-component/dto/update.dto.ts +13 -1
- package/src/dashboard/dashboard-core/dashboard-core.controller.ts +4 -2
- package/src/dashboard/dashboard-core/dashboard-core.service.ts +103 -49
- package/src/dashboard/dashboard-item/dashboard-item.service.ts +4 -4
- package/src/dashboard/dashboard-item/dto/index.ts +2 -0
- package/src/dashboard/dashboard-item/dto/update-layout.dto.ts +30 -0
|
@@ -8,8 +8,12 @@ export declare class UpdateDTO {
|
|
|
8
8
|
width?: number;
|
|
9
9
|
height?: number;
|
|
10
10
|
is_resizable?: boolean;
|
|
11
|
+
stat_key?: string;
|
|
12
|
+
icon?: string;
|
|
13
|
+
color?: string;
|
|
11
14
|
locale?: Record<string, {
|
|
12
15
|
name: string;
|
|
16
|
+
description?: string;
|
|
13
17
|
}>;
|
|
14
18
|
}
|
|
15
19
|
//# sourceMappingURL=update.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../../src/dashboard/dashboard-component/dto/update.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,SAAS;IAGpB,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,SAAS,CAAC,EAAE,MAAM,CAAC;IAInB,SAAS,CAAC,EAAE,MAAM,CAAC;IAInB,UAAU,CAAC,EAAE,MAAM,CAAC;IAIpB,UAAU,CAAC,EAAE,MAAM,CAAC;IAIpB,KAAK,CAAC,EAAE,MAAM,CAAC;IAIf,MAAM,CAAC,EAAE,MAAM,CAAC;IAIhB,YAAY,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../../src/dashboard/dashboard-component/dto/update.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,SAAS;IAGpB,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,SAAS,CAAC,EAAE,MAAM,CAAC;IAInB,SAAS,CAAC,EAAE,MAAM,CAAC;IAInB,UAAU,CAAC,EAAE,MAAM,CAAC;IAIpB,UAAU,CAAC,EAAE,MAAM,CAAC;IAIpB,KAAK,CAAC,EAAE,MAAM,CAAC;IAIf,MAAM,CAAC,EAAE,MAAM,CAAC;IAIhB,YAAY,CAAC,EAAE,OAAO,CAAC;IAIvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAIlB,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,KAAK,CAAC,EAAE,MAAM,CAAC;IAUf,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjE"}
|
|
@@ -60,6 +60,21 @@ __decorate([
|
|
|
60
60
|
(0, class_validator_1.IsBoolean)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.booleanRequired', args.value) }),
|
|
61
61
|
__metadata("design:type", Boolean)
|
|
62
62
|
], UpdateDTO.prototype, "is_resizable", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, class_validator_1.IsOptional)(),
|
|
65
|
+
(0, class_validator_1.IsString)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.stringRequired', args.value) }),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], UpdateDTO.prototype, "stat_key", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, class_validator_1.IsOptional)(),
|
|
70
|
+
(0, class_validator_1.IsString)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.stringRequired', args.value) }),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], UpdateDTO.prototype, "icon", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, class_validator_1.IsOptional)(),
|
|
75
|
+
(0, class_validator_1.IsString)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.stringRequired', args.value) }),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], UpdateDTO.prototype, "color", void 0);
|
|
63
78
|
__decorate([
|
|
64
79
|
(0, class_validator_1.IsOptional)(),
|
|
65
80
|
(0, class_validator_1.IsObject)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.dto.js","sourceRoot":"","sources":["../../../../src/dashboard/dashboard-component/dto/update.dto.ts"],"names":[],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AA,0BAAa,EAAC,2BAA2B,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;;wCACzE;AAUf;IARC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,EAAC;QACR,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAChB,IAAA,0BAAa,EAAC,+BAA+B,EAAE,IAAI,CAAC,KAAK,CAAC;KAC7D,CAAC;IACD,IAAA,4BAAU,EAAC;QACV,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,0BAAa,EAAC,2BAA2B,EAAE,IAAI,CAAC,KAAK,CAAC;KAC1E,CAAC;;yCAC8D"}
|
|
@@ -7,6 +7,7 @@ export declare class DashboardCoreController {
|
|
|
7
7
|
dashboard_component_locale: {
|
|
8
8
|
name: string;
|
|
9
9
|
id: number;
|
|
10
|
+
description: string | null;
|
|
10
11
|
created_at: Date;
|
|
11
12
|
updated_at: Date;
|
|
12
13
|
locale_id: number;
|
|
@@ -19,12 +20,15 @@ export declare class DashboardCoreController {
|
|
|
19
20
|
created_at: Date;
|
|
20
21
|
updated_at: Date;
|
|
21
22
|
slug: string;
|
|
23
|
+
icon: string | null;
|
|
24
|
+
color: string | null;
|
|
22
25
|
min_width: number;
|
|
23
26
|
max_width: number | null;
|
|
24
27
|
min_height: number;
|
|
25
28
|
max_height: number | null;
|
|
26
29
|
height: number;
|
|
27
30
|
is_resizable: boolean;
|
|
31
|
+
stat_key: string | null;
|
|
28
32
|
};
|
|
29
33
|
dashboard_user: {
|
|
30
34
|
width: number;
|
|
@@ -55,24 +59,33 @@ export declare class DashboardCoreController {
|
|
|
55
59
|
totalRoles: number;
|
|
56
60
|
totalMenus: number;
|
|
57
61
|
totalRoutes: number;
|
|
62
|
+
totalModules: number;
|
|
63
|
+
totalSettings: number;
|
|
64
|
+
totalContacts: number;
|
|
58
65
|
}>;
|
|
59
66
|
getUserGrowth(): Promise<{
|
|
60
67
|
date: Date;
|
|
61
68
|
count: number;
|
|
62
69
|
}[]>;
|
|
63
|
-
getUserLayout(user: any, slug: string): Promise<{
|
|
70
|
+
getUserLayout(user: any, slug: string, locale: string): Promise<{
|
|
64
71
|
i: string;
|
|
65
72
|
component_id: number;
|
|
66
|
-
slug:
|
|
73
|
+
slug: any;
|
|
74
|
+
name: any;
|
|
75
|
+
description: any;
|
|
76
|
+
path: any;
|
|
77
|
+
icon: any;
|
|
78
|
+
stat_key: any;
|
|
79
|
+
color: any;
|
|
67
80
|
x: number;
|
|
68
81
|
y: number;
|
|
69
82
|
w: number;
|
|
70
83
|
h: number;
|
|
71
|
-
minW:
|
|
72
|
-
maxW:
|
|
73
|
-
minH:
|
|
74
|
-
maxH:
|
|
75
|
-
isResizable:
|
|
84
|
+
minW: any;
|
|
85
|
+
maxW: any;
|
|
86
|
+
minH: any;
|
|
87
|
+
maxH: any;
|
|
88
|
+
isResizable: any;
|
|
76
89
|
}[]>;
|
|
77
90
|
saveUserLayout(user: any, slug: string, body: {
|
|
78
91
|
layout: Array<{
|
|
@@ -87,10 +100,16 @@ export declare class DashboardCoreController {
|
|
|
87
100
|
}>;
|
|
88
101
|
addWidget(user: any, slug: string, body: {
|
|
89
102
|
componentSlug: string;
|
|
90
|
-
}): Promise<{
|
|
103
|
+
}, locale: string): Promise<{
|
|
91
104
|
i: string;
|
|
92
105
|
component_id: number;
|
|
93
106
|
slug: string;
|
|
107
|
+
name: any;
|
|
108
|
+
description: any;
|
|
109
|
+
path: string;
|
|
110
|
+
icon: any;
|
|
111
|
+
stat_key: any;
|
|
112
|
+
color: any;
|
|
94
113
|
x: number;
|
|
95
114
|
y: number;
|
|
96
115
|
w: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-core.controller.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard-core/dashboard-core.controller.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,qBAEa,uBAAuB;IACtB,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBAApB,oBAAoB,EAAE,oBAAoB;IAGvE,QAAQ,CAAgB,IAAI,EAAE,MAAM,EAAY,MAAM,KAAA
|
|
1
|
+
{"version":3,"file":"dashboard-core.controller.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard-core/dashboard-core.controller.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,qBAEa,uBAAuB;IACtB,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBAApB,oBAAoB,EAAE,oBAAoB;IAGvE,QAAQ,CAAgB,IAAI,EAAE,MAAM,EAAY,MAAM,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKtD,aAAa;;;;;;;;;;;IAKb,aAAa;;;;IAKb,aAAa,CAAS,IAAI,KAAA,EAAiB,IAAI,EAAE,MAAM,EAAY,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;IAKjF,cAAc,CACJ,IAAI,KAAA,EACG,IAAI,EAAE,MAAM,EACnB,IAAI,EAAE;QAAE,MAAM,EAAE,KAAK,CAAC;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE;;;IAM5F,SAAS,CACC,IAAI,KAAA,EACG,IAAI,EAAE,MAAM,EACnB,IAAI,EAAE;QAAE,aAAa,EAAE,MAAM,CAAA;KAAE,EAC7B,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;IAW1B,YAAY,CACF,IAAI,KAAA,EACG,IAAI,EAAE,MAAM,EACR,QAAQ,EAAE,MAAM;;;CAQtC"}
|
|
@@ -30,14 +30,14 @@ let DashboardCoreController = class DashboardCoreController {
|
|
|
30
30
|
getUserGrowth() {
|
|
31
31
|
return this.dashboardCoreService.getUserGrowth();
|
|
32
32
|
}
|
|
33
|
-
getUserLayout(user, slug) {
|
|
34
|
-
return this.dashboardCoreService.getUserLayout(user.id, slug);
|
|
33
|
+
getUserLayout(user, slug, locale) {
|
|
34
|
+
return this.dashboardCoreService.getUserLayout(user.id, slug, locale);
|
|
35
35
|
}
|
|
36
36
|
saveUserLayout(user, slug, body) {
|
|
37
37
|
return this.dashboardCoreService.saveUserLayout(user.id, slug, body.layout);
|
|
38
38
|
}
|
|
39
|
-
addWidget(user, slug, body) {
|
|
40
|
-
return this.dashboardCoreService.addWidgetToUserDashboard(user.id, slug, body.componentSlug);
|
|
39
|
+
addWidget(user, slug, body, locale) {
|
|
40
|
+
return this.dashboardCoreService.addWidgetToUserDashboard(user.id, slug, body.componentSlug, locale);
|
|
41
41
|
}
|
|
42
42
|
removeWidget(user, slug, widgetId) {
|
|
43
43
|
return this.dashboardCoreService.removeWidgetFromUserDashboard(user.id, slug, widgetId);
|
|
@@ -68,8 +68,9 @@ __decorate([
|
|
|
68
68
|
(0, common_1.Get)('layout/:slug'),
|
|
69
69
|
__param(0, (0, api_1.User)()),
|
|
70
70
|
__param(1, (0, common_1.Param)('slug')),
|
|
71
|
+
__param(2, (0, api_locale_1.Locale)()),
|
|
71
72
|
__metadata("design:type", Function),
|
|
72
|
-
__metadata("design:paramtypes", [Object, String]),
|
|
73
|
+
__metadata("design:paramtypes", [Object, String, String]),
|
|
73
74
|
__metadata("design:returntype", void 0)
|
|
74
75
|
], DashboardCoreController.prototype, "getUserLayout", null);
|
|
75
76
|
__decorate([
|
|
@@ -86,8 +87,9 @@ __decorate([
|
|
|
86
87
|
__param(0, (0, api_1.User)()),
|
|
87
88
|
__param(1, (0, common_1.Param)('slug')),
|
|
88
89
|
__param(2, (0, common_1.Body)()),
|
|
90
|
+
__param(3, (0, api_locale_1.Locale)()),
|
|
89
91
|
__metadata("design:type", Function),
|
|
90
|
-
__metadata("design:paramtypes", [Object, String, Object]),
|
|
92
|
+
__metadata("design:paramtypes", [Object, String, Object, String]),
|
|
91
93
|
__metadata("design:returntype", void 0)
|
|
92
94
|
], DashboardCoreController.prototype, "addWidget", null);
|
|
93
95
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-core.controller.js","sourceRoot":"","sources":["../../../src/dashboard/dashboard-core/dashboard-core.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAA0C;AAC1C,oDAA6C;AAC7C,2CAA4E;AAC5E,qEAAgE;AAIzD,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAClC,YAA6B,oBAA0C;QAA1C,yBAAoB,GAApB,oBAAoB,CAAsB;IAAG,CAAC;IAG3E,QAAQ,CAAgB,IAAY,EAAY,MAAM;QACpD,OAAO,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC1D,CAAC;IAGD,aAAa;QACX,OAAO,IAAI,CAAC,oBAAoB,CAAC,aAAa,EAAE,CAAC;IACnD,CAAC;IAGD,aAAa;QACX,OAAO,IAAI,CAAC,oBAAoB,CAAC,aAAa,EAAE,CAAC;IACnD,CAAC;IAGD,aAAa,CAAS,IAAI,EAAiB,IAAY;
|
|
1
|
+
{"version":3,"file":"dashboard-core.controller.js","sourceRoot":"","sources":["../../../src/dashboard/dashboard-core/dashboard-core.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAA0C;AAC1C,oDAA6C;AAC7C,2CAA4E;AAC5E,qEAAgE;AAIzD,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAClC,YAA6B,oBAA0C;QAA1C,yBAAoB,GAApB,oBAAoB,CAAsB;IAAG,CAAC;IAG3E,QAAQ,CAAgB,IAAY,EAAY,MAAM;QACpD,OAAO,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC1D,CAAC;IAGD,aAAa;QACX,OAAO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C,MAAM,CAAC,CAAA;IAAgB,WAAA,IAAA,mBAAM,GAAE,CAAA;;;;4DAEjE;AAGD;IADC,IAAA,aAAI,EAAC,cAAc,CAAC;IAElB,WAAA,IAAA,UAAI,GAAE,CAAA;IACN,WAAA,IAAA,cAAK,EAAC,MAAM,CAAC,CAAA;IACb,WAAA,IAAA,aAAI,GAAE,CAAA;;;;6DAGR;AAGD;IADC,IAAA,aAAI,EAAC,cAAc,CAAC;IAElB,WAAA,IAAA,UAAI,GAAE,CAAA;IACN,WAAA,IAAA,cAAK,EAAC,MAAM,CAAC,CAAA;IACb,WAAA,IAAA,aAAI,GAAE,CAAA;IACN,WAAA,IAAA,mBAAM,GAAE,CAAA;;;;wDAQV;AAGD;IADC,IAAA,eAAM,EAAC,wBAAwB,CAAC;IAE9B,WAAA,IAAA,UAAI,GAAE,CAAA;IACN,WAAA,IAAA,cAAK,EAAC,MAAM,CAAC,CAAA;IACb,WAAA,IAAA,cAAK,EAAC,UAAU,CAAC,CAAA;;;;2DAOnB;kCA1DU,uBAAuB;IAFnC,IAAA,UAAI,GAAE;IACN,IAAA,mBAAU,EAAC,gBAAgB,CAAC;qCAEwB,6CAAoB;GAD5D,uBAAuB,CA2DnC"}
|
|
@@ -7,6 +7,7 @@ export declare class DashboardCoreService {
|
|
|
7
7
|
dashboard_component_locale: {
|
|
8
8
|
name: string;
|
|
9
9
|
id: number;
|
|
10
|
+
description: string | null;
|
|
10
11
|
created_at: Date;
|
|
11
12
|
updated_at: Date;
|
|
12
13
|
locale_id: number;
|
|
@@ -19,12 +20,15 @@ export declare class DashboardCoreService {
|
|
|
19
20
|
created_at: Date;
|
|
20
21
|
updated_at: Date;
|
|
21
22
|
slug: string;
|
|
23
|
+
icon: string | null;
|
|
24
|
+
color: string | null;
|
|
22
25
|
min_width: number;
|
|
23
26
|
max_width: number | null;
|
|
24
27
|
min_height: number;
|
|
25
28
|
max_height: number | null;
|
|
26
29
|
height: number;
|
|
27
30
|
is_resizable: boolean;
|
|
31
|
+
stat_key: string | null;
|
|
28
32
|
};
|
|
29
33
|
dashboard_user: {
|
|
30
34
|
width: number;
|
|
@@ -55,24 +59,33 @@ export declare class DashboardCoreService {
|
|
|
55
59
|
totalRoles: number;
|
|
56
60
|
totalMenus: number;
|
|
57
61
|
totalRoutes: number;
|
|
62
|
+
totalModules: number;
|
|
63
|
+
totalSettings: number;
|
|
64
|
+
totalContacts: number;
|
|
58
65
|
}>;
|
|
59
66
|
getUserGrowth(): Promise<{
|
|
60
67
|
date: Date;
|
|
61
68
|
count: number;
|
|
62
69
|
}[]>;
|
|
63
|
-
getUserLayout(userId: number, slug: string): Promise<{
|
|
70
|
+
getUserLayout(userId: number, slug: string, localeCode: string): Promise<{
|
|
64
71
|
i: string;
|
|
65
72
|
component_id: number;
|
|
66
|
-
slug:
|
|
73
|
+
slug: any;
|
|
74
|
+
name: any;
|
|
75
|
+
description: any;
|
|
76
|
+
path: any;
|
|
77
|
+
icon: any;
|
|
78
|
+
stat_key: any;
|
|
79
|
+
color: any;
|
|
67
80
|
x: number;
|
|
68
81
|
y: number;
|
|
69
82
|
w: number;
|
|
70
83
|
h: number;
|
|
71
|
-
minW:
|
|
72
|
-
maxW:
|
|
73
|
-
minH:
|
|
74
|
-
maxH:
|
|
75
|
-
isResizable:
|
|
84
|
+
minW: any;
|
|
85
|
+
maxW: any;
|
|
86
|
+
minH: any;
|
|
87
|
+
maxH: any;
|
|
88
|
+
isResizable: any;
|
|
76
89
|
}[]>;
|
|
77
90
|
saveUserLayout(userId: number, slug: string, layout: Array<{
|
|
78
91
|
i: string;
|
|
@@ -83,10 +96,16 @@ export declare class DashboardCoreService {
|
|
|
83
96
|
}>): Promise<{
|
|
84
97
|
success: boolean;
|
|
85
98
|
}>;
|
|
86
|
-
addWidgetToUserDashboard(userId: number, slug: string, componentSlug: string): Promise<{
|
|
99
|
+
addWidgetToUserDashboard(userId: number, slug: string, componentSlug: string, localeCode: string): Promise<{
|
|
87
100
|
i: string;
|
|
88
101
|
component_id: number;
|
|
89
102
|
slug: string;
|
|
103
|
+
name: any;
|
|
104
|
+
description: any;
|
|
105
|
+
path: string;
|
|
106
|
+
icon: any;
|
|
107
|
+
stat_key: any;
|
|
108
|
+
color: any;
|
|
90
109
|
x: number;
|
|
91
110
|
y: number;
|
|
92
111
|
w: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-core.service.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard-core/dashboard-core.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,qBACa,oBAAoB;IACnB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAEnD,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"dashboard-core.service.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard-core/dashboard-core.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,qBACa,oBAAoB;IACnB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAEnD,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoBnC,aAAa;;;;;;;;;;;IAyCb,aAAa;;;;IAmBb,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;IA+D9D,cAAc,CAClB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,KAAK,CAAC;QACZ,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;KACX,CAAC;;;IA4DE,wBAAwB,CAC5B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;IAiHd,6BAA6B,CACjC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM;;;CAYnB"}
|
|
@@ -39,9 +39,7 @@ let DashboardCoreService = class DashboardCoreService {
|
|
|
39
39
|
const now = new Date();
|
|
40
40
|
const sevenDaysAgo = new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000);
|
|
41
41
|
const thirtyDaysAgo = new Date(now.getTime() - 30 * 24 * 60 * 60 * 1000);
|
|
42
|
-
// Total de usuários
|
|
43
42
|
const totalUsers = await this.prismaService.user.count();
|
|
44
|
-
// Usuários criados nos últimos 7 dias
|
|
45
43
|
const recentUsers = await this.prismaService.user.count({
|
|
46
44
|
where: {
|
|
47
45
|
created_at: {
|
|
@@ -49,7 +47,6 @@ let DashboardCoreService = class DashboardCoreService {
|
|
|
49
47
|
},
|
|
50
48
|
},
|
|
51
49
|
});
|
|
52
|
-
// Usuários ativos (criados nos últimos 30 dias como aproximação)
|
|
53
50
|
const activeUsers = await this.prismaService.user.count({
|
|
54
51
|
where: {
|
|
55
52
|
created_at: {
|
|
@@ -57,12 +54,12 @@ let DashboardCoreService = class DashboardCoreService {
|
|
|
57
54
|
},
|
|
58
55
|
},
|
|
59
56
|
});
|
|
60
|
-
// Total de roles
|
|
61
57
|
const totalRoles = await this.prismaService.role.count();
|
|
62
|
-
// Total de menus
|
|
63
58
|
const totalMenus = await this.prismaService.menu.count();
|
|
64
|
-
// Total de rotas
|
|
65
59
|
const totalRoutes = await this.prismaService.route.count();
|
|
60
|
+
const totalModules = await this.prismaService.dashboard_component.count();
|
|
61
|
+
const totalSettings = await this.prismaService.setting.count();
|
|
62
|
+
const totalContacts = await this.prismaService.person.count().catch(() => 0);
|
|
66
63
|
return {
|
|
67
64
|
totalUsers,
|
|
68
65
|
recentUsers,
|
|
@@ -70,12 +67,14 @@ let DashboardCoreService = class DashboardCoreService {
|
|
|
70
67
|
totalRoles,
|
|
71
68
|
totalMenus,
|
|
72
69
|
totalRoutes,
|
|
70
|
+
totalModules,
|
|
71
|
+
totalSettings,
|
|
72
|
+
totalContacts,
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
async getUserGrowth() {
|
|
76
76
|
const now = new Date();
|
|
77
77
|
const thirtyDaysAgo = new Date(now.getTime() - 30 * 24 * 60 * 60 * 1000);
|
|
78
|
-
// Contagem de usuários criados por dia nos últimos 30 dias
|
|
79
78
|
const usersByDay = await this.prismaService.$queryRaw `
|
|
80
79
|
SELECT DATE("created_at") as date, COUNT(*) as count
|
|
81
80
|
FROM "user"
|
|
@@ -88,55 +87,74 @@ let DashboardCoreService = class DashboardCoreService {
|
|
|
88
87
|
count: Number(item.count),
|
|
89
88
|
}));
|
|
90
89
|
}
|
|
91
|
-
async getUserLayout(userId, slug) {
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
async getUserLayout(userId, slug, localeCode) {
|
|
91
|
+
const dashboard = await this.prismaService.dashboard.findFirst({
|
|
92
|
+
where: { slug },
|
|
93
|
+
});
|
|
94
|
+
if (!dashboard) {
|
|
95
|
+
return [];
|
|
96
|
+
}
|
|
97
|
+
const userWidgets = await this.prismaService.dashboard_user.findMany({
|
|
94
98
|
where: {
|
|
95
|
-
|
|
96
|
-
|
|
99
|
+
user_id: userId,
|
|
100
|
+
dashboard_item: {
|
|
101
|
+
dashboard_id: dashboard.id,
|
|
97
102
|
},
|
|
98
103
|
},
|
|
99
104
|
include: {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
105
|
+
dashboard_item: {
|
|
106
|
+
include: {
|
|
107
|
+
dashboard_component: {
|
|
108
|
+
include: {
|
|
109
|
+
dashboard_component_locale: {
|
|
110
|
+
where: {
|
|
111
|
+
locale: {
|
|
112
|
+
code: localeCode,
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
103
118
|
},
|
|
104
119
|
},
|
|
105
|
-
dashboard_component: true,
|
|
106
120
|
},
|
|
107
121
|
});
|
|
108
|
-
return
|
|
109
|
-
var _a, _b
|
|
110
|
-
const
|
|
122
|
+
return userWidgets.map((userWidget) => {
|
|
123
|
+
var _a, _b;
|
|
124
|
+
const item = userWidget.dashboard_item;
|
|
125
|
+
const component = item.dashboard_component;
|
|
126
|
+
const locale = (_a = component.dashboard_component_locale) === null || _a === void 0 ? void 0 : _a[0];
|
|
111
127
|
return {
|
|
112
128
|
i: `widget-${item.id}`,
|
|
113
129
|
component_id: item.component_id,
|
|
114
|
-
slug:
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
130
|
+
slug: component.slug,
|
|
131
|
+
name: (locale === null || locale === void 0 ? void 0 : locale.name) || component.slug,
|
|
132
|
+
description: (locale === null || locale === void 0 ? void 0 : locale.description) || '',
|
|
133
|
+
path: component.path,
|
|
134
|
+
icon: component.icon || null,
|
|
135
|
+
stat_key: component.stat_key || null,
|
|
136
|
+
color: component.color || null,
|
|
137
|
+
x: userWidget.x_axis,
|
|
138
|
+
y: userWidget.y_axis,
|
|
139
|
+
w: userWidget.width,
|
|
140
|
+
h: userWidget.height,
|
|
141
|
+
minW: component.min_width,
|
|
142
|
+
maxW: component.max_width,
|
|
143
|
+
minH: component.min_height,
|
|
144
|
+
maxH: component.max_height,
|
|
145
|
+
isResizable: (_b = component.is_resizable) !== null && _b !== void 0 ? _b : true,
|
|
124
146
|
};
|
|
125
147
|
});
|
|
126
148
|
}
|
|
127
149
|
async saveUserLayout(userId, slug, layout) {
|
|
128
|
-
// Busca o dashboard
|
|
129
150
|
const dashboard = await this.prismaService.dashboard.findFirst({
|
|
130
151
|
where: { slug },
|
|
131
152
|
});
|
|
132
153
|
if (!dashboard) {
|
|
133
154
|
throw new Error(`Dashboard with slug '${slug}' not found`);
|
|
134
155
|
}
|
|
135
|
-
// Para cada item do layout, salva ou atualiza o dashboard_user
|
|
136
156
|
for (const item of layout) {
|
|
137
|
-
// Extrai o ID do item do identificador
|
|
138
157
|
const itemId = parseInt(item.i.replace('widget-', ''));
|
|
139
|
-
// Verifica se o item existe
|
|
140
158
|
const dashboardItem = await this.prismaService.dashboard_item.findFirst({
|
|
141
159
|
where: {
|
|
142
160
|
id: itemId,
|
|
@@ -146,7 +164,6 @@ let DashboardCoreService = class DashboardCoreService {
|
|
|
146
164
|
if (!dashboardItem) {
|
|
147
165
|
continue;
|
|
148
166
|
}
|
|
149
|
-
// Busca se já existe um dashboard_user para este item e usuário
|
|
150
167
|
const existingUserLayout = await this.prismaService.dashboard_user.findFirst({
|
|
151
168
|
where: {
|
|
152
169
|
item_id: itemId,
|
|
@@ -154,7 +171,6 @@ let DashboardCoreService = class DashboardCoreService {
|
|
|
154
171
|
},
|
|
155
172
|
});
|
|
156
173
|
if (existingUserLayout) {
|
|
157
|
-
// Atualiza o layout existente
|
|
158
174
|
await this.prismaService.dashboard_user.update({
|
|
159
175
|
where: {
|
|
160
176
|
id: existingUserLayout.id,
|
|
@@ -168,7 +184,6 @@ let DashboardCoreService = class DashboardCoreService {
|
|
|
168
184
|
});
|
|
169
185
|
}
|
|
170
186
|
else {
|
|
171
|
-
// Cria um novo layout de usuário
|
|
172
187
|
await this.prismaService.dashboard_user.create({
|
|
173
188
|
data: {
|
|
174
189
|
item_id: itemId,
|
|
@@ -183,30 +198,35 @@ let DashboardCoreService = class DashboardCoreService {
|
|
|
183
198
|
}
|
|
184
199
|
return { success: true };
|
|
185
200
|
}
|
|
186
|
-
async addWidgetToUserDashboard(userId, slug, componentSlug) {
|
|
187
|
-
var _a;
|
|
188
|
-
// Busca o dashboard
|
|
201
|
+
async addWidgetToUserDashboard(userId, slug, componentSlug, localeCode) {
|
|
202
|
+
var _a, _b;
|
|
189
203
|
const dashboard = await this.prismaService.dashboard.findFirst({
|
|
190
204
|
where: { slug },
|
|
191
205
|
});
|
|
192
206
|
if (!dashboard) {
|
|
193
207
|
throw new Error(`Dashboard with slug '${slug}' not found`);
|
|
194
208
|
}
|
|
195
|
-
// Busca o componente
|
|
196
209
|
const component = await this.prismaService.dashboard_component.findFirst({
|
|
197
210
|
where: { slug: componentSlug },
|
|
211
|
+
include: {
|
|
212
|
+
dashboard_component_locale: {
|
|
213
|
+
where: {
|
|
214
|
+
locale: {
|
|
215
|
+
code: localeCode,
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
},
|
|
198
220
|
});
|
|
199
221
|
if (!component) {
|
|
200
222
|
throw new Error(`Component with slug '${componentSlug}' not found`);
|
|
201
223
|
}
|
|
202
|
-
// Verifica se já existe um item para este componente no dashboard
|
|
203
224
|
let dashboardItem = await this.prismaService.dashboard_item.findFirst({
|
|
204
225
|
where: {
|
|
205
226
|
dashboard_id: dashboard.id,
|
|
206
227
|
component_id: component.id,
|
|
207
228
|
},
|
|
208
229
|
});
|
|
209
|
-
// Se não existe, cria um novo item
|
|
210
230
|
if (!dashboardItem) {
|
|
211
231
|
dashboardItem = await this.prismaService.dashboard_item.create({
|
|
212
232
|
data: {
|
|
@@ -219,7 +239,33 @@ let DashboardCoreService = class DashboardCoreService {
|
|
|
219
239
|
},
|
|
220
240
|
});
|
|
221
241
|
}
|
|
222
|
-
|
|
242
|
+
const existingUserWidget = await this.prismaService.dashboard_user.findFirst({
|
|
243
|
+
where: {
|
|
244
|
+
item_id: dashboardItem.id,
|
|
245
|
+
user_id: userId,
|
|
246
|
+
},
|
|
247
|
+
});
|
|
248
|
+
if (existingUserWidget) {
|
|
249
|
+
throw new Error('Widget already added to dashboard');
|
|
250
|
+
}
|
|
251
|
+
const maxYWidget = await this.prismaService.dashboard_user.findFirst({
|
|
252
|
+
where: {
|
|
253
|
+
user_id: userId,
|
|
254
|
+
dashboard_item: {
|
|
255
|
+
dashboard_id: dashboard.id,
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
orderBy: {
|
|
259
|
+
y_axis: 'desc',
|
|
260
|
+
},
|
|
261
|
+
include: {
|
|
262
|
+
dashboard_item: true,
|
|
263
|
+
},
|
|
264
|
+
});
|
|
265
|
+
let newY = 0;
|
|
266
|
+
if (maxYWidget) {
|
|
267
|
+
newY = maxYWidget.y_axis + maxYWidget.height;
|
|
268
|
+
}
|
|
223
269
|
const userLayout = await this.prismaService.dashboard_user.create({
|
|
224
270
|
data: {
|
|
225
271
|
item_id: dashboardItem.id,
|
|
@@ -227,13 +273,20 @@ let DashboardCoreService = class DashboardCoreService {
|
|
|
227
273
|
width: component.width,
|
|
228
274
|
height: component.height,
|
|
229
275
|
x_axis: 0,
|
|
230
|
-
y_axis:
|
|
276
|
+
y_axis: newY,
|
|
231
277
|
},
|
|
232
278
|
});
|
|
279
|
+
const locale = (_a = component.dashboard_component_locale) === null || _a === void 0 ? void 0 : _a[0];
|
|
233
280
|
return {
|
|
234
281
|
i: `widget-${dashboardItem.id}`,
|
|
235
282
|
component_id: component.id,
|
|
236
283
|
slug: component.slug,
|
|
284
|
+
name: (locale === null || locale === void 0 ? void 0 : locale.name) || component.slug,
|
|
285
|
+
description: (locale === null || locale === void 0 ? void 0 : locale.description) || '',
|
|
286
|
+
path: component.path,
|
|
287
|
+
icon: component.icon || null,
|
|
288
|
+
stat_key: component.stat_key || null,
|
|
289
|
+
color: component.color || null,
|
|
237
290
|
x: userLayout.x_axis,
|
|
238
291
|
y: userLayout.y_axis,
|
|
239
292
|
w: userLayout.width,
|
|
@@ -242,12 +295,11 @@ let DashboardCoreService = class DashboardCoreService {
|
|
|
242
295
|
maxW: component.max_width,
|
|
243
296
|
minH: component.min_height,
|
|
244
297
|
maxH: component.max_height,
|
|
245
|
-
isResizable: (
|
|
298
|
+
isResizable: (_b = component.is_resizable) !== null && _b !== void 0 ? _b : true,
|
|
246
299
|
};
|
|
247
300
|
}
|
|
248
301
|
async removeWidgetFromUserDashboard(userId, slug, widgetId) {
|
|
249
302
|
const itemId = parseInt(widgetId.replace('widget-', ''));
|
|
250
|
-
// Remove o dashboard_user
|
|
251
303
|
await this.prismaService.dashboard_user.deleteMany({
|
|
252
304
|
where: {
|
|
253
305
|
item_id: itemId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-core.service.js","sourceRoot":"","sources":["../../../src/dashboard/dashboard-core/dashboard-core.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAoD;AACpD,2CAA4C;AAGrC,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAA6B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAE7D,KAAK,CAAC,QAAQ,CAAC,IAAY,EAAE,IAAY;QACvC,OAAO,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,QAAQ,CAAC;YAChD,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,EAAE;YAC9B,OAAO,EAAE;gBACP,cAAc,EAAE,IAAI;gBACpB,mBAAmB,EAAE;oBACnB,OAAO,EAAE;wBACP,0BAA0B,EAAE;4BAC1B,KAAK,EAAE;gCACL,MAAM,EAAE;oCACN,IAAI;iCACL;6BACF;yBACF;qBACF;iBACF;aACF;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,aAAa;QACjB,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,YAAY,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;QACvE,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"dashboard-core.service.js","sourceRoot":"","sources":["../../../src/dashboard/dashboard-core/dashboard-core.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAoD;AACpD,2CAA4C;AAGrC,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAA6B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAE7D,KAAK,CAAC,QAAQ,CAAC,IAAY,EAAE,IAAY;QACvC,OAAO,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,QAAQ,CAAC;YAChD,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,EAAE;YAC9B,OAAO,EAAE;gBACP,cAAc,EAAE,IAAI;gBACpB,mBAAmB,EAAE;oBACnB,OAAO,EAAE;wBACP,0BAA0B,EAAE;4BAC1B,KAAK,EAAE;gCACL,MAAM,EAAE;oCACN,IAAI;iCACL;6BACF;yBACF;qBACF;iBACF;aACF;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,aAAa;QACjB,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,YAAY,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;QACvE,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;QACzE,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QACzD,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC;YACtD,KAAK,EAAE;gBACL,UAAU,EAAE;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|
|
26
26
|
created_at: Date;
|
|
27
27
|
updated_at: Date;
|
|
28
28
|
slug: string;
|
|
29
|
+
icon: string | null;
|
|
30
|
+
color: string | null;
|
|
29
31
|
min_width: number;
|
|
30
32
|
max_width: number | null;
|
|
31
33
|
min_height: number;
|
|
32
34
|
max_height: number | null;
|
|
33
35
|
height: number;
|
|
34
36
|
is_resizable: boolean;
|
|
37
|
+
stat_key: string | null;
|
|
35
38
|
};
|
|
36
39
|
} & {
|
|
37
40
|
width: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-item.controller.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard-item/dashboard-item.controller.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAE/C,qBAEa,uBAAuB;IAGhC,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBAApB,oBAAoB,EAAE,oBAAoB;IAI7D,oBAAoB,CACJ,gBAAgB,KAAA,EACpB,MAAM,EAAE,MAAM,EACF,WAAW,CAAC,EAAE,MAAM;;;;;;;;;IAO5C,mBAAmB,CAAS,IAAI,EAAE,sBAAsB,EAAY,MAAM,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"dashboard-item.controller.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard-item/dashboard-item.controller.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAE/C,qBAEa,uBAAuB;IAGhC,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBAApB,oBAAoB,EAAE,oBAAoB;IAI7D,oBAAoB,CACJ,gBAAgB,KAAA,EACpB,MAAM,EAAE,MAAM,EACF,WAAW,CAAC,EAAE,MAAM;;;;;;;;;IAO5C,mBAAmB,CAAS,IAAI,EAAE,sBAAsB,EAAY,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKlF,mBAAmB,CAA4B,EAAE,EAAE,MAAM,EAAY,MAAM,EAAE,MAAM;;;CAGpF"}
|