@hed-hog/operations 0.0.295 → 0.0.296
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.controller.d.ts +415 -0
- package/dist/operations.controller.d.ts.map +1 -0
- package/dist/operations.controller.js +333 -0
- package/dist/operations.controller.js.map +1 -0
- package/dist/operations.module.d.ts.map +1 -1
- package/dist/operations.module.js +4 -3
- package/dist/operations.module.js.map +1 -1
- package/dist/operations.service.d.ts +589 -153
- package/dist/operations.service.d.ts.map +1 -1
- package/dist/operations.service.js +2229 -100
- package/dist/operations.service.js.map +1 -1
- package/hedhog/data/menu.yaml +198 -251
- package/hedhog/data/role.yaml +23 -14
- package/hedhog/data/route.yaml +317 -143
- package/hedhog/frontend/app/_components/collaborator-details-screen.tsx.ejs +310 -0
- package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +631 -0
- package/hedhog/frontend/app/_components/contract-details-screen.tsx.ejs +132 -0
- package/hedhog/frontend/app/_components/contract-form-screen.tsx.ejs +558 -0
- package/hedhog/frontend/app/_components/project-details-screen.tsx.ejs +291 -0
- package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +689 -0
- package/hedhog/frontend/app/_lib/api.ts.ejs +32 -0
- package/hedhog/frontend/app/_lib/hooks/use-operations-access.ts.ejs +44 -0
- package/hedhog/frontend/app/_lib/types.ts.ejs +360 -0
- package/hedhog/frontend/app/_lib/utils/format.ts.ejs +129 -25
- package/hedhog/frontend/app/_lib/utils/forms.ts.ejs +14 -0
- package/hedhog/frontend/app/approvals/page.tsx.ejs +386 -147
- package/hedhog/frontend/app/collaborators/[id]/edit/page.tsx.ejs +11 -0
- package/hedhog/frontend/app/collaborators/[id]/page.tsx.ejs +11 -0
- package/hedhog/frontend/app/collaborators/new/page.tsx.ejs +5 -0
- package/hedhog/frontend/app/collaborators/page.tsx.ejs +261 -0
- package/hedhog/frontend/app/contracts/[id]/edit/page.tsx.ejs +11 -0
- package/hedhog/frontend/app/contracts/[id]/page.tsx.ejs +11 -108
- package/hedhog/frontend/app/contracts/new/page.tsx.ejs +17 -0
- package/hedhog/frontend/app/contracts/page.tsx.ejs +262 -181
- package/hedhog/frontend/app/page.tsx.ejs +319 -177
- package/hedhog/frontend/app/projects/[id]/edit/page.tsx.ejs +11 -0
- package/hedhog/frontend/app/projects/[id]/page.tsx.ejs +11 -936
- package/hedhog/frontend/app/projects/new/page.tsx.ejs +5 -0
- package/hedhog/frontend/app/projects/page.tsx.ejs +236 -1074
- package/hedhog/frontend/app/schedule-adjustments/page.tsx.ejs +418 -0
- package/hedhog/frontend/app/team/page.tsx.ejs +339 -0
- package/hedhog/frontend/app/time-off/page.tsx.ejs +328 -0
- package/hedhog/frontend/app/timesheets/page.tsx.ejs +636 -126
- package/hedhog/frontend/messages/en.json +648 -454
- package/hedhog/frontend/messages/pt.json +647 -454
- package/hedhog/table/operations_approval.yaml +49 -0
- package/hedhog/table/operations_approval_history.yaml +29 -0
- package/hedhog/table/{operations_employee.yaml → operations_collaborator.yaml} +67 -64
- package/hedhog/table/operations_collaborator_schedule_day.yaml +34 -0
- package/hedhog/table/operations_contract.yaml +100 -48
- package/hedhog/table/operations_contract_document.yaml +39 -0
- package/hedhog/table/operations_contract_financial_term.yaml +40 -0
- package/hedhog/table/operations_contract_history.yaml +27 -0
- package/hedhog/table/operations_contract_party.yaml +46 -0
- package/hedhog/table/operations_contract_revision.yaml +38 -0
- package/hedhog/table/operations_contract_signature.yaml +38 -0
- package/hedhog/table/operations_project.yaml +54 -50
- package/hedhog/table/{operations_allocation.yaml → operations_project_assignment.yaml} +55 -52
- package/hedhog/table/operations_schedule_adjustment_day.yaml +34 -0
- package/hedhog/table/operations_schedule_adjustment_request.yaml +53 -0
- package/hedhog/table/operations_time_off_request.yaml +57 -0
- package/hedhog/table/operations_timesheet.yaml +41 -36
- package/hedhog/table/operations_timesheet_entry.yaml +40 -50
- package/package.json +8 -7
- package/src/operations.controller.ts +182 -0
- package/src/operations.module.ts +22 -21
- package/src/operations.service.ts +3595 -137
- package/hedhog/data/operations_career_level.yaml +0 -102
- package/hedhog/data/operations_career_track.yaml +0 -8
- package/hedhog/data/operations_certification.yaml +0 -38
- package/hedhog/data/operations_evaluation_cycle.yaml +0 -18
- package/hedhog/data/operations_performance_criterion.yaml +0 -48
- package/hedhog/frontend/app/_components/allocation-calendar.tsx.ejs +0 -56
- package/hedhog/frontend/app/_components/kanban-board.tsx.ejs +0 -626
- package/hedhog/frontend/app/_components/timesheet-entry-dialog.tsx.ejs +0 -142
- package/hedhog/frontend/app/_lib/hooks/use-operations-data.ts.ejs +0 -41
- package/hedhog/frontend/app/_lib/hooks/use-operations-growth-data.ts.ejs +0 -63
- package/hedhog/frontend/app/_lib/mocks/allocations.mock.ts.ejs +0 -74
- package/hedhog/frontend/app/_lib/mocks/contracts.mock.ts.ejs +0 -74
- package/hedhog/frontend/app/_lib/mocks/operations-growth.mock.ts.ejs +0 -824
- package/hedhog/frontend/app/_lib/mocks/projects.mock.ts.ejs +0 -455
- package/hedhog/frontend/app/_lib/mocks/tasks.mock.ts.ejs +0 -117
- package/hedhog/frontend/app/_lib/mocks/timesheets.mock.ts.ejs +0 -84
- package/hedhog/frontend/app/_lib/mocks/users.mock.ts.ejs +0 -67
- package/hedhog/frontend/app/_lib/services/contracts.service.ts.ejs +0 -10
- package/hedhog/frontend/app/_lib/services/operations-growth.service.ts.ejs +0 -31
- package/hedhog/frontend/app/_lib/services/projects.service.ts.ejs +0 -10
- package/hedhog/frontend/app/_lib/services/tasks.service.ts.ejs +0 -10
- package/hedhog/frontend/app/_lib/services/timesheets.service.ts.ejs +0 -10
- package/hedhog/frontend/app/_lib/types/operations-growth.ts.ejs +0 -209
- package/hedhog/frontend/app/_lib/types/operations.ts.ejs +0 -156
- package/hedhog/frontend/app/_lib/utils/growth.ts.ejs +0 -62
- package/hedhog/frontend/app/_lib/utils/metrics.ts.ejs +0 -103
- package/hedhog/frontend/app/_lib/utils/status.ts.ejs +0 -80
- package/hedhog/frontend/app/allocations/page.tsx.ejs +0 -155
- package/hedhog/frontend/app/career/page.tsx.ejs +0 -143
- package/hedhog/frontend/app/certifications/page.tsx.ejs +0 -202
- package/hedhog/frontend/app/evaluations/page.tsx.ejs +0 -278
- package/hedhog/frontend/app/goals/page.tsx.ejs +0 -171
- package/hedhog/frontend/app/growth/page.tsx.ejs +0 -288
- package/hedhog/frontend/app/manager/page.tsx.ejs +0 -175
- package/hedhog/frontend/app/rewards/page.tsx.ejs +0 -196
- package/hedhog/frontend/app/tasks/page.tsx.ejs +0 -999
- package/hedhog/table/operations_calibration_item.yaml +0 -61
- package/hedhog/table/operations_calibration_session.yaml +0 -25
- package/hedhog/table/operations_career_level.yaml +0 -75
- package/hedhog/table/operations_career_track.yaml +0 -21
- package/hedhog/table/operations_certification.yaml +0 -48
- package/hedhog/table/operations_employee_certification.yaml +0 -43
- package/hedhog/table/operations_employee_connect.yaml +0 -61
- package/hedhog/table/operations_employee_evaluation.yaml +0 -113
- package/hedhog/table/operations_employee_evaluation_item.yaml +0 -39
- package/hedhog/table/operations_employee_profile.yaml +0 -80
- package/hedhog/table/operations_employee_skill_matrix.yaml +0 -30
- package/hedhog/table/operations_evaluation_cycle.yaml +0 -31
- package/hedhog/table/operations_goal.yaml +0 -67
- package/hedhog/table/operations_goal_progress.yaml +0 -31
- package/hedhog/table/operations_performance_criterion.yaml +0 -29
- package/hedhog/table/operations_promotion_readiness.yaml +0 -49
- package/hedhog/table/operations_promotion_recommendation.yaml +0 -63
- package/hedhog/table/operations_public_recognition.yaml +0 -46
- package/hedhog/table/operations_reward.yaml +0 -100
- package/hedhog/table/operations_score_event.yaml +0 -81
- package/hedhog/table/operations_task.yaml +0 -60
- package/src/operations-data.controller.ts +0 -54
- package/src/operations-growth.controller.ts +0 -44
|
@@ -0,0 +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
|
+
}
|
package/src/operations.module.ts
CHANGED
|
@@ -1,21 +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 {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { OperationsService } from './operations.service';
|
|
9
|
-
|
|
10
|
-
@Module({
|
|
11
|
-
imports: [
|
|
12
|
-
ConfigModule.forRoot(),
|
|
13
|
-
forwardRef(() => PaginationModule),
|
|
14
|
-
forwardRef(() => PrismaModule),
|
|
15
|
-
forwardRef(() => LocaleModule),
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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 {}
|