@uniorganization/uni-lib 2.0.31 → 2.0.33

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.
@@ -4,6 +4,7 @@ import { EvaluationData } from './evaluation-data.entity';
4
4
  import { CallDriverData } from './call-driver-data.entity';
5
5
  import { EvaluationQuestions } from './evaluation-questions.entity';
6
6
  import { DisputeRequest } from './dispute-request.entity';
7
+ import { Feedback } from './feedback.entity';
7
8
  export declare class Evaluations {
8
9
  id: number;
9
10
  lob: string;
@@ -26,6 +27,7 @@ export declare class Evaluations {
26
27
  dateWaived: Date;
27
28
  waiverReason: string;
28
29
  outcomeReason: string;
30
+ feedbackId: number;
29
31
  agent: Users;
30
32
  evaluator: Users;
31
33
  disputedBy: Users;
@@ -34,4 +36,5 @@ export declare class Evaluations {
34
36
  evaluationData: EvaluationData[];
35
37
  evaluationQuestions: EvaluationQuestions[];
36
38
  disputeRequest: DisputeRequest;
39
+ feedback: Feedback;
37
40
  }
@@ -16,6 +16,7 @@ const evaluation_data_entity_1 = require("./evaluation-data.entity");
16
16
  const call_driver_data_entity_1 = require("./call-driver-data.entity");
17
17
  const evaluation_questions_entity_1 = require("./evaluation-questions.entity");
18
18
  const dispute_request_entity_1 = require("./dispute-request.entity");
19
+ const feedback_entity_1 = require("./feedback.entity");
19
20
  let Evaluations = class Evaluations {
20
21
  };
21
22
  exports.Evaluations = Evaluations;
@@ -103,6 +104,10 @@ __decorate([
103
104
  (0, typeorm_1.Column)({ name: 'outcome_reason' }),
104
105
  __metadata("design:type", String)
105
106
  ], Evaluations.prototype, "outcomeReason", void 0);
107
+ __decorate([
108
+ (0, typeorm_1.Column)({ name: 'feedback_id' }),
109
+ __metadata("design:type", Number)
110
+ ], Evaluations.prototype, "feedbackId", void 0);
106
111
  __decorate([
107
112
  (0, typeorm_1.ManyToOne)(() => usr_entity_1.Users),
108
113
  (0, typeorm_1.JoinColumn)({ name: 'agent_id' }),
@@ -146,6 +151,13 @@ __decorate([
146
151
  }),
147
152
  __metadata("design:type", dispute_request_entity_1.DisputeRequest)
148
153
  ], Evaluations.prototype, "disputeRequest", void 0);
154
+ __decorate([
155
+ (0, typeorm_1.OneToOne)(() => feedback_entity_1.Feedback, (f) => f.evaluation, {
156
+ cascade: true,
157
+ onDelete: 'CASCADE',
158
+ }),
159
+ __metadata("design:type", feedback_entity_1.Feedback)
160
+ ], Evaluations.prototype, "feedback", void 0);
149
161
  exports.Evaluations = Evaluations = __decorate([
150
162
  (0, typeorm_1.Entity)('evaluations', { schema: 'tracking' })
151
163
  ], Evaluations);
@@ -1,16 +1,18 @@
1
1
  import { Users } from './usr.entity';
2
- import { FeedbackComment } from './feedback-comment.entity';
3
- import { FeedbackActivityLog } from './feedback-activity-log.entity';
4
- import { FeedbackStatus } from '../enums/feedback-status.enum';
2
+ import { Evaluations } from './evaluations.entity';
3
+ import { FeedbackRole } from '../enums/feedback-role.enum';
5
4
  export declare class Feedback {
6
5
  id: number;
7
- status: FeedbackStatus;
8
6
  agentId: number;
9
7
  coachId: number;
8
+ feedbackContent: string;
9
+ commitment: string;
10
+ role: FeedbackRole;
11
+ isAcknowledged: boolean;
12
+ commitmentDate: Date;
10
13
  createdAt: Date;
11
14
  updatedAt: Date;
12
15
  agent: Users;
13
16
  coach: Users;
14
- comments: FeedbackComment[];
15
- activityLogs: FeedbackActivityLog[];
17
+ evaluation: Evaluations;
16
18
  }
@@ -12,9 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Feedback = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const usr_entity_1 = require("./usr.entity");
15
- const feedback_comment_entity_1 = require("./feedback-comment.entity");
16
- const feedback_activity_log_entity_1 = require("./feedback-activity-log.entity");
17
- const feedback_status_enum_1 = require("../enums/feedback-status.enum");
15
+ const evaluations_entity_1 = require("./evaluations.entity");
16
+ const feedback_role_enum_1 = require("../enums/feedback-role.enum");
18
17
  let Feedback = class Feedback {
19
18
  };
20
19
  exports.Feedback = Feedback;
@@ -23,28 +22,41 @@ __decorate([
23
22
  __metadata("design:type", Number)
24
23
  ], Feedback.prototype, "id", void 0);
25
24
  __decorate([
26
- (0, typeorm_1.Column)({
27
- type: 'enum',
28
- enum: feedback_status_enum_1.FeedbackStatus,
29
- default: feedback_status_enum_1.FeedbackStatus.NEW,
30
- name: 'feedback_status',
31
- }),
32
- __metadata("design:type", String)
33
- ], Feedback.prototype, "status", void 0);
34
- __decorate([
35
- (0, typeorm_1.Column)({ name: 'agent_id' }),
25
+ (0, typeorm_1.Column)({ name: 'agent_id', nullable: false }),
36
26
  __metadata("design:type", Number)
37
27
  ], Feedback.prototype, "agentId", void 0);
38
28
  __decorate([
39
- (0, typeorm_1.Column)({ name: 'coach_id', nullable: true }),
29
+ (0, typeorm_1.Column)({ name: 'coach_id', nullable: false }),
40
30
  __metadata("design:type", Number)
41
31
  ], Feedback.prototype, "coachId", void 0);
42
32
  __decorate([
43
- (0, typeorm_1.CreateDateColumn)({ name: 'created_at' }),
33
+ (0, typeorm_1.Column)({ name: 'feedback_content', type: 'text', nullable: true }),
34
+ __metadata("design:type", String)
35
+ ], Feedback.prototype, "feedbackContent", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)({ name: 'commitment', type: 'text', nullable: false }),
38
+ __metadata("design:type", String)
39
+ ], Feedback.prototype, "commitment", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({
42
+ name: 'role', enum: feedback_role_enum_1.FeedbackRole, nullable: false
43
+ }),
44
+ __metadata("design:type", String)
45
+ ], Feedback.prototype, "role", void 0);
46
+ __decorate([
47
+ (0, typeorm_1.Column)({ name: 'is_acknowledged', default: false }),
48
+ __metadata("design:type", Boolean)
49
+ ], Feedback.prototype, "isAcknowledged", void 0);
50
+ __decorate([
51
+ (0, typeorm_1.Column)({ name: 'commitment_date', type: 'timestamp', nullable: false }),
52
+ __metadata("design:type", Date)
53
+ ], Feedback.prototype, "commitmentDate", void 0);
54
+ __decorate([
55
+ (0, typeorm_1.CreateDateColumn)({ name: 'created_at', type: 'timestamp', nullable: false }),
44
56
  __metadata("design:type", Date)
45
57
  ], Feedback.prototype, "createdAt", void 0);
