Skip to content

Commit c3cfd0a

Browse files
committed
feat: link redirects to call / instrument page with search
1 parent 6bb41a8 commit c3cfd0a

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

apps/frontend/src/components/proposal/ProposalTableOfficer.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,11 @@ let columns: Column<ProposalViewData>[] = [
170170
// No per-call route exists, so officers link to the Calls list page.
171171
render: (rowData) =>
172172
rowData.callShortCode ? (
173-
<RoleBasedLink roleRoutes={{ [UserRole.USER_OFFICER]: '/Calls' }}>
173+
<RoleBasedLink
174+
roleRoutes={{
175+
[UserRole.USER_OFFICER]: `/Calls?search=${encodeURIComponent(rowData.callShortCode)}`,
176+
}}
177+
>
174178
{rowData.callShortCode}
175179
</RoleBasedLink>
176180
) : (
@@ -226,7 +230,9 @@ const instrumentManagementColumns = (
226230
rowData.instruments?.map((instrument) => ({
227231
key: instrument.id,
228232
label: instrument.name,
229-
roleRoutes: { [UserRole.USER_OFFICER]: '/Instruments' },
233+
roleRoutes: {
234+
[UserRole.USER_OFFICER]: `/Instruments?search=${instrument.name}`,
235+
},
230236
}))
231237
),
232238

0 commit comments

Comments
 (0)