@hed-hog/operations 0.0.306 → 0.0.310

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.
Files changed (123) hide show
  1. package/dist/controllers/operations-approvals.controller.d.ts +114 -1
  2. package/dist/controllers/operations-approvals.controller.d.ts.map +1 -1
  3. package/dist/controllers/operations-approvals.controller.js +16 -3
  4. package/dist/controllers/operations-approvals.controller.js.map +1 -1
  5. package/dist/controllers/operations-collaborators.controller.d.ts +16 -1
  6. package/dist/controllers/operations-collaborators.controller.d.ts.map +1 -1
  7. package/dist/controllers/operations-collaborators.controller.js +16 -3
  8. package/dist/controllers/operations-collaborators.controller.js.map +1 -1
  9. package/dist/controllers/operations-contracts.controller.d.ts +14 -453
  10. package/dist/controllers/operations-contracts.controller.d.ts.map +1 -1
  11. package/dist/controllers/operations-contracts.controller.js +11 -112
  12. package/dist/controllers/operations-contracts.controller.js.map +1 -1
  13. package/dist/controllers/operations-org-structure.controller.d.ts +65 -2
  14. package/dist/controllers/operations-org-structure.controller.d.ts.map +1 -1
  15. package/dist/controllers/operations-org-structure.controller.js +18 -5
  16. package/dist/controllers/operations-org-structure.controller.js.map +1 -1
  17. package/dist/controllers/operations-projects.controller.d.ts +28 -4
  18. package/dist/controllers/operations-projects.controller.d.ts.map +1 -1
  19. package/dist/controllers/operations-projects.controller.js +17 -5
  20. package/dist/controllers/operations-projects.controller.js.map +1 -1
  21. package/dist/controllers/operations-timesheets.controller.d.ts +31 -4
  22. package/dist/controllers/operations-timesheets.controller.d.ts.map +1 -1
  23. package/dist/controllers/operations-timesheets.controller.js +16 -11
  24. package/dist/controllers/operations-timesheets.controller.js.map +1 -1
  25. package/dist/dto/list-approvals.dto.d.ts +6 -0
  26. package/dist/dto/list-approvals.dto.d.ts.map +1 -0
  27. package/dist/dto/list-approvals.dto.js +28 -0
  28. package/dist/dto/list-approvals.dto.js.map +1 -0
  29. package/dist/dto/list-collaborator-types.dto.d.ts +3 -1
  30. package/dist/dto/list-collaborator-types.dto.d.ts.map +1 -1
  31. package/dist/dto/list-collaborator-types.dto.js +7 -1
  32. package/dist/dto/list-collaborator-types.dto.js.map +1 -1
  33. package/dist/dto/list-collaborators.dto.d.ts +1 -0
  34. package/dist/dto/list-collaborators.dto.d.ts.map +1 -1
  35. package/dist/dto/list-collaborators.dto.js +5 -0
  36. package/dist/dto/list-collaborators.dto.js.map +1 -1
  37. package/dist/dto/list-contracts.dto.d.ts +8 -0
  38. package/dist/dto/list-contracts.dto.d.ts.map +1 -0
  39. package/dist/dto/list-contracts.dto.js +38 -0
  40. package/dist/dto/list-contracts.dto.js.map +1 -0
  41. package/dist/dto/list-departments.dto.d.ts +5 -0
  42. package/dist/dto/list-departments.dto.d.ts.map +1 -0
  43. package/dist/dto/list-departments.dto.js +23 -0
  44. package/dist/dto/list-departments.dto.js.map +1 -0
  45. package/dist/dto/list-projects.dto.d.ts +5 -0
  46. package/dist/dto/list-projects.dto.d.ts.map +1 -0
  47. package/dist/dto/list-projects.dto.js +23 -0
  48. package/dist/dto/list-projects.dto.js.map +1 -0
  49. package/dist/dto/list-schedule-adjustments.dto.d.ts +5 -0
  50. package/dist/dto/list-schedule-adjustments.dto.d.ts.map +1 -0
  51. package/dist/dto/list-schedule-adjustments.dto.js +23 -0
  52. package/dist/dto/list-schedule-adjustments.dto.js.map +1 -0
  53. package/dist/dto/list-time-off-requests.dto.d.ts +5 -0
  54. package/dist/dto/list-time-off-requests.dto.d.ts.map +1 -0
  55. package/dist/dto/list-time-off-requests.dto.js +23 -0
  56. package/dist/dto/list-time-off-requests.dto.js.map +1 -0
  57. package/dist/dto/list-timesheets.dto.d.ts +5 -0
  58. package/dist/dto/list-timesheets.dto.d.ts.map +1 -0
  59. package/dist/dto/list-timesheets.dto.js +23 -0
  60. package/dist/dto/list-timesheets.dto.js.map +1 -0
  61. package/dist/dto/reorder-collaborator-types.dto.d.ts +4 -0
  62. package/dist/dto/reorder-collaborator-types.dto.d.ts.map +1 -0
  63. package/dist/dto/reorder-collaborator-types.dto.js +25 -0
  64. package/dist/dto/reorder-collaborator-types.dto.js.map +1 -0
  65. package/dist/operations.service.d.ts +340 -271
  66. package/dist/operations.service.d.ts.map +1 -1
  67. package/dist/operations.service.js +1007 -1043
  68. package/dist/operations.service.js.map +1 -1
  69. package/dist/operations.service.spec.js +0 -22
  70. package/dist/operations.service.spec.js.map +1 -1
  71. package/hedhog/data/menu.yaml +0 -36
  72. package/hedhog/data/route.yaml +42 -73
  73. package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +8 -1
  74. package/hedhog/frontend/app/_components/collaborator-select-with-create.tsx.ejs +15 -10
  75. package/hedhog/frontend/app/_components/contract-details-screen.tsx.ejs +108 -213
  76. package/hedhog/frontend/app/_components/contract-form-screen.tsx.ejs +251 -2039
  77. package/hedhog/frontend/app/_components/project-details-screen.tsx.ejs +167 -60
  78. package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +70 -301
  79. package/hedhog/frontend/app/_components/system-user-select-with-create.tsx.ejs +102 -51
  80. package/hedhog/frontend/app/_lib/types.ts.ejs +19 -24
  81. package/hedhog/frontend/app/_lib/utils/format.ts.ejs +14 -9
  82. package/hedhog/frontend/app/approvals/page.tsx.ejs +842 -150
  83. package/hedhog/frontend/app/collaborator-types/page.tsx.ejs +445 -153
  84. package/hedhog/frontend/app/collaborators/page.tsx.ejs +118 -49
  85. package/hedhog/frontend/app/contracts/[id]/page.tsx.ejs +2 -2
  86. package/hedhog/frontend/app/contracts/page.tsx.ejs +215 -617
  87. package/hedhog/frontend/app/departments/page.tsx.ejs +257 -113
  88. package/hedhog/frontend/app/projects/page.tsx.ejs +90 -51
  89. package/hedhog/frontend/app/schedule-adjustments/page.tsx.ejs +412 -147
  90. package/hedhog/frontend/app/time-off/page.tsx.ejs +400 -123
  91. package/hedhog/frontend/app/timesheets/page.tsx.ejs +460 -365
  92. package/hedhog/frontend/messages/en.json +143 -14
  93. package/hedhog/frontend/messages/pt.json +192 -54
  94. package/hedhog/table/operations_contract.yaml +0 -9
  95. package/package.json +4 -4
  96. package/src/controllers/operations-approvals.controller.ts +9 -3
  97. package/src/controllers/operations-collaborators.controller.ts +15 -2
  98. package/src/controllers/operations-contracts.controller.ts +8 -92
  99. package/src/controllers/operations-org-structure.controller.ts +17 -4
  100. package/src/controllers/operations-projects.controller.ts +10 -4
  101. package/src/controllers/operations-timesheets.controller.ts +17 -8
  102. package/src/dto/list-approvals.dto.ts +12 -0
  103. package/src/dto/list-collaborator-types.dto.ts +7 -2
  104. package/src/dto/list-collaborators.dto.ts +4 -0
  105. package/src/dto/list-contracts.dto.ts +20 -0
  106. package/src/dto/list-departments.dto.ts +8 -0
  107. package/src/dto/list-projects.dto.ts +8 -0
  108. package/src/dto/list-schedule-adjustments.dto.ts +8 -0
  109. package/src/dto/list-time-off-requests.dto.ts +8 -0
  110. package/src/dto/list-timesheets.dto.ts +8 -0
  111. package/src/dto/reorder-collaborator-types.dto.ts +10 -0
  112. package/src/operations.service.spec.ts +0 -30
  113. package/src/operations.service.ts +1557 -1806
  114. package/hedhog/frontend/app/_components/contract-creation-wizard.tsx.ejs +0 -631
  115. package/hedhog/frontend/app/_components/contract-template-form-screen.tsx.ejs +0 -526
  116. package/hedhog/frontend/app/_components/contract-template-select-with-create.tsx.ejs +0 -247
  117. package/hedhog/frontend/app/_components/contract-wizard-sheet.tsx.ejs +0 -3520
  118. package/hedhog/frontend/app/contracts/templates/page.tsx.ejs +0 -380
  119. package/hedhog/frontend/app/team/page.tsx.ejs +0 -352
  120. package/hedhog/table/operations_contract_financial_term.yaml +0 -40
  121. package/hedhog/table/operations_contract_revision.yaml +0 -38
  122. package/hedhog/table/operations_contract_signature.yaml +0 -38
  123. package/hedhog/table/operations_contract_template.yaml +0 -58
