@hed-hog/core 0.0.150 → 0.0.152
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 +214 -9
- package/dist/dashboard/dashboard/dashboard.controller.d.ts.map +1 -1
- package/dist/dashboard/dashboard/dashboard.controller.js +35 -35
- package/dist/dashboard/dashboard/dashboard.controller.js.map +1 -1
- package/dist/dashboard/dashboard/dashboard.module.d.ts +1 -1
- package/dist/dashboard/dashboard/dashboard.module.d.ts.map +1 -1
- package/dist/dashboard/dashboard/dashboard.module.js +11 -6
- package/dist/dashboard/dashboard/dashboard.module.js.map +1 -1
- package/dist/dashboard/dashboard/dashboard.service.d.ts +217 -16
- package/dist/dashboard/dashboard/dashboard.service.d.ts.map +1 -1
- package/dist/dashboard/dashboard/dashboard.service.js +115 -28
- package/dist/dashboard/dashboard/dashboard.service.js.map +1 -1
- package/dist/dashboard/dashboard/dto/create.dto.d.ts +4 -2
- package/dist/dashboard/dashboard/dto/create.dto.d.ts.map +1 -1
- package/dist/dashboard/dashboard/dto/create.dto.js +10 -1
- package/dist/dashboard/dashboard/dto/create.dto.js.map +1 -1
- package/dist/dashboard/dashboard/dto/index.d.ts +5 -0
- package/dist/dashboard/dashboard/dto/index.d.ts.map +1 -0
- package/dist/dashboard/dashboard/dto/index.js +25 -0
- package/dist/dashboard/dashboard/dto/index.js.map +1 -0
- package/dist/dashboard/dashboard/dto/update.dto.d.ts +5 -4
- package/dist/dashboard/dashboard/dto/update.dto.d.ts.map +1 -1
- package/dist/dashboard/dashboard/dto/update.dto.js +27 -3
- package/dist/dashboard/dashboard/dto/update.dto.js.map +1 -1
- package/dist/dashboard/dashboard-component/dashboard-component.controller.d.ts +114 -9
- package/dist/dashboard/dashboard-component/dashboard-component.controller.d.ts.map +1 -1
- package/dist/dashboard/dashboard-component/dashboard-component.controller.js +35 -36
- package/dist/dashboard/dashboard-component/dashboard-component.controller.js.map +1 -1
- package/dist/dashboard/dashboard-component/dashboard-component.module.js +4 -3
- package/dist/dashboard/dashboard-component/dashboard-component.module.js.map +1 -1
- package/dist/dashboard/dashboard-component/dashboard-component.service.d.ts +116 -15
- package/dist/dashboard/dashboard-component/dashboard-component.service.d.ts.map +1 -1
- package/dist/dashboard/dashboard-component/dashboard-component.service.js +109 -22
- package/dist/dashboard/dashboard-component/dashboard-component.service.js.map +1 -1
- package/dist/dashboard/dashboard-component/dto/create.dto.d.ts +4 -2
- package/dist/dashboard/dashboard-component/dto/create.dto.d.ts.map +1 -1
- package/dist/dashboard/dashboard-component/dto/create.dto.js +10 -1
- package/dist/dashboard/dashboard-component/dto/create.dto.js.map +1 -1
- package/dist/dashboard/dashboard-component/dto/index.d.ts +5 -0
- package/dist/dashboard/dashboard-component/dto/index.d.ts.map +1 -0
- package/dist/dashboard/dashboard-component/dto/index.js +25 -0
- package/dist/dashboard/dashboard-component/dto/index.js.map +1 -0
- package/dist/dashboard/dashboard-component/dto/update.dto.d.ts +13 -4
- package/dist/dashboard/dashboard-component/dto/update.dto.d.ts.map +1 -1
- package/dist/dashboard/dashboard-component/dto/update.dto.js +67 -3
- package/dist/dashboard/dashboard-component/dto/update.dto.js.map +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.controller.d.ts +56 -0
- package/dist/dashboard/dashboard-core/dashboard-core.controller.d.ts.map +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.controller.js +65 -0
- package/dist/dashboard/dashboard-core/dashboard-core.controller.js.map +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.service.d.ts +52 -0
- package/dist/dashboard/dashboard-core/dashboard-core.service.d.ts.map +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.service.js +221 -0
- package/dist/dashboard/dashboard-core/dashboard-core.service.js.map +1 -1
- package/dist/dashboard/dashboard-item/dashboard-item.controller.d.ts +26 -29
- package/dist/dashboard/dashboard-item/dashboard-item.controller.d.ts.map +1 -1
- package/dist/dashboard/dashboard-item/dashboard-item.controller.js +24 -43
- package/dist/dashboard/dashboard-item/dashboard-item.controller.js.map +1 -1
- package/dist/dashboard/dashboard-item/dashboard-item.service.d.ts +30 -34
- package/dist/dashboard/dashboard-item/dashboard-item.service.d.ts.map +1 -1
- package/dist/dashboard/dashboard-item/dashboard-item.service.js +51 -35
- package/dist/dashboard/dashboard-item/dashboard-item.service.js.map +1 -1
- package/dist/dashboard/dashboard-item/dto/index.d.ts +5 -0
- package/dist/dashboard/dashboard-item/dto/index.d.ts.map +1 -0
- package/dist/dashboard/dashboard-item/dto/index.js +25 -0
- package/dist/dashboard/dashboard-item/dto/index.js.map +1 -0
- package/dist/dashboard/dashboard-item/dto/update.dto.d.ts +7 -4
- package/dist/dashboard/dashboard-item/dto/update.dto.d.ts.map +1 -1
- package/dist/dashboard/dashboard-item/dto/update.dto.js +42 -3
- package/dist/dashboard/dashboard-item/dto/update.dto.js.map +1 -1
- package/dist/dashboard/dashboard.module.js +1 -1
- package/dist/dashboard/dashboard.module.js.map +1 -1
- package/hedhog/data/route.yaml +44 -14
- package/hedhog/data/setting_group.yaml +11 -0
- package/hedhog/query/dashboard-seed.sql +131 -0
- package/package.json +4 -4
- package/src/dashboard/dashboard/dashboard.controller.ts +26 -23
- package/src/dashboard/dashboard/dashboard.module.ts +7 -2
- package/src/dashboard/dashboard/dashboard.service.ts +125 -44
- package/src/dashboard/dashboard/dto/create.dto.ts +12 -3
- package/src/dashboard/dashboard/dto/index.ts +7 -0
- package/src/dashboard/dashboard/dto/update.dto.ts +17 -3
- package/src/dashboard/dashboard-component/dashboard-component.controller.ts +22 -19
- package/src/dashboard/dashboard-component/dashboard-component.module.ts +3 -3
- package/src/dashboard/dashboard-component/dashboard-component.service.ts +128 -39
- package/src/dashboard/dashboard-component/dto/create.dto.ts +12 -3
- package/src/dashboard/dashboard-component/dto/index.ts +7 -0
- package/src/dashboard/dashboard-component/dto/update.dto.ts +49 -3
- package/src/dashboard/dashboard-core/dashboard-core.controller.ts +53 -2
- package/src/dashboard/dashboard-core/dashboard-core.service.ts +271 -0
- package/src/dashboard/dashboard-item/dashboard-item.controller.ts +17 -26
- package/src/dashboard/dashboard-item/dashboard-item.service.ts +55 -47
- package/src/dashboard/dashboard-item/dto/index.ts +7 -0
- package/src/dashboard/dashboard-item/dto/update.dto.ts +27 -3
- package/src/dashboard/dashboard.module.ts +2 -2
- package/src/language/en.json +4 -1
- package/src/language/pt.json +4 -1
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { DeleteDTO } from '@hed-hog/api';
|
|
2
1
|
import { DashboardService } from './dashboard.service';
|
|
3
|
-
import {
|
|
4
|
-
import { UpdateDTO } from './dto/update.dto';
|
|
2
|
+
import { CreateDashboardDTO, UpdateDashboardDTO } from './dto';
|
|
5
3
|
export declare class DashboardController {
|
|
6
4
|
private readonly dashboardService;
|
|
7
5
|
constructor(dashboardService: DashboardService);
|
|
8
|
-
|
|
6
|
+
getAllDashboards(paginationParams: any, locale: string): Promise<{
|
|
9
7
|
total: any;
|
|
10
8
|
lastPage: number;
|
|
11
9
|
page: number;
|
|
@@ -14,11 +12,218 @@ export declare class DashboardController {
|
|
|
14
12
|
next: number;
|
|
15
13
|
data: any[];
|
|
16
14
|
}>;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
getDashboard(id: number, locale: string): Promise<{
|
|
16
|
+
dashboard_item: ({
|
|
17
|
+
dashboard_component: {
|
|
18
|
+
dashboard_component_locale: ({
|
|
19
|
+
locale: {
|
|
20
|
+
code: string;
|
|
21
|
+
name: string;
|
|
22
|
+
region: string;
|
|
23
|
+
id: number;
|
|
24
|
+
created_at: Date;
|
|
25
|
+
updated_at: Date;
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
};
|
|
28
|
+
} & {
|
|
29
|
+
name: string;
|
|
30
|
+
id: number;
|
|
31
|
+
created_at: Date;
|
|
32
|
+
updated_at: Date;
|
|
33
|
+
locale_id: number;
|
|
34
|
+
dashboard_component_id: number;
|
|
35
|
+
})[];
|
|
36
|
+
} & {
|
|
37
|
+
path: string;
|
|
38
|
+
width: number;
|
|
39
|
+
id: number;
|
|
40
|
+
created_at: Date;
|
|
41
|
+
updated_at: Date;
|
|
42
|
+
slug: string;
|
|
43
|
+
min_width: number;
|
|
44
|
+
max_width: number | null;
|
|
45
|
+
min_height: number;
|
|
46
|
+
max_height: number | null;
|
|
47
|
+
height: number;
|
|
48
|
+
is_resizable: boolean;
|
|
49
|
+
};
|
|
50
|
+
} & {
|
|
51
|
+
width: number;
|
|
52
|
+
id: number;
|
|
53
|
+
created_at: Date;
|
|
54
|
+
updated_at: Date;
|
|
55
|
+
height: number;
|
|
56
|
+
component_id: number;
|
|
57
|
+
dashboard_id: number;
|
|
58
|
+
x_axis: number;
|
|
59
|
+
y_axis: number;
|
|
60
|
+
})[];
|
|
61
|
+
dashboard_locale: ({
|
|
62
|
+
locale: {
|
|
63
|
+
code: string;
|
|
64
|
+
name: string;
|
|
65
|
+
region: string;
|
|
66
|
+
id: number;
|
|
67
|
+
created_at: Date;
|
|
68
|
+
updated_at: Date;
|
|
69
|
+
enabled: boolean;
|
|
70
|
+
};
|
|
71
|
+
} & {
|
|
72
|
+
name: string;
|
|
73
|
+
id: number;
|
|
74
|
+
created_at: Date;
|
|
75
|
+
updated_at: Date;
|
|
76
|
+
locale_id: number;
|
|
77
|
+
dashboard_id: number;
|
|
78
|
+
})[];
|
|
79
|
+
} & {
|
|
80
|
+
id: number;
|
|
81
|
+
created_at: Date;
|
|
82
|
+
updated_at: Date;
|
|
83
|
+
slug: string;
|
|
84
|
+
}>;
|
|
85
|
+
createDashboard(data: CreateDashboardDTO, locale: string): Promise<{
|
|
86
|
+
dashboard_item: ({
|
|
87
|
+
dashboard_component: {
|
|
88
|
+
dashboard_component_locale: ({
|
|
89
|
+
locale: {
|
|
90
|
+
code: string;
|
|
91
|
+
name: string;
|
|
92
|
+
region: string;
|
|
93
|
+
id: number;
|
|
94
|
+
created_at: Date;
|
|
95
|
+
updated_at: Date;
|
|
96
|
+
enabled: boolean;
|
|
97
|
+
};
|
|
98
|
+
} & {
|
|
99
|
+
name: string;
|
|
100
|
+
id: number;
|
|
101
|
+
created_at: Date;
|
|
102
|
+
updated_at: Date;
|
|
103
|
+
locale_id: number;
|
|
104
|
+
dashboard_component_id: number;
|
|
105
|
+
})[];
|
|
106
|
+
} & {
|
|
107
|
+
path: string;
|
|
108
|
+
width: number;
|
|
109
|
+
id: number;
|
|
110
|
+
created_at: Date;
|
|
111
|
+
updated_at: Date;
|
|
112
|
+
slug: string;
|
|
113
|
+
min_width: number;
|
|
114
|
+
max_width: number | null;
|
|
115
|
+
min_height: number;
|
|
116
|
+
max_height: number | null;
|
|
117
|
+
height: number;
|
|
118
|
+
is_resizable: boolean;
|
|
119
|
+
};
|
|
120
|
+
} & {
|
|
121
|
+
width: number;
|
|
122
|
+
id: number;
|
|
123
|
+
created_at: Date;
|
|
124
|
+
updated_at: Date;
|
|
125
|
+
height: number;
|
|
126
|
+
component_id: number;
|
|
127
|
+
dashboard_id: number;
|
|
128
|
+
x_axis: number;
|
|
129
|
+
y_axis: number;
|
|
130
|
+
})[];
|
|
131
|
+
dashboard_locale: ({
|
|
132
|
+
locale: {
|
|
133
|
+
code: string;
|
|
134
|
+
name: string;
|
|
135
|
+
region: string;
|
|
136
|
+
id: number;
|
|
137
|
+
created_at: Date;
|
|
138
|
+
updated_at: Date;
|
|
139
|
+
enabled: boolean;
|
|
140
|
+
};
|
|
141
|
+
} & {
|
|
142
|
+
name: string;
|
|
143
|
+
id: number;
|
|
144
|
+
created_at: Date;
|
|
145
|
+
updated_at: Date;
|
|
146
|
+
locale_id: number;
|
|
147
|
+
dashboard_id: number;
|
|
148
|
+
})[];
|
|
149
|
+
} & {
|
|
150
|
+
id: number;
|
|
151
|
+
created_at: Date;
|
|
152
|
+
updated_at: Date;
|
|
153
|
+
slug: string;
|
|
154
|
+
}>;
|
|
155
|
+
updateDashboard(id: number, data: UpdateDashboardDTO, locale: string): Promise<{
|
|
156
|
+
dashboard_item: ({
|
|
157
|
+
dashboard_component: {
|
|
158
|
+
dashboard_component_locale: ({
|
|
159
|
+
locale: {
|
|
160
|
+
code: string;
|
|
161
|
+
name: string;
|
|
162
|
+
region: string;
|
|
163
|
+
id: number;
|
|
164
|
+
created_at: Date;
|
|
165
|
+
updated_at: Date;
|
|
166
|
+
enabled: boolean;
|
|
167
|
+
};
|
|
168
|
+
} & {
|
|
169
|
+
name: string;
|
|
170
|
+
id: number;
|
|
171
|
+
created_at: Date;
|
|
172
|
+
updated_at: Date;
|
|
173
|
+
locale_id: number;
|
|
174
|
+
dashboard_component_id: number;
|
|
175
|
+
})[];
|
|
176
|
+
} & {
|
|
177
|
+
path: string;
|
|
178
|
+
width: number;
|
|
179
|
+
id: number;
|
|
180
|
+
created_at: Date;
|
|
181
|
+
updated_at: Date;
|
|
182
|
+
slug: string;
|
|
183
|
+
min_width: number;
|
|
184
|
+
max_width: number | null;
|
|
185
|
+
min_height: number;
|
|
186
|
+
max_height: number | null;
|
|
187
|
+
height: number;
|
|
188
|
+
is_resizable: boolean;
|
|
189
|
+
};
|
|
190
|
+
} & {
|
|
191
|
+
width: number;
|
|
192
|
+
id: number;
|
|
193
|
+
created_at: Date;
|
|
194
|
+
updated_at: Date;
|
|
195
|
+
height: number;
|
|
196
|
+
component_id: number;
|
|
197
|
+
dashboard_id: number;
|
|
198
|
+
x_axis: number;
|
|
199
|
+
y_axis: number;
|
|
200
|
+
})[];
|
|
201
|
+
dashboard_locale: ({
|
|
202
|
+
locale: {
|
|
203
|
+
code: string;
|
|
204
|
+
name: string;
|
|
205
|
+
region: string;
|
|
206
|
+
id: number;
|
|
207
|
+
created_at: Date;
|
|
208
|
+
updated_at: Date;
|
|
209
|
+
enabled: boolean;
|
|
210
|
+
};
|
|
211
|
+
} & {
|
|
212
|
+
name: string;
|
|
213
|
+
id: number;
|
|
214
|
+
created_at: Date;
|
|
215
|
+
updated_at: Date;
|
|
216
|
+
locale_id: number;
|
|
217
|
+
dashboard_id: number;
|
|
218
|
+
})[];
|
|
219
|
+
} & {
|
|
220
|
+
id: number;
|
|
221
|
+
created_at: Date;
|
|
222
|
+
updated_at: Date;
|
|
223
|
+
slug: string;
|
|
224
|
+
}>;
|
|
225
|
+
deleteDashboard(id: number, locale: string): Promise<{
|
|
226
|
+
success: boolean;
|
|
22
227
|
}>;
|
|
23
228
|
}
|
|
24
229
|
//# sourceMappingURL=dashboard.controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.controller.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard/dashboard.controller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dashboard.controller.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard/dashboard.controller.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,OAAO,CAAC;AACf,qBAEa,mBAAmB;IAClB,OAAO,CAAC,QAAQ,CAAC,gBAAgB;gBAAhB,gBAAgB,EAAE,gBAAgB;IAG/D,gBAAgB,CAAe,gBAAgB,KAAA,EAAY,MAAM,EAAE,MAAM;;;;;;;;;IAKzE,YAAY,CAA4B,EAAE,EAAE,MAAM,EAAY,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAK5E,eAAe,CAAS,IAAI,EAAE,kBAAkB,EAAY,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAK1E,eAAe,CACc,EAAE,EAAE,MAAM,EAC7B,IAAI,EAAE,kBAAkB,EACtB,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAM1B,eAAe,CAA4B,EAAE,EAAE,MAAM,EAAY,MAAM,EAAE,MAAM;;;CAGhF"}
|
|
@@ -18,72 +18,72 @@ const api_locale_1 = require("@hed-hog/api-locale");
|
|
|
18
18
|
const api_pagination_1 = require("@hed-hog/api-pagination");
|
|
19
19
|
const common_1 = require("@nestjs/common");
|
|
20
20
|
const dashboard_service_1 = require("./dashboard.service");
|
|
21
|
-
const
|
|
22
|
-
const update_dto_1 = require("./dto/update.dto");
|
|
21
|
+
const dto_1 = require("./dto");
|
|
23
22
|
let DashboardController = class DashboardController {
|
|
24
23
|
constructor(dashboardService) {
|
|
25
24
|
this.dashboardService = dashboardService;
|
|
26
25
|
}
|
|
27
|
-
|
|
28
|
-
return this.dashboardService.
|
|
26
|
+
getAllDashboards(paginationParams, locale) {
|
|
27
|
+
return this.dashboardService.getAllDashboards(paginationParams, locale);
|
|
29
28
|
}
|
|
30
|
-
|
|
31
|
-
return this.dashboardService.
|
|
29
|
+
getDashboard(id, locale) {
|
|
30
|
+
return this.dashboardService.getDashboard(id, locale);
|
|
32
31
|
}
|
|
33
|
-
|
|
34
|
-
return this.dashboardService.
|
|
32
|
+
createDashboard(data, locale) {
|
|
33
|
+
return this.dashboardService.createDashboard(data, locale);
|
|
35
34
|
}
|
|
36
|
-
|
|
37
|
-
return this.dashboardService.
|
|
38
|
-
id,
|
|
39
|
-
data,
|
|
40
|
-
});
|
|
35
|
+
updateDashboard(id, data, locale) {
|
|
36
|
+
return this.dashboardService.updateDashboard(id, data, locale);
|
|
41
37
|
}
|
|
42
|
-
|
|
43
|
-
return this.dashboardService.
|
|
38
|
+
deleteDashboard(id, locale) {
|
|
39
|
+
return this.dashboardService.deleteDashboard(id, locale);
|
|
44
40
|
}
|
|
45
41
|
};
|
|
46
42
|
exports.DashboardController = DashboardController;
|
|
47
43
|
__decorate([
|
|
48
44
|
(0, common_1.Get)(),
|
|
49
|
-
__param(0, (0,
|
|
50
|
-
__param(1, (0,
|
|
45
|
+
__param(0, (0, api_pagination_1.Pagination)()),
|
|
46
|
+
__param(1, (0, api_locale_1.Locale)()),
|
|
51
47
|
__metadata("design:type", Function),
|
|
52
|
-
__metadata("design:paramtypes", [Object,
|
|
53
|
-
__metadata("design:returntype",
|
|
54
|
-
], DashboardController.prototype, "
|
|
48
|
+
__metadata("design:paramtypes", [Object, String]),
|
|
49
|
+
__metadata("design:returntype", void 0)
|
|
50
|
+
], DashboardController.prototype, "getAllDashboards", null);
|
|
55
51
|
__decorate([
|
|
56
52
|
(0, common_1.Get)(':id'),
|
|
57
53
|
__param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
|
|
54
|
+
__param(1, (0, api_locale_1.Locale)()),
|
|
58
55
|
__metadata("design:type", Function),
|
|
59
|
-
__metadata("design:paramtypes", [Number]),
|
|
60
|
-
__metadata("design:returntype",
|
|
61
|
-
], DashboardController.prototype, "
|
|
56
|
+
__metadata("design:paramtypes", [Number, String]),
|
|
57
|
+
__metadata("design:returntype", void 0)
|
|
58
|
+
], DashboardController.prototype, "getDashboard", null);
|
|
62
59
|
__decorate([
|
|
63
60
|
(0, common_1.Post)(),
|
|
64
61
|
__param(0, (0, common_1.Body)()),
|
|
62
|
+
__param(1, (0, api_locale_1.Locale)()),
|
|
65
63
|
__metadata("design:type", Function),
|
|
66
|
-
__metadata("design:paramtypes", [
|
|
67
|
-
__metadata("design:returntype",
|
|
68
|
-
], DashboardController.prototype, "
|
|
64
|
+
__metadata("design:paramtypes", [dto_1.CreateDashboardDTO, String]),
|
|
65
|
+
__metadata("design:returntype", void 0)
|
|
66
|
+
], DashboardController.prototype, "createDashboard", null);
|
|
69
67
|
__decorate([
|
|
70
68
|
(0, common_1.Patch)(':id'),
|
|
71
69
|
__param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
|
|
72
70
|
__param(1, (0, common_1.Body)()),
|
|
71
|
+
__param(2, (0, api_locale_1.Locale)()),
|
|
73
72
|
__metadata("design:type", Function),
|
|
74
|
-
__metadata("design:paramtypes", [Number,
|
|
75
|
-
__metadata("design:returntype",
|
|
76
|
-
], DashboardController.prototype, "
|
|
73
|
+
__metadata("design:paramtypes", [Number, dto_1.UpdateDashboardDTO, String]),
|
|
74
|
+
__metadata("design:returntype", void 0)
|
|
75
|
+
], DashboardController.prototype, "updateDashboard", null);
|
|
77
76
|
__decorate([
|
|
78
|
-
(0, common_1.Delete)(),
|
|
79
|
-
__param(0, (0, common_1.
|
|
77
|
+
(0, common_1.Delete)(':id'),
|
|
78
|
+
__param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
|
|
79
|
+
__param(1, (0, api_locale_1.Locale)()),
|
|
80
80
|
__metadata("design:type", Function),
|
|
81
|
-
__metadata("design:paramtypes", [
|
|
82
|
-
__metadata("design:returntype",
|
|
83
|
-
], DashboardController.prototype, "
|
|
81
|
+
__metadata("design:paramtypes", [Number, String]),
|
|
82
|
+
__metadata("design:returntype", void 0)
|
|
83
|
+
], DashboardController.prototype, "deleteDashboard", null);
|
|
84
84
|
exports.DashboardController = DashboardController = __decorate([
|
|
85
85
|
(0, api_1.Role)(),
|
|
86
|
-
(0, common_1.Controller)('
|
|
86
|
+
(0, common_1.Controller)('dashboard'),
|
|
87
87
|
__metadata("design:paramtypes", [dashboard_service_1.DashboardService])
|
|
88
88
|
], DashboardController);
|
|
89
89
|
//# sourceMappingURL=dashboard.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.controller.js","sourceRoot":"","sources":["../../../src/dashboard/dashboard/dashboard.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"dashboard.controller.js","sourceRoot":"","sources":["../../../src/dashboard/dashboard/dashboard.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAAoC;AACpC,oDAA6C;AAC7C,4DAAqD;AACrD,2CASwB;AACxB,2DAAuD;AACvD,+BAGe;AAGR,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,YAA6B,gBAAkC;QAAlC,qBAAgB,GAAhB,gBAAgB,CAAkB;IAAG,CAAC;IAGnE,gBAAgB,CAAe,gBAAgB,EAAY,MAAc;QACvE,OAAO,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;IAC1E,CAAC;IAGD,YAAY,CAA4B,EAAU,EAAY,MAAc;QAC1E,OAAO,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IACxD,CAAC;IAGD,eAAe,CAAS,IAAwB,EAAY,MAAc;QACxE,OAAO,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC7D,CAAC;IAGD,eAAe,CACc,EAAU,EAC7B,IAAwB,EACtB,MAAc;QAExB,OAAO,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACjE,CAAC;IAGD,eAAe,CAA4B,EAAU,EAAY,MAAc;QAC7E,OAAO,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAC3D,CAAC;CACF,CAAA;AA/BY,kDAAmB;AAI9B;IADC,IAAA,YAAG,GAAE;IACY,WAAA,IAAA,2BAAU,GAAE,CAAA;IAAoB,WAAA,IAAA,mBAAM,GAAE,CAAA;;;;2DAEzD;AAGD;IADC,IAAA,YAAG,EAAC,KAAK,CAAC;IACG,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IAAc,WAAA,IAAA,mBAAM,GAAE,CAAA;;;;uDAE5D;AAGD;IADC,IAAA,aAAI,GAAE;IACU,WAAA,IAAA,aAAI,GAAE,CAAA;IAA4B,WAAA,IAAA,mBAAM,GAAE,CAAA;;qCAA7B,wBAAkB;;0DAE/C;AAGD;IADC,IAAA,cAAK,EAAC,KAAK,CAAC;IAEV,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IACzB,WAAA,IAAA,aAAI,GAAE,CAAA;IACN,WAAA,IAAA,mBAAM,GAAE,CAAA;;6CADK,wBAAkB;;0DAIjC;AAGD;IADC,IAAA,eAAM,EAAC,KAAK,CAAC;IACG,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IAAc,WAAA,IAAA,mBAAM,GAAE,CAAA;;;;0DAE/D;8BA9BU,mBAAmB;IAF/B,IAAA,UAAI,GAAE;IACN,IAAA,mBAAU,EAAC,WAAW,CAAC;qCAEyB,oCAAgB;GADpD,mBAAmB,CA+B/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.module.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard/dashboard.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dashboard.module.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard/dashboard.module.ts"],"names":[],"mappings":"AAOA,qBAUa,mBAAmB;CAAG"}
|
|
@@ -6,21 +6,26 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.
|
|
9
|
+
exports.DashboardCrudModule = void 0;
|
|
10
10
|
const api_locale_1 = require("@hed-hog/api-locale");
|
|
11
|
+
const api_pagination_1 = require("@hed-hog/api-pagination");
|
|
11
12
|
const api_prisma_1 = require("@hed-hog/api-prisma");
|
|
12
13
|
const common_1 = require("@nestjs/common");
|
|
13
14
|
const dashboard_controller_1 = require("./dashboard.controller");
|
|
14
15
|
const dashboard_service_1 = require("./dashboard.service");
|
|
15
|
-
let
|
|
16
|
+
let DashboardCrudModule = class DashboardCrudModule {
|
|
16
17
|
};
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
18
|
+
exports.DashboardCrudModule = DashboardCrudModule;
|
|
19
|
+
exports.DashboardCrudModule = DashboardCrudModule = __decorate([
|
|
19
20
|
(0, common_1.Module)({
|
|
20
|
-
imports: [
|
|
21
|
+
imports: [
|
|
22
|
+
(0, common_1.forwardRef)(() => api_locale_1.LocaleModule),
|
|
23
|
+
(0, common_1.forwardRef)(() => api_prisma_1.PrismaModule),
|
|
24
|
+
(0, common_1.forwardRef)(() => api_pagination_1.PaginationModule),
|
|
25
|
+
],
|
|
21
26
|
controllers: [dashboard_controller_1.DashboardController],
|
|
22
27
|
providers: [dashboard_service_1.DashboardService],
|
|
23
28
|
exports: [(0, common_1.forwardRef)(() => dashboard_service_1.DashboardService)],
|
|
24
29
|
})
|
|
25
|
-
],
|
|
30
|
+
], DashboardCrudModule);
|
|
26
31
|
//# sourceMappingURL=dashboard.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.module.js","sourceRoot":"","sources":["../../../src/dashboard/dashboard/dashboard.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAmD;AACnD,oDAAmD;AACnD,2CAAoD;AACpD,iEAA6D;AAC7D,2DAAuD;
|
|
1
|
+
{"version":3,"file":"dashboard.module.js","sourceRoot":"","sources":["../../../src/dashboard/dashboard/dashboard.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAmD;AACnD,4DAA2D;AAC3D,oDAAmD;AACnD,2CAAoD;AACpD,iEAA6D;AAC7D,2DAAuD;AAYhD,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAAG,CAAA;AAAtB,kDAAmB;8BAAnB,mBAAmB;IAV/B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,yBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,yBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,iCAAgB,CAAC;SACnC;QACD,WAAW,EAAE,CAAC,0CAAmB,CAAC;QAClC,SAAS,EAAE,CAAC,oCAAgB,CAAC;QAC7B,OAAO,EAAE,CAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,oCAAgB,CAAC,CAAC;KAC9C,CAAC;GACW,mBAAmB,CAAG"}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import { DeleteDTO } from '@hed-hog/api';
|
|
2
1
|
import { LocaleService } from '@hed-hog/api-locale';
|
|
3
|
-
import {
|
|
2
|
+
import { PaginationService } from '@hed-hog/api-pagination';
|
|
4
3
|
import { PrismaService } from '@hed-hog/api-prisma';
|
|
5
|
-
import {
|
|
6
|
-
import { UpdateDTO } from './dto/update.dto';
|
|
4
|
+
import { CreateDashboardDTO, UpdateDashboardDTO } from './dto';
|
|
7
5
|
export declare class DashboardService {
|
|
8
|
-
private readonly localeService;
|
|
9
6
|
private readonly prismaService;
|
|
10
|
-
|
|
11
|
-
private readonly
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
private readonly paginationService;
|
|
8
|
+
private readonly localeService;
|
|
9
|
+
constructor(prismaService: PrismaService, paginationService: PaginationService, localeService: LocaleService);
|
|
10
|
+
getAllDashboards(paginationParams: any, locale: string): Promise<{
|
|
14
11
|
total: any;
|
|
15
12
|
lastPage: number;
|
|
16
13
|
page: number;
|
|
@@ -19,14 +16,218 @@ export declare class DashboardService {
|
|
|
19
16
|
next: number;
|
|
20
17
|
data: any[];
|
|
21
18
|
}>;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
getDashboard(id: number, locale: string): Promise<{
|
|
20
|
+
dashboard_item: ({
|
|
21
|
+
dashboard_component: {
|
|
22
|
+
dashboard_component_locale: ({
|
|
23
|
+
locale: {
|
|
24
|
+
code: string;
|
|
25
|
+
name: string;
|
|
26
|
+
region: string;
|
|
27
|
+
id: number;
|
|
28
|
+
created_at: Date;
|
|
29
|
+
updated_at: Date;
|
|
30
|
+
enabled: boolean;
|
|
31
|
+
};
|
|
32
|
+
} & {
|
|
33
|
+
name: string;
|
|
34
|
+
id: number;
|
|
35
|
+
created_at: Date;
|
|
36
|
+
updated_at: Date;
|
|
37
|
+
locale_id: number;
|
|
38
|
+
dashboard_component_id: number;
|
|
39
|
+
})[];
|
|
40
|
+
} & {
|
|
41
|
+
path: string;
|
|
42
|
+
width: number;
|
|
43
|
+
id: number;
|
|
44
|
+
created_at: Date;
|
|
45
|
+
updated_at: Date;
|
|
46
|
+
slug: string;
|
|
47
|
+
min_width: number;
|
|
48
|
+
max_width: number | null;
|
|
49
|
+
min_height: number;
|
|
50
|
+
max_height: number | null;
|
|
51
|
+
height: number;
|
|
52
|
+
is_resizable: boolean;
|
|
53
|
+
};
|
|
54
|
+
} & {
|
|
55
|
+
width: number;
|
|
56
|
+
id: number;
|
|
57
|
+
created_at: Date;
|
|
58
|
+
updated_at: Date;
|
|
59
|
+
height: number;
|
|
60
|
+
component_id: number;
|
|
61
|
+
dashboard_id: number;
|
|
62
|
+
x_axis: number;
|
|
63
|
+
y_axis: number;
|
|
64
|
+
})[];
|
|
65
|
+
dashboard_locale: ({
|
|
66
|
+
locale: {
|
|
67
|
+
code: string;
|
|
68
|
+
name: string;
|
|
69
|
+
region: string;
|
|
70
|
+
id: number;
|
|
71
|
+
created_at: Date;
|
|
72
|
+
updated_at: Date;
|
|
73
|
+
enabled: boolean;
|
|
74
|
+
};
|
|
75
|
+
} & {
|
|
76
|
+
name: string;
|
|
77
|
+
id: number;
|
|
78
|
+
created_at: Date;
|
|
79
|
+
updated_at: Date;
|
|
80
|
+
locale_id: number;
|
|
81
|
+
dashboard_id: number;
|
|
82
|
+
})[];
|
|
83
|
+
} & {
|
|
84
|
+
id: number;
|
|
85
|
+
created_at: Date;
|
|
86
|
+
updated_at: Date;
|
|
87
|
+
slug: string;
|
|
88
|
+
}>;
|
|
89
|
+
createDashboard(data: CreateDashboardDTO, locale: string): Promise<{
|
|
90
|
+
dashboard_item: ({
|
|
91
|
+
dashboard_component: {
|
|
92
|
+
dashboard_component_locale: ({
|
|
93
|
+
locale: {
|
|
94
|
+
code: string;
|
|
95
|
+
name: string;
|
|
96
|
+
region: string;
|
|
97
|
+
id: number;
|
|
98
|
+
created_at: Date;
|
|
99
|
+
updated_at: Date;
|
|
100
|
+
enabled: boolean;
|
|
101
|
+
};
|
|
102
|
+
} & {
|
|
103
|
+
name: string;
|
|
104
|
+
id: number;
|
|
105
|
+
created_at: Date;
|
|
106
|
+
updated_at: Date;
|
|
107
|
+
locale_id: number;
|
|
108
|
+
dashboard_component_id: number;
|
|
109
|
+
})[];
|
|
110
|
+
} & {
|
|
111
|
+
path: string;
|
|
112
|
+
width: number;
|
|
113
|
+
id: number;
|
|
114
|
+
created_at: Date;
|
|
115
|
+
updated_at: Date;
|
|
116
|
+
slug: string;
|
|
117
|
+
min_width: number;
|
|
118
|
+
max_width: number | null;
|
|
119
|
+
min_height: number;
|
|
120
|
+
max_height: number | null;
|
|
121
|
+
height: number;
|
|
122
|
+
is_resizable: boolean;
|
|
123
|
+
};
|
|
124
|
+
} & {
|
|
125
|
+
width: number;
|
|
126
|
+
id: number;
|
|
127
|
+
created_at: Date;
|
|
128
|
+
updated_at: Date;
|
|
129
|
+
height: number;
|
|
130
|
+
component_id: number;
|
|
131
|
+
dashboard_id: number;
|
|
132
|
+
x_axis: number;
|
|
133
|
+
y_axis: number;
|
|
134
|
+
})[];
|
|
135
|
+
dashboard_locale: ({
|
|
136
|
+
locale: {
|
|
137
|
+
code: string;
|
|
138
|
+
name: string;
|
|
139
|
+
region: string;
|
|
140
|
+
id: number;
|
|
141
|
+
created_at: Date;
|
|
142
|
+
updated_at: Date;
|
|
143
|
+
enabled: boolean;
|
|
144
|
+
};
|
|
145
|
+
} & {
|
|
146
|
+
name: string;
|
|
147
|
+
id: number;
|
|
148
|
+
created_at: Date;
|
|
149
|
+
updated_at: Date;
|
|
150
|
+
locale_id: number;
|
|
151
|
+
dashboard_id: number;
|
|
152
|
+
})[];
|
|
153
|
+
} & {
|
|
25
154
|
id: number;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
155
|
+
created_at: Date;
|
|
156
|
+
updated_at: Date;
|
|
157
|
+
slug: string;
|
|
158
|
+
}>;
|
|
159
|
+
updateDashboard(id: number, data: UpdateDashboardDTO, locale: string): Promise<{
|
|
160
|
+
dashboard_item: ({
|
|
161
|
+
dashboard_component: {
|
|
162
|
+
dashboard_component_locale: ({
|
|
163
|
+
locale: {
|
|
164
|
+
code: string;
|
|
165
|
+
name: string;
|
|
166
|
+
region: string;
|
|
167
|
+
id: number;
|
|
168
|
+
created_at: Date;
|
|
169
|
+
updated_at: Date;
|
|
170
|
+
enabled: boolean;
|
|
171
|
+
};
|
|
172
|
+
} & {
|
|
173
|
+
name: string;
|
|
174
|
+
id: number;
|
|
175
|
+
created_at: Date;
|
|
176
|
+
updated_at: Date;
|
|
177
|
+
locale_id: number;
|
|
178
|
+
dashboard_component_id: number;
|
|
179
|
+
})[];
|
|
180
|
+
} & {
|
|
181
|
+
path: string;
|
|
182
|
+
width: number;
|
|
183
|
+
id: number;
|
|
184
|
+
created_at: Date;
|
|
185
|
+
updated_at: Date;
|
|
186
|
+
slug: string;
|
|
187
|
+
min_width: number;
|
|
188
|
+
max_width: number | null;
|
|
189
|
+
min_height: number;
|
|
190
|
+
max_height: number | null;
|
|
191
|
+
height: number;
|
|
192
|
+
is_resizable: boolean;
|
|
193
|
+
};
|
|
194
|
+
} & {
|
|
195
|
+
width: number;
|
|
196
|
+
id: number;
|
|
197
|
+
created_at: Date;
|
|
198
|
+
updated_at: Date;
|
|
199
|
+
height: number;
|
|
200
|
+
component_id: number;
|
|
201
|
+
dashboard_id: number;
|
|
202
|
+
x_axis: number;
|
|
203
|
+
y_axis: number;
|
|
204
|
+
})[];
|
|
205
|
+
dashboard_locale: ({
|
|
206
|
+
locale: {
|
|
207
|
+
code: string;
|
|
208
|
+
name: string;
|
|
209
|
+
region: string;
|
|
210
|
+
id: number;
|
|
211
|
+
created_at: Date;
|
|
212
|
+
updated_at: Date;
|
|
213
|
+
enabled: boolean;
|
|
214
|
+
};
|
|
215
|
+
} & {
|
|
216
|
+
name: string;
|
|
217
|
+
id: number;
|
|
218
|
+
created_at: Date;
|
|
219
|
+
updated_at: Date;
|
|
220
|
+
locale_id: number;
|
|
221
|
+
dashboard_id: number;
|
|
222
|
+
})[];
|
|
223
|
+
} & {
|
|
224
|
+
id: number;
|
|
225
|
+
created_at: Date;
|
|
226
|
+
updated_at: Date;
|
|
227
|
+
slug: string;
|
|
228
|
+
}>;
|
|
229
|
+
deleteDashboard(id: number, locale: string): Promise<{
|
|
230
|
+
success: boolean;
|
|
30
231
|
}>;
|
|
31
232
|
}
|
|
32
233
|
//# sourceMappingURL=dashboard.service.d.ts.map
|