@hed-hog/operations 0.0.305 → 0.0.306

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 (39) hide show
  1. package/dist/controllers/operations-timesheets.controller.d.ts +21 -0
  2. package/dist/controllers/operations-timesheets.controller.d.ts.map +1 -1
  3. package/dist/controllers/operations-timesheets.controller.js +12 -0
  4. package/dist/controllers/operations-timesheets.controller.js.map +1 -1
  5. package/dist/dto/update-collaborator-type.dto.d.ts +3 -1
  6. package/dist/dto/update-collaborator-type.dto.d.ts.map +1 -1
  7. package/dist/dto/update-collaborator-type.dto.js +2 -1
  8. package/dist/dto/update-collaborator-type.dto.js.map +1 -1
  9. package/dist/operations.service.d.ts +22 -0
  10. package/dist/operations.service.d.ts.map +1 -1
  11. package/dist/operations.service.js +180 -47
  12. package/dist/operations.service.js.map +1 -1
  13. package/dist/operations.service.spec.js +73 -0
  14. package/dist/operations.service.spec.js.map +1 -1
  15. package/hedhog/data/menu.yaml +26 -26
  16. package/hedhog/data/operations_collaborator_type.yaml +76 -76
  17. package/hedhog/data/route.yaml +13 -0
  18. package/hedhog/frontend/app/_components/async-options-combobox.tsx.ejs +5 -3
  19. package/hedhog/frontend/app/_components/timesheet-task-create-sheet.tsx.ejs +1 -0
  20. package/hedhog/frontend/app/approvals/page.tsx.ejs +2 -2
  21. package/hedhog/frontend/app/collaborator-types/page.tsx.ejs +26 -15
  22. package/hedhog/frontend/app/schedule-adjustments/page.tsx.ejs +235 -72
  23. package/hedhog/frontend/app/timesheets/page.tsx.ejs +344 -134
  24. package/hedhog/frontend/messages/en.json +5 -0
  25. package/hedhog/frontend/messages/pt.json +7 -2
  26. package/hedhog/table/operations_collaborator.yaml +18 -18
  27. package/hedhog/table/operations_collaborator_equity_participation.yaml +43 -43
  28. package/hedhog/table/operations_collaborator_type.yaml +33 -33
  29. package/hedhog/table/operations_contract_document.yaml +33 -33
  30. package/package.json +4 -4
  31. package/src/controllers/operations-timesheets.controller.ts +13 -0
  32. package/src/dto/create-collaborator-type.dto.ts +43 -43
  33. package/src/dto/create-collaborator.dto.ts +223 -223
  34. package/src/dto/list-collaborator-types.dto.ts +15 -15
  35. package/src/dto/list-collaborators.dto.ts +30 -30
  36. package/src/dto/update-collaborator-type.dto.ts +4 -3
  37. package/src/dto/update-collaborator.dto.ts +3 -3
  38. package/src/operations.service.spec.ts +96 -0
  39. package/src/operations.service.ts +257 -47
@@ -19,20 +19,20 @@ columns:
19
19
  column: id
20
20
  onDelete: SET NULL
21
21
  onUpdate: CASCADE
22
- - name: code
23
- type: varchar
24
- length: 32
25
- - name: collaborator_type_id
26
- type: fk
27
- isNullable: true
28
- references:
29
- table: operations_collaborator_type
30
- column: id
31
- onDelete: SET NULL
32
- onUpdate: CASCADE
33
- - name: display_name
34
- type: varchar
35
- length: 180
22
+ - name: code
23
+ type: varchar
24
+ length: 32
25
+ - name: collaborator_type_id
26
+ type: fk
27
+ isNullable: true
28
+ references:
29
+ table: operations_collaborator_type
30
+ column: id
31
+ onDelete: SET NULL
32
+ onUpdate: CASCADE
33
+ - name: display_name
34
+ type: varchar
35
+ length: 180
36
36
  - name: department
37
37
  type: varchar
38
38
  length: 120
@@ -92,9 +92,9 @@ indices:
92
92
  isUnique: true
93
93
  - columns: [code]
94
94
  isUnique: true
95
- - columns: [collaborator_type_id]
96
- - columns: [supervisor_collaborator_id]
97
- - columns: [department_id]
98
- - columns: [job_title_id]
95
+ - columns: [collaborator_type_id]
96
+ - columns: [supervisor_collaborator_id]
97
+ - columns: [department_id]
98
+ - columns: [job_title_id]
99
99
  - columns: [status]
100
100
  - columns: [deleted_at]
