@hed-hog/operations 0.0.297 → 0.0.299

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 (32) hide show
  1. package/hedhog/frontend/app/_components/collaborator-details-screen.tsx.ejs +310 -310
  2. package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +631 -631
  3. package/hedhog/frontend/app/_components/contract-details-screen.tsx.ejs +132 -132
  4. package/hedhog/frontend/app/_components/contract-form-screen.tsx.ejs +558 -558
  5. package/hedhog/frontend/app/_components/project-details-screen.tsx.ejs +291 -291
  6. package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +689 -689
  7. package/hedhog/frontend/app/_lib/api.ts.ejs +32 -32
  8. package/hedhog/frontend/app/_lib/hooks/use-operations-access.ts.ejs +44 -44
  9. package/hedhog/frontend/app/_lib/types.ts.ejs +360 -360
  10. package/hedhog/frontend/app/_lib/utils/format.ts.ejs +129 -129
  11. package/hedhog/frontend/app/_lib/utils/forms.ts.ejs +14 -14
  12. package/hedhog/frontend/app/approvals/page.tsx.ejs +386 -386
  13. package/hedhog/frontend/app/collaborators/[id]/edit/page.tsx.ejs +11 -11
  14. package/hedhog/frontend/app/collaborators/[id]/page.tsx.ejs +11 -11
  15. package/hedhog/frontend/app/collaborators/new/page.tsx.ejs +5 -5
  16. package/hedhog/frontend/app/collaborators/page.tsx.ejs +261 -261
  17. package/hedhog/frontend/app/contracts/[id]/edit/page.tsx.ejs +11 -11
  18. package/hedhog/frontend/app/contracts/[id]/page.tsx.ejs +11 -11
  19. package/hedhog/frontend/app/contracts/new/page.tsx.ejs +17 -17
  20. package/hedhog/frontend/app/contracts/page.tsx.ejs +262 -262
  21. package/hedhog/frontend/app/page.tsx.ejs +319 -319
  22. package/hedhog/frontend/app/projects/[id]/edit/page.tsx.ejs +11 -11
  23. package/hedhog/frontend/app/projects/[id]/page.tsx.ejs +11 -11
  24. package/hedhog/frontend/app/projects/new/page.tsx.ejs +5 -5
  25. package/hedhog/frontend/app/projects/page.tsx.ejs +236 -236
  26. package/hedhog/frontend/app/schedule-adjustments/page.tsx.ejs +418 -418
  27. package/hedhog/frontend/app/team/page.tsx.ejs +339 -339
  28. package/hedhog/frontend/app/time-off/page.tsx.ejs +328 -328
  29. package/hedhog/frontend/app/timesheets/page.tsx.ejs +636 -636
  30. package/hedhog/frontend/messages/en.json +648 -648
  31. package/hedhog/frontend/messages/pt.json +647 -647
  32. package/package.json +4 -4
