@hed-hog/operations 0.0.303 → 0.0.305
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 +200 -43
- package/dist/controllers/operations-approvals.controller.d.ts +9 -0
- package/dist/controllers/operations-approvals.controller.d.ts.map +1 -0
- package/dist/controllers/operations-approvals.controller.js +64 -0
- package/dist/controllers/operations-approvals.controller.js.map +1 -0
- package/dist/controllers/operations-collaborators.controller.d.ts +223 -0
- package/dist/controllers/operations-collaborators.controller.d.ts.map +1 -0
- package/dist/controllers/operations-collaborators.controller.js +96 -0
- package/dist/controllers/operations-collaborators.controller.js.map +1 -0
- package/dist/controllers/operations-contracts.controller.d.ts +683 -0
- package/dist/controllers/operations-contracts.controller.d.ts.map +1 -0
- package/dist/controllers/operations-contracts.controller.js +198 -0
- package/dist/controllers/operations-contracts.controller.js.map +1 -0
- package/dist/controllers/operations-org-structure.controller.d.ts +108 -0
- package/dist/controllers/operations-org-structure.controller.d.ts.map +1 -0
- package/dist/controllers/operations-org-structure.controller.js +143 -0
- package/dist/controllers/operations-org-structure.controller.js.map +1 -0
- package/dist/controllers/operations-projects.controller.d.ts +184 -0
- package/dist/controllers/operations-projects.controller.d.ts.map +1 -0
- package/dist/controllers/operations-projects.controller.js +87 -0
- package/dist/controllers/operations-projects.controller.js.map +1 -0
- package/dist/controllers/operations-tasks.controller.d.ts +85 -0
- package/dist/controllers/operations-tasks.controller.d.ts.map +1 -0
- package/dist/controllers/operations-tasks.controller.js +90 -0
- package/dist/controllers/operations-tasks.controller.js.map +1 -0
- package/dist/controllers/operations-timesheets.controller.d.ts +99 -0
- package/dist/controllers/operations-timesheets.controller.d.ts.map +1 -0
- package/dist/controllers/operations-timesheets.controller.js +154 -0
- package/dist/controllers/operations-timesheets.controller.js.map +1 -0
- package/dist/dto/create-collaborator-type.dto.d.ts +10 -0
- package/dist/dto/create-collaborator-type.dto.d.ts.map +1 -0
- package/dist/dto/create-collaborator-type.dto.js +56 -0
- package/dist/dto/create-collaborator-type.dto.js.map +1 -0
- package/dist/dto/create-collaborator.dto.d.ts +42 -0
- package/dist/dto/create-collaborator.dto.d.ts.map +1 -0
- package/dist/dto/create-collaborator.dto.js +228 -0
- package/dist/dto/create-collaborator.dto.js.map +1 -0
- package/dist/dto/create-schedule-adjustment-request.dto.d.ts +17 -0
- package/dist/dto/create-schedule-adjustment-request.dto.d.ts.map +1 -0
- package/dist/dto/create-schedule-adjustment-request.dto.js +89 -0
- package/dist/dto/create-schedule-adjustment-request.dto.js.map +1 -0
- package/dist/dto/create-task.dto.d.ts +14 -0
- package/dist/dto/create-task.dto.d.ts.map +1 -0
- package/dist/dto/create-task.dto.js +83 -0
- package/dist/dto/create-task.dto.js.map +1 -0
- package/dist/dto/create-time-off-request.dto.d.ts +9 -0
- package/dist/dto/create-time-off-request.dto.d.ts.map +1 -0
- package/dist/dto/create-time-off-request.dto.js +54 -0
- package/dist/dto/create-time-off-request.dto.js.map +1 -0
- package/dist/dto/create-timesheet-entry.dto.d.ts +12 -0
- package/dist/dto/create-timesheet-entry.dto.d.ts.map +1 -0
- package/dist/dto/create-timesheet-entry.dto.js +75 -0
- package/dist/dto/create-timesheet-entry.dto.js.map +1 -0
- package/dist/dto/list-collaborator-types.dto.d.ts +4 -0
- package/dist/dto/list-collaborator-types.dto.d.ts.map +1 -0
- package/dist/dto/list-collaborator-types.dto.js +29 -0
- package/dist/dto/list-collaborator-types.dto.js.map +1 -0
- package/dist/dto/list-collaborators.dto.d.ts +8 -0
- package/dist/dto/list-collaborators.dto.d.ts.map +1 -0
- package/dist/dto/list-collaborators.dto.js +42 -0
- package/dist/dto/list-collaborators.dto.js.map +1 -0
- package/dist/dto/list-project-options.dto.d.ts +4 -0
- package/dist/dto/list-project-options.dto.d.ts.map +1 -0
- package/dist/dto/list-project-options.dto.js +8 -0
- package/dist/dto/list-project-options.dto.js.map +1 -0
- package/dist/dto/list-tasks.dto.d.ts +7 -0
- package/dist/dto/list-tasks.dto.d.ts.map +1 -0
- package/dist/dto/list-tasks.dto.js +38 -0
- package/dist/dto/list-tasks.dto.js.map +1 -0
- package/dist/dto/list-timesheet-entries.dto.d.ts +10 -0
- package/dist/dto/list-timesheet-entries.dto.d.ts.map +1 -0
- package/dist/dto/list-timesheet-entries.dto.js +54 -0
- package/dist/dto/list-timesheet-entries.dto.js.map +1 -0
- package/dist/dto/update-collaborator-type.dto.d.ts +4 -0
- package/dist/dto/update-collaborator-type.dto.d.ts.map +1 -0
- package/dist/dto/update-collaborator-type.dto.js +8 -0
- package/dist/dto/update-collaborator-type.dto.js.map +1 -0
- package/dist/dto/update-collaborator.dto.d.ts +4 -0
- package/dist/dto/update-collaborator.dto.d.ts.map +1 -0
- package/dist/dto/update-collaborator.dto.js +8 -0
- package/dist/dto/update-collaborator.dto.js.map +1 -0
- package/dist/dto/update-task.dto.d.ts +14 -0
- package/dist/dto/update-task.dto.d.ts.map +1 -0
- package/dist/dto/update-task.dto.js +84 -0
- package/dist/dto/update-task.dto.js.map +1 -0
- package/dist/operations.controller.d.ts +0 -1045
- package/dist/operations.controller.d.ts.map +1 -1
- package/dist/operations.controller.js +0 -429
- package/dist/operations.controller.js.map +1 -1
- package/dist/operations.module.d.ts.map +1 -1
- package/dist/operations.module.js +23 -2
- package/dist/operations.module.js.map +1 -1
- package/dist/operations.service.d.ts +429 -8
- package/dist/operations.service.d.ts.map +1 -1
- package/dist/operations.service.js +1931 -165
- package/dist/operations.service.js.map +1 -1
- package/dist/operations.service.spec.js +315 -1
- package/dist/operations.service.spec.js.map +1 -1
- package/dist/services/shared/operations-access.service.d.ts +16 -0
- package/dist/services/shared/operations-access.service.d.ts.map +1 -0
- package/dist/services/shared/operations-access.service.js +48 -0
- package/dist/services/shared/operations-access.service.js.map +1 -0
- package/hedhog/data/dashboard.yaml +20 -0
- package/hedhog/data/dashboard_component.yaml +274 -0
- package/hedhog/data/dashboard_component_role.yaml +174 -0
- package/hedhog/data/dashboard_item.yaml +299 -0
- package/hedhog/data/dashboard_role.yaml +20 -0
- package/hedhog/data/menu.yaml +30 -13
- package/hedhog/data/operations_collaborator_type.yaml +76 -0
- package/hedhog/data/route.yaml +196 -0
- package/hedhog/frontend/app/_components/async-options-combobox.tsx.ejs +231 -0
- package/hedhog/frontend/app/_components/collaborator-details-screen.tsx.ejs +125 -40
- package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +740 -106
- package/hedhog/frontend/app/_components/collaborator-select-with-create.tsx.ejs +256 -256
- package/hedhog/frontend/app/_components/contract-form-screen.tsx.ejs +7 -7
- package/hedhog/frontend/app/_components/contract-template-form-screen.tsx.ejs +306 -306
- package/hedhog/frontend/app/_components/contract-template-select-with-create.tsx.ejs +247 -247
- package/hedhog/frontend/app/_components/contract-wizard-sheet.tsx.ejs +3520 -3520
- package/hedhog/frontend/app/_components/department-select-with-create.tsx.ejs +38 -16
- package/hedhog/frontend/app/_components/project-details-screen.tsx.ejs +1504 -52
- package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +1017 -649
- package/hedhog/frontend/app/_components/section-card.tsx.ejs +25 -18
- package/hedhog/frontend/app/_components/system-user-select-with-create.tsx.ejs +609 -0
- package/hedhog/frontend/app/_components/timesheet-task-create-sheet.tsx.ejs +213 -0
- package/hedhog/frontend/app/_lib/api.ts.ejs +30 -1
- package/hedhog/frontend/app/_lib/types.ts.ejs +147 -39
- package/hedhog/frontend/app/_lib/utils/format.ts.ejs +40 -9
- package/hedhog/frontend/app/_lib/utils/forms.ts.ejs +48 -1
- package/hedhog/frontend/app/approvals/page.tsx.ejs +116 -98
- package/hedhog/frontend/app/collaborator-types/page.tsx.ejs +502 -0
- package/hedhog/frontend/app/collaborators/page.tsx.ejs +116 -72
- package/hedhog/frontend/app/contracts/page.tsx.ejs +938 -938
- package/hedhog/frontend/app/contracts/templates/page.tsx.ejs +11 -9
- package/hedhog/frontend/app/departments/page.tsx.ejs +1 -1
- package/hedhog/frontend/app/projects/[id]/edit/page.tsx.ejs +1 -1
- package/hedhog/frontend/app/projects/page.tsx.ejs +364 -133
- package/hedhog/frontend/app/schedule-adjustments/page.tsx.ejs +244 -120
- package/hedhog/frontend/app/team/page.tsx.ejs +15 -2
- package/hedhog/frontend/app/time-off/page.tsx.ejs +158 -82
- package/hedhog/frontend/app/timesheets/page.tsx.ejs +814 -357
- package/hedhog/frontend/messages/en.json +268 -53
- package/hedhog/frontend/messages/pt.json +484 -271
- package/hedhog/table/operations_collaborator.yaml +26 -13
- package/hedhog/table/operations_collaborator_equity_participation.yaml +43 -0
- package/hedhog/table/operations_collaborator_type.yaml +33 -0
- package/hedhog/table/operations_job_title.yaml +24 -0
- package/hedhog/table/operations_project.yaml +9 -0
- package/hedhog/table/operations_project_assignment.yaml +9 -0
- package/hedhog/table/operations_project_role.yaml +39 -0
- package/hedhog/table/operations_task.yaml +69 -0
- package/hedhog/table/operations_timesheet_entry.yaml +12 -0
- package/package.json +6 -6
- package/src/controllers/operations-approvals.controller.ts +24 -0
- package/src/controllers/operations-collaborators.controller.ts +60 -0
- package/src/controllers/operations-contracts.controller.ts +138 -0
- package/src/controllers/operations-org-structure.controller.ts +92 -0
- package/src/controllers/operations-projects.controller.ts +50 -0
- package/src/controllers/operations-tasks.controller.ts +63 -0
- package/src/controllers/operations-timesheets.controller.ts +100 -0
- package/src/dto/create-collaborator-type.dto.ts +43 -0
- package/src/dto/create-collaborator.dto.ts +223 -0
- package/src/dto/create-schedule-adjustment-request.dto.ts +91 -0
- package/src/dto/create-task.dto.ts +75 -0
- package/src/dto/create-time-off-request.dto.ts +53 -0
- package/src/dto/create-timesheet-entry.dto.ts +67 -0
- package/src/dto/list-collaborator-types.dto.ts +15 -0
- package/src/dto/list-collaborators.dto.ts +30 -0
- package/src/dto/list-project-options.dto.ts +3 -0
- package/src/dto/list-tasks.dto.ts +25 -0
- package/src/dto/list-timesheet-entries.dto.ts +40 -0
- package/src/dto/update-collaborator-type.dto.ts +3 -0
- package/src/dto/update-collaborator.dto.ts +3 -0
- package/src/dto/update-task.dto.ts +76 -0
- package/src/operations.controller.ts +1 -278
- package/src/operations.module.ts +23 -2
- package/src/operations.service.spec.ts +450 -0
- package/src/operations.service.ts +4507 -1561
- package/src/services/shared/operations-access.service.ts +52 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { LocaleService } from '@hed-hog/api-locale';
|
|
1
2
|
import { PrismaService } from '@hed-hog/api-prisma';
|
|
2
3
|
import { AiService, FileService, IntegrationDeveloperApiService, SettingService } from '@hed-hog/core';
|
|
4
|
+
import { OperationsAccessService } from './services/shared/operations-access.service';
|
|
3
5
|
declare const CONTRACT_CATEGORY_VALUES: readonly ["employee", "contractor", "client", "supplier", "vendor", "partner", "internal", "other"];
|
|
4
6
|
declare const CONTRACT_TYPE_VALUES: readonly ["clt", "pj", "freelancer_agreement", "service_agreement", "fixed_term", "recurring_service", "nda", "amendment", "addendum", "other"];
|
|
5
7
|
declare const BILLING_MODEL_VALUES: readonly ["time_and_material", "monthly_retainer", "fixed_price"];
|
|
@@ -9,19 +11,23 @@ declare const CONTRACT_CREATION_MODE_VALUES: readonly ["blank", "template", "upl
|
|
|
9
11
|
declare const ORIGIN_TYPE_VALUES: readonly ["manual", "employee_hiring", "client_project", "crm_proposal"];
|
|
10
12
|
declare const CONTRACT_DOCUMENT_TYPE_VALUES: readonly ["source_upload", "generated_pdf", "attachment", "other"];
|
|
11
13
|
declare const CONTRACT_DOCUMENT_EXTRACTION_STATUS_VALUES: readonly ["pending", "processing", "completed", "failed", "skipped"];
|
|
14
|
+
declare const TASK_STATUS_VALUES: readonly ["todo", "doing", "review", "done"];
|
|
12
15
|
type CollaboratorPayload = {
|
|
13
16
|
userId?: number | null;
|
|
14
17
|
personId?: number | null;
|
|
15
18
|
code?: string | null;
|
|
16
19
|
displayName?: string | null;
|
|
17
|
-
|
|
20
|
+
collaboratorTypeId?: number | null;
|
|
21
|
+
collaboratorTypeSlug?: string | null;
|
|
22
|
+
collaboratorType?: string | null;
|
|
18
23
|
department?: string | null;
|
|
19
24
|
departmentId?: number | null;
|
|
25
|
+
jobTitleId?: number | null;
|
|
20
26
|
title?: string | null;
|
|
21
27
|
levelLabel?: string | null;
|
|
22
28
|
supervisorCollaboratorId?: number | null;
|
|
23
29
|
weeklyCapacityHours?: number | null;
|
|
24
|
-
status?: 'active' | 'on_leave' | 'inactive';
|
|
30
|
+
status?: 'draft' | 'active' | 'on_leave' | 'inactive';
|
|
25
31
|
joinedAt?: string | null;
|
|
26
32
|
leftAt?: string | null;
|
|
27
33
|
compensationAmount?: number | null;
|
|
@@ -34,6 +40,14 @@ type CollaboratorPayload = {
|
|
|
34
40
|
endTime?: string | null;
|
|
35
41
|
breakMinutes?: number | null;
|
|
36
42
|
}>;
|
|
43
|
+
equityParticipation?: {
|
|
44
|
+
participationType?: 'partner_quota_holder' | 'common_shareholder' | 'preferred_shareholder' | 'administrator' | 'other';
|
|
45
|
+
percentage?: number | null;
|
|
46
|
+
votingPower?: number | null;
|
|
47
|
+
startDate?: string | null;
|
|
48
|
+
endDate?: string | null;
|
|
49
|
+
notes?: string | null;
|
|
50
|
+
} | null;
|
|
37
51
|
notes?: string | null;
|
|
38
52
|
};
|
|
39
53
|
type DepartmentPayload = {
|
|
@@ -42,6 +56,23 @@ type DepartmentPayload = {
|
|
|
42
56
|
description?: string | null;
|
|
43
57
|
status?: 'active' | 'inactive';
|
|
44
58
|
};
|
|
59
|
+
type JobTitlePayload = DepartmentPayload;
|
|
60
|
+
type CollaboratorTypePayload = {
|
|
61
|
+
name?: string | null;
|
|
62
|
+
slug?: string | null;
|
|
63
|
+
description?: string | null;
|
|
64
|
+
category?: string | null;
|
|
65
|
+
isActive?: boolean;
|
|
66
|
+
sortOrder?: number | null;
|
|
67
|
+
status?: 'active' | 'inactive';
|
|
68
|
+
};
|
|
69
|
+
type ProjectRolePayload = {
|
|
70
|
+
code?: string | null;
|
|
71
|
+
name?: string | null;
|
|
72
|
+
description?: string | null;
|
|
73
|
+
isActive?: boolean;
|
|
74
|
+
sortOrder?: number | null;
|
|
75
|
+
};
|
|
45
76
|
type ContractPayload = {
|
|
46
77
|
code?: string | null;
|
|
47
78
|
name?: string | null;
|
|
@@ -300,6 +331,7 @@ type ProjectPayload = {
|
|
|
300
331
|
contractId?: number | null;
|
|
301
332
|
contractTemplateId?: number | null;
|
|
302
333
|
managerCollaboratorId?: number | null;
|
|
334
|
+
clientPersonId?: number | null;
|
|
303
335
|
code: string;
|
|
304
336
|
name: string;
|
|
305
337
|
clientName?: string | null;
|
|
@@ -318,6 +350,7 @@ type ProjectPayload = {
|
|
|
318
350
|
autoGenerateContractDraft?: boolean;
|
|
319
351
|
teamAssignments?: Array<{
|
|
320
352
|
collaboratorId: number;
|
|
353
|
+
projectRoleId?: number | null;
|
|
321
354
|
roleLabel?: string | null;
|
|
322
355
|
allocationPercent?: number | null;
|
|
323
356
|
weeklyHours?: number | null;
|
|
@@ -329,9 +362,38 @@ type ProjectPayload = {
|
|
|
329
362
|
};
|
|
330
363
|
type TimesheetEntryPayload = {
|
|
331
364
|
projectAssignmentId?: number | null;
|
|
365
|
+
taskId?: number | null;
|
|
366
|
+
taskName?: string | null;
|
|
332
367
|
activityLabel?: string | null;
|
|
333
368
|
workDate: string;
|
|
334
|
-
hours
|
|
369
|
+
hours?: number | null;
|
|
370
|
+
duration?: number | null;
|
|
371
|
+
durationMinutes?: number | null;
|
|
372
|
+
unit?: 'hours' | 'minutes';
|
|
373
|
+
description?: string | null;
|
|
374
|
+
};
|
|
375
|
+
type TaskPayload = {
|
|
376
|
+
projectId?: number | null;
|
|
377
|
+
projectAssignmentId?: number | null;
|
|
378
|
+
assigneeCollaboratorId?: number | null;
|
|
379
|
+
name?: string | null;
|
|
380
|
+
description?: string | null;
|
|
381
|
+
priority?: 'low' | 'medium' | 'high';
|
|
382
|
+
status?: (typeof TASK_STATUS_VALUES)[number];
|
|
383
|
+
dueDate?: string | null;
|
|
384
|
+
estimateHours?: number | null;
|
|
385
|
+
position?: number;
|
|
386
|
+
tags?: string | null;
|
|
387
|
+
};
|
|
388
|
+
type QuickTimesheetEntryPayload = {
|
|
389
|
+
projectId?: number | null;
|
|
390
|
+
projectAssignmentId?: number | null;
|
|
391
|
+
taskId?: number | null;
|
|
392
|
+
taskName?: string | null;
|
|
393
|
+
activityLabel?: string | null;
|
|
394
|
+
workDate: string;
|
|
395
|
+
duration: number;
|
|
396
|
+
unit?: 'hours' | 'minutes';
|
|
335
397
|
description?: string | null;
|
|
336
398
|
};
|
|
337
399
|
type TimesheetPayload = {
|
|
@@ -386,8 +448,78 @@ export declare class OperationsService {
|
|
|
386
448
|
private readonly integrationApi;
|
|
387
449
|
private readonly fileService;
|
|
388
450
|
private readonly settingService;
|
|
451
|
+
private readonly accessService;
|
|
452
|
+
private readonly localeService?;
|
|
389
453
|
private readonly logger;
|
|
390
|
-
constructor(prisma: PrismaService, aiService: AiService, integrationApi: IntegrationDeveloperApiService, fileService: FileService, settingService: SettingService);
|
|
454
|
+
constructor(prisma: PrismaService, aiService: AiService, integrationApi: IntegrationDeveloperApiService, fileService: FileService, settingService: SettingService, accessService: OperationsAccessService, localeService?: LocaleService);
|
|
455
|
+
private normalizeLocaleCode;
|
|
456
|
+
private resolvePreferredLocaleId;
|
|
457
|
+
listCollaboratorTypes(userId: number, filters?: {
|
|
458
|
+
active?: boolean;
|
|
459
|
+
}): Promise<{
|
|
460
|
+
id: number;
|
|
461
|
+
slug: string;
|
|
462
|
+
name: string;
|
|
463
|
+
description: string | null;
|
|
464
|
+
category: string | null;
|
|
465
|
+
isActive: boolean;
|
|
466
|
+
sortOrder: number;
|
|
467
|
+
status: "active" | "inactive";
|
|
468
|
+
collaboratorCount: number;
|
|
469
|
+
createdAt: string;
|
|
470
|
+
updatedAt: string;
|
|
471
|
+
}[]>;
|
|
472
|
+
createCollaboratorType(userId: number, data: CollaboratorTypePayload): Promise<{
|
|
473
|
+
id: number;
|
|
474
|
+
slug: string;
|
|
475
|
+
name: string;
|
|
476
|
+
description: string | null;
|
|
477
|
+
category: string | null;
|
|
478
|
+
isActive: boolean;
|
|
479
|
+
sortOrder: number;
|
|
480
|
+
status: "active" | "inactive";
|
|
481
|
+
collaboratorCount: number;
|
|
482
|
+
createdAt: string | null;
|
|
483
|
+
updatedAt: string | null;
|
|
484
|
+
deletedAt: string | null;
|
|
485
|
+
}>;
|
|
486
|
+
updateCollaboratorType(userId: number, collaboratorTypeId: number, data: Partial<CollaboratorTypePayload>): Promise<{
|
|
487
|
+
id: number;
|
|
488
|
+
slug: string;
|
|
489
|
+
name: string;
|
|
490
|
+
description: string | null;
|
|
491
|
+
category: string | null;
|
|
492
|
+
isActive: boolean;
|
|
493
|
+
sortOrder: number;
|
|
494
|
+
status: "active" | "inactive";
|
|
495
|
+
collaboratorCount: number;
|
|
496
|
+
createdAt: string | null;
|
|
497
|
+
updatedAt: string | null;
|
|
498
|
+
deletedAt: string | null;
|
|
499
|
+
}>;
|
|
500
|
+
listProjectRoles(userId: number): Promise<{
|
|
501
|
+
id: number;
|
|
502
|
+
slug: string;
|
|
503
|
+
code: string | null;
|
|
504
|
+
name: string;
|
|
505
|
+
description: string | null;
|
|
506
|
+
isActive: boolean;
|
|
507
|
+
sortOrder: number;
|
|
508
|
+
createdAt: string;
|
|
509
|
+
updatedAt: string;
|
|
510
|
+
}[]>;
|
|
511
|
+
createProjectRole(userId: number, data: ProjectRolePayload): Promise<{
|
|
512
|
+
id: number;
|
|
513
|
+
slug: string;
|
|
514
|
+
code: string | null;
|
|
515
|
+
name: string;
|
|
516
|
+
description: string | null;
|
|
517
|
+
isActive: boolean;
|
|
518
|
+
sortOrder: number;
|
|
519
|
+
createdAt: string | null;
|
|
520
|
+
updatedAt: string | null;
|
|
521
|
+
deletedAt: string | null;
|
|
522
|
+
}>;
|
|
391
523
|
getDashboard(userId: number): Promise<{
|
|
392
524
|
actor: {
|
|
393
525
|
roleScope: string;
|
|
@@ -418,6 +550,14 @@ export declare class OperationsService {
|
|
|
418
550
|
assignedProjects: Record<string, unknown>[];
|
|
419
551
|
relatedContracts: Record<string, unknown>[];
|
|
420
552
|
weeklySchedule: Record<string, unknown>[];
|
|
553
|
+
equityParticipation: {
|
|
554
|
+
participationType: string;
|
|
555
|
+
percentage: number | null;
|
|
556
|
+
votingPower: number | null;
|
|
557
|
+
startDate: string | null;
|
|
558
|
+
endDate: string | null;
|
|
559
|
+
notes: string | null;
|
|
560
|
+
};
|
|
421
561
|
timesheetSummary: {
|
|
422
562
|
totalTimesheets: number;
|
|
423
563
|
pendingTimesheets: number;
|
|
@@ -435,10 +575,13 @@ export declare class OperationsService {
|
|
|
435
575
|
personName: string | null;
|
|
436
576
|
personAvatarId: number | null;
|
|
437
577
|
code: string;
|
|
438
|
-
|
|
578
|
+
collaboratorTypeId: number | null;
|
|
579
|
+
collaboratorTypeSlug: string | null;
|
|
580
|
+
collaboratorType: string | null;
|
|
439
581
|
displayName: string;
|
|
440
582
|
departmentId: number | null;
|
|
441
583
|
department: string | null;
|
|
584
|
+
jobTitleId: number | null;
|
|
442
585
|
title: string | null;
|
|
443
586
|
levelLabel: string | null;
|
|
444
587
|
weeklyCapacityHours: number | null;
|
|
@@ -450,12 +593,21 @@ export declare class OperationsService {
|
|
|
450
593
|
supervisorName: string | null;
|
|
451
594
|
contractId: number | null;
|
|
452
595
|
contractStatus: string | null;
|
|
596
|
+
compensationAmount: number | null;
|
|
453
597
|
activeAssignments: number;
|
|
454
598
|
}>;
|
|
455
599
|
getCollaboratorByIdForUser(userId: number, collaboratorId: number): Promise<{
|
|
456
600
|
assignedProjects: Record<string, unknown>[];
|
|
457
601
|
relatedContracts: Record<string, unknown>[];
|
|
458
602
|
weeklySchedule: Record<string, unknown>[];
|
|
603
|
+
equityParticipation: {
|
|
604
|
+
participationType: string;
|
|
605
|
+
percentage: number | null;
|
|
606
|
+
votingPower: number | null;
|
|
607
|
+
startDate: string | null;
|
|
608
|
+
endDate: string | null;
|
|
609
|
+
notes: string | null;
|
|
610
|
+
};
|
|
459
611
|
timesheetSummary: {
|
|
460
612
|
totalTimesheets: number;
|
|
461
613
|
pendingTimesheets: number;
|
|
@@ -473,10 +625,13 @@ export declare class OperationsService {
|
|
|
473
625
|
personName: string | null;
|
|
474
626
|
personAvatarId: number | null;
|
|
475
627
|
code: string;
|
|
476
|
-
|
|
628
|
+
collaboratorTypeId: number | null;
|
|
629
|
+
collaboratorTypeSlug: string | null;
|
|
630
|
+
collaboratorType: string | null;
|
|
477
631
|
displayName: string;
|
|
478
632
|
departmentId: number | null;
|
|
479
633
|
department: string | null;
|
|
634
|
+
jobTitleId: number | null;
|
|
480
635
|
title: string | null;
|
|
481
636
|
levelLabel: string | null;
|
|
482
637
|
weeklyCapacityHours: number | null;
|
|
@@ -488,6 +643,7 @@ export declare class OperationsService {
|
|
|
488
643
|
supervisorName: string | null;
|
|
489
644
|
contractId: number | null;
|
|
490
645
|
contractStatus: string | null;
|
|
646
|
+
compensationAmount: number | null;
|
|
491
647
|
activeAssignments: number;
|
|
492
648
|
}>;
|
|
493
649
|
getTeam(userId: number): Promise<{
|
|
@@ -508,6 +664,14 @@ export declare class OperationsService {
|
|
|
508
664
|
assignedProjects: Record<string, unknown>[];
|
|
509
665
|
relatedContracts: Record<string, unknown>[];
|
|
510
666
|
weeklySchedule: Record<string, unknown>[];
|
|
667
|
+
equityParticipation: {
|
|
668
|
+
participationType: string;
|
|
669
|
+
percentage: number | null;
|
|
670
|
+
votingPower: number | null;
|
|
671
|
+
startDate: string | null;
|
|
672
|
+
endDate: string | null;
|
|
673
|
+
notes: string | null;
|
|
674
|
+
};
|
|
511
675
|
timesheetSummary: {
|
|
512
676
|
totalTimesheets: number;
|
|
513
677
|
pendingTimesheets: number;
|
|
@@ -525,10 +689,13 @@ export declare class OperationsService {
|
|
|
525
689
|
personName: string | null;
|
|
526
690
|
personAvatarId: number | null;
|
|
527
691
|
code: string;
|
|
528
|
-
|
|
692
|
+
collaboratorTypeId: number | null;
|
|
693
|
+
collaboratorTypeSlug: string | null;
|
|
694
|
+
collaboratorType: string | null;
|
|
529
695
|
displayName: string;
|
|
530
696
|
departmentId: number | null;
|
|
531
697
|
department: string | null;
|
|
698
|
+
jobTitleId: number | null;
|
|
532
699
|
title: string | null;
|
|
533
700
|
levelLabel: string | null;
|
|
534
701
|
weeklyCapacityHours: number | null;
|
|
@@ -540,12 +707,21 @@ export declare class OperationsService {
|
|
|
540
707
|
supervisorName: string | null;
|
|
541
708
|
contractId: number | null;
|
|
542
709
|
contractStatus: string | null;
|
|
710
|
+
compensationAmount: number | null;
|
|
543
711
|
activeAssignments: number;
|
|
544
712
|
}>;
|
|
545
713
|
updateCollaborator(userId: number, collaboratorId: number, data: Partial<CollaboratorPayload>): Promise<{
|
|
546
714
|
assignedProjects: Record<string, unknown>[];
|
|
547
715
|
relatedContracts: Record<string, unknown>[];
|
|
548
716
|
weeklySchedule: Record<string, unknown>[];
|
|
717
|
+
equityParticipation: {
|
|
718
|
+
participationType: string;
|
|
719
|
+
percentage: number | null;
|
|
720
|
+
votingPower: number | null;
|
|
721
|
+
startDate: string | null;
|
|
722
|
+
endDate: string | null;
|
|
723
|
+
notes: string | null;
|
|
724
|
+
};
|
|
549
725
|
timesheetSummary: {
|
|
550
726
|
totalTimesheets: number;
|
|
551
727
|
pendingTimesheets: number;
|
|
@@ -563,10 +739,13 @@ export declare class OperationsService {
|
|
|
563
739
|
personName: string | null;
|
|
564
740
|
personAvatarId: number | null;
|
|
565
741
|
code: string;
|
|
566
|
-
|
|
742
|
+
collaboratorTypeId: number | null;
|
|
743
|
+
collaboratorTypeSlug: string | null;
|
|
744
|
+
collaboratorType: string | null;
|
|
567
745
|
displayName: string;
|
|
568
746
|
departmentId: number | null;
|
|
569
747
|
department: string | null;
|
|
748
|
+
jobTitleId: number | null;
|
|
570
749
|
title: string | null;
|
|
571
750
|
levelLabel: string | null;
|
|
572
751
|
weeklyCapacityHours: number | null;
|
|
@@ -578,9 +757,22 @@ export declare class OperationsService {
|
|
|
578
757
|
supervisorName: string | null;
|
|
579
758
|
contractId: number | null;
|
|
580
759
|
contractStatus: string | null;
|
|
760
|
+
compensationAmount: number | null;
|
|
581
761
|
activeAssignments: number;
|
|
582
762
|
}>;
|
|
583
763
|
listDepartments(userId: number): Promise<Record<string, unknown>[]>;
|
|
764
|
+
listJobTitles(userId: number): Promise<Record<string, unknown>[]>;
|
|
765
|
+
createJobTitle(userId: number, data: JobTitlePayload): Promise<{
|
|
766
|
+
id: number;
|
|
767
|
+
slug: string;
|
|
768
|
+
code: string | null;
|
|
769
|
+
name: string;
|
|
770
|
+
description: string | null;
|
|
771
|
+
createdAt: string | null;
|
|
772
|
+
updatedAt: string | null;
|
|
773
|
+
deletedAt: string | null;
|
|
774
|
+
status: "active" | "inactive";
|
|
775
|
+
}>;
|
|
584
776
|
createDepartment(userId: number, data: DepartmentPayload): Promise<{
|
|
585
777
|
id: number;
|
|
586
778
|
slug: string;
|
|
@@ -604,11 +796,174 @@ export declare class OperationsService {
|
|
|
604
796
|
status: "active" | "inactive";
|
|
605
797
|
}>;
|
|
606
798
|
listProjects(userId: number): Promise<Record<string, unknown>[]>;
|
|
799
|
+
listProjectOptions(userId: number, paginationParams: {
|
|
800
|
+
page?: number;
|
|
801
|
+
pageSize?: number;
|
|
802
|
+
search?: string;
|
|
803
|
+
sortField?: string;
|
|
804
|
+
sortOrder?: string;
|
|
805
|
+
}): Promise<{
|
|
806
|
+
total: number;
|
|
807
|
+
lastPage: number;
|
|
808
|
+
page: number;
|
|
809
|
+
pageSize: number;
|
|
810
|
+
prev: number;
|
|
811
|
+
next: number;
|
|
812
|
+
data: {
|
|
813
|
+
label: string;
|
|
814
|
+
id: number;
|
|
815
|
+
code: string | null;
|
|
816
|
+
name: string;
|
|
817
|
+
clientName: string | null;
|
|
818
|
+
projectAssignmentId: number | null;
|
|
819
|
+
roleLabel: string | null;
|
|
820
|
+
status: string;
|
|
821
|
+
startDate: string | null;
|
|
822
|
+
endDate: string | null;
|
|
823
|
+
}[];
|
|
824
|
+
}>;
|
|
825
|
+
listTasks(userId: number, paginationParams: {
|
|
826
|
+
page?: number;
|
|
827
|
+
pageSize?: number;
|
|
828
|
+
search?: string;
|
|
829
|
+
sortField?: string;
|
|
830
|
+
sortOrder?: string;
|
|
831
|
+
projectId?: number;
|
|
832
|
+
projectAssignmentId?: number;
|
|
833
|
+
status?: string;
|
|
834
|
+
}): Promise<{
|
|
835
|
+
total: number;
|
|
836
|
+
lastPage: number;
|
|
837
|
+
page: number;
|
|
838
|
+
pageSize: number;
|
|
839
|
+
prev: number;
|
|
840
|
+
next: number;
|
|
841
|
+
data: {
|
|
842
|
+
label: string;
|
|
843
|
+
id: number;
|
|
844
|
+
name: string;
|
|
845
|
+
description: string | null;
|
|
846
|
+
status: string;
|
|
847
|
+
projectId: number;
|
|
848
|
+
projectAssignmentId: number;
|
|
849
|
+
projectName: string;
|
|
850
|
+
projectCode: string | null;
|
|
851
|
+
createdAt: string;
|
|
852
|
+
}[];
|
|
853
|
+
}>;
|
|
854
|
+
createTask(userId: number, data: TaskPayload): Promise<{
|
|
855
|
+
id: number;
|
|
856
|
+
name: string;
|
|
857
|
+
description: string | null;
|
|
858
|
+
priority: string;
|
|
859
|
+
status: string;
|
|
860
|
+
dueDate: string | null;
|
|
861
|
+
estimateHours: number | null;
|
|
862
|
+
position: number;
|
|
863
|
+
tags: string | null;
|
|
864
|
+
assigneeCollaboratorId: number | null;
|
|
865
|
+
assigneeName: string | null;
|
|
866
|
+
assigneeUserPhotoId: number | null;
|
|
867
|
+
assigneePersonAvatarId: number | null;
|
|
868
|
+
projectAssignmentId: number | null;
|
|
869
|
+
projectId: number | null;
|
|
870
|
+
createdAt: string;
|
|
871
|
+
}>;
|
|
872
|
+
updateTask(userId: number, taskId: number, data: Partial<TaskPayload>): Promise<{
|
|
873
|
+
id: number;
|
|
874
|
+
name: string;
|
|
875
|
+
description: string | null;
|
|
876
|
+
priority: string;
|
|
877
|
+
status: string;
|
|
878
|
+
dueDate: string | null;
|
|
879
|
+
estimateHours: number | null;
|
|
880
|
+
position: number;
|
|
881
|
+
tags: string | null;
|
|
882
|
+
assigneeCollaboratorId: number | null;
|
|
883
|
+
assigneeName: string | null;
|
|
884
|
+
assigneeUserPhotoId: number | null;
|
|
885
|
+
assigneePersonAvatarId: number | null;
|
|
886
|
+
projectAssignmentId: number | null;
|
|
887
|
+
projectId: number | null;
|
|
888
|
+
createdAt: string;
|
|
889
|
+
}>;
|
|
890
|
+
removeTask(userId: number, taskId: number): Promise<{
|
|
891
|
+
success: boolean;
|
|
892
|
+
}>;
|
|
893
|
+
listTimesheetEntries(userId: number, paginationParams: {
|
|
894
|
+
page?: number;
|
|
895
|
+
pageSize?: number;
|
|
896
|
+
search?: string;
|
|
897
|
+
sortField?: string;
|
|
898
|
+
sortOrder?: string;
|
|
899
|
+
projectId?: number;
|
|
900
|
+
projectAssignmentId?: number;
|
|
901
|
+
taskId?: number;
|
|
902
|
+
status?: string;
|
|
903
|
+
fromDate?: string;
|
|
904
|
+
toDate?: string;
|
|
905
|
+
}): Promise<{
|
|
906
|
+
total: number;
|
|
907
|
+
lastPage: number;
|
|
908
|
+
page: number;
|
|
909
|
+
pageSize: number;
|
|
910
|
+
prev: number;
|
|
911
|
+
next: number;
|
|
912
|
+
data: {
|
|
913
|
+
label: string;
|
|
914
|
+
id: number;
|
|
915
|
+
timesheetId: number;
|
|
916
|
+
collaboratorId: number;
|
|
917
|
+
projectId: number | null;
|
|
918
|
+
projectAssignmentId: number | null;
|
|
919
|
+
projectCode: string | null;
|
|
920
|
+
projectName: string | null;
|
|
921
|
+
taskId: number | null;
|
|
922
|
+
taskName: string | null;
|
|
923
|
+
activityLabel: string | null;
|
|
924
|
+
workDate: string;
|
|
925
|
+
durationMinutes: number | null;
|
|
926
|
+
hours: number | null;
|
|
927
|
+
description: string | null;
|
|
928
|
+
status: string;
|
|
929
|
+
weekStartDate: string;
|
|
930
|
+
weekEndDate: string;
|
|
931
|
+
createdAt: string;
|
|
932
|
+
}[];
|
|
933
|
+
}>;
|
|
934
|
+
createTimesheetEntry(userId: number, data: QuickTimesheetEntryPayload): Promise<{
|
|
935
|
+
label: string;
|
|
936
|
+
id: number;
|
|
937
|
+
timesheetId: number;
|
|
938
|
+
collaboratorId: number;
|
|
939
|
+
projectId: number | null;
|
|
940
|
+
projectAssignmentId: number | null;
|
|
941
|
+
projectCode: string | null;
|
|
942
|
+
projectName: string | null;
|
|
943
|
+
taskId: number | null;
|
|
944
|
+
taskName: string | null;
|
|
945
|
+
activityLabel: string | null;
|
|
946
|
+
workDate: string;
|
|
947
|
+
durationMinutes: number | null;
|
|
948
|
+
hours: number | null;
|
|
949
|
+
description: string | null;
|
|
950
|
+
status: string;
|
|
951
|
+
weekStartDate: string;
|
|
952
|
+
weekEndDate: string;
|
|
953
|
+
createdAt: string;
|
|
954
|
+
}>;
|
|
955
|
+
removeTimesheetEntry(userId: number, entryId: number): Promise<{
|
|
956
|
+
success: boolean;
|
|
957
|
+
}>;
|
|
607
958
|
getProjectById(userId: number, projectId: number): Promise<{
|
|
608
959
|
assignments: {
|
|
609
960
|
id: number;
|
|
610
961
|
collaboratorId: number;
|
|
962
|
+
userId: number | null;
|
|
963
|
+
personAvatarId: number | null;
|
|
964
|
+
userPhotoId: number | null;
|
|
611
965
|
collaboratorName: string;
|
|
966
|
+
projectRoleId: number | null;
|
|
612
967
|
roleLabel: string | null;
|
|
613
968
|
allocationPercent: number | null;
|
|
614
969
|
weeklyHours: number | null;
|
|
@@ -632,6 +987,8 @@ export declare class OperationsService {
|
|
|
632
987
|
id: number;
|
|
633
988
|
contractId: number | null;
|
|
634
989
|
managerCollaboratorId: number | null;
|
|
990
|
+
clientPersonId: number | null;
|
|
991
|
+
clientAvatarId: number | null;
|
|
635
992
|
code: string;
|
|
636
993
|
name: string;
|
|
637
994
|
clientName: string | null;
|
|
@@ -654,7 +1011,11 @@ export declare class OperationsService {
|
|
|
654
1011
|
assignments: {
|
|
655
1012
|
id: number;
|
|
656
1013
|
collaboratorId: number;
|
|
1014
|
+
userId: number | null;
|
|
1015
|
+
personAvatarId: number | null;
|
|
1016
|
+
userPhotoId: number | null;
|
|
657
1017
|
collaboratorName: string;
|
|
1018
|
+
projectRoleId: number | null;
|
|
658
1019
|
roleLabel: string | null;
|
|
659
1020
|
allocationPercent: number | null;
|
|
660
1021
|
weeklyHours: number | null;
|
|
@@ -678,6 +1039,8 @@ export declare class OperationsService {
|
|
|
678
1039
|
id: number;
|
|
679
1040
|
contractId: number | null;
|
|
680
1041
|
managerCollaboratorId: number | null;
|
|
1042
|
+
clientPersonId: number | null;
|
|
1043
|
+
clientAvatarId: number | null;
|
|
681
1044
|
code: string;
|
|
682
1045
|
name: string;
|
|
683
1046
|
clientName: string | null;
|
|
@@ -700,7 +1063,11 @@ export declare class OperationsService {
|
|
|
700
1063
|
assignments: {
|
|
701
1064
|
id: number;
|
|
702
1065
|
collaboratorId: number;
|
|
1066
|
+
userId: number | null;
|
|
1067
|
+
personAvatarId: number | null;
|
|
1068
|
+
userPhotoId: number | null;
|
|
703
1069
|
collaboratorName: string;
|
|
1070
|
+
projectRoleId: number | null;
|
|
704
1071
|
roleLabel: string | null;
|
|
705
1072
|
allocationPercent: number | null;
|
|
706
1073
|
weeklyHours: number | null;
|
|
@@ -724,6 +1091,8 @@ export declare class OperationsService {
|
|
|
724
1091
|
id: number;
|
|
725
1092
|
contractId: number | null;
|
|
726
1093
|
managerCollaboratorId: number | null;
|
|
1094
|
+
clientPersonId: number | null;
|
|
1095
|
+
clientAvatarId: number | null;
|
|
727
1096
|
code: string;
|
|
728
1097
|
name: string;
|
|
729
1098
|
clientName: string | null;
|
|
@@ -984,6 +1353,21 @@ export declare class OperationsService {
|
|
|
984
1353
|
private assertDepartmentCodeAvailable;
|
|
985
1354
|
private resolveDepartmentReference;
|
|
986
1355
|
private generateUniqueDepartmentSlug;
|
|
1356
|
+
private getJobTitleById;
|
|
1357
|
+
private assertJobTitleNameAvailable;
|
|
1358
|
+
private assertJobTitleCodeAvailable;
|
|
1359
|
+
private resolveJobTitleReference;
|
|
1360
|
+
private generateUniqueJobTitleSlug;
|
|
1361
|
+
private getCollaboratorTypeById;
|
|
1362
|
+
private assertCollaboratorTypeNameAvailable;
|
|
1363
|
+
private assertCollaboratorTypeSlugAvailable;
|
|
1364
|
+
private buildCollaboratorTypeSlug;
|
|
1365
|
+
private generateUniqueCollaboratorTypeSlug;
|
|
1366
|
+
private getProjectRoleById;
|
|
1367
|
+
private assertProjectRoleNameAvailable;
|
|
1368
|
+
private assertProjectRoleCodeAvailable;
|
|
1369
|
+
private generateUniqueProjectRoleSlug;
|
|
1370
|
+
private resolveCollaboratorTypeReference;
|
|
987
1371
|
private getContractTemplateRecord;
|
|
988
1372
|
private assertContractTemplateNameAvailable;
|
|
989
1373
|
private assertContractTemplateCodeAvailable;
|
|
@@ -994,10 +1378,35 @@ export declare class OperationsService {
|
|
|
994
1378
|
private getCollaboratorDetails;
|
|
995
1379
|
private getDirectReportIds;
|
|
996
1380
|
private getAssignedProjectIds;
|
|
1381
|
+
private resolveOwnedProjectAssignment;
|
|
1382
|
+
private resolveProjectAssignmentForActor;
|
|
1383
|
+
private getOwnedTaskRecord;
|
|
1384
|
+
private getTaskRecordForActor;
|
|
1385
|
+
listProjectBoardTasks(userId: number, projectId: number): Promise<{
|
|
1386
|
+
id: number;
|
|
1387
|
+
name: string;
|
|
1388
|
+
description: string | null;
|
|
1389
|
+
priority: string;
|
|
1390
|
+
status: string;
|
|
1391
|
+
dueDate: string | null;
|
|
1392
|
+
estimateHours: number | null;
|
|
1393
|
+
position: number;
|
|
1394
|
+
tags: string | null;
|
|
1395
|
+
assigneeCollaboratorId: number | null;
|
|
1396
|
+
assigneeName: string | null;
|
|
1397
|
+
assigneeUserPhotoId: number | null;
|
|
1398
|
+
assigneePersonAvatarId: number | null;
|
|
1399
|
+
projectAssignmentId: number | null;
|
|
1400
|
+
createdAt: string;
|
|
1401
|
+
}[]>;
|
|
1402
|
+
private getProjectBoardTask;
|
|
1403
|
+
private getOrCreateTimesheetForWorkDate;
|
|
1404
|
+
private getTimesheetEntryByIdForActor;
|
|
997
1405
|
private getTimesheetById;
|
|
998
1406
|
private replaceTimesheetEntries;
|
|
999
1407
|
private refreshTimesheetTotal;
|
|
1000
1408
|
private upsertApproval;
|
|
1409
|
+
private applyApprovedScheduleAdjustmentIfNeeded;
|
|
1001
1410
|
private insertApprovalHistory;
|
|
1002
1411
|
private assertProjectAccess;
|
|
1003
1412
|
private ensureCollaboratorAccess;
|
|
@@ -1008,10 +1417,14 @@ export declare class OperationsService {
|
|
|
1008
1417
|
private defaultWeeklySchedule;
|
|
1009
1418
|
private replaceCollaboratorScheduleDays;
|
|
1010
1419
|
private replaceProjectAssignments;
|
|
1420
|
+
private replaceCollaboratorEquityParticipation;
|
|
1421
|
+
private normalizeCollaboratorTypeKey;
|
|
1011
1422
|
private mapContractCategoryForCollaboratorType;
|
|
1012
1423
|
private mapBillingModelForCollaboratorType;
|
|
1013
1424
|
private mapContractTypeForCollaboratorType;
|
|
1425
|
+
private buildHiringContractName;
|
|
1014
1426
|
private createHiringContractDraft;
|
|
1427
|
+
private syncHiringContractDraft;
|
|
1015
1428
|
private createProjectContractDraft;
|
|
1016
1429
|
private replaceContractParties;
|
|
1017
1430
|
private replaceContractSignatures;
|
|
@@ -1037,6 +1450,14 @@ export declare class OperationsService {
|
|
|
1037
1450
|
private parseAiJsonPayload;
|
|
1038
1451
|
private normalizeContractExtractDraft;
|
|
1039
1452
|
private normalizeExtractionString;
|
|
1453
|
+
private normalizeDurationMinutes;
|
|
1454
|
+
private resolveEntryDurationMinutes;
|
|
1455
|
+
private normalizeDateOnly;
|
|
1456
|
+
private parseDateOnly;
|
|
1457
|
+
private formatDateOnly;
|
|
1458
|
+
private getWorkWeekRange;
|
|
1459
|
+
private normalizePaginationParams;
|
|
1460
|
+
private buildPaginationResult;
|
|
1040
1461
|
private normalizeExtractionBoolean;
|
|
1041
1462
|
private normalizeExtractionNumber;
|
|
1042
1463
|
private normalizeExtractionDate;
|