Routing not working for audit trail issue

Hi everyone
I’m working on this issue, In the routine.js and study.js, the routing of the auditTrailReport was written as

{
      title: <FormattedMessage id="sideNav.title.audittrail"/>,
      icon: IbmWatsonNaturalLanguageUnderstanding,
      SideNavMenuItem: [
        {
          link: config.serverBaseUrl + "/AuditTrailReport",
          label:  <FormattedMessage id="sideNav.label.audittrail"/>,
        },
      ],
    },

And I changed the routing to the component I just created

{
      title: <FormattedMessage id="sideNav.title.audittrail"/>,
      icon: IbmWatsonNaturalLanguageUnderstanding,
      SideNavMenuItem: [
        {
          link: "/AuditTrailReport",
          label:  <FormattedMessage id="sideNav.label.audittrail"/>,
        },
      ],
    },

When I click on auditTrail in the sidemenu, it redirects me to https://localhost/api/OpenELIS-Global/AuditTrailReport when its supposed to redirect me https://localhost/AuditTrailReport

Has anyone experienced this before?
I’d love some help with this please. And also if anybody has a correct lab no that I can use for testing purposes, that would be awesome.

So we have audit trail in both RoutineReports and StudyReports and could be where the confusion is coming from.

So ideally you would need to go to the routine.js and make the required change not forgetting that your url should be something like /RoutineReport/AuditTrailReport by doing other necessary changes in Reports/routine/index.js

And then do the same in study.js but don’t forget something like /StudyReport/AuditTrailReport after making other necessary changes aswell in Reports/study/index.js (this you will have to create).

or you could share a draft pr link for better guidance!

I get the same issue

I’ll open a draft PR now and share the link

This is the link to draft PR

Hey @Lovelyfin00 create a route for /AuditTrailReport in app.js then it will work! In the draft PR i see you have not created the one!

And also For Routine reports as well as for Study reports keep the link as link: "/AuditTrailReport", for the side nav! since both are redirecting to only one page only!

Ohhhhhh wow
I’ll do that and test it out
Thanks

1 Like

Works like magic
Thanks

1 Like

hello @mherman22 @sharif @Manish
i request for reviews here , I might be facing similar problem on issue 760

Hello, @Agaba_Derrick_Junior, I have mentioned the required changes to the PR. Please take a look!

hey @Manish sure, thanks i will check it out and resolve it

1 Like