@servicelabsco/slabs-access-manager 0.1.5 → 0.1.6
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/access.menu.controller.d.ts +2 -2
- package/dist/access/controllers/access.menu.controller.js +5 -5
- package/dist/access/controllers/access.menu.controller.js.map +1 -1
- package/dist/access/controllers/dashboard.controller.d.ts +1 -1
- package/dist/access/controllers/dashboard.controller.js +4 -4
- package/dist/access/controllers/dashboard.controller.js.map +1 -1
- package/dist/access/dtos/date.filter.dto.d.ts +6 -0
- package/dist/access/dtos/date.filter.dto.js +36 -0
- package/dist/access/dtos/date.filter.dto.js.map +1 -1
- package/dist/access/entities/menu.action.entity.d.ts +1 -1
- package/dist/access/entities/menu.action.entity.js +2 -2
- package/dist/access/entities/menu.action.entity.js.map +1 -1
- package/dist/access/es6.classes.d.ts +1 -1
- package/dist/access/jobs/business.user.job.js +2 -2
- package/dist/access/jobs/business.user.job.js.map +1 -1
- package/dist/access/jobs/business.user.role.job.js +2 -2
- package/dist/access/jobs/business.user.role.job.js.map +1 -1
- package/dist/access/libraries/process.business.user.role.update.d.ts +1 -1
- package/dist/access/libraries/process.business.user.role.update.js +7 -5
- package/dist/access/libraries/process.business.user.role.update.js.map +1 -1
- package/dist/access/libraries/process.dashboard.report.d.ts +1 -1
- package/dist/access/libraries/process.dashboard.report.js +4 -3
- package/dist/access/libraries/process.dashboard.report.js.map +1 -1
- package/dist/access/libraries/process.date.filter.d.ts +7 -0
- package/dist/access/libraries/process.date.filter.js +58 -2
- package/dist/access/libraries/process.date.filter.js.map +1 -1
- package/dist/access/libraries/process.listing.csv.file.d.ts +1 -1
- package/dist/access/libraries/process.test.list.d.ts +3 -3
- package/dist/access/libraries/process.test.list.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AccessManager, CacheService, PropertyService } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
-
import { AccessBusinessParamDto } from '../dtos';
|
|
2
|
+
import { AccessBusinessParamDto } from '../dtos/access.business.param.dto';
|
|
3
3
|
export declare class AccessMenuController {
|
|
4
4
|
private readonly cacheService;
|
|
5
5
|
private readonly accessManager;
|
|
@@ -8,5 +8,5 @@ export declare class AccessMenuController {
|
|
|
8
8
|
get(params: AccessBusinessParamDto): Promise<{
|
|
9
9
|
modules: any[];
|
|
10
10
|
}>;
|
|
11
|
-
getMenuDetails(params: AccessBusinessParamDto): Promise<import("
|
|
11
|
+
getMenuDetails(params: AccessBusinessParamDto): Promise<import("..").MenuEntity>;
|
|
12
12
|
}
|
|
@@ -15,8 +15,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.AccessMenuController = void 0;
|
|
16
16
|
const common_1 = require("@nestjs/common");
|
|
17
17
|
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
18
|
-
const
|
|
19
|
-
const
|
|
18
|
+
const access_business_param_dto_1 = require("../dtos/access.business.param.dto");
|
|
19
|
+
const product_entity_1 = require("../entities/product.entity");
|
|
20
20
|
const process_application_menu_1 = require("../libraries/process.application.menu");
|
|
21
21
|
const process_menu_details_1 = require("../libraries/process.menu.details");
|
|
22
22
|
let AccessMenuController = class AccessMenuController {
|
|
@@ -26,7 +26,7 @@ let AccessMenuController = class AccessMenuController {
|
|
|
26
26
|
this.propertyService = propertyService;
|
|
27
27
|
}
|
|
28
28
|
async get(params) {
|
|
29
|
-
const product = await
|
|
29
|
+
const product = await product_entity_1.ProductEntity.first(params.id);
|
|
30
30
|
if (!product)
|
|
31
31
|
throw new nestjs_utility_services_1.OperationException(`No menu found for the given product`);
|
|
32
32
|
return new process_application_menu_1.ProcessApplicationMenu(this.cacheService, this.accessManager, this.propertyService).process(params.id);
|
|
@@ -40,14 +40,14 @@ __decorate([
|
|
|
40
40
|
(0, common_1.Get)(),
|
|
41
41
|
__param(0, (0, common_1.Param)()),
|
|
42
42
|
__metadata("design:type", Function),
|
|
43
|
-
__metadata("design:paramtypes", [
|
|
43
|
+
__metadata("design:paramtypes", [access_business_param_dto_1.AccessBusinessParamDto]),
|
|
44
44
|
__metadata("design:returntype", Promise)
|
|
45
45
|
], AccessMenuController.prototype, "get", null);
|
|
46
46
|
__decorate([
|
|
47
47
|
(0, common_1.Get)(':second_id'),
|
|
48
48
|
__param(0, (0, common_1.Param)()),
|
|
49
49
|
__metadata("design:type", Function),
|
|
50
|
-
__metadata("design:paramtypes", [
|
|
50
|
+
__metadata("design:paramtypes", [access_business_param_dto_1.AccessBusinessParamDto]),
|
|
51
51
|
__metadata("design:returntype", Promise)
|
|
52
52
|
], AccessMenuController.prototype, "getMenuDetails", null);
|
|
53
53
|
exports.AccessMenuController = AccessMenuController = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access.menu.controller.js","sourceRoot":"","sources":["../../../src/access/controllers/access.menu.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwD;AACxD,oFAA0H;AAC1H,
|
|
1
|
+
{"version":3,"file":"access.menu.controller.js","sourceRoot":"","sources":["../../../src/access/controllers/access.menu.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwD;AACxD,oFAA0H;AAC1H,iFAA2E;AAC3E,+DAA2D;AAC3D,oFAA+E;AAC/E,4EAAuE;AAGhE,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC7B,YACqB,YAA0B,EAC1B,aAA4B,EAC5B,eAAgC;QAFhC,iBAAY,GAAZ,YAAY,CAAc;QAC1B,kBAAa,GAAb,aAAa,CAAe;QAC5B,oBAAe,GAAf,eAAe,CAAiB;IAClD,CAAC;IAGE,AAAN,KAAK,CAAC,GAAG,CAAU,MAA8B;QAC7C,MAAM,OAAO,GAAG,MAAM,8BAAa,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACrD,IAAI,CAAC,OAAO;YAAE,MAAM,IAAI,4CAAkB,CAAC,qCAAqC,CAAC,CAAC;QAElF,OAAO,IAAI,iDAAsB,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACtH,CAAC;IAGK,AAAN,KAAK,CAAC,cAAc,CAAU,MAA8B;QACxD,OAAO,IAAI,yCAAkB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAChF,CAAC;CACJ,CAAA;AAnBY,oDAAoB;AAQvB;IADL,IAAA,YAAG,GAAE;IACK,WAAA,IAAA,cAAK,GAAE,CAAA;;qCAAS,kDAAsB;;+CAKhD;AAGK;IADL,IAAA,YAAG,EAAC,YAAY,CAAC;IACI,WAAA,IAAA,cAAK,GAAE,CAAA;;qCAAS,kDAAsB;;0DAE3D;+BAlBQ,oBAAoB;IADhC,IAAA,mBAAU,EAAC,sBAAsB,CAAC;qCAGI,sCAAY;QACX,uCAAa;QACX,yCAAe;GAJ5C,oBAAoB,CAmBhC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AccessManager, SqlService } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
+
import { AccessBusinessParamDto } from '../dtos/access.business.param.dto';
|
|
2
3
|
import { StringSearchDto } from '../dtos/string.search.dto';
|
|
3
|
-
import { AccessBusinessParamDto } from '../dtos';
|
|
4
4
|
export declare class DashboardController {
|
|
5
5
|
private readonly sqlService;
|
|
6
6
|
private readonly accessManager;
|
|
@@ -15,9 +15,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.DashboardController = void 0;
|
|
16
16
|
const common_1 = require("@nestjs/common");
|
|
17
17
|
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
18
|
+
const access_business_param_dto_1 = require("../dtos/access.business.param.dto");
|
|
18
19
|
const string_search_dto_1 = require("../dtos/string.search.dto");
|
|
19
20
|
const process_dashboard_report_1 = require("../libraries/process.dashboard.report");
|
|
20
|
-
const dtos_1 = require("../dtos");
|
|
21
21
|
let DashboardController = class DashboardController {
|
|
22
22
|
constructor(sqlService, accessManager) {
|
|
23
23
|
this.sqlService = sqlService;
|
|
@@ -47,7 +47,7 @@ __decorate([
|
|
|
47
47
|
(0, common_1.Get)(),
|
|
48
48
|
__param(0, (0, common_1.Param)()),
|
|
49
49
|
__metadata("design:type", Function),
|
|
50
|
-
__metadata("design:paramtypes", [
|
|
50
|
+
__metadata("design:paramtypes", [access_business_param_dto_1.AccessBusinessParamDto]),
|
|
51
51
|
__metadata("design:returntype", Promise)
|
|
52
52
|
], DashboardController.prototype, "getDashboards", null);
|
|
53
53
|
__decorate([
|
|
@@ -55,14 +55,14 @@ __decorate([
|
|
|
55
55
|
__param(0, (0, common_1.Param)()),
|
|
56
56
|
__param(1, (0, common_1.Body)()),
|
|
57
57
|
__metadata("design:type", Function),
|
|
58
|
-
__metadata("design:paramtypes", [
|
|
58
|
+
__metadata("design:paramtypes", [access_business_param_dto_1.AccessBusinessParamDto, string_search_dto_1.StringSearchDto]),
|
|
59
59
|
__metadata("design:returntype", Promise)
|
|
60
60
|
], DashboardController.prototype, "getReports", null);
|
|
61
61
|
__decorate([
|
|
62
62
|
(0, common_1.Get)(':slug'),
|
|
63
63
|
__param(0, (0, common_1.Param)()),
|
|
64
64
|
__metadata("design:type", Function),
|
|
65
|
-
__metadata("design:paramtypes", [
|
|
65
|
+
__metadata("design:paramtypes", [access_business_param_dto_1.AccessBusinessParamDto]),
|
|
66
66
|
__metadata("design:returntype", Promise)
|
|
67
67
|
], DashboardController.prototype, "getDashboardDetails", null);
|
|
68
68
|
exports.DashboardController = DashboardController = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.controller.js","sourceRoot":"","sources":["../../../src/access/controllers/dashboard.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoE;AACpE,oFAAyF;AACzF,iEAA4D;AAC5D,oFAA+E;
|
|
1
|
+
{"version":3,"file":"dashboard.controller.js","sourceRoot":"","sources":["../../../src/access/controllers/dashboard.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoE;AACpE,oFAAyF;AACzF,iFAA2E;AAC3E,iEAA4D;AAC5D,oFAA+E;AAGxE,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC5B,YACqB,UAAsB,EACtB,aAA4B;QAD5B,eAAU,GAAV,UAAU,CAAY;QACtB,kBAAa,GAAb,aAAa,CAAe;IAC9C,CAAC;IAGE,AAAN,KAAK,CAAC,aAAa,CAAU,MAA8B;QACvD,MAAM,IAAI,GAAG,8BAAI,CAAC,IAAI,EAAE,CAAC;QACzB,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,EAAE,WAAW,CAAC;QAErD,MAAM,GAAG,GAAG,kFAAkF,MAAM,CAAC,EAAE,mDAAmD,UAAU,2CAA2C,IAAI,CAAC,EAAE,GAAG,CAAC;QAE1N,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACrC,CAAC;IAGK,AAAN,KAAK,CAAC,UAAU,CAAU,MAA8B,EAAU,IAAqB;QACnF,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;QACrB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;QAE/B,IAAI,GAAG,GAAG,sFAAsF,MAAM,CAAC,IAAI,+JAA+J,CAAC;QAE3Q,IAAI,GAAG,EAAE;YACL,GAAG,GAAG,GAAG,GAAG,wBAAwB,GAAG,KAAK,CAAC;SAChD;QAED,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,GAAG,8BAA8B,KAAK,EAAE,CAAC,CAAC;IAC7E,CAAC;IAGK,AAAN,KAAK,CAAC,mBAAmB,CAAU,MAA8B;QAC7D,OAAO,IAAI,iDAAsB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC/E,CAAC;CACJ,CAAA;AAlCY,kDAAmB;AAOtB;IADL,IAAA,YAAG,GAAE;IACe,WAAA,IAAA,cAAK,GAAE,CAAA;;qCAAS,kDAAsB;;wDAO1D;AAGK;IADL,IAAA,aAAI,EAAC,eAAe,CAAC;IACJ,WAAA,IAAA,cAAK,GAAE,CAAA;IAAkC,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAA/B,kDAAsB,EAAgB,mCAAe;;qDAWtF;AAGK;IADL,IAAA,YAAG,EAAC,OAAO,CAAC;IACc,WAAA,IAAA,cAAK,GAAE,CAAA;;qCAAS,kDAAsB;;8DAEhE;8BAjCQ,mBAAmB;IAD/B,IAAA,mBAAU,EAAC,2BAA2B,CAAC;qCAGH,oCAAU;QACP,uCAAa;GAHxC,mBAAmB,CAkC/B"}
|
|
@@ -2,8 +2,14 @@ import { DateRangeFilterDto } from './date.range.filter.dto';
|
|
|
2
2
|
export declare class DateFilterDto {
|
|
3
3
|
range?: DateRangeFilterDto;
|
|
4
4
|
today?: boolean;
|
|
5
|
+
yesterday?: boolean;
|
|
5
6
|
week?: boolean;
|
|
7
|
+
last_week?: boolean;
|
|
6
8
|
month?: boolean;
|
|
9
|
+
current_quarter?: boolean;
|
|
10
|
+
previous_quarter?: boolean;
|
|
7
11
|
year?: boolean;
|
|
12
|
+
current_fy?: boolean;
|
|
13
|
+
previous_fy?: boolean;
|
|
8
14
|
financial_year?: boolean;
|
|
9
15
|
}
|
|
@@ -29,24 +29,60 @@ __decorate([
|
|
|
29
29
|
(0, class_transformer_1.Expose)(),
|
|
30
30
|
__metadata("design:type", Boolean)
|
|
31
31
|
], DateFilterDto.prototype, "today", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
(0, class_validator_1.IsBoolean)(),
|
|
35
|
+
(0, class_transformer_1.Expose)(),
|
|
36
|
+
__metadata("design:type", Boolean)
|
|
37
|
+
], DateFilterDto.prototype, "yesterday", void 0);
|
|
32
38
|
__decorate([
|
|
33
39
|
(0, class_validator_1.IsOptional)(),
|
|
34
40
|
(0, class_validator_1.IsBoolean)(),
|
|
35
41
|
(0, class_transformer_1.Expose)(),
|
|
36
42
|
__metadata("design:type", Boolean)
|
|
37
43
|
], DateFilterDto.prototype, "week", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_validator_1.IsOptional)(),
|
|
46
|
+
(0, class_validator_1.IsBoolean)(),
|
|
47
|
+
(0, class_transformer_1.Expose)(),
|
|
48
|
+
__metadata("design:type", Boolean)
|
|
49
|
+
], DateFilterDto.prototype, "last_week", void 0);
|
|
38
50
|
__decorate([
|
|
39
51
|
(0, class_validator_1.IsOptional)(),
|
|
40
52
|
(0, class_validator_1.IsBoolean)(),
|
|
41
53
|
(0, class_transformer_1.Expose)(),
|
|
42
54
|
__metadata("design:type", Boolean)
|
|
43
55
|
], DateFilterDto.prototype, "month", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_validator_1.IsOptional)(),
|
|
58
|
+
(0, class_validator_1.IsBoolean)(),
|
|
59
|
+
(0, class_transformer_1.Expose)(),
|
|
60
|
+
__metadata("design:type", Boolean)
|
|
61
|
+
], DateFilterDto.prototype, "current_quarter", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, class_validator_1.IsOptional)(),
|
|
64
|
+
(0, class_validator_1.IsBoolean)(),
|
|
65
|
+
(0, class_transformer_1.Expose)(),
|
|
66
|
+
__metadata("design:type", Boolean)
|
|
67
|
+
], DateFilterDto.prototype, "previous_quarter", void 0);
|
|
44
68
|
__decorate([
|
|
45
69
|
(0, class_validator_1.IsOptional)(),
|
|
46
70
|
(0, class_validator_1.IsBoolean)(),
|
|
47
71
|
(0, class_transformer_1.Expose)(),
|
|
48
72
|
__metadata("design:type", Boolean)
|
|
49
73
|
], DateFilterDto.prototype, "year", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, class_validator_1.IsOptional)(),
|
|
76
|
+
(0, class_validator_1.IsBoolean)(),
|
|
77
|
+
(0, class_transformer_1.Expose)(),
|
|
78
|
+
__metadata("design:type", Boolean)
|
|
79
|
+
], DateFilterDto.prototype, "current_fy", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, class_validator_1.IsOptional)(),
|
|
82
|
+
(0, class_validator_1.IsBoolean)(),
|
|
83
|
+
(0, class_transformer_1.Expose)(),
|
|
84
|
+
__metadata("design:type", Boolean)
|
|
85
|
+
], DateFilterDto.prototype, "previous_fy", void 0);
|
|
50
86
|
__decorate([
|
|
51
87
|
(0, class_validator_1.IsOptional)(),
|
|
52
88
|
(0, class_validator_1.IsBoolean)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.filter.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/date.filter.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiD;AACjD,qDAAwE;AACxE,mEAA6D;AAE7D,MAAa,aAAa;
|
|
1
|
+
{"version":3,"file":"date.filter.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/date.filter.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiD;AACjD,qDAAwE;AACxE,mEAA6D;AAE7D,MAAa,aAAa;CA6DzB;AA7DD,sCA6DC;AAxDG;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,0CAAkB,CAAC;IAC9B,IAAA,0BAAM,GAAE;8BACD,0CAAkB;4CAAC;AAK3B;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAM,GAAE;;4CACO;AAKhB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAM,GAAE;;gDACW;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAM,GAAE;;2CACM;AAKf;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAM,GAAE;;gDACW;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAM,GAAE;;4CACO;AAKhB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAM,GAAE;;sDACiB;AAK1B;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAM,GAAE;;uDACkB;AAK3B;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAM,GAAE;;2CACM;AAKf;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAM,GAAE;;iDACY;AAKrB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAM,GAAE;;kDACa;AAKtB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAM,GAAE;;qDACgB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CommonEntity } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
-
import { MenuActionAttributesDto } from '../dtos';
|
|
3
2
|
import { MenuEntity } from './menu.entity';
|
|
4
3
|
import { UiActionEntity } from './ui.action.entity';
|
|
4
|
+
import { MenuActionAttributesDto } from '../dtos/menu.action.attributes.dto';
|
|
5
5
|
export declare class MenuActionEntity extends CommonEntity {
|
|
6
6
|
ui_action_id: number;
|
|
7
7
|
menu_id: number;
|
|
@@ -12,9 +12,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.MenuActionEntity = void 0;
|
|
13
13
|
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
14
14
|
const typeorm_1 = require("typeorm");
|
|
15
|
-
const dtos_1 = require("../dtos");
|
|
16
15
|
const menu_entity_1 = require("./menu.entity");
|
|
17
16
|
const ui_action_entity_1 = require("./ui.action.entity");
|
|
17
|
+
const menu_action_attributes_dto_1 = require("../dtos/menu.action.attributes.dto");
|
|
18
18
|
let MenuActionEntity = class MenuActionEntity extends nestjs_utility_services_1.CommonEntity {
|
|
19
19
|
};
|
|
20
20
|
exports.MenuActionEntity = MenuActionEntity;
|
|
@@ -28,7 +28,7 @@ __decorate([
|
|
|
28
28
|
], MenuActionEntity.prototype, "menu_id", void 0);
|
|
29
29
|
__decorate([
|
|
30
30
|
(0, typeorm_1.Column)('json'),
|
|
31
|
-
__metadata("design:type",
|
|
31
|
+
__metadata("design:type", menu_action_attributes_dto_1.MenuActionAttributesDto)
|
|
32
32
|
], MenuActionEntity.prototype, "attributes", void 0);
|
|
33
33
|
__decorate([
|
|
34
34
|
(0, typeorm_1.ManyToOne)(() => menu_entity_1.MenuEntity),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.action.entity.js","sourceRoot":"","sources":["../../../src/access/entities/menu.action.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oFAAsE;AACtE,qCAAgE;AAChE
|
|
1
|
+
{"version":3,"file":"menu.action.entity.js","sourceRoot":"","sources":["../../../src/access/entities/menu.action.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oFAAsE;AACtE,qCAAgE;AAChE,+CAA2C;AAC3C,yDAAoD;AACpD,mFAA6E;AAStE,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,sCAAY;CAajD,CAAA;AAbY,4CAAgB;AAEzB;IADC,IAAA,gBAAM,GAAE;;sDACY;AAGrB;IADC,IAAA,gBAAM,GAAE;;iDACO;AAGhB;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;8BACH,oDAAuB;oDAAC;AAG0B;IAA7D,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;IAAE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;8BAAO,wBAAU;8CAAC;AACR;IAAtE,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,iCAAc,CAAC;IAAE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;8BAAY,iCAAc;mDAAC;2BAZxF,gBAAgB;IAD5B,IAAA,gBAAM,EAAC,kBAAkB,CAAC;GACd,gBAAgB,CAa5B"}
|
|
@@ -80,7 +80,7 @@ import { UiActionSubscriber } from './subscribers/ui.action.subscriber';
|
|
|
80
80
|
import { UserRoleSubscriber } from './subscribers/user.role.subscriber';
|
|
81
81
|
declare const es6Classes: {
|
|
82
82
|
controllers: (typeof AccessMenuController | typeof DashboardController)[];
|
|
83
|
-
dtos: (typeof BusinessUserRoleAttributesDto | typeof AccessBusinessParamDto | typeof DateRangeFilterDto | typeof DateFilterDto | typeof ListResponseFormatDto | typeof NumberRangeFilterDto | typeof CommonListFilterDto | typeof ListResponseDto
|
|
83
|
+
dtos: (typeof BusinessUserRoleAttributesDto | typeof AccessBusinessParamDto | typeof StringSearchDto | typeof DateRangeFilterDto | typeof DateFilterDto | typeof ListResponseFormatDto | typeof NumberRangeFilterDto | typeof CommonListFilterDto | typeof ListResponseDto)[];
|
|
84
84
|
entities: (typeof AccessBusinessEntity | typeof BusinessUserEntity | typeof ProductEntity | typeof GroupRoleEntity | typeof BusinessUserRoleEntity | typeof MenuRoleEntity | typeof MenuEntity | typeof UiActionRoleEntity | typeof MenuActionEntity | typeof ChildMenuEntity | typeof DashboardComponentEntity | typeof ListingPreferenceEntity | typeof ModuleMenuEntity | typeof UserRoleEntity)[];
|
|
85
85
|
jobs: (typeof BusinessUserJob | typeof BusinessUserRoleJob | typeof ChildMenuJob | typeof CustomReportJob | typeof DashboardComponentJob | typeof DashboardJob | typeof GroupRoleJob | typeof ListPreferenceJob | typeof ListingColumnJob | typeof ListingPageJob | typeof ListingPreferenceJob | typeof MenuActionJob | typeof MenuJob | typeof MenuRoleJob | typeof ModuleJob | typeof ModuleMenuJob | typeof ProductJob | typeof RoleGroupJob | typeof UiActionJob | typeof UiActionRoleJob | typeof UserRoleJob)[];
|
|
86
86
|
libraries: (typeof ProcessApplicationMenu | typeof ProcessMenuDetails | typeof ProcessDashboardReport | typeof ProcessBusinessUserRoleUpdate | typeof ProcessDateFilter | typeof ProcessListingCsvFile | typeof ProcessCommonList | typeof ProcessReportData | typeof ProcessTestList)[];
|
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.BusinessUserJob = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
15
|
-
const
|
|
15
|
+
const business_user_role_entity_1 = require("../entities/business.user.role.entity");
|
|
16
16
|
let BusinessUserJob = class BusinessUserJob extends nestjs_utility_services_1.CommonJob {
|
|
17
17
|
constructor(queueService) {
|
|
18
18
|
super('1df027a19ec3d416b60ffd7024e39e5c');
|
|
@@ -24,7 +24,7 @@ let BusinessUserJob = class BusinessUserJob extends nestjs_utility_services_1.Co
|
|
|
24
24
|
async handleDeletion(evt) {
|
|
25
25
|
if (!evt.entity.deleted_at)
|
|
26
26
|
return;
|
|
27
|
-
const roles = await
|
|
27
|
+
const roles = await business_user_role_entity_1.BusinessUserRoleEntity.find({ where: { business_user_id: evt.entity.id } });
|
|
28
28
|
for (const role of roles) {
|
|
29
29
|
await role.softDelete();
|
|
30
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business.user.job.js","sourceRoot":"","sources":["../../../src/access/jobs/business.user.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oFAAmG;
|
|
1
|
+
{"version":3,"file":"business.user.job.js","sourceRoot":"","sources":["../../../src/access/jobs/business.user.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oFAAmG;AAEnG,qFAA+E;AAExE,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,mCAAS;IAC1C,YAA+B,YAA0B;QACrD,KAAK,CAAC,kCAAkC,CAAC,CAAC;QADf,iBAAY,GAAZ,YAAY,CAAc;IAEzD,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,GAAyC;QAClD,MAAM,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;IACnC,CAAC;IAEO,KAAK,CAAC,cAAc,CAAC,GAAyC;QAClE,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,UAAU;YAAE,OAAO;QAEnC,MAAM,KAAK,GAAG,MAAM,kDAAsB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QAEhG,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;YACtB,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;SAC3B;IACL,CAAC;CACJ,CAAA;AAjBY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;qCAEoC,sCAAY;GADhD,eAAe,CAiB3B"}
|
|
@@ -12,9 +12,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.BusinessUserRoleJob = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
15
|
-
const entities_1 = require("../entities");
|
|
16
15
|
const business_user_role_entity_1 = require("../entities/business.user.role.entity");
|
|
17
16
|
const process_business_user_role_update_1 = require("../libraries/process.business.user.role.update");
|
|
17
|
+
const business_user_entity_1 = require("../entities/business.user.entity");
|
|
18
18
|
let BusinessUserRoleJob = class BusinessUserRoleJob extends nestjs_utility_services_1.CommonJob {
|
|
19
19
|
constructor(queueService) {
|
|
20
20
|
super('4a7a00b3a8090e793aeabb9277e2d725');
|
|
@@ -29,7 +29,7 @@ let BusinessUserRoleJob = class BusinessUserRoleJob extends nestjs_utility_servi
|
|
|
29
29
|
}
|
|
30
30
|
async setRoleCountCount(evt) {
|
|
31
31
|
const r = await business_user_role_entity_1.BusinessUserRoleEntity.find({ where: { business_user_id: evt.entity.business_user_id } });
|
|
32
|
-
const bu = await
|
|
32
|
+
const bu = await business_user_entity_1.BusinessUserEntity.first(evt.entity.business_user_id);
|
|
33
33
|
if (!bu)
|
|
34
34
|
return;
|
|
35
35
|
bu.attributes = { ...bu.attributes, roles_count: r.length };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business.user.role.job.js","sourceRoot":"","sources":["../../../src/access/jobs/business.user.role.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oFAAmG;AACnG,
|
|
1
|
+
{"version":3,"file":"business.user.role.job.js","sourceRoot":"","sources":["../../../src/access/jobs/business.user.role.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oFAAmG;AACnG,qFAA+E;AAC/E,sGAA+F;AAC/F,2EAAsE;AAE/D,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,mCAAS;IAC9C,YAA+B,YAA0B;QACrD,KAAK,CAAC,kCAAkC,CAAC,CAAC;QADf,iBAAY,GAAZ,YAAY,CAAc;IAEzD,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,GAA6C;QACtD,MAAM,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;QAC/B,MAAM,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;IAEO,KAAK,CAAC,cAAc,CAAC,GAA6C;QACtE,OAAO,IAAI,iEAA6B,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5D,CAAC;IAEO,KAAK,CAAC,iBAAiB,CAAC,GAA6C;QACzE,MAAM,CAAC,GAAG,MAAM,kDAAsB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;QAE1G,MAAM,EAAE,GAAG,MAAM,yCAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;QACvE,IAAI,CAAC,EAAE;YAAE,OAAO;QAEhB,EAAE,CAAC,UAAU,GAAG,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;QAC5D,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC;CACJ,CAAA;AAtBY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;qCAEoC,sCAAY;GADhD,mBAAmB,CAsB/B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DatabaseEventDto } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
-
import { BusinessUserRoleEntity } from '../entities';
|
|
2
|
+
import { BusinessUserRoleEntity } from '../entities/business.user.role.entity';
|
|
3
3
|
export declare class ProcessBusinessUserRoleUpdate {
|
|
4
4
|
process(evt: DatabaseEventDto<BusinessUserRoleEntity>): Promise<void>;
|
|
5
5
|
private handleInsertion;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ProcessBusinessUserRoleUpdate = void 0;
|
|
4
|
-
const
|
|
4
|
+
const business_user_entity_1 = require("../entities/business.user.entity");
|
|
5
|
+
const group_role_entity_1 = require("../entities/group.role.entity");
|
|
6
|
+
const user_role_entity_1 = require("../entities/user.role.entity");
|
|
5
7
|
const SOURCEHASH = require("../../config/source.hash");
|
|
6
8
|
class ProcessBusinessUserRoleUpdate {
|
|
7
9
|
async process(evt) {
|
|
@@ -10,10 +12,10 @@ class ProcessBusinessUserRoleUpdate {
|
|
|
10
12
|
return this.handleInsertion(evt);
|
|
11
13
|
}
|
|
12
14
|
async handleInsertion(evt) {
|
|
13
|
-
const businessUser = await
|
|
14
|
-
const roles = await
|
|
15
|
+
const businessUser = await business_user_entity_1.BusinessUserEntity.first(evt.entity.business_user_id);
|
|
16
|
+
const roles = await group_role_entity_1.GroupRoleEntity.find({ where: { group_id: evt.entity.role_group_id } });
|
|
15
17
|
for (const role of roles) {
|
|
16
|
-
await
|
|
18
|
+
await user_role_entity_1.UserRoleEntity.firstOrCreate({
|
|
17
19
|
source_type: SOURCEHASH.businessUserRole,
|
|
18
20
|
source_id: evt.entity.id,
|
|
19
21
|
user_id: businessUser.user_id,
|
|
@@ -23,7 +25,7 @@ class ProcessBusinessUserRoleUpdate {
|
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
27
|
async handleDeletion(evt) {
|
|
26
|
-
await
|
|
28
|
+
await user_role_entity_1.UserRoleEntity.softDelete({
|
|
27
29
|
source_type: SOURCEHASH.businessUserRole,
|
|
28
30
|
source_id: evt.entity.id,
|
|
29
31
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.business.user.role.update.js","sourceRoot":"","sources":["../../../src/access/libraries/process.business.user.role.update.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"process.business.user.role.update.js","sourceRoot":"","sources":["../../../src/access/libraries/process.business.user.role.update.ts"],"names":[],"mappings":";;;AACA,2EAAsE;AAEtE,qEAAgE;AAChE,mEAA8D;AAC9D,uDAAwD;AAExD,MAAa,6BAA6B;IACtC,KAAK,CAAC,OAAO,CAAC,GAA6C;QACvD,IAAI,GAAG,CAAC,MAAM,CAAC,UAAU;YAAE,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;QAC3D,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;IACrC,CAAC;IAEO,KAAK,CAAC,eAAe,CAAC,GAA6C;QACvE,MAAM,YAAY,GAAG,MAAM,yCAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;QACjF,MAAM,KAAK,GAAG,MAAM,mCAAe,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;QAE5F,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;YACtB,MAAM,iCAAc,CAAC,aAAa,CAAC;gBAC/B,WAAW,EAAE,UAAU,CAAC,gBAAgB;gBACxC,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE;gBACxB,OAAO,EAAE,YAAY,CAAC,OAAO;gBAC7B,WAAW,EAAE,YAAY,CAAC,WAAW;gBACrC,OAAO,EAAE,IAAI,CAAC,OAAO;aACxB,CAAC,CAAC;SACN;IACL,CAAC;IAEO,KAAK,CAAC,cAAc,CAAC,GAA6C;QACtE,MAAM,iCAAc,CAAC,UAAU,CAAC;YAC5B,WAAW,EAAE,UAAU,CAAC,gBAAgB;YACxC,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE;SAC3B,CAAC,CAAC;IACP,CAAC;CACJ;AA3BD,sEA2BC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AccessManager } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
-
import { DashboardEntity } from '../entities';
|
|
2
|
+
import { DashboardEntity } from '../entities/dashboard.entity';
|
|
3
3
|
export declare class ProcessDashboardReport {
|
|
4
4
|
private readonly accessManager;
|
|
5
5
|
constructor(accessManager: AccessManager);
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ProcessDashboardReport = void 0;
|
|
4
4
|
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
5
|
-
const
|
|
5
|
+
const dashboard_component_entity_1 = require("../entities/dashboard.component.entity");
|
|
6
|
+
const dashboard_entity_1 = require("../entities/dashboard.entity");
|
|
6
7
|
class ProcessDashboardReport {
|
|
7
8
|
constructor(accessManager) {
|
|
8
9
|
this.accessManager = accessManager;
|
|
9
10
|
}
|
|
10
11
|
async process(identifier) {
|
|
11
|
-
const dashboard = await
|
|
12
|
+
const dashboard = await dashboard_entity_1.DashboardEntity.findOne({ where: { identifier } });
|
|
12
13
|
if (!dashboard)
|
|
13
14
|
throw new nestjs_utility_services_1.AccessManager();
|
|
14
15
|
dashboard.components = await this.getReports(dashboard);
|
|
15
16
|
return dashboard;
|
|
16
17
|
}
|
|
17
18
|
async getReports(dashboard) {
|
|
18
|
-
const reports = await
|
|
19
|
+
const reports = await dashboard_component_entity_1.DashboardComponentEntity.find({ where: { dashboard_id: dashboard.id, active: true } });
|
|
19
20
|
const r = [];
|
|
20
21
|
for (const report of reports) {
|
|
21
22
|
const hasAccess = await this.hasReportAccess(report.identifier);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.dashboard.report.js","sourceRoot":"","sources":["../../../src/access/libraries/process.dashboard.report.ts"],"names":[],"mappings":";;;AAAA,oFAAqF;AACrF,
|
|
1
|
+
{"version":3,"file":"process.dashboard.report.js","sourceRoot":"","sources":["../../../src/access/libraries/process.dashboard.report.ts"],"names":[],"mappings":";;;AAAA,oFAAqF;AACrF,uFAAkF;AAClF,mEAA+D;AAC/D,MAAa,sBAAsB;IAC/B,YAA6B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAE7D,KAAK,CAAC,OAAO,CAAC,UAAkB;QAC5B,MAAM,SAAS,GAAG,MAAM,kCAAe,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC;QAE3E,IAAI,CAAC,SAAS;YAAE,MAAM,IAAI,uCAAa,EAAE,CAAC;QAC1C,SAAS,CAAC,UAAU,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QAExD,OAAO,SAAS,CAAC;IACrB,CAAC;IAEO,KAAK,CAAC,UAAU,CAAC,SAA0B;QAC/C,MAAM,OAAO,GAAG,MAAM,qDAAwB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,YAAY,EAAE,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QAE7G,MAAM,CAAC,GAA+B,EAAE,CAAC;QAEzC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;YAC1B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAEhE,IAAI,SAAS;gBAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SACjC;QAED,OAAO,CAAC,CAAC;IACb,CAAC;IAEO,KAAK,CAAC,eAAe,CAAC,UAAkB;QAC5C,MAAM,MAAM,GAAG,MAAM,sCAAY,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;QAExG,IAAI,CAAC,MAAM;YAAE,OAAO,KAAK,CAAC;QAC1B,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QAE7C,OAAO,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IACtE,CAAC;CACJ;AAlCD,wDAkCC"}
|
|
@@ -6,9 +6,16 @@ export declare class ProcessDateFilter {
|
|
|
6
6
|
process(filter: DateFilterDto): DateRangeFilterDto;
|
|
7
7
|
private analyseFilter;
|
|
8
8
|
private today;
|
|
9
|
+
private yesterday;
|
|
9
10
|
private week;
|
|
11
|
+
private lastWeek;
|
|
10
12
|
private month;
|
|
11
13
|
private year;
|
|
14
|
+
private currentQuarter;
|
|
15
|
+
private previousQuarter;
|
|
16
|
+
private currentFy;
|
|
17
|
+
private previousFy;
|
|
12
18
|
private financialYear;
|
|
13
19
|
private checkRange;
|
|
20
|
+
private getFinancialDate;
|
|
14
21
|
}
|
|
@@ -11,13 +11,26 @@ class ProcessDateFilter {
|
|
|
11
11
|
return this.range;
|
|
12
12
|
}
|
|
13
13
|
analyseFilter() {
|
|
14
|
-
this.
|
|
14
|
+
if (!this.range)
|
|
15
|
+
this.today();
|
|
16
|
+
if (!this.range)
|
|
17
|
+
this.yesterday();
|
|
15
18
|
if (!this.range)
|
|
16
19
|
this.week();
|
|
20
|
+
if (!this.range)
|
|
21
|
+
this.lastWeek();
|
|
17
22
|
if (!this.range)
|
|
18
23
|
this.month();
|
|
24
|
+
if (!this.range)
|
|
25
|
+
this.currentQuarter();
|
|
26
|
+
if (!this.range)
|
|
27
|
+
this.previousQuarter();
|
|
19
28
|
if (!this.range)
|
|
20
29
|
this.year();
|
|
30
|
+
if (!this.range)
|
|
31
|
+
this.currentFy();
|
|
32
|
+
if (!this.range)
|
|
33
|
+
this.previousFy();
|
|
21
34
|
if (!this.range)
|
|
22
35
|
this.financialYear();
|
|
23
36
|
if (!this.range)
|
|
@@ -29,12 +42,24 @@ class ProcessDateFilter {
|
|
|
29
42
|
const today = new Date();
|
|
30
43
|
this.range = { min: (0, date_fns_1.startOfDay)(today), max: (0, date_fns_1.endOfDay)(today) };
|
|
31
44
|
}
|
|
45
|
+
yesterday() {
|
|
46
|
+
if (!this.filter.yesterday)
|
|
47
|
+
return;
|
|
48
|
+
const now = new Date();
|
|
49
|
+
this.range = { min: (0, date_fns_1.startOfDay)((0, date_fns_1.subDays)(now, 1)), max: (0, date_fns_1.endOfDay)((0, date_fns_1.subDays)(now, 1)) };
|
|
50
|
+
}
|
|
32
51
|
week() {
|
|
33
52
|
if (!this.filter.week)
|
|
34
53
|
return;
|
|
35
54
|
const now = new Date();
|
|
36
55
|
this.range = { min: (0, date_fns_1.startOfWeek)(now, { weekStartsOn: 1 }), max: (0, date_fns_1.endOfDay)(now) };
|
|
37
56
|
}
|
|
57
|
+
lastWeek() {
|
|
58
|
+
if (!this.filter.last_week)
|
|
59
|
+
return;
|
|
60
|
+
const now = new Date();
|
|
61
|
+
this.range = { min: (0, date_fns_1.subDays)((0, date_fns_1.startOfWeek)(now, { weekStartsOn: 1 }), 7), max: (0, date_fns_1.subDays)((0, date_fns_1.endOfWeek)(now), 7) };
|
|
62
|
+
}
|
|
38
63
|
month() {
|
|
39
64
|
if (!this.filter.month)
|
|
40
65
|
return;
|
|
@@ -45,7 +70,31 @@ class ProcessDateFilter {
|
|
|
45
70
|
if (!this.filter.year)
|
|
46
71
|
return;
|
|
47
72
|
const now = new Date();
|
|
48
|
-
this.range = { min: (0, date_fns_1.startOfYear)(now), max: (0, date_fns_1.
|
|
73
|
+
this.range = { min: (0, date_fns_1.startOfYear)(now), max: (0, date_fns_1.endOfYear)(now) };
|
|
74
|
+
}
|
|
75
|
+
currentQuarter() {
|
|
76
|
+
if (!this.filter.current_quarter)
|
|
77
|
+
return;
|
|
78
|
+
const now = new Date();
|
|
79
|
+
this.range = { min: (0, date_fns_1.startOfQuarter)(now), max: (0, date_fns_1.endOfQuarter)(now) };
|
|
80
|
+
}
|
|
81
|
+
previousQuarter() {
|
|
82
|
+
if (!this.filter.previous_quarter)
|
|
83
|
+
return;
|
|
84
|
+
const now = new Date();
|
|
85
|
+
this.range = { min: (0, date_fns_1.subQuarters)((0, date_fns_1.startOfQuarter)(now), 1), max: (0, date_fns_1.subQuarters)((0, date_fns_1.endOfQuarter)(now), 1) };
|
|
86
|
+
}
|
|
87
|
+
currentFy() {
|
|
88
|
+
if (!this.filter.current_fy)
|
|
89
|
+
return;
|
|
90
|
+
const now = new Date();
|
|
91
|
+
this.range = { min: (0, date_fns_1.addMonths)((0, date_fns_1.startOfYear)(this.getFinancialDate(now)), 3), max: (0, date_fns_1.addMonths)((0, date_fns_1.endOfYear)(this.getFinancialDate(now)), 3) };
|
|
92
|
+
}
|
|
93
|
+
previousFy() {
|
|
94
|
+
if (!this.filter.previous_fy)
|
|
95
|
+
return;
|
|
96
|
+
const now = new Date();
|
|
97
|
+
this.range = { min: (0, date_fns_1.subMonths)((0, date_fns_1.startOfYear)(this.getFinancialDate(now)), 9), max: (0, date_fns_1.subMonths)((0, date_fns_1.endOfYear)(this.getFinancialDate(now)), 9) };
|
|
49
98
|
}
|
|
50
99
|
financialYear() {
|
|
51
100
|
if (!this.filter.financial_year)
|
|
@@ -56,6 +105,13 @@ class ProcessDateFilter {
|
|
|
56
105
|
return;
|
|
57
106
|
this.range = this.filter.range;
|
|
58
107
|
}
|
|
108
|
+
getFinancialDate(date) {
|
|
109
|
+
const month = date.getMonth();
|
|
110
|
+
if (month < 3) {
|
|
111
|
+
return (0, date_fns_1.subYears)(date, 1);
|
|
112
|
+
}
|
|
113
|
+
return date;
|
|
114
|
+
}
|
|
59
115
|
}
|
|
60
116
|
exports.ProcessDateFilter = ProcessDateFilter;
|
|
61
117
|
//# sourceMappingURL=process.date.filter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.date.filter.js","sourceRoot":"","sources":["../../../src/access/libraries/process.date.filter.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"process.date.filter.js","sourceRoot":"","sources":["../../../src/access/libraries/process.date.filter.ts"],"names":[],"mappings":";;;AAAA,uCAekB;AAQlB,MAAa,iBAAiB;IAsB1B,OAAO,CAAC,MAAqB;QACzB,IAAI,CAAC,MAAM;YAAE,OAAO;QAEpB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,aAAa,EAAE,CAAC;QAErB,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAOO,aAAa;QACjB,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,IAAI,CAAC,KAAK,EAAE,CAAC;QAC9B,IAAI,CAAC,IAAI,CAAC,KAAK;YAA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AAI,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW;YAAE,OAAO;QACrC,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;QAEvB,IAAI,CAAC,KAAK,GAAG,EAAE,GAAG,EAAE,IAAA,oBAAS,EAAC,IAAA,sBAAW,EAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,IAAA,oBAAS,EAAC,IAAA,oBAAS,EAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;IAC1I,CAAC;IAQO,aAAa;QACjB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc;YAAE,OAAO;IAG5C,CAAC;IAQO,UAAU;QACd,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;YAAE,OAAO;QAE/B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;IACnC,CAAC;IAEO,gBAAgB,CAAC,IAAU;QAC/B,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC9B,IAAI,KAAK,GAAG,CAAC,EAAE;YACX,OAAO,IAAA,mBAAQ,EAAC,IAAI,EAAE,CAAC,CAAC,CAAC;SAC5B;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AApND,8CAoNC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SqlService, UploadService } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
-
import { ListingColumnEntity } from '../entities';
|
|
2
|
+
import { ListingColumnEntity } from '../entities/listing.column.entity';
|
|
3
3
|
export declare class ProcessListingCsvFile {
|
|
4
4
|
private readonly uploadService;
|
|
5
5
|
private readonly sqlService;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CommonListFilterDto } from '../dtos';
|
|
2
|
-
import { ProcessCommonList } from './process.common.list';
|
|
3
1
|
import { SqlService, UploadService } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
+
import { CommonListFilterDto } from '../dtos/common.list.filter.dto';
|
|
3
|
+
import { ProcessCommonList } from './process.common.list';
|
|
4
4
|
export declare class ProcessTestList extends ProcessCommonList {
|
|
5
5
|
protected readonly sqlService: SqlService;
|
|
6
6
|
protected readonly uploadService: UploadService;
|
|
@@ -12,5 +12,5 @@ export declare class ProcessTestList extends ProcessCommonList {
|
|
|
12
12
|
metrics: any[];
|
|
13
13
|
};
|
|
14
14
|
constructor(sqlService: SqlService, uploadService: UploadService);
|
|
15
|
-
process(filter: CommonListFilterDto): Promise<import("
|
|
15
|
+
process(filter: CommonListFilterDto): Promise<import("..").ListResponseDto>;
|
|
16
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.test.list.js","sourceRoot":"","sources":["../../../src/access/libraries/process.test.list.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"process.test.list.js","sourceRoot":"","sources":["../../../src/access/libraries/process.test.list.ts"],"names":[],"mappings":";;;AAEA,+DAA0D;AAE1D,MAAa,eAAgB,SAAQ,uCAAiB;IAUlD,YACuB,UAAsB,EACtB,aAA4B;QAE/C,KAAK,EAAE,CAAC;QAHW,eAAU,GAAV,UAAU,CAAY;QACtB,kBAAa,GAAb,aAAa,CAAe;QATzC,WAAM,GAAG;YACf,GAAG,EAAE,2GAA2G;YAChH,KAAK,EAAE,sBAAsB;YAC7B,OAAO,EAAE,CAAC,KAAK,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC;YACrG,OAAO,EAAE,EAAE;SACd,CAAC;IAOF,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;QAE/C,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;IACzB,CAAC;CACJ;AAvBD,0CAuBC"}
|