@hed-hog/core 0.0.169 → 0.0.171

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.
Files changed (74) hide show
  1. package/dist/dashboard/dashboard/dashboard.controller.d.ts +3 -15
  2. package/dist/dashboard/dashboard/dashboard.controller.d.ts.map +1 -1
  3. package/dist/dashboard/dashboard/dashboard.service.d.ts +3 -15
  4. package/dist/dashboard/dashboard/dashboard.service.d.ts.map +1 -1
  5. package/dist/dashboard/dashboard-component/dashboard-component.controller.d.ts +17 -20
  6. package/dist/dashboard/dashboard-component/dashboard-component.controller.d.ts.map +1 -1
  7. package/dist/dashboard/dashboard-component/dashboard-component.controller.js +15 -3
  8. package/dist/dashboard/dashboard-component/dashboard-component.controller.js.map +1 -1
  9. package/dist/dashboard/dashboard-component/dashboard-component.service.d.ts +15 -22
  10. package/dist/dashboard/dashboard-component/dashboard-component.service.d.ts.map +1 -1
  11. package/dist/dashboard/dashboard-component/dashboard-component.service.js +83 -12
  12. package/dist/dashboard/dashboard-component/dashboard-component.service.js.map +1 -1
  13. package/dist/dashboard/dashboard-component/dto/create.dto.d.ts +0 -4
  14. package/dist/dashboard/dashboard-component/dto/create.dto.d.ts.map +1 -1
  15. package/dist/dashboard/dashboard-component/dto/create.dto.js +0 -19
  16. package/dist/dashboard/dashboard-component/dto/create.dto.js.map +1 -1
  17. package/dist/dashboard/dashboard-component/dto/update.dto.d.ts +0 -4
  18. package/dist/dashboard/dashboard-component/dto/update.dto.d.ts.map +1 -1
  19. package/dist/dashboard/dashboard-component/dto/update.dto.js +0 -20
  20. package/dist/dashboard/dashboard-component/dto/update.dto.js.map +1 -1
  21. package/dist/dashboard/dashboard-component-role/dashboard-component-role.controller.d.ts +122 -0
  22. package/dist/dashboard/dashboard-component-role/dashboard-component-role.controller.d.ts.map +1 -0
  23. package/dist/dashboard/dashboard-component-role/dashboard-component-role.controller.js +83 -0
  24. package/dist/dashboard/dashboard-component-role/dashboard-component-role.controller.js.map +1 -0
  25. package/dist/dashboard/dashboard-component-role/dashboard-component-role.module.d.ts +3 -0
  26. package/dist/dashboard/dashboard-component-role/dashboard-component-role.module.d.ts.map +1 -0
  27. package/dist/dashboard/dashboard-component-role/dashboard-component-role.module.js +26 -0
  28. package/dist/dashboard/dashboard-component-role/dashboard-component-role.module.js.map +1 -0
  29. package/dist/dashboard/dashboard-component-role/dashboard-component-role.service.d.ts +125 -0
  30. package/dist/dashboard/dashboard-component-role/dashboard-component-role.service.d.ts.map +1 -0
  31. package/dist/dashboard/dashboard-component-role/dashboard-component-role.service.js +143 -0
  32. package/dist/dashboard/dashboard-component-role/dashboard-component-role.service.js.map +1 -0
  33. package/dist/dashboard/dashboard-component-role/dto/create.dto.d.ts +5 -0
  34. package/dist/dashboard/dashboard-component-role/dto/create.dto.d.ts.map +1 -0
  35. package/dist/dashboard/dashboard-component-role/dto/create.dto.js +25 -0
  36. package/dist/dashboard/dashboard-component-role/dto/create.dto.js.map +1 -0
  37. package/dist/dashboard/dashboard-component-role/dto/index.d.ts +2 -0
  38. package/dist/dashboard/dashboard-component-role/dto/index.d.ts.map +1 -0
  39. package/dist/dashboard/dashboard-component-role/dto/index.js +18 -0
  40. package/dist/dashboard/dashboard-component-role/dto/index.js.map +1 -0
  41. package/dist/dashboard/dashboard-core/dashboard-core.controller.d.ts +36 -22
  42. package/dist/dashboard/dashboard-core/dashboard-core.controller.d.ts.map +1 -1
  43. package/dist/dashboard/dashboard-core/dashboard-core.controller.js +0 -9
  44. package/dist/dashboard/dashboard-core/dashboard-core.controller.js.map +1 -1
  45. package/dist/dashboard/dashboard-core/dashboard-core.service.d.ts +36 -22
  46. package/dist/dashboard/dashboard-core/dashboard-core.service.d.ts.map +1 -1
  47. package/dist/dashboard/dashboard-core/dashboard-core.service.js +123 -51
  48. package/dist/dashboard/dashboard-core/dashboard-core.service.js.map +1 -1
  49. package/dist/dashboard/dashboard-item/dashboard-item.controller.d.ts +0 -4
  50. package/dist/dashboard/dashboard-item/dashboard-item.controller.d.ts.map +1 -1
  51. package/dist/dashboard/dashboard-item/dashboard-item.service.d.ts +0 -4
  52. package/dist/dashboard/dashboard-item/dashboard-item.service.d.ts.map +1 -1
  53. package/dist/dashboard/dashboard.module.d.ts.map +1 -1
  54. package/dist/dashboard/dashboard.module.js +2 -0
  55. package/dist/dashboard/dashboard.module.js.map +1 -1
  56. package/hedhog/data/dashboard_component.yaml +16 -16
  57. package/hedhog/data/dashboard_component_role.yaml +48 -0
  58. package/hedhog/data/dashboard_item.yaml +28 -28
  59. package/hedhog/data/menu.yaml +3 -3
  60. package/hedhog/data/route.yaml +30 -0
  61. package/hedhog/table/dashboard_component_role.yaml +16 -0
  62. package/package.json +2 -2
  63. package/src/dashboard/dashboard-component/dashboard-component.controller.ts +12 -3
  64. package/src/dashboard/dashboard-component/dashboard-component.service.ts +104 -14
  65. package/src/dashboard/dashboard-component/dto/create.dto.ts +0 -15
  66. package/src/dashboard/dashboard-component/dto/update.dto.ts +0 -16
  67. package/src/dashboard/dashboard-component-role/dashboard-component-role.controller.ts +57 -0
  68. package/src/dashboard/dashboard-component-role/dashboard-component-role.module.ts +13 -0
  69. package/src/dashboard/dashboard-component-role/dashboard-component-role.service.ts +170 -0
  70. package/src/dashboard/dashboard-component-role/dto/create.dto.ts +9 -0
  71. package/src/dashboard/dashboard-component-role/dto/index.ts +1 -0
  72. package/src/dashboard/dashboard-core/dashboard-core.controller.ts +0 -5
  73. package/src/dashboard/dashboard-core/dashboard-core.service.ts +152 -54
  74. package/src/dashboard/dashboard.module.ts +2 -0
