-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathroutes.ts
123 lines (122 loc) · 2.66 KB
/
routes.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
import {
Alteration,
Change,
Conversion,
Correction,
LimitedRestorationExtension,
LimitedRestorationToFull,
Signin,
Signout,
SpecialResolution
}
from '@/views/'
import { FilingTypes, RouteNames } from '@/enums/'
export const routes = [
{
path: '/alteration',
name: RouteNames.ALTERATION,
component: Alteration,
meta: {
requiresAuth: true,
isStaffOnly: false,
filingType: FilingTypes.ALTERATION,
title: 'Company Information page'
}
},
{
path: '/change',
name: RouteNames.CHANGE,
component: Change,
meta: {
requiresAuth: true,
isStaffOnly: false,
filingType: FilingTypes.CHANGE_OF_REGISTRATION,
title: 'Business Information'
}
},
{
path: '/conversion',
name: RouteNames.CONVERSION,
component: Conversion,
meta: {
requiresAuth: true,
isStaffOnly: true,
filingType: FilingTypes.CONVERSION,
title: 'Record Conversion'
}
},
{
path: '/correction',
name: RouteNames.CORRECTION,
component: Correction,
meta: {
requiresAuth: true,
isStaffOnly: true,
filingType: FilingTypes.CORRECTION,
title: 'Register Correction'
}
},
{
path: '/limitedRestorationExtension',
name: RouteNames.RESTORATION_EXTENSION,
component: LimitedRestorationExtension,
props: route => ({
restorationId: +route.query['restoration-id'] || 0
}),
meta: {
requiresAuth: true,
isStaffOnly: true,
filingType: FilingTypes.RESTORATION,
title: 'Limited Restoration Extension'
}
},
{
path: '/limitedRestorationToFull',
name: RouteNames.RESTORATION_CONVERSION,
component: LimitedRestorationToFull,
props: route => ({
restorationId: +route.query['restoration-id'] || 0
}),
meta: {
requiresAuth: true,
isStaffOnly: true,
filingType: FilingTypes.RESTORATION,
title: 'Conversion to Full Restoration'
}
},
{
path: '/special-resolution',
name: RouteNames.SPECIAL_RESOLUTION,
component: SpecialResolution,
meta: {
requiresAuth: true,
isStaffOnly: false,
filingType: FilingTypes.SPECIAL_RESOLUTION,
title: 'Special Resolution'
}
},
{
// router.beforeEach() routes here:
path: '/signin',
name: RouteNames.SIGN_IN,
component: Signin,
meta: {
requiresAuth: false
}
},
{
// SbcHeader.logout() redirects here:
path: '/signout',
name: RouteNames.SIGN_OUT,
component: Signout,
meta: {
requiresAuth: false
}
},
{
// fallback route
// must be last
path: '*',
redirect: '/correction' // arbitrary default route
}
]