@@ -1,43 +1,43 @@
1
- columns:
2
- - type: pk
3
- - name: collaborator_id
4
- type: fk
5
- references:
6
- table: operations_collaborator
7
- column: id
8
- onDelete: CASCADE
9
- onUpdate: CASCADE
10
- - name: participation_type
11
- type: enum
12
- values:
13
- [partner_quota_holder, common_shareholder, preferred_shareholder, administrator, other]
14
- default: other
15
- - name: percentage
16
- type: decimal
17
- precision: 7
18
- scale: 4
19
- isNullable: true
20
- - name: voting_power
21
- type: decimal
22
- precision: 7
23
- scale: 4
24
- isNullable: true
25
- - name: start_date
26
- type: date
27
- isNullable: true
28
- - name: end_date
29
- type: date
30
- isNullable: true
31
- - name: notes
32
- type: text
33
- isNullable: true
34
- - name: deleted_at
35
- type: datetime
36
- isNullable: true
37
- - type: created_at
38
- - type: updated_at
39
-
40
- indices:
41
- - columns: [collaborator_id]
42
- - columns: [participation_type]
43
- - columns: [deleted_at]
1
+ columns:
2
+ - type: pk
3
+ - name: collaborator_id
4
+ type: fk
5
+ references:
6
+ table: operations_collaborator
7
+ column: id
8
+ onDelete: CASCADE
9
+ onUpdate: CASCADE
10
+ - name: participation_type
11
+ type: enum
12
+ values:
13
+ [partner_quota_holder, common_shareholder, preferred_shareholder, administrator, other]
14
+ default: other
15
+ - name: percentage
16
+ type: decimal
17
+ precision: 7
18
+ scale: 4
19
+ isNullable: true
20
+ - name: voting_power
21
+ type: decimal
22
+ precision: 7
23
+ scale: 4
24
+ isNullable: true
25
+ - name: start_date
26
+ type: date
27
+ isNullable: true
28
+ - name: end_date
29
+ type: date
30
+ isNullable: true
31
+ - name: notes
32
+ type: text
33
+ isNullable: true
34
+ - name: deleted_at
35
+ type: datetime
36
+ isNullable: true
37
+ - type: created_at
38
+ - type: updated_at
39
+
40
+ indices:
41
+ - columns: [collaborator_id]
42
+ - columns: [participation_type]
43
+ - columns: [deleted_at]
@@ -1,33 +1,33 @@
1
- columns:
2
- - type: pk
3
- - type: slug
4
- - name: name
5
- type: varchar
6
- length: 120
7
- - name: description
8
- type: text
9
- isNullable: true
10
- - name: category
11
- type: varchar
12
- length: 60
13
- isNullable: true
14
- - name: is_active
15
- type: boolean
16
- default: true
17
- - name: sort_order
18
- type: int
19
- default: 0
20
- - name: deleted_at
21
- type: datetime
22
- isNullable: true
23
- - type: created_at
24
- - type: updated_at
25
-
26
- indices:
27
- - columns: [slug]
28
- isUnique: true
29
- - columns: [name]
30
- - columns: [category]
31
- - columns: [is_active]
32
- - columns: [sort_order]
33
- - columns: [deleted_at]
1
+ columns:
2
+ - type: pk
3
+ - type: slug
4
+ - name: name
5
+ type: varchar
6
+ length: 120
7
+ - name: description
8
+ type: text
9
+ isNullable: true
10
+ - name: category
11
+ type: varchar
12
+ length: 60
13
+ isNullable: true
14
+ - name: is_active
15
+ type: boolean
16
+ default: true
17
+ - name: sort_order
18
+ type: int
19
+ default: 0
20
+ - name: deleted_at
21
+ type: datetime
22
+ isNullable: true
23
+ - type: created_at
24
+ - type: updated_at
25
+
26
+ indices:
27
+ - columns: [slug]
28
+ isUnique: true
29
+ - columns: [name]
30
+ - columns: [category]
31
+ - columns: [is_active]
32
+ - columns: [sort_order]
33
+ - columns: [deleted_at]
@@ -7,40 +7,40 @@ columns:
7
7
  column: id
8
8
  onDelete: CASCADE
9
9
  onUpdate: CASCADE
10
- - name: document_type
11
- type: enum
12
- values: [source_upload, generated_pdf, attachment, other]
13
- default: attachment
14
- - name: file_id
15
- type: fk
16
- isNullable: true
17
- references:
18
- table: file
19
- column: id
20
- onDelete: SET NULL
21
- onUpdate: CASCADE
22
- - name: file_name
23
- type: varchar
24
- length: 200
10
+ - name: document_type
11
+ type: enum
12
+ values: [source_upload, generated_pdf, attachment, other]
13
+ default: attachment
14
+ - name: file_id
15
+ type: fk
16
+ isNullable: true
17
+ references:
18
+ table: file
19
+ column: id
20
+ onDelete: SET NULL
21
+ onUpdate: CASCADE
22
+ - name: file_name
23
+ type: varchar
24
+ length: 200
25
25
  - name: mime_type
26
26
  type: varchar
27
27
  length: 120
28
28
  - name: file_content_base64
29
29
  type: text
30
30
  isNullable: true
31
- - name: is_current
32
- type: boolean
33
- default: true
34
- - name: extraction_status
35
- type: enum
36
- values: [pending, processing, completed, failed, skipped]
37
- default: skipped
38
- - name: extraction_summary
39
- type: text
40
- isNullable: true
41
- - name: notes
42
- type: text
43
- isNullable: true
31
+ - name: is_current
32
+ type: boolean
33
+ default: true
34
+ - name: extraction_status
35
+ type: enum
36
+ values: [pending, processing, completed, failed, skipped]
37
+ default: skipped
38
+ - name: extraction_summary
39
+ type: text
40
+ isNullable: true
41
+ - name: notes
42
+ type: text
43
+ isNullable: true
44
44
  - name: deleted_at
