@hed-hog/core 0.0.170 → 0.0.172
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-component/dashboard-component.controller.d.ts +70 -1
- package/dist/dashboard/dashboard-component/dashboard-component.controller.d.ts.map +1 -1
- package/dist/dashboard/dashboard-component/dashboard-component.controller.js +13 -3
- package/dist/dashboard/dashboard-component/dashboard-component.controller.js.map +1 -1
- package/dist/dashboard/dashboard-component/dashboard-component.service.d.ts +70 -1
- package/dist/dashboard/dashboard-component/dashboard-component.service.d.ts.map +1 -1
- package/dist/dashboard/dashboard-component/dashboard-component.service.js +33 -4
- package/dist/dashboard/dashboard-component/dashboard-component.service.js.map +1 -1
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.controller.d.ts +122 -0
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.controller.d.ts.map +1 -0
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.controller.js +83 -0
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.controller.js.map +1 -0
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.module.d.ts +3 -0
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.module.d.ts.map +1 -0
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.module.js +26 -0
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.module.js.map +1 -0
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.service.d.ts +125 -0
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.service.d.ts.map +1 -0
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.service.js +143 -0
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.service.js.map +1 -0
- package/dist/dashboard/dashboard-component-role/dto/create.dto.d.ts +5 -0
- package/dist/dashboard/dashboard-component-role/dto/create.dto.d.ts.map +1 -0
- package/dist/dashboard/dashboard-component-role/dto/create.dto.js +25 -0
- package/dist/dashboard/dashboard-component-role/dto/create.dto.js.map +1 -0
- package/dist/dashboard/dashboard-component-role/dto/index.d.ts +2 -0
- package/dist/dashboard/dashboard-component-role/dto/index.d.ts.map +1 -0
- package/dist/dashboard/dashboard-component-role/dto/index.js +18 -0
- package/dist/dashboard/dashboard-component-role/dto/index.js.map +1 -0
- package/dist/dashboard/dashboard-core/dashboard-core.controller.d.ts +15 -9
- package/dist/dashboard/dashboard-core/dashboard-core.controller.d.ts.map +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.controller.js +13 -4
- package/dist/dashboard/dashboard-core/dashboard-core.controller.js.map +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.service.d.ts +16 -9
- package/dist/dashboard/dashboard-core/dashboard-core.service.d.ts.map +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.service.js +52 -38
- package/dist/dashboard/dashboard-core/dashboard-core.service.js.map +1 -1
- package/dist/dashboard/dashboard.module.d.ts.map +1 -1
- package/dist/dashboard/dashboard.module.js +2 -0
- package/dist/dashboard/dashboard.module.js.map +1 -1
- package/hedhog/data/role.yaml +14 -0
- package/hedhog/data/route.yaml +34 -4
- package/package.json +4 -4
- package/src/dashboard/dashboard-component/dashboard-component.controller.ts +7 -2
- package/src/dashboard/dashboard-component/dashboard-component.service.ts +44 -4
- package/src/dashboard/dashboard-component-role/dashboard-component-role.controller.ts +57 -0
- package/src/dashboard/dashboard-component-role/dashboard-component-role.module.ts +13 -0
- package/src/dashboard/dashboard-component-role/dashboard-component-role.service.ts +170 -0
- package/src/dashboard/dashboard-component-role/dto/create.dto.ts +9 -0
- package/src/dashboard/dashboard-component-role/dto/index.ts +1 -0
- package/src/dashboard/dashboard-core/dashboard-core.controller.ts +8 -3
- package/src/dashboard/dashboard-core/dashboard-core.service.ts +61 -46
- package/src/dashboard/dashboard.module.ts +2 -0
|
@@ -3,7 +3,16 @@ import { CreateDashboardComponentDTO, UpdateDashboardComponentDTO } from './dto'
|
|
|
3
3
|
export declare class DashboardComponentController {
|
|
4
4
|
private readonly dashboardComponentService;
|
|
5
5
|
constructor(dashboardComponentService: DashboardComponentService);
|
|
6
|
-
getAllComponents(paginationParams: any
|
|
6
|
+
getAllComponents(paginationParams: any): Promise<{
|
|
7
|
+
total: any;
|
|
8
|
+
lastPage: number;
|
|
9
|
+
page: number;
|
|
10
|
+
pageSize: number;
|
|
11
|
+
prev: number;
|
|
12
|
+
next: number;
|
|
13
|
+
data: any[];
|
|
14
|
+
}>;
|
|
15
|
+
getAllComponentsByUserRole(paginationParams: any, { id }: {
|
|
7
16
|
id: any;
|
|
8
17
|
}): Promise<{
|
|
9
18
|
total: any;
|
|
@@ -17,6 +26,26 @@ export declare class DashboardComponentController {
|
|
|
17
26
|
getComponent(id: number, locale: string, { id: userId }: {
|
|
18
27
|
id: any;
|
|
19
28
|
}): Promise<{
|
|
29
|
+
dashboard_component_locale: ({
|
|
30
|
+
locale: {
|
|
31
|
+
code: string;
|
|
32
|
+
name: string;
|
|
33
|
+
region: string;
|
|
34
|
+
id: number;
|
|
35
|
+
created_at: Date;
|
|
36
|
+
updated_at: Date;
|
|
37
|
+
enabled: boolean;
|
|
38
|
+
};
|
|
39
|
+
} & {
|
|
40
|
+
name: string;
|
|
41
|
+
id: number;
|
|
42
|
+
description: string;
|
|
43
|
+
created_at: Date;
|
|
44
|
+
updated_at: Date;
|
|
45
|
+
locale_id: number;
|
|
46
|
+
dashboard_component_id: number;
|
|
47
|
+
})[];
|
|
48
|
+
} & {
|
|
20
49
|
width: number;
|
|
21
50
|
id: number;
|
|
22
51
|
created_at: Date;
|
|
@@ -30,6 +59,26 @@ export declare class DashboardComponentController {
|
|
|
30
59
|
is_resizable: boolean;
|
|
31
60
|
}>;
|
|
32
61
|
createComponent(data: CreateDashboardComponentDTO, locale: string): Promise<{
|
|
62
|
+
dashboard_component_locale: ({
|
|
63
|
+
locale: {
|
|
64
|
+
code: string;
|
|
65
|
+
name: string;
|
|
66
|
+
region: string;
|
|
67
|
+
id: number;
|
|
68
|
+
created_at: Date;
|
|
69
|
+
updated_at: Date;
|
|
70
|
+
enabled: boolean;
|
|
71
|
+
};
|
|
72
|
+
} & {
|
|
73
|
+
name: string;
|
|
74
|
+
id: number;
|
|
75
|
+
description: string;
|
|
76
|
+
created_at: Date;
|
|
77
|
+
updated_at: Date;
|
|
78
|
+
locale_id: number;
|
|
79
|
+
dashboard_component_id: number;
|
|
80
|
+
})[];
|
|
81
|
+
} & {
|
|
33
82
|
width: number;
|
|
34
83
|
id: number;
|
|
35
84
|
created_at: Date;
|
|
@@ -43,6 +92,26 @@ export declare class DashboardComponentController {
|
|
|
43
92
|
is_resizable: boolean;
|
|
44
93
|
}>;
|
|
45
94
|
updateComponent(id: number, data: UpdateDashboardComponentDTO, locale: string): Promise<{
|
|
95
|
+
dashboard_component_locale: ({
|
|
96
|
+
locale: {
|
|
97
|
+
code: string;
|
|
98
|
+
name: string;
|
|
99
|
+
region: string;
|
|
100
|
+
id: number;
|
|
101
|
+
created_at: Date;
|
|
102
|
+
updated_at: Date;
|
|
103
|
+
enabled: boolean;
|
|
104
|
+
};
|
|
105
|
+
} & {
|
|
106
|
+
name: string;
|
|
107
|
+
id: number;
|
|
108
|
+
description: string;
|
|
109
|
+
created_at: Date;
|
|
110
|
+
updated_at: Date;
|
|
111
|
+
locale_id: number;
|
|
112
|
+
dashboard_component_id: number;
|
|
113
|
+
})[];
|
|
114
|
+
} & {
|
|
46
115
|
width: number;
|
|
47
116
|
id: number;
|
|
48
117
|
created_at: Date;
|
|
@@ -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,EAAU,EAAE,EAAE,EAAE;;KAAA;;;;;;;;;
|
|
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"}
|
|
@@ -23,8 +23,11 @@ let DashboardComponentController = class DashboardComponentController {
|
|
|
23
23
|
constructor(dashboardComponentService) {
|
|
24
24
|
this.dashboardComponentService = dashboardComponentService;
|
|
25
25
|
}
|
|
26
|
-
getAllComponents(paginationParams
|
|
27
|
-
return this.dashboardComponentService.getAllComponents(paginationParams
|
|
26
|
+
getAllComponents(paginationParams) {
|
|
27
|
+
return this.dashboardComponentService.getAllComponents(paginationParams);
|
|
28
|
+
}
|
|
29
|
+
getAllComponentsByUserRole(paginationParams, { id }) {
|
|
30
|
+
return this.dashboardComponentService.getAllComponentsByUserRole(paginationParams, id);
|
|
28
31
|
}
|
|
29
32
|
getComponent(id, locale, { id: userId }) {
|
|
30
33
|
return this.dashboardComponentService.getComponent(id, locale, userId);
|
|
@@ -43,11 +46,18 @@ exports.DashboardComponentController = DashboardComponentController;
|
|
|
43
46
|
__decorate([
|
|
44
47
|
(0, common_1.Get)(),
|
|
45
48
|
__param(0, (0, api_pagination_1.Pagination)()),
|
|
49
|
+
__metadata("design:type", Function),
|
|
50
|
+
__metadata("design:paramtypes", [Object]),
|
|
51
|
+
__metadata("design:returntype", void 0)
|
|
52
|
+
], DashboardComponentController.prototype, "getAllComponents", null);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, common_1.Get)('user'),
|
|
55
|
+
__param(0, (0, api_pagination_1.Pagination)()),
|
|
46
56
|
__param(1, (0, api_1.User)()),
|
|
47
57
|
__metadata("design:type", Function),
|
|
48
58
|
__metadata("design:paramtypes", [Object, Object]),
|
|
49
59
|
__metadata("design:returntype", void 0)
|
|
50
|
-
], DashboardComponentController.prototype, "
|
|
60
|
+
], DashboardComponentController.prototype, "getAllComponentsByUserRole", null);
|
|
51
61
|
__decorate([
|
|
52
62
|
(0, common_1.Get)(':id'),
|
|
53
63
|
__param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
|
|
@@ -1 +1 @@
|
|
|
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,EAAU,EAAE,EAAE,EAAE;
|
|
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,MAAM,EAAE,MAAM,CAAC,CAAC;IACzE,CAAC;IAGD,eAAe,CAAS,IAAiC,EAAY,MAAc;QACjF,OAAO,IAAI,CAAC,yBAAyB,CAAC,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACtE,CAAC;IAGD,eAAe,CACc,EAAU,EAC7B,IAAiC,EAC/B,MAAc;QAExB,OAAO,IAAI,CAAC,yBAAyB,CAAC,eAAe,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAC1E,CAAC;IAGD,eAAe,CAA4B,EAAU,EAAY,MAAc;QAC7E,OAAO,IAAI,CAAC,yBAAyB,CAAC,eAAe,CAA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
|
private readonly paginationService;
|
|
7
7
|
constructor(prismaService: PrismaService, paginationService: PaginationService);
|
|
8
|
-
getAllComponents(paginationParams: PaginationDTO
|
|
8
|
+
getAllComponents(paginationParams: PaginationDTO): Promise<{
|
|
9
|
+
total: any;
|
|
10
|
+
lastPage: number;
|
|
11
|
+
page: number;
|
|
12
|
+
pageSize: number;
|
|
13
|
+
prev: number;
|
|
14
|
+
next: number;
|
|
15
|
+
data: any[];
|
|
16
|
+
}>;
|
|
17
|
+
getAllComponentsByUserRole(paginationParams: PaginationDTO, userId: number): Promise<{
|
|
9
18
|
total: any;
|
|
10
19
|
lastPage: number;
|
|
11
20
|
page: number;
|
|
@@ -15,6 +24,26 @@ export declare class DashboardComponentService {
|
|
|
15
24
|
data: any[];
|
|
16
25
|
}>;
|
|
17
26
|
getComponent(id: number, locale: string, userId?: number): Promise<{
|
|
27
|
+
dashboard_component_locale: ({
|
|
28
|
+
locale: {
|
|
29
|
+
code: string;
|
|
30
|
+
name: string;
|
|
31
|
+
region: string;
|
|
32
|
+
id: number;
|
|
33
|
+
created_at: Date;
|
|
34
|
+
updated_at: Date;
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
};
|
|
37
|
+
} & {
|
|
38
|
+
name: string;
|
|
39
|
+
id: number;
|
|
40
|
+
description: string;
|
|
41
|
+
created_at: Date;
|
|
42
|
+
updated_at: Date;
|
|
43
|
+
locale_id: number;
|
|
44
|
+
dashboard_component_id: number;
|
|
45
|
+
})[];
|
|
46
|
+
} & {
|
|
18
47
|
width: number;
|
|
19
48
|
id: number;
|
|
20
49
|
created_at: Date;
|
|
@@ -28,6 +57,26 @@ export declare class DashboardComponentService {
|
|
|
28
57
|
is_resizable: boolean;
|
|
29
58
|
}>;
|
|
30
59
|
createComponent(data: CreateDashboardComponentDTO, locale: string): Promise<{
|
|
60
|
+
dashboard_component_locale: ({
|
|
61
|
+
locale: {
|
|
62
|
+
code: string;
|
|
63
|
+
name: string;
|
|
64
|
+
region: string;
|
|
65
|
+
id: number;
|
|
66
|
+
created_at: Date;
|
|
67
|
+
updated_at: Date;
|
|
68
|
+
enabled: boolean;
|
|
69
|
+
};
|
|
70
|
+
} & {
|
|
71
|
+
name: string;
|
|
72
|
+
id: number;
|
|
73
|
+
description: string;
|
|
74
|
+
created_at: Date;
|
|
75
|
+
updated_at: Date;
|
|
76
|
+
locale_id: number;
|
|
77
|
+
dashboard_component_id: number;
|
|
78
|
+
})[];
|
|
79
|
+
} & {
|
|
31
80
|
width: number;
|
|
32
81
|
id: number;
|
|
33
82
|
created_at: Date;
|
|
@@ -41,6 +90,26 @@ export declare class DashboardComponentService {
|
|
|
41
90
|
is_resizable: boolean;
|
|
42
91
|
}>;
|
|
43
92
|
updateComponent(id: number, data: UpdateDashboardComponentDTO, locale: string): Promise<{
|
|
93
|
+
dashboard_component_locale: ({
|
|
94
|
+
locale: {
|
|
95
|
+
code: string;
|
|
96
|
+
name: string;
|
|
97
|
+
region: string;
|
|
98
|
+
id: number;
|
|
99
|
+
created_at: Date;
|
|
100
|
+
updated_at: Date;
|
|
101
|
+
enabled: boolean;
|
|
102
|
+
};
|
|
103
|
+
} & {
|
|
104
|
+
name: string;
|
|
105
|
+
id: number;
|
|
106
|
+
description: string;
|
|
107
|
+
created_at: Date;
|
|
108
|
+
updated_at: Date;
|
|
109
|
+
locale_id: number;
|
|
110
|
+
dashboard_component_id: number;
|
|
111
|
+
})[];
|
|
112
|
+
} & {
|
|
44
113
|
width: number;
|
|
45
114
|
id: number;
|
|
46
115
|
created_at: Date;
|
|
@@ -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,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,EAAE,MAAM,EAAE,MAAM;;;;;;;;;
|
|
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"}
|
|
@@ -22,8 +22,39 @@ let DashboardComponentService = class DashboardComponentService {
|
|
|
22
22
|
this.prismaService = prismaService;
|
|
23
23
|
this.paginationService = paginationService;
|
|
24
24
|
}
|
|
25
|
-
async getAllComponents(paginationParams
|
|
26
|
-
const
|
|
25
|
+
async getAllComponents(paginationParams) {
|
|
26
|
+
const fields = ['slug'];
|
|
27
|
+
const OR = this.prismaService.createInsensitiveSearch(fields, paginationParams);
|
|
28
|
+
if (paginationParams.search) {
|
|
29
|
+
OR.push({
|
|
30
|
+
dashboard_component_locale: {
|
|
31
|
+
some: {
|
|
32
|
+
name: {
|
|
33
|
+
contains: paginationParams.search,
|
|
34
|
+
mode: 'insensitive',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return this.paginationService.paginate(this.prismaService.dashboard_component, paginationParams, {
|
|
41
|
+
include: {
|
|
42
|
+
dashboard_component_locale: {
|
|
43
|
+
include: {
|
|
44
|
+
locale: true,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
where: {
|
|
49
|
+
OR,
|
|
50
|
+
},
|
|
51
|
+
orderBy: {
|
|
52
|
+
created_at: 'desc',
|
|
53
|
+
},
|
|
54
|
+
}, 'dashboardComponent');
|
|
55
|
+
}
|
|
56
|
+
async getAllComponentsByUserRole(paginationParams, userId) {
|
|
57
|
+
const userRoles = await this.prismaService.role_user.findMany({
|
|
27
58
|
where: { user_id: userId },
|
|
28
59
|
select: { role_id: true },
|
|
29
60
|
});
|
|
@@ -53,7 +84,6 @@ let DashboardComponentService = class DashboardComponentService {
|
|
|
53
84
|
where: {
|
|
54
85
|
AND: [
|
|
55
86
|
{
|
|
56
|
-
// @ts-ignore
|
|
57
87
|
dashboard_component_role: {
|
|
58
88
|
some: {
|
|
59
89
|
role_id: {
|
|
@@ -82,7 +112,6 @@ let DashboardComponentService = class DashboardComponentService {
|
|
|
82
112
|
const component = await this.prismaService.dashboard_component.findFirst({
|
|
83
113
|
where: {
|
|
84
114
|
id,
|
|
85
|
-
// @ts-ignore
|
|
86
115
|
dashboard_component_role: {
|
|
87
116
|
some: {
|
|
88
117
|
role_id: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-component.service.js","sourceRoot":"","sources":["../../../src/dashboard/dashboard-component/dashboard-component.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oDAAoD;AACpD,4DAA2E;AAC3E,oDAAoD;AACpD,2CAKwB;AAMjB,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IACpC,YAEmB,aAA4B,EAE5B,iBAAoC;QAFpC,kBAAa,GAAb,aAAa,CAAe;QAE5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,gBAAgB,CAAC,gBAA+B,EAAE,MAAc;
|
|
1
|
+
{"version":3,"file":"dashboard-component.service.js","sourceRoot":"","sources":["../../../src/dashboard/dashboard-component/dashboard-component.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oDAAoD;AACpD,4DAA2E;AAC3E,oDAAoD;AACpD,2CAKwB;AAMjB,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IACpC,YAEmB,aAA4B,EAE5B,iBAAoC;QAFpC,kBAAa,GAAb,aAAa,CAAe;QAE5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,gBAAgB,CAAC,gBAA+B;QACpD,MAAM,MAAM,GAAG,CAAC,MAAM,CAAC,CAAA;QACvB,MAAM,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,uBAAuB,CACnD,MAAM,EACN,gBAAgB,CACjB,CAAC;QAEF,IAAI,gBAAgB,CAAC,MAAM,EAAE,CAAC;YAC5B,EAAE,CAAC,IAAI,CAAC;gBACN,0BAA0B,EAAE;oBAC1B,IAAI,E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BAAU,EAAC,GAAG,EAAE,CAAC,0BAAa,CAAC,CAAC,CAAA;IAEvC,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,kCAAiB,CAAC,CAAC,CAAA;qCADZ,0BAAa;QAET,kCAAiB;GAL5C,yBAAyB,CAqQrC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { DashboardComponentRoleService } from './dashboard-component-role.service';
|
|
2
|
+
import { CreateDashboardComponentRoleDTO } from './dto';
|
|
3
|
+
export declare class DashboardComponentRoleController {
|
|
4
|
+
private readonly service;
|
|
5
|
+
constructor(service: DashboardComponentRoleService);
|
|
6
|
+
getAll(paginationParams: any, locale: string, componentId?: string): Promise<{
|
|
7
|
+
total: any;
|
|
8
|
+
lastPage: number;
|
|
9
|
+
page: number;
|
|
10
|
+
pageSize: number;
|
|
11
|
+
prev: number;
|
|
12
|
+
next: number;
|
|
13
|
+
data: any[];
|
|
14
|
+
}> | Promise<({
|
|
15
|
+
role: {
|
|
16
|
+
role_locale: ({
|
|
17
|
+
locale: {
|
|
18
|
+
code: string;
|
|
19
|
+
name: string;
|
|
20
|
+
region: string;
|
|
21
|
+
id: number;
|
|
22
|
+
created_at: Date;
|
|
23
|
+
updated_at: Date;
|
|
24
|
+
enabled: boolean;
|
|
25
|
+
};
|
|
26
|
+
} & {
|
|
27
|
+
name: string;
|
|
28
|
+
id: number;
|
|
29
|
+
description: string | null;
|
|
30
|
+
created_at: Date;
|
|
31
|
+
updated_at: Date;
|
|
32
|
+
locale_id: number;
|
|
33
|
+
role_id: number;
|
|
34
|
+
})[];
|
|
35
|
+
} & {
|
|
36
|
+
id: number;
|
|
37
|
+
created_at: Date;
|
|
38
|
+
updated_at: Date;
|
|
39
|
+
slug: string;
|
|
40
|
+
};
|
|
41
|
+
} & {
|
|
42
|
+
id: number;
|
|
43
|
+
created_at: Date;
|
|
44
|
+
updated_at: Date;
|
|
45
|
+
component_id: number;
|
|
46
|
+
role_id: number;
|
|
47
|
+
})[]>;
|
|
48
|
+
create(data: CreateDashboardComponentRoleDTO, locale: string): Promise<{
|
|
49
|
+
dashboard_component: {
|
|
50
|
+
dashboard_component_locale: ({
|
|
51
|
+
locale: {
|
|
52
|
+
code: string;
|
|
53
|
+
name: string;
|
|
54
|
+
region: string;
|
|
55
|
+
id: number;
|
|
56
|
+
created_at: Date;
|
|
57
|
+
updated_at: Date;
|
|
58
|
+
enabled: boolean;
|
|
59
|
+
};
|
|
60
|
+
} & {
|
|
61
|
+
name: string;
|
|
62
|
+
id: number;
|
|
63
|
+
description: string;
|
|
64
|
+
created_at: Date;
|
|
65
|
+
updated_at: Date;
|
|
66
|
+
locale_id: number;
|
|
67
|
+
dashboard_component_id: number;
|
|
68
|
+
})[];
|
|
69
|
+
} & {
|
|
70
|
+
width: number;
|
|
71
|
+
id: number;
|
|
72
|
+
created_at: Date;
|
|
73
|
+
updated_at: Date;
|
|
74
|
+
slug: string;
|
|
75
|
+
min_width: number;
|
|
76
|
+
max_width: number | null;
|
|
77
|
+
min_height: number;
|
|
78
|
+
max_height: number | null;
|
|
79
|
+
height: number;
|
|
80
|
+
is_resizable: boolean;
|
|
81
|
+
};
|
|
82
|
+
role: {
|
|
83
|
+
role_locale: ({
|
|
84
|
+
locale: {
|
|
85
|
+
code: string;
|
|
86
|
+
name: string;
|
|
87
|
+
region: string;
|
|
88
|
+
id: number;
|
|
89
|
+
created_at: Date;
|
|
90
|
+
updated_at: Date;
|
|
91
|
+
enabled: boolean;
|
|
92
|
+
};
|
|
93
|
+
} & {
|
|
94
|
+
name: string;
|
|
95
|
+
id: number;
|
|
96
|
+
description: string | null;
|
|
97
|
+
created_at: Date;
|
|
98
|
+
updated_at: Date;
|
|
99
|
+
locale_id: number;
|
|
100
|
+
role_id: number;
|
|
101
|
+
})[];
|
|
102
|
+
} & {
|
|
103
|
+
id: number;
|
|
104
|
+
created_at: Date;
|
|
105
|
+
updated_at: Date;
|
|
106
|
+
slug: string;
|
|
107
|
+
};
|
|
108
|
+
} & {
|
|
109
|
+
id: number;
|
|
110
|
+
created_at: Date;
|
|
111
|
+
updated_at: Date;
|
|
112
|
+
component_id: number;
|
|
113
|
+
role_id: number;
|
|
114
|
+
}>;
|
|
115
|
+
delete(id: number, locale: string): Promise<{
|
|
116
|
+
success: boolean;
|
|
117
|
+
}>;
|
|
118
|
+
deleteByComponentAndRole(componentId: number, roleId: number, locale: string): Promise<{
|
|
119
|
+
success: boolean;
|
|
120
|
+
}>;
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=dashboard-component-role.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-component-role.controller.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard-component-role/dashboard-component-role.controller.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EAAE,+BAA+B,EAAE,MAAM,OAAO,CAAC;AAExD,qBAEa,gCAAgC;IAGzC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,6BAA6B;IAIzD,MAAM,CACU,gBAAgB,KAAA,EACpB,MAAM,EAAE,MAAM,EACF,WAAW,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAS5C,MAAM,CAAS,IAAI,EAAE,+BAA+B,EAAY,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAK9E,MAAM,CAA4B,EAAE,EAAE,MAAM,EAAY,MAAM,EAAE,MAAM;;;IAKtE,wBAAwB,CACc,WAAW,EAAE,MAAM,EACxB,MAAM,EAAE,MAAM,EACnC,MAAM,EAAE,MAAM;;;CAI3B"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.DashboardComponentRoleController = void 0;
|
|
16
|
+
const api_1 = require("@hed-hog/api");
|
|
17
|
+
const api_locale_1 = require("@hed-hog/api-locale");
|
|
18
|
+
const api_pagination_1 = require("@hed-hog/api-pagination");
|
|
19
|
+
const common_1 = require("@nestjs/common");
|
|
20
|
+
const dashboard_component_role_service_1 = require("./dashboard-component-role.service");
|
|
21
|
+
const dto_1 = require("./dto");
|
|
22
|
+
let DashboardComponentRoleController = class DashboardComponentRoleController {
|
|
23
|
+
constructor(service) {
|
|
24
|
+
this.service = service;
|
|
25
|
+
}
|
|
26
|
+
getAll(paginationParams, locale, componentId) {
|
|
27
|
+
if (componentId) {
|
|
28
|
+
return this.service.getAllByComponent(parseInt(componentId), locale);
|
|
29
|
+
}
|
|
30
|
+
return this.service.getAll(paginationParams, locale);
|
|
31
|
+
}
|
|
32
|
+
create(data, locale) {
|
|
33
|
+
return this.service.create(data, locale);
|
|
34
|
+
}
|
|
35
|
+
delete(id, locale) {
|
|
36
|
+
return this.service.delete(id, locale);
|
|
37
|
+
}
|
|
38
|
+
deleteByComponentAndRole(componentId, roleId, locale) {
|
|
39
|
+
return this.service.deleteByComponentAndRole(componentId, roleId, locale);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
exports.DashboardComponentRoleController = DashboardComponentRoleController;
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, common_1.Get)(),
|
|
45
|
+
__param(0, (0, api_pagination_1.Pagination)()),
|
|
46
|
+
__param(1, (0, api_locale_1.Locale)()),
|
|
47
|
+
__param(2, (0, common_1.Query)('componentId')),
|
|
48
|
+
__metadata("design:type", Function),
|
|
49
|
+
__metadata("design:paramtypes", [Object, String, String]),
|
|
50
|
+
__metadata("design:returntype", void 0)
|
|
51
|
+
], DashboardComponentRoleController.prototype, "getAll", null);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, common_1.Post)(),
|
|
54
|
+
__param(0, (0, common_1.Body)()),
|
|
55
|
+
__param(1, (0, api_locale_1.Locale)()),
|
|
56
|
+
__metadata("design:type", Function),
|
|
57
|
+
__metadata("design:paramtypes", [dto_1.CreateDashboardComponentRoleDTO, String]),
|
|
58
|
+
__metadata("design:returntype", void 0)
|
|
59
|
+
], DashboardComponentRoleController.prototype, "create", null);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, common_1.Delete)(':id'),
|
|
62
|
+
__param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
|
|
63
|
+
__param(1, (0, api_locale_1.Locale)()),
|
|
64
|
+
__metadata("design:type", Function),
|
|
65
|
+
__metadata("design:paramtypes", [Number, String]),
|
|
66
|
+
__metadata("design:returntype", void 0)
|
|
67
|
+
], DashboardComponentRoleController.prototype, "delete", null);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, common_1.Delete)('component/:componentId/role/:roleId'),
|
|
70
|
+
__param(0, (0, common_1.Param)('componentId', common_1.ParseIntPipe)),
|
|
71
|
+
__param(1, (0, common_1.Param)('roleId', common_1.ParseIntPipe)),
|
|
72
|
+
__param(2, (0, api_locale_1.Locale)()),
|
|
73
|
+
__metadata("design:type", Function),
|
|
74
|
+
__metadata("design:paramtypes", [Number, Number, String]),
|
|
75
|
+
__metadata("design:returntype", void 0)
|
|
76
|
+
], DashboardComponentRoleController.prototype, "deleteByComponentAndRole", null);
|
|
77
|
+
exports.DashboardComponentRoleController = DashboardComponentRoleController = __decorate([
|
|
78
|
+
(0, api_1.Role)(),
|
|
79
|
+
(0, common_1.Controller)('dashboard-component-role'),
|
|
80
|
+
__param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => dashboard_component_role_service_1.DashboardComponentRoleService))),
|
|
81
|
+
__metadata("design:paramtypes", [dashboard_component_role_service_1.DashboardComponentRoleService])
|
|
82
|
+
], DashboardComponentRoleController);
|
|
83
|
+
//# sourceMappingURL=dashboard-component-role.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-component-role.controller.js","sourceRoot":"","sources":["../../../src/dashboard/dashboard-component-role/dashboard-component-role.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAAoC;AACpC,oDAA6C;AAC7C,4DAAqD;AACrD,2CAWwB;AACxB,yFAAmF;AACnF,+BAAwD;AAIjD,IAAM,gCAAgC,GAAtC,MAAM,gCAAgC;IAC3C,YAEmB,OAAsC;QAAtC,YAAO,GAAP,OAAO,CAA+B;IACtD,CAAC;IAGJ,MAAM,CACU,gBAAgB,EACpB,MAAc,EACF,WAAoB;QAE1C,IAAI,WAAW,EAAE,CAAC;YAChB,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;QACvE,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;IACvD,CAAC;IAGD,MAAM,CAAS,IAAqC,EAAY,MAAc;QAC5E,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAA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|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-component-role.module.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard-component-role/dashboard-component-role.module.ts"],"names":[],"mappings":"AAMA,qBAMa,4BAA4B;CAAG"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.DashboardComponentRoleModule = void 0;
|
|
10
|
+
const api_pagination_1 = require("@hed-hog/api-pagination");
|
|
11
|
+
const api_prisma_1 = require("@hed-hog/api-prisma");
|
|
12
|
+
const common_1 = require("@nestjs/common");
|
|
13
|
+
const dashboard_component_role_controller_1 = require("./dashboard-component-role.controller");
|
|
14
|
+
const dashboard_component_role_service_1 = require("./dashboard-component-role.service");
|
|
15
|
+
let DashboardComponentRoleModule = class DashboardComponentRoleModule {
|
|
16
|
+
};
|
|
17
|
+
exports.DashboardComponentRoleModule = DashboardComponentRoleModule;
|
|
18
|
+
exports.DashboardComponentRoleModule = DashboardComponentRoleModule = __decorate([
|
|
19
|
+
(0, common_1.Module)({
|
|
20
|
+
imports: [(0, common_1.forwardRef)(() => api_prisma_1.PrismaModule), (0, common_1.forwardRef)(() => api_pagination_1.PaginationModule)],
|
|
21
|
+
controllers: [dashboard_component_role_controller_1.DashboardComponentRoleController],
|
|
22
|
+
providers: [dashboard_component_role_service_1.DashboardComponentRoleService],
|
|
23
|
+
exports: [dashboard_component_role_service_1.DashboardComponentRoleService],
|
|
24
|
+
})
|
|
25
|
+
], DashboardComponentRoleModule);
|
|
26
|
+
//# sourceMappingURL=dashboard-component-role.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-component-role.module.js","sourceRoot":"","sources":["../../../src/dashboard/dashboard-component-role/dashboard-component-role.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,4DAA2D;AAC3D,oDAAmD;AACnD,2CAAoD;AACpD,+FAAyF;AACzF,yFAAmF;AAQ5E,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;CAAG,CAAA;AAA/B,oEAA4B;uCAA5B,4BAA4B;IANxC,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,yBAAY,CAAC,EAAE,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,iCAAgB,CAAC,CAAC;QAC7E,WAAW,EAAE,CAAC,sEAAgC,CAAC;QAC/C,SAAS,EAAE,CAAC,gEAA6B,CAAC;QAC1C,OAAO,EAAE,CAAC,gEAA6B,CAAC;KACzC,CAAC;GACW,4BAA4B,CAAG"}
|