@hed-hog/operations 0.0.332 → 0.0.347
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/controllers/operations-collaborators.controller.d.ts +55 -36
- package/dist/controllers/operations-collaborators.controller.d.ts.map +1 -1
- package/dist/controllers/operations-projects.controller.d.ts +3 -0
- package/dist/controllers/operations-projects.controller.d.ts.map +1 -1
- package/dist/operations.service.d.ts +58 -36
- package/dist/operations.service.d.ts.map +1 -1
- package/dist/operations.service.js +34 -34
- package/dist/operations.service.js.map +1 -1
- package/dist/operations.service.spec.js +6 -0
- package/dist/operations.service.spec.js.map +1 -1
- package/hedhog/data/menu.yaml +5 -3
- package/hedhog/data/route.yaml +7 -7
- package/hedhog/frontend/app/_components/collaborator-details-screen.tsx.ejs +476 -0
- package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +3 -1
- package/hedhog/frontend/app/_components/collaborator-select-with-create.tsx.ejs +261 -0
- package/hedhog/frontend/app/_components/collaborator-tasks-tab.tsx.ejs +358 -358
- package/hedhog/frontend/app/_components/collaborator-timesheets-tab.tsx.ejs +6 -6
- package/hedhog/frontend/app/_components/contract-content-editor.tsx.ejs +258 -0
- package/hedhog/frontend/app/_components/my-project-summary-screen.tsx.ejs +5 -4
- package/hedhog/frontend/app/_components/person-select-with-create.tsx.ejs +1 -0
- package/hedhog/frontend/app/_components/project-assignments-tab.tsx.ejs +0 -6
- package/hedhog/frontend/app/_components/project-cost-report-screen.tsx.ejs +23 -23
- package/hedhog/frontend/app/_components/project-details-screen.tsx.ejs +23 -50
- package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +62 -28
- package/hedhog/frontend/app/_components/task-detail-sheet.tsx.ejs +23 -6
- package/hedhog/frontend/app/_components/task-form-sheet.tsx.ejs +629 -629
- package/hedhog/frontend/app/_lib/api.ts.ejs +2 -2
- package/hedhog/frontend/app/_lib/utils/task-ui.ts.ejs +1 -1
- package/hedhog/frontend/app/my-projects/page.tsx.ejs +2 -16
- package/hedhog/frontend/app/my-tasks/page.tsx.ejs +86 -24
- package/hedhog/frontend/app/projects/page.tsx.ejs +6 -42
- package/hedhog/frontend/messages/operations/operations/en.json +2100 -0
- package/hedhog/frontend/messages/operations/operations/pt.json +2111 -0
- package/hedhog/frontend/widgets/capacity-distribution.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/effort-by-project.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/headcount-by-area.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/index.ts.ejs +25 -25
- package/hedhog/frontend/widgets/managed-projects-status.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/my-hours-period-kpi.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/my-open-requests-kpi.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/my-pending-requests-list.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/my-project-allocations-kpi.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/my-quick-actions.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/my-relevant-deadlines.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/my-timesheet-status-kpi.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/my-weekly-journey.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/portfolio-costs-kpi.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/portfolio-effort-kpi.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/portfolio-projects-kpi.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/portfolio-risk-kpi.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/project-status-overview.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/shared-operations-widget.tsx.ejs +169 -169
- package/hedhog/frontend/widgets/strategic-deadlines.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/team-approval-queue.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/team-capacity-kpi.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/team-headcount-kpi.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/team-hours-kpi.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/team-pending-approvals-kpi.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/team-utilization-overview.tsx.ejs +16 -16
- package/hedhog/frontend/widgets/team-workload-alerts.tsx.ejs +16 -16
- package/hedhog/table/operations_collaborator.yaml +8 -8
- package/hedhog/table/operations_task.yaml +76 -76
- package/hedhog/table/operations_task_activity.yaml +51 -51
- package/package.json +6 -6
- package/src/controllers/operations-collaborators.controller.ts +9 -9
- package/src/controllers/operations-tasks.controller.ts +156 -156
- package/src/dashboard/widgets/MyQuickActions.tsx +22 -22
- package/src/dto/create-collaborator.dto.ts +4 -4
- package/src/operations.service.spec.ts +1006 -988
- package/src/operations.service.ts +40 -42
|
@@ -2720,10 +2720,7 @@ export class OperationsService {
|
|
|
2720
2720
|
}));
|
|
2721
2721
|
}
|
|
2722
2722
|
|
|
2723
|
-
async getCollaboratorInvoices(
|
|
2724
|
-
userId: number,
|
|
2725
|
-
collaboratorId: number,
|
|
2726
|
-
) {
|
|
2723
|
+
async getCollaboratorInvoices(userId: number, collaboratorId: number) {
|
|
2727
2724
|
const actor = await this.getActorContext(userId);
|
|
2728
2725
|
this.ensureDirector(actor);
|
|
2729
2726
|
await this.getCollaboratorById(collaboratorId);
|
|
@@ -3403,23 +3400,23 @@ export class OperationsService {
|
|
|
3403
3400
|
COUNT(DISTINCT pa.id)::int AS "teamSize"
|
|
3404
3401
|
FROM operations_project p
|
|
3405
3402
|
LEFT JOIN operations_contract c ON c.id = p.contract_id
|
|
3406
|
-
LEFT JOIN operations_collaborator m ON m.id = p.manager_collaborator_id
|
|
3407
|
-
LEFT JOIN person cp ON cp.id = p.client_person_id
|
|
3408
|
-
LEFT JOIN
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
LEFT JOIN operations_project_assignment pa
|
|
3418
|
-
ON pa.project_id = p.id
|
|
3419
|
-
AND pa.deleted_at IS NULL
|
|
3420
|
-
AND pa.status IN ('planned', 'active')
|
|
3403
|
+
LEFT JOIN operations_collaborator m ON m.id = p.manager_collaborator_id
|
|
3404
|
+
LEFT JOIN person cp ON cp.id = p.client_person_id
|
|
3405
|
+
LEFT JOIN person mp ON mp.id = m.person_id
|
|
3406
|
+
LEFT JOIN LATERAL (
|
|
3407
|
+
SELECT u.photo_id
|
|
3408
|
+
FROM person_user pu
|
|
3409
|
+
JOIN "user" u ON u.id = pu.user_id
|
|
3410
|
+
WHERE pu.person_id = p.client_person_id
|
|
3411
|
+
ORDER BY pu.id ASC
|
|
3412
|
+
LIMIT 1
|
|
3413
|
+
) client_user ON TRUE
|
|
3414
|
+
LEFT JOIN operations_project_assignment pa
|
|
3415
|
+
ON pa.project_id = p.id
|
|
3416
|
+
AND pa.deleted_at IS NULL
|
|
3417
|
+
AND pa.status IN ('planned', 'active')
|
|
3421
3418
|
WHERE ${whereClause}
|
|
3422
|
-
GROUP BY p.id, c.id, m.id, cp.id, mp.id, client_user.photo_id`;
|
|
3419
|
+
GROUP BY p.id, c.id, m.id, cp.id, mp.id, client_user.photo_id`;
|
|
3423
3420
|
|
|
3424
3421
|
if (!pagination) {
|
|
3425
3422
|
return this.queryRows(`${baseQuery} ORDER BY p.name ASC`, params);
|
|
@@ -8886,6 +8883,7 @@ export class OperationsService {
|
|
|
8886
8883
|
managerCollaboratorId: number | null;
|
|
8887
8884
|
clientPersonId: number | null;
|
|
8888
8885
|
clientAvatarId: number | null;
|
|
8886
|
+
clientUserPhotoId: number | null;
|
|
8889
8887
|
code: string;
|
|
8890
8888
|
name: string;
|
|
8891
8889
|
clientName: string | null;
|
|
@@ -8943,21 +8941,21 @@ export class OperationsService {
|
|
|
8943
8941
|
MAX(CASE WHEN pa.collaborator_id = $2 THEN pa.id END)::int AS "myAssignmentId",
|
|
8944
8942
|
MAX(CASE WHEN pa.collaborator_id = $2 THEN COALESCE(project_role_locale.name, pa.role_label) END) AS "myRoleLabel",
|
|
8945
8943
|
COUNT(DISTINCT pa.id)::int AS "teamSize"
|
|
8946
|
-
FROM operations_project p
|
|
8947
|
-
LEFT JOIN operations_contract c ON c.id = p.contract_id
|
|
8948
|
-
LEFT JOIN operations_collaborator m ON m.id = p.manager_collaborator_id
|
|
8949
|
-
LEFT JOIN person client_person ON client_person.id = p.client_person_id
|
|
8950
|
-
LEFT JOIN LATERAL (
|
|
8951
|
-
SELECT u.photo_id
|
|
8952
|
-
FROM person_user pu
|
|
8953
|
-
JOIN "user" u ON u.id = pu.user_id
|
|
8954
|
-
WHERE pu.person_id = p.client_person_id
|
|
8955
|
-
ORDER BY pu.id ASC
|
|
8956
|
-
LIMIT 1
|
|
8957
|
-
) client_user ON TRUE
|
|
8958
|
-
LEFT JOIN operations_project_assignment pa
|
|
8959
|
-
ON pa.project_id = p.id
|
|
8960
|
-
AND pa.deleted_at IS NULL
|
|
8944
|
+
FROM operations_project p
|
|
8945
|
+
LEFT JOIN operations_contract c ON c.id = p.contract_id
|
|
8946
|
+
LEFT JOIN operations_collaborator m ON m.id = p.manager_collaborator_id
|
|
8947
|
+
LEFT JOIN person client_person ON client_person.id = p.client_person_id
|
|
8948
|
+
LEFT JOIN LATERAL (
|
|
8949
|
+
SELECT u.photo_id
|
|
8950
|
+
FROM person_user pu
|
|
8951
|
+
JOIN "user" u ON u.id = pu.user_id
|
|
8952
|
+
WHERE pu.person_id = p.client_person_id
|
|
8953
|
+
ORDER BY pu.id ASC
|
|
8954
|
+
LIMIT 1
|
|
8955
|
+
) client_user ON TRUE
|
|
8956
|
+
LEFT JOIN operations_project_assignment pa
|
|
8957
|
+
ON pa.project_id = p.id
|
|
8958
|
+
AND pa.deleted_at IS NULL
|
|
8961
8959
|
LEFT JOIN operations_project_role project_role
|
|
8962
8960
|
ON project_role.id = pa.project_role_id
|
|
8963
8961
|
AND project_role.deleted_at IS NULL
|
|
@@ -8970,7 +8968,7 @@ export class OperationsService {
|
|
|
8970
8968
|
) project_role_locale ON TRUE
|
|
8971
8969
|
WHERE p.id = $1
|
|
8972
8970
|
AND p.deleted_at IS NULL
|
|
8973
|
-
GROUP BY p.id, c.id, m.id, client_person.id, client_user.photo_id`,
|
|
8971
|
+
GROUP BY p.id, c.id, m.id, client_person.id, client_user.photo_id`,
|
|
8974
8972
|
[projectId, actorCollaboratorId ?? null],
|
|
8975
8973
|
);
|
|
8976
8974
|
|
|
@@ -9740,9 +9738,9 @@ export class OperationsService {
|
|
|
9740
9738
|
) VALUES (
|
|
9741
9739
|
$1,
|
|
9742
9740
|
$2,
|
|
9743
|
-
$3::operations_task_activity_action_bd50457330_enum,
|
|
9744
|
-
$4::operations_task_activity_from_status_3a69262de6_enum,
|
|
9745
|
-
$5::operations_task_activity_to_status_1fd99321c8_enum,
|
|
9741
|
+
$3::"operations_task_activity_action_bd50457330_enum",
|
|
9742
|
+
$4::"operations_task_activity_from_status_3a69262de6_enum",
|
|
9743
|
+
$5::"operations_task_activity_to_status_1fd99321c8_enum",
|
|
9746
9744
|
NOW()
|
|
9747
9745
|
)`,
|
|
9748
9746
|
params.taskId,
|
|
@@ -10753,7 +10751,7 @@ export class OperationsService {
|
|
|
10753
10751
|
created_at,
|
|
10754
10752
|
updated_at
|
|
10755
10753
|
) VALUES (
|
|
10756
|
-
$1, $2, $3, $4, $5
|
|
10754
|
+
$1, $2, $3, $4, $5, $6, $7::date, $8::date,
|
|
10757
10755
|
$9::operations_project_assignment_status_155b459bbf_enum,
|
|
10758
10756
|
NOW(), NOW()
|
|
10759
10757
|
)`,
|
|
@@ -12890,7 +12888,7 @@ export class OperationsService {
|
|
|
12890
12888
|
AND pa.deleted_at IS NULL
|
|
12891
12889
|
AND pa.status IN ('planned', 'active')
|
|
12892
12890
|
WHERE ${whereClause}
|
|
12893
|
-
GROUP BY p.id, c.id, m.id, cp.id, client_user.photo_id`;
|
|
12891
|
+
GROUP BY p.id, c.id, m.id, cp.id, client_user.photo_id`;
|
|
12894
12892
|
|
|
12895
12893
|
if (!pagination) {
|
|
12896
12894
|
return this.queryRows(`${baseQuery} ORDER BY p.name ASC`, params);
|
|
@@ -15793,7 +15791,7 @@ export class OperationsService {
|
|
|
15793
15791
|
FROM operations_project
|
|
15794
15792
|
WHERE id = $1 AND deleted_at IS NULL
|
|
15795
15793
|
LIMIT 1`,
|
|
15796
|
-
|
|
15794
|
+
[projectId],
|
|
15797
15795
|
);
|
|
15798
15796
|
if (!project) {
|
|
15799
15797
|
throw new NotFoundException("Project not found.");
|