@@ -28,28 +28,24 @@ export declare class DashboardController {
28
28
  } & {
29
29
  name: string;
30
30
  id: number;
31
- description: string | null;
31
+ description: string;
32
32
  created_at: Date;
33
33
  updated_at: Date;
34
34
  locale_id: number;
35
35
  dashboard_component_id: number;
36
36
  })[];
37
37
  } & {
38
- path: string;
39
38
  width: number;
40
39
  id: number;
41
40
  created_at: Date;
42
41
  updated_at: Date;
43
42
  slug: string;
44
- icon: string | null;
45
- color: string | null;
46
43
  min_width: number;
47
44
  max_width: number | null;
48
45
  min_height: number;
49
46
  max_height: number | null;
50
47
  height: number;
51
48
  is_resizable: boolean;
52
- stat_key: string | null;
53
49
  };
54
50
  } & {
55
51
  width: number;
@@ -102,28 +98,24 @@ export declare class DashboardController {
102
98
  } & {
103
99
  name: string;
104
100
  id: number;
105
- description: string | null;
101
+ description: string;
106
102
  created_at: Date;
107
103
  updated_at: Date;
108
104
  locale_id: number;
109
105
  dashboard_component_id: number;
110
106
  })[];
111
107
  } & {
112
- path: string;
113
108
  width: number;
114
109
  id: number;
115
110
  created_at: Date;
116
111
  updated_at: Date;
117
112
  slug: string;
118
- icon: string | null;
119
- color: string | null;
120
113
  min_width: number;
121
114
  max_width: number | null;
122
115
  min_height: number;
123
116
  max_height: number | null;
124
117
  height: number;
125
118
  is_resizable: boolean;
126
- stat_key: string | null;
127
119
  };
