@hed-hog/operations 0.0.294 → 0.0.296

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.
Files changed (126) hide show
  1. package/dist/operations.controller.d.ts +415 -0
  2. package/dist/operations.controller.d.ts.map +1 -0
  3. package/dist/operations.controller.js +333 -0
  4. package/dist/operations.controller.js.map +1 -0
  5. package/dist/operations.module.d.ts.map +1 -1
  6. package/dist/operations.module.js +4 -3
  7. package/dist/operations.module.js.map +1 -1
  8. package/dist/operations.service.d.ts +589 -153
  9. package/dist/operations.service.d.ts.map +1 -1
  10. package/dist/operations.service.js +2229 -100
  11. package/dist/operations.service.js.map +1 -1
  12. package/hedhog/data/menu.yaml +198 -251
  13. package/hedhog/data/role.yaml +23 -14
  14. package/hedhog/data/route.yaml +317 -143
  15. package/hedhog/frontend/app/_components/collaborator-details-screen.tsx.ejs +310 -0
  16. package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +631 -0
  17. package/hedhog/frontend/app/_components/contract-details-screen.tsx.ejs +132 -0
  18. package/hedhog/frontend/app/_components/contract-form-screen.tsx.ejs +558 -0
  19. package/hedhog/frontend/app/_components/project-details-screen.tsx.ejs +291 -0
  20. package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +689 -0
  21. package/hedhog/frontend/app/_lib/api.ts.ejs +32 -0
  22. package/hedhog/frontend/app/_lib/hooks/use-operations-access.ts.ejs +44 -0
  23. package/hedhog/frontend/app/_lib/types.ts.ejs +360 -0
  24. package/hedhog/frontend/app/_lib/utils/format.ts.ejs +129 -25
  25. package/hedhog/frontend/app/_lib/utils/forms.ts.ejs +14 -0
  26. package/hedhog/frontend/app/approvals/page.tsx.ejs +386 -147
  27. package/hedhog/frontend/app/collaborators/[id]/edit/page.tsx.ejs +11 -0
  28. package/hedhog/frontend/app/collaborators/[id]/page.tsx.ejs +11 -0
  29. package/hedhog/frontend/app/collaborators/new/page.tsx.ejs +5 -0
  30. package/hedhog/frontend/app/collaborators/page.tsx.ejs +261 -0
  31. package/hedhog/frontend/app/contracts/[id]/edit/page.tsx.ejs +11 -0
  32. package/hedhog/frontend/app/contracts/[id]/page.tsx.ejs +11 -108
  33. package/hedhog/frontend/app/contracts/new/page.tsx.ejs +17 -0
  34. package/hedhog/frontend/app/contracts/page.tsx.ejs +262 -181
  35. package/hedhog/frontend/app/page.tsx.ejs +319 -177
  36. package/hedhog/frontend/app/projects/[id]/edit/page.tsx.ejs +11 -0
  37. package/hedhog/frontend/app/projects/[id]/page.tsx.ejs +11 -936
  38. package/hedhog/frontend/app/projects/new/page.tsx.ejs +5 -0
  39. package/hedhog/frontend/app/projects/page.tsx.ejs +236 -1074
  40. package/hedhog/frontend/app/schedule-adjustments/page.tsx.ejs +418 -0
  41. package/hedhog/frontend/app/team/page.tsx.ejs +339 -0
  42. package/hedhog/frontend/app/time-off/page.tsx.ejs +328 -0
  43. package/hedhog/frontend/app/timesheets/page.tsx.ejs +636 -126
  44. package/hedhog/frontend/messages/en.json +648 -454
  45. package/hedhog/frontend/messages/pt.json +647 -454
  46. package/hedhog/table/operations_approval.yaml +49 -0
  47. package/hedhog/table/operations_approval_history.yaml +29 -0
  48. package/hedhog/table/{operations_employee.yaml → operations_collaborator.yaml} +67 -64
  49. package/hedhog/table/operations_collaborator_schedule_day.yaml +34 -0
  50. package/hedhog/table/operations_contract.yaml +100 -48
  51. package/hedhog/table/operations_contract_document.yaml +39 -0
  52. package/hedhog/table/operations_contract_financial_term.yaml +40 -0
  53. package/hedhog/table/operations_contract_history.yaml +27 -0
  54. package/hedhog/table/operations_contract_party.yaml +46 -0
  55. package/hedhog/table/operations_contract_revision.yaml +38 -0
  56. package/hedhog/table/operations_contract_signature.yaml +38 -0
  57. package/hedhog/table/operations_project.yaml +54 -50
  58. package/hedhog/table/{operations_allocation.yaml → operations_project_assignment.yaml} +55 -52
  59. package/hedhog/table/operations_schedule_adjustment_day.yaml +34 -0
  60. package/hedhog/table/operations_schedule_adjustment_request.yaml +53 -0
  61. package/hedhog/table/operations_time_off_request.yaml +57 -0
  62. package/hedhog/table/operations_timesheet.yaml +41 -36
  63. package/hedhog/table/operations_timesheet_entry.yaml +40 -50
  64. package/package.json +7 -6
  65. package/src/operations.controller.ts +182 -0
  66. package/src/operations.module.ts +22 -21
  67. package/src/operations.service.ts +3595 -137
  68. package/hedhog/data/operations_career_level.yaml +0 -102
  69. package/hedhog/data/operations_career_track.yaml +0 -8
  70. package/hedhog/data/operations_certification.yaml +0 -38
  71. package/hedhog/data/operations_evaluation_cycle.yaml +0 -18
  72. package/hedhog/data/operations_performance_criterion.yaml +0 -48
  73. package/hedhog/frontend/app/_components/allocation-calendar.tsx.ejs +0 -56
  74. package/hedhog/frontend/app/_components/kanban-board.tsx.ejs +0 -626
  75. package/hedhog/frontend/app/_components/timesheet-entry-dialog.tsx.ejs +0 -142
  76. package/hedhog/frontend/app/_lib/hooks/use-operations-data.ts.ejs +0 -41
  77. package/hedhog/frontend/app/_lib/hooks/use-operations-growth-data.ts.ejs +0 -63
  78. package/hedhog/frontend/app/_lib/mocks/allocations.mock.ts.ejs +0 -74
  79. package/hedhog/frontend/app/_lib/mocks/contracts.mock.ts.ejs +0 -74
  80. package/hedhog/frontend/app/_lib/mocks/operations-growth.mock.ts.ejs +0 -824
  81. package/hedhog/frontend/app/_lib/mocks/projects.mock.ts.ejs +0 -455
  82. package/hedhog/frontend/app/_lib/mocks/tasks.mock.ts.ejs +0 -117
  83. package/hedhog/frontend/app/_lib/mocks/timesheets.mock.ts.ejs +0 -84
  84. package/hedhog/frontend/app/_lib/mocks/users.mock.ts.ejs +0 -67
  85. package/hedhog/frontend/app/_lib/services/contracts.service.ts.ejs +0 -10
  86. package/hedhog/frontend/app/_lib/services/operations-growth.service.ts.ejs +0 -31
  87. package/hedhog/frontend/app/_lib/services/projects.service.ts.ejs +0 -10
  88. package/hedhog/frontend/app/_lib/services/tasks.service.ts.ejs +0 -10
  89. package/hedhog/frontend/app/_lib/services/timesheets.service.ts.ejs +0 -10
  90. package/hedhog/frontend/app/_lib/types/operations-growth.ts.ejs +0 -209
  91. package/hedhog/frontend/app/_lib/types/operations.ts.ejs +0 -156
  92. package/hedhog/frontend/app/_lib/utils/growth.ts.ejs +0 -62
  93. package/hedhog/frontend/app/_lib/utils/metrics.ts.ejs +0 -103
  94. package/hedhog/frontend/app/_lib/utils/status.ts.ejs +0 -80
  95. package/hedhog/frontend/app/allocations/page.tsx.ejs +0 -155
  96. package/hedhog/frontend/app/career/page.tsx.ejs +0 -143
  97. package/hedhog/frontend/app/certifications/page.tsx.ejs +0 -202
  98. package/hedhog/frontend/app/evaluations/page.tsx.ejs +0 -278
  99. package/hedhog/frontend/app/goals/page.tsx.ejs +0 -171
  100. package/hedhog/frontend/app/growth/page.tsx.ejs +0 -288
  101. package/hedhog/frontend/app/manager/page.tsx.ejs +0 -175
  102. package/hedhog/frontend/app/rewards/page.tsx.ejs +0 -196
  103. package/hedhog/frontend/app/tasks/page.tsx.ejs +0 -999
  104. package/hedhog/table/operations_calibration_item.yaml +0 -61
  105. package/hedhog/table/operations_calibration_session.yaml +0 -25
  106. package/hedhog/table/operations_career_level.yaml +0 -75
  107. package/hedhog/table/operations_career_track.yaml +0 -21
  108. package/hedhog/table/operations_certification.yaml +0 -48
  109. package/hedhog/table/operations_employee_certification.yaml +0 -43
  110. package/hedhog/table/operations_employee_connect.yaml +0 -61
  111. package/hedhog/table/operations_employee_evaluation.yaml +0 -113
  112. package/hedhog/table/operations_employee_evaluation_item.yaml +0 -39
  113. package/hedhog/table/operations_employee_profile.yaml +0 -80
  114. package/hedhog/table/operations_employee_skill_matrix.yaml +0 -30
  115. package/hedhog/table/operations_evaluation_cycle.yaml +0 -31
  116. package/hedhog/table/operations_goal.yaml +0 -67
  117. package/hedhog/table/operations_goal_progress.yaml +0 -31
  118. package/hedhog/table/operations_performance_criterion.yaml +0 -29
  119. package/hedhog/table/operations_promotion_readiness.yaml +0 -49
  120. package/hedhog/table/operations_promotion_recommendation.yaml +0 -63
  121. package/hedhog/table/operations_public_recognition.yaml +0 -46
  122. package/hedhog/table/operations_reward.yaml +0 -100
  123. package/hedhog/table/operations_score_event.yaml +0 -81
  124. package/hedhog/table/operations_task.yaml +0 -60
  125. package/src/operations-data.controller.ts +0 -54
  126. package/src/operations-growth.controller.ts +0 -44
