Skip to content

Commit

Permalink
fix(Actions/modify): Open the correct modification procedure
Browse files Browse the repository at this point in the history
In the case of licenses and identity cards today,
there is a foreign version.
The StepperDialogProvider handles this very well,
as long as you enter the correct search params.
  • Loading branch information
Merkur39 committed Jul 12, 2024
1 parent 7bc5b4d commit d48ddde
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/Actions/Items/modify.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ export const modify = ({ t, navigate }) => {
!isFromKonnector(docs[0]) &&
getCreatedByApp(docs[0]) === 'mespapiers',
action: docs => {
navigate(`edit/${docs[0]._id}`)
const country = docs[0].metadata.country?.toLowerCase()
navigate({
pathname: `edit/${docs[0]._id}`,
...(country && { search: `?country=${country}` })
})
},
// eslint-disable-next-line react/display-name
Component: forwardRef((props, ref) => {
Expand Down

0 comments on commit d48ddde

Please sign in to comment.