45
45
  type: datetime
46
46
  isNullable: true
@@ -49,8 +49,8 @@ columns:
49
49
 
50
50
  indices:
51
51
  - columns: [contract_id]
52
- - columns: [document_type]
53
- - columns: [file_id]
54
- - columns: [is_current]
55
- - columns: [extraction_status]
56
- - columns: [deleted_at]
52
+ - columns: [document_type]
53
+ - columns: [file_id]
54
+ - columns: [is_current]
55
+ - columns: [extraction_status]
56
+ - columns: [deleted_at]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hed-hog/operations",
3
- "version": "0.0.305",
3
+ "version": "0.0.306",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "dependencies": {
@@ -9,13 +9,13 @@
9
9
  "@nestjs/core": "^11",
10
10
  "@nestjs/jwt": "^11",
11
11
  "@nestjs/mapped-types": "*",
12
+ "@hed-hog/api-pagination": "0.0.7",
12
13
  "@hed-hog/api": "0.0.6",
13
14
  "@hed-hog/api-prisma": "0.0.6",
14
- "@hed-hog/api-pagination": "0.0.7",
15
+ "@hed-hog/core": "0.0.306",
15
16
  "@hed-hog/api-locale": "0.0.14",
16
17
  "@hed-hog/api-types": "0.0.1",
17
- "@hed-hog/core": "0.0.305",
18
- "@hed-hog/contact": "0.0.305"
18
+ "@hed-hog/contact": "0.0.306"
19
19
  },
20
20
  "exports": {
21
21
  ".": {
@@ -45,6 +45,19 @@ export class OperationsTimesheetsController {
45
45
  );
46
46
  }
47
47
 
48
+ @Patch('timesheet-entries/:id')
49
+ updateTimesheetEntry(
50
+ @User() user,
51
+ @Param('id', ParseIntPipe) id: number,
52
+ @Body() data: CreateTimesheetEntryDto,
53
+ ) {
54
+ return this.operationsService.updateTimesheetEntry(
55
+ Number(user?.id || 0),
56
+ id,
57
+ data,
58
+ );
59
+ }
60
+
48
61
  @Delete('timesheet-entries/:id')
49
62
  removeTimesheetEntry(@User() user, @Param('id', ParseIntPipe) id: number) {
50
63
  return this.operationsService.removeTimesheetEntry(Number(user?.id || 0), id);
@@ -1,43 +1,43 @@
1
- import { Transform } from 'class-transformer';
2
- import {
3
- IsBoolean,
4
- IsInt,
5
- IsOptional,
6
- IsString,
7
- MaxLength,
8
- } from 'class-validator';
9
-
10
- export class CreateCollaboratorTypeDto {
11
- @IsString()
12
- @MaxLength(120)
13
- name!: string;
14
-
15
- @IsOptional()
16
- @IsString()
17
- @MaxLength(80)
18
- slug?: string | null;
19
-
20
- @IsOptional()
21
- @IsString()
22
- description?: string | null;
23
-
24
- @IsOptional()
25
- @IsString()
26
- @MaxLength(60)
27
- category?: string | null;
28
-
29
- @IsOptional()
30
- @IsBoolean()
31
- isActive?: boolean;
32
-
33
- @IsOptional()
34
- @Transform(({ value }) =>
35
- value === '' || value === undefined || value === null ? undefined : Number(value)
36
- )
37
- @IsInt()
38
- sortOrder?: number | null;
39
-
40
- @IsOptional()
41
- @IsString()
42
- status?: 'active' | 'inactive';
43
- }
1
+ import { Transform } from 'class-transformer';
2
+ import {
3
+ IsBoolean,
4
+ IsInt,
5
+ IsOptional,
6
+ IsString,
7
+ MaxLength,
8
+ } from 'class-validator';
9
+
10
+ export class CreateCollaboratorTypeDto {
11
+ @IsString()
12
+ @MaxLength(120)
13
+ name!: string;
14
+
15
+ @IsOptional()
16
+ @IsString()
17
+ @MaxLength(80)
18
+ slug?: string | null;
19
+
20
+ @IsOptional()
21
+ @IsString()
22
+ description?: string | null;
23
+
24
+ @IsOptional()
25
+ @IsString()
26
+ @MaxLength(60)
27
+ category?: string | null;
28
+
29
+ @IsOptional()
30
+ @IsBoolean()
31
+ isActive?: boolean;
32
+
33
+ @IsOptional()
34
+ @Transform(({ value }) =>
35
+ value === '' || value === undefined || value === null ? undefined : Number(value)
36
+ )
37
+ @IsInt()
38
+ sortOrder?: number | null;
39
+
40
+ @IsOptional()
41
+ @IsString()
42
+ status?: 'active' | 'inactive';
43
+ }