Skip to content

Commit 25dcada

Browse files
fix(sidebar): add SignPDFExternal to sidebarRoutes to prevent premature close on route change
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 6e3f9a0 commit 25dcada

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

src/store/sidebar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const useSidebarStore = defineStore('sidebar', {
99
state: () => ({
1010
show: false,
1111
activeTab: '',
12-
sidebarRoutes: ['fileslist', 'SignPDF', 'ValidationFile', 'IdDocsApprove'],
12+
sidebarRoutes: ['fileslist', 'SignPDF', 'SignPDFExternal', 'ValidationFile', 'IdDocsApprove'],
1313
}),
1414

1515
getters: {

src/tests/store/sidebar.spec.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,16 @@ describe('sidebar store - visibility rules', () => {
213213
expect(store.show).toBe(true)
214214
})
215215

216+
it('keeps sidebar visible for SignPDFExternal route', () => {
217+
const store = useSidebarStore()
218+
store.show = true
219+
store.activeTab = 'sign-tab'
220+
221+
store.handleRouteChange('SignPDFExternal')
222+
223+
expect(store.show).toBe(true)
224+
})
225+
216226
it('hides sidebar for non-allowed routes', () => {
217227
const store = useSidebarStore()
218228
store.show = true

0 commit comments

Comments
 (0)