@@ -1,8 +1,121 @@
1
+ import { ListApprovalsDto } from '../dto/list-approvals.dto';
1
2
  import { OperationsService } from '../operations.service';
2
3
  export declare class OperationsApprovalsController {
3
4
  private readonly operationsService;
4
5
  constructor(operationsService: OperationsService);
5
- listApprovals(user: any): Promise<Record<string, unknown>[]>;
6
+ listApprovals(user: any, filters: ListApprovalsDto): Promise<Record<string, unknown>[] | {
7
+ total: number;
8
+ lastPage: number;
9
+ page: number;
10
+ pageSize: number;
11
+ prev: number;
12
+ next: number;
13
+ data: Record<string, unknown>[];
14
+ }>;
15
+ getApprovalDetail(user: any, id: number): Promise<{
16
+ id: number;
17
+ targetType: string;
18
+ targetId: number;
19
+ requesterCollaboratorId: number;
20
+ requesterName: string;
21
+ approverCollaboratorId: number | null;
22
+ approverName: string | null;
23
+ status: string;
24
+ submittedAt: string | null;
25
+ decidedAt: string | null;
26
+ decisionNote: string | null;
27
+ timesheetWeekStartDate: string | null;
28
+ timesheetWeekEndDate: string | null;
29
+ timesheetTotalHours: number | null;
30
+ timesheetProjectNames: string | null;
31
+ timeOffType: string | null;
32
+ timeOffStartDate: string | null;
33
+ timeOffEndDate: string | null;
34
+ timeOffReason: string | null;
35
+ scheduleRequestScope: string | null;
36
+ scheduleStartDate: string | null;
37
+ scheduleEndDate: string | null;
38
+ scheduleReason: string | null;
39
+ } | {
40
+ entries: {
41
+ id: number;
42
+ timesheetId: number;
43
+ projectAssignmentId: number | null;
44
+ projectId: number | null;
45
+ projectName: string | null;
46
+ roleLabel: string | null;
47
+ taskId: number | null;
48
+ taskName: string | null;
49
+ activityLabel: string | null;
50
+ workDate: string;
51
+ durationMinutes: number | null;
52
+ hours: number;
53
+ description: string | null;
54
+ }[];
55
+ id: number;
56
+ targetType: string;
57
+ targetId: number;
58
+ requesterCollaboratorId: number;
59
+ requesterName: string;
60
+ approverCollaboratorId: number | null;
61
+ approverName: string | null;
62
+ status: string;
63
+ submittedAt: string | null;
64
+ decidedAt: string | null;
65
+ decisionNote: string | null;
66
+ timesheetWeekStartDate: string | null;
67
+ timesheetWeekEndDate: string | null;
68
+ timesheetTotalHours: number | null;
69
+ timesheetProjectNames: string | null;
70
+ timeOffType: string | null;
71
+ timeOffStartDate: string | null;
72
+ timeOffEndDate: string | null;
73
+ timeOffReason: string | null;
74
+ scheduleRequestScope: string | null;
75
+ scheduleStartDate: string | null;
76
+ scheduleEndDate: string | null;
77
+ scheduleReason: string | null;
78
+ } | {
79
+ days: {
80
+ requestId: number;
81
+ weekday: string;
82
+ isWorkingDay: boolean;
83
+ startTime: string | null;
84
+ endTime: string | null;
85
+ breakMinutes: number | null;
86
+ }[];
87
+ currentSchedule: {
88
+ collaboratorId: number;
89
+ weekday: string;
90
+ isWorkingDay: boolean;
91
+ startTime: string | null;
92
+ endTime: string | null;
93
+ breakMinutes: number | null;
94
+ }[];
95
+ id: number;
96
+ targetType: string;
97
+ targetId: number;
98
+ requesterCollaboratorId: number;
99
+ requesterName: string;
100
+ approverCollaboratorId: number | null;
101
+ approverName: string | null;
102
+ status: string;
103
+ submittedAt: string | null;
104
+ decidedAt: string | null;
105
+ decisionNote: string | null;
106
+ timesheetWeekStartDate: string | null;
107
+ timesheetWeekEndDate: string | null;
108
+ timesheetTotalHours: number | null;
109
+ timesheetProjectNames: string | null;
110
+ timeOffType: string | null;
111
+ timeOffStartDate: string | null;
112
+ timeOffEndDate: string | null;
113
+ timeOffReason: string | null;
114
+ scheduleRequestScope: string | null;
115
+ scheduleStartDate: string | null;
116
+ scheduleEndDate: string | null;
117
+ scheduleReason: string | null;
118
+ }>;
6
119
  approve(user: any, id: number, data: any): Promise<Record<string, unknown>>;
7
120
  reject(user: any, id: number, data: any): Promise<Record<string, unknown>>;
8
121
  }
