Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Void Transport Permit Text and Badge #1956

Merged
merged 2 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ppr-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ppr-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ppr-ui",
"version": "3.2.28",
"version": "3.2.29",
"private": true,
"appName": "Assets UI",
"sbcName": "SBC Common Components",
Expand Down
5 changes: 4 additions & 1 deletion ppr-ui/src/composables/exemption/useExemptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ import {
UnitNoteDocTypes,
UnitNoteStatusTypes
} from '@/enums'
import { useRouter } from 'vue-router'

export const useExemptions = () => {
const router = useRouter()
const { goToRoute } = useNavigation()
const { setMhrExemption, setMhrExemptionNote, setMhrExemptionValidation, setMhrExemptionValue } = useStore()
const {
Expand Down Expand Up @@ -60,7 +62,8 @@ export const useExemptions = () => {
const isExemptionWithActiveTransportPermit: ComputedRef<boolean> = computed((): boolean => {
return (
getMhrInformation.value.permitStatus === MhApiStatusTypes.ACTIVE &&
(isResExemption.value || isNonResExemption.value)
(isResExemption.value || isNonResExemption.value) &&
[RouteNames.EXEMPTION_DETAILS, RouteNames.EXEMPTION_REVIEW].includes(router.currentRoute.value.name as RouteNames)
)
})

Expand Down
4 changes: 2 additions & 2 deletions ppr-ui/tests/unit/ExemptionDetails.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import { axe } from 'vitest-axe'
import { TransportPermitDetails } from '@/components/mhrTransportPermit'
import { useStore } from '@/store/store'
import { mockedAddress } from './test-data'
import { UnitNoteDocTypes } from '@/enums'
import { RouteNames, UnitNoteDocTypes } from '@/enums'

const store = useStore()

describe('ExemptionDetails', () => {
let wrapper

beforeEach(async () => {
wrapper = await createComponent(ExemptionDetails as any, { showErrors: false })
wrapper = await createComponent(ExemptionDetails as any, { showErrors: false }, RouteNames.EXEMPTION_DETAILS)
await nextTick()
})

Expand Down
4 changes: 2 additions & 2 deletions ppr-ui/tests/unit/ExemptionReview.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { ConfirmCompletion } from '@/components/mhrTransfers'
import { StaffPayment } from '@/components/common'
import { axe } from 'vitest-axe'
import { useStore } from '@/store/store'
import { UnitNoteDocTypes } from '@/enums'
import { RouteNames, UnitNoteDocTypes } from '@/enums'
import { mockedAddress } from './test-data'
import { TransportPermitDetails } from '@/components/mhrTransportPermit'

Expand All @@ -32,7 +32,7 @@ describe('ExemptionReview', () => {
let wrapper

beforeEach(async () => {
wrapper = await createComponent(ExemptionReview, { showErrors: false }, null)
wrapper = await createComponent(ExemptionReview, { showErrors: false }, RouteNames.EXEMPTION_REVIEW)
setupMockStaffUser()
await nextTick()
})
Expand Down
Loading