@hed-hog/operations 0.0.330 → 0.0.331
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/README.md +5 -5
- package/dist/controllers/operations-collaborators.controller.d.ts +7 -216
- package/dist/controllers/operations-collaborators.controller.d.ts.map +1 -1
- package/dist/controllers/operations-contracts.controller.d.ts +6 -6
- package/dist/controllers/operations-projects.controller.d.ts +25 -0
- package/dist/controllers/operations-projects.controller.d.ts.map +1 -1
- package/dist/controllers/operations-projects.controller.js +48 -0
- package/dist/controllers/operations-projects.controller.js.map +1 -1
- package/dist/controllers/operations-reports.controller.d.ts +1 -1
- package/dist/controllers/operations-tasks.controller.d.ts +34 -9
- package/dist/controllers/operations-tasks.controller.d.ts.map +1 -1
- package/dist/controllers/operations-tasks.controller.js +43 -32
- package/dist/controllers/operations-tasks.controller.js.map +1 -1
- package/dist/controllers/operations-timesheets.controller.d.ts +9 -9
- package/dist/dashboard/components/DashboardLayout.d.ts +30 -0
- package/dist/dashboard/components/DashboardLayout.d.ts.map +1 -0
- package/dist/dashboard/components/DashboardLayout.js +87 -0
- package/dist/dashboard/components/DashboardLayout.js.map +1 -0
- package/dist/dashboard/components/widget-registry.d.ts +23 -0
- package/dist/dashboard/components/widget-registry.d.ts.map +1 -0
- package/dist/dashboard/components/widget-registry.js +245 -0
- package/dist/dashboard/components/widget-registry.js.map +1 -0
- package/dist/dashboard/hooks/useDashboardData.d.ts +20 -0
- package/dist/dashboard/hooks/useDashboardData.d.ts.map +1 -0
- package/dist/dashboard/hooks/useDashboardData.js +24 -0
- package/dist/dashboard/hooks/useDashboardData.js.map +1 -0
- package/dist/dashboard/types/widgets.types.d.ts +233 -0
- package/dist/dashboard/types/widgets.types.d.ts.map +1 -0
- package/dist/dashboard/types/widgets.types.js +6 -0
- package/dist/dashboard/types/widgets.types.js.map +1 -0
- package/dist/dashboard/widgets/CapacityDistribution.d.ts +23 -0
- package/dist/dashboard/widgets/CapacityDistribution.d.ts.map +1 -0
- package/dist/dashboard/widgets/CapacityDistribution.js +11 -0
- package/dist/dashboard/widgets/CapacityDistribution.js.map +1 -0
- package/dist/dashboard/widgets/EffortByProject.d.ts +22 -0
- package/dist/dashboard/widgets/EffortByProject.d.ts.map +1 -0
- package/dist/dashboard/widgets/EffortByProject.js +11 -0
- package/dist/dashboard/widgets/EffortByProject.js.map +1 -0
- package/dist/dashboard/widgets/HeadcountByArea.d.ts +24 -0
- package/dist/dashboard/widgets/HeadcountByArea.d.ts.map +1 -0
- package/dist/dashboard/widgets/HeadcountByArea.js +11 -0
- package/dist/dashboard/widgets/HeadcountByArea.js.map +1 -0
- package/dist/dashboard/widgets/ManagedProjectsStatus.d.ts +18 -0
- package/dist/dashboard/widgets/ManagedProjectsStatus.d.ts.map +1 -0
- package/dist/dashboard/widgets/ManagedProjectsStatus.js +12 -0
- package/dist/dashboard/widgets/ManagedProjectsStatus.js.map +1 -0
- package/dist/dashboard/widgets/MyHoursPeriodKpi.d.ts +22 -0
- package/dist/dashboard/widgets/MyHoursPeriodKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/MyHoursPeriodKpi.js +12 -0
- package/dist/dashboard/widgets/MyHoursPeriodKpi.js.map +1 -0
- package/dist/dashboard/widgets/MyOpenRequestsKpi.d.ts +19 -0
- package/dist/dashboard/widgets/MyOpenRequestsKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/MyOpenRequestsKpi.js +17 -0
- package/dist/dashboard/widgets/MyOpenRequestsKpi.js.map +1 -0
- package/dist/dashboard/widgets/MyPendingRequestsList.d.ts +23 -0
- package/dist/dashboard/widgets/MyPendingRequestsList.d.ts.map +1 -0
- package/dist/dashboard/widgets/MyPendingRequestsList.js +14 -0
- package/dist/dashboard/widgets/MyPendingRequestsList.js.map +1 -0
- package/dist/dashboard/widgets/MyProjectAllocationsKpi.d.ts +22 -0
- package/dist/dashboard/widgets/MyProjectAllocationsKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/MyProjectAllocationsKpi.js +11 -0
- package/dist/dashboard/widgets/MyProjectAllocationsKpi.js.map +1 -0
- package/dist/dashboard/widgets/MyQuickActions.d.ts +23 -0
- package/dist/dashboard/widgets/MyQuickActions.d.ts.map +1 -0
- package/dist/dashboard/widgets/MyQuickActions.js +18 -0
- package/dist/dashboard/widgets/MyQuickActions.js.map +1 -0
- package/dist/dashboard/widgets/MyRelevantDeadlines.d.ts +23 -0
- package/dist/dashboard/widgets/MyRelevantDeadlines.d.ts.map +1 -0
- package/dist/dashboard/widgets/MyRelevantDeadlines.js +22 -0
- package/dist/dashboard/widgets/MyRelevantDeadlines.js.map +1 -0
- package/dist/dashboard/widgets/MyTimesheetStatusKpi.d.ts +17 -0
- package/dist/dashboard/widgets/MyTimesheetStatusKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/MyTimesheetStatusKpi.js +11 -0
- package/dist/dashboard/widgets/MyTimesheetStatusKpi.js.map +1 -0
- package/dist/dashboard/widgets/MyWeeklyJourney.d.ts +21 -0
- package/dist/dashboard/widgets/MyWeeklyJourney.d.ts.map +1 -0
- package/dist/dashboard/widgets/MyWeeklyJourney.js +19 -0
- package/dist/dashboard/widgets/MyWeeklyJourney.js.map +1 -0
- package/dist/dashboard/widgets/PortfolioCostsKpi.d.ts +19 -0
- package/dist/dashboard/widgets/PortfolioCostsKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/PortfolioCostsKpi.js +12 -0
- package/dist/dashboard/widgets/PortfolioCostsKpi.js.map +1 -0
- package/dist/dashboard/widgets/PortfolioEffortKpi.d.ts +18 -0
- package/dist/dashboard/widgets/PortfolioEffortKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/PortfolioEffortKpi.js +8 -0
- package/dist/dashboard/widgets/PortfolioEffortKpi.js.map +1 -0
- package/dist/dashboard/widgets/PortfolioProjectsKpi.d.ts +22 -0
- package/dist/dashboard/widgets/PortfolioProjectsKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/PortfolioProjectsKpi.js +56 -0
- package/dist/dashboard/widgets/PortfolioProjectsKpi.js.map +1 -0
- package/dist/dashboard/widgets/PortfolioRiskKpi.d.ts +19 -0
- package/dist/dashboard/widgets/PortfolioRiskKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/PortfolioRiskKpi.js +11 -0
- package/dist/dashboard/widgets/PortfolioRiskKpi.js.map +1 -0
- package/dist/dashboard/widgets/ProjectStatusOverview.d.ts +19 -0
- package/dist/dashboard/widgets/ProjectStatusOverview.d.ts.map +1 -0
- package/dist/dashboard/widgets/ProjectStatusOverview.js +18 -0
- package/dist/dashboard/widgets/ProjectStatusOverview.js.map +1 -0
- package/dist/dashboard/widgets/StrategicDeadlines.d.ts +24 -0
- package/dist/dashboard/widgets/StrategicDeadlines.d.ts.map +1 -0
- package/dist/dashboard/widgets/StrategicDeadlines.js +22 -0
- package/dist/dashboard/widgets/StrategicDeadlines.js.map +1 -0
- package/dist/dashboard/widgets/TeamApprovalQueue.d.ts +24 -0
- package/dist/dashboard/widgets/TeamApprovalQueue.d.ts.map +1 -0
- package/dist/dashboard/widgets/TeamApprovalQueue.js +12 -0
- package/dist/dashboard/widgets/TeamApprovalQueue.js.map +1 -0
- package/dist/dashboard/widgets/TeamCapacityKpi.d.ts +18 -0
- package/dist/dashboard/widgets/TeamCapacityKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/TeamCapacityKpi.js +19 -0
- package/dist/dashboard/widgets/TeamCapacityKpi.js.map +1 -0
- package/dist/dashboard/widgets/TeamHeadcountKpi.d.ts +22 -0
- package/dist/dashboard/widgets/TeamHeadcountKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/TeamHeadcountKpi.js +56 -0
- package/dist/dashboard/widgets/TeamHeadcountKpi.js.map +1 -0
- package/dist/dashboard/widgets/TeamHoursKpi.d.ts +19 -0
- package/dist/dashboard/widgets/TeamHoursKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/TeamHoursKpi.js +13 -0
- package/dist/dashboard/widgets/TeamHoursKpi.js.map +1 -0
- package/dist/dashboard/widgets/TeamPendingApprovalsKpi.d.ts +20 -0
- package/dist/dashboard/widgets/TeamPendingApprovalsKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/TeamPendingApprovalsKpi.js +11 -0
- package/dist/dashboard/widgets/TeamPendingApprovalsKpi.js.map +1 -0
- package/dist/dashboard/widgets/TeamUtilizationOverview.d.ts +18 -0
- package/dist/dashboard/widgets/TeamUtilizationOverview.d.ts.map +1 -0
- package/dist/dashboard/widgets/TeamUtilizationOverview.js +17 -0
- package/dist/dashboard/widgets/TeamUtilizationOverview.js.map +1 -0
- package/dist/dashboard/widgets/TeamWorkloadAlerts.d.ts +24 -0
- package/dist/dashboard/widgets/TeamWorkloadAlerts.d.ts.map +1 -0
- package/dist/dashboard/widgets/TeamWorkloadAlerts.js +19 -0
- package/dist/dashboard/widgets/TeamWorkloadAlerts.js.map +1 -0
- package/dist/dashboard/widgets/index.d.ts +24 -0
- package/dist/dashboard/widgets/index.d.ts.map +1 -0
- package/dist/dashboard/widgets/index.js +54 -0
- package/dist/dashboard/widgets/index.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/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/operations.controller.d.ts +42 -0
- package/dist/operations.controller.d.ts.map +1 -1
- package/dist/operations.service.d.ts +182 -268
- package/dist/operations.service.d.ts.map +1 -1
- package/dist/operations.service.js +2147 -1337
- package/dist/operations.service.js.map +1 -1
- package/dist/operations.service.spec.js +345 -174
- package/dist/operations.service.spec.js.map +1 -1
- package/hedhog/data/dashboard_component.yaml +66 -0
- package/hedhog/data/dashboard_item.yaml +25 -25
- package/hedhog/data/route.yaml +61 -0
- package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +39 -99
- package/hedhog/frontend/app/_components/collaborator-picker.tsx.ejs +158 -0
- package/hedhog/frontend/app/_components/my-project-summary-screen.tsx.ejs +314 -116
- package/hedhog/frontend/app/_components/project-assignments-tab.tsx.ejs +434 -449
- package/hedhog/frontend/app/_components/project-details-screen.tsx.ejs +289 -412
- package/hedhog/frontend/app/_components/project-file-attachments.tsx.ejs +371 -0
- package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +426 -374
- package/hedhog/frontend/app/_components/task-detail-sheet.tsx.ejs +803 -581
- package/hedhog/frontend/app/_components/task-file-attachments.tsx.ejs +4 -1
- package/hedhog/frontend/app/_components/task-form-fields.tsx.ejs +406 -0
- package/hedhog/frontend/app/_components/task-form-sheet.tsx.ejs +629 -784
- package/hedhog/frontend/app/_components/task-info-display.tsx.ejs +137 -0
- package/hedhog/frontend/app/_components/timesheet-entry-create-sheet.tsx.ejs +306 -0
- package/hedhog/frontend/app/_lib/api.ts.ejs +480 -476
- package/hedhog/frontend/app/_lib/types.ts.ejs +66 -5
- package/hedhog/frontend/app/_lib/utils/format.ts.ejs +0 -2
- package/hedhog/frontend/app/_lib/utils/task-ui.ts.ejs +43 -0
- package/hedhog/frontend/app/approvals/page.tsx.ejs +6 -1
- package/hedhog/frontend/app/collaborator-types/page.tsx.ejs +6 -1
- package/hedhog/frontend/app/collaborators/page.tsx.ejs +59 -8
- package/hedhog/frontend/app/contracts/page.tsx.ejs +29 -8
- package/hedhog/frontend/app/dashboard/widgets/CapacityDistribution.tsx.ejs +84 -0
- package/hedhog/frontend/app/dashboard/widgets/EffortByProject.tsx.ejs +85 -0
- package/hedhog/frontend/app/dashboard/widgets/HeadcountByArea.tsx.ejs +101 -0
- package/hedhog/frontend/app/dashboard/widgets/ManagedProjectsStatus.tsx.ejs +113 -0
- package/hedhog/frontend/app/dashboard/widgets/MyHoursPeriodKpi.tsx.ejs +87 -0
- package/hedhog/frontend/app/dashboard/widgets/MyOpenRequestsKpi.tsx.ejs +97 -0
- package/hedhog/frontend/app/dashboard/widgets/MyPendingRequestsList.tsx.ejs +99 -0
- package/hedhog/frontend/app/dashboard/widgets/MyProjectAllocationsKpi.tsx.ejs +78 -0
- package/hedhog/frontend/app/dashboard/widgets/MyQuickActions.tsx.ejs +130 -0
- package/hedhog/frontend/app/dashboard/widgets/MyRelevantDeadlines.tsx.ejs +144 -0
- package/hedhog/frontend/app/dashboard/widgets/MyTimesheetStatusKpi.tsx.ejs +78 -0
- package/hedhog/frontend/app/dashboard/widgets/MyWeeklyJourney.tsx.ejs +99 -0
- package/hedhog/frontend/app/dashboard/widgets/PortfolioCostsKpi.tsx.ejs +112 -0
- package/hedhog/frontend/app/dashboard/widgets/PortfolioEffortKpi.tsx.ejs +93 -0
- package/hedhog/frontend/app/dashboard/widgets/PortfolioProjectsKpi.tsx.ejs +96 -0
- package/hedhog/frontend/app/dashboard/widgets/PortfolioRiskKpi.tsx.ejs +115 -0
- package/hedhog/frontend/app/dashboard/widgets/ProjectStatusOverview.tsx.ejs +120 -0
- package/hedhog/frontend/app/dashboard/widgets/StrategicDeadlines.tsx.ejs +146 -0
- package/hedhog/frontend/app/dashboard/widgets/TeamApprovalQueue.tsx.ejs +108 -0
- package/hedhog/frontend/app/dashboard/widgets/TeamCapacityKpi.tsx.ejs +97 -0
- package/hedhog/frontend/app/dashboard/widgets/TeamHeadcountKpi.tsx.ejs +100 -0
- package/hedhog/frontend/app/dashboard/widgets/TeamHoursKpi.tsx.ejs +104 -0
- package/hedhog/frontend/app/dashboard/widgets/TeamPendingApprovalsKpi.tsx.ejs +110 -0
- package/hedhog/frontend/app/dashboard/widgets/TeamUtilizationOverview.tsx.ejs +115 -0
- package/hedhog/frontend/app/dashboard/widgets/TeamWorkloadAlerts.tsx.ejs +117 -0
- package/hedhog/frontend/app/dashboard/widgets/index.ts.ejs +26 -0
- package/hedhog/frontend/app/departments/page.tsx.ejs +6 -1
- package/hedhog/frontend/app/my-projects/page.tsx.ejs +14 -10
- package/hedhog/frontend/app/my-tasks/page.tsx.ejs +328 -105
- package/hedhog/frontend/app/project-cost-categories/page.tsx.ejs +58 -52
- package/hedhog/frontend/app/project-cost-types/page.tsx.ejs +58 -51
- package/hedhog/frontend/app/projects/page.tsx.ejs +376 -30
- package/hedhog/frontend/app/schedule-adjustments/page.tsx.ejs +6 -1
- package/hedhog/frontend/app/time-off/page.tsx.ejs +6 -1
- package/hedhog/frontend/app/timesheets/page.tsx.ejs +10 -4
- package/hedhog/frontend/messages/en.json +238 -46
- package/hedhog/frontend/messages/operations/en.json +61 -52
- package/hedhog/frontend/messages/operations/pt.json +59 -43
- package/hedhog/frontend/messages/pt.json +238 -46
- package/hedhog/frontend/widgets/capacity-distribution.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/effort-by-project.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/headcount-by-area.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/index.ts.ejs +25 -0
- package/hedhog/frontend/widgets/managed-projects-status.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/my-hours-period-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/my-open-requests-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/my-pending-requests-list.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/my-project-allocations-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/my-quick-actions.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/my-relevant-deadlines.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/my-timesheet-status-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/my-weekly-journey.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/portfolio-costs-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/portfolio-effort-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/portfolio-projects-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/portfolio-risk-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/project-status-overview.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/shared-operations-widget.tsx.ejs +170 -0
- package/hedhog/frontend/widgets/strategic-deadlines.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/team-approval-queue.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/team-capacity-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/team-headcount-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/team-hours-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/team-pending-approvals-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/team-utilization-overview.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/team-workload-alerts.tsx.ejs +17 -0
- package/hedhog/table/operations_collaborator.yaml +8 -13
- package/hedhog/table/operations_project.yaml +1 -1
- package/hedhog/table/operations_project_file.yaml +23 -0
- package/hedhog/table/operations_task.yaml +76 -69
- package/hedhog/table/operations_task_activity.yaml +51 -0
- package/package.json +6 -5
- package/src/controllers/operations-projects.controller.ts +41 -8
- package/src/controllers/operations-tasks.controller.ts +156 -166
- package/src/dashboard/README.md +214 -0
- package/src/dashboard/components/DashboardLayout.tsx +131 -0
- package/src/dashboard/components/widget-registry.ts +255 -0
- package/src/dashboard/hooks/useDashboardData.ts +29 -0
- package/src/dashboard/types/widgets.types.ts +237 -0
- package/src/dashboard/widgets/CapacityDistribution.tsx +56 -0
- package/src/dashboard/widgets/EffortByProject.tsx +51 -0
- package/src/dashboard/widgets/HeadcountByArea.tsx +57 -0
- package/src/dashboard/widgets/ManagedProjectsStatus.tsx +53 -0
- package/src/dashboard/widgets/MyHoursPeriodKpi.tsx +87 -0
- package/src/dashboard/widgets/MyOpenRequestsKpi.tsx +51 -0
- package/src/dashboard/widgets/MyPendingRequestsList.tsx +63 -0
- package/src/dashboard/widgets/MyProjectAllocationsKpi.tsx +57 -0
- package/src/dashboard/widgets/MyQuickActions.tsx +62 -0
- package/src/dashboard/widgets/MyRelevantDeadlines.tsx +84 -0
- package/src/dashboard/widgets/MyTimesheetStatusKpi.tsx +65 -0
- package/src/dashboard/widgets/MyWeeklyJourney.tsx +57 -0
- package/src/dashboard/widgets/PortfolioCostsKpi.tsx +48 -0
- package/src/dashboard/widgets/PortfolioEffortKpi.tsx +41 -0
- package/src/dashboard/widgets/PortfolioRiskKpi.tsx +50 -0
- package/src/dashboard/widgets/ProjectStatusOverview.tsx +52 -0
- package/src/dashboard/widgets/StrategicDeadlines.tsx +93 -0
- package/src/dashboard/widgets/TeamApprovalQueue.tsx +70 -0
- package/src/dashboard/widgets/TeamCapacityKpi.tsx +50 -0
- package/src/dashboard/widgets/TeamHoursKpi.tsx +51 -0
- package/src/dashboard/widgets/TeamPendingApprovalsKpi.tsx +53 -0
- package/src/dashboard/widgets/TeamUtilizationOverview.tsx +62 -0
- package/src/dashboard/widgets/TeamWorkloadAlerts.tsx +81 -0
- package/src/dashboard/widgets/index.ts +26 -0
- package/src/dto/create-collaborator.dto.ts +4 -11
- package/src/index.ts +3 -0
- package/src/operations.service.spec.ts +988 -764
- package/src/operations.service.ts +4277 -2535
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LocaleService } from
|
|
2
|
-
import { PrismaService } from
|
|
1
|
+
import { LocaleService } from "@hed-hog/api-locale";
|
|
2
|
+
import { PrismaService } from "@hed-hog/api-prisma";
|
|
3
3
|
import { AiService, FileService, IntegrationDeveloperApiService, SettingService } from '@hed-hog/core';
|
|
4
4
|
import { OperationsAccessService } from './services/shared/operations-access.service';
|
|
5
5
|
declare const CONTRACT_CATEGORY_VALUES: readonly ["employee", "contractor", "client", "supplier", "vendor", "partner", "internal", "other"];
|
|
@@ -12,8 +12,9 @@ declare const ORIGIN_TYPE_VALUES: readonly ["manual", "employee_hiring", "client
|
|
|
12
12
|
declare const CONTRACT_DOCUMENT_TYPE_VALUES: readonly ["source_upload", "generated_pdf", "attachment", "other"];
|
|
13
13
|
declare const CONTRACT_DOCUMENT_EXTRACTION_STATUS_VALUES: readonly ["pending", "processing", "completed", "failed", "skipped"];
|
|
14
14
|
declare const TASK_STATUS_VALUES: readonly ["todo", "doing", "review", "done"];
|
|
15
|
+
declare const TASK_ACTIVITY_ACTION_VALUES: readonly ["status_changed", "task_created", "task_deleted", "task_restored", "assignee_changed", "priority_changed", "due_date_changed", "name_changed", "description_changed", "comment_added", "comment_updated", "comment_removed", "file_added", "file_removed"];
|
|
16
|
+
type TaskActivityAction = (typeof TASK_ACTIVITY_ACTION_VALUES)[number];
|
|
15
17
|
type CollaboratorPayload = {
|
|
16
|
-
userId?: number | null;
|
|
17
18
|
personId?: number | null;
|
|
18
19
|
code?: string | null;
|
|
19
20
|
displayName?: string | null;
|
|
@@ -26,7 +27,7 @@ type CollaboratorPayload = {
|
|
|
26
27
|
levelLabel?: string | null;
|
|
27
28
|
supervisorCollaboratorId?: number | null;
|
|
28
29
|
weeklyCapacityHours?: number | null;
|
|
29
|
-
status?:
|
|
30
|
+
status?: "draft" | "active" | "on_leave" | "inactive";
|
|
30
31
|
joinedAt?: string | null;
|
|
31
32
|
leftAt?: string | null;
|
|
32
33
|
compensationAmount?: number | null;
|
|
@@ -36,14 +37,14 @@ type CollaboratorPayload = {
|
|
|
36
37
|
contractDescription?: string | null;
|
|
37
38
|
autoGenerateContractDraft?: boolean;
|
|
38
39
|
weeklySchedule?: Array<{
|
|
39
|
-
weekday:
|
|
40
|
+
weekday: "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
|
|
40
41
|
isWorkingDay?: boolean;
|
|
41
42
|
startTime?: string | null;
|
|
42
43
|
endTime?: string | null;
|
|
43
44
|
breakMinutes?: number | null;
|
|
44
45
|
}>;
|
|
45
46
|
equityParticipation?: {
|
|
46
|
-
participationType?:
|
|
47
|
+
participationType?: "partner_quota_holder" | "common_shareholder" | "preferred_shareholder" | "administrator" | "other";
|
|
47
48
|
percentage?: number | null;
|
|
48
49
|
votingPower?: number | null;
|
|
49
50
|
startDate?: string | null;
|
|
@@ -56,7 +57,7 @@ type DepartmentPayload = {
|
|
|
56
57
|
code?: string | null;
|
|
57
58
|
name?: string | null;
|
|
58
59
|
description?: string | null;
|
|
59
|
-
status?:
|
|
60
|
+
status?: "active" | "inactive";
|
|
60
61
|
};
|
|
61
62
|
type JobTitlePayload = DepartmentPayload;
|
|
62
63
|
type CollaboratorTypePayload = {
|
|
@@ -66,7 +67,7 @@ type CollaboratorTypePayload = {
|
|
|
66
67
|
category?: string | null;
|
|
67
68
|
isActive?: boolean;
|
|
68
69
|
sortOrder?: number | null;
|
|
69
|
-
status?:
|
|
70
|
+
status?: "active" | "inactive";
|
|
70
71
|
};
|
|
71
72
|
type ProjectRolePayload = {
|
|
72
73
|
code?: string | null;
|
|
@@ -79,14 +80,14 @@ type ContractPayload = {
|
|
|
79
80
|
code?: string | null;
|
|
80
81
|
name?: string | null;
|
|
81
82
|
clientName?: string | null;
|
|
82
|
-
contractCategory?:
|
|
83
|
-
contractType?:
|
|
84
|
-
billingModel?:
|
|
85
|
-
signatureStatus?:
|
|
83
|
+
contractCategory?: "employee" | "contractor" | "client" | "supplier" | "vendor" | "partner" | "internal" | "other";
|
|
84
|
+
contractType?: "clt" | "pj" | "freelancer_agreement" | "service_agreement" | "fixed_term" | "recurring_service" | "nda" | "amendment" | "addendum" | "other";
|
|
85
|
+
billingModel?: "time_and_material" | "monthly_retainer" | "fixed_price";
|
|
86
|
+
signatureStatus?: "not_started" | "pending" | "partially_signed" | "signed" | "expired";
|
|
86
87
|
isActive?: boolean;
|
|
87
88
|
accountManagerCollaboratorId?: number | null;
|
|
88
89
|
relatedCollaboratorId?: number | null;
|
|
89
|
-
originType?:
|
|
90
|
+
originType?: "manual" | "employee_hiring" | "client_project" | "crm_proposal";
|
|
90
91
|
originId?: number | null;
|
|
91
92
|
startDate?: string | null;
|
|
92
93
|
endDate?: string | null;
|
|
@@ -94,14 +95,14 @@ type ContractPayload = {
|
|
|
94
95
|
effectiveDate?: string | null;
|
|
95
96
|
budgetAmount?: number | null;
|
|
96
97
|
monthlyHourCap?: number | null;
|
|
97
|
-
status?:
|
|
98
|
-
creationMode?:
|
|
98
|
+
status?: "draft" | "under_review" | "active" | "renewal" | "expired" | "closed" | "archived";
|
|
99
|
+
creationMode?: "blank" | "template" | "upload" | "duplicate";
|
|
99
100
|
wizardStep?: number | null;
|
|
100
101
|
description?: string | null;
|
|
101
102
|
contentHtml?: string | null;
|
|
102
103
|
parties?: Array<{
|
|
103
|
-
partyRole?:
|
|
104
|
-
partyType?:
|
|
104
|
+
partyRole?: "employee" | "employer" | "client" | "supplier" | "vendor" | "partner" | "witness" | "internal_owner" | "other";
|
|
105
|
+
partyType?: "individual" | "company" | "internal_team" | "other";
|
|
105
106
|
displayName: string;
|
|
106
107
|
documentNumber?: string | null;
|
|
107
108
|
email?: string | null;
|
|
@@ -114,7 +115,7 @@ type ContractPayload = {
|
|
|
114
115
|
mimeType: string;
|
|
115
116
|
fileContentBase64?: string | null;
|
|
116
117
|
notes?: string | null;
|
|
117
|
-
extractionStatus?:
|
|
118
|
+
extractionStatus?: "pending" | "processing" | "completed" | "failed" | "skipped";
|
|
118
119
|
extractionSummary?: string | null;
|
|
119
120
|
} | null;
|
|
120
121
|
additionalUploadedDocuments?: Array<{
|
|
@@ -123,7 +124,7 @@ type ContractPayload = {
|
|
|
123
124
|
mimeType: string;
|
|
124
125
|
fileContentBase64?: string | null;
|
|
125
126
|
notes?: string | null;
|
|
126
|
-
extractionStatus?:
|
|
127
|
+
extractionStatus?: "pending" | "processing" | "completed" | "failed" | "skipped";
|
|
127
128
|
extractionSummary?: string | null;
|
|
128
129
|
}> | null;
|
|
129
130
|
deletedDocumentIds?: number[] | null;
|
|
@@ -150,9 +151,9 @@ type ProposalApprovedEventPayload = {
|
|
|
150
151
|
validFrom?: string | null;
|
|
151
152
|
validUntil?: string | null;
|
|
152
153
|
commercialTerms?: {
|
|
153
|
-
contractCategory?: ContractPayload[
|
|
154
|
-
contractType?: ContractPayload[
|
|
155
|
-
billingModel?: ContractPayload[
|
|
154
|
+
contractCategory?: ContractPayload["contractCategory"];
|
|
155
|
+
contractType?: ContractPayload["contractType"];
|
|
156
|
+
billingModel?: ContractPayload["billingModel"];
|
|
156
157
|
validFrom?: string | null;
|
|
157
158
|
validUntil?: string | null;
|
|
158
159
|
notes?: string | null;
|
|
@@ -160,9 +161,9 @@ type ProposalApprovedEventPayload = {
|
|
|
160
161
|
proposal?: {
|
|
161
162
|
code?: string | null;
|
|
162
163
|
title?: string | null;
|
|
163
|
-
contractCategory?: ContractPayload[
|
|
164
|
-
contractType?: ContractPayload[
|
|
165
|
-
billingModel?: ContractPayload[
|
|
164
|
+
contractCategory?: ContractPayload["contractCategory"];
|
|
165
|
+
contractType?: ContractPayload["contractType"];
|
|
166
|
+
billingModel?: ContractPayload["billingModel"];
|
|
166
167
|
validFrom?: string | null;
|
|
167
168
|
validUntil?: string | null;
|
|
168
169
|
totalAmount?: number | null;
|
|
@@ -187,8 +188,8 @@ type ProposalApprovedEventPayload = {
|
|
|
187
188
|
items?: Array<{
|
|
188
189
|
name?: string | null;
|
|
189
190
|
description?: string | null;
|
|
190
|
-
termType?:
|
|
191
|
-
recurrence?:
|
|
191
|
+
termType?: "value" | "payment" | "revenue" | "fine" | "other";
|
|
192
|
+
recurrence?: "one_time" | "monthly" | "quarterly" | "yearly" | "other";
|
|
192
193
|
dueDay?: number | null;
|
|
193
194
|
amount?: number | null;
|
|
194
195
|
totalAmountCents?: number | null;
|
|
@@ -260,7 +261,7 @@ type ContractDetailsRecord = ContractDetailRecord & {
|
|
|
260
261
|
mainRelatedPartyName: string | null;
|
|
261
262
|
projects: ContractProjectSummary[];
|
|
262
263
|
scheduleSummary: ContractScheduleDay[];
|
|
263
|
-
parties: NonNullable<ContractPayload[
|
|
264
|
+
parties: NonNullable<ContractPayload["parties"]>;
|
|
264
265
|
documents: ContractDocumentRecord[];
|
|
265
266
|
history: ContractHistoryRecord[];
|
|
266
267
|
};
|
|
@@ -272,13 +273,13 @@ type ProjectPayload = {
|
|
|
272
273
|
name: string;
|
|
273
274
|
clientName?: string | null;
|
|
274
275
|
summary?: string | null;
|
|
275
|
-
status?:
|
|
276
|
+
status?: "planning" | "active" | "paused" | "completed" | "archived";
|
|
276
277
|
progressPercent?: number | null;
|
|
277
|
-
deliveryModel?:
|
|
278
|
+
deliveryModel?: "dedicated_team" | "shared_team" | "project_delivery" | "support";
|
|
278
279
|
budgetAmount?: number | null;
|
|
279
280
|
startDate?: string | null;
|
|
280
281
|
endDate?: string | null;
|
|
281
|
-
billingModel?:
|
|
282
|
+
billingModel?: "time_and_material" | "monthly_retainer" | "fixed_price";
|
|
282
283
|
monthlyHourCap?: number | null;
|
|
283
284
|
contractCode?: string | null;
|
|
284
285
|
contractName?: string | null;
|
|
@@ -292,7 +293,7 @@ type ProjectPayload = {
|
|
|
292
293
|
isBillable?: boolean;
|
|
293
294
|
startDate?: string | null;
|
|
294
295
|
endDate?: string | null;
|
|
295
|
-
status?:
|
|
296
|
+
status?: "planned" | "active" | "completed" | "cancelled";
|
|
296
297
|
}>;
|
|
297
298
|
};
|
|
298
299
|
type TimesheetEntryPayload = {
|
|
@@ -304,7 +305,7 @@ type TimesheetEntryPayload = {
|
|
|
304
305
|
hours?: number | null;
|
|
305
306
|
duration?: number | null;
|
|
306
307
|
durationMinutes?: number | null;
|
|
307
|
-
unit?:
|
|
308
|
+
unit?: "hours" | "minutes";
|
|
308
309
|
description?: string | null;
|
|
309
310
|
};
|
|
310
311
|
type TaskPayload = {
|
|
@@ -313,7 +314,7 @@ type TaskPayload = {
|
|
|
313
314
|
assigneeCollaboratorId?: number | null;
|
|
314
315
|
name?: string | null;
|
|
315
316
|
description?: string | null;
|
|
316
|
-
priority?:
|
|
317
|
+
priority?: "low" | "medium" | "high";
|
|
317
318
|
status?: (typeof TASK_STATUS_VALUES)[number];
|
|
318
319
|
dueDate?: string | null;
|
|
319
320
|
estimateHours?: number | null;
|
|
@@ -332,6 +333,18 @@ type TaskCommentRecord = {
|
|
|
332
333
|
createdAt: string;
|
|
333
334
|
updatedAt: string | null;
|
|
334
335
|
};
|
|
336
|
+
type TaskActivityRecord = {
|
|
337
|
+
id: number;
|
|
338
|
+
taskId: number;
|
|
339
|
+
actorCollaboratorId: number | null;
|
|
340
|
+
actorName: string | null;
|
|
341
|
+
actorUserPhotoId: number | null;
|
|
342
|
+
actorPersonAvatarId: number | null;
|
|
343
|
+
action: TaskActivityAction;
|
|
344
|
+
fromStatus: (typeof TASK_STATUS_VALUES)[number] | null;
|
|
345
|
+
toStatus: (typeof TASK_STATUS_VALUES)[number] | null;
|
|
346
|
+
createdAt: string;
|
|
347
|
+
};
|
|
335
348
|
type QuickTimesheetEntryPayload = {
|
|
336
349
|
projectId?: number | null;
|
|
337
350
|
projectAssignmentId?: number | null;
|
|
@@ -340,7 +353,7 @@ type QuickTimesheetEntryPayload = {
|
|
|
340
353
|
activityLabel?: string | null;
|
|
341
354
|
workDate: string;
|
|
342
355
|
duration: number;
|
|
343
|
-
unit?:
|
|
356
|
+
unit?: "hours" | "minutes";
|
|
344
357
|
description?: string | null;
|
|
345
358
|
};
|
|
346
359
|
type TimesheetPayload = {
|
|
@@ -352,14 +365,14 @@ type TimesheetPayload = {
|
|
|
352
365
|
};
|
|
353
366
|
type TimeOffPayload = {
|
|
354
367
|
collaboratorId?: number | null;
|
|
355
|
-
requestType?:
|
|
368
|
+
requestType?: "vacation" | "personal_time" | "sick_leave" | "unpaid_leave" | "other";
|
|
356
369
|
startDate: string;
|
|
357
370
|
endDate: string;
|
|
358
371
|
totalDays?: number | null;
|
|
359
372
|
reason?: string | null;
|
|
360
373
|
};
|
|
361
374
|
type ScheduleAdjustmentDayPayload = {
|
|
362
|
-
weekday:
|
|
375
|
+
weekday: "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
|
|
363
376
|
isWorkingDay?: boolean;
|
|
364
377
|
startTime?: string | null;
|
|
365
378
|
endTime?: string | null;
|
|
@@ -367,7 +380,7 @@ type ScheduleAdjustmentDayPayload = {
|
|
|
367
380
|
};
|
|
368
381
|
type ScheduleAdjustmentPayload = {
|
|
369
382
|
collaboratorId?: number | null;
|
|
370
|
-
requestScope?:
|
|
383
|
+
requestScope?: "temporary" | "permanent";
|
|
371
384
|
effectiveStartDate: string;
|
|
372
385
|
effectiveEndDate?: string | null;
|
|
373
386
|
reason?: string | null;
|
|
@@ -542,6 +555,48 @@ export declare class OperationsService {
|
|
|
542
555
|
scheduleAdjustmentRequests: number;
|
|
543
556
|
pendingApprovals: number;
|
|
544
557
|
};
|
|
558
|
+
windowDays: number;
|
|
559
|
+
taskSummary: {
|
|
560
|
+
total: number;
|
|
561
|
+
backlog: number;
|
|
562
|
+
inProgress: number;
|
|
563
|
+
completed: number;
|
|
564
|
+
};
|
|
565
|
+
avgTaskCompletionHours: number;
|
|
566
|
+
completedTasksInWindow: number;
|
|
567
|
+
hoursInExecution: number;
|
|
568
|
+
timesheetHeatmap: {
|
|
569
|
+
workDate: string;
|
|
570
|
+
weekday: number;
|
|
571
|
+
hours: number;
|
|
572
|
+
}[];
|
|
573
|
+
activeProjects: {
|
|
574
|
+
id: number;
|
|
575
|
+
name: string;
|
|
576
|
+
code: string;
|
|
577
|
+
taskBacklog: number;
|
|
578
|
+
taskInProgress: number;
|
|
579
|
+
taskCompleted: number;
|
|
580
|
+
}[];
|
|
581
|
+
recentTaskActivities: {
|
|
582
|
+
taskId: number;
|
|
583
|
+
taskName: string;
|
|
584
|
+
taskStatus: string;
|
|
585
|
+
taskPriority: string | null;
|
|
586
|
+
taskDueDate: string | null;
|
|
587
|
+
taskEstimateHours: number | null;
|
|
588
|
+
taskTags: string | null;
|
|
589
|
+
taskAssigneeCollaboratorId: number | null;
|
|
590
|
+
taskAssigneeName: string | null;
|
|
591
|
+
projectId: number;
|
|
592
|
+
projectName: string;
|
|
593
|
+
projectCode: string | null;
|
|
594
|
+
projectAssignmentId: number | null;
|
|
595
|
+
action: string | null;
|
|
596
|
+
fromStatus: string;
|
|
597
|
+
toStatus: string;
|
|
598
|
+
createdAt: string;
|
|
599
|
+
}[];
|
|
545
600
|
recentTimesheets: {
|
|
546
601
|
id: number;
|
|
547
602
|
collaboratorName: string;
|
|
@@ -562,14 +617,14 @@ export declare class OperationsService {
|
|
|
562
617
|
collaboratorTypeId?: number;
|
|
563
618
|
departmentId?: number;
|
|
564
619
|
jobTitleId?: number;
|
|
565
|
-
}): Promise<
|
|
620
|
+
}): Promise<any[] | {
|
|
566
621
|
total: number;
|
|
567
622
|
lastPage: number;
|
|
568
623
|
page: number;
|
|
569
624
|
pageSize: number;
|
|
570
625
|
prev: number;
|
|
571
626
|
next: number;
|
|
572
|
-
data:
|
|
627
|
+
data: any[];
|
|
573
628
|
}>;
|
|
574
629
|
getCollaboratorStats(userId: number, filters?: {
|
|
575
630
|
search?: string;
|
|
@@ -578,118 +633,9 @@ export declare class OperationsService {
|
|
|
578
633
|
collaboratorTypeId?: number;
|
|
579
634
|
departmentId?: number;
|
|
580
635
|
jobTitleId?: number;
|
|
581
|
-
}): Promise<
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
onLeave: number;
|
|
585
|
-
withContracts: number;
|
|
586
|
-
totalSalary: number;
|
|
587
|
-
totalCosts: number;
|
|
588
|
-
avgSalaryPlusCosts: number;
|
|
589
|
-
avgSalaryPlusCostsPerCollaborator: number;
|
|
590
|
-
}>;
|
|
591
|
-
getMyCollaborator(userId: number): Promise<{
|
|
592
|
-
assignedProjects: Record<string, unknown>[];
|
|
593
|
-
relatedContracts: Record<string, unknown>[];
|
|
594
|
-
weeklySchedule: Record<string, unknown>[];
|
|
595
|
-
equityParticipation: {
|
|
596
|
-
participationType: string;
|
|
597
|
-
percentage: number | null;
|
|
598
|
-
votingPower: number | null;
|
|
599
|
-
startDate: string | null;
|
|
600
|
-
endDate: string | null;
|
|
601
|
-
notes: string | null;
|
|
602
|
-
};
|
|
603
|
-
timesheetSummary: {
|
|
604
|
-
totalTimesheets: number;
|
|
605
|
-
pendingTimesheets: number;
|
|
606
|
-
totalHours: number;
|
|
607
|
-
};
|
|
608
|
-
timeOffSummary: {
|
|
609
|
-
totalRequests: number;
|
|
610
|
-
pendingRequests: number;
|
|
611
|
-
approvedRequests: number;
|
|
612
|
-
};
|
|
613
|
-
scheduleAdjustmentRequests: Record<string, unknown>[];
|
|
614
|
-
id: number;
|
|
615
|
-
userId: number | null;
|
|
616
|
-
personId: number | null;
|
|
617
|
-
personName: string | null;
|
|
618
|
-
personAvatarId: number | null;
|
|
619
|
-
code: string;
|
|
620
|
-
collaboratorTypeId: number | null;
|
|
621
|
-
collaboratorTypeSlug: string | null;
|
|
622
|
-
collaboratorType: string | null;
|
|
623
|
-
displayName: string;
|
|
624
|
-
departmentId: number | null;
|
|
625
|
-
department: string | null;
|
|
626
|
-
jobTitleId: number | null;
|
|
627
|
-
title: string | null;
|
|
628
|
-
levelLabel: string | null;
|
|
629
|
-
weeklyCapacityHours: number | null;
|
|
630
|
-
hourlyRate: number | null;
|
|
631
|
-
status: string;
|
|
632
|
-
joinedAt: string | null;
|
|
633
|
-
leftAt: string | null;
|
|
634
|
-
notes: string | null;
|
|
635
|
-
supervisorId: number | null;
|
|
636
|
-
supervisorName: string | null;
|
|
637
|
-
contractId: number | null;
|
|
638
|
-
contractStatus: string | null;
|
|
639
|
-
compensationAmount: number | null;
|
|
640
|
-
activeAssignments: number;
|
|
641
|
-
}>;
|
|
642
|
-
getCollaboratorByIdForUser(userId: number, collaboratorId: number): Promise<{
|
|
643
|
-
assignedProjects: Record<string, unknown>[];
|
|
644
|
-
relatedContracts: Record<string, unknown>[];
|
|
645
|
-
weeklySchedule: Record<string, unknown>[];
|
|
646
|
-
equityParticipation: {
|
|
647
|
-
participationType: string;
|
|
648
|
-
percentage: number | null;
|
|
649
|
-
votingPower: number | null;
|
|
650
|
-
startDate: string | null;
|
|
651
|
-
endDate: string | null;
|
|
652
|
-
notes: string | null;
|
|
653
|
-
};
|
|
654
|
-
timesheetSummary: {
|
|
655
|
-
totalTimesheets: number;
|
|
656
|
-
pendingTimesheets: number;
|
|
657
|
-
totalHours: number;
|
|
658
|
-
};
|
|
659
|
-
timeOffSummary: {
|
|
660
|
-
totalRequests: number;
|
|
661
|
-
pendingRequests: number;
|
|
662
|
-
approvedRequests: number;
|
|
663
|
-
};
|
|
664
|
-
scheduleAdjustmentRequests: Record<string, unknown>[];
|
|
665
|
-
id: number;
|
|
666
|
-
userId: number | null;
|
|
667
|
-
personId: number | null;
|
|
668
|
-
personName: string | null;
|
|
669
|
-
personAvatarId: number | null;
|
|
670
|
-
code: string;
|
|
671
|
-
collaboratorTypeId: number | null;
|
|
672
|
-
collaboratorTypeSlug: string | null;
|
|
673
|
-
collaboratorType: string | null;
|
|
674
|
-
displayName: string;
|
|
675
|
-
departmentId: number | null;
|
|
676
|
-
department: string | null;
|
|
677
|
-
jobTitleId: number | null;
|
|
678
|
-
title: string | null;
|
|
679
|
-
levelLabel: string | null;
|
|
680
|
-
weeklyCapacityHours: number | null;
|
|
681
|
-
hourlyRate: number | null;
|
|
682
|
-
status: string;
|
|
683
|
-
joinedAt: string | null;
|
|
684
|
-
leftAt: string | null;
|
|
685
|
-
notes: string | null;
|
|
686
|
-
supervisorId: number | null;
|
|
687
|
-
supervisorName: string | null;
|
|
688
|
-
contractId: number | null;
|
|
689
|
-
contractStatus: string | null;
|
|
690
|
-
compensationAmount: number | null;
|
|
691
|
-
activeAssignments: number;
|
|
692
|
-
}>;
|
|
636
|
+
}): Promise<any>;
|
|
637
|
+
getMyCollaborator(userId: number): Promise<any>;
|
|
638
|
+
getCollaboratorByIdForUser(userId: number, collaboratorId: number): Promise<any>;
|
|
693
639
|
getTeam(userId: number): Promise<{
|
|
694
640
|
teamMembers: Record<string, unknown>[];
|
|
695
641
|
projectCount: number;
|
|
@@ -704,108 +650,8 @@ export declare class OperationsService {
|
|
|
704
650
|
pendingTimeOffRequests: Record<string, unknown>[];
|
|
705
651
|
pendingScheduleAdjustmentRequests: Record<string, unknown>[];
|
|
706
652
|
}>;
|
|
707
|
-
createCollaborator(userId: number, data: CollaboratorPayload): Promise<
|
|
708
|
-
|
|
709
|
-
relatedContracts: Record<string, unknown>[];
|
|
710
|
-
weeklySchedule: Record<string, unknown>[];
|
|
711
|
-
equityParticipation: {
|
|
712
|
-
participationType: string;
|
|
713
|
-
percentage: number | null;
|
|
714
|
-
votingPower: number | null;
|
|
715
|
-
startDate: string | null;
|
|
716
|
-
endDate: string | null;
|
|
717
|
-
notes: string | null;
|
|
718
|
-
};
|
|
719
|
-
timesheetSummary: {
|
|
720
|
-
totalTimesheets: number;
|
|
721
|
-
pendingTimesheets: number;
|
|
722
|
-
totalHours: number;
|
|
723
|
-
};
|
|
724
|
-
timeOffSummary: {
|
|
725
|
-
totalRequests: number;
|
|
726
|
-
pendingRequests: number;
|
|
727
|
-
approvedRequests: number;
|
|
728
|
-
};
|
|
729
|
-
scheduleAdjustmentRequests: Record<string, unknown>[];
|
|
730
|
-
id: number;
|
|
731
|
-
userId: number | null;
|
|
732
|
-
personId: number | null;
|
|
733
|
-
personName: string | null;
|
|
734
|
-
personAvatarId: number | null;
|
|
735
|
-
code: string;
|
|
736
|
-
collaboratorTypeId: number | null;
|
|
737
|
-
collaboratorTypeSlug: string | null;
|
|
738
|
-
collaboratorType: string | null;
|
|
739
|
-
displayName: string;
|
|
740
|
-
departmentId: number | null;
|
|
741
|
-
department: string | null;
|
|
742
|
-
jobTitleId: number | null;
|
|
743
|
-
title: string | null;
|
|
744
|
-
levelLabel: string | null;
|
|
745
|
-
weeklyCapacityHours: number | null;
|
|
746
|
-
hourlyRate: number | null;
|
|
747
|
-
status: string;
|
|
748
|
-
joinedAt: string | null;
|
|
749
|
-
leftAt: string | null;
|
|
750
|
-
notes: string | null;
|
|
751
|
-
supervisorId: number | null;
|
|
752
|
-
supervisorName: string | null;
|
|
753
|
-
contractId: number | null;
|
|
754
|
-
contractStatus: string | null;
|
|
755
|
-
compensationAmount: number | null;
|
|
756
|
-
activeAssignments: number;
|
|
757
|
-
}>;
|
|
758
|
-
updateCollaborator(userId: number, collaboratorId: number, data: Partial<CollaboratorPayload>): Promise<{
|
|
759
|
-
assignedProjects: Record<string, unknown>[];
|
|
760
|
-
relatedContracts: Record<string, unknown>[];
|
|
761
|
-
weeklySchedule: Record<string, unknown>[];
|
|
762
|
-
equityParticipation: {
|
|
763
|
-
participationType: string;
|
|
764
|
-
percentage: number | null;
|
|
765
|
-
votingPower: number | null;
|
|
766
|
-
startDate: string | null;
|
|
767
|
-
endDate: string | null;
|
|
768
|
-
notes: string | null;
|
|
769
|
-
};
|
|
770
|
-
timesheetSummary: {
|
|
771
|
-
totalTimesheets: number;
|
|
772
|
-
pendingTimesheets: number;
|
|
773
|
-
totalHours: number;
|
|
774
|
-
};
|
|
775
|
-
timeOffSummary: {
|
|
776
|
-
totalRequests: number;
|
|
777
|
-
pendingRequests: number;
|
|
778
|
-
approvedRequests: number;
|
|
779
|
-
};
|
|
780
|
-
scheduleAdjustmentRequests: Record<string, unknown>[];
|
|
781
|
-
id: number;
|
|
782
|
-
userId: number | null;
|
|
783
|
-
personId: number | null;
|
|
784
|
-
personName: string | null;
|
|
785
|
-
personAvatarId: number | null;
|
|
786
|
-
code: string;
|
|
787
|
-
collaboratorTypeId: number | null;
|
|
788
|
-
collaboratorTypeSlug: string | null;
|
|
789
|
-
collaboratorType: string | null;
|
|
790
|
-
displayName: string;
|
|
791
|
-
departmentId: number | null;
|
|
792
|
-
department: string | null;
|
|
793
|
-
jobTitleId: number | null;
|
|
794
|
-
title: string | null;
|
|
795
|
-
levelLabel: string | null;
|
|
796
|
-
weeklyCapacityHours: number | null;
|
|
797
|
-
hourlyRate: number | null;
|
|
798
|
-
status: string;
|
|
799
|
-
joinedAt: string | null;
|
|
800
|
-
leftAt: string | null;
|
|
801
|
-
notes: string | null;
|
|
802
|
-
supervisorId: number | null;
|
|
803
|
-
supervisorName: string | null;
|
|
804
|
-
contractId: number | null;
|
|
805
|
-
contractStatus: string | null;
|
|
806
|
-
compensationAmount: number | null;
|
|
807
|
-
activeAssignments: number;
|
|
808
|
-
}>;
|
|
653
|
+
createCollaborator(userId: number, data: CollaboratorPayload): Promise<any>;
|
|
654
|
+
updateCollaborator(userId: number, collaboratorId: number, data: Partial<CollaboratorPayload>): Promise<any>;
|
|
809
655
|
updateCollaboratorProjectAssignment(collaboratorId: number, projectId: number, data: {
|
|
810
656
|
projectRoleId?: number | null;
|
|
811
657
|
roleLabel?: string | null;
|
|
@@ -966,6 +812,8 @@ export declare class OperationsService {
|
|
|
966
812
|
assigneePersonAvatarId: number | null;
|
|
967
813
|
commentCount: number;
|
|
968
814
|
fileCount: number;
|
|
815
|
+
doingStartedAt: string | null;
|
|
816
|
+
totalDoingMinutes: number;
|
|
969
817
|
createdAt: string;
|
|
970
818
|
deletedAt: string | null;
|
|
971
819
|
}[];
|
|
@@ -987,6 +835,9 @@ export declare class OperationsService {
|
|
|
987
835
|
projectAssignmentId: number | null;
|
|
988
836
|
projectId: number | null;
|
|
989
837
|
commentCount: number;
|
|
838
|
+
fileCount: number;
|
|
839
|
+
doingStartedAt: string | null;
|
|
840
|
+
totalDoingMinutes: number;
|
|
990
841
|
createdAt: string;
|
|
991
842
|
deletedAt: string | null;
|
|
992
843
|
}>;
|
|
@@ -1007,6 +858,9 @@ export declare class OperationsService {
|
|
|
1007
858
|
projectAssignmentId: number | null;
|
|
1008
859
|
projectId: number | null;
|
|
1009
860
|
commentCount: number;
|
|
861
|
+
fileCount: number;
|
|
862
|
+
doingStartedAt: string | null;
|
|
863
|
+
totalDoingMinutes: number;
|
|
1010
864
|
createdAt: string;
|
|
1011
865
|
deletedAt: string | null;
|
|
1012
866
|
}>;
|
|
@@ -1022,13 +876,13 @@ export declare class OperationsService {
|
|
|
1022
876
|
created_at: Date;
|
|
1023
877
|
}[]>;
|
|
1024
878
|
addTaskFile(userId: number, taskId: number, file: MulterFile): Promise<{
|
|
1025
|
-
created_at: Date;
|
|
1026
|
-
id: number;
|
|
1027
|
-
updated_at: Date;
|
|
1028
879
|
filename: string;
|
|
1029
|
-
path: string;
|
|
1030
880
|
location: string;
|
|
881
|
+
id: number;
|
|
882
|
+
path: string;
|
|
1031
883
|
size: number;
|
|
884
|
+
created_at: Date;
|
|
885
|
+
updated_at: Date;
|
|
1032
886
|
provider_id: number;
|
|
1033
887
|
mimetype_id: number;
|
|
1034
888
|
}>;
|
|
@@ -1036,6 +890,7 @@ export declare class OperationsService {
|
|
|
1036
890
|
success: boolean;
|
|
1037
891
|
}>;
|
|
1038
892
|
listTaskComments(userId: number, taskId: number): Promise<TaskCommentRecord[]>;
|
|
893
|
+
listTaskActivities(userId: number, taskId: number): Promise<TaskActivityRecord[]>;
|
|
1039
894
|
addTaskComment(userId: number, taskId: number, content: string): Promise<TaskCommentRecord>;
|
|
1040
895
|
updateTaskComment(userId: number, taskId: number, commentId: number, content: string): Promise<TaskCommentRecord>;
|
|
1041
896
|
removeTaskComment(userId: number, taskId: number, commentId: number): Promise<{
|
|
@@ -1179,6 +1034,31 @@ export declare class OperationsService {
|
|
|
1179
1034
|
myRoleLabel: string | null;
|
|
1180
1035
|
teamSize: number;
|
|
1181
1036
|
}>;
|
|
1037
|
+
deleteProject(userId: number, projectId: number): Promise<{
|
|
1038
|
+
success: boolean;
|
|
1039
|
+
}>;
|
|
1040
|
+
listProjectFiles(userId: number, projectId: number): Promise<{
|
|
1041
|
+
id: number;
|
|
1042
|
+
file_id: number;
|
|
1043
|
+
filename: string;
|
|
1044
|
+
size: number;
|
|
1045
|
+
mimetype: string;
|
|
1046
|
+
created_at: Date;
|
|
1047
|
+
}[]>;
|
|
1048
|
+
addProjectFile(userId: number, projectId: number, file: MulterFile): Promise<{
|
|
1049
|
+
filename: string;
|
|
1050
|
+
location: string;
|
|
1051
|
+
id: number;
|
|
1052
|
+
path: string;
|
|
1053
|
+
size: number;
|
|
1054
|
+
created_at: Date;
|
|
1055
|
+
updated_at: Date;
|
|
1056
|
+
provider_id: number;
|
|
1057
|
+
mimetype_id: number;
|
|
1058
|
+
}>;
|
|
1059
|
+
removeProjectFile(userId: number, projectId: number, fileRelationId: number): Promise<{
|
|
1060
|
+
success: boolean;
|
|
1061
|
+
}>;
|
|
1182
1062
|
createProject(userId: number, data: ProjectPayload): Promise<{
|
|
1183
1063
|
assignments: {
|
|
1184
1064
|
id: number;
|
|
@@ -1331,6 +1211,14 @@ export declare class OperationsService {
|
|
|
1331
1211
|
dateTo?: string;
|
|
1332
1212
|
collaboratorId?: number;
|
|
1333
1213
|
}): Promise<{
|
|
1214
|
+
total: number;
|
|
1215
|
+
lastPage: number;
|
|
1216
|
+
page: number;
|
|
1217
|
+
pageSize: number;
|
|
1218
|
+
prev: number;
|
|
1219
|
+
next: number;
|
|
1220
|
+
data: any[];
|
|
1221
|
+
} | {
|
|
1334
1222
|
id: number;
|
|
1335
1223
|
collaboratorId: number;
|
|
1336
1224
|
collaboratorName: string;
|
|
@@ -1345,15 +1233,7 @@ export declare class OperationsService {
|
|
|
1345
1233
|
notes: string | null;
|
|
1346
1234
|
decisionNote: string | null;
|
|
1347
1235
|
approvalId: number | null;
|
|
1348
|
-
}[]
|
|
1349
|
-
total: number;
|
|
1350
|
-
lastPage: number;
|
|
1351
|
-
page: number;
|
|
1352
|
-
pageSize: number;
|
|
1353
|
-
prev: number;
|
|
1354
|
-
next: number;
|
|
1355
|
-
data: any[];
|
|
1356
|
-
}>;
|
|
1236
|
+
}[]>;
|
|
1357
1237
|
createTimesheet(userId: number, data: TimesheetPayload): Promise<any>;
|
|
1358
1238
|
updateTimesheet(userId: number, timesheetId: number, data: Partial<TimesheetPayload>): Promise<any>;
|
|
1359
1239
|
submitTimesheet(userId: number, timesheetId: number): Promise<any>;
|
|
@@ -1587,6 +1467,7 @@ export declare class OperationsService {
|
|
|
1587
1467
|
private resolveProjectAssignmentForActor;
|
|
1588
1468
|
private getOwnedTaskRecord;
|
|
1589
1469
|
private getTaskRecordForActor;
|
|
1470
|
+
private logTaskActivity;
|
|
1590
1471
|
listProjectBoardTasks(userId: number, projectId: number): Promise<{
|
|
1591
1472
|
id: number;
|
|
1592
1473
|
name: string;
|
|
@@ -1603,6 +1484,9 @@ export declare class OperationsService {
|
|
|
1603
1484
|
assigneePersonAvatarId: number | null;
|
|
1604
1485
|
projectAssignmentId: number | null;
|
|
1605
1486
|
commentCount: number;
|
|
1487
|
+
fileCount: number;
|
|
1488
|
+
doingStartedAt: string | null;
|
|
1489
|
+
totalDoingMinutes: number;
|
|
1606
1490
|
createdAt: string;
|
|
1607
1491
|
}[]>;
|
|
1608
1492
|
private getProjectBoardTask;
|
|
@@ -1616,6 +1500,34 @@ export declare class OperationsService {
|
|
|
1616
1500
|
private upsertApproval;
|
|
1617
1501
|
private applyApprovedScheduleAdjustmentIfNeeded;
|
|
1618
1502
|
private insertApprovalHistory;
|
|
1503
|
+
/**
|
|
1504
|
+
* Determines if monetary fields should be hidden from a collaborator.
|
|
1505
|
+
* Rules:
|
|
1506
|
+
* - Director/Supervisor: Always see monetary fields
|
|
1507
|
+
* - Collaborator: Only see their own monetary fields, not others'
|
|
1508
|
+
*
|
|
1509
|
+
* @param actor The current user's access context
|
|
1510
|
+
* @param targetCollaboratorId The collaborator whose data is being viewed
|
|
1511
|
+
* @returns true if monetary fields should be hidden
|
|
1512
|
+
*/
|
|
1513
|
+
private shouldHideMonetaryFieldsForCollaborator;
|
|
1514
|
+
/**
|
|
1515
|
+
* Sanitizes a single collaborator list row by hiding monetary fields when appropriate.
|
|
1516
|
+
* Removes: compensationAmount if user shouldn't see it
|
|
1517
|
+
*/
|
|
1518
|
+
private sanitizeCollaboratorListRow;
|
|
1519
|
+
/**
|
|
1520
|
+
* Sanitizes collaborator statistics by hiding aggregate monetary fields when appropriate.
|
|
1521
|
+
* Removes: totalSalary, totalCosts, avgSalaryPlusCosts, avgSalaryPlusCostsPerCollaborator
|
|
1522
|
+
* if user is a regular collaborator (not director/supervisor)
|
|
1523
|
+
*/
|
|
1524
|
+
private sanitizeCollaboratorStats;
|
|
1525
|
+
/**
|
|
1526
|
+
* Sanitizes detailed collaborator data by hiding monetary fields when appropriate.
|
|
1527
|
+
* Removes: compensationAmount from main object and budgetAmount from relatedContracts
|
|
1528
|
+
* if user is a regular collaborator (not director/supervisor) viewing another collaborator
|
|
1529
|
+
*/
|
|
1530
|
+
private sanitizeCollaboratorDetails;
|
|
1619
1531
|
private assertProjectAccess;
|
|
1620
1532
|
private ensureCollaboratorAccess;
|
|
1621
1533
|
private listSingleTimesheet;
|
|
@@ -1756,6 +1668,8 @@ export declare class OperationsService {
|
|
|
1756
1668
|
assigneeUserPhotoId: number | null;
|
|
1757
1669
|
assigneePersonAvatarId: number | null;
|
|
1758
1670
|
commentCount: number;
|
|
1671
|
+
doingStartedAt: string | null;
|
|
1672
|
+
totalDoingMinutes: number;
|
|
1759
1673
|
createdAt: string;
|
|
1760
1674
|
deletedAt: string | null;
|
|
1761
1675
|
}[];
|
|
@@ -1937,7 +1851,7 @@ export declare class OperationsService {
|
|
|
1937
1851
|
consumedHoursCost: number;
|
|
1938
1852
|
idlenessRate: number;
|
|
1939
1853
|
idlenessCost: number;
|
|
1940
|
-
risk:
|
|
1854
|
+
risk: "alto" | "médio" | "baixo";
|
|
1941
1855
|
recommendation: string;
|
|
1942
1856
|
}[];
|
|
1943
1857
|
}>;
|