@hed-hog/operations 0.0.319 → 0.0.321
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-contracts.controller.d.ts +9 -9
- package/dist/operations.service.js +110 -110
- package/hedhog/data/operations_cost_type.yaml +95 -95
- package/hedhog/frontend/app/_components/collaborator-costs-section.tsx.ejs +884 -884
- package/hedhog/frontend/app/_components/collaborator-details-screen.tsx.ejs +23 -23
- package/hedhog/frontend/app/_lib/types.ts.ejs +178 -178
- package/hedhog/frontend/app/reports/collaborators/page.tsx.ejs +771 -771
- package/hedhog/frontend/app/reports/projects/page.tsx.ejs +809 -809
- package/package.json +4 -4
- package/src/controllers/operations-reports.controller.ts +32 -32
- package/src/dto/list-reports.dto.ts +51 -51
- package/src/operations.module.ts +5 -5
- package/src/operations.service.ts +610 -610
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hed-hog/operations",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.321",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"dependencies": {
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
"@hed-hog/api-prisma": "0.0.6",
|
|
14
14
|
"@hed-hog/api-pagination": "0.0.7",
|
|
15
15
|
"@hed-hog/api-locale": "0.0.14",
|
|
16
|
-
"@hed-hog/core": "0.0.
|
|
17
|
-
"@hed-hog/
|
|
18
|
-
"@hed-hog/
|
|
16
|
+
"@hed-hog/core": "0.0.321",
|
|
17
|
+
"@hed-hog/api-types": "0.0.1",
|
|
18
|
+
"@hed-hog/contact": "0.0.321"
|
|
19
19
|
},
|
|
20
20
|
"exports": {
|
|
21
21
|
".": {
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { Role, User } from '@hed-hog/api';
|
|
2
|
-
import { Controller, Get, Query } from '@nestjs/common';
|
|
3
|
-
import {
|
|
4
|
-
ListCollaboratorsReportDto,
|
|
5
|
-
ListProjectsReportDto,
|
|
6
|
-
} from '../dto/list-reports.dto';
|
|
7
|
-
import { OperationsService } from '../operations.service';
|
|
8
|
-
|
|
9
|
-
@Role()
|
|
10
|
-
@Controller('operations')
|
|
11
|
-
export class OperationsReportsController {
|
|
12
|
-
constructor(private readonly operationsService: OperationsService) {}
|
|
13
|
-
|
|
14
|
-
@Get('reports/projects')
|
|
15
|
-
getProjectsReport(@User() user, @Query() filters: ListProjectsReportDto) {
|
|
16
|
-
return this.operationsService.getProjectsReport(
|
|
17
|
-
Number(user?.id || 0),
|
|
18
|
-
filters,
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@Get('reports/collaborators')
|
|
23
|
-
getCollaboratorsReport(
|
|
24
|
-
@User() user,
|
|
25
|
-
@Query() filters: ListCollaboratorsReportDto,
|
|
26
|
-
) {
|
|
27
|
-
return this.operationsService.getCollaboratorsReport(
|
|
28
|
-
Number(user?.id || 0),
|
|
29
|
-
filters,
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
1
|
+
import { Role, User } from '@hed-hog/api';
|
|
2
|
+
import { Controller, Get, Query } from '@nestjs/common';
|
|
3
|
+
import {
|
|
4
|
+
ListCollaboratorsReportDto,
|
|
5
|
+
ListProjectsReportDto,
|
|
6
|
+
} from '../dto/list-reports.dto';
|
|
7
|
+
import { OperationsService } from '../operations.service';
|
|
8
|
+
|
|
9
|
+
@Role()
|
|
10
|
+
@Controller('operations')
|
|
11
|
+
export class OperationsReportsController {
|
|
12
|
+
constructor(private readonly operationsService: OperationsService) {}
|
|
13
|
+
|
|
14
|
+
@Get('reports/projects')
|
|
15
|
+
getProjectsReport(@User() user, @Query() filters: ListProjectsReportDto) {
|
|
16
|
+
return this.operationsService.getProjectsReport(
|
|
17
|
+
Number(user?.id || 0),
|
|
18
|
+
filters,
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@Get('reports/collaborators')
|
|
23
|
+
getCollaboratorsReport(
|
|
24
|
+
@User() user,
|
|
25
|
+
@Query() filters: ListCollaboratorsReportDto,
|
|
26
|
+
) {
|
|
27
|
+
return this.operationsService.getCollaboratorsReport(
|
|
28
|
+
Number(user?.id || 0),
|
|
29
|
+
filters,
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { IsIn, IsOptional, IsString } from 'class-validator';
|
|
2
|
-
|
|
3
|
-
export const OPERATIONS_REPORT_SCENARIOS = [
|
|
4
|
-
'base',
|
|
5
|
-
'growth',
|
|
6
|
-
'conservative',
|
|
7
|
-
] as const;
|
|
8
|
-
|
|
9
|
-
export class ListProjectsReportDto {
|
|
10
|
-
@IsOptional()
|
|
11
|
-
@IsString()
|
|
12
|
-
from?: string;
|
|
13
|
-
|
|
14
|
-
@IsOptional()
|
|
15
|
-
@IsString()
|
|
16
|
-
to?: string;
|
|
17
|
-
|
|
18
|
-
@IsOptional()
|
|
19
|
-
@IsString()
|
|
20
|
-
status?: string;
|
|
21
|
-
|
|
22
|
-
@IsOptional()
|
|
23
|
-
@IsString()
|
|
24
|
-
client?: string;
|
|
25
|
-
|
|
26
|
-
@IsOptional()
|
|
27
|
-
@IsIn(OPERATIONS_REPORT_SCENARIOS)
|
|
28
|
-
scenario?: string;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export class ListCollaboratorsReportDto {
|
|
32
|
-
@IsOptional()
|
|
33
|
-
@IsString()
|
|
34
|
-
from?: string;
|
|
35
|
-
|
|
36
|
-
@IsOptional()
|
|
37
|
-
@IsString()
|
|
38
|
-
to?: string;
|
|
39
|
-
|
|
40
|
-
@IsOptional()
|
|
41
|
-
@IsString()
|
|
42
|
-
department?: string;
|
|
43
|
-
|
|
44
|
-
@IsOptional()
|
|
45
|
-
@IsString()
|
|
46
|
-
contractType?: string;
|
|
47
|
-
|
|
48
|
-
@IsOptional()
|
|
49
|
-
@IsIn(OPERATIONS_REPORT_SCENARIOS)
|
|
50
|
-
scenario?: string;
|
|
51
|
-
}
|
|
1
|
+
import { IsIn, IsOptional, IsString } from 'class-validator';
|
|
2
|
+
|
|
3
|
+
export const OPERATIONS_REPORT_SCENARIOS = [
|
|
4
|
+
'base',
|
|
5
|
+
'growth',
|
|
6
|
+
'conservative',
|
|
7
|
+
] as const;
|
|
8
|
+
|
|
9
|
+
export class ListProjectsReportDto {
|
|
10
|
+
@IsOptional()
|
|
11
|
+
@IsString()
|
|
12
|
+
from?: string;
|
|
13
|
+
|
|
14
|
+
@IsOptional()
|
|
15
|
+
@IsString()
|
|
16
|
+
to?: string;
|
|
17
|
+
|
|
18
|
+
@IsOptional()
|
|
19
|
+
@IsString()
|
|
20
|
+
status?: string;
|
|
21
|
+
|
|
22
|
+
@IsOptional()
|
|
23
|
+
@IsString()
|
|
24
|
+
client?: string;
|
|
25
|
+
|
|
26
|
+
@IsOptional()
|
|
27
|
+
@IsIn(OPERATIONS_REPORT_SCENARIOS)
|
|
28
|
+
scenario?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export class ListCollaboratorsReportDto {
|
|
32
|
+
@IsOptional()
|
|
33
|
+
@IsString()
|
|
34
|
+
from?: string;
|
|
35
|
+
|
|
36
|
+
@IsOptional()
|
|
37
|
+
@IsString()
|
|
38
|
+
to?: string;
|
|
39
|
+
|
|
40
|
+
@IsOptional()
|
|
41
|
+
@IsString()
|
|
42
|
+
department?: string;
|
|
43
|
+
|
|
44
|
+
@IsOptional()
|
|
45
|
+
@IsString()
|
|
46
|
+
contractType?: string;
|
|
47
|
+
|
|
48
|
+
@IsOptional()
|
|
49
|
+
@IsIn(OPERATIONS_REPORT_SCENARIOS)
|
|
50
|
+
scenario?: string;
|
|
51
|
+
}
|
package/src/operations.module.ts
CHANGED
|
@@ -9,9 +9,9 @@ import { OperationsCollaboratorCostsController } from './controllers/operations-
|
|
|
9
9
|
import { OperationsCollaboratorsController } from './controllers/operations-collaborators.controller';
|
|
10
10
|
import { OperationsContractsController } from './controllers/operations-contracts.controller';
|
|
11
11
|
import { OperationsOrgStructureController } from './controllers/operations-org-structure.controller';
|
|
12
|
-
import { OperationsProjectsController } from './controllers/operations-projects.controller';
|
|
13
|
-
import { OperationsReportsController } from './controllers/operations-reports.controller';
|
|
14
|
-
import { OperationsTasksController } from './controllers/operations-tasks.controller';
|
|
12
|
+
import { OperationsProjectsController } from './controllers/operations-projects.controller';
|
|
13
|
+
import { OperationsReportsController } from './controllers/operations-reports.controller';
|
|
14
|
+
import { OperationsTasksController } from './controllers/operations-tasks.controller';
|
|
15
15
|
import { OperationsTimesheetsController } from './controllers/operations-timesheets.controller';
|
|
16
16
|
import { OperationsController } from './operations.controller';
|
|
17
17
|
import { OperationsProposalSubscriber } from './operations.proposal.subscriber';
|
|
@@ -34,8 +34,8 @@ import { OperationsAccessService } from './services/shared/operations-access.ser
|
|
|
34
34
|
OperationsCollaboratorsController,
|
|
35
35
|
OperationsCollaboratorCostsController,
|
|
36
36
|
OperationsOrgStructureController,
|
|
37
|
-
OperationsProjectsController,
|
|
38
|
-
OperationsReportsController,
|
|
37
|
+
OperationsProjectsController,
|
|
38
|
+
OperationsReportsController,
|
|
39
39
|
OperationsTasksController,
|
|
40
40
|
OperationsContractsController,
|
|
41
41
|
OperationsTimesheetsController,
|