@uniorganization/uni-lib 1.0.14 → 1.0.15

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.
@@ -1,5 +1,5 @@
1
1
  import { Timestamp } from 'typeorm';
2
- import { QuestionGroup } from '.';
2
+ import { QuestionGroup } from './question-group.entity';
3
3
  export declare class EvaluationForm {
4
4
  id: number;
5
5
  name: string;
@@ -8,4 +8,5 @@ export declare class EvaluationForm {
8
8
  scoreType: string;
9
9
  divisionLob: string;
10
10
  questionGroups: QuestionGroup[];
11
+ parseDivisionLobToJson(): void;
11
12
  }
@@ -11,8 +11,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.EvaluationForm = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
- const _1 = require(".");
14
+ const question_group_entity_1 = require("./question-group.entity");
15
15
  let EvaluationForm = class EvaluationForm {
16
+ parseDivisionLobToJson() {
17
+ this.divisionLob = JSON.parse(this.divisionLob);
18
+ }
16
19
  };
17
20
  __decorate([
18
21
  (0, typeorm_1.PrimaryGeneratedColumn)(),
@@ -39,9 +42,15 @@ __decorate([
39
42
  __metadata("design:type", String)
40
43
  ], EvaluationForm.prototype, "divisionLob", void 0);
41
44
  __decorate([
42
- (0, typeorm_1.OneToMany)(() => _1.QuestionGroup, (questionGroup) => questionGroup.evaluationForm),
45
+ (0, typeorm_1.OneToMany)(() => question_group_entity_1.QuestionGroup, (questionGroup) => questionGroup.evaluationForm),
43
46
  __metadata("design:type", Array)
44
47
  ], EvaluationForm.prototype, "questionGroups", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.AfterLoad)(),
50
+ __metadata("design:type", Function),
51
+ __metadata("design:paramtypes", []),
52
+ __metadata("design:returntype", void 0)
53
+ ], EvaluationForm.prototype, "parseDivisionLobToJson", null);
45
54
  EvaluationForm = __decorate([
46
55
  (0, typeorm_1.Entity)('evaluation_form', { schema: 'tracking' })
47
56
  ], EvaluationForm);
@@ -36,7 +36,8 @@ __decorate([
36
36
  __metadata("design:type", Boolean)
37
37
  ], QuestionGroup.prototype, "hideScore", void 0);
38
38
  __decorate([
39
- (0, typeorm_1.OneToOne)(() => evaluation_form_entity_1.EvaluationForm),
39
+ (0, typeorm_1.ManyToOne)(() => evaluation_form_entity_1.EvaluationForm),
40
+ (0, typeorm_1.JoinColumn)({ name: 'form_id' }),
40
41
  __metadata("design:type", evaluation_form_entity_1.EvaluationForm)
41
42
  ], QuestionGroup.prototype, "evaluationForm", void 0);
42
43
  __decorate([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniorganization/uni-lib",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "UNI Library",
5
5
  "author": "Jhomiguel",
6
6
  "main": "dist/index.js",