128
120
  } & {
129
121
  width: number;
@@ -176,28 +168,24 @@ export declare class DashboardController {
176
168
  } & {
177
169
  name: string;
178
170
  id: number;
179
- description: string | null;
171
+ description: string;
180
172
  created_at: Date;
181
173
  updated_at: Date;
182
174
  locale_id: number;
183
175
  dashboard_component_id: number;
184
176
  })[];
185
177
  } & {
186
- path: string;
187
178
  width: number;
188
179
  id: number;
189
180
  created_at: Date;
190
181
  updated_at: Date;
191
182
  slug: string;
192
- icon: string | null;
193
- color: string | null;
194
183
  min_width: number;
195
184
  max_width: number | null;
196
185
  min_height: number;
197
186
  max_height: number | null;
198
187
  height: number;
199
188
  is_resizable: boolean;
200
- stat_key: string | null;
201
189
  };
202
190
  } & {
203
191
  width: number;
@@ -1 +1 @@
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,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Y,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"}
@@ -30,28 +30,24 @@ export declare class DashboardService {
30
30
  } & {
31
31
  name: string;
32
32
  id: number;
33
- description: string | null;
33
+ description: string;
34
34
  created_at: Date;
35
35
  updated_at: Date;
36
36
  locale_id: number;
37
37
  dashboard_component_id: number;
38
38
  })[];
39
39
  } & {
40
- path: string;
41
40
  width: number;
42
41
  id: number;
43
42
  created_at: Date;
44
43
  updated_at: Date;
45
44
  slug: string;
46
- icon: string | null;
47
- color: string | null;
48
45
  min_width: number;
49
46
  max_width: number | null;
50
47
  min_height: number;
51
48
  max_height: number | null;
52
49
  height: number;
53
50
  is_resizable: boolean;
54
- stat_key: string | null;
55
51
  };
56
52
  } & {
57
53
  width: number;
@@ -104,28 +100,24 @@ export declare class DashboardService {
104
100
  } & {
105
101
  name: string;
106
102
  id: number;
107
- description: string | null;
103
+ description: string;
108
104
  created_at: Date;
109
105
  updated_at: Date;
110
106
  locale_id: number;
111
107
  dashboard_component_id: number;
112
108
  })[];
113
109
  } & {
114
- path: string;
115
110
  width: number;
116
111
  id: number;
117
112
  created_at: Date;
118
113
  updated_at: Date;
119
114
  slug: string;
120
- icon: string | null;
121
- color: string | null;
122
115
  min_width: number;
123
116
  max_width: number | null;
124
117
  min_height: number;
125
118
  max_height: number | null;
126
119
  height: number;
127
120
  is_resizable: boolean;
128
- stat_key: string | null;
129
121
  };
130
122
  } & {
131
123
  width: number;
@@ -178,28 +170,24 @@ export declare class DashboardService {
178
170
  } & {
179
171
  name: string;
180
172
  id: number;
181
- description: string | null;
173
+ description: string;
182
174
  created_at: Date;
183
175
  updated_at: Date;
184
176
  locale_id: number;
185
177
  dashboard_component_id: number;
186
178
  })[];
187
179
  } & {
188
- path: string;
189
180
  width: number;
190
181
  id: number;
191
182
  created_at: Date;
192
183
  updated_at: Date;
193
184
  slug: string;
194
- icon: string | null;
195
- color: string | null;
196
185
  min_width: number;
197
186
  max_width: number | null;
198
187
  min_height: number;
199
188
  max_height: number | null;
200
189
  height: number;
201
190
  is_resizable: boolean;
202
- stat_key: string | null;
203
191
  };
