@servicelabsco/slabs-access-manager 0.1.125 → 0.1.126
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/access/controllers/dashboard.component.controller.d.ts +24 -1
- package/dist/access/controllers/dashboard.component.controller.js +6 -1
- package/dist/access/controllers/dashboard.component.controller.js.map +1 -1
- package/dist/access/dtos/custom.report.attributes.dto.d.ts +1 -0
- package/dist/access/dtos/custom.report.attributes.dto.js.map +1 -1
- package/dist/access/entities/custom.report.entity.d.ts +3 -3
- package/dist/access/entities/custom.report.entity.js +4 -4
- package/dist/access/entities/custom.report.entity.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,6 +7,29 @@ export declare class DashboardComponentController {
|
|
|
7
7
|
private readonly accessBusinessService;
|
|
8
8
|
constructor(accessBusinessService: AccessBusinessService);
|
|
9
9
|
create(body: AddDashboardComponentDto): Promise<DashboardEntity>;
|
|
10
|
-
getAllDashboards(params: BusinessParamDto): Promise<
|
|
10
|
+
getAllDashboards(params: BusinessParamDto): Promise<{
|
|
11
|
+
suggestions: CustomReportEntity[];
|
|
12
|
+
business_id: number;
|
|
13
|
+
product_id: number;
|
|
14
|
+
user_id: number;
|
|
15
|
+
name: string;
|
|
16
|
+
identifier: string;
|
|
17
|
+
description: string;
|
|
18
|
+
active: boolean;
|
|
19
|
+
attributes: import("..").DashboardAttributesDto;
|
|
20
|
+
business: import("..").AccessBusinessEntity;
|
|
21
|
+
product: import("..").ProductEntity;
|
|
22
|
+
alias: import("@servicelabsco/nestjs-utility-services").UserEntity;
|
|
23
|
+
components: import("..").DashboardComponentEntity[];
|
|
24
|
+
id: number;
|
|
25
|
+
uuid: string;
|
|
26
|
+
created_by: number;
|
|
27
|
+
updated_by: number;
|
|
28
|
+
deleted_at: Date;
|
|
29
|
+
updated_at: Date;
|
|
30
|
+
created_at: Date;
|
|
31
|
+
creator: import("@servicelabsco/nestjs-utility-services").CreatorEntity;
|
|
32
|
+
updator: import("@servicelabsco/nestjs-utility-services").CreatorEntity;
|
|
33
|
+
}>;
|
|
11
34
|
allReports(): Promise<CustomReportEntity[]>;
|
|
12
35
|
}
|
|
@@ -34,10 +34,15 @@ let DashboardComponentController = class DashboardComponentController {
|
|
|
34
34
|
async getAllDashboards(params) {
|
|
35
35
|
const business = await this.accessBusinessService.validateAccess();
|
|
36
36
|
const user = nestjs_utility_services_1.Auth.user();
|
|
37
|
-
|
|
37
|
+
const dashboard = await dashboard_entity_1.DashboardEntity.findOne({
|
|
38
38
|
where: { identifier: params.slug },
|
|
39
39
|
relations: ['components.custom_report.summary', 'components.custom_report.trend', 'components.custom_report.listing'],
|
|
40
40
|
});
|
|
41
|
+
const suggestions = await custom_report_entity_1.CustomReportEntity.find({
|
|
42
|
+
where: { product_id: user?.auth_attributes?.product_id },
|
|
43
|
+
relations: ['summary', 'trend', 'listing', 'type'],
|
|
44
|
+
});
|
|
45
|
+
return { ...dashboard, suggestions: suggestions.filter((val) => val?.attributes?.dashboard_id) };
|
|
41
46
|
}
|
|
42
47
|
async allReports() {
|
|
43
48
|
const business = await this.accessBusinessService.validateAccess();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.component.controller.js","sourceRoot":"","sources":["../../../src/access/controllers/dashboard.component.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoE;AACpE,oFAA8D;AAC9D,qFAA+E;AAC/E,mEAA8D;AAC9D,2EAAsE;AACtE,mEAA+D;AAC/D,0FAAqF;AACrF,iFAA4E;AAQrE,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IACrC,YAA6B,qBAA4C;QAA5C,0BAAqB,GAArB,qBAAqB,CAAuB;IAAG,CAAC;IAGvE,AAAN,KAAK,CAAC,MAAM,CAAS,IAA8B;QAC/C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QACnE,IAAI,CAAC,QAAQ;YAAE,OAAO;QAEtB,OAAO,IAAI,uDAAyB,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC;IAGK,AAAN,KAAK,CAAC,gBAAgB,CAAU,MAAwB;QACpD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QACnE,MAAM,IAAI,GAAG,8BAAI,CAAC,IAAI,EAAE,CAAC;QAEzB,
|
|
1
|
+
{"version":3,"file":"dashboard.component.controller.js","sourceRoot":"","sources":["../../../src/access/controllers/dashboard.component.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoE;AACpE,oFAA8D;AAC9D,qFAA+E;AAC/E,mEAA8D;AAC9D,2EAAsE;AACtE,mEAA+D;AAC/D,0FAAqF;AACrF,iFAA4E;AAQrE,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IACrC,YAA6B,qBAA4C;QAA5C,0BAAqB,GAArB,qBAAqB,CAAuB;IAAG,CAAC;IAGvE,AAAN,KAAK,CAAC,MAAM,CAAS,IAA8B;QAC/C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QACnE,IAAI,CAAC,QAAQ;YAAE,OAAO;QAEtB,OAAO,IAAI,uDAAyB,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC;IAGK,AAAN,KAAK,CAAC,gBAAgB,CAAU,MAAwB;QACpD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QACnE,MAAM,IAAI,GAAG,8BAAI,CAAC,IAAI,EAAE,CAAC;QAEzB,MAAM,SAAS,GAAG,MAAM,kCAAe,CAAC,OAAO,CAAC;YAC5C,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,CAAC,IAAI,EAAE;YAClC,SAAS,EAAE,CAAC,kCAAkC,EAAE,gCAAgC,EAAE,kCAAkC,CAAC;SACxH,CAAC,CAAC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attributes.dto.ts"],"names":[],"mappings":";;;AAAA,oFAA6E;AAC7E,MAAa,yBAA0B,SAAQ,6CAAmB;
|
|
1
|
+
{"version":3,"file":"custom.report.attributes.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/custom.report.attributes.dto.ts"],"names":[],"mappings":";;;AAAA,oFAA6E;AAC7E,MAAa,yBAA0B,SAAQ,6CAAmB;CAEjE;AAFD,8DAEC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommonEntity, LookupValueEntity,
|
|
1
|
+
import { CommonEntity, LookupValueEntity, ReportEntity } from '@servicelabsco/nestjs-utility-services';
|
|
2
2
|
import { CustomReportAttributesDto } from '../dtos/custom.report.attributes.dto';
|
|
3
3
|
import { ListingPageEntity } from './listing.page.entity';
|
|
4
4
|
import { ProductEntity } from './product.entity';
|
|
@@ -17,8 +17,8 @@ export declare class CustomReportEntity extends CommonEntity {
|
|
|
17
17
|
attributes: CustomReportAttributesDto;
|
|
18
18
|
configurations: any;
|
|
19
19
|
product: ProductEntity;
|
|
20
|
-
summary:
|
|
21
|
-
trend:
|
|
20
|
+
summary: ReportEntity;
|
|
21
|
+
trend: ReportEntity;
|
|
22
22
|
listing: ListingPageEntity;
|
|
23
23
|
type: LookupValueEntity;
|
|
24
24
|
}
|
|
@@ -76,14 +76,14 @@ __decorate([
|
|
|
76
76
|
__metadata("design:type", product_entity_1.ProductEntity)
|
|
77
77
|
], CustomReportEntity.prototype, "product", void 0);
|
|
78
78
|
__decorate([
|
|
79
|
-
(0, typeorm_1.ManyToOne)(() => nestjs_utility_services_1.
|
|
79
|
+
(0, typeorm_1.ManyToOne)(() => nestjs_utility_services_1.ReportEntity),
|
|
80
80
|
(0, typeorm_1.JoinColumn)({ name: 'summary_id' }),
|
|
81
|
-
__metadata("design:type", nestjs_utility_services_1.
|
|
81
|
+
__metadata("design:type", nestjs_utility_services_1.ReportEntity)
|
|
82
82
|
], CustomReportEntity.prototype, "summary", void 0);
|
|
83
83
|
__decorate([
|
|
84
|
-
(0, typeorm_1.ManyToOne)(() => nestjs_utility_services_1.
|
|
84
|
+
(0, typeorm_1.ManyToOne)(() => nestjs_utility_services_1.ReportEntity),
|
|
85
85
|
(0, typeorm_1.JoinColumn)({ name: 'trend_id' }),
|
|
86
|
-
__metadata("design:type", nestjs_utility_services_1.
|
|
86
|
+
__metadata("design:type", nestjs_utility_services_1.ReportEntity)
|
|
87
87
|
], CustomReportEntity.prototype, "trend", void 0);
|
|
88
88
|
__decorate([
|
|
89
89
|
(0, typeorm_1.ManyToOne)(() => listing_page_entity_1.ListingPageEntity),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom.report.entity.js","sourceRoot":"","sources":["../../../src/access/entities/custom.report.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"custom.report.entity.js","sourceRoot":"","sources":["../../../src/access/entities/custom.report.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oFAAuG;AACvG,qCAAgE;AAChE,uFAAiF;AACjF,+DAA0D;AAC1D,qDAAiD;AAS1C,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,sCAAY;CA8CnD,CAAA;AA9CY,gDAAkB;AAE3B;IADC,IAAA,gBAAM,GAAE;;sDACU;AAGnB;IADC,IAAA,gBAAM,GAAE;;sDACU;AAGnB;IADC,IAAA,gBAAM,GAAE;;oDACQ;AAGjB;IADC,IAAA,gBAAM,GAAE;;sDACU;AAGnB;IADC,IAAA,gBAAM,GAAE;;mDACO;AAGhB;IADC,IAAA,gBAAM,GAAE;;gDACI;AAGb;IADC,IAAA,gBAAM,GAAE;;uDACW;AAGpB;IADC,IAAA,gBAAM,GAAE;;sDACU;AAGnB;IADC,IAAA,gBAAM,GAAE;;2DACgB;AAGzB;IADC,IAAA,gBAAM,GAAE;;qDACS;AAGlB;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;;sDACC;AAGhB;IADC,IAAA,gBAAM,EA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