@hed-hog/operations 0.0.306 → 0.0.309

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 +5 -5
  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
@@ -15,97 +15,47 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.OperationsContractsController = void 0;
16
16
  const api_1 = require("@hed-hog/api");
17
17
  const common_1 = require("@nestjs/common");
18
+ const list_contracts_dto_1 = require("../dto/list-contracts.dto");
18
19
  const operations_service_1 = require("../operations.service");
19
20
  let OperationsContractsController = class OperationsContractsController {
20
21
  constructor(operationsService) {
21
22
  this.operationsService = operationsService;
22
23
  }
23
- listContractTemplates(user) {
24
- return this.operationsService.listContractTemplates(Number((user === null || user === void 0 ? void 0 : user.id) || 0));
24
+ listContracts(user, filters) {
25
+ return this.operationsService.listContracts(Number((user === null || user === void 0 ? void 0 : user.id) || 0), filters);
25
26
  }
26
- getContractTemplate(user, id) {
27
- return this.operationsService.getContractTemplateById(Number((user === null || user === void 0 ? void 0 : user.id) || 0), id);
28
- }
29
- createContractTemplate(user, data) {
30
- return this.operationsService.createContractTemplate(Number((user === null || user === void 0 ? void 0 : user.id) || 0), data);
31
- }
32
- updateContractTemplate(user, id, data) {
33
- return this.operationsService.updateContractTemplate(Number((user === null || user === void 0 ? void 0 : user.id) || 0), id, data);
34
- }
35
- listContracts(user) {
36
- return this.operationsService.listContracts(Number((user === null || user === void 0 ? void 0 : user.id) || 0));
27
+ getContractStats(user) {
28
+ return this.operationsService.getContractStats(Number((user === null || user === void 0 ? void 0 : user.id) || 0));
37
29
  }
38
30
  getContract(user, id) {
39
31
  return this.operationsService.getContractById(Number((user === null || user === void 0 ? void 0 : user.id) || 0), id);
40
32
  }
41
- createContractDraft(user, data) {
42
- return this.operationsService.createContractDraft(Number((user === null || user === void 0 ? void 0 : user.id) || 0), data);
43
- }
44
33
  createContract(user, data) {
45
34
  return this.operationsService.createContract(Number((user === null || user === void 0 ? void 0 : user.id) || 0), data);
46
35
  }
47
- extractContractDraft(user, data) {
48
- return this.operationsService.extractContractDraft(Number((user === null || user === void 0 ? void 0 : user.id) || 0), data);
49
- }
50
- extractContractSource(user, id, data) {
51
- return this.operationsService.extractContractSource(Number((user === null || user === void 0 ? void 0 : user.id) || 0), id, data);
52
- }
53
- generateContractContent(user, id, data) {
54
- return this.operationsService.generateContractContent(Number((user === null || user === void 0 ? void 0 : user.id) || 0), id, data);
55
- }
56
- reviewContractLegally(user, id, data) {
57
- return this.operationsService.reviewContractLegally(Number((user === null || user === void 0 ? void 0 : user.id) || 0), id, data);
58
- }
59
36
  updateContract(user, id, data) {
60
37
  return this.operationsService.updateContract(Number((user === null || user === void 0 ? void 0 : user.id) || 0), id, data);
61
38
  }
62
39
  removeContract(user, id) {
63
40
  return this.operationsService.removeContract(Number((user === null || user === void 0 ? void 0 : user.id) || 0), id);
64
41
  }
65
- generateContractPdf(user, id) {
66
- return this.operationsService.generateContractPdf(Number((user === null || user === void 0 ? void 0 : user.id) || 0), id);
67
- }
68
42
  };
69
43
  exports.OperationsContractsController = OperationsContractsController;
70
44
  __decorate([
71
- (0, common_1.Get)('contract-templates'),
72
- __param(0, (0, api_1.User)()),
73
- __metadata("design:type", Function),
74
- __metadata("design:paramtypes", [Object]),
75
- __metadata("design:returntype", void 0)
76
- ], OperationsContractsController.prototype, "listContractTemplates", null);
77
- __decorate([
78
- (0, common_1.Get)('contract-templates/:id'),
79
- __param(0, (0, api_1.User)()),
80
- __param(1, (0, common_1.Param)('id', common_1.ParseIntPipe)),
81
- __metadata("design:type", Function),
82
- __metadata("design:paramtypes", [Object, Number]),
83
- __metadata("design:returntype", void 0)
84
- ], OperationsContractsController.prototype, "getContractTemplate", null);
85
- __decorate([
86
- (0, common_1.Post)('contract-templates'),
87
- __param(0, (0, api_1.User)()),
88
- __param(1, (0, common_1.Body)()),
89
- __metadata("design:type", Function),
90
- __metadata("design:paramtypes", [Object, Object]),
91
- __metadata("design:returntype", void 0)
92
- ], OperationsContractsController.prototype, "createContractTemplate", null);
93
- __decorate([
94
- (0, common_1.Patch)('contract-templates/:id'),
45
+ (0, common_1.Get)('contracts'),
95
46
  __param(0, (0, api_1.User)()),
96
- __param(1, (0, common_1.Param)('id', common_1.ParseIntPipe)),
97
- __param(2, (0, common_1.Body)()),
47
+ __param(1, (0, common_1.Query)()),
98
48
  __metadata("design:type", Function),
99
- __metadata("design:paramtypes", [Object, Number, Object]),
49
+ __metadata("design:paramtypes", [Object, list_contracts_dto_1.ListContractsDto]),
100
50
  __metadata("design:returntype", void 0)
101
- ], OperationsContractsController.prototype, "updateContractTemplate", null);
51
+ ], OperationsContractsController.prototype, "listContracts", null);
102
52
  __decorate([
103
- (0, common_1.Get)('contracts'),
53
+ (0, common_1.Get)('contracts/stats'),
104
54
  __param(0, (0, api_1.User)()),
105
55
  __metadata("design:type", Function),
106
56
  __metadata("design:paramtypes", [Object]),
107
57
  __metadata("design:returntype", void 0)
108
- ], OperationsContractsController.prototype, "listContracts", null);
58
+ ], OperationsContractsController.prototype, "getContractStats", null);
109
59
  __decorate([
110
60
  (0, common_1.Get)('contracts/:id'),
111
61
  __param(0, (0, api_1.User)()),
@@ -114,14 +64,6 @@ __decorate([
114
64
  __metadata("design:paramtypes", [Object, Number]),
115
65
  __metadata("design:returntype", void 0)
116
66
  ], OperationsContractsController.prototype, "getContract", null);
117
- __decorate([
118
- (0, common_1.Post)('contracts/drafts'),
119
- __param(0, (0, api_1.User)()),
120
- __param(1, (0, common_1.Body)()),
121
- __metadata("design:type", Function),
122
- __metadata("design:paramtypes", [Object, Object]),
123
- __metadata("design:returntype", void 0)
124
- ], OperationsContractsController.prototype, "createContractDraft", null);
125
67
  __decorate([
126
68
  (0, common_1.Post)('contracts'),
127
69
  __param(0, (0, api_1.User)()),
@@ -130,41 +72,6 @@ __decorate([
130
72
  __metadata("design:paramtypes", [Object, Object]),
131
73
  __metadata("design:returntype", void 0)
132
74
  ], OperationsContractsController.prototype, "createContract", null);
133
- __decorate([
134
- (0, common_1.Post)('contracts/extract-draft'),
135
- __param(0, (0, api_1.User)()),
136
- __param(1, (0, common_1.Body)()),
137
- __metadata("design:type", Function),
138
- __metadata("design:paramtypes", [Object, Object]),
139
- __metadata("design:returntype", void 0)
140
- ], OperationsContractsController.prototype, "extractContractDraft", null);
141
- __decorate([
142
- (0, common_1.Post)('contracts/:id/extract-source'),
143
- __param(0, (0, api_1.User)()),
144
- __param(1, (0, common_1.Param)('id', common_1.ParseIntPipe)),
145
- __param(2, (0, common_1.Body)()),
146
- __metadata("design:type", Function),
147
- __metadata("design:paramtypes", [Object, Number, Object]),
148
- __metadata("design:returntype", void 0)
149
- ], OperationsContractsController.prototype, "extractContractSource", null);
150
- __decorate([
151
- (0, common_1.Post)('contracts/:id/generate-content'),
152
- __param(0, (0, api_1.User)()),
153
- __param(1, (0, common_1.Param)('id', common_1.ParseIntPipe)),
154
- __param(2, (0, common_1.Body)()),
155
- __metadata("design:type", Function),
156
- __metadata("design:paramtypes", [Object, Number, Object]),
157
- __metadata("design:returntype", void 0)
158
- ], OperationsContractsController.prototype, "generateContractContent", null);
159
- __decorate([
160
- (0, common_1.Post)('contracts/:id/legal-review'),
161
- __param(0, (0, api_1.User)()),
162
- __param(1, (0, common_1.Param)('id', common_1.ParseIntPipe)),
163
- __param(2, (0, common_1.Body)()),
164
- __metadata("design:type", Function),
165
- __metadata("design:paramtypes", [Object, Number, Object]),
166
- __metadata("design:returntype", void 0)
167
- ], OperationsContractsController.prototype, "reviewContractLegally", null);
168
75
  __decorate([
169
76
  (0, common_1.Patch)('contracts/:id'),
170
77
  __param(0, (0, api_1.User)()),
@@ -182,14 +89,6 @@ __decorate([
182
89
  __metadata("design:paramtypes", [Object, Number]),
183
90
  __metadata("design:returntype", void 0)
184
91
  ], OperationsContractsController.prototype, "removeContract", null);
185
- __decorate([
186
- (0, common_1.Post)('contracts/:id/generate-pdf'),
187
- __param(0, (0, api_1.User)()),
188
- __param(1, (0, common_1.Param)('id', common_1.ParseIntPipe)),
189
- __metadata("design:type", Function),
190
- __metadata("design:paramtypes", [Object, Number]),
191
- __metadata("design:returntype", void 0)
192
- ], OperationsContractsController.prototype, "generateContractPdf", null);
193
92
  exports.OperationsContractsController = OperationsContractsController = __decorate([
194
93
  (0, api_1.Role)(),
195
94
  (0, common_1.Controller)('operations'),
@@ -1 +1 @@
1
- {"version":3,"file":"operations-contracts.controller.js","sourceRoot":"","sources":["../../src/controllers/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;IACzB,WAAA,IAAA,aAAI,GAAE,CAAA;;;;4EAOR;AAGD;IADC,IAAA,aAAI,EAAC,4BAA4B,CAAC;IAEhC,WAAA,IAAA,UAAI,GAAE,CAAA;IACN,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IACzB,WAAA,IAAA,aAAI,GAAE,CAAA;;;;0EAOR;AAGD;IADC,IAAA,cAAK,EAAC,eAAe,CAAC;IAEpB,WAAA,IAAA,UAAI,GAAE,CAAA;IACN,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IACzB,WAAA,IAAA,aAAI,GAAE,CAAA;;;;mEAGR;AAGD;IADC,IAAA,eAAM,EAAC,eAAe,CAAC;IACR,WAAA,IAAA,UAAI,GAAE,CAAA;IAAQ,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;;;;mEAEtD;AAGD;IADC,IAAA,aAAI,EAAC,4BAA4B,CAAC;IACd,WAAA,IAAA,UAAI,GAAE,CAAA;IAAQ,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;;;;wEAE3D;wCAzHU,6BAA6B;IAFzC,IAAA,UAAI,GAAE;IACN,IAAA,mBAAU,EAAC,YAAY,CAAC;qCAEyB,sCAAiB;GADtD,6BAA6B,CA0HzC"}
1
+ {"version":3,"file":"operations-contracts.controller.js","sourceRoot":"","sources":["../../src/controllers/operations-contracts.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAA0C;AAC1C,2CAUwB;AACxB,kEAA6D;AAC7D,8DAA0D;AAInD,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IACxC,YAA6B,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAAG,CAAC;IAGrE,aAAa,CAAS,IAAI,EAAW,OAAyB;QAC5D,OAAO,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,MAAM,CAAC,CAAA,IA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CAAA;IAAQ,WAAA,IAAA,cAAK,GAAE,CAAA;;6CAAU,qCAAgB;;kEAE7D;AAGD;IADC,IAAA,YAAG,EAAC,iBAAiB,CAAC;IACL,WAAA,IAAA,UAAI,GAAE,CAAA;;;;qEAEvB;AAGD;IADC,IAAA,YAAG,EAAC,eAAe,CAAC;IACR,WAAA,IAAA,UAAI,GAAE,CAAA;IAAQ,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;;;;gEAEnD;AAGD;IADC,IAAA,aAAI,EAAC,WAAW,CAAC;IACF,WAAA,IAAA,UAAI,GAAE,CAAA;IAAQ,WAAA,IAAA,aAAI,GAAE,CAAA;;;;mEAEnC;AAGD;IADC,IAAA,cAAK,EAAC,eAAe,CAAC;IAEpB,WAAA,IAAA,UAAI,GAAE,CAAA;IACN,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IACzB,WAAA,IAAA,aAAI,GAAE,CAAA;;;;mEAGR;AAGD;IADC,IAAA,eAAM,EAAC,eAAe,CAAC;IACR,WAAA,IAAA,UAAI,GAAE,CAAA;IAAQ,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;;;;mEAEtD;wCAnCU,6BAA6B;IAFzC,IAAA,UAAI,GAAE;IACN,IAAA,mBAAU,EAAC,YAAY,CAAC;qCAEyB,sCAAiB;GADtD,6BAA6B,CAoCzC"}
@@ -1,5 +1,7 @@
1
1
  import { CreateCollaboratorTypeDto } from '../dto/create-collaborator-type.dto';
2
2
  import { ListCollaboratorTypesDto } from '../dto/list-collaborator-types.dto';
3
+ import { ListDepartmentsDto } from '../dto/list-departments.dto';
4
+ import { ReorderCollaboratorTypesDto } from '../dto/reorder-collaborator-types.dto';
3
5
  import { UpdateCollaboratorTypeDto } from '../dto/update-collaborator-type.dto';
4
6
  import { OperationsService } from '../operations.service';
5
7
  export declare class OperationsOrgStructureController {
@@ -17,7 +19,27 @@ export declare class OperationsOrgStructureController {
17
19
  collaboratorCount: number;
18
20
  createdAt: string;
19
21
  updatedAt: string;
20
- }[]>;
22
+ }[] | {
23
+ total: number;
24
+ lastPage: number;
25
+ page: number;
26
+ pageSize: number;
27
+ prev: number;
28
+ next: number;
29
+ data: {
30
+ id: number;
31
+ slug: string;
32
+ name: string;
33
+ description: string | null;
34
+ category: string | null;
35
+ isActive: boolean;
36
+ sortOrder: number;
37
+ status: "active" | "inactive";
38
+ collaboratorCount: number;
39
+ createdAt: string;
40
+ updatedAt: string;
41
+ }[];
42
+ }>;
21
43
  createCollaboratorType(user: any, data: CreateCollaboratorTypeDto): Promise<{
22
44
  id: number;
23
45
  slug: string;
@@ -32,6 +54,39 @@ export declare class OperationsOrgStructureController {
32
54
  updatedAt: string | null;
33
55
  deletedAt: string | null;
34
56
  }>;
57
+ reorderCollaboratorTypes(user: any, data: ReorderCollaboratorTypesDto): Promise<{
58
+ id: number;
59
+ slug: string;
60
+ name: string;
61
+ description: string | null;
62
+ category: string | null;
63
+ isActive: boolean;
64
+ sortOrder: number;
65
+ status: "active" | "inactive";
66
+ collaboratorCount: number;
67
+ createdAt: string;
68
+ updatedAt: string;
69
+ }[] | {
70
+ total: number;
71
+ lastPage: number;
72
+ page: number;
73
+ pageSize: number;
74
+ prev: number;
75
+ next: number;
76
+ data: {
77
+ id: number;
78
+ slug: string;
79
+ name: string;
80
+ description: string | null;
81
+ category: string | null;
82
+ isActive: boolean;
83
+ sortOrder: number;
84
+ status: "active" | "inactive";
85
+ collaboratorCount: number;
86
+ createdAt: string;
87
+ updatedAt: string;
88
+ }[];
89
+ }>;
35
90
  updateCollaboratorType(user: any, id: number, data: UpdateCollaboratorTypeDto): Promise<{
36
91
  id: number;
37
92
  slug: string;
@@ -69,7 +124,15 @@ export declare class OperationsOrgStructureController {
69
124
  updatedAt: string | null;
70
125
  deletedAt: string | null;
71
126
  }>;
72
- listDepartments(user: any): Promise<Record<string, unknown>[]>;
127
+ listDepartments(user: any, filters: ListDepartmentsDto): Promise<Record<string, unknown>[] | {
128
+ total: number;
129
+ lastPage: number;
130
+ page: number;
131
+ pageSize: number;
132
+ prev: number;
133
+ next: number;
134
+ data: Record<string, unknown>[];
135
+ }>;
73
136
  createDepartment(user: any, data: any): Promise<{
74
137
  id: number;
75
138
  slug: string;
@@ -1 +1 @@
1
- {"version":3,"file":"operations-org-structure.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/operations-org-structure.controller.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,qBAEa,gCAAgC;IAC/B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,iBAAiB;IAGjE,qBAAqB,CACX,IAAI,KAAA,EACE,OAAO,EAAE,wBAAwB;;;;;;;;;;;;;IASjD,sBAAsB,CAAS,IAAI,KAAA,EAAU,IAAI,EAAE,yBAAyB;;;;;;;;;;;;;;IAQ5E,sBAAsB,CACZ,IAAI,KAAA,EACe,EAAE,EAAE,MAAM,EAC7B,IAAI,EAAE,yBAAyB;;;;;;;;;;;;;;IAUzC,gBAAgB,CAAS,IAAI,KAAA;;;;;;;;;;;IAK7B,iBAAiB,CAAS,IAAI,KAAA,EAAU,IAAI,KAAA;;;;;;;;;;;;IAK5C,eAAe,CAAS,IAAI,KAAA;IAK5B,gBAAgB,CAAS,IAAI,KAAA,EAAU,IAAI,KAAA;;;;;;;;;;;IAK3C,gBAAgB,CACN,IAAI,KAAA,EACe,EAAE,EAAE,MAAM,EAC7B,IAAI,KAAA;;;;;;;;;;;IAMd,aAAa,CAAS,IAAI,KAAA;IAK1B,cAAc,CAAS,IAAI,KAAA,EAAU,IAAI,KAAA;;;;;;;;;;;CAG1C"}
1
+ {"version":3,"file":"operations-org-structure.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/operations-org-structure.controller.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,qBAEa,gCAAgC;IAC/B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,iBAAiB;IAGjE,qBAAqB,CACX,IAAI,KAAA,EACH,OAAO,EAAE,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAS5C,sBAAsB,CAAS,IAAI,KAAA,EAAU,IAAI,EAAE,yBAAyB;;;;;;;;;;;;;;IAQ5E,wBAAwB,CACd,IAAI,KAAA,EACJ,IAAI,EAAE,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAS3C,sBAAsB,CACZ,IAAI,KAAA,EACe,EAAE,EAAE,MAAM,EAC7B,IAAI,EAAE,yBAAyB;;;;;;;;;;;;;;IAUzC,gBAAgB,CAAS,IAAI,KAAA;;;;;;;;;;;IAK7B,iBAAiB,CAAS,IAAI,KAAA,EAAU,IAAI,KAAA;;;;;;;;;;;;IAK5C,eAAe,CAAS,IAAI,KAAA,EAAW,OAAO,EAAE,kBAAkB;;;;;;;;;IAKlE,gBAAgB,CAAS,IAAI,KAAA,EAAU,IAAI,KAAA;;;;;;;;;;;IAK3C,gBAAgB,CACN,IAAI,KAAA,EACe,EAAE,EAAE,MAAM,EAC7B,IAAI,KAAA;;;;;;;;;;;IAMd,aAAa,CAAS,IAAI,KAAA;IAK1B,cAAc,CAAS,IAAI,KAAA,EAAU,IAAI,KAAA;;;;;;;;;;;CAG1C"}
@@ -14,10 +14,11 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.OperationsOrgStructureController = void 0;
16
16
  const api_1 = require("@hed-hog/api");
17
- const api_pagination_1 = require("@hed-hog/api-pagination");
18
17
  const common_1 = require("@nestjs/common");
19
18
  const create_collaborator_type_dto_1 = require("../dto/create-collaborator-type.dto");
20
19
  const list_collaborator_types_dto_1 = require("../dto/list-collaborator-types.dto");
20
+ const list_departments_dto_1 = require("../dto/list-departments.dto");
21
+ const reorder_collaborator_types_dto_1 = require("../dto/reorder-collaborator-types.dto");
21
22
  const update_collaborator_type_dto_1 = require("../dto/update-collaborator-type.dto");
22
23
  const operations_service_1 = require("../operations.service");
23
24
  let OperationsOrgStructureController = class OperationsOrgStructureController {
@@ -30,6 +31,9 @@ let OperationsOrgStructureController = class OperationsOrgStructureController {
30
31
  createCollaboratorType(user, data) {
31
32
  return this.operationsService.createCollaboratorType(Number((user === null || user === void 0 ? void 0 : user.id) || 0), data);
32
33
  }
34
+ reorderCollaboratorTypes(user, data) {
35
+ return this.operationsService.reorderCollaboratorTypes(Number((user === null || user === void 0 ? void 0 : user.id) || 0), data.ids);
36
+ }
33
37
  updateCollaboratorType(user, id, data) {
34
38
  return this.operationsService.updateCollaboratorType(Number((user === null || user === void 0 ? void 0 : user.id) || 0), id, data);
35
39
  }
@@ -39,8 +43,8 @@ let OperationsOrgStructureController = class OperationsOrgStructureController {
39
43
  createProjectRole(user, data) {
40
44
  return this.operationsService.createProjectRole(Number((user === null || user === void 0 ? void 0 : user.id) || 0), data);
41
45
  }
42
- listDepartments(user) {
43
- return this.operationsService.listDepartments(Number((user === null || user === void 0 ? void 0 : user.id) || 0));
46
+ listDepartments(user, filters) {
47
+ return this.operationsService.listDepartments(Number((user === null || user === void 0 ? void 0 : user.id) || 0), filters);
44
48
  }
45
49
  createDepartment(user, data) {
46
50
  return this.operationsService.createDepartment(Number((user === null || user === void 0 ? void 0 : user.id) || 0), data);
@@ -59,7 +63,7 @@ exports.OperationsOrgStructureController = OperationsOrgStructureController;
59
63
  __decorate([
60
64
  (0, common_1.Get)('collaborator-types'),
61
65
  __param(0, (0, api_1.User)()),
62
- __param(1, (0, api_pagination_1.Pagination)()),
66
+ __param(1, (0, common_1.Query)()),
63
67
  __metadata("design:type", Function),
64
68
  __metadata("design:paramtypes", [Object, list_collaborator_types_dto_1.ListCollaboratorTypesDto]),
65
69
  __metadata("design:returntype", void 0)
@@ -72,6 +76,14 @@ __decorate([
72
76
  __metadata("design:paramtypes", [Object, create_collaborator_type_dto_1.CreateCollaboratorTypeDto]),
73
77
  __metadata("design:returntype", void 0)
74
78
  ], OperationsOrgStructureController.prototype, "createCollaboratorType", null);
79
+ __decorate([
80
+ (0, common_1.Patch)('collaborator-types/reorder'),
81
+ __param(0, (0, api_1.User)()),
82
+ __param(1, (0, common_1.Body)()),
83
+ __metadata("design:type", Function),
84
+ __metadata("design:paramtypes", [Object, reorder_collaborator_types_dto_1.ReorderCollaboratorTypesDto]),
85
+ __metadata("design:returntype", void 0)
86
+ ], OperationsOrgStructureController.prototype, "reorderCollaboratorTypes", null);
75
87
  __decorate([
76
88
  (0, common_1.Patch)('collaborator-types/:id'),
77
89
  __param(0, (0, api_1.User)()),
@@ -99,8 +111,9 @@ __decorate([
99
111
  __decorate([
100
112
  (0, common_1.Get)('departments'),
101
113
  __param(0, (0, api_1.User)()),
114
+ __param(1, (0, common_1.Query)()),
102
115
  __metadata("design:type", Function),
103
- __metadata("design:paramtypes", [Object]),
116
+ __metadata("design:paramtypes", [Object, list_departments_dto_1.ListDepartmentsDto]),
104
117
  __metadata("design:returntype", void 0)
105
118
  ], OperationsOrgStructureController.prototype, "listDepartments", null);
106
119
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"operations-org-structure.controller.js","sourceRoot":"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CAAgC;IAF5C,IAAA,UAAI,GAAE;IACN,IAAA,mBAAU,EAAC,YAAY,CAAC;qCAEyB,sCAAiB;GADtD,gCAAgC,CAyE5C"}
1
+ {"version":3,"file":"operations-org-structure.controller.js","sourceRoot":"","sources":["../../src/controllers/operations-org-structure.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAA0C;AAC1C,2CASwB;AACxB,sFAAgF;AAChF,oFAA8E;AAC9E,sEAAiE;AACjE,0FAAoF;AACpF,sFAAgF;AAChF,8DAA0D;AAInD,IAAM,gCAAgC,GAAtC,MAAM,gCAAgC;IAC3C,YAA6B,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAAG,CAAC;IAGrE,qBAAqB,CACX,IAAI,EACH,OAAiC;QAE1C,OAAO,IAAI,CAAC,iBAAiB,CAAC,qBAAqB,CACjD,MAAM,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,KAAI,CAAC,CAAC,EACrB,OAAO,CACR,CAAC;IACJ,CAAC;IAGD,sBAAsB,CAAS,IAAI,EAAU,IAA+B;QAC1E,OAAO,IAAI,CAAC,iBAAiB,CAAC,sBAAsB,CAClD,MAAM,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,KAAI,CAAC,CAAC,EACrB,IAAI,CACL,CAAC;IACJ,CAAC;IAGD,wBAAwB,CACd,IAAI,EACJ,IAAiC;QAEzC,OAAO,IAAI,CAAC,iBAAiB,CAAC,wBAAwB,CACpD,MAAM,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,KAAI,CAAC,CAAC,EACrB,IAAI,CAAC,GAAG,CACT,CAAC;IACJ,CAAC;IAGD,sBAAsB,CACZ,IAAI,EACe,EAAU,EAC7B,IAA+B;QAEvC,OAAO,IAAI,CAAC,iBAAiB,CAAC,sBAAsB,CAClD,MAAM,CAAC,CAAA,IAAI,aAAJ,IAAI,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AAA;IAAQ,WAAA,IAAA,cAAK,GAAE,CAAA;;6CAAU,yCAAkB;;uEAEjE;AAGD;IADC,IAAA,aAAI,EAAC,aAAa,CAAC;IACF,WAAA,IAAA,UAAI,GAAE,CAAA;IAAQ,WAAA,IAAA,aAAI,GAAE,CAAA;;;;wEAErC;AAGD;IADC,IAAA,cAAK,EAAC,iBAAiB,CAAC;IAEtB,WAAA,IAAA,UAAI,GAAE,CAAA;IACN,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IACzB,WAAA,IAAA,aAAI,GAAE,CAAA;;;;wEAGR;AAGD;IADC,IAAA,YAAG,EAAC,YAAY,CAAC;IACH,WAAA,IAAA,UAAI,GAAE,CAAA;;;;qEAEpB;AAGD;IADC,IAAA,aAAI,EAAC,YAAY,CAAC;IACH,WAAA,IAAA,UAAI,GAAE,CAAA;IAAQ,WAAA,IAAA,aAAI,GAAE,CAAA;;;;sEAEnC;2CAnFU,gCAAgC;IAF5C,IAAA,UAAI,GAAE;IACN,IAAA,mBAAU,EAAC,YAAY,CAAC;qCAEyB,sCAAiB;GADtD,gCAAgC,CAoF5C"}
@@ -1,4 +1,5 @@
1
1
  import { ListOperationsProjectOptionsDto } from '../dto/list-project-options.dto';
2
+ import { ListProjectsDto } from '../dto/list-projects.dto';
2
3
  import { OperationsService } from '../operations.service';
3
4
  export declare class OperationsProjectsController {
4
5
  private readonly operationsService;
@@ -23,7 +24,30 @@ export declare class OperationsProjectsController {
23
24
  endDate: string | null;
24
25
  }[];
25
26
  }>;
26
- listProjects(user: any): Promise<Record<string, unknown>[]>;
27
+ listProjects(user: any, filters: ListProjectsDto): Promise<Record<string, unknown>[] | {
28
+ total: number;
29
+ lastPage: number;
30
+ page: number;
31
+ pageSize: number;
32
+ prev: number;
33
+ next: number;
34
+ data: Record<string, unknown>[];
35
+ }>;
36
+ getProjectStats(user: any, id: number): Promise<{
37
+ weeklyVelocity: {
38
+ weekLabel: string;
39
+ loggedHours: number;
40
+ }[];
41
+ allocationByCollaborator: {
42
+ name: string;
43
+ allocation: number;
44
+ }[];
45
+ quickRadar: {
46
+ activeAssignments: number;
47
+ pendingTimesheets: number;
48
+ totalWeeklyHours: number;
49
+ };
50
+ }>;
27
51
  getProject(user: any, id: number): Promise<{
28
52
  assignments: {
29
53
  id: number;
@@ -49,7 +73,7 @@ export declare class OperationsProjectsController {
49
73
  };
50
74
  operationalIndicators: {
51
75
  activeAssignments: number;
52
- billableAssignments: number;
76
+ completedAssignments: number;
53
77
  averageAllocation: number;
54
78
  totalWeeklyHours: number;
55
79
  };
@@ -101,7 +125,7 @@ export declare class OperationsProjectsController {
101
125
  };
102
126
  operationalIndicators: {
103
127
  activeAssignments: number;
104
- billableAssignments: number;
128
+ completedAssignments: number;
105
129
  averageAllocation: number;
106
130
  totalWeeklyHours: number;
107
131
  };
@@ -153,7 +177,7 @@ export declare class OperationsProjectsController {
153
177
  };
154
178
  operationalIndicators: {
155
179
  activeAssignments: number;
156
- billableAssignments: number;
180
+ completedAssignments: number;
157
181
  averageAllocation: number;
158
182
  totalWeeklyHours: number;
159
183
  };
@@ -1 +1 @@
1
- {"version":3,"file":"operations-projects.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/operations-projects.controller.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,qBAEa,4BAA4B;IAC3B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,iBAAiB;IAGjE,kBAAkB,CACR,IAAI,KAAA,EACE,gBAAgB,EAAE,+BAA+B;;;;;;;;;;;;;;;;;;;;IASjE,YAAY,CAAS,IAAI,KAAA;IAKzB,UAAU,CAAS,IAAI,KAAA,EAA6B,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAK9D,aAAa,CAAS,IAAI,KAAA,EAAU,IAAI,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKxC,aAAa,CAAS,IAAI,KAAA,EAA6B,EAAE,EAAE,MAAM,EAAU,IAAI,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGhF"}
1
+ {"version":3,"file":"operations-projects.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/operations-projects.controller.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,qBAEa,4BAA4B;IAC3B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,iBAAiB;IAGjE,kBAAkB,CACR,IAAI,KAAA,EACH,gBAAgB,EAAE,+BAA+B;;;;;;;;;;;;;;;;;;;;IAS5D,YAAY,CAAS,IAAI,KAAA,EAAW,OAAO,EAAE,eAAe;;;;;;;;;IAK5D,eAAe,CAAS,IAAI,KAAA,EAA6B,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;IAKnE,UAAU,CAAS,IAAI,KAAA,EAA6B,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAK9D,aAAa,CAAS,IAAI,KAAA,EAAU,IAAI,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKxC,aAAa,CAAS,IAAI,KAAA,EAA6B,EAAE,EAAE,MAAM,EAAU,IAAI,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGhF"}
@@ -14,9 +14,9 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.OperationsProjectsController = void 0;
16
16
  const api_1 = require("@hed-hog/api");
17
- const api_pagination_1 = require("@hed-hog/api-pagination");
18
17
  const common_1 = require("@nestjs/common");
19
18
  const list_project_options_dto_1 = require("../dto/list-project-options.dto");
19
+ const list_projects_dto_1 = require("../dto/list-projects.dto");
20
20
  const operations_service_1 = require("../operations.service");
21
21
  let OperationsProjectsController = class OperationsProjectsController {
22
22
  constructor(operationsService) {
@@ -25,8 +25,11 @@ let OperationsProjectsController = class OperationsProjectsController {
25
25
  listProjectOptions(user, paginationParams) {
26
26
  return this.operationsService.listProjectOptions(Number((user === null || user === void 0 ? void 0 : user.id) || 0), paginationParams);
27
27
  }
28
- listProjects(user) {
29
- return this.operationsService.listProjects(Number((user === null || user === void 0 ? void 0 : user.id) || 0));
28
+ listProjects(user, filters) {
29
+ return this.operationsService.listProjects(Number((user === null || user === void 0 ? void 0 : user.id) || 0), filters);
30
+ }
31
+ getProjectStats(user, id) {
32
+ return this.operationsService.getProjectStats(Number((user === null || user === void 0 ? void 0 : user.id) || 0), id);
30
33
  }
31
34
  getProject(user, id) {
32
35
  return this.operationsService.getProjectById(Number((user === null || user === void 0 ? void 0 : user.id) || 0), id);
@@ -42,7 +45,7 @@ exports.OperationsProjectsController = OperationsProjectsController;
42
45
  __decorate([
43
46
  (0, common_1.Get)('projects/options'),
44
47
  __param(0, (0, api_1.User)()),
45
- __param(1, (0, api_pagination_1.Pagination)()),
48
+ __param(1, (0, common_1.Query)()),
46
49
  __metadata("design:type", Function),
47
50
  __metadata("design:paramtypes", [Object, list_project_options_dto_1.ListOperationsProjectOptionsDto]),
48
51
  __metadata("design:returntype", void 0)
@@ -50,10 +53,19 @@ __decorate([
50
53
  __decorate([
51
54
  (0, common_1.Get)('projects'),
52
55
  __param(0, (0, api_1.User)()),
56
+ __param(1, (0, common_1.Query)()),
53
57
  __metadata("design:type", Function),
54
- __metadata("design:paramtypes", [Object]),
58
+ __metadata("design:paramtypes", [Object, list_projects_dto_1.ListProjectsDto]),
55
59
  __metadata("design:returntype", void 0)
56
60
  ], OperationsProjectsController.prototype, "listProjects", null);
61
+ __decorate([
62
+ (0, common_1.Get)('projects/:id/stats'),
63
+ __param(0, (0, api_1.User)()),
64
+ __param(1, (0, common_1.Param)('id', common_1.ParseIntPipe)),
65
+ __metadata("design:type", Function),
66
+ __metadata("design:paramtypes", [Object, Number]),
67
+ __metadata("design:returntype", void 0)
68
+ ], OperationsProjectsController.prototype, "getProjectStats", null);
57
69
  __decorate([
58
70
  (0, common_1.Get)('projects/:id'),
59
71
  __param(0, (0, api_1.User)()),
@@ -1 +1 @@
1
- {"version":3,"file":"operations-projects.controller.js","sourceRoot":"","sources":["../../src/controllers/operations-projects.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAA0C;AAC1C,4DAAqD;AACrD,2CAQwB;AACxB,8EAAkF;AAClF,8DAA0D;AAInD,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IACvC,YAA6B,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAAG,CAAC;IAGrE,kBAAkB,CACR,IAAI,EACE,gBAAiD;QAE/D,OAAO,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,CAC9C,MAAM,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,KAAI,CAAC,CAAC,EACrB,gBAAgB,CACjB,CAAC;IACJ,CAAC;IAGD,YAAY,CAAS,IAAI;QACvB,OAAO,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,MAAM,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,KAAI,CAAC,CAAC,CAAC,CAAC;IACpE,CAAC;IAGD,UAAU,CAAS,IAAI,EAA6B,EAAU;QAC5D,OAAO,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,MAAM,CAAC,CAAA,IAAI,aAAJ,IAAI,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AEzE;uCAhCU,4BAA4B;IAFxC,IAAA,UAAI,GAAE;IACN,IAAA,mBAAU,EAAC,YAAY,CAAC;qCAEyB,sCAAiB;GADtD,4BAA4B,CAiCxC"}
1
+ {"version":3,"file":"operations-projects.controller.js","sourceRoot":"","sources":["../../src/controllers/operations-projects.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAA0C;AAC1C,2CASwB;AACxB,8EAAkF;AAClF,gEAA2D;AAC3D,8DAA0D;AAInD,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IACvC,YAA6B,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAAG,CAAC;IAGrE,kBAAkB,CACR,IAAI,EACH,gBAAiD;QAE1D,OAAO,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,CAC9C,MAAM,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,KAAI,CAAC,CAAC,EACrB,gBAAgB,CACjB,CAAC;IACJ,CAAC;IAGD,YAAY,CAAS,IAAI,EAAW,OAAwB;QAC1D,OAAO,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,MAAM,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,KAAI,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;IAGD,eAAe,CAAS,IAAI,EAA6B,EAAU;QACjE,OAAO,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC,MAAM,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,KAAI,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC3E,CAAC;IAGD,UAAU,CAAS,IAAI,EAA6B,EAAU;QAC5D,OAAO,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,MAAM,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,KAAI,CAAC,CAAC,EAAE,EAAE,CAAC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;IACP,WAAA,IAAA,UAAI,GAAE,CAAA;IAAQ,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;;;;iEAEzE;uCArCU,4BAA4B;IAFxC,IAAA,UAAI,GAAE;IACN,IAAA,mBAAU,EAAC,YAAY,CAAC;qCAEyB,sCAAiB;GADtD,4BAA4B,CAsCxC"}
@@ -1,12 +1,15 @@
1
1
  import { CreateScheduleAdjustmentRequestDto } from '../dto/create-schedule-adjustment-request.dto';
2
2
  import { CreateTimeOffRequestDto } from '../dto/create-time-off-request.dto';
3
3
  import { CreateTimesheetEntryDto } from '../dto/create-timesheet-entry.dto';
4
+ import { ListScheduleAdjustmentsDto } from '../dto/list-schedule-adjustments.dto';
5
+ import { ListTimeOffRequestsDto } from '../dto/list-time-off-requests.dto';
4
6
  import { ListTimesheetEntriesDto } from '../dto/list-timesheet-entries.dto';
7
+ import { ListTimesheetsDto } from '../dto/list-timesheets.dto';
5
8
  import { OperationsService } from '../operations.service';
6
9
  export declare class OperationsTimesheetsController {
7
10
  private readonly operationsService;
8
11
  constructor(operationsService: OperationsService);
9
- listTimesheets(user: any): Promise<{
12
+ listTimesheets(user: any, filters: ListTimesheetsDto): Promise<{
10
13
  id: number;
11
14
  collaboratorId: number;
12
15
  collaboratorName: string;
@@ -20,7 +23,15 @@ export declare class OperationsTimesheetsController {
20
23
  reviewedAt: string | null;
21
24
  notes: string | null;
22
25
  decisionNote: string | null;
23
- }[]>;
26
+ }[] | {
27
+ total: number;
28
+ lastPage: number;
29
+ page: number;
30
+ pageSize: number;
31
+ prev: number;
32
+ next: number;
33
+ data: any[];
34
+ }>;
24
35
  listTimesheetEntries(user: any, paginationParams: ListTimesheetEntriesDto): Promise<{
25
36
  total: number;
26
37
  lastPage: number;
@@ -98,9 +109,25 @@ export declare class OperationsTimesheetsController {
98
109
  createTimesheet(user: any, data: any): Promise<any>;
99
110
  updateTimesheet(user: any, id: number, data: any): Promise<any>;
100
111
  submitTimesheet(user: any, id: number): Promise<any>;
101
- listTimeOffRequests(user: any): Promise<Record<string, unknown>[]>;
112
+ listTimeOffRequests(user: any, filters: ListTimeOffRequestsDto): Promise<Record<string, unknown>[] | {
113
+ total: number;
114
+ lastPage: number;
115
+ page: number;
116
+ pageSize: number;
117
+ prev: number;
118
+ next: number;
119
+ data: Record<string, unknown>[];
120
+ }>;
102
121
  createTimeOffRequest(user: any, data: CreateTimeOffRequestDto): Promise<Record<string, unknown>>;
103
- listScheduleAdjustments(user: any): Promise<{
122
+ listScheduleAdjustments(user: any, filters: ListScheduleAdjustmentsDto): Promise<{
123
+ total: number;
124
+ lastPage: number;
125
+ page: number;
126
+ pageSize: number;
127
+ prev: number;
128
+ next: number;
129
+ data: any[];
130
+ } | {
104
131
  id: number;
105
132
  collaboratorId: number;
106
133
  collaboratorName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"operations-timesheets.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/operations-timesheets.controller.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,kCAAkC,EAAE,MAAM,+CAA+C,CAAC;AACnG,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,qBAEa,8BAA8B;IAC7B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,iBAAiB;IAGjE,cAAc,CAAS,IAAI,KAAA;;;;;;;;;;;;;;;IAK3B,oBAAoB,CACV,IAAI,KAAA,EACE,gBAAgB,EAAE,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASzD,oBAAoB,CAAS,IAAI,KAAA,EAAU,IAAI,EAAE,uBAAuB;;;;;;;;;;;;;;;;;;;;;IAQxE,oBAAoB,CACV,IAAI,KAAA,EACe,EAAE,EAAE,MAAM,EAC7B,IAAI,EAAE,uBAAuB;;;;;;;;;;;;;;;;;;;;;IAUvC,oBAAoB,CAAS,IAAI,KAAA,EAA6B,EAAE,EAAE,MAAM;;;IAKxE,eAAe,CAAS,IAAI,KAAA,EAAU,IAAI,KAAA;IAK1C,eAAe,CACL,IAAI,KAAA,EACe,EAAE,EAAE,MAAM,EAC7B,IAAI,KAAA;IAMd,eAAe,CAAS,IAAI,KAAA,EAA6B,EAAE,EAAE,MAAM;IAKnE,mBAAmB,CAAS,IAAI,KAAA;IAKhC,oBAAoB,CACV,IAAI,KAAA,EACJ,IAAI,EAAE,uBAAuB;IAMvC,uBAAuB,CAAS,IAAI,KAAA;;;;;;;;;;;;;;;IAKpC,+BAA+B,CACrB,IAAI,KAAA,EACJ,IAAI,EAAE,kCAAkC;CAOnD"}
1
+ {"version":3,"file":"operations-timesheets.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/operations-timesheets.controller.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,kCAAkC,EAAE,MAAM,+CAA+C,CAAC;AACnG,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,qBAEa,8BAA8B;IAC7B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,iBAAiB;IAGjE,cAAc,CAAS,IAAI,KAAA,EAAW,OAAO,EAA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