204
192
  } & {
205
193
  width: number;
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard.service.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard/dashboard.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAE/D,qBACa,gBAAgB;IAGzB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB;IAEjD,gBAAgB,CAAC,gBAAgB,KAAA;;;;;;;;;IA0CjC,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkCvC,eAAe,CAAC,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4BxD,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiCpE,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;CAgBjD"}
1
+ {"version":3,"file":"dashboard.service.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard/dashboard.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAE/D,qBACa,gBAAgB;IAGzB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB;IAEjD,gBAAgB,CAAC,gBAAgB,KAAA;;;;;;;;;IA0CjC,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkCvC,eAAe,CAAC,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4BxD,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiCpE,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;CAgBjD"}
@@ -12,7 +12,20 @@ export declare class DashboardComponentController {
12
12
  next: number;
13
13
  data: any[];
14
14
  }>;
15
- getComponent(id: number, locale: string): Promise<{
15
+ getAllComponentsByUserRole(paginationParams: any, { id }: {
16
+ id: any;
17
+ }): Promise<{
18
+ total: any;
19
+ lastPage: number;
20
+ page: number;
21
+ pageSize: number;
22
+ prev: number;
23
+ next: number;
24
+ data: any[];
25
+ }>;
26
+ getComponent(id: number, locale: string, { id: userId }: {
27
+ id: any;
28
+ }): Promise<{
16
29
  dashboard_component_locale: ({
17
30
  locale: {
18
31
  code: string;
@@ -26,28 +39,24 @@ export declare class DashboardComponentController {
26
39
  } & {
27
40
  name: string;
28
41
  id: number;
29
- description: string | null;
42
+ description: string;
30
43
  created_at: Date;
31
44
  updated_at: Date;
32
45
  locale_id: number;
33
46
  dashboard_component_id: number;
34
47
  })[];
35
48
  } & {
36
- path: string;
37
49
  width: number;
38
50
  id: number;
39
51
  created_at: Date;
40
52
  updated_at: Date;
41
53
  slug: string;
42
- icon: string | null;
43
- color: string | null;
44
54
  min_width: number;
45
55
  max_width: number | null;
46
56
  min_height: number;
47
57
  max_height: number | null;
48
58
  height: number;
49
59
  is_resizable: boolean;
50
- stat_key: string | null;
51
60
  }>;
52
61
  createComponent(data: CreateDashboardComponentDTO, locale: string): Promise<{
53
62
  dashboard_component_locale: ({
@@ -63,28 +72,24 @@ export declare class DashboardComponentController {
63
72
  } & {
64
73
  name: string;
65
74
  id: number;
66
- description: string | null;
75
+ description: string;
67
76
  created_at: Date;
68
77
  updated_at: Date;
69
78
  locale_id: number;
70
79
  dashboard_component_id: number;
71
80
  })[];
72
81
  } & {
73
- path: string;
74
82
  width: number;
75
83
  id: number;
76
84
  created_at: Date;
77
85
  updated_at: Date;
78
86
  slug: string;
79
- icon: string | null;
80
- color: string | null;
81
87
  min_width: number;
82
88
  max_width: number | null;
83
89
  min_height: number;
84
90
  max_height: number | null;
85
91
  height: number;
86
92
  is_resizable: boolean;
87
- stat_key: string | null;
88
93
  }>;
89
94
  updateComponent(id: number, data: UpdateDashboardComponentDTO, locale: string): Promise<{
90
95
  dashboard_component_locale: ({
@@ -100,45 +105,37 @@ export declare class DashboardComponentController {
100
105
  } & {
101
106
  name: string;
102
107
  id: number;
103
- description: string | null;
108
+ description: string;
104
109
  created_at: Date;
105
110
  updated_at: Date;
106
111
  locale_id: number;
107
112
  dashboard_component_id: number;
108
113
  })[];
109
114
  } & {
110
- path: string;
111
115
  width: number;
112
116
  id: number;
113
117
  created_at: Date;
114
118
  updated_at: Date;
115
119
  slug: string;
116
- icon: string | null;
117
- color: string | null;
118
120
  min_width: number;
119
121
  max_width: number | null;
120
122
  min_height: number;
121
123
  max_height: number | null;
122
124
  height: number;
123
125
  is_resizable: boolean;
124
- stat_key: string | null;
125
126
  }>;
126
127
  deleteComponent(id: number, locale: string): Promise<{
127
- path: string;
128
128
  width: number;
129
129
  id: number;
130
130
  created_at: Date;
131
131
  updated_at: Date;
132
132
  slug: string;
133
- icon: string | null;
134
- color: string | null;
135
133
  min_width: number;
136
134
  max_width: number | null;
137
135
  min_height: number;
138
136
  max_height: number | null;
139
137
  height: number;
140
138
  is_resizable: boolean;
141
- stat_key: string | null;
142
139
  }>;
143
140
  }
144
141
  //# sourceMappingURL=dashboard-component.controller.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard-component.controller.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard-component/dashboard-component.controller.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC5B,MAAM,OAAO,CAAC;AAEf,qBAEa,4BAA4B;IAGrC,OAAO,CAAC,QAAQ,CAAC,yBAAyB;gBAAzB,yBAAyB,EAAE,yBAAyB;IAIvE,gBAAgB,CAAe,gBAAgB,KAAA;;;;;;;;;IAK/C,YAAY,CAA4B,EAAE,EAAE,MAAM,EAAY,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAK5E,eAAe,CAAS,IAAI,EAAE,2BAA2B,EAAY,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKnF,eAAe,CACc,EAAE,EAAE,MAAM,EAC7B,IAAI,EAAE,2BAA2B,EAC/B,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAM1B,eAAe,CAA4B,EAAE,EAAE,MAAM,EAAY,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;CAGhF"}
1
+ {"version":3,"file":"dashboard-component.controller.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard-component/dashboard-component.controller.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC5B,MAAM,OAAO,CAAC;AAEf,qBAEa,4BAA4B;IAGrC,OAAO,CAAC,QAAQ,CAAC,yBAAyB;gBAAzB,yBAAyB,EAAE,yBAAyB;IAIvE,gBAAgB,CAAe,gBAAgB,KAAA;;;;;;;;;IAK/C,0BAA0B,CAAe,gBAAgB,KAAA,EAAU,EAAE,EAAE,EAAE;;KAAA;;;;;;;;;IAKzE,YAAY,CACiB,EAAE,EAAE,MAAM,EAC3B,MAAM,EAAE,MAAM,EAChB,EAAE,EAAE,EAAE,MAAM,EAAE;;KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMxB,eAAe,CAAS,IAAI,EAAE,2BAA2B,EAAY,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKnF,eAAe,CACc,EAAE,EAAE,MAAM,EAC7B,IAAI,EAAE,2BAA2B,EAC/B,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAM1B,eAAe,CAA4B,EAAE,EAAE,MAAM,EAAY,MAAM,EAAE,MAAM;;;;;;;;;;;;;CAGhF"}
@@ -26,8 +26,11 @@ let DashboardComponentController = class DashboardComponentController {
26
26
  getAllComponents(paginationParams) {
27
27
  return this.dashboardComponentService.getAllComponents(paginationParams);
28
28
  }
29
- getComponent(id, locale) {
30
- return this.dashboardComponentService.getComponent(id, locale);
29
+ getAllComponentsByUserRole(paginationParams, { id }) {
30
+ return this.dashboardComponentService.getAllComponentsByUserRole(paginationParams, id);
31
+ }
32
+ getComponent(id, locale, { id: userId }) {
33
+ return this.dashboardComponentService.getComponent(id, locale, userId);
31
34
  }
32
35
  createComponent(data, locale) {
33
36
  return this.dashboardComponentService.createComponent(data, locale);
@@ -47,12 +50,21 @@ __decorate([
47
50
  __metadata("design:paramtypes", [Object]),
48
51
  __metadata("design:returntype", void 0)
49
52
  ], DashboardComponentController.prototype, "getAllComponents", null);
53
+ __decorate([
54
+ (0, common_1.Get)('user'),
55
+ __param(0, (0, api_pagination_1.Pagination)()),
56
+ __param(1, (0, api_1.User)()),
57
+ __metadata("design:type", Function),
58
+ __metadata("design:paramtypes", [Object, Object]),
59
+ __metadata("design:returntype", void 0)
60
+ ], DashboardComponentController.prototype, "getAllComponentsByUserRole", null);
50
61
  __decorate([
51
62
  (0, common_1.Get)(':id'),
52
63
  __param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
53
64
  __param(1, (0, api_locale_1.Locale)()),
65
+ __param(2, (0, api_1.User)()),
54
66
  __metadata("design:type", Function),
55
- __metadata("design:paramtypes", [Number, String]),
67
+ __metadata("design:paramtypes", [Number, String, Object]),
56
68
  __metadata("design:returntype", void 0)
57
69
  ], DashboardComponentController.prototype, "getComponent", null);
58
70
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard-component.controller.js","sourceRoot":"","sources":["../../../src/dashboard/dashboard-component/dashboard-component.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAAoC;AACpC,oDAA6C;AAC7C,4DAAqD;AACrD,2CAWwB;AACxB,+EAA0E;AAC1E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AAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IACzB,WAAA,IAAA,aAAI,GAAE,CAAA;IACN,WAAA,IAAA,mBAAM,GAAE,CAAA;;6CADK,iCAA2B;;mEAI1C;AAGD;IADC,IAAA,eAAM,EAAC,KAAK,CAAC;IACG,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IAAc,WAAA,IAAA,mBAAM,GAAE,CAAA;;;;mEAE/D;uCAjCU,4BAA4B;IAFxC,IAAA,UAAI,GAAE;IACN,IAAA,mBAAU,EAAC,qBAAqB,CAAC;IAG7B,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,uDAAyB,CAAC,CAAC,CAAA;qCACR,uDAAyB;GAH5D,4BAA4B,CAkCxC"}
1
+ {"version":3,"file":"dashboard-component.controller.js","sourceRoot":"","sources":["../../../src/dashboard/dashboard-component/dashboard-component.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAA0C;AAC1C,oDAA6C;AAC7C,4DAAqD;AACrD,2CAWwB;AACxB,+EAA0E;AAC1E,+BAGe;AAIR,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IACvC,YAEmB,yBAAoD;QAApD,8BAAyB,GAAzB,yBAAyB,CAA2B;IACpE,CAAC;IAGJ,gBAAgB,CAAe,gBAAgB;QAC7C,OAAO,IAAI,CAAC,yBAAyB,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAC3E,CAAC;IAGD,0BAA0B,CAAe,gBAAgB,EAAU,EAAE,EAAE,EAAE;QACvE,OAAO,IAAI,CAAC,yBAAyB,CAAC,0BAA0B,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;IACzF,CAAC;IAGD,YAAY,CACiB,EAAU,EAC3B,MAAc,EAChB,EAAE,EAAE,EAAE,MAAM,EAAE;QAEtB,OAAO,IAAI,CAAC,yBAAyB,CAAC,YAAY,CAAC,EAAE,EAAE,MAA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AK,CAAC;IACG,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IAAc,WAAA,IAAA,mBAAM,GAAE,CAAA;;;;mEAE/D;uCA1CU,4BAA4B;IAFxC,IAAA,UAAI,GAAE;IACN,IAAA,mBAAU,EAAC,qBAAqB,CAAC;IAG7B,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,uDAAyB,CAAC,CAAC,CAAA;qCACR,uDAAyB;GAH5D,4BAA4B,CA2CxC"}
@@ -1,11 +1,11 @@
1
- import { PaginationService } from '@hed-hog/api-pagination';
1
+ import { PaginationDTO, PaginationService } from '@hed-hog/api-pagination';
2
2
  import { PrismaService } from '@hed-hog/api-prisma';
3
3
  import { CreateDashboardComponentDTO, UpdateDashboardComponentDTO } from './dto';
4
4
  export declare class DashboardComponentService {
5
5
  private readonly prismaService;
6
6
  private readonly paginationService;
7
7
  constructor(prismaService: PrismaService, paginationService: PaginationService);
8
- getAllComponents(paginationParams: any): Promise<{
8
+ getAllComponents(paginationParams: PaginationDTO): Promise<{
9
9
  total: any;
10
10
  lastPage: number;
11
11
  page: number;
@@ -14,7 +14,16 @@ export declare class DashboardComponentService {
14
14
  next: number;
15
15
  data: any[];
16
16
  }>;
17
- getComponent(id: number, locale: string): Promise<{
17
+ getAllComponentsByUserRole(paginationParams: PaginationDTO, userId: number): Promise<{
18
+ total: any;
19
+ lastPage: number;
20
+ page: number;
21
+ pageSize: number;
22
+ prev: number;
23
+ next: number;
24
+ data: any[];
25
+ }>;
26
+ getComponent(id: number, locale: string, userId?: number): Promise<{
18
27
  dashboard_component_locale: ({
19
28
  locale: {
20
29
  code: string;
@@ -28,28 +37,24 @@ export declare class DashboardComponentService {
28
37
  } & {
29
38
  name: string;
30
39
  id: number;
31
- description: string | null;
40
+ description: string;
32
41
  created_at: Date;
33
42
  updated_at: Date;
34
43
  locale_id: number;
35
44
  dashboard_component_id: number;
36
45
  })[];
37
46
  } & {
38
- path: string;
39
47
  width: number;
40
48
  id: number;
41
49
  created_at: Date;
42
50
  updated_at: Date;
43
51
  slug: string;
44
- icon: string | null;
45
- color: string | null;
46
52
  min_width: number;
47
53
  max_width: number | null;
48
54
  min_height: number;
49
55
  max_height: number | null;
50
56
  height: number;
51
57
  is_resizable: boolean;
52
- stat_key: string | null;
53
58
  }>;
54
59
  createComponent(data: CreateDashboardComponentDTO, locale: string): Promise<{
55
60
  dashboard_component_locale: ({
@@ -65,28 +70,24 @@ export declare class DashboardComponentService {
65
70
  } & {
66
71
  name: string;
67
72
  id: number;
68
- description: string | null;
73
+ description: string;
69
74
  created_at: Date;
70
75
  updated_at: Date;
71
76
  locale_id: number;
72
77
  dashboard_component_id: number;
73
78
  })[];
74
79
  } & {
75
- path: string;
76
80
  width: number;
77
81
  id: number;
78
82
  created_at: Date;
79
83
  updated_at: Date;
80
84
  slug: string;
81
- icon: string | null;
82
- color: string | null;
83
85
  min_width: number;
84
86
  max_width: number | null;
85
87
  min_height: number;
86
88
  max_height: number | null;
87
89
  height: number;
88
90
  is_resizable: boolean;
89
- stat_key: string | null;
90
91
  }>;
91
92
  updateComponent(id: number, data: UpdateDashboardComponentDTO, locale: string): Promise<{
92
93
  dashboard_component_locale: ({
@@ -102,45 +103,37 @@ export declare class DashboardComponentService {
102
103
  } & {
103
104
  name: string;
104
105
  id: number;
105
- description: string | null;
106
+ description: string;
106
107
  created_at: Date;
107
108
  updated_at: Date;
108
109
  locale_id: number;
109
110
  dashboard_component_id: number;
110
111
  })[];
111
112
  } & {
112
- path: string;
113
113
  width: number;
114
114
  id: number;
115
115
  created_at: Date;
116
116
  updated_at: Date;
117
117
  slug: string;
118
- icon: string | null;
119
- color: string | null;
120
118
  min_width: number;
121
119
  max_width: number | null;
122
120
  min_height: number;
123
121
  max_height: number | null;
124
122
  height: number;
125
123
  is_resizable: boolean;
126
- stat_key: string | null;
127
124
  }>;
128
125
  deleteComponent(id: number, locale: string): Promise<{
129
- path: string;
130
126
  width: number;
131
127
  id: number;
132
128
  created_at: Date;
133
129
  updated_at: Date;
134
130
  slug: string;
135
- icon: string | null;
136
- color: string | null;
137
131
  min_width: number;
138
132
  max_width: number | null;
139
133
  min_height: number;
140
134
  max_height: number | null;
141
135
  height: number;
142
136
  is_resizable: boolean;
143
- stat_key: string | null;
144
137
  }>;
145
138
  }
146
139
  //# sourceMappingURL=dashboard-component.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard-component.service.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard-component/dashboard-component.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAOpD,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC5B,MAAM,OAAO,CAAC;AACf,qBACa,yBAAyB;IAGlC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB;IAGjD,gBAAgB,CAAC,gBAAgB,KAAA;;;;;;;;;IA0CjC,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqBvC,eAAe,CAAC,IAAI,EAAE,2BAA2B,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwCjE,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,2BAA2B,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA6C7E,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;CAejD"}
1
+ {"version":3,"file":"dashboard-component.service.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard-component/dashboard-component.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAOpD,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC5B,MAAM,OAAO,CAAC;AACf,qBACa,yBAAyB;IAGlC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB;IAGjD,gBAAgB,CAAC,gBAAgB,EAAE,aAAa;;;;;;;;;IA0ChD,0BAA0B,CAAC,gBAAgB,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM;;;;;;;;;IA8D1E,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyDxD,eAAe,CAAC,IAAI,EAAE,2BAA2B,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoCjE,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,2BAA2B,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyC7E,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;CAejD"}
@@ -46,14 +46,93 @@ let DashboardComponentService = class DashboardComponentService {
46
46
  },
47
47
  },
48
48
  where: {
49
- OR
49
+ OR,
50
50
  },
51
51
  orderBy: {
52
52
  created_at: 'desc',
53
53
  },
54
54
  }, 'dashboardComponent');
55
55
  }
56
- async getComponent(id, locale) {
56
+ async getAllComponentsByUserRole(paginationParams, userId) {
57
+ const userRoles = await this.prismaService.role_user.findMany({
58
+ where: { user_id: userId },
59
+ select: { role_id: true },
60
+ });
61
+ const userRoleIds = userRoles.map((ur) => ur.role_id);
62
+ const fields = ['slug'];
63
+ const OR = this.prismaService.createInsensitiveSearch(fields, paginationParams);
64
+ if (paginationParams.search) {
65
+ OR.push({
66
+ dashboard_component_locale: {
67
+ some: {
68
+ name: {
69
+ contains: paginationParams.search,
70
+ mode: 'insensitive',
71
+ },
72
+ },
73
+ },
74
+ });
75
+ }
76
+ return this.paginationService.paginate(this.prismaService.dashboard_component, paginationParams, {
77
+ include: {
78
+ dashboard_component_locale: {
79
+ include: {
80
+ locale: true,
81
+ },
82
+ },
83
+ },
84
+ where: {
85
+ AND: [
86
+ {
87
+ dashboard_component_role: {
88
+ some: {
89
+ role_id: {
90
+ in: userRoleIds,
91
+ },
92
+ },
93
+ },
94
+ },
95
+ {
96
+ OR,
97
+ },
98
+ ],
99
+ },
100
+ orderBy: {
101
+ created_at: 'desc',
102
+ },
103
+ }, 'dashboardComponent');
104
+ }
105
+ async getComponent(id, locale, userId) {
106
+ if (userId) {
107
+ const userRoles = await this.prismaService.user_role.findMany({
108
+ where: { user_id: userId },
109
+ select: { role_id: true },
110
+ });
111
+ const userRoleIds = userRoles.map((ur) => ur.role_id);
112
+ const component = await this.prismaService.dashboard_component.findFirst({
113
+ where: {
114
+ id,
115
+ dashboard_component_role: {
116
+ some: {
117
+ role_id: {
118
+ in: userRoleIds,
119
+ },
120
+ },
121
+ },
122
+ },
123
+ include: {
124
+ dashboard_component_locale: {
125
+ include: {
126
+ locale: true,
127
+ },
128
+ },
129
+ },
130
+ });
131
+ if (!component) {
132
+ throw new common_1.NotFoundException((0, api_locale_1.getLocaleText)('dashboardComponentNotFound', locale, 'Dashboard component not found'));
133
+ }
134
+ return component;
135
+ }
57
136
  const component = await this.prismaService.dashboard_component.findUnique({
58
137
  where: { id },
59
138
  include: {
@@ -74,7 +153,6 @@ let DashboardComponentService = class DashboardComponentService {
74
153
  const component = await this.prismaService.dashboard_component.create({
75
154
  data: {
76
155
  slug: data.slug,
77
- path: data.path,
78
156
  min_width: data.min_width,
79
157
  max_width: data.max_width,
80
158
  min_height: data.min_height,
@@ -82,9 +160,6 @@ let DashboardComponentService = class DashboardComponentService {
82
160
  width: data.width,
83
161
  height: data.height,
84
162
  is_resizable: (_a = data.is_resizable) !== null && _a !== void 0 ? _a : true,
85
- stat_key: data.stat_key || null,
86
- icon: data.icon || null,
87
- color: data.color || null,
88
163
  },
89
164
  });
90
165
  if (data.locale) {
@@ -98,7 +173,7 @@ let DashboardComponentService = class DashboardComponentService {
98
173
  dashboard_component_id: component.id,
99
174
  locale_id: localeRecord.id,
100
175
  name: localeData.name,
101
- description: localeData.description || null,
176
+ description: localeData.description || '',
102
177
  },
103
178
  });
104
179
  }
@@ -111,7 +186,6 @@ let DashboardComponentService = class DashboardComponentService {
111
186
  where: { id },
112
187
  data: {
113
188
  slug: data.slug,
114
- path: data.path,
115
189
  min_width: data.min_width,
116
190
  max_width: data.max_width,
117
191
  min_height: data.min_height,
@@ -119,9 +193,6 @@ let DashboardComponentService = class DashboardComponentService {
119
193
  width: data.width,
120
194
  height: data.height,
121
195
  is_resizable: data.is_resizable,
122
- stat_key: data.stat_key,
123
- icon: data.icon,
124
- color: data.color,
125
196
  },
126
197
  });
127
198
  if (data.locale) {
@@ -138,7 +209,7 @@ let DashboardComponentService = class DashboardComponentService {
138
209
  dashboard_component_id: id,
139
210
  locale_id: localeRecord.id,
140
211
  name: localeData.name,
141
- description: localeData.description || null,
212
+ description: localeData.description || '',
142
213
  },
143
214
  });
144
215
  }