@hed-hog/operations 0.0.318 → 0.0.319
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-collaborator-costs.controller.d.ts +144 -0
- package/dist/controllers/operations-collaborator-costs.controller.d.ts.map +1 -0
- package/dist/controllers/operations-collaborator-costs.controller.js +162 -0
- package/dist/controllers/operations-collaborator-costs.controller.js.map +1 -0
- package/dist/controllers/operations-collaborators.controller.d.ts +14 -0
- package/dist/controllers/operations-collaborators.controller.d.ts.map +1 -1
- package/dist/controllers/operations-collaborators.controller.js +11 -0
- package/dist/controllers/operations-collaborators.controller.js.map +1 -1
- package/dist/controllers/operations-projects.controller.d.ts +31 -0
- package/dist/controllers/operations-projects.controller.d.ts.map +1 -1
- package/dist/controllers/operations-projects.controller.js +23 -0
- package/dist/controllers/operations-projects.controller.js.map +1 -1
- package/dist/controllers/operations-reports.controller.d.ts +199 -0
- package/dist/controllers/operations-reports.controller.d.ts.map +1 -0
- package/dist/controllers/operations-reports.controller.js +53 -0
- package/dist/controllers/operations-reports.controller.js.map +1 -0
- package/dist/controllers/operations-tasks.controller.d.ts +41 -2
- package/dist/controllers/operations-tasks.controller.d.ts.map +1 -1
- package/dist/controllers/operations-tasks.controller.js +17 -5
- package/dist/controllers/operations-tasks.controller.js.map +1 -1
- package/dist/dto/create-collaborator-cost.dto.d.ts +16 -0
- package/dist/dto/create-collaborator-cost.dto.d.ts.map +1 -0
- package/dist/dto/create-collaborator-cost.dto.js +88 -0
- package/dist/dto/create-collaborator-cost.dto.js.map +1 -0
- package/dist/dto/create-collaborator.dto.d.ts +0 -1
- package/dist/dto/create-collaborator.dto.d.ts.map +1 -1
- package/dist/dto/create-collaborator.dto.js +0 -6
- package/dist/dto/create-collaborator.dto.js.map +1 -1
- package/dist/dto/create-cost-type.dto.d.ts +13 -0
- package/dist/dto/create-cost-type.dto.d.ts.map +1 -0
- package/dist/dto/create-cost-type.dto.js +87 -0
- package/dist/dto/create-cost-type.dto.js.map +1 -0
- package/dist/dto/list-approvals.dto.d.ts +2 -0
- package/dist/dto/list-approvals.dto.d.ts.map +1 -1
- package/dist/dto/list-approvals.dto.js +10 -0
- package/dist/dto/list-approvals.dto.js.map +1 -1
- package/dist/dto/list-collaborator-costs.dto.d.ts +5 -0
- package/dist/dto/list-collaborator-costs.dto.d.ts.map +1 -0
- package/dist/dto/list-collaborator-costs.dto.js +23 -0
- package/dist/dto/list-collaborator-costs.dto.js.map +1 -0
- package/dist/dto/list-cost-types.dto.d.ts +6 -0
- package/dist/dto/list-cost-types.dto.d.ts.map +1 -0
- package/dist/dto/list-cost-types.dto.js +35 -0
- package/dist/dto/list-cost-types.dto.js.map +1 -0
- package/dist/dto/list-my-projects.dto.d.ts +5 -0
- package/dist/dto/list-my-projects.dto.d.ts.map +1 -0
- package/dist/dto/list-my-projects.dto.js +23 -0
- package/dist/dto/list-my-projects.dto.js.map +1 -0
- package/dist/dto/list-my-tasks.dto.d.ts +6 -0
- package/dist/dto/list-my-tasks.dto.d.ts.map +1 -0
- package/dist/dto/list-my-tasks.dto.js +33 -0
- package/dist/dto/list-my-tasks.dto.js.map +1 -0
- package/dist/dto/list-projects.dto.d.ts +1 -0
- package/dist/dto/list-projects.dto.d.ts.map +1 -1
- package/dist/dto/list-projects.dto.js +7 -0
- package/dist/dto/list-projects.dto.js.map +1 -1
- package/dist/dto/list-reports.dto.d.ts +16 -0
- package/dist/dto/list-reports.dto.d.ts.map +1 -0
- package/dist/dto/list-reports.dto.js +75 -0
- package/dist/dto/list-reports.dto.js.map +1 -0
- package/dist/dto/list-tasks.dto.d.ts +2 -0
- package/dist/dto/list-tasks.dto.d.ts.map +1 -1
- package/dist/dto/list-tasks.dto.js +12 -0
- package/dist/dto/list-tasks.dto.js.map +1 -1
- package/dist/dto/list-timesheets.dto.d.ts +2 -0
- package/dist/dto/list-timesheets.dto.d.ts.map +1 -1
- package/dist/dto/list-timesheets.dto.js +10 -0
- package/dist/dto/list-timesheets.dto.js.map +1 -1
- package/dist/dto/update-collaborator-cost.dto.d.ts +6 -0
- package/dist/dto/update-collaborator-cost.dto.d.ts.map +1 -0
- package/dist/dto/update-collaborator-cost.dto.js +9 -0
- package/dist/dto/update-collaborator-cost.dto.js.map +1 -0
- package/dist/dto/update-task.dto.d.ts +1 -0
- package/dist/dto/update-task.dto.d.ts.map +1 -1
- package/dist/dto/update-task.dto.js +6 -0
- package/dist/dto/update-task.dto.js.map +1 -1
- package/dist/operations.module.d.ts.map +1 -1
- package/dist/operations.module.js +4 -0
- package/dist/operations.module.js.map +1 -1
- package/dist/operations.service.d.ts +457 -3
- package/dist/operations.service.d.ts.map +1 -1
- package/dist/operations.service.js +1445 -208
- package/dist/operations.service.js.map +1 -1
- package/dist/operations.service.spec.js +31 -7
- package/dist/operations.service.spec.js.map +1 -1
- package/hedhog/data/menu.yaml +112 -7
- package/hedhog/data/operations_cost_type.yaml +166 -0
- package/hedhog/data/route.yaml +185 -0
- package/hedhog/frontend/app/_components/collaborator-costs-section.tsx.ejs +884 -0
- package/hedhog/frontend/app/_components/collaborator-details-screen.tsx.ejs +94 -15
- package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +219 -94
- package/hedhog/frontend/app/_components/contract-details-screen.tsx.ejs +21 -32
- package/hedhog/frontend/app/_components/contract-form-screen.tsx.ejs +178 -89
- package/hedhog/frontend/app/_components/my-project-summary-screen.tsx.ejs +1185 -0
- package/hedhog/frontend/app/_components/operations-calendar-view.tsx.ejs +306 -0
- package/hedhog/frontend/app/_components/project-details-screen.tsx.ejs +943 -782
- package/hedhog/frontend/app/_components/task-detail-sheet.tsx.ejs +223 -0
- package/hedhog/frontend/app/_lib/api.ts.ejs +162 -0
- package/hedhog/frontend/app/_lib/types.ts.ejs +229 -3
- package/hedhog/frontend/app/_lib/utils/format.ts.ejs +11 -3
- package/hedhog/frontend/app/approvals/page.tsx.ejs +191 -46
- package/hedhog/frontend/app/collaborators/page.tsx.ejs +133 -25
- package/hedhog/frontend/app/my-projects/[id]/page.tsx.ejs +11 -0
- package/hedhog/frontend/app/my-projects/page.tsx.ejs +440 -0
- package/hedhog/frontend/app/my-tasks/page.tsx.ejs +1304 -0
- package/hedhog/frontend/app/reports/collaborators/page.tsx.ejs +771 -0
- package/hedhog/frontend/app/reports/projects/page.tsx.ejs +809 -0
- package/hedhog/frontend/app/timesheets/page.tsx.ejs +322 -58
- package/hedhog/frontend/messages/en.json +234 -25
- package/hedhog/frontend/messages/pt.json +234 -25
- package/hedhog/table/operations_collaborator.yaml +0 -4
- package/hedhog/table/operations_collaborator_compensation_history.yaml +28 -0
- package/hedhog/table/operations_collaborator_cost.yaml +56 -0
- package/hedhog/table/operations_cost_type.yaml +38 -0
- package/package.json +6 -6
- package/src/controllers/operations-collaborator-costs.controller.ts +147 -0
- package/src/controllers/operations-collaborators.controller.ts +19 -8
- package/src/controllers/operations-projects.controller.ts +19 -8
- package/src/controllers/operations-reports.controller.ts +32 -0
- package/src/controllers/operations-tasks.controller.ts +32 -12
- package/src/dto/create-collaborator-cost.dto.ts +78 -0
- package/src/dto/create-collaborator.dto.ts +9 -14
- package/src/dto/create-cost-type.dto.ts +62 -0
- package/src/dto/list-approvals.dto.ts +8 -0
- package/src/dto/list-collaborator-costs.dto.ts +8 -0
- package/src/dto/list-cost-types.dto.ts +19 -0
- package/src/dto/list-my-projects.dto.ts +8 -0
- package/src/dto/list-my-tasks.dto.ts +17 -0
- package/src/dto/list-projects.dto.ts +7 -1
- package/src/dto/list-reports.dto.ts +51 -0
- package/src/dto/list-tasks.dto.ts +11 -1
- package/src/dto/list-timesheets.dto.ts +8 -0
- package/src/dto/update-collaborator-cost.dto.ts +4 -0
- package/src/dto/update-task.dto.ts +6 -0
- package/src/operations.module.ts +7 -3
- package/src/operations.service.spec.ts +45 -7
- package/src/operations.service.ts +1992 -225
|
@@ -14,10 +14,12 @@ const core_1 = require("@hed-hog/core");
|
|
|
14
14
|
const common_1 = require("@nestjs/common");
|
|
15
15
|
const config_1 = require("@nestjs/config");
|
|
16
16
|
const operations_approvals_controller_1 = require("./controllers/operations-approvals.controller");
|
|
17
|
+
const operations_collaborator_costs_controller_1 = require("./controllers/operations-collaborator-costs.controller");
|
|
17
18
|
const operations_collaborators_controller_1 = require("./controllers/operations-collaborators.controller");
|
|
18
19
|
const operations_contracts_controller_1 = require("./controllers/operations-contracts.controller");
|
|
19
20
|
const operations_org_structure_controller_1 = require("./controllers/operations-org-structure.controller");
|
|
20
21
|
const operations_projects_controller_1 = require("./controllers/operations-projects.controller");
|
|
22
|
+
const operations_reports_controller_1 = require("./controllers/operations-reports.controller");
|
|
21
23
|
const operations_tasks_controller_1 = require("./controllers/operations-tasks.controller");
|
|
22
24
|
const operations_timesheets_controller_1 = require("./controllers/operations-timesheets.controller");
|
|
23
25
|
const operations_controller_1 = require("./operations.controller");
|
|
@@ -42,8 +44,10 @@ exports.OperationsModule = OperationsModule = __decorate([
|
|
|
42
44
|
controllers: [
|
|
43
45
|
operations_controller_1.OperationsController,
|
|
44
46
|
operations_collaborators_controller_1.OperationsCollaboratorsController,
|
|
47
|
+
operations_collaborator_costs_controller_1.OperationsCollaboratorCostsController,
|
|
45
48
|
operations_org_structure_controller_1.OperationsOrgStructureController,
|
|
46
49
|
operations_projects_controller_1.OperationsProjectsController,
|
|
50
|
+
operations_reports_controller_1.OperationsReportsController,
|
|
47
51
|
operations_tasks_controller_1.OperationsTasksController,
|
|
48
52
|
operations_contracts_controller_1.OperationsContractsController,
|
|
49
53
|
operations_timesheets_controller_1.OperationsTimesheetsController,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.module.js","sourceRoot":"","sources":["../src/operations.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAmD;AACnD,4DAA2D;AAC3D,oDAAmD;AACnD,wCAAuF;AACvF,2CAAoD;AACpD,2CAA8C;AAC9C,mGAA8F;AAC9F,2GAAsG;AACtG,mGAA8F;AAC9F,2GAAqG;AACrG,iGAA4F;AAC5F,2FAAsF;AACtF,qGAAgG;AAChG,mEAA+D;AAC/D,qFAAgF;AAChF,6DAAyD;AACzD,2FAAsF;
|
|
1
|
+
{"version":3,"file":"operations.module.js","sourceRoot":"","sources":["../src/operations.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAmD;AACnD,4DAA2D;AAC3D,oDAAmD;AACnD,wCAAuF;AACvF,2CAAoD;AACpD,2CAA8C;AAC9C,mGAA8F;AAC9F,qHAA+G;AAC/G,2GAAsG;AACtG,mGAA8F;AAC9F,2GAAqG;AACrG,iGAA4F;AAC5F,+FAA0F;AAC1F,2FAAsF;AACtF,qGAAgG;AAChG,mEAA+D;AAC/D,qFAAgF;AAChF,6DAAyD;AACzD,2FAAsF;AAgC/E,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IA9B5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,qBAAY,CAAC,OAAO,EAAE;YACtB,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,iCAAgB,CAAC;YAClC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,yBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,yBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,eAAQ,CAAC;YAC1B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,iBAAU,CAAC;YAC5B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAiB,CAAC;YACnC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,oBAAa,CAAC;SAChC;QACD,WAAW,EAAE;YACX,4CAAoB;YACpB,uEAAiC;YACjC,gFAAqC;YACrC,sEAAgC;YAChC,6DAA4B;YAC5B,2DAA2B;YAC3B,uDAAyB;YACzB,+DAA6B;YAC7B,iEAA8B;YAC9B,+DAA6B;SAC9B;QACD,SAAS,EAAE;YACT,sCAAiB;YACjB,mDAAuB;YACvB,6DAA4B;SAC7B;QACD,OAAO,EAAE,CAAC,sCAAiB,CAAC;KAC7B,CAAC;GACW,gBAAgB,CAAG"}
|
|
@@ -20,7 +20,6 @@ type CollaboratorPayload = {
|
|
|
20
20
|
collaboratorTypeId?: number | null;
|
|
21
21
|
collaboratorTypeSlug?: string | null;
|
|
22
22
|
collaboratorType?: string | null;
|
|
23
|
-
department?: string | null;
|
|
24
23
|
departmentId?: number | null;
|
|
25
24
|
jobTitleId?: number | null;
|
|
26
25
|
title?: string | null;
|
|
@@ -115,6 +114,16 @@ type ContractPayload = {
|
|
|
115
114
|
extractionStatus?: 'pending' | 'processing' | 'completed' | 'failed' | 'skipped';
|
|
116
115
|
extractionSummary?: string | null;
|
|
117
116
|
} | null;
|
|
117
|
+
additionalUploadedDocuments?: Array<{
|
|
118
|
+
fileId?: number | null;
|
|
119
|
+
fileName: string;
|
|
120
|
+
mimeType: string;
|
|
121
|
+
fileContentBase64?: string | null;
|
|
122
|
+
notes?: string | null;
|
|
123
|
+
extractionStatus?: 'pending' | 'processing' | 'completed' | 'failed' | 'skipped';
|
|
124
|
+
extractionSummary?: string | null;
|
|
125
|
+
}> | null;
|
|
126
|
+
deletedDocumentIds?: number[] | null;
|
|
118
127
|
};
|
|
119
128
|
type ProposalApprovedEventPayload = {
|
|
120
129
|
proposalId?: number;
|
|
@@ -307,6 +316,7 @@ type TaskPayload = {
|
|
|
307
316
|
estimateHours?: number | null;
|
|
308
317
|
position?: number;
|
|
309
318
|
tags?: string | null;
|
|
319
|
+
archived?: boolean;
|
|
310
320
|
};
|
|
311
321
|
type QuickTimesheetEntryPayload = {
|
|
312
322
|
projectId?: number | null;
|
|
@@ -559,6 +569,10 @@ export declare class OperationsService {
|
|
|
559
569
|
active: number;
|
|
560
570
|
onLeave: number;
|
|
561
571
|
withContracts: number;
|
|
572
|
+
totalSalary: number;
|
|
573
|
+
totalCosts: number;
|
|
574
|
+
avgSalaryPlusCosts: number;
|
|
575
|
+
avgSalaryPlusCostsPerCollaborator: number;
|
|
562
576
|
}>;
|
|
563
577
|
getMyCollaborator(userId: number): Promise<{
|
|
564
578
|
assignedProjects: Record<string, unknown>[];
|
|
@@ -774,6 +788,16 @@ export declare class OperationsService {
|
|
|
774
788
|
compensationAmount: number | null;
|
|
775
789
|
activeAssignments: number;
|
|
776
790
|
}>;
|
|
791
|
+
getCollaboratorCompensationHistory(userId: number, collaboratorId: number): Promise<{
|
|
792
|
+
id: number;
|
|
793
|
+
collaboratorId: number;
|
|
794
|
+
amount: string;
|
|
795
|
+
effectiveDate: string | null;
|
|
796
|
+
actorUserId: number | null;
|
|
797
|
+
actorName: string | null;
|
|
798
|
+
notes: string | null;
|
|
799
|
+
createdAt: string;
|
|
800
|
+
}[]>;
|
|
777
801
|
listDepartments(userId: number, filters?: {
|
|
778
802
|
page?: number;
|
|
779
803
|
pageSize?: number;
|
|
@@ -831,6 +855,7 @@ export declare class OperationsService {
|
|
|
831
855
|
sortField?: string;
|
|
832
856
|
sortOrder?: string;
|
|
833
857
|
status?: string;
|
|
858
|
+
myOnly?: boolean;
|
|
834
859
|
}): Promise<Record<string, unknown>[] | {
|
|
835
860
|
total: number;
|
|
836
861
|
lastPage: number;
|
|
@@ -875,6 +900,8 @@ export declare class OperationsService {
|
|
|
875
900
|
projectId?: number;
|
|
876
901
|
projectAssignmentId?: number;
|
|
877
902
|
status?: string;
|
|
903
|
+
myOnly?: boolean;
|
|
904
|
+
archived?: boolean;
|
|
878
905
|
}): Promise<{
|
|
879
906
|
total: number;
|
|
880
907
|
lastPage: number;
|
|
@@ -888,11 +915,19 @@ export declare class OperationsService {
|
|
|
888
915
|
name: string;
|
|
889
916
|
description: string | null;
|
|
890
917
|
status: string;
|
|
918
|
+
priority: string;
|
|
891
919
|
projectId: number;
|
|
892
|
-
projectAssignmentId: number;
|
|
920
|
+
projectAssignmentId: number | null;
|
|
893
921
|
projectName: string;
|
|
894
922
|
projectCode: string | null;
|
|
923
|
+
dueDate: string | null;
|
|
924
|
+
estimateHours: number | null;
|
|
925
|
+
tags: string | null;
|
|
926
|
+
assigneeName: string | null;
|
|
927
|
+
assigneeUserPhotoId: number | null;
|
|
928
|
+
assigneePersonAvatarId: number | null;
|
|
895
929
|
createdAt: string;
|
|
930
|
+
deletedAt: string | null;
|
|
896
931
|
}[];
|
|
897
932
|
}>;
|
|
898
933
|
createTask(userId: number, data: TaskPayload): Promise<{
|
|
@@ -912,6 +947,7 @@ export declare class OperationsService {
|
|
|
912
947
|
projectAssignmentId: number | null;
|
|
913
948
|
projectId: number | null;
|
|
914
949
|
createdAt: string;
|
|
950
|
+
deletedAt: string | null;
|
|
915
951
|
}>;
|
|
916
952
|
updateTask(userId: number, taskId: number, data: Partial<TaskPayload>): Promise<{
|
|
917
953
|
id: number;
|
|
@@ -930,8 +966,9 @@ export declare class OperationsService {
|
|
|
930
966
|
projectAssignmentId: number | null;
|
|
931
967
|
projectId: number | null;
|
|
932
968
|
createdAt: string;
|
|
969
|
+
deletedAt: string | null;
|
|
933
970
|
}>;
|
|
934
|
-
removeTask(userId: number, taskId: number): Promise<{
|
|
971
|
+
removeTask(userId: number, taskId: number, permanent?: boolean): Promise<{
|
|
935
972
|
success: boolean;
|
|
936
973
|
}>;
|
|
937
974
|
listTimesheetEntries(userId: number, paginationParams: {
|
|
@@ -1220,6 +1257,8 @@ export declare class OperationsService {
|
|
|
1220
1257
|
sortField?: string;
|
|
1221
1258
|
sortOrder?: string;
|
|
1222
1259
|
status?: string;
|
|
1260
|
+
dateFrom?: string;
|
|
1261
|
+
dateTo?: string;
|
|
1223
1262
|
}): Promise<{
|
|
1224
1263
|
id: number;
|
|
1225
1264
|
collaboratorId: number;
|
|
@@ -1302,6 +1341,8 @@ export declare class OperationsService {
|
|
|
1302
1341
|
sortOrder?: string;
|
|
1303
1342
|
status?: string;
|
|
1304
1343
|
targetType?: string;
|
|
1344
|
+
dateFrom?: string;
|
|
1345
|
+
dateTo?: string;
|
|
1305
1346
|
}): Promise<Record<string, unknown>[] | {
|
|
1306
1347
|
total: number;
|
|
1307
1348
|
lastPage: number;
|
|
@@ -1498,6 +1539,7 @@ export declare class OperationsService {
|
|
|
1498
1539
|
private replaceTimesheetEntries;
|
|
1499
1540
|
private refreshTimesheetTotal;
|
|
1500
1541
|
private cleanupEmptyEditableTimesheet;
|
|
1542
|
+
private submitTimesheetForApproval;
|
|
1501
1543
|
private upsertApproval;
|
|
1502
1544
|
private applyApprovedScheduleAdjustmentIfNeeded;
|
|
1503
1545
|
private insertApprovalHistory;
|
|
@@ -1520,6 +1562,8 @@ export declare class OperationsService {
|
|
|
1520
1562
|
private syncHiringContractDraft;
|
|
1521
1563
|
private replaceContractParties;
|
|
1522
1564
|
private replaceContractDocument;
|
|
1565
|
+
private appendContractDocuments;
|
|
1566
|
+
private softDeleteContractDocuments;
|
|
1523
1567
|
private resolveContractExtractionFile;
|
|
1524
1568
|
private buildContractExtractionFile;
|
|
1525
1569
|
private renderContractPdfBuffer;
|
|
@@ -1529,6 +1573,7 @@ export declare class OperationsService {
|
|
|
1529
1573
|
private humanizeEnumLabel;
|
|
1530
1574
|
private escapeHtml;
|
|
1531
1575
|
private insertContractHistory;
|
|
1576
|
+
private insertCollaboratorCompensationHistory;
|
|
1532
1577
|
private generateCollaboratorCode;
|
|
1533
1578
|
private generateContractCode;
|
|
1534
1579
|
private generateContractContentHtml;
|
|
@@ -1559,13 +1604,422 @@ export declare class OperationsService {
|
|
|
1559
1604
|
private requireFields;
|
|
1560
1605
|
private buildIdFilter;
|
|
1561
1606
|
private uniqueNumbers;
|
|
1607
|
+
private normalizeIntegerId;
|
|
1562
1608
|
private pushUpdate;
|
|
1563
1609
|
private param;
|
|
1564
1610
|
private groupBy;
|
|
1565
1611
|
private queryRows;
|
|
1566
1612
|
private querySingle;
|
|
1567
1613
|
private execute;
|
|
1614
|
+
private shiftSqlPlaceholders;
|
|
1568
1615
|
private getNextCollaboratorTypeSortOrder;
|
|
1616
|
+
listMyProjects(userId: number, filters?: {
|
|
1617
|
+
page?: number;
|
|
1618
|
+
pageSize?: number;
|
|
1619
|
+
search?: string;
|
|
1620
|
+
sortField?: string;
|
|
1621
|
+
sortOrder?: string;
|
|
1622
|
+
status?: string;
|
|
1623
|
+
}): Promise<Record<string, unknown>[] | {
|
|
1624
|
+
total: number;
|
|
1625
|
+
lastPage: number;
|
|
1626
|
+
page: number;
|
|
1627
|
+
pageSize: number;
|
|
1628
|
+
prev: number;
|
|
1629
|
+
next: number;
|
|
1630
|
+
data: Record<string, unknown>[];
|
|
1631
|
+
}>;
|
|
1632
|
+
getMyProjectSummary(userId: number, projectId: number): Promise<{
|
|
1633
|
+
assignments: {
|
|
1634
|
+
id: number;
|
|
1635
|
+
collaboratorId: number;
|
|
1636
|
+
collaboratorName: string;
|
|
1637
|
+
roleLabel: string | null;
|
|
1638
|
+
status: string;
|
|
1639
|
+
avatarId: number | null;
|
|
1640
|
+
userPhotoId: number | null;
|
|
1641
|
+
}[];
|
|
1642
|
+
tasks: Record<string, unknown>[];
|
|
1643
|
+
id: number;
|
|
1644
|
+
code: string;
|
|
1645
|
+
name: string;
|
|
1646
|
+
status: string;
|
|
1647
|
+
summary: string | null;
|
|
1648
|
+
startDate: string | null;
|
|
1649
|
+
endDate: string | null;
|
|
1650
|
+
myAssignmentId: number | null;
|
|
1651
|
+
myRoleLabel: string | null;
|
|
1652
|
+
}>;
|
|
1653
|
+
listMyTasks(userId: number, paginationParams?: {
|
|
1654
|
+
page?: number;
|
|
1655
|
+
pageSize?: number;
|
|
1656
|
+
search?: string;
|
|
1657
|
+
sortField?: string;
|
|
1658
|
+
sortOrder?: string;
|
|
1659
|
+
status?: string;
|
|
1660
|
+
archived?: boolean;
|
|
1661
|
+
}): Promise<{
|
|
1662
|
+
total: number;
|
|
1663
|
+
lastPage: number;
|
|
1664
|
+
page: number;
|
|
1665
|
+
pageSize: number;
|
|
1666
|
+
prev: number;
|
|
1667
|
+
next: number;
|
|
1668
|
+
data: {
|
|
1669
|
+
label: string;
|
|
1670
|
+
id: number;
|
|
1671
|
+
name: string;
|
|
1672
|
+
description: string | null;
|
|
1673
|
+
status: string;
|
|
1674
|
+
priority: string;
|
|
1675
|
+
projectId: number;
|
|
1676
|
+
projectAssignmentId: number | null;
|
|
1677
|
+
projectName: string;
|
|
1678
|
+
projectCode: string | null;
|
|
1679
|
+
dueDate: string | null;
|
|
1680
|
+
estimateHours: number | null;
|
|
1681
|
+
tags: string | null;
|
|
1682
|
+
assigneeName: string | null;
|
|
1683
|
+
assigneeUserPhotoId: number | null;
|
|
1684
|
+
assigneePersonAvatarId: number | null;
|
|
1685
|
+
createdAt: string;
|
|
1686
|
+
deletedAt: string | null;
|
|
1687
|
+
}[];
|
|
1688
|
+
}>;
|
|
1689
|
+
listCostTypes(userId: number, filters?: {
|
|
1690
|
+
search?: string;
|
|
1691
|
+
active?: boolean;
|
|
1692
|
+
pageSize?: number;
|
|
1693
|
+
page?: number;
|
|
1694
|
+
}): Promise<{
|
|
1695
|
+
id: number;
|
|
1696
|
+
slug: string;
|
|
1697
|
+
name: string;
|
|
1698
|
+
code: string | null;
|
|
1699
|
+
category: string | null;
|
|
1700
|
+
description: string | null;
|
|
1701
|
+
defaultRecurrence: string | null;
|
|
1702
|
+
isAllocatable: boolean | null;
|
|
1703
|
+
isDepreciable: boolean | null;
|
|
1704
|
+
isActive: boolean;
|
|
1705
|
+
createdAt: string;
|
|
1706
|
+
}[]>;
|
|
1707
|
+
createCostType(userId: number, data: {
|
|
1708
|
+
name: string;
|
|
1709
|
+
slug?: string | null;
|
|
1710
|
+
code?: string | null;
|
|
1711
|
+
category?: string | null;
|
|
1712
|
+
description?: string | null;
|
|
1713
|
+
defaultRecurrence?: string | null;
|
|
1714
|
+
isAllocatable?: boolean | null;
|
|
1715
|
+
isDepreciable?: boolean | null;
|
|
1716
|
+
isActive?: boolean;
|
|
1717
|
+
}): Promise<{
|
|
1718
|
+
id: number;
|
|
1719
|
+
slug: string;
|
|
1720
|
+
name: string;
|
|
1721
|
+
code: string | null;
|
|
1722
|
+
category: string | null;
|
|
1723
|
+
description: string | null;
|
|
1724
|
+
defaultRecurrence: string | null;
|
|
1725
|
+
isAllocatable: boolean | null;
|
|
1726
|
+
isDepreciable: boolean | null;
|
|
1727
|
+
isActive: boolean;
|
|
1728
|
+
}>;
|
|
1729
|
+
listCollaboratorCosts(userId: number, collaboratorId: number): Promise<{
|
|
1730
|
+
id: number;
|
|
1731
|
+
collaboratorId: number;
|
|
1732
|
+
costTypeId: number;
|
|
1733
|
+
costTypeName: string;
|
|
1734
|
+
costTypeSlug: string;
|
|
1735
|
+
amount: string;
|
|
1736
|
+
currency: string;
|
|
1737
|
+
recurrence: string;
|
|
1738
|
+
allocatable: boolean;
|
|
1739
|
+
referenceDate: string | null;
|
|
1740
|
+
startDate: string | null;
|
|
1741
|
+
endDate: string | null;
|
|
1742
|
+
depreciationMonths: number | null;
|
|
1743
|
+
description: string | null;
|
|
1744
|
+
notes: string | null;
|
|
1745
|
+
createdAt: string;
|
|
1746
|
+
}[]>;
|
|
1747
|
+
getCollaboratorCostsSummary(userId: number, collaboratorId: number): Promise<{
|
|
1748
|
+
monthlyTotal: number;
|
|
1749
|
+
allocatableTotal: number;
|
|
1750
|
+
nonAllocatableTotal: number;
|
|
1751
|
+
count: number;
|
|
1752
|
+
}>;
|
|
1753
|
+
getProjectsReport(userId: number, filters?: {
|
|
1754
|
+
from?: string;
|
|
1755
|
+
to?: string;
|
|
1756
|
+
status?: string;
|
|
1757
|
+
client?: string;
|
|
1758
|
+
scenario?: string;
|
|
1759
|
+
}): Promise<{
|
|
1760
|
+
filters: {
|
|
1761
|
+
from: string;
|
|
1762
|
+
to: string;
|
|
1763
|
+
status: string;
|
|
1764
|
+
client: string;
|
|
1765
|
+
scenario: string;
|
|
1766
|
+
clients: string[];
|
|
1767
|
+
};
|
|
1768
|
+
summary: {
|
|
1769
|
+
contractedRevenue: number;
|
|
1770
|
+
recognizedRevenue: number;
|
|
1771
|
+
realizedCost: number;
|
|
1772
|
+
forecastCost: number;
|
|
1773
|
+
profit: number;
|
|
1774
|
+
margin: number;
|
|
1775
|
+
plannedHours: number;
|
|
1776
|
+
actualHours: number;
|
|
1777
|
+
billableHours: number;
|
|
1778
|
+
reworkHours: number;
|
|
1779
|
+
backlogValue: number;
|
|
1780
|
+
avgDeadline: number;
|
|
1781
|
+
avgAllocation: number;
|
|
1782
|
+
atRisk: number;
|
|
1783
|
+
burnRate: number;
|
|
1784
|
+
};
|
|
1785
|
+
forecast: {
|
|
1786
|
+
month: string;
|
|
1787
|
+
revenue: number;
|
|
1788
|
+
cost: number;
|
|
1789
|
+
profit: number;
|
|
1790
|
+
backlog: number;
|
|
1791
|
+
planned: number;
|
|
1792
|
+
actual: number;
|
|
1793
|
+
}[];
|
|
1794
|
+
costComposition: {
|
|
1795
|
+
name: string;
|
|
1796
|
+
value: number;
|
|
1797
|
+
}[];
|
|
1798
|
+
hoursByProject: {
|
|
1799
|
+
project: string;
|
|
1800
|
+
Faturável: number;
|
|
1801
|
+
Interno: number;
|
|
1802
|
+
Retrabalho: number;
|
|
1803
|
+
Livre: number;
|
|
1804
|
+
}[];
|
|
1805
|
+
health: {
|
|
1806
|
+
project: string;
|
|
1807
|
+
margem: number;
|
|
1808
|
+
prazo: number;
|
|
1809
|
+
alocacao: number;
|
|
1810
|
+
saude: number;
|
|
1811
|
+
}[];
|
|
1812
|
+
ranking: {
|
|
1813
|
+
name: string;
|
|
1814
|
+
Lucro: number;
|
|
1815
|
+
Custo: number;
|
|
1816
|
+
}[];
|
|
1817
|
+
progress: {
|
|
1818
|
+
month: string;
|
|
1819
|
+
Planejado: number;
|
|
1820
|
+
Realizado: number;
|
|
1821
|
+
}[];
|
|
1822
|
+
planningCards: {
|
|
1823
|
+
title: string;
|
|
1824
|
+
value: string;
|
|
1825
|
+
description: string;
|
|
1826
|
+
}[];
|
|
1827
|
+
rows: {
|
|
1828
|
+
id: number;
|
|
1829
|
+
name: string;
|
|
1830
|
+
client: string;
|
|
1831
|
+
manager: string;
|
|
1832
|
+
squad: string;
|
|
1833
|
+
status: string;
|
|
1834
|
+
contractType: string;
|
|
1835
|
+
priority: string;
|
|
1836
|
+
startDate: string;
|
|
1837
|
+
endDate: string;
|
|
1838
|
+
contractedRevenue: number;
|
|
1839
|
+
recognizedRevenue: number;
|
|
1840
|
+
realizedCost: number;
|
|
1841
|
+
forecastCost: number;
|
|
1842
|
+
teamCost: number;
|
|
1843
|
+
infraCost: number;
|
|
1844
|
+
licenseCost: number;
|
|
1845
|
+
thirdPartyCost: number;
|
|
1846
|
+
reworkCost: number;
|
|
1847
|
+
plannedHours: number;
|
|
1848
|
+
actualHours: number;
|
|
1849
|
+
billableHours: number;
|
|
1850
|
+
reworkHours: number;
|
|
1851
|
+
internalHours: number;
|
|
1852
|
+
allocatedCapacity: number;
|
|
1853
|
+
physicalProgress: number;
|
|
1854
|
+
financialProgress: number;
|
|
1855
|
+
backlogValue: number;
|
|
1856
|
+
futureDeliveries: number;
|
|
1857
|
+
risk: string;
|
|
1858
|
+
recommendation: string;
|
|
1859
|
+
}[];
|
|
1860
|
+
}>;
|
|
1861
|
+
getCollaboratorsReport(userId: number, filters?: {
|
|
1862
|
+
from?: string;
|
|
1863
|
+
to?: string;
|
|
1864
|
+
department?: string;
|
|
1865
|
+
contractType?: string;
|
|
1866
|
+
scenario?: string;
|
|
1867
|
+
}): Promise<{
|
|
1868
|
+
filters: {
|
|
1869
|
+
from: string;
|
|
1870
|
+
to: string;
|
|
1871
|
+
department: string;
|
|
1872
|
+
contractType: string;
|
|
1873
|
+
scenario: string;
|
|
1874
|
+
departments: string[];
|
|
1875
|
+
contractTypes: string[];
|
|
1876
|
+
};
|
|
1877
|
+
summary: {
|
|
1878
|
+
cost: number;
|
|
1879
|
+
salary: number;
|
|
1880
|
+
benefits: number;
|
|
1881
|
+
taxes: number;
|
|
1882
|
+
tools: number;
|
|
1883
|
+
billableValue: number;
|
|
1884
|
+
profit: number;
|
|
1885
|
+
margin: number;
|
|
1886
|
+
availableHours: number;
|
|
1887
|
+
allocatedHours: number;
|
|
1888
|
+
billableHours: number;
|
|
1889
|
+
internalHours: number;
|
|
1890
|
+
overtimeHours: number;
|
|
1891
|
+
freeHours: number;
|
|
1892
|
+
allocation: number;
|
|
1893
|
+
utilization: number;
|
|
1894
|
+
overloadCount: number;
|
|
1895
|
+
hourlyCost: number;
|
|
1896
|
+
};
|
|
1897
|
+
forecast: {
|
|
1898
|
+
month: string;
|
|
1899
|
+
revenue: number;
|
|
1900
|
+
cost: number;
|
|
1901
|
+
profit: number;
|
|
1902
|
+
margin: number;
|
|
1903
|
+
capacity: number;
|
|
1904
|
+
}[];
|
|
1905
|
+
costComposition: {
|
|
1906
|
+
name: string;
|
|
1907
|
+
value: number;
|
|
1908
|
+
}[];
|
|
1909
|
+
capacityByDepartment: {
|
|
1910
|
+
department: string;
|
|
1911
|
+
Faturável: number;
|
|
1912
|
+
Interno: number;
|
|
1913
|
+
Livre: number;
|
|
1914
|
+
Sobrecarga: number;
|
|
1915
|
+
}[];
|
|
1916
|
+
health: {
|
|
1917
|
+
department: string;
|
|
1918
|
+
margem: number;
|
|
1919
|
+
alocacao: number;
|
|
1920
|
+
utilizacao: number;
|
|
1921
|
+
saude: number;
|
|
1922
|
+
}[];
|
|
1923
|
+
ranking: {
|
|
1924
|
+
name: string;
|
|
1925
|
+
Custo: number;
|
|
1926
|
+
Lucro: number;
|
|
1927
|
+
}[];
|
|
1928
|
+
planningCards: {
|
|
1929
|
+
title: string;
|
|
1930
|
+
value: string;
|
|
1931
|
+
description: string;
|
|
1932
|
+
}[];
|
|
1933
|
+
rows: {
|
|
1934
|
+
id: number;
|
|
1935
|
+
name: string;
|
|
1936
|
+
role: string;
|
|
1937
|
+
seniority: string;
|
|
1938
|
+
department: string;
|
|
1939
|
+
contractType: string;
|
|
1940
|
+
startDate: string;
|
|
1941
|
+
endDate: string;
|
|
1942
|
+
salaryCost: number;
|
|
1943
|
+
benefitsCost: number;
|
|
1944
|
+
taxesCost: number;
|
|
1945
|
+
toolsCost: number;
|
|
1946
|
+
billableValue: number;
|
|
1947
|
+
availableHours: number;
|
|
1948
|
+
allocatedHours: number;
|
|
1949
|
+
billableHours: number;
|
|
1950
|
+
internalHours: number;
|
|
1951
|
+
overtimeHours: number;
|
|
1952
|
+
projects: number;
|
|
1953
|
+
risk: string;
|
|
1954
|
+
recommendation: string;
|
|
1955
|
+
}[];
|
|
1956
|
+
}>;
|
|
1957
|
+
deleteCollaboratorCostById(userId: number, costId: number): Promise<{
|
|
1958
|
+
success: boolean;
|
|
1959
|
+
}>;
|
|
1960
|
+
createCollaboratorCost(userId: number, collaboratorId: number, data: {
|
|
1961
|
+
costTypeId: number;
|
|
1962
|
+
amount: number;
|
|
1963
|
+
currency?: string;
|
|
1964
|
+
recurrence?: string;
|
|
1965
|
+
allocatable?: boolean;
|
|
1966
|
+
referenceDate?: string | null;
|
|
1967
|
+
startDate?: string | null;
|
|
1968
|
+
endDate?: string | null;
|
|
1969
|
+
depreciationMonths?: number | null;
|
|
1970
|
+
description?: string | null;
|
|
1971
|
+
notes?: string | null;
|
|
1972
|
+
}): Promise<{
|
|
1973
|
+
id: number;
|
|
1974
|
+
collaboratorId: number;
|
|
1975
|
+
costTypeId: number;
|
|
1976
|
+
costTypeName: string;
|
|
1977
|
+
costTypeSlug: string;
|
|
1978
|
+
amount: string;
|
|
1979
|
+
currency: string;
|
|
1980
|
+
recurrence: string;
|
|
1981
|
+
allocatable: boolean;
|
|
1982
|
+
referenceDate: string | null;
|
|
1983
|
+
startDate: string | null;
|
|
1984
|
+
endDate: string | null;
|
|
1985
|
+
depreciationMonths: number | null;
|
|
1986
|
+
description: string | null;
|
|
1987
|
+
notes: string | null;
|
|
1988
|
+
createdAt: string;
|
|
1989
|
+
}>;
|
|
1990
|
+
updateCollaboratorCost(userId: number, collaboratorId: number, costId: number, data: Partial<{
|
|
1991
|
+
costTypeId: number;
|
|
1992
|
+
amount: number;
|
|
1993
|
+
currency: string;
|
|
1994
|
+
recurrence: string;
|
|
1995
|
+
allocatable: boolean;
|
|
1996
|
+
referenceDate: string | null;
|
|
1997
|
+
startDate: string | null;
|
|
1998
|
+
endDate: string | null;
|
|
1999
|
+
depreciationMonths: number | null;
|
|
2000
|
+
description: string | null;
|
|
2001
|
+
notes: string | null;
|
|
2002
|
+
}>): Promise<{
|
|
2003
|
+
id: number;
|
|
2004
|
+
collaboratorId: number;
|
|
2005
|
+
costTypeId: number;
|
|
2006
|
+
costTypeName: string;
|
|
2007
|
+
costTypeSlug: string;
|
|
2008
|
+
amount: string;
|
|
2009
|
+
currency: string;
|
|
2010
|
+
recurrence: string;
|
|
2011
|
+
allocatable: boolean;
|
|
2012
|
+
referenceDate: string | null;
|
|
2013
|
+
startDate: string | null;
|
|
2014
|
+
endDate: string | null;
|
|
2015
|
+
depreciationMonths: number | null;
|
|
2016
|
+
description: string | null;
|
|
2017
|
+
notes: string | null;
|
|
2018
|
+
createdAt: string;
|
|
2019
|
+
}>;
|
|
2020
|
+
deleteCollaboratorCost(userId: number, collaboratorId: number, costId: number): Promise<{
|
|
2021
|
+
success: boolean;
|
|
2022
|
+
}>;
|
|
1569
2023
|
}
|
|
1570
2024
|
export {};
|
|
1571
2025
|
//# sourceMappingURL=operations.service.d.ts.map
|