@@ -1 +1 @@
1
- {"version":3,"file":"operations-approvals.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/operations-approvals.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,qBAEa,6BAA6B;IAC5B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,iBAAiB;IAGjE,aAAa,CAAS,IAAI,KAAA;IAK1B,OAAO,CAAS,IAAI,KAAA,EAA6B,EAAE,EAAE,MAAM,EAAU,IAAI,KAAA;IAKzE,MAAM,CAAS,IAAI,KAAA,EAA6B,EAAE,EAAE,MAAM,EAAU,IAAI,KAAA;CAGzE"}
1
+ {"version":3,"file":"operations-approvals.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/operations-approvals.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,qBAEa,6BAA6B;IAC5B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,iBAAiB;IAGjE,aAAa,CAAS,IAAI,KAAA,EAAW,OAAO,EAAE,gBAAgB;;;;;;;;;IAK9D,iBAAiB,CAAS,IAAI,KAAA,EAA6B,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKrE,OAAO,CAAS,IAAI,KAAA,EAA6B,EAAE,EAAE,MAAM,EAAU,IAAI,KAAA;IAKzE,MAAM,CAAS,IAAI,KAAA,EAA6B,EAAE,EAAE,MAAM,EAAU,IAAI,KAAA;CAGzE"}
@@ -15,13 +15,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.OperationsApprovalsController = void 0;
16
16
  const api_1 = require("@hed-hog/api");