@@ -1,142 +0,0 @@
1
- 'use client';
2
-
3
- import { Button } from '@/components/ui/button';
4
- import {
5
- Dialog,
6
- DialogContent,
7
- DialogDescription,
8
- DialogFooter,
9
- DialogHeader,
10
- DialogTitle,
11
- DialogTrigger,
12
- } from '@/components/ui/dialog';
13
- import { Input } from '@/components/ui/input';
14
- import { Label } from '@/components/ui/label';
15
- import {
16
- Select,
17
- SelectContent,
18
- SelectItem,
19
- SelectTrigger,
20
- SelectValue,
21
- } from '@/components/ui/select';
22
- import { Textarea } from '@/components/ui/textarea';
23
- import { Plus } from 'lucide-react';
24
- import { useState } from 'react';
25
- import type { OperationsUser, Project, Task } from '../_lib/types/operations';
26
-
27
- interface TimesheetEntryDialogProps {
28
- users: OperationsUser[];
29
- projects: Project[];
30
- tasks: Task[];
31
- }
32
-
33
- export function TimesheetEntryDialog({
34
- users,
35
- projects,
36
- tasks,
37
- }: TimesheetEntryDialogProps) {
38
- const [open, setOpen] = useState(false);
39
- const [projectId, setProjectId] = useState(projects[0]?.id ?? '');
40
-
41
- const availableTasks = tasks.filter((task) => task.projectId === projectId);
42
-
43
- return (
44
- <Dialog open={open} onOpenChange={setOpen}>
45
- <DialogTrigger asChild>
46
- <Button>
47
- <Plus className="mr-2 h-4 w-4" />
48
- Add Timesheet Entry
49
- </Button>
50
- </DialogTrigger>
51
- <DialogContent className="sm:max-w-2xl">
52
- <DialogHeader>
53
- <DialogTitle>Add Timesheet Entry</DialogTitle>
54
- <DialogDescription>
55
- Mock-only modal wired for a future API-backed create flow.
56
- </DialogDescription>
57
- </DialogHeader>
58
- <div className="grid gap-4 md:grid-cols-2">
59
- <div className="space-y-2">
60
- <Label>User</Label>
61
- <Select defaultValue={users[0]?.id}>
62
- <SelectTrigger>
63
- <SelectValue />
64
- </SelectTrigger>
65
- <SelectContent>
66
- {users.map((user) => (
67
- <SelectItem key={user.id} value={user.id}>
68
- {user.name}
69
- </SelectItem>
70
- ))}
71
- </SelectContent>
72
- </Select>
73
- </div>
74
- <div className="space-y-2">
75
- <Label>Date</Label>
76
- <Input defaultValue="2026-03-16" type="date" />
77
- </div>
78
- <div className="space-y-2">
79
- <Label>Project</Label>
80
- <Select value={projectId} onValueChange={setProjectId}>
81
- <SelectTrigger>
82
- <SelectValue />
83
- </SelectTrigger>
84
- <SelectContent>
85
- {projects.map((project) => (
86
- <SelectItem key={project.id} value={project.id}>
87
- {project.name}
88
- </SelectItem>
89
- ))}
90
- </SelectContent>
91
- </Select>
92
- </div>
93
- <div className="space-y-2">
94
- <Label>Task</Label>
95
- <Select defaultValue={availableTasks[0]?.id}>
96
- <SelectTrigger>
97
- <SelectValue />
98
- </SelectTrigger>
99
- <SelectContent>
100
- {availableTasks.map((task) => (
101
- <SelectItem key={task.id} value={task.id}>
102
- {task.title}
103
- </SelectItem>
104
- ))}
105
- </SelectContent>
106
- </Select>
107
- </div>
108
- <div className="space-y-2">
109
- <Label>Hours</Label>
110
- <Input defaultValue="6" min="0" step="0.5" type="number" />
111
- </div>
112
- <div className="space-y-2">
113
- <Label>Status</Label>
114
- <Select defaultValue="pending">
115
- <SelectTrigger>
116
- <SelectValue />
117
- </SelectTrigger>
118
- <SelectContent>
119
- <SelectItem value="pending">Pending</SelectItem>
120
- <SelectItem value="approved">Approved</SelectItem>
121
- <SelectItem value="rejected">Rejected</SelectItem>
122
- </SelectContent>
123
- </Select>
124
- </div>
125
- <div className="space-y-2 md:col-span-2">
126
- <Label>Description</Label>
127
- <Textarea
128
- defaultValue="Mock entry for sprint execution and internal review."
129
- rows={4}
130
- />
131
- </div>
132
- </div>
133
- <DialogFooter>
134
- <Button variant="outline" onClick={() => setOpen(false)}>
135
- Cancel
136
- </Button>
137
- <Button onClick={() => setOpen(false)}>Save Mock Entry</Button>
138
- </DialogFooter>
139
- </DialogContent>
140
- </Dialog>
141
- );
142
- }
@@ -1,41 +0,0 @@
1
- 'use client';
2
-
3
- import { useMemo } from 'react';
4
- import { allocationsMock } from '../mocks/allocations.mock';
5
- import { operationsUsersMock } from '../mocks/users.mock';
6
- import { contractsService } from '../services/contracts.service';
7
- import { projectsService } from '../services/projects.service';
8
- import { tasksService } from '../services/tasks.service';
9
- import { timesheetsService } from '../services/timesheets.service';
10
- import {
11
- getApprovalStatusData,
12
- getDashboardMetrics,
13
- getDailyTotals,
14
- getHoursByProject,
15
- getHoursByUser,
16
- getPendingApprovalsSummary,
17
- getRecentTimesheetEntries,
18
- getWeeklyTrend,
19
- } from '../utils/metrics';
20
-
21
- export function useOperationsData() {
22
- return useMemo(
23
- () => ({
24
- users: operationsUsersMock,
25
- contracts: contractsService.list(),
26
- projects: projectsService.list(),
27
- tasks: tasksService.list(),
28
- timesheets: timesheetsService.list(),
29
- allocations: allocationsMock,
30
- dashboardMetrics: getDashboardMetrics(),
31
- hoursByProject: getHoursByProject(),
32
- hoursByUser: getHoursByUser(),
33
- approvalStatusData: getApprovalStatusData(),
34
- weeklyTrendData: getWeeklyTrend(),
35
- recentTimesheets: getRecentTimesheetEntries(),
36
- dailyTotals: getDailyTotals(),
37
- approvalSummary: getPendingApprovalsSummary(),
38
- }),
39
- []
40
- );
41
- }
@@ -1,63 +0,0 @@
1
- 'use client';
2
-
3
- import { useMemo } from 'react';
4
- import { projectsMock } from '../mocks/projects.mock';
5
- import { tasksMock } from '../mocks/tasks.mock';
6
- import { timesheetsMock } from '../mocks/timesheets.mock';
7
- import { operationsUsersMock } from '../mocks/users.mock';
8
- import { operationsGrowthService } from '../services/operations-growth.service';
9
-
10
- export function useOperationsGrowthData() {
11
- return useMemo(() => {
12
- const profiles = operationsGrowthService.listProfiles();
13
- const scoreEvents = operationsGrowthService.listScoreEvents();
14
- const recommendations =
15
- operationsGrowthService.listPromotionRecommendations();
16
- const goals = operationsGrowthService.listGoals();
17
- const employeeCertifications =
18
- operationsGrowthService.listEmployeeCertifications();
19
-
20
- const ranking = [...profiles].sort(
21
- (left, right) => right.currentScore - left.currentScore
22
- );
23
- const managerSummary = {
24
- promotionEligible: recommendations.filter((item) => item.eligible).length,
25
- goalsAtRisk: goals.filter((item) => item.status === 'at_risk').length,
26
- pendingCertifications: employeeCertifications.filter(
27
- (item) => item.status !== 'achieved'
28
- ).length,
29
- totalRecognitions: operationsGrowthService.listRecognitions().length,
30
- };
31
-
32
- const scoreHistory = profiles.map((profile) => ({
33
- employeeId: profile.employeeId,
34
- events: scoreEvents.filter(
35
- (event) => event.employeeId === profile.employeeId
36
- ),
37
- }));
38
-
39
- return {
40
- users: operationsUsersMock,
41
- projects: projectsMock,
42
- tasks: tasksMock,
43
- timesheets: timesheetsMock,
44
- careerTracks: operationsGrowthService.listCareerTracks(),
45
- careerLevels: operationsGrowthService.listCareerLevels(),
46
- profiles,
47
- evaluationCycles: operationsGrowthService.listEvaluationCycles(),
48
- performanceCriteria: operationsGrowthService.listPerformanceCriteria(),
49
- evaluations: operationsGrowthService.listEvaluations(),
50
- goals,
51
- certificationCatalog: operationsGrowthService.listCertificationCatalog(),
52
- employeeCertifications,
53
- rewards: operationsGrowthService.listRewards(),
54
- recognitions: operationsGrowthService.listRecognitions(),
55
- scoreEvents,
56
- promotionRecommendations: recommendations,
57
- ranking,
58
- managerSummary,
59
- scoreHistory,
60
- defaultEmployeeId: 'usr-diego',
61
- };
62
- }, []);
63
- }
@@ -1,74 +0,0 @@
1
- import type { Allocation } from '../types/operations';
2
-
3
- export const allocationsMock: Allocation[] = [
4
- {
5
- id: 'alloc-001',
6
- userId: 'usr-ana',
7
- role: 'Delivery Manager',
8
- projectId: 'prj-zenith-cloud',
9
- weeklyHours: 18,
10
- allocationPercent: 45,
11
- startDate: '2026-03-03',
12
- endDate: '2026-06-30',
13
- },
14
- {
15
- id: 'alloc-002',
16
- userId: 'usr-bruno',
17
- role: 'Technical Lead',
18
- projectId: 'prj-orion-web',
19
- weeklyHours: 22,
20
- allocationPercent: 55,
21
- startDate: '2026-02-10',
22
- endDate: '2026-06-30',
23
- },
24
- {
25
- id: 'alloc-003',
26
- userId: 'usr-carla',
27
- role: 'Project Manager',
28
- projectId: 'prj-atlas-crm',
29
- weeklyHours: 24,
30
- allocationPercent: 60,
31
- startDate: '2026-03-01',
32
- endDate: '2026-08-31',
33
- },
34
- {
35
- id: 'alloc-004',
36
- userId: 'usr-diego',
37
- role: 'Backend Engineer',
38
- projectId: 'prj-orion-data',
39
- weeklyHours: 20,
40
- allocationPercent: 50,
41
- startDate: '2026-02-03',
42
- endDate: '2026-09-15',
43
- },
44
- {
45
- id: 'alloc-005',
46
- userId: 'usr-elisa',
47
- role: 'Frontend Engineer',
48
- projectId: 'prj-orion-web',
49
- weeklyHours: 30,
50
- allocationPercent: 75,
51
- startDate: '2026-01-20',
52
- endDate: '2026-06-30',
53
- },
54
- {
55
- id: 'alloc-006',
56
- userId: 'usr-fabio',
57
- role: 'QA Analyst',
58
- projectId: 'prj-orion-web',
59
- weeklyHours: 16,
60
- allocationPercent: 40,
61
- startDate: '2026-02-17',
62
- endDate: '2026-05-30',
63
- },
64
- {
65
- id: 'alloc-007',
66
- userId: 'usr-gabi',
67
- role: 'UX Designer',
68
- projectId: 'prj-orion-data',
69
- weeklyHours: 14,
70
- allocationPercent: 35,
71
- startDate: '2026-02-12',
72
- endDate: '2026-07-31',
73
- },
74
- ];
@@ -1,74 +0,0 @@
1
- import type { Contract } from '../types/operations';
2
-
3
- export const contractsMock: Contract[] = [
4
- {
5
- id: 'ctr-orion',
6
- name: 'Orion Platform Expansion',
7
- client: 'Orion Retail Group',
8
- type: 'monthly',
9
- startDate: '2026-01-01',
10
- endDate: '2026-12-31',
11
- hourlyRate: 195,
12
- hourLimit: 640,
13
- status: 'active',
14
- billingRules: [
15
- 'Monthly invoicing on the fifth business day',
16
- 'Overage billed at blended rate above hour cap',
17
- 'Change requests approved by client PM',
18
- ],
19
- sla: 'P1 response in 2h, P2 in 6h, delivery governance weekly.',
20
- revisions: ['Revision 1 - January scope uplift', 'Revision 2 - UX squad add-on'],
21
- linkedProjectIds: ['prj-orion-web', 'prj-orion-data'],
22
- },
23
- {
24
- id: 'ctr-zenith',
25
- name: 'Zenith Support Retainer',
26
- client: 'Zenith Health',
27
- type: 'tm',
28
- startDate: '2025-10-15',
29
- endDate: '2026-10-14',
30
- hourlyRate: 230,
31
- hourLimit: 420,
32
- status: 'active',
33
- billingRules: [
34
- 'Time and material billing by approved entry',
35
- 'Emergency work charged at 1.25x after 8pm',
36
- ],
37
- sla: '24x7 on-call for critical incidents with monthly ops review.',
38
- revisions: ['Revision 1 - Added cloud migration stream'],
39
- linkedProjectIds: ['prj-zenith-cloud'],
40
- },
41
- {
42
- id: 'ctr-atlas',
43
- name: 'Atlas CRM Rollout',
44
- client: 'Atlas Logistics',
45
- type: 'fixed',
46
- startDate: '2026-02-01',
47
- endDate: '2026-08-31',
48
- hourlyRate: 175,
49
- hourLimit: 520,
50
- status: 'renewal',
51
- billingRules: [
52
- 'Milestone billing split in 30/40/30',
53
- 'Additional scope converted to change order',
54
- ],
55
- sla: 'Business hours support, weekly steering committee.',
56
- revisions: ['Revision 1 - Extended rollout to LATAM team'],
57
- linkedProjectIds: ['prj-atlas-crm'],
58
- },
59
- {
60
- id: 'ctr-nova',
61
- name: 'Nova Discovery Program',
62
- client: 'Nova Energy',
63
- type: 'fixed',
64
- startDate: '2025-06-01',
65
- endDate: '2025-12-15',
66
- hourlyRate: 160,
67
- hourLimit: 320,
68
- status: 'expired',
69
- billingRules: ['Single invoice on phase completion'],
70
- sla: 'Advisory cadence only.',
71
- revisions: ['Final revision approved in November'],
72
- linkedProjectIds: [],
73
- },
74
- ];