@servicelabsco/nestjs-utility-services 1.2.29 → 1.2.30
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/app.controller.d.ts +1 -1
- package/dist/app.controller.js +8 -8
- package/dist/app.controller.js.map +1 -1
- package/dist/common/libraries/date.util.js +6 -6
- package/dist/common/libraries/date.util.js.map +1 -1
- package/dist/common/libraries/list.manager.js +2 -2
- package/dist/common/libraries/platform.utility.d.ts +1 -0
- package/dist/common/libraries/platform.utility.js +3 -0
- package/dist/common/libraries/platform.utility.js.map +1 -1
- package/dist/common/libraries/record.manager.js +4 -4
- package/dist/common/libraries/report.data.manager.js +2 -2
- package/dist/common/libraries/report.list.manager.js +2 -2
- package/dist/config/source.hash.d.ts +2 -2
- package/dist/config/source.hash.js +2 -2
- package/dist/migrations/1699364212491-AddSchemaValidationDataSeederTable.d.ts +5 -0
- package/dist/migrations/1699364212491-AddSchemaValidationDataSeederTable.js +21 -0
- package/dist/migrations/1699364212491-AddSchemaValidationDataSeederTable.js.map +1 -0
- package/dist/platformUtility/consumers/job.consumer.js.map +1 -1
- package/dist/platformUtility/libraries/process.audit.log.data.js +2 -2
- package/dist/platformUtility/services/mail.service.js +2 -2
- package/dist/system/commands/db.scanner.command.js +6 -6
- package/dist/system/controllers/form.controller.js +3 -3
- package/dist/system/controllers/preference.controller.js +4 -4
- package/dist/system/controllers/report.controller.js +2 -2
- package/dist/system/es6.classes.d.ts +2 -2
- package/dist/system/es6.classes.js +2 -2
- package/dist/system/es6.classes.js.map +1 -1
- package/dist/system/jobs/clean.scheduled.event.job.d.ts +4 -5
- package/dist/system/jobs/clean.scheduled.event.job.js +7 -7
- package/dist/system/jobs/clean.scheduled.event.job.js.map +1 -1
- package/dist/system/jobs/index.d.ts +1 -1
- package/dist/system/jobs/index.js +1 -1
- package/dist/system/jobs/index.js.map +1 -1
- package/dist/system/jobs/model.scanner.job.js +6 -6
- package/dist/system/jobs/report.column.sync.job.js +3 -3
- package/dist/system/jobs/scheduled.event.job.d.ts +9 -5
- package/dist/system/jobs/scheduled.event.job.js +22 -21
- package/dist/system/jobs/scheduled.event.job.js.map +1 -1
- package/dist/system/jobs/{scheduled.events.job.d.ts → set.scheduled.event.job.d.ts} +3 -3
- package/dist/system/jobs/{scheduled.events.job.js → set.scheduled.event.job.js} +20 -19
- package/dist/system/jobs/set.scheduled.event.job.js.map +1 -0
- package/dist/system/jobs/user.group.member.job.js +5 -5
- package/dist/system/jobs/user.group.permission.job.js +3 -3
- package/dist/system/jobs/user.group.role.job.js +3 -3
- package/dist/system/libraries/model.sync.js +2 -2
- package/dist/system/services/column.service.js +2 -2
- package/dist/system/services/es6.jobs.service.d.ts +3 -3
- package/dist/system/services/es6.jobs.service.js +5 -5
- package/dist/system/services/es6.jobs.service.js.map +1 -1
- package/dist/system/services/form.service.js +2 -2
- package/dist/system/services/menu.service.js +2 -2
- package/dist/system/services/model.service.js +3 -3
- package/dist/system/services/preference.service.js +5 -5
- package/dist/system/services/report.service.js +4 -4
- package/dist/system/services/scheduled.event.service.d.ts +8 -2
- package/dist/system/services/scheduled.event.service.js +46 -21
- package/dist/system/services/scheduled.event.service.js.map +1 -1
- package/dist/system/services/security.rule.service.js +3 -3
- package/dist/system/subscribers/scheduled.event.subscriber.d.ts +2 -3
- package/dist/system/subscribers/scheduled.event.subscriber.js +10 -9
- package/dist/system/subscribers/scheduled.event.subscriber.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/system/jobs/scheduled.events.job.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"clean.scheduled.event.job.js","sourceRoot":"","sources":["../../../src/system/jobs/clean.scheduled.event.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,kEAA8D;AAC9D,gFAA4E;
|
1
|
+
{"version":3,"file":"clean.scheduled.event.job.js","sourceRoot":"","sources":["../../../src/system/jobs/clean.scheduled.event.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,kEAA8D;AAC9D,gFAA4E;AAC5E,iFAA4E;AAC5E,uEAAiE;AAG1D,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,sBAAS;IACjD,YACuB,YAA0B,EAC5B,qBAA4C,EAC5C,oBAA0C;QAE3D,KAAK,CAAC,kCAAkC,CAAC,CAAC;QAJvB,iBAAY,GAAZ,YAAY,CAAc;QAC5B,0BAAqB,GAArB,qBAAqB,CAAuB;QAC5C,yBAAoB,GAApB,oBAAoB,CAAsB;IAG/D,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,EAAU;QACnB,MAAM,IAAI,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;QACxD,MAAM,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACjD,CAAC;CACJ,CAAA;AAZY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;qCAG4B,4BAAY;QACL,+CAAqB;QACtB,8CAAoB;GAJtD,sBAAsB,CAYlC"}
|
@@ -13,7 +13,7 @@ export * from './refresh.property.cache.job';
|
|
13
13
|
export * from './relationship.mapper.job';
|
14
14
|
export * from './report.column.sync.job';
|
15
15
|
export * from './scheduled.event.job';
|
16
|
-
export * from './scheduled.
|
16
|
+
export * from './set.scheduled.event.job';
|
17
17
|
export * from './sms.message.job';
|
18
18
|
export * from './user.group.member.job';
|
19
19
|
export * from './user.group.permission.job';
|
@@ -29,7 +29,7 @@ __exportStar(require("./refresh.property.cache.job"), exports);
|
|
29
29
|
__exportStar(require("./relationship.mapper.job"), exports);
|
30
30
|
__exportStar(require("./report.column.sync.job"), exports);
|
31
31
|
__exportStar(require("./scheduled.event.job"), exports);
|
32
|
-
__exportStar(require("./scheduled.
|
32
|
+
__exportStar(require("./set.scheduled.event.job"), exports);
|
33
33
|
__exportStar(require("./sms.message.job"), exports);
|
34
34
|
__exportStar(require("./user.group.member.job"), exports);
|
35
35
|
__exportStar(require("./user.group.permission.job"), exports);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/system/jobs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAAA,0DAAwC;AAAA,+CAA6B;AAAA,sDAAoC;AAAA,gDAA8B;AAAA,sDAAoC;AAAA,iDAA+B;AAAA,wDAAsC;AAAA,0DAAwC;AAAA,sDAAoC;AAAA,iDAA+B;AAAA,+DAA6C;AAAA,4DAA0C;AAAA,2DAAyC;AAAA,wDAAsC;AAAA,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/system/jobs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAAA,0DAAwC;AAAA,+CAA6B;AAAA,sDAAoC;AAAA,gDAA8B;AAAA,sDAAoC;AAAA,iDAA+B;AAAA,wDAAsC;AAAA,0DAAwC;AAAA,sDAAoC;AAAA,iDAA+B;AAAA,+DAA6C;AAAA,4DAA0C;AAAA,2DAAyC;AAAA,wDAAsC;AAAA,4DAA0C;AAAA,oDAAkC;AAAA,0DAAwC;AAAA,8DAA4C;AAAA,wDAAqC"}
|
@@ -18,7 +18,7 @@ const column_entity_1 = require("../entities/column.entity");
|
|
18
18
|
const model_entity_1 = require("../entities/model.entity");
|
19
19
|
const relationship_entity_1 = require("../entities/relationship.entity");
|
20
20
|
const local_property_service_1 = require("./../../platformUtility/services/local.property.service");
|
21
|
-
const
|
21
|
+
const SourceHash = require("../../config/source.hash");
|
22
22
|
const hash_1 = require("../../common/libraries/hash");
|
23
23
|
let ModelScannerJob = class ModelScannerJob extends common_job_1.CommonJob {
|
24
24
|
constructor(queueService, localPropertyService) {
|
@@ -88,7 +88,7 @@ let ModelScannerJob = class ModelScannerJob extends common_job_1.CommonJob {
|
|
88
88
|
if (!referencedColumn)
|
89
89
|
return;
|
90
90
|
const record = await relationship_entity_1.RelationshipEntity.firstOrNew({
|
91
|
-
source_type:
|
91
|
+
source_type: SourceHash.model,
|
92
92
|
source_id: model.id,
|
93
93
|
alias_column_id: referencedColumn.id,
|
94
94
|
});
|
@@ -104,7 +104,7 @@ let ModelScannerJob = class ModelScannerJob extends common_job_1.CommonJob {
|
|
104
104
|
record.attributes = { ...record.attributes, ...{ sync: { system: true } } };
|
105
105
|
await record.save();
|
106
106
|
referencedColumn.reference_model_id = model.id;
|
107
|
-
referencedColumn.type_id = referencedModel.model_hash ===
|
107
|
+
referencedColumn.type_id = referencedModel.model_hash === SourceHash.script ? 10 : 6;
|
108
108
|
await referencedColumn.save();
|
109
109
|
return record;
|
110
110
|
}
|
@@ -113,7 +113,7 @@ let ModelScannerJob = class ModelScannerJob extends common_job_1.CommonJob {
|
|
113
113
|
if (!referencedColumn)
|
114
114
|
return;
|
115
115
|
const record = await relationship_entity_1.RelationshipEntity.firstOrNew({
|
116
|
-
source_type:
|
116
|
+
source_type: SourceHash.model,
|
117
117
|
source_id: model.id,
|
118
118
|
source_column_id: referencedColumn.id,
|
119
119
|
});
|
@@ -132,7 +132,7 @@ let ModelScannerJob = class ModelScannerJob extends common_job_1.CommonJob {
|
|
132
132
|
record.attributes = { ...record.attributes, ...{ sync: { system: true } } };
|
133
133
|
await record.save();
|
134
134
|
referencedColumn.reference_model_id = referencedModel.id;
|
135
|
-
referencedColumn.type_id = referencedModel.model_hash ===
|
135
|
+
referencedColumn.type_id = referencedModel.model_hash === SourceHash.script ? 10 : 6;
|
136
136
|
await referencedColumn.save();
|
137
137
|
return record;
|
138
138
|
}
|
@@ -212,7 +212,7 @@ let ModelScannerJob = class ModelScannerJob extends common_job_1.CommonJob {
|
|
212
212
|
async getModelColumn(modelId, columnName) {
|
213
213
|
return column_entity_1.ColumnEntity.findOne({
|
214
214
|
where: {
|
215
|
-
source_type:
|
215
|
+
source_type: SourceHash.model,
|
216
216
|
source_id: modelId,
|
217
217
|
name: columnName,
|
218
218
|
},
|
@@ -18,7 +18,7 @@ const sql_service_1 = require("../../platformUtility/services/sql.service");
|
|
18
18
|
const column_entity_1 = require("../entities/column.entity");
|
19
19
|
const report_entity_1 = require("../entities/report.entity");
|
20
20
|
const report_param_entity_1 = require("../entities/report.param.entity");
|
21
|
-
const
|
21
|
+
const SourceHash = require("../../config/source.hash");
|
22
22
|
let ReportColumnSyncJob = class ReportColumnSyncJob extends common_job_1.CommonJob {
|
23
23
|
constructor(queueService, sqlService) {
|
24
24
|
super('7676ffc477bc85ccfd8418b70f2377c9');
|
@@ -53,7 +53,7 @@ let ReportColumnSyncJob = class ReportColumnSyncJob extends common_job_1.CommonJ
|
|
53
53
|
}
|
54
54
|
async saveColumn(report, obj) {
|
55
55
|
const column = await column_entity_1.ColumnEntity.firstOrNew({
|
56
|
-
source_type:
|
56
|
+
source_type: SourceHash.report,
|
57
57
|
source_id: report.id,
|
58
58
|
name: obj.key,
|
59
59
|
});
|
@@ -90,7 +90,7 @@ let ReportColumnSyncJob = class ReportColumnSyncJob extends common_job_1.CommonJ
|
|
90
90
|
}
|
91
91
|
async removeAllUnusedColumns(report, columns) {
|
92
92
|
const reportColumns = await column_entity_1.ColumnEntity.find({
|
93
|
-
where: { source_type:
|
93
|
+
where: { source_type: SourceHash.report, source_id: report.id },
|
94
94
|
});
|
95
95
|
const promises = [];
|
96
96
|
reportColumns.forEach((reportColumn) => {
|
@@ -1,11 +1,15 @@
|
|
1
|
+
import { DatabaseEventDto } from '../../common/dtos/database.event.dto';
|
1
2
|
import { CommonJob } from '../../common/libraries/common.job';
|
2
3
|
import { QueueService } from '../../platformUtility/services/queue.service';
|
3
4
|
import { ScheduledEventEntity } from '../entities/scheduled.event.entity';
|
4
|
-
import {
|
5
|
+
import { CleanScheduledEventJob } from './clean.scheduled.event.job';
|
6
|
+
import { SetScheduledEventJob } from './set.scheduled.event.job';
|
5
7
|
export declare class ScheduledEventJob extends CommonJob {
|
6
8
|
protected readonly queueService: QueueService;
|
7
|
-
private readonly
|
8
|
-
|
9
|
-
|
10
|
-
|
9
|
+
private readonly cleanScheduledEventJob;
|
10
|
+
private readonly setScheduledEventJob;
|
11
|
+
constructor(queueService: QueueService, cleanScheduledEventJob: CleanScheduledEventJob, setScheduledEventJob: SetScheduledEventJob);
|
12
|
+
handle(event: DatabaseEventDto<ScheduledEventEntity>): Promise<void>;
|
13
|
+
private setSchedule;
|
14
|
+
private cleanRecord;
|
11
15
|
}
|
@@ -13,37 +13,38 @@ exports.ScheduledEventJob = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
14
14
|
const common_job_1 = require("../../common/libraries/common.job");
|
15
15
|
const queue_service_1 = require("../../platformUtility/services/queue.service");
|
16
|
-
const
|
17
|
-
const
|
16
|
+
const clean_scheduled_event_job_1 = require("./clean.scheduled.event.job");
|
17
|
+
const set_scheduled_event_job_1 = require("./set.scheduled.event.job");
|
18
18
|
let ScheduledEventJob = class ScheduledEventJob extends common_job_1.CommonJob {
|
19
|
-
constructor(queueService,
|
19
|
+
constructor(queueService, cleanScheduledEventJob, setScheduledEventJob) {
|
20
20
|
super('bb97644f2c505dc135d01f4c6959ec1f');
|
21
21
|
this.queueService = queueService;
|
22
|
-
this.
|
22
|
+
this.cleanScheduledEventJob = cleanScheduledEventJob;
|
23
|
+
this.setScheduledEventJob = setScheduledEventJob;
|
23
24
|
}
|
24
|
-
async handle(
|
25
|
-
|
26
|
-
|
27
|
-
const job = await scheduled_event_entity_1.ScheduledEventEntity.first(data);
|
28
|
-
if (!job)
|
29
|
-
return [job];
|
30
|
-
return [await this.scheduledEventService.createEventsForJob(job)];
|
25
|
+
async handle(event) {
|
26
|
+
await this.cleanRecord(event);
|
27
|
+
await this.setSchedule(event);
|
31
28
|
}
|
32
|
-
async
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
return
|
40
|
-
|
29
|
+
async setSchedule(event) {
|
30
|
+
if (!this.isNewRecord(event))
|
31
|
+
return;
|
32
|
+
return this.setScheduledEventJob.dispatch(event.entity.id);
|
33
|
+
}
|
34
|
+
async cleanRecord(event) {
|
35
|
+
if (this.isNewRecord(event))
|
36
|
+
return;
|
37
|
+
const trackingColumns = ['event_id', 'parameter', 'timing', 'active', 'start_time', 'end_time'];
|
38
|
+
if (!this.isColumnUpdated(event, trackingColumns))
|
39
|
+
return;
|
40
|
+
return this.cleanScheduledEventJob.dispatch(event.entity.id);
|
41
41
|
}
|
42
42
|
};
|
43
43
|
exports.ScheduledEventJob = ScheduledEventJob;
|
44
44
|
exports.ScheduledEventJob = ScheduledEventJob = __decorate([
|
45
45
|
(0, common_1.Injectable)(),
|
46
46
|
__metadata("design:paramtypes", [queue_service_1.QueueService,
|
47
|
-
|
47
|
+
clean_scheduled_event_job_1.CleanScheduledEventJob,
|
48
|
+
set_scheduled_event_job_1.SetScheduledEventJob])
|
48
49
|
], ScheduledEventJob);
|
49
50
|
//# sourceMappingURL=scheduled.event.job.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"scheduled.event.job.js","sourceRoot":"","sources":["../../../src/system/jobs/scheduled.event.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;
|
1
|
+
{"version":3,"file":"scheduled.event.job.js","sourceRoot":"","sources":["../../../src/system/jobs/scheduled.event.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,kEAA8D;AAC9D,gFAA4E;AAE5E,2EAAqE;AACrE,uEAAiE;AAG1D,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,sBAAS;IAC5C,YACuB,YAA0B,EAC5B,sBAA8C,EAC9C,oBAA0C;QAE3D,KAAK,CAAC,kCAAkC,CAAC,CAAC;QAJvB,iBAAY,GAAZ,YAAY,CAAc;QAC5B,2BAAsB,GAAtB,sBAAsB,CAAwB;QAC9C,yBAAoB,GAApB,oBAAoB,CAAsB;IAG/D,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,KAA6C;QACtD,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC9B,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAEO,KAAK,CAAC,WAAW,CAAC,KAA6C;QACnE,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;YAAE,OAAO;QAErC,OAAO,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC/D,CAAC;IAEO,KAAK,CAAC,WAAW,CAAC,KAA6C;QACnE,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;YAAE,OAAO;QAEpC,MAAM,eAAe,GAAG,CAAC,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;QAChG,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,eAAe,CAAC;YAAE,OAAO;QAE1D,OAAO,IAAI,CAAC,sBAAsB,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACjE,CAAC;CACJ,CAAA;AA3BY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAG4B,4BAAY;QACJ,kDAAsB;QACxB,8CAAoB;GAJtD,iBAAiB,CA2B7B"}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { CommonJob } from '../../common/libraries/common.job';
|
2
2
|
import { QueueService } from '../../platformUtility/services/queue.service';
|
3
|
-
import { ScheduledEventEntity } from '../entities/scheduled.event.entity';
|
4
3
|
import { ScheduledEventService } from '../services/scheduled.event.service';
|
5
|
-
export declare class
|
4
|
+
export declare class SetScheduledEventJob extends CommonJob {
|
6
5
|
protected readonly queueService: QueueService;
|
7
6
|
private readonly scheduledEventService;
|
8
7
|
constructor(queueService: QueueService, scheduledEventService: ScheduledEventService);
|
9
|
-
handle(
|
8
|
+
handle(id?: number): Promise<void>;
|
9
|
+
private handleAllActiveJobs;
|
10
10
|
}
|
@@ -9,36 +9,37 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
exports.
|
12
|
+
exports.SetScheduledEventJob = void 0;
|
13
13
|
const common_1 = require("@nestjs/common");
|
14
14
|
const common_job_1 = require("../../common/libraries/common.job");
|
15
15
|
const queue_service_1 = require("../../platformUtility/services/queue.service");
|
16
16
|
const scheduled_event_entity_1 = require("../entities/scheduled.event.entity");
|
17
17
|
const scheduled_event_service_1 = require("../services/scheduled.event.service");
|
18
|
-
let
|
18
|
+
let SetScheduledEventJob = class SetScheduledEventJob extends common_job_1.CommonJob {
|
19
19
|
constructor(queueService, scheduledEventService) {
|
20
|
-
super('
|
20
|
+
super('40d4fd2c9c09856b54d90643c5f03171');
|
21
21
|
this.queueService = queueService;
|
22
22
|
this.scheduledEventService = scheduledEventService;
|
23
23
|
}
|
24
|
-
async handle(
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
24
|
+
async handle(id) {
|
25
|
+
if (!id)
|
26
|
+
return this.handleAllActiveJobs();
|
27
|
+
const job = await scheduled_event_entity_1.ScheduledEventEntity.first(id, { relations: ['event'] });
|
28
|
+
if (!job)
|
29
|
+
return this.handleAllActiveJobs();
|
30
|
+
await this.scheduledEventService.createEventsForJob(job);
|
31
|
+
}
|
32
|
+
async handleAllActiveJobs() {
|
33
|
+
const scheduledJobs = await this.scheduledEventService.getActiveSchedules();
|
34
|
+
for (const scheduledJob of scheduledJobs) {
|
35
|
+
await this.scheduledEventService.createEventsForJob(scheduledJob);
|
36
|
+
}
|
36
37
|
}
|
37
38
|
};
|
38
|
-
exports.
|
39
|
-
exports.
|
39
|
+
exports.SetScheduledEventJob = SetScheduledEventJob;
|
40
|
+
exports.SetScheduledEventJob = SetScheduledEventJob = __decorate([
|
40
41
|
(0, common_1.Injectable)(),
|
41
42
|
__metadata("design:paramtypes", [queue_service_1.QueueService,
|
42
43
|
scheduled_event_service_1.ScheduledEventService])
|
43
|
-
],
|
44
|
-
//# sourceMappingURL=scheduled.
|
44
|
+
], SetScheduledEventJob);
|
45
|
+
//# sourceMappingURL=set.scheduled.event.job.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"set.scheduled.event.job.js","sourceRoot":"","sources":["../../../src/system/jobs/set.scheduled.event.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,kEAA8D;AAC9D,gFAA4E;AAC5E,+EAA0E;AAC1E,iFAA4E;AAGrE,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,sBAAS;IAC/C,YACuB,YAA0B,EAC5B,qBAA4C;QAE7D,KAAK,CAAC,kCAAkC,CAAC,CAAC;QAHvB,iBAAY,GAAZ,YAAY,CAAc;QAC5B,0BAAqB,GAArB,qBAAqB,CAAuB;IAGjE,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,EAAW;QACpB,IAAI,CAAC,EAAE;YAAE,OAAO,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAE3C,MAAM,GAAG,GAAG,MAAM,6CAAoB,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC3E,IAAI,CAAC,GAAG;YAAE,OAAO,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAE5C,MAAM,IAAI,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAC7D,CAAC;IAEO,KAAK,CAAC,mBAAmB;QAC7B,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,kBAAkB,EAAE,CAAC;QAE5E,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE;YACtC,MAAM,IAAI,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;SACrE;IACL,CAAC;CACJ,CAAA;AAvBY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAG4B,4BAAY;QACL,+CAAqB;GAHxD,oBAAoB,CAuBhC"}
|
@@ -15,7 +15,7 @@ const common_job_1 = require("../../common/libraries/common.job");
|
|
15
15
|
const queue_service_1 = require("../../platformUtility/services/queue.service");
|
16
16
|
const user_group_role_entity_1 = require("../entities/user.group.role.entity");
|
17
17
|
const user_role_entity_1 = require("../../security/entities/user.role.entity");
|
18
|
-
const
|
18
|
+
const SourceHash = require("../../config/source.hash");
|
19
19
|
const user_group_permission_entity_1 = require("../entities/user.group.permission.entity");
|
20
20
|
const user_permission_entity_1 = require("../../security/entities/user.permission.entity");
|
21
21
|
let UserGroupMemberJob = class UserGroupMemberJob extends common_job_1.CommonJob {
|
@@ -53,7 +53,7 @@ let UserGroupMemberJob = class UserGroupMemberJob extends common_job_1.CommonJob
|
|
53
53
|
const userRole = new user_role_entity_1.UserRoleEntity();
|
54
54
|
userRole.user_id = record.user_id;
|
55
55
|
userRole.role_id = role.role_id;
|
56
|
-
userRole.source_type =
|
56
|
+
userRole.source_type = SourceHash.userGroup;
|
57
57
|
userRole.source_id = record.user_group_id;
|
58
58
|
promises.push(userRole.save());
|
59
59
|
});
|
@@ -70,7 +70,7 @@ let UserGroupMemberJob = class UserGroupMemberJob extends common_job_1.CommonJob
|
|
70
70
|
const userPermission = new user_permission_entity_1.UserPermissionEntity();
|
71
71
|
userPermission.user_id = record.user_id;
|
72
72
|
userPermission.permission_id = permission.permission_id;
|
73
|
-
userPermission.source_type =
|
73
|
+
userPermission.source_type = SourceHash.userGroup;
|
74
74
|
userPermission.source_id = record.user_group_id;
|
75
75
|
promises.push(userPermission.save());
|
76
76
|
});
|
@@ -80,14 +80,14 @@ let UserGroupMemberJob = class UserGroupMemberJob extends common_job_1.CommonJob
|
|
80
80
|
}
|
81
81
|
async removeRolesFromMember(record) {
|
82
82
|
await user_role_entity_1.UserRoleEntity.destroy({
|
83
|
-
source_type:
|
83
|
+
source_type: SourceHash.userGroup,
|
84
84
|
source_id: record.user_group_id,
|
85
85
|
user_id: record.user_id,
|
86
86
|
});
|
87
87
|
}
|
88
88
|
async removePermissionsFromMember(record) {
|
89
89
|
await user_permission_entity_1.UserPermissionEntity.destroy({
|
90
|
-
source_type:
|
90
|
+
source_type: SourceHash.userGroup,
|
91
91
|
source_id: record.user_group_id,
|
92
92
|
user_id: record.user_id,
|
93
93
|
});
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.UserGroupPermissionJob = void 0;
|
13
13
|
const common_1 = require("@nestjs/common");
|
14
14
|
const common_job_1 = require("../../common/libraries/common.job");
|
15
|
-
const
|
15
|
+
const SourceHash = require("../../config/source.hash");
|
16
16
|
const queue_service_1 = require("../../platformUtility/services/queue.service");
|
17
17
|
const user_permission_entity_1 = require("../../security/entities/user.permission.entity");
|
18
18
|
const user_group_member_entity_1 = require("./../entities/user.group.member.entity");
|
@@ -35,7 +35,7 @@ let UserGroupPermissionJob = class UserGroupPermissionJob extends common_job_1.C
|
|
35
35
|
const userPermission = new user_permission_entity_1.UserPermissionEntity();
|
36
36
|
userPermission.user_id = member.user_id;
|
37
37
|
userPermission.permission_id = record.permission_id;
|
38
|
-
userPermission.source_type =
|
38
|
+
userPermission.source_type = SourceHash.userGroup;
|
39
39
|
userPermission.source_id = record.user_group_id;
|
40
40
|
promises.push(userPermission.save());
|
41
41
|
});
|
@@ -45,7 +45,7 @@ let UserGroupPermissionJob = class UserGroupPermissionJob extends common_job_1.C
|
|
45
45
|
}
|
46
46
|
async removeRoleFromMembers(record) {
|
47
47
|
await user_permission_entity_1.UserPermissionEntity.destroy({
|
48
|
-
source_type:
|
48
|
+
source_type: SourceHash.userGroup,
|
49
49
|
source_id: record.user_group_id,
|
50
50
|
permission_id: record.permission_id,
|
51
51
|
});
|
@@ -15,7 +15,7 @@ const common_job_1 = require("../../common/libraries/common.job");
|
|
15
15
|
const queue_service_1 = require("../../platformUtility/services/queue.service");
|
16
16
|
const user_role_entity_1 = require("../../security/entities/user.role.entity");
|
17
17
|
const user_group_member_entity_1 = require("./../entities/user.group.member.entity");
|
18
|
-
const
|
18
|
+
const SourceHash = require("../../config/source.hash");
|
19
19
|
let UserGroupRoleJob = class UserGroupRoleJob extends common_job_1.CommonJob {
|
20
20
|
constructor(queueService) {
|
21
21
|
super('12b346ca5184797168e1d1c0267b58a5');
|
@@ -35,7 +35,7 @@ let UserGroupRoleJob = class UserGroupRoleJob extends common_job_1.CommonJob {
|
|
35
35
|
const userRole = new user_role_entity_1.UserRoleEntity();
|
36
36
|
userRole.user_id = member.user_id;
|
37
37
|
userRole.role_id = record.role_id;
|
38
|
-
userRole.source_type =
|
38
|
+
userRole.source_type = SourceHash.userGroup;
|
39
39
|
userRole.source_id = record.user_group_id;
|
40
40
|
promises.push(userRole.save());
|
41
41
|
});
|
@@ -45,7 +45,7 @@ let UserGroupRoleJob = class UserGroupRoleJob extends common_job_1.CommonJob {
|
|
45
45
|
}
|
46
46
|
async removeRoleFromMembers(record) {
|
47
47
|
await user_role_entity_1.UserRoleEntity.destroy({
|
48
|
-
source_type:
|
48
|
+
source_type: SourceHash.userGroup,
|
49
49
|
source_id: record.user_group_id,
|
50
50
|
role_id: record.role_id,
|
51
51
|
});
|
@@ -4,7 +4,7 @@ exports.ModelSync = void 0;
|
|
4
4
|
const platform_constants_1 = require("../../config/platform.constants");
|
5
5
|
const column_entity_1 = require("../entities/column.entity");
|
6
6
|
const model_entity_1 = require("../entities/model.entity");
|
7
|
-
const
|
7
|
+
const SourceHash = require("../../config/source.hash");
|
8
8
|
const column_definition_entity_1 = require("../entities/column.definition.entity");
|
9
9
|
const typeorm_1 = require("typeorm");
|
10
10
|
const platform_utility_1 = require("../../common/libraries/platform.utility");
|
@@ -46,7 +46,7 @@ class ModelSync {
|
|
46
46
|
async setColumn(column) {
|
47
47
|
const record = await column_entity_1.ColumnEntity.firstOrNew({
|
48
48
|
name: column.name,
|
49
|
-
source_type:
|
49
|
+
source_type: SourceHash.model,
|
50
50
|
source_id: this.dataModel.id,
|
51
51
|
});
|
52
52
|
if (record.id)
|
@@ -8,7 +8,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
9
9
|
exports.ColumnService = void 0;
|
10
10
|
const common_1 = require("@nestjs/common");
|
11
|
-
const
|
11
|
+
const SourceHash = require("../../config/source.hash");
|
12
12
|
const column_entity_1 = require("../entities/column.entity");
|
13
13
|
let ColumnService = class ColumnService {
|
14
14
|
async getModelColumns(id) {
|
@@ -17,7 +17,7 @@ let ColumnService = class ColumnService {
|
|
17
17
|
allowed_identifiers: [],
|
18
18
|
};
|
19
19
|
const records = await column_entity_1.ColumnEntity.find({
|
20
|
-
where: { source_type:
|
20
|
+
where: { source_type: SourceHash.model, source_id: id },
|
21
21
|
});
|
22
22
|
records.forEach((record) => {
|
23
23
|
data.allowed.push(record);
|
@@ -13,7 +13,7 @@ import { RefreshPropertyCacheJob } from '../jobs/refresh.property.cache.job';
|
|
13
13
|
import { RelationshipMapperJob } from '../jobs/relationship.mapper.job';
|
14
14
|
import { ReportColumnSyncJob } from '../jobs/report.column.sync.job';
|
15
15
|
import { ScheduledEventJob } from '../jobs/scheduled.event.job';
|
16
|
-
import {
|
16
|
+
import { SetScheduledEventJob } from '../jobs/set.scheduled.event.job';
|
17
17
|
import { SmsMessageJob } from '../jobs/sms.message.job';
|
18
18
|
import { UserGroupMemberJob } from '../jobs/user.group.member.job';
|
19
19
|
import { UserGroupPermissionJob } from '../jobs/user.group.permission.job';
|
@@ -34,13 +34,13 @@ export declare class Es6JobsService {
|
|
34
34
|
private readonly relationshipMapperJob;
|
35
35
|
private readonly reportColumnSyncJob;
|
36
36
|
private readonly scheduledEventJob;
|
37
|
-
private readonly
|
37
|
+
private readonly setScheduledEventJob;
|
38
38
|
private readonly smsMessageJob;
|
39
39
|
private readonly userGroupMemberJob;
|
40
40
|
private readonly userGroupPermissionJob;
|
41
41
|
private readonly userGroupRoleJob;
|
42
42
|
private jobs;
|
43
|
-
constructor(cleanScheduledEventJob: CleanScheduledEventJob, clientCredentialJob: ClientCredentialJob, clientJob: ClientJob, columnMapperJob: ColumnMapperJob, commentJob: CommentJob, credentialIpJob: CredentialIpJob, documentJob: DocumentJob, mailValidationJob: MailValidationJob, mobileValidationJob: MobileValidationJob, modelScannerJob: ModelScannerJob, propertyJob: PropertyJob, refreshPropertyCacheJob: RefreshPropertyCacheJob, relationshipMapperJob: RelationshipMapperJob, reportColumnSyncJob: ReportColumnSyncJob, scheduledEventJob: ScheduledEventJob,
|
43
|
+
constructor(cleanScheduledEventJob: CleanScheduledEventJob, clientCredentialJob: ClientCredentialJob, clientJob: ClientJob, columnMapperJob: ColumnMapperJob, commentJob: CommentJob, credentialIpJob: CredentialIpJob, documentJob: DocumentJob, mailValidationJob: MailValidationJob, mobileValidationJob: MobileValidationJob, modelScannerJob: ModelScannerJob, propertyJob: PropertyJob, refreshPropertyCacheJob: RefreshPropertyCacheJob, relationshipMapperJob: RelationshipMapperJob, reportColumnSyncJob: ReportColumnSyncJob, scheduledEventJob: ScheduledEventJob, setScheduledEventJob: SetScheduledEventJob, smsMessageJob: SmsMessageJob, userGroupMemberJob: UserGroupMemberJob, userGroupPermissionJob: UserGroupPermissionJob, userGroupRoleJob: UserGroupRoleJob);
|
44
44
|
alignJobs(): void;
|
45
45
|
setJobs(): void;
|
46
46
|
}
|
@@ -26,14 +26,14 @@ const refresh_property_cache_job_1 = require("../jobs/refresh.property.cache.job
|
|
26
26
|
const relationship_mapper_job_1 = require("../jobs/relationship.mapper.job");
|
27
27
|
const report_column_sync_job_1 = require("../jobs/report.column.sync.job");
|
28
28
|
const scheduled_event_job_1 = require("../jobs/scheduled.event.job");
|
29
|
-
const
|
29
|
+
const set_scheduled_event_job_1 = require("../jobs/set.scheduled.event.job");
|
30
30
|
const sms_message_job_1 = require("../jobs/sms.message.job");
|
31
31
|
const user_group_member_job_1 = require("../jobs/user.group.member.job");
|
32
32
|
const user_group_permission_job_1 = require("../jobs/user.group.permission.job");
|
33
33
|
const user_group_role_job_1 = require("../jobs/user.group.role.job");
|
34
34
|
const platform_utility_1 = require("../../common/libraries/platform.utility");
|
35
35
|
let Es6JobsService = class Es6JobsService {
|
36
|
-
constructor(cleanScheduledEventJob, clientCredentialJob, clientJob, columnMapperJob, commentJob, credentialIpJob, documentJob, mailValidationJob, mobileValidationJob, modelScannerJob, propertyJob, refreshPropertyCacheJob, relationshipMapperJob, reportColumnSyncJob, scheduledEventJob,
|
36
|
+
constructor(cleanScheduledEventJob, clientCredentialJob, clientJob, columnMapperJob, commentJob, credentialIpJob, documentJob, mailValidationJob, mobileValidationJob, modelScannerJob, propertyJob, refreshPropertyCacheJob, relationshipMapperJob, reportColumnSyncJob, scheduledEventJob, setScheduledEventJob, smsMessageJob, userGroupMemberJob, userGroupPermissionJob, userGroupRoleJob) {
|
37
37
|
this.cleanScheduledEventJob = cleanScheduledEventJob;
|
38
38
|
this.clientCredentialJob = clientCredentialJob;
|
39
39
|
this.clientJob = clientJob;
|
@@ -49,7 +49,7 @@ let Es6JobsService = class Es6JobsService {
|
|
49
49
|
this.relationshipMapperJob = relationshipMapperJob;
|
50
50
|
this.reportColumnSyncJob = reportColumnSyncJob;
|
51
51
|
this.scheduledEventJob = scheduledEventJob;
|
52
|
-
this.
|
52
|
+
this.setScheduledEventJob = setScheduledEventJob;
|
53
53
|
this.smsMessageJob = smsMessageJob;
|
54
54
|
this.userGroupMemberJob = userGroupMemberJob;
|
55
55
|
this.userGroupPermissionJob = userGroupPermissionJob;
|
@@ -75,7 +75,7 @@ let Es6JobsService = class Es6JobsService {
|
|
75
75
|
'64724c02cc076f23566976dc765eb6b6': this.relationshipMapperJob,
|
76
76
|
'7676ffc477bc85ccfd8418b70f2377c9': this.reportColumnSyncJob,
|
77
77
|
bb97644f2c505dc135d01f4c6959ec1f: this.scheduledEventJob,
|
78
|
-
|
78
|
+
'40d4fd2c9c09856b54d90643c5f03171': this.setScheduledEventJob,
|
79
79
|
'568a28e3b79c7a722c9ec0d0b55515c6': this.smsMessageJob,
|
80
80
|
bf1fee009fc168b17af954099311394e: this.userGroupMemberJob,
|
81
81
|
'8a125595f1811f55136f9317a929eb60': this.userGroupPermissionJob,
|
@@ -104,7 +104,7 @@ exports.Es6JobsService = Es6JobsService = __decorate([
|
|
104
104
|
relationship_mapper_job_1.RelationshipMapperJob,
|
105
105
|
report_column_sync_job_1.ReportColumnSyncJob,
|
106
106
|
scheduled_event_job_1.ScheduledEventJob,
|
107
|
-
|
107
|
+
set_scheduled_event_job_1.SetScheduledEventJob,
|
108
108
|
sms_message_job_1.SmsMessageJob,
|
109
109
|
user_group_member_job_1.UserGroupMemberJob,
|
110
110
|
user_group_permission_job_1.UserGroupPermissionJob,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"es6.jobs.service.js","sourceRoot":"","sources":["../../../src/system/services/es6.jobs.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iFAA2E;AAC3E,yEAAoE;AACpE,mDAA+C;AAC/C,iEAA4D;AAC5D,qDAAiD;AACjD,iEAA4D;AAC5D,uDAAmD;AACnD,qEAAgE;AAChE,yEAAoE;AACpE,iEAA4D;AAC5D,uDAAmD;AACnD,mFAA6E;AAC7E,6EAAwE;AACxE,2EAAqE;AACrE,qEAAgE;AAChE,
|
1
|
+
{"version":3,"file":"es6.jobs.service.js","sourceRoot":"","sources":["../../../src/system/services/es6.jobs.service.ts"],"names":[],"mappings":"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"}
|
@@ -11,7 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
12
|
exports.FormService = void 0;
|
13
13
|
const common_1 = require("@nestjs/common");
|
14
|
-
const
|
14
|
+
const SourceHash = require("../../config/source.hash");
|
15
15
|
const column_manager_1 = require("../libraries/column.manager");
|
16
16
|
const security_rule_service_1 = require("./security.rule.service");
|
17
17
|
let FormService = class FormService {
|
@@ -21,7 +21,7 @@ let FormService = class FormService {
|
|
21
21
|
async getDictionary(form) {
|
22
22
|
const rules = await this.securityRuleService.getFormSecurityRules(form);
|
23
23
|
const columnManager = new column_manager_1.ColumnManager();
|
24
|
-
await columnManager.process(
|
24
|
+
await columnManager.process(SourceHash.form, form.id, {
|
25
25
|
rules,
|
26
26
|
});
|
27
27
|
return columnManager.allowed;
|
@@ -24,7 +24,7 @@ const menu_list_modifier_1 = require("../modifiers/menu.list.modifier");
|
|
24
24
|
const module_list_modifier_1 = require("../modifiers/module.list.modifier");
|
25
25
|
const preference_service_1 = require("./preference.service");
|
26
26
|
const ui_action_service_1 = require("./ui.action.service");
|
27
|
-
const
|
27
|
+
const SourceHash = require("../../config/source.hash");
|
28
28
|
let MenuService = class MenuService {
|
29
29
|
constructor(accessManager, preferenceService, uiActionService) {
|
30
30
|
this.accessManager = accessManager;
|
@@ -42,7 +42,7 @@ let MenuService = class MenuService {
|
|
42
42
|
if (!menu)
|
43
43
|
throw new operation_exception_1.OperationException('Menu doesnot exist');
|
44
44
|
menu.list_layouts = await this.preferenceService.getMenuListPreferences(id);
|
45
|
-
menu.ui_actions = await this.uiActionService.getUiActions(
|
45
|
+
menu.ui_actions = await this.uiActionService.getUiActions(SourceHash.menu, id);
|
46
46
|
return menu;
|
47
47
|
}
|
48
48
|
async getPageDefinitions() {
|
@@ -22,7 +22,7 @@ const ui_action_entity_1 = require("../entities/ui.action.entity");
|
|
22
22
|
const column_manager_1 = require("../libraries/column.manager");
|
23
23
|
const security_rule_service_1 = require("./security.rule.service");
|
24
24
|
const ui_action_service_1 = require("./ui.action.service");
|
25
|
-
const
|
25
|
+
const SourceHash = require("../../config/source.hash");
|
26
26
|
const ROLEMAPPING = require("../../config/role.mapping");
|
27
27
|
let ModelService = class ModelService {
|
28
28
|
constructor(uiActionService, accessManager, securityRuleService, propertyService) {
|
@@ -46,7 +46,7 @@ let ModelService = class ModelService {
|
|
46
46
|
const enableAuditLog = await this.propertyService.get('system.audit.enable', true);
|
47
47
|
if (enableAuditLog && actions.length)
|
48
48
|
actions.push(await ui_action_entity_1.UiActionEntity.first(4));
|
49
|
-
const customActions = await this.uiActionService.getUiActions(
|
49
|
+
const customActions = await this.uiActionService.getUiActions(SourceHash.model, model.id);
|
50
50
|
return class_mapper_1.ClassMapper.removeArrayWhoColumns(actions.concat(customActions));
|
51
51
|
}
|
52
52
|
async validateHashAccess(hash, operation) {
|
@@ -81,7 +81,7 @@ let ModelService = class ModelService {
|
|
81
81
|
async getDictionary(model, operation, data) {
|
82
82
|
const rules = await this.securityRuleService.getModelSecurityRules(model, operation);
|
83
83
|
const columnManager = new column_manager_1.ColumnManager();
|
84
|
-
await columnManager.process(
|
84
|
+
await columnManager.process(SourceHash.model, model.id, { rules, data });
|
85
85
|
return columnManager;
|
86
86
|
}
|
87
87
|
async validateModelAccess(model, operation) {
|
@@ -13,16 +13,16 @@ const auth_1 = require("../../common/libraries/auth");
|
|
13
13
|
const class_mapper_1 = require("../../common/libraries/class.mapper");
|
14
14
|
const list_preference_entity_1 = require("../entities/list.preference.entity");
|
15
15
|
const form_preference_entity_1 = require("../entities/form.preference.entity");
|
16
|
-
const
|
16
|
+
const SourceHash = require("../../config/source.hash");
|
17
17
|
let PreferenceService = class PreferenceService {
|
18
18
|
async getMenuListPreferences(id) {
|
19
|
-
return this.getListPreferences(
|
19
|
+
return this.getListPreferences(SourceHash.menu, id);
|
20
20
|
}
|
21
21
|
async getTabListPreferences(id) {
|
22
|
-
return this.getListPreferences(
|
22
|
+
return this.getListPreferences(SourceHash.relationship, id);
|
23
23
|
}
|
24
24
|
async getTabFormPreferences(id) {
|
25
|
-
return this.getFormPreferences(
|
25
|
+
return this.getFormPreferences(SourceHash.relationship, id);
|
26
26
|
}
|
27
27
|
async getListPreferences(source_type, source_id) {
|
28
28
|
const user = auth_1.Auth.user();
|
@@ -50,7 +50,7 @@ let PreferenceService = class PreferenceService {
|
|
50
50
|
async getModelFormPreferences(id) {
|
51
51
|
const preferences = await form_preference_entity_1.FormPreferenceEntity.find({
|
52
52
|
where: {
|
53
|
-
source_type:
|
53
|
+
source_type: SourceHash.model,
|
54
54
|
source_id: id,
|
55
55
|
},
|
56
56
|
});
|