@hed-hog/operations 0.0.299 → 0.0.300
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/operations.service.js +1193 -1193
- package/hedhog/data/menu.yaml +198 -198
- package/hedhog/data/role.yaml +23 -23
- package/hedhog/data/route.yaml +317 -317
- package/hedhog/table/operations_approval.yaml +49 -49
- package/hedhog/table/operations_approval_history.yaml +29 -29
- package/hedhog/table/operations_collaborator.yaml +67 -67
- package/hedhog/table/operations_collaborator_schedule_day.yaml +34 -34
- package/hedhog/table/operations_contract.yaml +100 -100
- package/hedhog/table/operations_contract_document.yaml +39 -39
- package/hedhog/table/operations_contract_financial_term.yaml +40 -40
- package/hedhog/table/operations_contract_history.yaml +27 -27
- package/hedhog/table/operations_contract_party.yaml +46 -46
- package/hedhog/table/operations_contract_revision.yaml +38 -38
- package/hedhog/table/operations_contract_signature.yaml +38 -38
- package/hedhog/table/operations_project.yaml +54 -54
- package/hedhog/table/operations_project_assignment.yaml +55 -55
- package/hedhog/table/operations_schedule_adjustment_day.yaml +34 -34
- package/hedhog/table/operations_schedule_adjustment_request.yaml +53 -53
- package/hedhog/table/operations_time_off_request.yaml +57 -57
- package/hedhog/table/operations_timesheet.yaml +41 -41
- package/hedhog/table/operations_timesheet_entry.yaml +40 -40
- package/package.json +4 -4
- package/src/operations.controller.ts +182 -182
- package/src/operations.module.ts +22 -22
- package/src/operations.service.ts +3595 -3595
- package/dist/operations-data.controller.d.ts +0 -139
- package/dist/operations-data.controller.d.ts.map +0 -1
- package/dist/operations-data.controller.js +0 -113
- package/dist/operations-data.controller.js.map +0 -1
- package/dist/operations-growth.controller.d.ts +0 -48
- package/dist/operations-growth.controller.d.ts.map +0 -1
- package/dist/operations-growth.controller.js +0 -90
- package/dist/operations-growth.controller.js.map +0 -1
|
@@ -1,182 +1,182 @@
|
|
|
1
|
-
import { Role, User } from '@hed-hog/api';
|
|
2
|
-
import {
|
|
3
|
-
Body,
|
|
4
|
-
Controller,
|
|
5
|
-
Get,
|
|
6
|
-
Param,
|
|
7
|
-
ParseIntPipe,
|
|
8
|
-
Patch,
|
|
9
|
-
Post,
|
|
10
|
-
} from '@nestjs/common';
|
|
11
|
-
import { OperationsService } from './operations.service';
|
|
12
|
-
|
|
13
|
-
@Role()
|
|
14
|
-
@Controller('operations')
|
|
15
|
-
export class OperationsController {
|
|
16
|
-
constructor(private readonly operationsService: OperationsService) {}
|
|
17
|
-
|
|
18
|
-
@Get('dashboard')
|
|
19
|
-
getDashboard(@User() user) {
|
|
20
|
-
return this.operationsService.getDashboard(Number(user?.id || 0));
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
@Get('collaborators')
|
|
24
|
-
listCollaborators(@User() user) {
|
|
25
|
-
return this.operationsService.listCollaborators(Number(user?.id || 0));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@Get('collaborators/me')
|
|
29
|
-
getMyCollaborator(@User() user) {
|
|
30
|
-
return this.operationsService.getMyCollaborator(Number(user?.id || 0));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@Get('collaborators/:id')
|
|
34
|
-
getCollaborator(@User() user, @Param('id', ParseIntPipe) id: number) {
|
|
35
|
-
return this.operationsService.getCollaboratorByIdForUser(
|
|
36
|
-
Number(user?.id || 0),
|
|
37
|
-
id
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@Get('collaborators/team')
|
|
42
|
-
getTeam(@User() user) {
|
|
43
|
-
return this.operationsService.getTeam(Number(user?.id || 0));
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
@Post('collaborators')
|
|
47
|
-
createCollaborator(@User() user, @Body() data) {
|
|
48
|
-
return this.operationsService.createCollaborator(Number(user?.id || 0), data);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
@Patch('collaborators/:id')
|
|
52
|
-
updateCollaborator(
|
|
53
|
-
@User() user,
|
|
54
|
-
@Param('id', ParseIntPipe) id: number,
|
|
55
|
-
@Body() data
|
|
56
|
-
) {
|
|
57
|
-
return this.operationsService.updateCollaborator(
|
|
58
|
-
Number(user?.id || 0),
|
|
59
|
-
id,
|
|
60
|
-
data
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
@Get('projects')
|
|
65
|
-
listProjects(@User() user) {
|
|
66
|
-
return this.operationsService.listProjects(Number(user?.id || 0));
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
@Get('projects/:id')
|
|
70
|
-
getProject(@User() user, @Param('id', ParseIntPipe) id: number) {
|
|
71
|
-
return this.operationsService.getProjectById(Number(user?.id || 0), id);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
@Post('projects')
|
|
75
|
-
createProject(@User() user, @Body() data) {
|
|
76
|
-
return this.operationsService.createProject(Number(user?.id || 0), data);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
@Patch('projects/:id')
|
|
80
|
-
updateProject(@User() user, @Param('id', ParseIntPipe) id: number, @Body() data) {
|
|
81
|
-
return this.operationsService.updateProject(Number(user?.id || 0), id, data);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
@Get('contracts')
|
|
85
|
-
listContracts(@User() user) {
|
|
86
|
-
return this.operationsService.listContracts(Number(user?.id || 0));
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
@Get('contracts/:id')
|
|
90
|
-
getContract(@User() user, @Param('id', ParseIntPipe) id: number) {
|
|
91
|
-
return this.operationsService.getContractById(Number(user?.id || 0), id);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
@Post('contracts')
|
|
95
|
-
createContract(@User() user, @Body() data) {
|
|
96
|
-
return this.operationsService.createContract(Number(user?.id || 0), data);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
@Patch('contracts/:id')
|
|
100
|
-
updateContract(
|
|
101
|
-
@User() user,
|
|
102
|
-
@Param('id', ParseIntPipe) id: number,
|
|
103
|
-
@Body() data
|
|
104
|
-
) {
|
|
105
|
-
return this.operationsService.updateContract(Number(user?.id || 0), id, data);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
@Get('timesheets')
|
|
109
|
-
listTimesheets(@User() user) {
|
|
110
|
-
return this.operationsService.listTimesheets(Number(user?.id || 0));
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
@Post('timesheets')
|
|
114
|
-
createTimesheet(@User() user, @Body() data) {
|
|
115
|
-
return this.operationsService.createTimesheet(Number(user?.id || 0), data);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
@Patch('timesheets/:id')
|
|
119
|
-
updateTimesheet(
|
|
120
|
-
@User() user,
|
|
121
|
-
@Param('id', ParseIntPipe) id: number,
|
|
122
|
-
@Body() data
|
|
123
|
-
) {
|
|
124
|
-
return this.operationsService.updateTimesheet(Number(user?.id || 0), id, data);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
@Post('timesheets/:id/submit')
|
|
128
|
-
submitTimesheet(@User() user, @Param('id', ParseIntPipe) id: number) {
|
|
129
|
-
return this.operationsService.submitTimesheet(Number(user?.id || 0), id);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
@Get('time-off')
|
|
133
|
-
listTimeOffRequests(@User() user) {
|
|
134
|
-
return this.operationsService.listTimeOffRequests(Number(user?.id || 0));
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
@Post('time-off')
|
|
138
|
-
createTimeOffRequest(@User() user, @Body() data) {
|
|
139
|
-
return this.operationsService.createTimeOffRequest(Number(user?.id || 0), data);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
@Get('schedule-adjustments')
|
|
143
|
-
listScheduleAdjustments(@User() user) {
|
|
144
|
-
return this.operationsService.listScheduleAdjustments(Number(user?.id || 0));
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
@Post('schedule-adjustments')
|
|
148
|
-
createScheduleAdjustmentRequest(@User() user, @Body() data) {
|
|
149
|
-
return this.operationsService.createScheduleAdjustmentRequest(
|
|
150
|
-
Number(user?.id || 0),
|
|
151
|
-
data
|
|
152
|
-
);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
@Get('approvals')
|
|
156
|
-
listApprovals(@User() user) {
|
|
157
|
-
return this.operationsService.listApprovals(Number(user?.id || 0));
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
@Post('approvals/:id/approve')
|
|
161
|
-
approve(@User() user, @Param('id', ParseIntPipe) id: number, @Body() data) {
|
|
162
|
-
return this.operationsService.approve(Number(user?.id || 0), id, data);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
@Post('approvals/:id/reject')
|
|
166
|
-
reject(@User() user, @Param('id', ParseIntPipe) id: number, @Body() data) {
|
|
167
|
-
return this.operationsService.reject(Number(user?.id || 0), id, data);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
@Post('integration/examples/accounts-payable')
|
|
171
|
-
publishAccountsPayableReference(@User() user, @Body() data) {
|
|
172
|
-
return this.operationsService.publishAccountsPayableReference(
|
|
173
|
-
Number(user?.id || 0),
|
|
174
|
-
data,
|
|
175
|
-
);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
@Get('team')
|
|
179
|
-
getSupervisorTeam(@User() user) {
|
|
180
|
-
return this.operationsService.getTeam(Number(user?.id || 0));
|
|
181
|
-
}
|
|
182
|
-
}
|
|
1
|
+
import { Role, User } from '@hed-hog/api';
|
|
2
|
+
import {
|
|
3
|
+
Body,
|
|
4
|
+
Controller,
|
|
5
|
+
Get,
|
|
6
|
+
Param,
|
|
7
|
+
ParseIntPipe,
|
|
8
|
+
Patch,
|
|
9
|
+
Post,
|
|
10
|
+
} from '@nestjs/common';
|
|
11
|
+
import { OperationsService } from './operations.service';
|
|
12
|
+
|
|
13
|
+
@Role()
|
|
14
|
+
@Controller('operations')
|
|
15
|
+
export class OperationsController {
|
|
16
|
+
constructor(private readonly operationsService: OperationsService) {}
|
|
17
|
+
|
|
18
|
+
@Get('dashboard')
|
|
19
|
+
getDashboard(@User() user) {
|
|
20
|
+
return this.operationsService.getDashboard(Number(user?.id || 0));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@Get('collaborators')
|
|
24
|
+
listCollaborators(@User() user) {
|
|
25
|
+
return this.operationsService.listCollaborators(Number(user?.id || 0));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@Get('collaborators/me')
|
|
29
|
+
getMyCollaborator(@User() user) {
|
|
30
|
+
return this.operationsService.getMyCollaborator(Number(user?.id || 0));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@Get('collaborators/:id')
|
|
34
|
+
getCollaborator(@User() user, @Param('id', ParseIntPipe) id: number) {
|
|
35
|
+
return this.operationsService.getCollaboratorByIdForUser(
|
|
36
|
+
Number(user?.id || 0),
|
|
37
|
+
id
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@Get('collaborators/team')
|
|
42
|
+
getTeam(@User() user) {
|
|
43
|
+
return this.operationsService.getTeam(Number(user?.id || 0));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@Post('collaborators')
|
|
47
|
+
createCollaborator(@User() user, @Body() data) {
|
|
48
|
+
return this.operationsService.createCollaborator(Number(user?.id || 0), data);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@Patch('collaborators/:id')
|
|
52
|
+
updateCollaborator(
|
|
53
|
+
@User() user,
|
|
54
|
+
@Param('id', ParseIntPipe) id: number,
|
|
55
|
+
@Body() data
|
|
56
|
+
) {
|
|
57
|
+
return this.operationsService.updateCollaborator(
|
|
58
|
+
Number(user?.id || 0),
|
|
59
|
+
id,
|
|
60
|
+
data
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@Get('projects')
|
|
65
|
+
listProjects(@User() user) {
|
|
66
|
+
return this.operationsService.listProjects(Number(user?.id || 0));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@Get('projects/:id')
|
|
70
|
+
getProject(@User() user, @Param('id', ParseIntPipe) id: number) {
|
|
71
|
+
return this.operationsService.getProjectById(Number(user?.id || 0), id);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@Post('projects')
|
|
75
|
+
createProject(@User() user, @Body() data) {
|
|
76
|
+
return this.operationsService.createProject(Number(user?.id || 0), data);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@Patch('projects/:id')
|
|
80
|
+
updateProject(@User() user, @Param('id', ParseIntPipe) id: number, @Body() data) {
|
|
81
|
+
return this.operationsService.updateProject(Number(user?.id || 0), id, data);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@Get('contracts')
|
|
85
|
+
listContracts(@User() user) {
|
|
86
|
+
return this.operationsService.listContracts(Number(user?.id || 0));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@Get('contracts/:id')
|
|
90
|
+
getContract(@User() user, @Param('id', ParseIntPipe) id: number) {
|
|
91
|
+
return this.operationsService.getContractById(Number(user?.id || 0), id);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@Post('contracts')
|
|
95
|
+
createContract(@User() user, @Body() data) {
|
|
96
|
+
return this.operationsService.createContract(Number(user?.id || 0), data);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@Patch('contracts/:id')
|
|
100
|
+
updateContract(
|
|
101
|
+
@User() user,
|
|
102
|
+
@Param('id', ParseIntPipe) id: number,
|
|
103
|
+
@Body() data
|
|
104
|
+
) {
|
|
105
|
+
return this.operationsService.updateContract(Number(user?.id || 0), id, data);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@Get('timesheets')
|
|
109
|
+
listTimesheets(@User() user) {
|
|
110
|
+
return this.operationsService.listTimesheets(Number(user?.id || 0));
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@Post('timesheets')
|
|
114
|
+
createTimesheet(@User() user, @Body() data) {
|
|
115
|
+
return this.operationsService.createTimesheet(Number(user?.id || 0), data);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@Patch('timesheets/:id')
|
|
119
|
+
updateTimesheet(
|
|
120
|
+
@User() user,
|
|
121
|
+
@Param('id', ParseIntPipe) id: number,
|
|
122
|
+
@Body() data
|
|
123
|
+
) {
|
|
124
|
+
return this.operationsService.updateTimesheet(Number(user?.id || 0), id, data);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@Post('timesheets/:id/submit')
|
|
128
|
+
submitTimesheet(@User() user, @Param('id', ParseIntPipe) id: number) {
|
|
129
|
+
return this.operationsService.submitTimesheet(Number(user?.id || 0), id);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@Get('time-off')
|
|
133
|
+
listTimeOffRequests(@User() user) {
|
|
134
|
+
return this.operationsService.listTimeOffRequests(Number(user?.id || 0));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@Post('time-off')
|
|
138
|
+
createTimeOffRequest(@User() user, @Body() data) {
|
|
139
|
+
return this.operationsService.createTimeOffRequest(Number(user?.id || 0), data);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@Get('schedule-adjustments')
|
|
143
|
+
listScheduleAdjustments(@User() user) {
|
|
144
|
+
return this.operationsService.listScheduleAdjustments(Number(user?.id || 0));
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@Post('schedule-adjustments')
|
|
148
|
+
createScheduleAdjustmentRequest(@User() user, @Body() data) {
|
|
149
|
+
return this.operationsService.createScheduleAdjustmentRequest(
|
|
150
|
+
Number(user?.id || 0),
|
|
151
|
+
data
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
@Get('approvals')
|
|
156
|
+
listApprovals(@User() user) {
|
|
157
|
+
return this.operationsService.listApprovals(Number(user?.id || 0));
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@Post('approvals/:id/approve')
|
|
161
|
+
approve(@User() user, @Param('id', ParseIntPipe) id: number, @Body() data) {
|
|
162
|
+
return this.operationsService.approve(Number(user?.id || 0), id, data);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
@Post('approvals/:id/reject')
|
|
166
|
+
reject(@User() user, @Param('id', ParseIntPipe) id: number, @Body() data) {
|
|
167
|
+
return this.operationsService.reject(Number(user?.id || 0), id, data);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
@Post('integration/examples/accounts-payable')
|
|
171
|
+
publishAccountsPayableReference(@User() user, @Body() data) {
|
|
172
|
+
return this.operationsService.publishAccountsPayableReference(
|
|
173
|
+
Number(user?.id || 0),
|
|
174
|
+
data,
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
@Get('team')
|
|
179
|
+
getSupervisorTeam(@User() user) {
|
|
180
|
+
return this.operationsService.getTeam(Number(user?.id || 0));
|
|
181
|
+
}
|
|
182
|
+
}
|
package/src/operations.module.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { LocaleModule } from '@hed-hog/api-locale';
|
|
2
|
-
import { PaginationModule } from '@hed-hog/api-pagination';
|
|
3
|
-
import { PrismaModule } from '@hed-hog/api-prisma';
|
|
4
|
-
import { IntegrationModule } from '@hed-hog/core';
|
|
5
|
-
import { forwardRef, Module } from '@nestjs/common';
|
|
6
|
-
import { ConfigModule } from '@nestjs/config';
|
|
7
|
-
import { OperationsController } from './operations.controller';
|
|
8
|
-
import { OperationsService } from './operations.service';
|
|
9
|
-
|
|
10
|
-
@Module({
|
|
11
|
-
imports: [
|
|
12
|
-
ConfigModule.forRoot(),
|
|
13
|
-
forwardRef(() => PaginationModule),
|
|
14
|
-
forwardRef(() => PrismaModule),
|
|
15
|
-
forwardRef(() => LocaleModule),
|
|
16
|
-
forwardRef(() => IntegrationModule),
|
|
17
|
-
],
|
|
18
|
-
controllers: [OperationsController],
|
|
19
|
-
providers: [OperationsService],
|
|
20
|
-
exports: [OperationsService],
|
|
21
|
-
})
|
|
22
|
-
export class OperationsModule {}
|
|
1
|
+
import { LocaleModule } from '@hed-hog/api-locale';
|
|
2
|
+
import { PaginationModule } from '@hed-hog/api-pagination';
|
|
3
|
+
import { PrismaModule } from '@hed-hog/api-prisma';
|
|
4
|
+
import { IntegrationModule } from '@hed-hog/core';
|
|
5
|
+
import { forwardRef, Module } from '@nestjs/common';
|
|
6
|
+
import { ConfigModule } from '@nestjs/config';
|
|
7
|
+
import { OperationsController } from './operations.controller';
|
|
8
|
+
import { OperationsService } from './operations.service';
|
|
9
|
+
|
|
10
|
+
@Module({
|
|
11
|
+
imports: [
|
|
12
|
+
ConfigModule.forRoot(),
|
|
13
|
+
forwardRef(() => PaginationModule),
|
|
14
|
+
forwardRef(() => PrismaModule),
|
|
15
|
+
forwardRef(() => LocaleModule),
|
|
16
|
+
forwardRef(() => IntegrationModule),
|
|
17
|
+
],
|
|
18
|
+
controllers: [OperationsController],
|
|
19
|
+
providers: [OperationsService],
|
|
20
|
+
exports: [OperationsService],
|
|
21
|
+
})
|
|
22
|
+
export class OperationsModule {}
|