rez_core 2.2.70 → 2.2.71
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/module/workflow/controller/form-master.controller.d.ts +1 -1
- package/dist/module/workflow/controller/form-master.controller.js +1 -1
- package/dist/module/workflow/controller/form-master.controller.js.map +1 -1
- package/dist/module/workflow/entity/form-master.entity.d.ts +3 -1
- package/dist/module/workflow/entity/form-master.entity.js +9 -1
- package/dist/module/workflow/entity/form-master.entity.js.map +1 -1
- package/dist/module/workflow/repository/form-master.repository.d.ts +4 -3
- package/dist/module/workflow/repository/form-master.repository.js +9 -9
- package/dist/module/workflow/repository/form-master.repository.js.map +1 -1
- package/dist/module/workflow/service/form-master.service.d.ts +8 -2
- package/dist/module/workflow/service/form-master.service.js +9 -8
- package/dist/module/workflow/service/form-master.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/workflow/controller/form-master.controller.ts +1 -1
- package/src/module/workflow/entity/form-master.entity.ts +6 -1
- package/src/module/workflow/repository/form-master.repository.ts +16 -8
- package/src/module/workflow/service/form-master.service.ts +18 -9
|
@@ -27,7 +27,7 @@ let FormMasterController = class FormMasterController {
|
|
|
27
27
|
}
|
|
28
28
|
async submitForm(req, body) {
|
|
29
29
|
const loggedInUser = req.user.userData;
|
|
30
|
-
const result = this.formMasterService.submitForm(body);
|
|
30
|
+
const result = this.formMasterService.submitForm(body, loggedInUser);
|
|
31
31
|
return result;
|
|
32
32
|
}
|
|
33
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-master.controller.js","sourceRoot":"","sources":["../../../../src/module/workflow/controller/form-master.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CASwB;AACxB,2DAAgE;AAChE,wEAAmE;AAI5D,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAEmB,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAIE,AAAN,KAAK,CAAC,QAAQ,CACL,GAA4B,EACP,kBAA0B;QAEtD,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACvC,MAAM,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAC5C,YAAY,EACZ,kBAAkB,CACnB,CAAC;QACF,OAAO,MAAM,CAAC;IAChB,CAAC;IAIK,AAAN,KAAK,CAAC,UAAU,CAAQ,GAA4B,EAAU,IAAS;QACrE,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACvC,MAAM,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"form-master.controller.js","sourceRoot":"","sources":["../../../../src/module/workflow/controller/form-master.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CASwB;AACxB,2DAAgE;AAChE,wEAAmE;AAI5D,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAEmB,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAIE,AAAN,KAAK,CAAC,QAAQ,CACL,GAA4B,EACP,kBAA0B;QAEtD,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACvC,MAAM,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAC5C,YAAY,EACZ,kBAAkB,CACnB,CAAC;QACF,OAAO,MAAM,CAAC;IAChB,CAAC;IAIK,AAAN,KAAK,CAAC,UAAU,CAAQ,GAA4B,EAAU,IAAS;QACrE,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACvC,MAAM,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;QACrE,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;AA3BY,oDAAoB;AAQzB;IAFL,IAAA,aAAI,EAAC,WAAW,CAAC;IACjB,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IAErB,WAAA,IAAA,YAAG,GAAE,CAAA;IACL,WAAA,IAAA,aAAI,EAAC,oBAAoB,CAAC,CAAA;;;;oDAQ5B;AAIK;IAFL,IAAA,aAAI,EAAC,SAAS,CAAC;IACf,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IACN,WAAA,IAAA,YAAG,GAAE,CAAA;IAAgC,WAAA,IAAA,aAAI,GAAE,CAAA;;;;sDAI5D;+BA1BU,oBAAoB;IAFhC,IAAA,mBAAU,EAAC,OAAO,CAAC;IACnB,IAAA,kBAAS,EAAC,wBAAY,CAAC;IAGnB,WAAA,IAAA,eAAM,EAAC,mBAAmB,CAAC,CAAA;qCACQ,uCAAiB;GAH5C,oBAAoB,CA2BhC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
2
2
|
export declare class FormMasterDataEntity extends BaseEntity {
|
|
3
3
|
constructor();
|
|
4
|
+
mapped_entity_id: number;
|
|
4
5
|
mapped_entity_type: string;
|
|
5
6
|
source_entity_type: string;
|
|
6
|
-
view_id:
|
|
7
|
+
view_id: number;
|
|
7
8
|
form_name: string;
|
|
9
|
+
form_url: string;
|
|
8
10
|
}
|
|
@@ -19,6 +19,10 @@ let FormMasterDataEntity = class FormMasterDataEntity extends base_entity_entity
|
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
exports.FormMasterDataEntity = FormMasterDataEntity;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
24
|
+
__metadata("design:type", Number)
|
|
25
|
+
], FormMasterDataEntity.prototype, "mapped_entity_id", void 0);
|
|
22
26
|
__decorate([
|
|
23
27
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
24
28
|
__metadata("design:type", String)
|
|
@@ -29,12 +33,16 @@ __decorate([
|
|
|
29
33
|
], FormMasterDataEntity.prototype, "source_entity_type", void 0);
|
|
30
34
|
__decorate([
|
|
31
35
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
32
|
-
__metadata("design:type",
|
|
36
|
+
__metadata("design:type", Number)
|
|
33
37
|
], FormMasterDataEntity.prototype, "view_id", void 0);
|
|
34
38
|
__decorate([
|
|
35
39
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
36
40
|
__metadata("design:type", String)
|
|
37
41
|
], FormMasterDataEntity.prototype, "form_name", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], FormMasterDataEntity.prototype, "form_url", void 0);
|
|
38
46
|
exports.FormMasterDataEntity = FormMasterDataEntity = __decorate([
|
|
39
47
|
(0, typeorm_1.Entity)({ name: 'cr_form_master' }),
|
|
40
48
|
__metadata("design:paramtypes", [])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-master.entity.js","sourceRoot":"","sources":["../../../../src/module/workflow/entity/form-master.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6EAAuE;AACvE,qCAAyC;AAGlC,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,+BAAU;IAClD;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;IAC5B,CAAC;
|
|
1
|
+
{"version":3,"file":"form-master.entity.js","sourceRoot":"","sources":["../../../../src/module/workflow/entity/form-master.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6EAAuE;AACvE,qCAAyC;AAGlC,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,+BAAU;IAClD;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;IAC5B,CAAC;CAkBF,CAAA;AAtBY,oDAAoB;AAM/B;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8DACF;AAGzB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gEACA;AAG3B;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gEACA;AAG3B;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACX;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACT;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDAC3B;+BArBN,oBAAoB;IADhC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;;GACtB,oBAAoB,CAsBhC"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { DataSource, Repository } from 'typeorm';
|
|
2
2
|
import { FormMasterDataEntity } from '../entity/form-master.entity';
|
|
3
3
|
import { FormDataEntity } from '../entity/form.entity';
|
|
4
|
+
import { UserData } from 'src/module/user/entity/user.entity';
|
|
4
5
|
export declare class FormMasterRepository {
|
|
5
|
-
private readonly
|
|
6
|
+
private readonly formMasterEntity;
|
|
6
7
|
private readonly dataSource;
|
|
7
8
|
private readonly formRepo;
|
|
8
|
-
constructor(
|
|
9
|
+
constructor(formMasterEntity: Repository<FormMasterDataEntity>, dataSource: DataSource, formRepo: Repository<FormDataEntity>);
|
|
9
10
|
getForms(organization_id: number, source_entity_type: string): Promise<{
|
|
10
11
|
label: any;
|
|
11
12
|
value: any;
|
|
12
13
|
}[]>;
|
|
13
|
-
submitForm(
|
|
14
|
+
submitForm(redirect_data: any, loggedInUser: UserData): Promise<import("typeorm").UpdateResult>;
|
|
14
15
|
}
|
|
@@ -19,8 +19,8 @@ const typeorm_2 = require("typeorm");
|
|
|
19
19
|
const form_master_entity_1 = require("../entity/form-master.entity");
|
|
20
20
|
const form_entity_1 = require("../entity/form.entity");
|
|
21
21
|
let FormMasterRepository = class FormMasterRepository {
|
|
22
|
-
constructor(
|
|
23
|
-
this.
|
|
22
|
+
constructor(formMasterEntity, dataSource, formRepo) {
|
|
23
|
+
this.formMasterEntity = formMasterEntity;
|
|
24
24
|
this.dataSource = dataSource;
|
|
25
25
|
this.formRepo = formRepo;
|
|
26
26
|
}
|
|
@@ -39,17 +39,17 @@ let FormMasterRepository = class FormMasterRepository {
|
|
|
39
39
|
}));
|
|
40
40
|
return formatted;
|
|
41
41
|
}
|
|
42
|
-
async submitForm(
|
|
43
|
-
const currentForm = await this.
|
|
44
|
-
mapped_entity_id:
|
|
45
|
-
mapped_entity_type:
|
|
46
|
-
view_id:
|
|
42
|
+
async submitForm(redirect_data, loggedInUser) {
|
|
43
|
+
const currentForm = await this.formMasterEntity.findOneBy({
|
|
44
|
+
mapped_entity_id: redirect_data.entity_id,
|
|
45
|
+
mapped_entity_type: redirect_data.entity_type,
|
|
46
|
+
view_id: redirect_data.view_id,
|
|
47
47
|
});
|
|
48
48
|
if (!currentForm) {
|
|
49
49
|
throw new common_1.NotFoundException('Form not found');
|
|
50
50
|
}
|
|
51
|
-
currentForm.status = '
|
|
52
|
-
return this.
|
|
51
|
+
currentForm.status = 'submitted';
|
|
52
|
+
return this.formMasterEntity.update(currentForm.id, currentForm);
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
exports.FormMasterRepository = FormMasterRepository;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-master.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/form-master.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAKwB;AACxB,6CAAmD;AACnD,qCAAiD;AACjD,qEAAoE;AACpE,uDAAuD;
|
|
1
|
+
{"version":3,"file":"form-master.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/form-master.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAKwB;AACxB,6CAAmD;AACnD,qCAAiD;AACjD,qEAAoE;AACpE,uDAAuD;AAIhD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAEmB,gBAAkD,EAClD,UAAsB,EAEtB,QAAoC;QAHpC,qBAAgB,GAAhB,gBAAgB,CAAkC;QAClD,eAAU,GAAV,UAAU,CAAY;QAEtB,aAAQ,GAAR,QAAQ,CAA4B;IACpD,CAAC;IAEJ,KAAK,CAAC,QAAQ,CAAC,eAAuB,EAAE,kBAA0B;QAChE,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,UAAU;aAChC,kBAAkB,EAAE;aACpB,MAAM,CAAC,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;aACjC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC;aAE5B,KAAK,CAAC,2CAA2C,EAAE;YAClD,gBAAgB,EAAE,kBAAkB;SACrC,CAAC;aACD,UAAU,EAAE,CAAC;QAEhB,MAAM,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,CAAC;YAC1C,KAAK,EAAE,IAAI,CAAC,YAAY;YACxB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC,CAAC;QAEJ,OAAO,SAAS,CAAC;IACnB,CAAC;IASD,KAAK,CAAC,UAAU,CAAC,aAAkB,EAAE,YAAsB;QACzD,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC;YACxD,gBAAgB,EAAE,aAAa,CAAC,SAAS;YACzC,kBAAkB,EAAE,aAAa,CAAC,WAAW;YAC7C,OAAO,EAAE,aAAa,CAAC,OAAO;SAC/B,CAAC,CAAC;QAEH,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,IAAI,0BAAiB,CAAC,gBAAgB,CAAC,CAAC;QAChD,CAAC;QAED,WAAW,CAAC,MAAM,GAAG,WAAW,CAAC;QAEjC,OAAO,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC;IACnE,CAAC;CACF,CAAA;AAlDY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,yCAAoB,CAAC,CAAA;IAGtC,WAAA,IAAA,0BAAgB,EAAC,4BAAc,CAAC,CAAA;qCAFE,oBAAU;QAChB,oBAAU;QAEZ,oBAAU;GAN5B,oBAAoB,CAkDhC"}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { FormMasterRepository } from '../repository/form-master.repository';
|
|
2
2
|
import { UserData } from 'src/module/user/entity/user.entity';
|
|
3
|
-
|
|
3
|
+
import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
|
|
4
|
+
export declare class FormMasterService extends EntityServiceImpl {
|
|
4
5
|
private readonly formMasterRepository;
|
|
5
6
|
constructor(formMasterRepository: FormMasterRepository);
|
|
6
7
|
getForms(loggedInUser: UserData, source_entity_type: string): Promise<{
|
|
7
8
|
label: any;
|
|
8
9
|
value: any;
|
|
9
10
|
}[]>;
|
|
10
|
-
|
|
11
|
+
saveForm(data: {
|
|
12
|
+
entity_id: number;
|
|
13
|
+
entity_type: string;
|
|
14
|
+
view_id: number;
|
|
15
|
+
}, loggedInUser: UserData): Promise<void>;
|
|
16
|
+
submitForm(data: any, loggedInUser: UserData): Promise<import("typeorm").UpdateResult>;
|
|
11
17
|
}
|
|
@@ -12,21 +12,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.FormMasterService = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
const form_master_repository_1 = require("../repository/form-master.repository");
|
|
15
|
-
|
|
15
|
+
const entity_service_impl_service_1 = require("../../meta/service/entity-service-impl.service");
|
|
16
|
+
let FormMasterService = class FormMasterService extends entity_service_impl_service_1.EntityServiceImpl {
|
|
16
17
|
constructor(formMasterRepository) {
|
|
18
|
+
super();
|
|
17
19
|
this.formMasterRepository = formMasterRepository;
|
|
18
20
|
}
|
|
19
21
|
async getForms(loggedInUser, source_entity_type) {
|
|
20
22
|
const { organization_id } = loggedInUser;
|
|
21
23
|
return this.formMasterRepository.getForms(organization_id, source_entity_type);
|
|
22
24
|
}
|
|
23
|
-
async
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
});
|
|
25
|
+
async saveForm(data, loggedInUser) {
|
|
26
|
+
}
|
|
27
|
+
async submitForm(data, loggedInUser) {
|
|
28
|
+
const { form_data, redirect_data } = data;
|
|
29
|
+
super.updateEntity(form_data, loggedInUser);
|
|
30
|
+
return this.formMasterRepository.submitForm(redirect_data, loggedInUser);
|
|
30
31
|
}
|
|
31
32
|
};
|
|
32
33
|
exports.FormMasterService = FormMasterService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-master.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/form-master.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAoD;AACpD,iFAA4E;
|
|
1
|
+
{"version":3,"file":"form-master.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/form-master.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAoD;AACpD,iFAA4E;AAE5E,gGAAwF;AAGjF,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,+CAAiB;IACtD,YAA6B,oBAA0C;QACrE,KAAK,EAAE,CAAC;QADmB,yBAAoB,GAApB,oBAAoB,CAAsB;IAEvE,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,YAAsB,EAAE,kBAA0B;QAC/D,MAAM,EAAE,eAAe,EAAE,GAAG,YAAY,CAAC;QACzC,OAAO,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CACvC,eAAe,EACf,kBAAkB,CACnB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,QAAQ,CACZ,IAAiE,EACjE,YAAsB;IAGxB,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,IAAS,EAAE,YAAsB;QAChD,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC;QAG1C,KAAK,CAAC,YAAY,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;QAE5C,OAAO,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;IAC3E,CAAC;CACF,CAAA;AA5BY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAEwC,6CAAoB;GAD5D,iBAAiB,CA4B7B"}
|