@hed-hog/operations 0.0.303 → 0.0.304
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 +169 -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 +54 -0
- package/dist/controllers/operations-tasks.controller.d.ts.map +1 -0
- package/dist/controllers/operations-tasks.controller.js +79 -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 +8 -0
- package/dist/dto/create-task.dto.d.ts.map +1 -0
- package/dist/dto/create-task.dto.js +50 -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 +8 -0
- package/dist/dto/update-task.dto.d.ts.map +1 -0
- package/dist/dto/update-task.dto.js +51 -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 +373 -8
- package/dist/operations.service.d.ts.map +1 -1
- package/dist/operations.service.js +1598 -111
- 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 +183 -0
- package/hedhog/frontend/app/_components/async-options-combobox.tsx.ejs +231 -0
- package/hedhog/frontend/app/_components/collaborator-details-screen.tsx.ejs +134 -49
- package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +772 -93
- package/hedhog/frontend/app/_components/department-select-with-create.tsx.ejs +38 -16
- package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +875 -632
- 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 +142 -39
- package/hedhog/frontend/app/_lib/utils/format.ts.ejs +33 -2
- 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 +109 -68
- 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/page.tsx.ejs +5 -1
- 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 +243 -51
- package/hedhog/frontend/messages/pt.json +458 -268
- 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_assignment.yaml +9 -0
- package/hedhog/table/operations_project_role.yaml +39 -0
- package/hedhog/table/operations_task.yaml +30 -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 +52 -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 +35 -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 +36 -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 +4641 -2163
- 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 ["active", "completed", "archived"];
|
|
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;
|
|
@@ -318,6 +349,7 @@ type ProjectPayload = {
|
|
|
318
349
|
autoGenerateContractDraft?: boolean;
|
|
319
350
|
teamAssignments?: Array<{
|
|
320
351
|
collaboratorId: number;
|
|
352
|
+
projectRoleId?: number | null;
|
|
321
353
|
roleLabel?: string | null;
|
|
322
354
|
allocationPercent?: number | null;
|
|
323
355
|
weeklyHours?: number | null;
|
|
@@ -329,9 +361,32 @@ type ProjectPayload = {
|
|
|
329
361
|
};
|
|
330
362
|
type TimesheetEntryPayload = {
|
|
331
363
|
projectAssignmentId?: number | null;
|
|
364
|
+
taskId?: number | null;
|
|
365
|
+
taskName?: string | null;
|
|
366
|
+
activityLabel?: string | null;
|
|
367
|
+
workDate: string;
|
|
368
|
+
hours?: number | null;
|
|
369
|
+
duration?: number | null;
|
|
370
|
+
durationMinutes?: number | null;
|
|
371
|
+
unit?: 'hours' | 'minutes';
|
|
372
|
+
description?: string | null;
|
|
373
|
+
};
|
|
374
|
+
type TaskPayload = {
|
|
375
|
+
projectId?: number | null;
|
|
376
|
+
projectAssignmentId?: number | null;
|
|
377
|
+
name?: string | null;
|
|
378
|
+
description?: string | null;
|
|
379
|
+
status?: (typeof TASK_STATUS_VALUES)[number];
|
|
380
|
+
};
|
|
381
|
+
type QuickTimesheetEntryPayload = {
|
|
382
|
+
projectId?: number | null;
|
|
383
|
+
projectAssignmentId?: number | null;
|
|
384
|
+
taskId?: number | null;
|
|
385
|
+
taskName?: string | null;
|
|
332
386
|
activityLabel?: string | null;
|
|
333
387
|
workDate: string;
|
|
334
|
-
|
|
388
|
+
duration: number;
|
|
389
|
+
unit?: 'hours' | 'minutes';
|
|
335
390
|
description?: string | null;
|
|
336
391
|
};
|
|
337
392
|
type TimesheetPayload = {
|
|
@@ -386,8 +441,78 @@ export declare class OperationsService {
|
|
|
386
441
|
private readonly integrationApi;
|
|
387
442
|
private readonly fileService;
|
|
388
443
|
private readonly settingService;
|
|
444
|
+
private readonly accessService;
|
|
445
|
+
private readonly localeService?;
|
|
389
446
|
private readonly logger;
|
|
390
|
-
constructor(prisma: PrismaService, aiService: AiService, integrationApi: IntegrationDeveloperApiService, fileService: FileService, settingService: SettingService);
|
|
447
|
+
constructor(prisma: PrismaService, aiService: AiService, integrationApi: IntegrationDeveloperApiService, fileService: FileService, settingService: SettingService, accessService: OperationsAccessService, localeService?: LocaleService);
|
|
448
|
+
private normalizeLocaleCode;
|
|
449
|
+
private resolvePreferredLocaleId;
|
|
450
|
+
listCollaboratorTypes(userId: number, filters?: {
|
|
451
|
+
active?: boolean;
|
|
452
|
+
}): Promise<{
|
|
453
|
+
id: number;
|
|
454
|
+
slug: string;
|
|
455
|
+
name: string;
|
|
456
|
+
description: string | null;
|
|
457
|
+
category: string | null;
|
|
458
|
+
isActive: boolean;
|
|
459
|
+
sortOrder: number;
|
|
460
|
+
status: "active" | "inactive";
|
|
461
|
+
collaboratorCount: number;
|
|
462
|
+
createdAt: string;
|
|
463
|
+
updatedAt: string;
|
|
464
|
+
}[]>;
|
|
465
|
+
createCollaboratorType(userId: number, data: CollaboratorTypePayload): Promise<{
|
|
466
|
+
id: number;
|
|
467
|
+
slug: string;
|
|
468
|
+
name: string;
|
|
469
|
+
description: string | null;
|
|
470
|
+
category: string | null;
|
|
471
|
+
isActive: boolean;
|
|
472
|
+
sortOrder: number;
|
|
473
|
+
status: "active" | "inactive";
|
|
474
|
+
collaboratorCount: number;
|
|
475
|
+
createdAt: string | null;
|
|
476
|
+
updatedAt: string | null;
|
|
477
|
+
deletedAt: string | null;
|
|
478
|
+
}>;
|
|
479
|
+
updateCollaboratorType(userId: number, collaboratorTypeId: number, data: Partial<CollaboratorTypePayload>): Promise<{
|
|
480
|
+
id: number;
|
|
481
|
+
slug: string;
|
|
482
|
+
name: string;
|
|
483
|
+
description: string | null;
|
|
484
|
+
category: string | null;
|
|
485
|
+
isActive: boolean;
|
|
486
|
+
sortOrder: number;
|
|
487
|
+
status: "active" | "inactive";
|
|
488
|
+
collaboratorCount: number;
|
|
489
|
+
createdAt: string | null;
|
|
490
|
+
updatedAt: string | null;
|
|
491
|
+
deletedAt: string | null;
|
|
492
|
+
}>;
|
|
493
|
+
listProjectRoles(userId: number): Promise<{
|
|
494
|
+
id: number;
|
|
495
|
+
slug: string;
|
|
496
|
+
code: string | null;
|
|
497
|
+
name: string;
|
|
498
|
+
description: string | null;
|
|
499
|
+
isActive: boolean;
|
|
500
|
+
sortOrder: number;
|
|
501
|
+
createdAt: string;
|
|
502
|
+
updatedAt: string;
|
|
503
|
+
}[]>;
|
|
504
|
+
createProjectRole(userId: number, data: ProjectRolePayload): Promise<{
|
|
505
|
+
id: number;
|
|
506
|
+
slug: string;
|
|
507
|
+
code: string | null;
|
|
508
|
+
name: string;
|
|
509
|
+
description: string | null;
|
|
510
|
+
isActive: boolean;
|
|
511
|
+
sortOrder: number;
|
|
512
|
+
createdAt: string | null;
|
|
513
|
+
updatedAt: string | null;
|
|
514
|
+
deletedAt: string | null;
|
|
515
|
+
}>;
|
|
391
516
|
getDashboard(userId: number): Promise<{
|
|
392
517
|
actor: {
|
|
393
518
|
roleScope: string;
|
|
@@ -418,6 +543,14 @@ export declare class OperationsService {
|
|
|
418
543
|
assignedProjects: Record<string, unknown>[];
|
|
419
544
|
relatedContracts: Record<string, unknown>[];
|
|
420
545
|
weeklySchedule: Record<string, unknown>[];
|
|
546
|
+
equityParticipation: {
|
|
547
|
+
participationType: string;
|
|
548
|
+
percentage: number | null;
|
|
549
|
+
votingPower: number | null;
|
|
550
|
+
startDate: string | null;
|
|
551
|
+
endDate: string | null;
|
|
552
|
+
notes: string | null;
|
|
553
|
+
};
|
|
421
554
|
timesheetSummary: {
|
|
422
555
|
totalTimesheets: number;
|
|
423
556
|
pendingTimesheets: number;
|
|
@@ -435,10 +568,13 @@ export declare class OperationsService {
|
|
|
435
568
|
personName: string | null;
|
|
436
569
|
personAvatarId: number | null;
|
|
437
570
|
code: string;
|
|
438
|
-
|
|
571
|
+
collaboratorTypeId: number | null;
|
|
572
|
+
collaboratorTypeSlug: string | null;
|
|
573
|
+
collaboratorType: string | null;
|
|
439
574
|
displayName: string;
|
|
440
575
|
departmentId: number | null;
|
|
441
576
|
department: string | null;
|
|
577
|
+
jobTitleId: number | null;
|
|
442
578
|
title: string | null;
|
|
443
579
|
levelLabel: string | null;
|
|
444
580
|
weeklyCapacityHours: number | null;
|
|
@@ -450,12 +586,21 @@ export declare class OperationsService {
|
|
|
450
586
|
supervisorName: string | null;
|
|
451
587
|
contractId: number | null;
|
|
452
588
|
contractStatus: string | null;
|
|
589
|
+
compensationAmount: number | null;
|
|
453
590
|
activeAssignments: number;
|
|
454
591
|
}>;
|
|
455
592
|
getCollaboratorByIdForUser(userId: number, collaboratorId: number): Promise<{
|
|
456
593
|
assignedProjects: Record<string, unknown>[];
|
|
457
594
|
relatedContracts: Record<string, unknown>[];
|
|
458
595
|
weeklySchedule: Record<string, unknown>[];
|
|
596
|
+
equityParticipation: {
|
|
597
|
+
participationType: string;
|
|
598
|
+
percentage: number | null;
|
|
599
|
+
votingPower: number | null;
|
|
600
|
+
startDate: string | null;
|
|
601
|
+
endDate: string | null;
|
|
602
|
+
notes: string | null;
|
|
603
|
+
};
|
|
459
604
|
timesheetSummary: {
|
|
460
605
|
totalTimesheets: number;
|
|
461
606
|
pendingTimesheets: number;
|
|
@@ -473,10 +618,13 @@ export declare class OperationsService {
|
|
|
473
618
|
personName: string | null;
|
|
474
619
|
personAvatarId: number | null;
|
|
475
620
|
code: string;
|
|
476
|
-
|
|
621
|
+
collaboratorTypeId: number | null;
|
|
622
|
+
collaboratorTypeSlug: string | null;
|
|
623
|
+
collaboratorType: string | null;
|
|
477
624
|
displayName: string;
|
|
478
625
|
departmentId: number | null;
|
|
479
626
|
department: string | null;
|
|
627
|
+
jobTitleId: number | null;
|
|
480
628
|
title: string | null;
|
|
481
629
|
levelLabel: string | null;
|
|
482
630
|
weeklyCapacityHours: number | null;
|
|
@@ -488,6 +636,7 @@ export declare class OperationsService {
|
|
|
488
636
|
supervisorName: string | null;
|
|
489
637
|
contractId: number | null;
|
|
490
638
|
contractStatus: string | null;
|
|
639
|
+
compensationAmount: number | null;
|
|
491
640
|
activeAssignments: number;
|
|
492
641
|
}>;
|
|
493
642
|
getTeam(userId: number): Promise<{
|
|
@@ -508,6 +657,14 @@ export declare class OperationsService {
|
|
|
508
657
|
assignedProjects: Record<string, unknown>[];
|
|
509
658
|
relatedContracts: Record<string, unknown>[];
|
|
510
659
|
weeklySchedule: Record<string, unknown>[];
|
|
660
|
+
equityParticipation: {
|
|
661
|
+
participationType: string;
|
|
662
|
+
percentage: number | null;
|
|
663
|
+
votingPower: number | null;
|
|
664
|
+
startDate: string | null;
|
|
665
|
+
endDate: string | null;
|
|
666
|
+
notes: string | null;
|
|
667
|
+
};
|
|
511
668
|
timesheetSummary: {
|
|
512
669
|
totalTimesheets: number;
|
|
513
670
|
pendingTimesheets: number;
|
|
@@ -525,10 +682,13 @@ export declare class OperationsService {
|
|
|
525
682
|
personName: string | null;
|
|
526
683
|
personAvatarId: number | null;
|
|
527
684
|
code: string;
|
|
528
|
-
|
|
685
|
+
collaboratorTypeId: number | null;
|
|
686
|
+
collaboratorTypeSlug: string | null;
|
|
687
|
+
collaboratorType: string | null;
|
|
529
688
|
displayName: string;
|
|
530
689
|
departmentId: number | null;
|
|
531
690
|
department: string | null;
|
|
691
|
+
jobTitleId: number | null;
|
|
532
692
|
title: string | null;
|
|
533
693
|
levelLabel: string | null;
|
|
534
694
|
weeklyCapacityHours: number | null;
|
|
@@ -540,12 +700,21 @@ export declare class OperationsService {
|
|
|
540
700
|
supervisorName: string | null;
|
|
541
701
|
contractId: number | null;
|
|
542
702
|
contractStatus: string | null;
|
|
703
|
+
compensationAmount: number | null;
|
|
543
704
|
activeAssignments: number;
|
|
544
705
|
}>;
|
|
545
706
|
updateCollaborator(userId: number, collaboratorId: number, data: Partial<CollaboratorPayload>): Promise<{
|
|
546
707
|
assignedProjects: Record<string, unknown>[];
|
|
547
708
|
relatedContracts: Record<string, unknown>[];
|
|
548
709
|
weeklySchedule: Record<string, unknown>[];
|
|
710
|
+
equityParticipation: {
|
|
711
|
+
participationType: string;
|
|
712
|
+
percentage: number | null;
|
|
713
|
+
votingPower: number | null;
|
|
714
|
+
startDate: string | null;
|
|
715
|
+
endDate: string | null;
|
|
716
|
+
notes: string | null;
|
|
717
|
+
};
|
|
549
718
|
timesheetSummary: {
|
|
550
719
|
totalTimesheets: number;
|
|
551
720
|
pendingTimesheets: number;
|
|
@@ -563,10 +732,13 @@ export declare class OperationsService {
|
|
|
563
732
|
personName: string | null;
|
|
564
733
|
personAvatarId: number | null;
|
|
565
734
|
code: string;
|
|
566
|
-
|
|
735
|
+
collaboratorTypeId: number | null;
|
|
736
|
+
collaboratorTypeSlug: string | null;
|
|
737
|
+
collaboratorType: string | null;
|
|
567
738
|
displayName: string;
|
|
568
739
|
departmentId: number | null;
|
|
569
740
|
department: string | null;
|
|
741
|
+
jobTitleId: number | null;
|
|
570
742
|
title: string | null;
|
|
571
743
|
levelLabel: string | null;
|
|
572
744
|
weeklyCapacityHours: number | null;
|
|
@@ -578,9 +750,22 @@ export declare class OperationsService {
|
|
|
578
750
|
supervisorName: string | null;
|
|
579
751
|
contractId: number | null;
|
|
580
752
|
contractStatus: string | null;
|
|
753
|
+
compensationAmount: number | null;
|
|
581
754
|
activeAssignments: number;
|
|
582
755
|
}>;
|
|
583
756
|
listDepartments(userId: number): Promise<Record<string, unknown>[]>;
|
|
757
|
+
listJobTitles(userId: number): Promise<Record<string, unknown>[]>;
|
|
758
|
+
createJobTitle(userId: number, data: JobTitlePayload): Promise<{
|
|
759
|
+
id: number;
|
|
760
|
+
slug: string;
|
|
761
|
+
code: string | null;
|
|
762
|
+
name: string;
|
|
763
|
+
description: string | null;
|
|
764
|
+
createdAt: string | null;
|
|
765
|
+
updatedAt: string | null;
|
|
766
|
+
deletedAt: string | null;
|
|
767
|
+
status: "active" | "inactive";
|
|
768
|
+
}>;
|
|
584
769
|
createDepartment(userId: number, data: DepartmentPayload): Promise<{
|
|
585
770
|
id: number;
|
|
586
771
|
slug: string;
|
|
@@ -604,11 +789,157 @@ export declare class OperationsService {
|
|
|
604
789
|
status: "active" | "inactive";
|
|
605
790
|
}>;
|
|
606
791
|
listProjects(userId: number): Promise<Record<string, unknown>[]>;
|
|
792
|
+
listProjectOptions(userId: number, paginationParams: {
|
|
793
|
+
page?: number;
|
|
794
|
+
pageSize?: number;
|
|
795
|
+
search?: string;
|
|
796
|
+
sortField?: string;
|
|
797
|
+
sortOrder?: string;
|
|
798
|
+
}): Promise<{
|
|
799
|
+
total: number;
|
|
800
|
+
lastPage: number;
|
|
801
|
+
page: number;
|
|
802
|
+
pageSize: number;
|
|
803
|
+
prev: number;
|
|
804
|
+
next: number;
|
|
805
|
+
data: {
|
|
806
|
+
label: string;
|
|
807
|
+
id: number;
|
|
808
|
+
code: string | null;
|
|
809
|
+
name: string;
|
|
810
|
+
clientName: string | null;
|
|
811
|
+
projectAssignmentId: number | null;
|
|
812
|
+
roleLabel: string | null;
|
|
813
|
+
status: string;
|
|
814
|
+
startDate: string | null;
|
|
815
|
+
endDate: string | null;
|
|
816
|
+
}[];
|
|
817
|
+
}>;
|
|
818
|
+
listTasks(userId: number, paginationParams: {
|
|
819
|
+
page?: number;
|
|
820
|
+
pageSize?: number;
|
|
821
|
+
search?: string;
|
|
822
|
+
sortField?: string;
|
|
823
|
+
sortOrder?: string;
|
|
824
|
+
projectId?: number;
|
|
825
|
+
projectAssignmentId?: number;
|
|
826
|
+
status?: string;
|
|
827
|
+
}): Promise<{
|
|
828
|
+
total: number;
|
|
829
|
+
lastPage: number;
|
|
830
|
+
page: number;
|
|
831
|
+
pageSize: number;
|
|
832
|
+
prev: number;
|
|
833
|
+
next: number;
|
|
834
|
+
data: {
|
|
835
|
+
label: string;
|
|
836
|
+
id: number;
|
|
837
|
+
name: string;
|
|
838
|
+
description: string | null;
|
|
839
|
+
status: string;
|
|
840
|
+
projectId: number;
|
|
841
|
+
projectAssignmentId: number;
|
|
842
|
+
projectName: string;
|
|
843
|
+
projectCode: string | null;
|
|
844
|
+
createdAt: string;
|
|
845
|
+
}[];
|
|
846
|
+
}>;
|
|
847
|
+
createTask(userId: number, data: TaskPayload): Promise<{
|
|
848
|
+
label: string;
|
|
849
|
+
id: number;
|
|
850
|
+
name: string;
|
|
851
|
+
description: string | null;
|
|
852
|
+
status: string;
|
|
853
|
+
projectAssignmentId: number;
|
|
854
|
+
projectId: number;
|
|
855
|
+
projectName: string;
|
|
856
|
+
projectCode: string | null;
|
|
857
|
+
}>;
|
|
858
|
+
updateTask(userId: number, taskId: number, data: Partial<TaskPayload>): Promise<{
|
|
859
|
+
label: string;
|
|
860
|
+
id: number;
|
|
861
|
+
name: string;
|
|
862
|
+
description: string | null;
|
|
863
|
+
status: string;
|
|
864
|
+
projectAssignmentId: number;
|
|
865
|
+
projectId: number;
|
|
866
|
+
projectName: string;
|
|
867
|
+
projectCode: string | null;
|
|
868
|
+
}>;
|
|
869
|
+
removeTask(userId: number, taskId: number): Promise<{
|
|
870
|
+
success: boolean;
|
|
871
|
+
}>;
|
|
872
|
+
listTimesheetEntries(userId: number, paginationParams: {
|
|
873
|
+
page?: number;
|
|
874
|
+
pageSize?: number;
|
|
875
|
+
search?: string;
|
|
876
|
+
sortField?: string;
|
|
877
|
+
sortOrder?: string;
|
|
878
|
+
projectId?: number;
|
|
879
|
+
projectAssignmentId?: number;
|
|
880
|
+
taskId?: number;
|
|
881
|
+
status?: string;
|
|
882
|
+
fromDate?: string;
|
|
883
|
+
toDate?: string;
|
|
884
|
+
}): Promise<{
|
|
885
|
+
total: number;
|
|
886
|
+
lastPage: number;
|
|
887
|
+
page: number;
|
|
888
|
+
pageSize: number;
|
|
889
|
+
prev: number;
|
|
890
|
+
next: number;
|
|
891
|
+
data: {
|
|
892
|
+
label: string;
|
|
893
|
+
id: number;
|
|
894
|
+
timesheetId: number;
|
|
895
|
+
collaboratorId: number;
|
|
896
|
+
projectId: number | null;
|
|
897
|
+
projectAssignmentId: number | null;
|
|
898
|
+
projectCode: string | null;
|
|
899
|
+
projectName: string | null;
|
|
900
|
+
taskId: number | null;
|
|
901
|
+
taskName: string | null;
|
|
902
|
+
activityLabel: string | null;
|
|
903
|
+
workDate: string;
|
|
904
|
+
durationMinutes: number | null;
|
|
905
|
+
hours: number | null;
|
|
906
|
+
description: string | null;
|
|
907
|
+
status: string;
|
|
908
|
+
weekStartDate: string;
|
|
909
|
+
weekEndDate: string;
|
|
910
|
+
createdAt: string;
|
|
911
|
+
}[];
|
|
912
|
+
}>;
|
|
913
|
+
createTimesheetEntry(userId: number, data: QuickTimesheetEntryPayload): Promise<{
|
|
914
|
+
label: string;
|
|
915
|
+
id: number;
|
|
916
|
+
timesheetId: number;
|
|
917
|
+
collaboratorId: number;
|
|
918
|
+
projectId: number | null;
|
|
919
|
+
projectAssignmentId: number | null;
|
|
920
|
+
projectCode: string | null;
|
|
921
|
+
projectName: string | null;
|
|
922
|
+
taskId: number | null;
|
|
923
|
+
taskName: string | null;
|
|
924
|
+
activityLabel: string | null;
|
|
925
|
+
workDate: string;
|
|
926
|
+
durationMinutes: number | null;
|
|
927
|
+
hours: number | null;
|
|
928
|
+
description: string | null;
|
|
929
|
+
status: string;
|
|
930
|
+
weekStartDate: string;
|
|
931
|
+
weekEndDate: string;
|
|
932
|
+
createdAt: string;
|
|
933
|
+
}>;
|
|
934
|
+
removeTimesheetEntry(userId: number, entryId: number): Promise<{
|
|
935
|
+
success: boolean;
|
|
936
|
+
}>;
|
|
607
937
|
getProjectById(userId: number, projectId: number): Promise<{
|
|
608
938
|
assignments: {
|
|
609
939
|
id: number;
|
|
610
940
|
collaboratorId: number;
|
|
611
941
|
collaboratorName: string;
|
|
942
|
+
projectRoleId: number | null;
|
|
612
943
|
roleLabel: string | null;
|
|
613
944
|
allocationPercent: number | null;
|
|
614
945
|
weeklyHours: number | null;
|
|
@@ -655,6 +986,7 @@ export declare class OperationsService {
|
|
|
655
986
|
id: number;
|
|
656
987
|
collaboratorId: number;
|
|
657
988
|
collaboratorName: string;
|
|
989
|
+
projectRoleId: number | null;
|
|
658
990
|
roleLabel: string | null;
|
|
659
991
|
allocationPercent: number | null;
|
|
660
992
|
weeklyHours: number | null;
|
|
@@ -701,6 +1033,7 @@ export declare class OperationsService {
|
|
|
701
1033
|
id: number;
|
|
702
1034
|
collaboratorId: number;
|
|
703
1035
|
collaboratorName: string;
|
|
1036
|
+
projectRoleId: number | null;
|
|
704
1037
|
roleLabel: string | null;
|
|
705
1038
|
allocationPercent: number | null;
|
|
706
1039
|
weeklyHours: number | null;
|
|
@@ -984,6 +1317,21 @@ export declare class OperationsService {
|
|
|
984
1317
|
private assertDepartmentCodeAvailable;
|
|
985
1318
|
private resolveDepartmentReference;
|
|
986
1319
|
private generateUniqueDepartmentSlug;
|
|
1320
|
+
private getJobTitleById;
|
|
1321
|
+
private assertJobTitleNameAvailable;
|
|
1322
|
+
private assertJobTitleCodeAvailable;
|
|
1323
|
+
private resolveJobTitleReference;
|
|
1324
|
+
private generateUniqueJobTitleSlug;
|
|
1325
|
+
private getCollaboratorTypeById;
|
|
1326
|
+
private assertCollaboratorTypeNameAvailable;
|
|
1327
|
+
private assertCollaboratorTypeSlugAvailable;
|
|
1328
|
+
private buildCollaboratorTypeSlug;
|
|
1329
|
+
private generateUniqueCollaboratorTypeSlug;
|
|
1330
|
+
private getProjectRoleById;
|
|
1331
|
+
private assertProjectRoleNameAvailable;
|
|
1332
|
+
private assertProjectRoleCodeAvailable;
|
|
1333
|
+
private generateUniqueProjectRoleSlug;
|
|
1334
|
+
private resolveCollaboratorTypeReference;
|
|
987
1335
|
private getContractTemplateRecord;
|
|
988
1336
|
private assertContractTemplateNameAvailable;
|
|
989
1337
|
private assertContractTemplateCodeAvailable;
|
|
@@ -994,10 +1342,16 @@ export declare class OperationsService {
|
|
|
994
1342
|
private getCollaboratorDetails;
|
|
995
1343
|
private getDirectReportIds;
|
|
996
1344
|
private getAssignedProjectIds;
|
|
1345
|
+
private resolveOwnedProjectAssignment;
|
|
1346
|
+
private getOwnedTaskRecord;
|
|
1347
|
+
private getTaskOptionById;
|
|
1348
|
+
private getOrCreateTimesheetForWorkDate;
|
|
1349
|
+
private getTimesheetEntryByIdForActor;
|
|
997
1350
|
private getTimesheetById;
|
|
998
1351
|
private replaceTimesheetEntries;
|
|
999
1352
|
private refreshTimesheetTotal;
|
|
1000
1353
|
private upsertApproval;
|
|
1354
|
+
private applyApprovedScheduleAdjustmentIfNeeded;
|
|
1001
1355
|
private insertApprovalHistory;
|
|
1002
1356
|
private assertProjectAccess;
|
|
1003
1357
|
private ensureCollaboratorAccess;
|
|
@@ -1008,9 +1362,12 @@ export declare class OperationsService {
|
|
|
1008
1362
|
private defaultWeeklySchedule;
|
|
1009
1363
|
private replaceCollaboratorScheduleDays;
|
|
1010
1364
|
private replaceProjectAssignments;
|
|
1365
|
+
private replaceCollaboratorEquityParticipation;
|
|
1366
|
+
private normalizeCollaboratorTypeKey;
|
|
1011
1367
|
private mapContractCategoryForCollaboratorType;
|
|
1012
1368
|
private mapBillingModelForCollaboratorType;
|
|
1013
1369
|
private mapContractTypeForCollaboratorType;
|
|
1370
|
+
private buildHiringContractName;
|
|
1014
1371
|
private createHiringContractDraft;
|
|
1015
1372
|
private createProjectContractDraft;
|
|
1016
1373
|
private replaceContractParties;
|
|
@@ -1037,6 +1394,14 @@ export declare class OperationsService {
|
|
|
1037
1394
|
private parseAiJsonPayload;
|
|
1038
1395
|
private normalizeContractExtractDraft;
|
|
1039
1396
|
private normalizeExtractionString;
|
|
1397
|
+
private normalizeDurationMinutes;
|
|
1398
|
+
private resolveEntryDurationMinutes;
|
|
1399
|
+
private normalizeDateOnly;
|
|
1400
|
+
private parseDateOnly;
|
|
1401
|
+
private formatDateOnly;
|
|
1402
|
+
private getWorkWeekRange;
|
|
1403
|
+
private normalizePaginationParams;
|
|
1404
|
+
private buildPaginationResult;
|
|
1040
1405
|
private normalizeExtractionBoolean;
|
|
1041
1406
|
private normalizeExtractionNumber;
|
|
1042
1407
|
private normalizeExtractionDate;
|