@hed-hog/operations 0.0.305 → 0.0.309
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 +52 -4
- package/dist/controllers/operations-timesheets.controller.d.ts.map +1 -1
- package/dist/controllers/operations-timesheets.controller.js +28 -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/dto/update-collaborator-type.dto.d.ts +3 -1
- package/dist/dto/update-collaborator-type.dto.d.ts.map +1 -1
- package/dist/dto/update-collaborator-type.dto.js +2 -1
- package/dist/dto/update-collaborator-type.dto.js.map +1 -1
- package/dist/operations.service.d.ts +362 -271
- package/dist/operations.service.d.ts.map +1 -1
- package/dist/operations.service.js +1195 -1098
- package/dist/operations.service.js.map +1 -1
- package/dist/operations.service.spec.js +73 -22
- package/dist/operations.service.spec.js.map +1 -1
- package/hedhog/data/menu.yaml +19 -55
- package/hedhog/data/operations_collaborator_type.yaml +76 -76
- package/hedhog/data/route.yaml +52 -70
- package/hedhog/frontend/app/_components/async-options-combobox.tsx.ejs +5 -3
- 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/_components/timesheet-task-create-sheet.tsx.ejs +1 -0
- 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 +843 -151
- package/hedhog/frontend/app/collaborator-types/page.tsx.ejs +457 -154
- 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 +546 -118
- package/hedhog/frontend/app/time-off/page.tsx.ejs +400 -123
- package/hedhog/frontend/app/timesheets/page.tsx.ejs +647 -342
- package/hedhog/frontend/messages/en.json +148 -14
- package/hedhog/frontend/messages/pt.json +199 -56
- package/hedhog/table/operations_collaborator.yaml +18 -18
- package/hedhog/table/operations_collaborator_equity_participation.yaml +43 -43
- package/hedhog/table/operations_collaborator_type.yaml +33 -33
- package/hedhog/table/operations_contract.yaml +0 -9
- package/hedhog/table/operations_contract_document.yaml +33 -33
- 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 +30 -8
- package/src/dto/create-collaborator-type.dto.ts +43 -43
- package/src/dto/create-collaborator.dto.ts +223 -223
- package/src/dto/list-approvals.dto.ts +12 -0
- package/src/dto/list-collaborator-types.dto.ts +20 -15
- package/src/dto/list-collaborators.dto.ts +34 -30
- 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/dto/update-collaborator-type.dto.ts +4 -3
- package/src/dto/update-collaborator.dto.ts +3 -3
- package/src/operations.service.spec.ts +96 -30
- package/src/operations.service.ts +1738 -1777
- 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
|
@@ -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]
|
|
@@ -46,14 +46,6 @@ columns:
|
|
|
46
46
|
column: id
|
|
47
47
|
onDelete: SET NULL
|
|
48
48
|
onUpdate: CASCADE
|
|
49
|
-
- name: contract_template_id
|
|
50
|
-
type: fk
|
|
51
|
-
isNullable: true
|
|
52
|
-
references:
|
|
53
|
-
table: operations_contract_template
|
|
54
|
-
column: id
|
|
55
|
-
onDelete: SET NULL
|
|
56
|
-
onUpdate: CASCADE
|
|
57
49
|
- name: origin_type
|
|
58
50
|
type: enum
|
|
59
51
|
values: [manual, employee_hiring, client_project, crm_proposal]
|
|
@@ -115,7 +107,6 @@ indices:
|
|
|
115
107
|
isUnique: true
|
|
116
108
|
- columns: [account_manager_collaborator_id]
|
|
117
109
|
- columns: [related_collaborator_id]
|
|
118
|
-
- columns: [contract_template_id]
|
|
119
110
|
- columns: [contract_category]
|
|
120
111
|
- columns: [contract_type]
|
|
121
112
|
- columns: [origin_type]
|
|
@@ -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.
|
|
3
|
+
"version": "0.0.309",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"dependencies": {
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"@nestjs/mapped-types": "*",
|
|
12
12
|
"@hed-hog/api": "0.0.6",
|
|
13
13
|
"@hed-hog/api-prisma": "0.0.6",
|
|
14
|
+
"@hed-hog/api-types": "0.0.1",
|
|
14
15
|
"@hed-hog/api-pagination": "0.0.7",
|
|
15
16
|
"@hed-hog/api-locale": "0.0.14",
|
|
16
|
-
"@hed-hog/
|
|
17
|
-
"@hed-hog/core": "0.0.
|
|
18
|
-
"@hed-hog/contact": "0.0.305"
|
|
17
|
+
"@hed-hog/contact": "0.0.309",
|
|
18
|
+
"@hed-hog/core": "0.0.309"
|
|
19
19
|
},
|
|
20
20
|
"exports": {
|
|
21
21
|
".": {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Role, User } from '@hed-hog/api';
|
|
2
|
-
import { Body, Controller, Get, Param, ParseIntPipe, Post } from '@nestjs/common';
|
|
2
|
+
import { Body, Controller, Get, Param, ParseIntPipe, Post, Query } from '@nestjs/common';
|
|
3
|
+
import { ListApprovalsDto } from '../dto/list-approvals.dto';
|
|
3
4
|
import { OperationsService } from '../operations.service';
|
|
4
5
|
|
|
5
6
|
@Role()
|
|
@@ -8,8 +9,13 @@ export class OperationsApprovalsController {
|
|
|
8
9
|
constructor(private readonly operationsService: OperationsService) {}
|
|
9
10
|
|
|
10
11
|
@Get('approvals')
|
|
11
|
-
listApprovals(@User() user) {
|
|
12
|
-
return this.operationsService.listApprovals(Number(user?.id || 0));
|
|
12
|
+
listApprovals(@User() user, @Query() filters: ListApprovalsDto) {
|
|
13
|
+
return this.operationsService.listApprovals(Number(user?.id || 0), filters);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@Get('approvals/:id')
|
|
17
|
+
getApprovalDetail(@User() user, @Param('id', ParseIntPipe) id: number) {
|
|
18
|
+
return this.operationsService.getApprovalDetail(Number(user?.id || 0), id);
|
|
13
19
|
}
|
|
14
20
|
|
|
15
21
|
@Post('approvals/:id/approve')
|
|
@@ -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),
|
|
@@ -45,6 +48,19 @@ export class OperationsTimesheetsController {
|
|
|
45
48
|
);
|
|
46
49
|
}
|
|
47
50
|
|
|
51
|
+
@Patch('timesheet-entries/:id')
|
|
52
|
+
updateTimesheetEntry(
|
|
53
|
+
@User() user,
|
|
54
|
+
@Param('id', ParseIntPipe) id: number,
|
|
55
|
+
@Body() data: CreateTimesheetEntryDto,
|
|
56
|
+
) {
|
|
57
|
+
return this.operationsService.updateTimesheetEntry(
|
|
58
|
+
Number(user?.id || 0),
|
|
59
|
+
id,
|
|
60
|
+
data,
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
48
64
|
@Delete('timesheet-entries/:id')
|
|
49
65
|
removeTimesheetEntry(@User() user, @Param('id', ParseIntPipe) id: number) {
|
|
50
66
|
return this.operationsService.removeTimesheetEntry(Number(user?.id || 0), id);
|
|
@@ -70,8 +86,8 @@ export class OperationsTimesheetsController {
|
|
|
70
86
|
}
|
|
71
87
|
|
|
72
88
|
@Get('time-off')
|
|
73
|
-
listTimeOffRequests(@User() user) {
|
|
74
|
-
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);
|
|
75
91
|
}
|
|
76
92
|
|
|
77
93
|
@Post('time-off')
|
|
@@ -83,8 +99,14 @@ export class OperationsTimesheetsController {
|
|
|
83
99
|
}
|
|
84
100
|
|
|
85
101
|
@Get('schedule-adjustments')
|
|
86
|
-
listScheduleAdjustments(
|
|
87
|
-
|
|
102
|
+
listScheduleAdjustments(
|
|
103
|
+
@User() user,
|
|
104
|
+
@Query() filters: ListScheduleAdjustmentsDto,
|
|
105
|
+
) {
|
|
106
|
+
return this.operationsService.listScheduleAdjustments(
|
|
107
|
+
Number(user?.id || 0),
|
|
108
|
+
filters,
|
|
109
|
+
);
|
|
88
110
|
}
|
|
89
111
|
|
|
90
112
|
@Post('schedule-adjustments')
|