@@ -1,11 +1,11 @@
1
- import { CollaboratorFormScreen } from '../../../_components/collaborator-form-screen';
2
-
3
- export default async function EditCollaboratorPage({
4
- params,
5
- }: {
6
- params: Promise<{ id: string }>;
7
- }) {
8
- const { id } = await params;
9
-
10
- return <CollaboratorFormScreen collaboratorId={Number(id)} />;
11
- }
1
+ import { CollaboratorFormScreen } from '../../../_components/collaborator-form-screen';
2
+
3
+ export default async function EditCollaboratorPage({
4
+ params,
5
+ }: {
6
+ params: Promise<{ id: string }>;
7
+ }) {
8
+ const { id } = await params;
9
+
10
+ return <CollaboratorFormScreen collaboratorId={Number(id)} />;
11
+ }
@@ -1,11 +1,11 @@
1
- import { CollaboratorDetailsScreen } from '../../_components/collaborator-details-screen';
2
-
3
- export default async function CollaboratorDetailsPage({
4
- params,
5
- }: {
6
- params: Promise<{ id: string }>;
7
- }) {
8
- const { id } = await params;
9
-
10
- return <CollaboratorDetailsScreen collaboratorId={Number(id)} />;
11
- }
1
+ import { CollaboratorDetailsScreen } from '../../_components/collaborator-details-screen';
2
+
3
+ export default async function CollaboratorDetailsPage({
4
+ params,
5
+ }: {
6
+ params: Promise<{ id: string }>;
7
+ }) {
8
+ const { id } = await params;
9
+
10
+ return <CollaboratorDetailsScreen collaboratorId={Number(id)} />;
11
+ }
@@ -1,5 +1,5 @@
1
- import { CollaboratorFormScreen } from '../../_components/collaborator-form-screen';
2
-
3
- export default function NewCollaboratorPage() {
4
- return <CollaboratorFormScreen />;
5
- }
1
+ import { CollaboratorFormScreen } from '../../_components/collaborator-form-screen';
2
+
3
+ export default function NewCollaboratorPage() {
4
+ return <CollaboratorFormScreen />;
5
+ }
@@ -1,261 +1,261 @@
1
- 'use client';
2
-
3
- import { EmptyState, Page, SearchBar } from '@/components/entity-list';
4
- import { Button } from '@/components/ui/button';
5
- import {
6
- Table,
7
- TableBody,
8
- TableCell,
9
- TableHead,
10
- TableHeader,
11
- TableRow,
12
- } from '@/components/ui/table';
13
- import { useApp, useQuery } from '@hed-hog/next-app-provider';
14
- import { Eye, FileText, Pencil, UserRound } from 'lucide-react';
15
- import Link from 'next/link';
16
- import { useMemo, useState } from 'react';
17
- import { useTranslations } from 'next-intl';
18
- import { OperationsHeader } from '../_components/operations-header';
19
- import { StatusBadge } from '../_components/status-badge';
20
- import { fetchOperations, mutateOperations } from '../_lib/api';
21
- import { useOperationsAccess } from '../_lib/hooks/use-operations-access';
22
- import type { OperationsCollaborator } from '../_lib/types';
23
- import {
24
- formatDate,
25
- formatEnumLabel,
26
- formatHours,
27
- getStatusBadgeClass,
28
- } from '../_lib/utils/format';
29
-
30
- export default function OperationsCollaboratorsPage() {
31
- const t = useTranslations('operations.CollaboratorsPage');
32
- const commonT = useTranslations('operations.Common');
33
- const { request, showToastHandler, currentLocaleCode } = useApp();
34
- const access = useOperationsAccess();
35
- const [search, setSearch] = useState('');
36
- const [statusFilter, setStatusFilter] = useState('all');
37
- const [typeFilter, setTypeFilter] = useState('all');
38
-
39
- const { data: collaborators = [], refetch } = useQuery<OperationsCollaborator[]>({
40
- queryKey: ['operations-collaborators-list', currentLocaleCode],
41
- enabled: access.isCollaborator,
42
- queryFn: () =>
43
- fetchOperations<OperationsCollaborator[]>(request, '/operations/collaborators'),
44
- });
45
-
46
- const filteredRows = useMemo(
47
- () =>
48
- collaborators.filter((item) => {
49
- const matchesSearch = !search.trim()
50
- ? true
51
- : [
52
- item.displayName,
53
- item.code,
54
- item.department,
55
- item.title,
56
- item.supervisorName,
57
- ]
58
- .filter(Boolean)
59
- .some((value) =>
60
- String(value).toLowerCase().includes(search.trim().toLowerCase())
61
- );
62
- const matchesStatus =
63
- statusFilter === 'all' ? true : item.status === statusFilter;
64
- const matchesType =
65
- typeFilter === 'all' ? true : item.collaboratorType === typeFilter;
66
- return matchesSearch && matchesStatus && matchesType;
67
- }),
68
- [collaborators, search, statusFilter, typeFilter]
69
- );
70
-
71
- const toggleStatus = async (collaborator: OperationsCollaborator) => {
72
- const nextStatus = collaborator.status === 'inactive' ? 'active' : 'inactive';
73
-
74
- try {
75
- await mutateOperations(
76
- request,
77
- `/operations/collaborators/${collaborator.id}`,
78
- 'PATCH',
79
- { status: nextStatus }
80
- );
81
- showToastHandler?.('success', t('messages.statusSuccess'));
82
- await refetch();
83
- } catch {
84
- showToastHandler?.('error', t('messages.statusError'));
85
- }
86
- };
87
-
88
- return (
89
- <Page>
90
- <OperationsHeader
91
- title={t('title')}
92
- description={t('description')}
93
- current={t('breadcrumb')}
94
- actions={
95
- access.isDirector ? (
96
- <Button size="sm" asChild>
97
- <Link href="/operations/collaborators/new">
98
- {commonT('actions.create')}
99
- </Link>
100
- </Button>
101
- ) : undefined
102
- }
103
- />
104
-
105
- <SearchBar
106
- searchQuery={search}
107
- onSearchChange={setSearch}
108
- onSearch={() => undefined}
109
- placeholder={t('searchPlaceholder')}
110
- controls={[
111
- {
112
- id: 'type',
113
- type: 'select',
114
- value: typeFilter,
115
- onChange: setTypeFilter,
116
- placeholder: commonT('labels.collaboratorType'),
117
- options: [
118
- { value: 'all', label: commonT('filters.allTypes') },
119
- { value: 'clt', label: 'CLT' },
120
- { value: 'pj', label: 'PJ' },
121
- { value: 'freelancer', label: 'Freelancer' },
122
- { value: 'intern', label: 'Intern' },
123
- { value: 'other', label: 'Other' }
124
- ]
125
- },
126
- {
127
- id: 'status',
128
- type: 'select',
129
- value: statusFilter,
130
- onChange: setStatusFilter,
131
- placeholder: commonT('labels.status'),
132
- options: [
133
- { value: 'all', label: commonT('filters.allStatuses') },
134
- { value: 'active', label: formatEnumLabel('active') },
135
- { value: 'on_leave', label: formatEnumLabel('on_leave') },
136
- { value: 'inactive', label: formatEnumLabel('inactive') }
137
- ]
138
- }
139
- ]}
140
- />
141
-
142
- {filteredRows.length > 0 ? (
143
- <div className="overflow-x-auto rounded-md border">
144
- <Table>
145
- <TableHeader>
146
- <TableRow>
147
- <TableHead>{commonT('labels.collaborator')}</TableHead>
148
- <TableHead>{commonT('labels.collaboratorType')}</TableHead>
149
- <TableHead>{commonT('labels.title')}</TableHead>
150
- <TableHead>{commonT('labels.status')}</TableHead>
151
- <TableHead>{commonT('labels.supervisor')}</TableHead>
152
- <TableHead>{commonT('labels.weeklyCapacity')}</TableHead>
153
- <TableHead>{commonT('labels.contractStatus')}</TableHead>
154
- <TableHead>{commonT('labels.startDate')}</TableHead>
155
- <TableHead className="w-[260px] text-right">
156
- {commonT('labels.actions')}
157
- </TableHead>
158
- </TableRow>
159
- </TableHeader>
160
- <TableBody>
161
- {filteredRows.map((collaborator) => (
162
- <TableRow key={collaborator.id}>
163
- <TableCell>
164
- <div className="font-medium">{collaborator.displayName}</div>
165
- <div className="text-xs text-muted-foreground">
166
- {collaborator.code}
167
- </div>
168
- </TableCell>
169
- <TableCell>{formatEnumLabel(collaborator.collaboratorType)}</TableCell>
170
- <TableCell>
171
- {[collaborator.department, collaborator.title]
172
- .filter(Boolean)
173
- .join(' • ') || commonT('labels.notAvailable')}
174
- </TableCell>
175
- <TableCell>
176
- <StatusBadge
177
- label={formatEnumLabel(collaborator.status)}
178
- className={getStatusBadgeClass(collaborator.status)}
179
- />
180
- </TableCell>
181
- <TableCell>
182
- {collaborator.supervisorName || commonT('labels.notAssigned')}
183
- </TableCell>
184
- <TableCell>{formatHours(collaborator.weeklyCapacityHours)}</TableCell>
185
- <TableCell>
186
- {collaborator.contractStatus ? (
187
- <StatusBadge
188
- label={formatEnumLabel(collaborator.contractStatus)}
189
- className={getStatusBadgeClass(collaborator.contractStatus)}
190
- />
191
- ) : (
192
- commonT('labels.notAssigned')
193
- )}
194
- </TableCell>
195
- <TableCell>{formatDate(collaborator.joinedAt)}</TableCell>
196
- <TableCell>
197
- <div className="flex justify-end gap-2">
198
- <Button variant="outline" size="icon" asChild>
199
- <Link href={`/operations/collaborators/${collaborator.id}`}>
200
- <Eye className="size-4" />
201
- </Link>
202
- </Button>
203
- {access.isDirector ? (
204
- <Button variant="outline" size="icon" asChild>
205
- <Link href={`/operations/collaborators/${collaborator.id}/edit`}>
206
- <Pencil className="size-4" />
207
- </Link>
208
- </Button>
209
- ) : null}
210
- <Button
211
- variant="outline"
212
- size="icon"
213
- asChild={Boolean(collaborator.contractId)}
214
- disabled={!collaborator.contractId}
215
- >
216
- {collaborator.contractId ? (
217
- <Link href={`/operations/contracts?edit=${collaborator.contractId}`}>
218
- <FileText className="size-4" />
219
- </Link>
220
- ) : (
221
- <span>
222
- <FileText className="size-4" />
223
- </span>
224
- )}
225
- </Button>
226
- {access.isDirector ? (
227
- <Button
228
- variant="outline"
229
- size="sm"
230
- onClick={() => void toggleStatus(collaborator)}
231
- >
232
- {collaborator.status === 'inactive'
233
- ? commonT('actions.activate')
234
- : commonT('actions.deactivate')}
235
- </Button>
236
- ) : null}
237
- </div>
238
- </TableCell>
239
- </TableRow>
240
- ))}
241
- </TableBody>
242
- </Table>
243
- </div>
244
- ) : (
245
- <EmptyState
246
- icon={<UserRound className="size-12" />}
247
- title={commonT('states.emptyTitle')}
248
- description={t('emptyDescription')}
249
- actionLabel={access.isDirector ? commonT('actions.create') : commonT('actions.refresh')}
250
- onAction={
251
- access.isDirector
252
- ? () => {
253
- window.location.href = '/operations/collaborators/new';
254
- }
255
- : () => void refetch()
256
- }
257
- />
258
- )}
259
- </Page>
260
- );
261
- }
1
+ 'use client';
2
+
3
+ import { EmptyState, Page, SearchBar } from '@/components/entity-list';
4
+ import { Button } from '@/components/ui/button';
5
+ import {
6
+ Table,
7
+ TableBody,
8
+ TableCell,
9
+ TableHead,
10
+ TableHeader,
11
+ TableRow,
12
+ } from '@/components/ui/table';
13
+ import { useApp, useQuery } from '@hed-hog/next-app-provider';
14
+ import { Eye, FileText, Pencil, UserRound } from 'lucide-react';
15
+ import Link from 'next/link';
16
+ import { useMemo, useState } from 'react';
17
+ import { useTranslations } from 'next-intl';
18
+ import { OperationsHeader } from '../_components/operations-header';
19
+ import { StatusBadge } from '../_components/status-badge';
20
+ import { fetchOperations, mutateOperations } from '../_lib/api';
21
+ import { useOperationsAccess } from '../_lib/hooks/use-operations-access';
22
+ import type { OperationsCollaborator } from '../_lib/types';
23
+ import {
24
+ formatDate,
25
+ formatEnumLabel,
26
+ formatHours,
27
+ getStatusBadgeClass,
28
+ } from '../_lib/utils/format';
29
+
30
+ export default function OperationsCollaboratorsPage() {
31
+ const t = useTranslations('operations.CollaboratorsPage');
32
+ const commonT = useTranslations('operations.Common');
33
+ const { request, showToastHandler, currentLocaleCode } = useApp();
34
+ const access = useOperationsAccess();
35
+ const [search, setSearch] = useState('');
36
+ const [statusFilter, setStatusFilter] = useState('all');
37
+ const [typeFilter, setTypeFilter] = useState('all');
38
+
39
+ const { data: collaborators = [], refetch } = useQuery<OperationsCollaborator[]>({
40
+ queryKey: ['operations-collaborators-list', currentLocaleCode],
41
+ enabled: access.isCollaborator,
42
+ queryFn: () =>
43
+ fetchOperations<OperationsCollaborator[]>(request, '/operations/collaborators'),
44
+ });
45
+
46
+ const filteredRows = useMemo(
47
+ () =>
48
+ collaborators.filter((item) => {
49
+ const matchesSearch = !search.trim()
50
+ ? true
51
+ : [
52
+ item.displayName,
53
+ item.code,
54
+ item.department,
55
+ item.title,
56
+ item.supervisorName,
57
+ ]
58
+ .filter(Boolean)
59
+ .some((value) =>
60
+ String(value).toLowerCase().includes(search.trim().toLowerCase())
61
+ );
62
+ const matchesStatus =
63
+ statusFilter === 'all' ? true : item.status === statusFilter;
64
+ const matchesType =
65
+ typeFilter === 'all' ? true : item.collaboratorType === typeFilter;
66
+ return matchesSearch && matchesStatus && matchesType;
67
+ }),
68
+ [collaborators, search, statusFilter, typeFilter]
69
+ );
70
+
71
+ const toggleStatus = async (collaborator: OperationsCollaborator) => {
72
+ const nextStatus = collaborator.status === 'inactive' ? 'active' : 'inactive';
73
+
74
+ try {
75
+ await mutateOperations(
76
+ request,
77
+ `/operations/collaborators/${collaborator.id}`,
78
+ 'PATCH',
79
+ { status: nextStatus }
80
+ );
81
+ showToastHandler?.('success', t('messages.statusSuccess'));
82
+ await refetch();
83
+ } catch {
84
+ showToastHandler?.('error', t('messages.statusError'));
85
+ }
86
+ };
87
+
88
+ return (
89
+ <Page>
90
+ <OperationsHeader
91
+ title={t('title')}
92
+ description={t('description')}
93
+ current={t('breadcrumb')}
94
+ actions={
95
+ access.isDirector ? (
96
+ <Button size="sm" asChild>
97
+ <Link href="/operations/collaborators/new">
98
+ {commonT('actions.create')}
99
+ </Link>
100
+ </Button>
101
+ ) : undefined
102
+ }
103
+ />
104
+
105
+ <SearchBar
106
+ searchQuery={search}
107
+ onSearchChange={setSearch}
108
+ onSearch={() => undefined}
109
+ placeholder={t('searchPlaceholder')}
110
+ controls={[
111
+ {
112
+ id: 'type',
113
+ type: 'select',
114
+ value: typeFilter,
115
+ onChange: setTypeFilter,
116
+ placeholder: commonT('labels.collaboratorType'),
117
+ options: [
118
+ { value: 'all', label: commonT('filters.allTypes') },
119
+ { value: 'clt', label: 'CLT' },
120
+ { value: 'pj', label: 'PJ' },
121
+ { value: 'freelancer', label: 'Freelancer' },
122
+ { value: 'intern', label: 'Intern' },
123
+ { value: 'other', label: 'Other' }
124
+ ]
125
+ },
126
+ {
127
+ id: 'status',
128
+ type: 'select',
129
+ value: statusFilter,
130
+ onChange: setStatusFilter,
131
+ placeholder: commonT('labels.status'),
132
+ options: [
133
+ { value: 'all', label: commonT('filters.allStatuses') },
134
+ { value: 'active', label: formatEnumLabel('active') },
135
+ { value: 'on_leave', label: formatEnumLabel('on_leave') },
136
+ { value: 'inactive', label: formatEnumLabel('inactive') }
137
+ ]
138
+ }
139
+ ]}
140
+ />
141
+
142
+ {filteredRows.length > 0 ? (
143
+ <div className="overflow-x-auto rounded-md border">
144
+ <Table>
145
+ <TableHeader>
146
+ <TableRow>
147
+ <TableHead>{commonT('labels.collaborator')}</TableHead>
148
+ <TableHead>{commonT('labels.collaboratorType')}</TableHead>
149
+ <TableHead>{commonT('labels.title')}</TableHead>
150
+ <TableHead>{commonT('labels.status')}</TableHead>
151
+ <TableHead>{commonT('labels.supervisor')}</TableHead>
152
+ <TableHead>{commonT('labels.weeklyCapacity')}</TableHead>
153
+ <TableHead>{commonT('labels.contractStatus')}</TableHead>
154
+ <TableHead>{commonT('labels.startDate')}</TableHead>
155
+ <TableHead className="w-[260px] text-right">
156
+ {commonT('labels.actions')}
157
+ </TableHead>
158
+ </TableRow>
159
+ </TableHeader>
160
+ <TableBody>
161
+ {filteredRows.map((collaborator) => (
162
+ <TableRow key={collaborator.id}>
163
+ <TableCell>
164
+ <div className="font-medium">{collaborator.displayName}</div>
165
+ <div className="text-xs text-muted-foreground">
166
+ {collaborator.code}
167
+ </div>
168
+ </TableCell>
169
+ <TableCell>{formatEnumLabel(collaborator.collaboratorType)}</TableCell>
170
+ <TableCell>
171
+ {[collaborator.department, collaborator.title]
172
+ .filter(Boolean)
173
+ .join(' • ') || commonT('labels.notAvailable')}
174
+ </TableCell>
175
+ <TableCell>
176
+ <StatusBadge
177
+ label={formatEnumLabel(collaborator.status)}
178
+ className={getStatusBadgeClass(collaborator.status)}
179
+ />
180
+ </TableCell>
181
+ <TableCell>
182
+ {collaborator.supervisorName || commonT('labels.notAssigned')}
183
+ </TableCell>
184
+ <TableCell>{formatHours(collaborator.weeklyCapacityHours)}</TableCell>
185
+ <TableCell>
186
+ {collaborator.contractStatus ? (
187
+ <StatusBadge
188
+ label={formatEnumLabel(collaborator.contractStatus)}
189
+ className={getStatusBadgeClass(collaborator.contractStatus)}
190
+ />
191
+ ) : (
192
+ commonT('labels.notAssigned')
193
+ )}
194
+ </TableCell>
195
+ <TableCell>{formatDate(collaborator.joinedAt)}</TableCell>
196
+ <TableCell>
197
+ <div className="flex justify-end gap-2">
198
+ <Button variant="outline" size="icon" asChild>
199
+ <Link href={`/operations/collaborators/${collaborator.id}`}>
200
+ <Eye className="size-4" />
201
+ </Link>
202
+ </Button>
203
+ {access.isDirector ? (
204
+ <Button variant="outline" size="icon" asChild>
205
+ <Link href={`/operations/collaborators/${collaborator.id}/edit`}>
206
+ <Pencil className="size-4" />
207
+ </Link>
208
+ </Button>
209
+ ) : null}
210
+ <Button
211
+ variant="outline"
212
+ size="icon"
213
+ asChild={Boolean(collaborator.contractId)}
214
+ disabled={!collaborator.contractId}
215
+ >
216
+ {collaborator.contractId ? (
217
+ <Link href={`/operations/contracts?edit=${collaborator.contractId}`}>
218
+ <FileText className="size-4" />
219
+ </Link>
220
+ ) : (
221
+ <span>
222
+ <FileText className="size-4" />
223
+ </span>
224
+ )}
225
+ </Button>
226
+ {access.isDirector ? (
227
+ <Button
228
+ variant="outline"
229
+ size="sm"
230
+ onClick={() => void toggleStatus(collaborator)}
231
+ >
232
+ {collaborator.status === 'inactive'
233
+ ? commonT('actions.activate')
234
+ : commonT('actions.deactivate')}
235
+ </Button>
236
+ ) : null}
237
+ </div>
238
+ </TableCell>
239
+ </TableRow>
240
+ ))}
241
+ </TableBody>
242
+ </Table>
243
+ </div>
244
+ ) : (
245
+ <EmptyState
246
+ icon={<UserRound className="size-12" />}
247
+ title={commonT('states.emptyTitle')}
248
+ description={t('emptyDescription')}
249
+ actionLabel={access.isDirector ? commonT('actions.create') : commonT('actions.refresh')}
250
+ onAction={
251
+ access.isDirector
252
+ ? () => {
253
+ window.location.href = '/operations/collaborators/new';
254
+ }
255
+ : () => void refetch()
256
+ }
257
+ />
258
+ )}
259
+ </Page>
260
+ );
261
+ }
@@ -1,11 +1,11 @@
1
- import { ContractFormScreen } from '../../../_components/contract-form-screen';
2
-
3
- export default async function OperationsContractEditPage({
4
- params,
5
- }: {
6
- params: Promise<{ id: string }>;
7
- }) {
8
- const { id } = await params;
9
-
10
- return <ContractFormScreen contractId={Number(id)} />;
11
- }
1
+ import { ContractFormScreen } from '../../../_components/contract-form-screen';
2
+
3
+ export default async function OperationsContractEditPage({
4
+ params,
5
+ }: {
6
+ params: Promise<{ id: string }>;
7
+ }) {
8
+ const { id } = await params;
9
+
10
+ return <ContractFormScreen contractId={Number(id)} />;
11
+ }
@@ -1,11 +1,11 @@
1
- import { ContractDetailsScreen } from '../../_components/contract-details-screen';
2
-
3
- export default async function OperationsContractDetailsPage({
4
- params,
5
- }: {
6
- params: Promise<{ id: string }>;
7
- }) {
8
- const { id } = await params;
9
-
10
- return <ContractDetailsScreen contractId={Number(id)} />;
11
- }
1
+ import { ContractDetailsScreen } from '../../_components/contract-details-screen';
2
+
3
+ export default async function OperationsContractDetailsPage({
4
+ params,
5
+ }: {
6
+ params: Promise<{ id: string }>;
7
+ }) {
8
+ const { id } = await params;
9
+
10
+ return <ContractDetailsScreen contractId={Number(id)} />;
11
+ }