@hed-hog/operations 0.0.319 → 0.0.321

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.
@@ -66,39 +66,39 @@ export function CollaboratorDetailsScreen({
66
66
  createdAt: string;
67
67
  };
68
68
 
69
- const { data: compensationHistory = [] } =
70
- useQuery<CompensationHistoryEntry[]>({
71
- queryKey: [
72
- 'operations-collaborator-compensation-history',
73
- currentLocaleCode,
69
+ const { data: compensationHistory = [] } =
70
+ useQuery<CompensationHistoryEntry[]>({
71
+ queryKey: [
72
+ 'operations-collaborator-compensation-history',
73
+ currentLocaleCode,
74
74
  collaboratorId,
75
75
  ],
76
76
  enabled: access.isDirector,
77
77
  queryFn: () =>
78
78
  fetchOperations<CompensationHistoryEntry[]>(
79
79
  request,
80
- `/operations/collaborators/${collaboratorId}/compensation-history`
81
- ),
82
- });
83
-
84
- if (!collaborator) {
85
- return (
86
- <Page>
87
- <OperationsHeader
88
- title={t('title')}
89
- description={t('description')}
90
- current={t('breadcrumb')}
91
- />
92
- <EmptyState
93
- icon={<UserRound className="size-12" />}
80
+ `/operations/collaborators/${collaboratorId}/compensation-history`
81
+ ),
82
+ });
83
+
84
+ if (!collaborator) {
85
+ return (
86
+ <Page>
87
+ <OperationsHeader
88
+ title={t('title')}
89
+ description={t('description')}
90
+ current={t('breadcrumb')}
91
+ />
92
+ <EmptyState
93
+ icon={<UserRound className="size-12" />}
94
94
  title={commonT('states.emptyTitle')}
95
95
  description={t('notFound')}
96
96
  actionLabel={commonT('actions.refresh')}
97
97
  onAction={() => void refetch()}
98
- />
99
- </Page>
100
- );
101
- }
98
+ />
99
+ </Page>
100
+ );
101
+ }
102
102
 
103
103
  const summaryCards = [
104
104
  {
@@ -8,7 +8,7 @@ export type PaginatedResponse<T> = {
8
8
  data: T[];
9
9
  };
10
10
 
11
- export type OperationsDashboard = {
11
+ export type OperationsDashboard = {
12
12
  actor: {
13
13
  roleScope: 'self' | 'team' | 'full';
14
14
  collaboratorId: number | null;
@@ -32,183 +32,183 @@ export type OperationsDashboard = {
32
32
  totalHours: number | null;
33
33
  status: string;
34
34
  }>;
35
- };
36
-
37
- export type OperationsReportScenario = 'base' | 'growth' | 'conservative';
38
-
39
- export type OperationsReportPlanningCard = {
40
- title: string;
41
- value: string;
42
- description: string;
43
- };
44
-
45
- export type OperationsProjectsReport = {
46
- filters: {
47
- from: string;
48
- to: string;
49
- status: string;
50
- client: string;
51
- scenario: OperationsReportScenario;
52
- clients: string[];
53
- };
54
- summary: {
55
- contractedRevenue: number;
56
- recognizedRevenue: number;
57
- realizedCost: number;
58
- forecastCost: number;
59
- profit: number;
60
- margin: number;
61
- plannedHours: number;
62
- actualHours: number;
63
- billableHours: number;
64
- reworkHours: number;
65
- backlogValue: number;
66
- avgDeadline: number;
67
- avgAllocation: number;
68
- atRisk: number;
69
- burnRate: number;
70
- };
71
- forecast: Array<{
72
- month: string;
73
- revenue: number;
74
- cost: number;
75
- profit: number;
76
- backlog: number;
77
- planned: number;
78
- actual: number;
79
- }>;
80
- costComposition: Array<{ name: string; value: number }>;
81
- hoursByProject: Array<{
82
- project: string;
83
- Faturável: number;
84
- Interno: number;
85
- Retrabalho: number;
86
- Livre: number;
87
- }>;
88
- health: Array<{
89
- project: string;
90
- margem: number;
91
- prazo: number;
92
- alocacao: number;
93
- saude: number;
94
- }>;
95
- ranking: Array<{ name: string; Lucro: number; Custo: number }>;
96
- progress: Array<{ month: string; Planejado: number; Realizado: number }>;
97
- planningCards: OperationsReportPlanningCard[];
98
- rows: Array<{
99
- id: number;
100
- name: string;
101
- client: string;
102
- manager: string;
103
- squad: string;
104
- status: 'on_track' | 'attention' | 'late' | 'paused';
105
- contractType: 'fixed_price' | 'time_materials' | 'retainer';
106
- priority: string;
107
- startDate: string | null;
108
- endDate: string | null;
109
- contractedRevenue: number;
110
- recognizedRevenue: number;
111
- realizedCost: number;
112
- forecastCost: number;
113
- teamCost: number;
114
- infraCost: number;
115
- licenseCost: number;
116
- thirdPartyCost: number;
117
- reworkCost: number;
118
- plannedHours: number;
119
- actualHours: number;
120
- billableHours: number;
121
- reworkHours: number;
122
- internalHours: number;
123
- allocatedCapacity: number;
124
- physicalProgress: number;
125
- financialProgress: number;
126
- backlogValue: number;
127
- futureDeliveries: number;
128
- risk: 'baixo' | 'médio' | 'alto';
129
- recommendation: string;
130
- }>;
131
- };
132
-
133
- export type OperationsCollaboratorsReport = {
134
- filters: {
135
- from: string;
136
- to: string;
137
- department: string;
138
- contractType: string;
139
- scenario: OperationsReportScenario;
140
- departments: string[];
141
- contractTypes: string[];
142
- };
143
- summary: {
144
- cost: number;
145
- salary: number;
146
- benefits: number;
147
- taxes: number;
148
- tools: number;
149
- billableValue: number;
150
- profit: number;
151
- margin: number;
152
- availableHours: number;
153
- allocatedHours: number;
154
- billableHours: number;
155
- internalHours: number;
156
- overtimeHours: number;
157
- freeHours: number;
158
- allocation: number;
159
- utilization: number;
160
- overloadCount: number;
161
- hourlyCost: number;
162
- };
163
- forecast: Array<{
164
- month: string;
165
- revenue: number;
166
- cost: number;
167
- profit: number;
168
- margin: number;
169
- capacity: number;
170
- }>;
171
- costComposition: Array<{ name: string; value: number }>;
172
- capacityByDepartment: Array<{
173
- department: string;
174
- Faturável: number;
175
- Interno: number;
176
- Livre: number;
177
- Sobrecarga: number;
178
- }>;
179
- health: Array<{
180
- department: string;
181
- margem: number;
182
- alocacao: number;
183
- utilizacao: number;
184
- saude: number;
185
- }>;
186
- ranking: Array<{ name: string; Custo: number; Lucro: number }>;
187
- planningCards: OperationsReportPlanningCard[];
188
- rows: Array<{
189
- id: number;
190
- name: string;
191
- role: string;
192
- seniority: string;
193
- department: string;
194
- contractType: string;
195
- startDate: string | null;
196
- endDate: string | null;
197
- salaryCost: number;
198
- benefitsCost: number;
199
- taxesCost: number;
200
- toolsCost: number;
201
- billableValue: number;
202
- availableHours: number;
203
- allocatedHours: number;
204
- billableHours: number;
205
- internalHours: number;
206
- overtimeHours: number;
207
- projects: number;
208
- risk: 'baixo' | 'médio' | 'alto';
209
- recommendation: string;
210
- }>;
211
- };
35
+ };
36
+
37
+ export type OperationsReportScenario = 'base' | 'growth' | 'conservative';
38
+
39
+ export type OperationsReportPlanningCard = {
40
+ title: string;
41
+ value: string;
42
+ description: string;
43
+ };
44
+
45
+ export type OperationsProjectsReport = {
46
+ filters: {
47
+ from: string;
48
+ to: string;
49
+ status: string;
50
+ client: string;
51
+ scenario: OperationsReportScenario;
52
+ clients: string[];
53
+ };
54
+ summary: {
55
+ contractedRevenue: number;
56
+ recognizedRevenue: number;
57
+ realizedCost: number;
58
+ forecastCost: number;
59
+ profit: number;
60
+ margin: number;
61
+ plannedHours: number;
62
+ actualHours: number;
63
+ billableHours: number;
64
+ reworkHours: number;
65
+ backlogValue: number;
66
+ avgDeadline: number;
67
+ avgAllocation: number;
68
+ atRisk: number;
69
+ burnRate: number;
70
+ };
71
+ forecast: Array<{
72
+ month: string;
73
+ revenue: number;
74
+ cost: number;
75
+ profit: number;
76
+ backlog: number;
77
+ planned: number;
78
+ actual: number;
79
+ }>;
80
+ costComposition: Array<{ name: string; value: number }>;
81
+ hoursByProject: Array<{
82
+ project: string;
83
+ Faturável: number;
84
+ Interno: number;
85
+ Retrabalho: number;
86
+ Livre: number;
87
+ }>;
88
+ health: Array<{
89
+ project: string;
90
+ margem: number;
91
+ prazo: number;
92
+ alocacao: number;
93
+ saude: number;
94
+ }>;
95
+ ranking: Array<{ name: string; Lucro: number; Custo: number }>;
96
+ progress: Array<{ month: string; Planejado: number; Realizado: number }>;
97
+ planningCards: OperationsReportPlanningCard[];
98
+ rows: Array<{
99
+ id: number;
100
+ name: string;
101
+ client: string;
102
+ manager: string;
103
+ squad: string;
104
+ status: 'on_track' | 'attention' | 'late' | 'paused';
105
+ contractType: 'fixed_price' | 'time_materials' | 'retainer';
106
+ priority: string;
107
+ startDate: string | null;
108
+ endDate: string | null;
109
+ contractedRevenue: number;
110
+ recognizedRevenue: number;
111
+ realizedCost: number;
112
+ forecastCost: number;
113
+ teamCost: number;
114
+ infraCost: number;
115
+ licenseCost: number;
116
+ thirdPartyCost: number;
117
+ reworkCost: number;
118
+ plannedHours: number;
119
+ actualHours: number;
120
+ billableHours: number;
121
+ reworkHours: number;
122
+ internalHours: number;
123
+ allocatedCapacity: number;
124
+ physicalProgress: number;
125
+ financialProgress: number;
126
+ backlogValue: number;
127
+ futureDeliveries: number;
128
+ risk: 'baixo' | 'médio' | 'alto';
129
+ recommendation: string;
130
+ }>;
131
+ };
132
+
133
+ export type OperationsCollaboratorsReport = {
134
+ filters: {
135
+ from: string;
136
+ to: string;
137
+ department: string;
138
+ contractType: string;
139
+ scenario: OperationsReportScenario;
140
+ departments: string[];
141
+ contractTypes: string[];
142
+ };
143
+ summary: {
144
+ cost: number;
145
+ salary: number;
146
+ benefits: number;
147
+ taxes: number;
148
+ tools: number;
149
+ billableValue: number;
150
+ profit: number;
151
+ margin: number;
152
+ availableHours: number;
153
+ allocatedHours: number;
154
+ billableHours: number;
155
+ internalHours: number;
156
+ overtimeHours: number;
157
+ freeHours: number;
158
+ allocation: number;
159
+ utilization: number;
160
+ overloadCount: number;
161
+ hourlyCost: number;
162
+ };
163
+ forecast: Array<{
164
+ month: string;
165
+ revenue: number;
166
+ cost: number;
167
+ profit: number;
168
+ margin: number;
169
+ capacity: number;
170
+ }>;
171
+ costComposition: Array<{ name: string; value: number }>;
172
+ capacityByDepartment: Array<{
173
+ department: string;
174
+ Faturável: number;
175
+ Interno: number;
176
+ Livre: number;
177
+ Sobrecarga: number;
178
+ }>;
179
+ health: Array<{
180
+ department: string;
181
+ margem: number;
182
+ alocacao: number;
183
+ utilizacao: number;
184
+ saude: number;
185
+ }>;
186
+ ranking: Array<{ name: string; Custo: number; Lucro: number }>;
187
+ planningCards: OperationsReportPlanningCard[];
188
+ rows: Array<{
189
+ id: number;
190
+ name: string;
191
+ role: string;
192
+ seniority: string;
193
+ department: string;
194
+ contractType: string;
195
+ startDate: string | null;
196
+ endDate: string | null;
197
+ salaryCost: number;
198
+ benefitsCost: number;
199
+ taxesCost: number;
200
+ toolsCost: number;
201
+ billableValue: number;
202
+ availableHours: number;
203
+ allocatedHours: number;
204
+ billableHours: number;
205
+ internalHours: number;
206
+ overtimeHours: number;
207
+ projects: number;
208
+ risk: 'baixo' | 'médio' | 'alto';
209
+ recommendation: string;
210
+ }>;
211
+ };
212
212
 
213
213
  export type OperationsCollaborator = {
214
214
  id: number;