@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.
- package/dist/controllers/operations-approvals.controller.d.ts +114 -1
- package/dist/controllers/operations-approvals.controller.d.ts.map +1 -1
- package/dist/controllers/operations-approvals.controller.js +16 -3
- package/dist/controllers/operations-approvals.controller.js.map +1 -1
- package/dist/controllers/operations-collaborators.controller.d.ts +16 -1
- package/dist/controllers/operations-collaborators.controller.d.ts.map +1 -1
- package/dist/controllers/operations-collaborators.controller.js +16 -3
- package/dist/controllers/operations-collaborators.controller.js.map +1 -1
- package/dist/controllers/operations-contracts.controller.d.ts +14 -453
- package/dist/controllers/operations-contracts.controller.d.ts.map +1 -1
- package/dist/controllers/operations-contracts.controller.js +11 -112
- package/dist/controllers/operations-contracts.controller.js.map +1 -1
- package/dist/controllers/operations-org-structure.controller.d.ts +65 -2
- package/dist/controllers/operations-org-structure.controller.d.ts.map +1 -1
- package/dist/controllers/operations-org-structure.controller.js +18 -5
- package/dist/controllers/operations-org-structure.controller.js.map +1 -1
- package/dist/controllers/operations-projects.controller.d.ts +28 -4
- package/dist/controllers/operations-projects.controller.d.ts.map +1 -1
- package/dist/controllers/operations-projects.controller.js +17 -5
- package/dist/controllers/operations-projects.controller.js.map +1 -1
- package/dist/controllers/operations-timesheets.controller.d.ts +31 -4
- package/dist/controllers/operations-timesheets.controller.d.ts.map +1 -1
- package/dist/controllers/operations-timesheets.controller.js +16 -11
- package/dist/controllers/operations-timesheets.controller.js.map +1 -1
- package/dist/dto/list-approvals.dto.d.ts +6 -0
- package/dist/dto/list-approvals.dto.d.ts.map +1 -0
- package/dist/dto/list-approvals.dto.js +28 -0
- package/dist/dto/list-approvals.dto.js.map +1 -0
- package/dist/dto/list-collaborator-types.dto.d.ts +3 -1
- package/dist/dto/list-collaborator-types.dto.d.ts.map +1 -1
- package/dist/dto/list-collaborator-types.dto.js +7 -1
- package/dist/dto/list-collaborator-types.dto.js.map +1 -1
- package/dist/dto/list-collaborators.dto.d.ts +1 -0
- package/dist/dto/list-collaborators.dto.d.ts.map +1 -1
- package/dist/dto/list-collaborators.dto.js +5 -0
- package/dist/dto/list-collaborators.dto.js.map +1 -1
- package/dist/dto/list-contracts.dto.d.ts +8 -0
- package/dist/dto/list-contracts.dto.d.ts.map +1 -0
- package/dist/dto/list-contracts.dto.js +38 -0
- package/dist/dto/list-contracts.dto.js.map +1 -0
- package/dist/dto/list-departments.dto.d.ts +5 -0
- package/dist/dto/list-departments.dto.d.ts.map +1 -0
- package/dist/dto/list-departments.dto.js +23 -0
- package/dist/dto/list-departments.dto.js.map +1 -0
- package/dist/dto/list-projects.dto.d.ts +5 -0
- package/dist/dto/list-projects.dto.d.ts.map +1 -0
- package/dist/dto/list-projects.dto.js +23 -0
- package/dist/dto/list-projects.dto.js.map +1 -0
- package/dist/dto/list-schedule-adjustments.dto.d.ts +5 -0
- package/dist/dto/list-schedule-adjustments.dto.d.ts.map +1 -0
- package/dist/dto/list-schedule-adjustments.dto.js +23 -0
- package/dist/dto/list-schedule-adjustments.dto.js.map +1 -0
- package/dist/dto/list-time-off-requests.dto.d.ts +5 -0
- package/dist/dto/list-time-off-requests.dto.d.ts.map +1 -0
- package/dist/dto/list-time-off-requests.dto.js +23 -0
- package/dist/dto/list-time-off-requests.dto.js.map +1 -0
- package/dist/dto/list-timesheets.dto.d.ts +5 -0
- package/dist/dto/list-timesheets.dto.d.ts.map +1 -0
- package/dist/dto/list-timesheets.dto.js +23 -0
- package/dist/dto/list-timesheets.dto.js.map +1 -0
- package/dist/dto/reorder-collaborator-types.dto.d.ts +4 -0
- package/dist/dto/reorder-collaborator-types.dto.d.ts.map +1 -0
- package/dist/dto/reorder-collaborator-types.dto.js +25 -0
- package/dist/dto/reorder-collaborator-types.dto.js.map +1 -0
- package/dist/operations.service.d.ts +340 -271
- package/dist/operations.service.d.ts.map +1 -1
- package/dist/operations.service.js +1007 -1043
- package/dist/operations.service.js.map +1 -1
- package/dist/operations.service.spec.js +0 -22
- package/dist/operations.service.spec.js.map +1 -1
- package/hedhog/data/menu.yaml +0 -36
- package/hedhog/data/route.yaml +42 -73
- package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +8 -1
- package/hedhog/frontend/app/_components/collaborator-select-with-create.tsx.ejs +15 -10
- package/hedhog/frontend/app/_components/contract-details-screen.tsx.ejs +108 -213
- package/hedhog/frontend/app/_components/contract-form-screen.tsx.ejs +251 -2039
- package/hedhog/frontend/app/_components/project-details-screen.tsx.ejs +167 -60
- package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +70 -301
- package/hedhog/frontend/app/_components/system-user-select-with-create.tsx.ejs +102 -51
- package/hedhog/frontend/app/_lib/types.ts.ejs +19 -24
- package/hedhog/frontend/app/_lib/utils/format.ts.ejs +14 -9
- package/hedhog/frontend/app/approvals/page.tsx.ejs +842 -150
- package/hedhog/frontend/app/collaborator-types/page.tsx.ejs +445 -153
- package/hedhog/frontend/app/collaborators/page.tsx.ejs +118 -49
- package/hedhog/frontend/app/contracts/[id]/page.tsx.ejs +2 -2
- package/hedhog/frontend/app/contracts/page.tsx.ejs +215 -617
- package/hedhog/frontend/app/departments/page.tsx.ejs +257 -113
- package/hedhog/frontend/app/projects/page.tsx.ejs +90 -51
- package/hedhog/frontend/app/schedule-adjustments/page.tsx.ejs +412 -147
- package/hedhog/frontend/app/time-off/page.tsx.ejs +400 -123
- package/hedhog/frontend/app/timesheets/page.tsx.ejs +460 -365
- package/hedhog/frontend/messages/en.json +143 -14
- package/hedhog/frontend/messages/pt.json +192 -54
- package/hedhog/table/operations_contract.yaml +0 -9
- package/package.json +4 -4
- package/src/controllers/operations-approvals.controller.ts +9 -3
- package/src/controllers/operations-collaborators.controller.ts +15 -2
- package/src/controllers/operations-contracts.controller.ts +8 -92
- package/src/controllers/operations-org-structure.controller.ts +17 -4
- package/src/controllers/operations-projects.controller.ts +10 -4
- package/src/controllers/operations-timesheets.controller.ts +17 -8
- package/src/dto/list-approvals.dto.ts +12 -0
- package/src/dto/list-collaborator-types.dto.ts +7 -2
- package/src/dto/list-collaborators.dto.ts +4 -0
- package/src/dto/list-contracts.dto.ts +20 -0
- package/src/dto/list-departments.dto.ts +8 -0
- package/src/dto/list-projects.dto.ts +8 -0
- package/src/dto/list-schedule-adjustments.dto.ts +8 -0
- package/src/dto/list-time-off-requests.dto.ts +8 -0
- package/src/dto/list-timesheets.dto.ts +8 -0
- package/src/dto/reorder-collaborator-types.dto.ts +10 -0
- package/src/operations.service.spec.ts +0 -30
- package/src/operations.service.ts +1557 -1806
- package/hedhog/frontend/app/_components/contract-creation-wizard.tsx.ejs +0 -631
- package/hedhog/frontend/app/_components/contract-template-form-screen.tsx.ejs +0 -526
- package/hedhog/frontend/app/_components/contract-template-select-with-create.tsx.ejs +0 -247
- package/hedhog/frontend/app/_components/contract-wizard-sheet.tsx.ejs +0 -3520
- package/hedhog/frontend/app/contracts/templates/page.tsx.ejs +0 -380
- package/hedhog/frontend/app/team/page.tsx.ejs +0 -352
- package/hedhog/table/operations_contract_financial_term.yaml +0 -40
- package/hedhog/table/operations_contract_revision.yaml +0 -38
- package/hedhog/table/operations_contract_signature.yaml +0 -38
- package/hedhog/table/operations_contract_template.yaml +0 -58
|
@@ -7,8 +7,10 @@ import {
|
|
|
7
7
|
ParseIntPipe,
|
|
8
8
|
Patch,
|
|
9
9
|
Post,
|
|
10
|
+
Query,
|
|
10
11
|
} from '@nestjs/common';
|
|
11
12
|
import { CreateCollaboratorDto } from '../dto/create-collaborator.dto';
|
|
13
|
+
import { ListCollaboratorsDto } from '../dto/list-collaborators.dto';
|
|
12
14
|
import { UpdateCollaboratorDto } from '../dto/update-collaborator.dto';
|
|
13
15
|
import { OperationsService } from '../operations.service';
|
|
14
16
|
|
|
@@ -18,8 +20,19 @@ export class OperationsCollaboratorsController {
|
|
|
18
20
|
constructor(private readonly operationsService: OperationsService) {}
|
|
19
21
|
|
|
20
22
|
@Get('collaborators')
|
|
21
|
-
listCollaborators(@User() user) {
|
|
22
|
-
return this.operationsService.listCollaborators(
|
|
23
|
+
listCollaborators(@User() user, @Query() filters: ListCollaboratorsDto) {
|
|
24
|
+
return this.operationsService.listCollaborators(
|
|
25
|
+
Number(user?.id || 0),
|
|
26
|
+
filters,
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@Get('collaborators/stats')
|
|
31
|
+
listCollaboratorStats(@User() user, @Query() filters: ListCollaboratorsDto) {
|
|
32
|
+
return this.operationsService.getCollaboratorStats(
|
|
33
|
+
Number(user?.id || 0),
|
|
34
|
+
filters,
|
|
35
|
+
);
|
|
23
36
|
}
|
|
24
37
|
|
|
25
38
|
@Get('collaborators/me')
|
|
@@ -8,7 +8,9 @@ import {
|
|
|
8
8
|
ParseIntPipe,
|
|
9
9
|
Patch,
|
|
10
10
|
Post,
|
|
11
|
+
Query,
|
|
11
12
|
} from '@nestjs/common';
|
|
13
|
+
import { ListContractsDto } from '../dto/list-contracts.dto';
|
|
12
14
|
import { OperationsService } from '../operations.service';
|
|
13
15
|
|
|
14
16
|
@Role()
|
|
@@ -16,43 +18,14 @@ import { OperationsService } from '../operations.service';
|
|
|
16
18
|
export class OperationsContractsController {
|
|
17
19
|
constructor(private readonly operationsService: OperationsService) {}
|
|
18
20
|
|
|
19
|
-
@Get('
|
|
20
|
-
|
|
21
|
-
return this.operationsService.
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@Get('contract-templates/:id')
|
|
25
|
-
getContractTemplate(@User() user, @Param('id', ParseIntPipe) id: number) {
|
|
26
|
-
return this.operationsService.getContractTemplateById(
|
|
27
|
-
Number(user?.id || 0),
|
|
28
|
-
id,
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@Post('contract-templates')
|
|
33
|
-
createContractTemplate(@User() user, @Body() data) {
|
|
34
|
-
return this.operationsService.createContractTemplate(
|
|
35
|
-
Number(user?.id || 0),
|
|
36
|
-
data,
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
@Patch('contract-templates/:id')
|
|
41
|
-
updateContractTemplate(
|
|
42
|
-
@User() user,
|
|
43
|
-
@Param('id', ParseIntPipe) id: number,
|
|
44
|
-
@Body() data,
|
|
45
|
-
) {
|
|
46
|
-
return this.operationsService.updateContractTemplate(
|
|
47
|
-
Number(user?.id || 0),
|
|
48
|
-
id,
|
|
49
|
-
data,
|
|
50
|
-
);
|
|
21
|
+
@Get('contracts')
|
|
22
|
+
listContracts(@User() user, @Query() filters: ListContractsDto) {
|
|
23
|
+
return this.operationsService.listContracts(Number(user?.id || 0), filters);
|
|
51
24
|
}
|
|
52
25
|
|
|
53
|
-
@Get('contracts')
|
|
54
|
-
|
|
55
|
-
return this.operationsService.
|
|
26
|
+
@Get('contracts/stats')
|
|
27
|
+
getContractStats(@User() user) {
|
|
28
|
+
return this.operationsService.getContractStats(Number(user?.id || 0));
|
|
56
29
|
}
|
|
57
30
|
|
|
58
31
|
@Get('contracts/:id')
|
|
@@ -60,63 +33,11 @@ export class OperationsContractsController {
|
|
|
60
33
|
return this.operationsService.getContractById(Number(user?.id || 0), id);
|
|
61
34
|
}
|
|
62
35
|
|
|
63
|
-
@Post('contracts/drafts')
|
|
64
|
-
createContractDraft(@User() user, @Body() data) {
|
|
65
|
-
return this.operationsService.createContractDraft(Number(user?.id || 0), data);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
36
|
@Post('contracts')
|
|
69
37
|
createContract(@User() user, @Body() data) {
|
|
70
38
|
return this.operationsService.createContract(Number(user?.id || 0), data);
|
|
71
39
|
}
|
|
72
40
|
|
|
73
|
-
@Post('contracts/extract-draft')
|
|
74
|
-
extractContractDraft(@User() user, @Body() data) {
|
|
75
|
-
return this.operationsService.extractContractDraft(
|
|
76
|
-
Number(user?.id || 0),
|
|
77
|
-
data,
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
@Post('contracts/:id/extract-source')
|
|
82
|
-
extractContractSource(
|
|
83
|
-
@User() user,
|
|
84
|
-
@Param('id', ParseIntPipe) id: number,
|
|
85
|
-
@Body() data,
|
|
86
|
-
) {
|
|
87
|
-
return this.operationsService.extractContractSource(
|
|
88
|
-
Number(user?.id || 0),
|
|
89
|
-
id,
|
|
90
|
-
data,
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
@Post('contracts/:id/generate-content')
|
|
95
|
-
generateContractContent(
|
|
96
|
-
@User() user,
|
|
97
|
-
@Param('id', ParseIntPipe) id: number,
|
|
98
|
-
@Body() data,
|
|
99
|
-
) {
|
|
100
|
-
return this.operationsService.generateContractContent(
|
|
101
|
-
Number(user?.id || 0),
|
|
102
|
-
id,
|
|
103
|
-
data,
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
@Post('contracts/:id/legal-review')
|
|
108
|
-
reviewContractLegally(
|
|
109
|
-
@User() user,
|
|
110
|
-
@Param('id', ParseIntPipe) id: number,
|
|
111
|
-
@Body() data,
|
|
112
|
-
) {
|
|
113
|
-
return this.operationsService.reviewContractLegally(
|
|
114
|
-
Number(user?.id || 0),
|
|
115
|
-
id,
|
|
116
|
-
data,
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
41
|
@Patch('contracts/:id')
|
|
121
42
|
updateContract(
|
|
122
43
|
@User() user,
|
|
@@ -130,9 +51,4 @@ export class OperationsContractsController {
|
|
|
130
51
|
removeContract(@User() user, @Param('id', ParseIntPipe) id: number) {
|
|
131
52
|
return this.operationsService.removeContract(Number(user?.id || 0), id);
|
|
132
53
|
}
|
|
133
|
-
|
|
134
|
-
@Post('contracts/:id/generate-pdf')
|
|
135
|
-
generateContractPdf(@User() user, @Param('id', ParseIntPipe) id: number) {
|
|
136
|
-
return this.operationsService.generateContractPdf(Number(user?.id || 0), id);
|
|
137
|
-
}
|
|
138
54
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Role, User } from '@hed-hog/api';
|
|
2
|
-
import { Pagination } from '@hed-hog/api-pagination';
|
|
3
2
|
import {
|
|
4
3
|
Body,
|
|
5
4
|
Controller,
|
|
@@ -8,9 +7,12 @@ import {
|
|
|
8
7
|
ParseIntPipe,
|
|
9
8
|
Patch,
|
|
10
9
|
Post,
|
|
10
|
+
Query,
|
|
11
11
|
} from '@nestjs/common';
|
|
12
12
|
import { CreateCollaboratorTypeDto } from '../dto/create-collaborator-type.dto';
|
|
13
13
|
import { ListCollaboratorTypesDto } from '../dto/list-collaborator-types.dto';
|
|
14
|
+
import { ListDepartmentsDto } from '../dto/list-departments.dto';
|
|
15
|
+
import { ReorderCollaboratorTypesDto } from '../dto/reorder-collaborator-types.dto';
|
|
14
16
|
import { UpdateCollaboratorTypeDto } from '../dto/update-collaborator-type.dto';
|
|
15
17
|
import { OperationsService } from '../operations.service';
|
|
16
18
|
|
|
@@ -22,7 +24,7 @@ export class OperationsOrgStructureController {
|
|
|
22
24
|
@Get('collaborator-types')
|
|
23
25
|
listCollaboratorTypes(
|
|
24
26
|
@User() user,
|
|
25
|
-
@
|
|
27
|
+
@Query() filters: ListCollaboratorTypesDto,
|
|
26
28
|
) {
|
|
27
29
|
return this.operationsService.listCollaboratorTypes(
|
|
28
30
|
Number(user?.id || 0),
|
|
@@ -38,6 +40,17 @@ export class OperationsOrgStructureController {
|
|
|
38
40
|
);
|
|
39
41
|
}
|
|
40
42
|
|
|
43
|
+
@Patch('collaborator-types/reorder')
|
|
44
|
+
reorderCollaboratorTypes(
|
|
45
|
+
@User() user,
|
|
46
|
+
@Body() data: ReorderCollaboratorTypesDto,
|
|
47
|
+
) {
|
|
48
|
+
return this.operationsService.reorderCollaboratorTypes(
|
|
49
|
+
Number(user?.id || 0),
|
|
50
|
+
data.ids,
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
41
54
|
@Patch('collaborator-types/:id')
|
|
42
55
|
updateCollaboratorType(
|
|
43
56
|
@User() user,
|
|
@@ -62,8 +75,8 @@ export class OperationsOrgStructureController {
|
|
|
62
75
|
}
|
|
63
76
|
|
|
64
77
|
@Get('departments')
|
|
65
|
-
listDepartments(@User() user) {
|
|
66
|
-
return this.operationsService.listDepartments(Number(user?.id || 0));
|
|
78
|
+
listDepartments(@User() user, @Query() filters: ListDepartmentsDto) {
|
|
79
|
+
return this.operationsService.listDepartments(Number(user?.id || 0), filters);
|
|
67
80
|
}
|
|
68
81
|
|
|
69
82
|
@Post('departments')
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Role, User } from '@hed-hog/api';
|
|
2
|
-
import { Pagination } from '@hed-hog/api-pagination';
|
|
3
2
|
import {
|
|
4
3
|
Body,
|
|
5
4
|
Controller,
|
|
@@ -8,8 +7,10 @@ import {
|
|
|
8
7
|
ParseIntPipe,
|
|
9
8
|
Patch,
|
|
10
9
|
Post,
|
|
10
|
+
Query,
|
|
11
11
|
} from '@nestjs/common';
|
|
12
12
|
import { ListOperationsProjectOptionsDto } from '../dto/list-project-options.dto';
|
|
13
|
+
import { ListProjectsDto } from '../dto/list-projects.dto';
|
|
13
14
|
import { OperationsService } from '../operations.service';
|
|
14
15
|
|
|
15
16
|
@Role()
|
|
@@ -20,7 +21,7 @@ export class OperationsProjectsController {
|
|
|
20
21
|
@Get('projects/options')
|
|
21
22
|
listProjectOptions(
|
|
22
23
|
@User() user,
|
|
23
|
-
@
|
|
24
|
+
@Query() paginationParams: ListOperationsProjectOptionsDto,
|
|
24
25
|
) {
|
|
25
26
|
return this.operationsService.listProjectOptions(
|
|
26
27
|
Number(user?.id || 0),
|
|
@@ -29,8 +30,13 @@ export class OperationsProjectsController {
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
@Get('projects')
|
|
32
|
-
listProjects(@User() user) {
|
|
33
|
-
return this.operationsService.listProjects(Number(user?.id || 0));
|
|
33
|
+
listProjects(@User() user, @Query() filters: ListProjectsDto) {
|
|
34
|
+
return this.operationsService.listProjects(Number(user?.id || 0), filters);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@Get('projects/:id/stats')
|
|
38
|
+
getProjectStats(@User() user, @Param('id', ParseIntPipe) id: number) {
|
|
39
|
+
return this.operationsService.getProjectStats(Number(user?.id || 0), id);
|
|
34
40
|
}
|
|
35
41
|
|
|
36
42
|
@Get('projects/:id')
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Role, User } from '@hed-hog/api';
|
|
2
|
-
import { Pagination } from '@hed-hog/api-pagination';
|
|
3
2
|
import {
|
|
4
3
|
Body,
|
|
5
4
|
Controller,
|
|
@@ -9,11 +8,15 @@ import {
|
|
|
9
8
|
ParseIntPipe,
|
|
10
9
|
Patch,
|
|
11
10
|
Post,
|
|
11
|
+
Query,
|
|
12
12
|
} from '@nestjs/common';
|
|
13
13
|
import { CreateScheduleAdjustmentRequestDto } from '../dto/create-schedule-adjustment-request.dto';
|
|
14
14
|
import { CreateTimeOffRequestDto } from '../dto/create-time-off-request.dto';
|
|
15
15
|
import { CreateTimesheetEntryDto } from '../dto/create-timesheet-entry.dto';
|
|
16
|
+
import { ListScheduleAdjustmentsDto } from '../dto/list-schedule-adjustments.dto';
|
|
17
|
+
import { ListTimeOffRequestsDto } from '../dto/list-time-off-requests.dto';
|
|
16
18
|
import { ListTimesheetEntriesDto } from '../dto/list-timesheet-entries.dto';
|
|
19
|
+
import { ListTimesheetsDto } from '../dto/list-timesheets.dto';
|
|
17
20
|
import { OperationsService } from '../operations.service';
|
|
18
21
|
|
|
19
22
|
@Role()
|
|
@@ -22,14 +25,14 @@ export class OperationsTimesheetsController {
|
|
|
22
25
|
constructor(private readonly operationsService: OperationsService) {}
|
|
23
26
|
|
|
24
27
|
@Get('timesheets')
|
|
25
|
-
listTimesheets(@User() user) {
|
|
26
|
-
return this.operationsService.listTimesheets(Number(user?.id || 0));
|
|
28
|
+
listTimesheets(@User() user, @Query() filters: ListTimesheetsDto) {
|
|
29
|
+
return this.operationsService.listTimesheets(Number(user?.id || 0), filters);
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
@Get('timesheet-entries')
|
|
30
33
|
listTimesheetEntries(
|
|
31
34
|
@User() user,
|
|
32
|
-
@
|
|
35
|
+
@Query() paginationParams: ListTimesheetEntriesDto,
|
|
33
36
|
) {
|
|
34
37
|
return this.operationsService.listTimesheetEntries(
|
|
35
38
|
Number(user?.id || 0),
|
|
@@ -83,8 +86,8 @@ export class OperationsTimesheetsController {
|
|
|
83
86
|
}
|
|
84
87
|
|
|
85
88
|
@Get('time-off')
|
|
86
|
-
listTimeOffRequests(@User() user) {
|
|
87
|
-
return this.operationsService.listTimeOffRequests(Number(user?.id || 0));
|
|
89
|
+
listTimeOffRequests(@User() user, @Query() filters: ListTimeOffRequestsDto) {
|
|
90
|
+
return this.operationsService.listTimeOffRequests(Number(user?.id || 0), filters);
|
|
88
91
|
}
|
|
89
92
|
|
|
90
93
|
@Post('time-off')
|
|
@@ -96,8 +99,14 @@ export class OperationsTimesheetsController {
|
|
|
96
99
|
}
|
|
97
100
|
|
|
98
101
|
@Get('schedule-adjustments')
|
|
99
|
-
listScheduleAdjustments(
|
|
100
|
-
|
|
102
|
+
listScheduleAdjustments(
|
|
103
|
+
@User() user,
|
|
104
|
+
@Query() filters: ListScheduleAdjustmentsDto,
|
|
105
|
+
) {
|
|
106
|
+
return this.operationsService.listScheduleAdjustments(
|
|
107
|
+
Number(user?.id || 0),
|
|
108
|
+
filters,
|
|
109
|
+
);
|
|
101
110
|
}
|
|
102
111
|
|
|
103
112
|
@Post('schedule-adjustments')
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PaginationDTO } from '@hed-hog/api-pagination';
|
|
2
|
+
import { IsOptional, IsString } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
export class ListApprovalsDto extends PaginationDTO {
|
|
5
|
+
@IsOptional()
|
|
6
|
+
@IsString()
|
|
7
|
+
status?: string;
|
|
8
|
+
|
|
9
|
+
@IsOptional()
|
|
10
|
+
@IsString()
|
|
11
|
+
targetType?: string;
|
|
12
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { PaginationDTO } from '@hed-hog/api-pagination';
|
|
1
2
|
import { Transform } from 'class-transformer';
|
|
2
|
-
import { IsBoolean, IsOptional } from 'class-validator';
|
|
3
|
+
import { IsBoolean, IsOptional, IsString } from 'class-validator';
|
|
3
4
|
|
|
4
|
-
export class ListCollaboratorTypesDto {
|
|
5
|
+
export class ListCollaboratorTypesDto extends PaginationDTO {
|
|
5
6
|
@IsOptional()
|
|
6
7
|
@Transform(({ value }) => {
|
|
7
8
|
if (value === '' || value === undefined || value === null) {
|
|
@@ -12,4 +13,8 @@ export class ListCollaboratorTypesDto {
|
|
|
12
13
|
})
|
|
13
14
|
@IsBoolean()
|
|
14
15
|
active?: boolean;
|
|
16
|
+
|
|
17
|
+
@IsOptional()
|
|
18
|
+
@IsString()
|
|
19
|
+
status?: string;
|
|
15
20
|
}
|
|
@@ -7,6 +7,10 @@ export class ListCollaboratorsDto extends PaginationDTO {
|
|
|
7
7
|
@IsString()
|
|
8
8
|
status?: string;
|
|
9
9
|
|
|
10
|
+
@IsOptional()
|
|
11
|
+
@IsString()
|
|
12
|
+
collaboratorType?: string;
|
|
13
|
+
|
|
10
14
|
@IsOptional()
|
|
11
15
|
@Transform(({ value }) =>
|
|
12
16
|
value === '' || value === undefined || value === null ? undefined : Number(value)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PaginationDTO } from '@hed-hog/api-pagination';
|
|
2
|
+
import { IsBooleanString, IsOptional, IsString } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
export class ListContractsDto extends PaginationDTO {
|
|
5
|
+
@IsOptional()
|
|
6
|
+
@IsString()
|
|
7
|
+
status?: string;
|
|
8
|
+
|
|
9
|
+
@IsOptional()
|
|
10
|
+
@IsString()
|
|
11
|
+
contractCategory?: string;
|
|
12
|
+
|
|
13
|
+
@IsOptional()
|
|
14
|
+
@IsString()
|
|
15
|
+
originType?: string;
|
|
16
|
+
|
|
17
|
+
@IsOptional()
|
|
18
|
+
@IsBooleanString()
|
|
19
|
+
isActive?: string;
|
|
20
|
+
}
|
|
@@ -29,10 +29,6 @@ describe('OperationsService proposal integration', () => {
|
|
|
29
29
|
|
|
30
30
|
jest.spyOn(service as any, 'generateContractCode').mockResolvedValue('CTR-001');
|
|
31
31
|
jest.spyOn(service as any, 'replaceContractParties').mockResolvedValue(undefined);
|
|
32
|
-
jest
|
|
33
|
-
.spyOn(service as any, 'replaceContractFinancialTerms')
|
|
34
|
-
.mockResolvedValue(undefined);
|
|
35
|
-
jest.spyOn(service as any, 'replaceContractRevisions').mockResolvedValue(undefined);
|
|
36
32
|
jest.spyOn(service as any, 'insertContractHistory').mockResolvedValue(undefined);
|
|
37
33
|
});
|
|
38
34
|
|
|
@@ -156,32 +152,6 @@ describe('OperationsService proposal integration', () => {
|
|
|
156
152
|
}),
|
|
157
153
|
],
|
|
158
154
|
);
|
|
159
|
-
expect((service as any).replaceContractFinancialTerms).toHaveBeenCalledWith(
|
|
160
|
-
tx,
|
|
161
|
-
77,
|
|
162
|
-
expect.arrayContaining([
|
|
163
|
-
expect.objectContaining({
|
|
164
|
-
label: 'Monthly retainer',
|
|
165
|
-
amount: 1000,
|
|
166
|
-
recurrence: 'monthly',
|
|
167
|
-
}),
|
|
168
|
-
expect.objectContaining({
|
|
169
|
-
label: 'Setup fee',
|
|
170
|
-
amount: 234,
|
|
171
|
-
recurrence: 'one_time',
|
|
172
|
-
}),
|
|
173
|
-
]),
|
|
174
|
-
);
|
|
175
|
-
expect((service as any).replaceContractRevisions).toHaveBeenCalledWith(
|
|
176
|
-
tx,
|
|
177
|
-
77,
|
|
178
|
-
[
|
|
179
|
-
expect.objectContaining({
|
|
180
|
-
title: 'Revision 1',
|
|
181
|
-
status: 'draft',
|
|
182
|
-
}),
|
|
183
|
-
],
|
|
184
|
-
);
|
|
185
155
|
expect((service as any).insertContractHistory).toHaveBeenCalledWith(
|
|
186
156
|
tx,
|
|
187
157
|
77,
|