17
17
  const common_1 = require("@nestjs/common");
18
+ const list_approvals_dto_1 = require("../dto/list-approvals.dto");
18
19
  const operations_service_1 = require("../operations.service");
19
20
  let OperationsApprovalsController = class OperationsApprovalsController {
20
21
  constructor(operationsService) {
21
22
  this.operationsService = operationsService;
22
23
  }
23
- listApprovals(user) {
24
- return this.operationsService.listApprovals(Number((user === null || user === void 0 ? void 0 : user.id) || 0));
24
+ listApprovals(user, filters) {
25
+ return this.operationsService.listApprovals(Number((user === null || user === void 0 ? void 0 : user.id) || 0), filters);
26
+ }
27
+ getApprovalDetail(user, id) {
28
+ return this.operationsService.getApprovalDetail(Number((user === null || user === void 0 ? void 0 : user.id) || 0), id);
25
29
  }
26
30
  approve(user, id, data) {
27
31
  return this.operationsService.approve(Number((user === null || user === void 0 ? void 0 : user.id) || 0), id, data);
@@ -34,10 +38,19 @@ exports.OperationsApprovalsController = OperationsApprovalsController;
34
38
  __decorate([
35
39
  (0, common_1.Get)('approvals'),
36
40
  __param(0, (0, api_1.User)()),
41
+ __param(1, (0, common_1.Query)()),
37
42
  __metadata("design:type", Function),
38
- __metadata("design:paramtypes", [Object]),
43
+ __metadata("design:paramtypes", [Object, list_approvals_dto_1.ListApprovalsDto]),
39
44
  __metadata("design:returntype", void 0)
40
45
  ], OperationsApprovalsController.prototype, "listApprovals", null);
46
+ __decorate([
47
+ (0, common_1.Get)('approvals/:id'),
48
+ __param(0, (0, api_1.User)()),
49
+ __param(1, (0, common_1.Param)('id', common_1.ParseIntPipe)),
50
+ __metadata("design:type", Function),
51
+ __metadata("design:paramtypes", [Object, Number]),
52
+ __metadata("design:returntype", void 0)
53
+ ], OperationsApprovalsController.prototype, "getApprovalDetail", null);
41
54
  __decorate([
42
55
  (0, common_1.Post)('approvals/:id/approve'),
43
56
  __param(0, (0, api_1.User)()),
@@ -1 +1 @@
1
- {"version":3,"file":"operations-approvals.controller.js","sourceRoot":"","sources":["../../src/controllers/operations-approvals.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAA0C;AAC1C,2CAAkF;AAClF,8DAA0D;AAInD,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IACxC,YAA6B,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAAG,CAAC;IAGrE,aAAa,CAAS,IAAI;QACxB,OAAO,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,MAAM,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,KAAI,CAAC,CAAC,CAAC,CAAC;IACrE,CAAC;IAGD,OAAO,CAAS,IAAI,EAA6B,EAAU,EAAU,IAAI;QACvE,OAAO,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,KAAI,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;IACzE,CAAC;IAGD,MAAM,CAAS,IAAI,EAA6B,EAAU,EAAU,IAAI;QACtE,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,KAAI,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC;CACF,CAAA;AAjBY,sEAA6B;AAIxC;IADC,IAAA,YAAG,EAAC,WAAW,CAAC;IACF,WAAA,IAAA,UAAI,GAAE,CAAA;;;;kEAEpB;AAGD;IADC,IAAA,aAAI,EAAC,uBAAuB,CAAC;IACrB,WAAA,IAAA,UAAI,GAAE,CAAA;IAAQ,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;;;;4DAEnE;AAGD;IADC,IAAA,aAAI,EAAC,sBAAsB,CAAC;IACrB,WAAA,IAAA,UAAI,GAAE,CAAA;IAAQ,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;;;;2DAElE;wCAhBU,6BAA6B;IAFzC,IAAA,UAAI,GAAE;IACN,IAAA,mBAAU,EAAC,YAAY,CAAC;qCAEyB,sCAAiB;GADtD,6BAA6B,CAiBzC"}
1
+ {"version":3,"file":"operations-approvals.controller.js","sourceRoot":"","sources":["../../src/controllers/operations-approvals.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,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YAAG,EAAC,eAAe,CAAC;IACF,WAAA,IAAA,UAAI,GAAE,CAAA;IAAQ,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;;;;sEAEzD;AAGD;IADC,IAAA,aAAI,EAAC,uBAAuB,CAAC;IACrB,WAAA,IAAA,UAAI,GAAE,CAAA;IAAQ,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;;;;4DAEnE;AAGD;IADC,IAAA,aAAI,EAAC,sBAAsB,CAAC;IACrB,WAAA,IAAA,UAAI,GAAE,CAAA;IAAQ,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;;;;2DAElE;wCArBU,6BAA6B;IAFzC,IAAA,UAAI,GAAE;IACN,IAAA,mBAAU,EAAC,YAAY,CAAC;qCAEyB,sCAAiB;GADtD,6BAA6B,CAsBzC"}
@@ -1,10 +1,25 @@
1
1
  import { CreateCollaboratorDto } from '../dto/create-collaborator.dto';
2
+ import { ListCollaboratorsDto } from '../dto/list-collaborators.dto';
2
3
  import { UpdateCollaboratorDto } from '../dto/update-collaborator.dto';
3
4
  import { OperationsService } from '../operations.service';
4
5
  export declare class OperationsCollaboratorsController {
5
6
  private readonly operationsService;
6
7
  constructor(operationsService: OperationsService);
7
- listCollaborators(user: any): Promise<Record<string, unknown>[]>;
8
+ listCollaborators(user: any, filters: ListCollaboratorsDto): Promise<Record<string, unknown>[] | {
9
+ total: number;
10
+ lastPage: number;
11
+ page: number;
12
+ pageSize: number;
13
+ prev: number;
14
+ next: number;
15
+ data: Record<string, unknown>[];
16
+ }>;
17
+ listCollaboratorStats(user: any, filters: ListCollaboratorsDto): Promise<{
18
+ total: number;
19
+ active: number;
20
+ onLeave: number;
21
+ withContracts: number;
22
+ }>;
8
23
  getMyCollaborator(user: any): Promise<{
9
24
  assignedProjects: Record<string, unknown>[];
10
25
  relatedContracts: Record<string, unknown>[];
@@ -1 +1 @@
1
- {"version":3,"file":"operations-collaborators.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/operations-collaborators.controller.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,qBAEa,iCAAiC;IAChC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,iBAAiB;IAGjE,iBAAiB,CAAS,IAAI,KAAA;IAK9B,iBAAiB,CAAS,IAAI,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAK9B,OAAO,CAAS,IAAI,KAAA;;;;;;;;;;;;;;IAKpB,eAAe,CAAS,IAAI,KAAA,EAA6B,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAQnE,kBAAkB,CAAS,IAAI,KAAA,EAAU,IAAI,EAAE,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKpE,kBAAkB,CACR,IAAI,KAAA,EACe,EAAE,EAAE,MAAM,EAC7B,IAAI,EAAE,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQtC"}
1
+ {"version":3,"file":"operations-collaborators.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/operations-collaborators.controller.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,qBAEa,iCAAiC;IAChC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,iBAAiB;IAGjE,iBAAiB,CAAS,IAAI,KAAA,EAAW,OAAO,EAAE,oBAAoB;;;;;;;;;IAQtE,qBAAqB,CAAS,IAAI,KAAA,EAAW,OAAO,EAAE,oBAAoB;;;;;;IAQ1E,iBAAiB,CAAS,IAAI,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAK9B,OAAO,CAAS,IAAI,KAAA;;;;;;;;;;;;;;IAKpB,eAAe,CAAS,IAAI,KAAA,EAA6B,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAQnE,kBAAkB,CAAS,IAAI,KAAA,EAAU,IAAI,EAAE,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKpE,kBAAkB,CACR,IAAI,KAAA,EACe,EAAE,EAAE,MAAM,EAC7B,IAAI,EAAE,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQtC"}
@@ -16,14 +16,18 @@ exports.OperationsCollaboratorsController = void 0;
16
16
  const api_1 = require("@hed-hog/api");
17
17
  const common_1 = require("@nestjs/common");
18
18
  const create_collaborator_dto_1 = require("../dto/create-collaborator.dto");
19
+ const list_collaborators_dto_1 = require("../dto/list-collaborators.dto");
19
20
  const update_collaborator_dto_1 = require("../dto/update-collaborator.dto");
20
21
  const operations_service_1 = require("../operations.service");
21
22
  let OperationsCollaboratorsController = class OperationsCollaboratorsController {
22
23
  constructor(operationsService) {
23
24
  this.operationsService = operationsService;
24
25
  }
25
- listCollaborators(user) {
26
- return this.operationsService.listCollaborators(Number((user === null || user === void 0 ? void 0 : user.id) || 0));
26
+ listCollaborators(user, filters) {
27
+ return this.operationsService.listCollaborators(Number((user === null || user === void 0 ? void 0 : user.id) || 0), filters);
28
+ }
29
+ listCollaboratorStats(user, filters) {
30
+ return this.operationsService.getCollaboratorStats(Number((user === null || user === void 0 ? void 0 : user.id) || 0), filters);
27
31
  }
28
32
  getMyCollaborator(user) {
29
33
  return this.operationsService.getMyCollaborator(Number((user === null || user === void 0 ? void 0 : user.id) || 0));
@@ -45,10 +49,19 @@ exports.OperationsCollaboratorsController = OperationsCollaboratorsController;
45
49
  __decorate([
46
50
  (0, common_1.Get)('collaborators'),
47
51
  __param(0, (0, api_1.User)()),
52
+ __param(1, (0, common_1.Query)()),
48
53
  __metadata("design:type", Function),
49
- __metadata("design:paramtypes", [Object]),
54
+ __metadata("design:paramtypes", [Object, list_collaborators_dto_1.ListCollaboratorsDto]),
50
55
  __metadata("design:returntype", void 0)
51
56
  ], OperationsCollaboratorsController.prototype, "listCollaborators", null);
57
+ __decorate([
58
+ (0, common_1.Get)('collaborators/stats'),
59
+ __param(0, (0, api_1.User)()),
60
+ __param(1, (0, common_1.Query)()),
61
+ __metadata("design:type", Function),
62
+ __metadata("design:paramtypes", [Object, list_collaborators_dto_1.ListCollaboratorsDto]),
63
+ __metadata("design:returntype", void 0)
64
+ ], OperationsCollaboratorsController.prototype, "listCollaboratorStats", null);
52
65
  __decorate([
53
66
  (0, common_1.Get)('collaborators/me'),
54
67
  __param(0, (0, api_1.User)()),
@@ -1 +1 @@
1
- {"version":3,"file":"operations-collaborators.controller.js","sourceRoot":"","sources":["../../src/controllers/operations-collaborators.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAA0C;AAC1C,2CAQwB;AACxB,4EAAuE;AACvE,4EAAuE;AACvE,8DAA0D;AAInD,IAAM,iCAAiC,GAAvC,MAAM,iCAAiC;IAC5C,YAA6B,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAAG,CAAC;IAGrE,iBAAiB,CAAS,IAAI;QAC5B,OAAO,IAAI,C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WAAA,IAAA,UAAI,GAAE,CAAA;;;;0EAExB;AAGD;IADC,IAAA,YAAG,EAAC,kBAAkB,CAAC;IACL,WAAA,IAAA,UAAI,GAAE,CAAA;;;;0EAExB;AAGD;IADC,IAAA,YAAG,EAAC,oBAAoB,CAAC;IACjB,WAAA,IAAA,UAAI,GAAE,CAAA;;;;gEAEd;AAGD;IADC,IAAA,YAAG,EAAC,mBAAmB,CAAC;IACR,WAAA,IAAA,UAAI,GAAE,CAAA;IAAQ,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;;;;wEAKvD;AAGD;IADC,IAAA,aAAI,EAAC,eAAe,CAAC;IACF,WAAA,IAAA,UAAI,GAAE,CAAA;IAAQ,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,+CAAqB;;2EAEnE;AAGD;IADC,IAAA,cAAK,EAAC,mBAAmB,CAAC;IAExB,WAAA,IAAA,UAAI,GAAE,CAAA;IACN,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IACzB,WAAA,IAAA,aAAI,GAAE,CAAA;;qDAAO,+CAAqB;;2EAOpC;4CA1CU,iCAAiC;IAF7C,IAAA,UAAI,GAAE;IACN,IAAA,mBAAU,EAAC,YAAY,CAAC;qCAEyB,sCAAiB;GADtD,iCAAiC,CA2C7C"}
1
+ {"version":3,"file":"operations-collaborators.controller.js","sourceRoot":"","sources":["../../src/controllers/operations-collaborators.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAA0C;AAC1C,2CASwB;AACxB,4EAAuE;AACvE,0EAAqE;AACrE,4EAAuE;AACvE,8DAA0D;AAInD,IAAM,iCAAiC,GAAvC,MAAM,iCAAiC;IAC5C,YAA6B,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAAG,CAAC;IAGrE,iBAAiB,CAAS,IAAI,EAAW,OAA6B;QACpE,OAAO,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CA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