46
58
  __decorate([
47
- (0, typeorm_1.UpdateDateColumn)({ name: 'updated_at' }),
59
+ (0, typeorm_1.UpdateDateColumn)({ name: 'updated_at', type: 'timestamp', nullable: false }),
48
60
  __metadata("design:type", Date)
49
61
  ], Feedback.prototype, "updatedAt", void 0);
50
62
  __decorate([
@@ -58,13 +70,9 @@ __decorate([
58
70
  __metadata("design:type", usr_entity_1.Users)
59
71
  ], Feedback.prototype, "coach", void 0);
60
72
  __decorate([
61
- (0, typeorm_1.OneToMany)(() => feedback_comment_entity_1.FeedbackComment, (comment) => comment.feedback),
62
- __metadata("design:type", Array)
63
- ], Feedback.prototype, "comments", void 0);
64
- __decorate([
65
- (0, typeorm_1.OneToMany)(() => feedback_activity_log_entity_1.FeedbackActivityLog, (log) => log.feedback),
66
- __metadata("design:type", Array)
67
- ], Feedback.prototype, "activityLogs", void 0);
73
+ (0, typeorm_1.OneToOne)(() => evaluations_entity_1.Evaluations, (evaluation) => evaluation.feedback),
74
+ __metadata("design:type", evaluations_entity_1.Evaluations)
75
+ ], Feedback.prototype, "evaluation", void 0);
68
76
  exports.Feedback = Feedback = __decorate([
69
77
  (0, typeorm_1.Entity)('feedback', { schema: 'tracking' })
70
78
  ], Feedback);
@@ -78,5 +78,3 @@ export * from './p1-service-network.entity';
78
78
  export * from './raw_roster.entity';
79
79
  export * from './bp-alerts.entity';
80
80
  export * from './feedback.entity';
81
- export * from './feedback-comment.entity';
82
- export * from './feedback-activity-log.entity';
@@ -94,5 +94,3 @@ __exportStar(require("./p1-service-network.entity"), exports);
94
94
  __exportStar(require("./raw_roster.entity"), exports);
95
95
  __exportStar(require("./bp-alerts.entity"), exports);
96
96
  __exportStar(require("./feedback.entity"), exports);
97
- __exportStar(require("./feedback-comment.entity"), exports);
98
- __exportStar(require("./feedback-activity-log.entity"), exports);
@@ -0,0 +1,4 @@
1
+ export declare enum FeedbackRole {
2
+ QA = "QA",
3
+ SUPERVISOR = "SUPERVISOR"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FeedbackRole = void 0;
4
+ var FeedbackRole;
5
+ (function (FeedbackRole) {
6
+ FeedbackRole["QA"] = "QA";
7
+ FeedbackRole["SUPERVISOR"] = "SUPERVISOR";
8
+ })(FeedbackRole || (exports.FeedbackRole = FeedbackRole = {}));
@@ -1,2 +1 @@
1
- export * from './feedback-status.enum';
2
- export * from './activity-action.enum';
1
+ export * from './feedback-role.enum';
@@ -14,5 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./feedback-status.enum"), exports);
18
- __exportStar(require("./activity-action.enum"), exports);
17
+ __exportStar(require("./feedback-role.enum"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniorganization/uni-lib",
3
- "version": "2.0.31",
3
+ "version": "2.0.33",
4
4
  "description": "UNI Library",
5
5
  "author": "Jhomiguel",
6
6
  "main": "dist/index.js",