-
Notifications
You must be signed in to change notification settings - Fork 7
/
steps.js
222 lines (198 loc) · 7.99 KB
/
steps.js
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
/* eslint-disable max-len */
const { concat } = require('lodash');
const config = require('config');
const evidenceUploadEnabled = config.get('features.evidenceUpload.enabled');
const Entry = require('steps/entry/Entry');
const Exit = require('steps/exit-points/exit/Exit');
const Pcq = require('steps/pcq/Pcq');
const SessionTimeout = require('steps/exit-points/session-timeout/SessionTimeout');
const SessionTimeoutRedirect = require('steps/exit-points/SessionTimeoutRedirect');
const Sessions = require('steps/session/Sessions');
const Error500 = require('steps/errors/500/Error500');
const DuplicateError = require('steps/errors/duplicate-error/DuplicateError');
const BenefitType = require('steps/start/benefit-type/BenefitType');
const LanguagePreference = require('steps/start/language-preference/LanguagePreference');
const PostcodeChecker = require('steps/start/postcode-checker/PostcodeChecker');
const InvalidPostcode = require('steps/start/invalid-postcode/InvalidPostcode');
const Independence = require('steps/start/independence/Independence');
const CantAppeal = require('steps/compliance/cant-appeal/CantAppeal');
const DWPIssuingOffice = require('steps/compliance/dwp-issuing-office/DWPIssuingOffice');
const DWPIssuingOfficeEsa = require('steps/compliance/dwp-issuing-office-other/DWPIssuingOfficeEsa');
const HaveAMRN = require('steps/compliance/have-a-mrn/HaveAMRN');
const HaveContactedDWP = require('steps/compliance/have-contacted-dwp/HaveContactedDWP');
const CheckMRN = require('steps/compliance/check-mrn/CheckMRN');
const ContactDWP = require('steps/compliance/contact-dwp/ContactDWP');
const MRNDate = require('steps/compliance/mrn-date/MRNDate');
const NoMRN = require('steps/compliance/no-mrn/NoMRN');
const MRNOverOneMonthLate = require('steps/compliance/mrn-over-month-late/MRNOverOneMonthLate');
const MRNOverThirteenMonthsLate = require('steps/compliance/mrn-over-thirteen-months-late/MRNOverThirteenMonthsLate');
const Appointee = require('steps/identity/appointee/Appointee');
const AppellantContactDetails = require('steps/identity/appellant-contact-details/AppellantContactDetails');
const AppellantName = require('steps/identity/appellant-name/AppellantName');
const AppellantDOB = require('steps/identity/appellant-dob/AppellantDOB');
const AppellantNINO = require('steps/identity/appellant-nino/AppellantNINO');
const AppealFormDownload = require('steps/appeal-form-download/AppealFormDownload');
const AppointeeName = require('steps/appointee/appointee-name/AppointeeName');
const AppointeeDOB = require('steps/appointee/appointee-dob/AppointeeDOB');
const AppointeeContactDetails = require('steps/appointee/appointee-contact-details/AppointeeContactDetails');
const SameAddress = require('steps/appointee/same-address/SameAddress');
const TextReminders = require('steps/sms-notify/text-reminders/TextReminders');
const SendToNumber = require('steps/sms-notify/send-to-number/SendToNumber');
const EnterMobile = require('steps/sms-notify/enter-mobile/EnterMobile');
const SmsConfirmation = require('steps/sms-notify/sms-confirmation/SmsConfirmation');
const Representative = require('steps/representative/representative/Representative');
const RepresentativeDetails = require('steps/representative/representative-details/RepresentativeDetails');
const NoRepresentativeDetails = require('steps/representative/no-representative-details/NoRepresentativeDetails');
const ReasonForAppealing = require('steps/reasons-for-appealing/reason-for-appealing/ReasonForAppealing');
const OtherReasonForAppealing = require('steps/reasons-for-appealing/other-reasons-for-appealing/OtherReasonForAppealing');
const SendingEvidence = require('steps/reasons-for-appealing/sending-evidence/SendingEvidence');
const EvidenceProvide = require('steps/reasons-for-appealing/evidence-provide/EvidenceProvide');
const HearingSupport = require('steps/hearing/support/HearingSupport');
const HearingOptions = require('steps/hearing/options/HearingOptions');
const TheHearing = require('steps/hearing/the-hearing/TheHearing');
const HearingArrangements = require('steps/hearing/arrangements/HearingArrangements');
const HearingAvailability = require('steps/hearing/availability/HearingAvailability');
const DatesCantAttend = require('steps/hearing/dates-cant-attend/DatesCantAttend');
const NotAttendingHearing = require('steps/hearing/not-attending/NotAttendingHearing');
const CheckYourAppeal = require('steps/check-your-appeal/CheckYourAppeal');
const DraftAppeals = require('steps/draft-appeals/DraftAppeals');
const EditAppeal = require('steps/edit-appeal/EditAppeal');
const NewAppeal = require('steps/new-appeal/NewAppeal');
const ArchiveAppeal = require('steps/archive-appeal/ArchiveAppeal');
const Confirmation = require('steps/confirmation/Confirmation');
const EvidenceUpload = require('steps/reasons-for-appealing/evidence-upload/EvidenceUpload');
const EvidenceDescription = require('steps/reasons-for-appealing/evidence-description/EvidenceDescription');
const CreateAccount = require('steps/start/create-account/CreateAccount');
const IdamRedirect = require('steps/idam/idam-redirect/IdamRedirect');
const IdamLogin = require('steps/idam/IdamLogin/IdamLogin');
const IdamMockLogin = require('steps/idam/IdamLogin/IdamLogin');
const Authenticated = require('steps/idam/authenticated/Authenticated');
const SignOut = require('steps/idam/sign-out/SignOut');
const SignInBack = require('steps/idam/sign-in-back/SignInBack');
const StillCanAppeal = require('steps/compliance/still-can-appeal/StillCanAppeal');
const Accessibility = require('steps/policy-pages/accessibility/Accessibility');
const ContactUs = require('steps/policy-pages/contact-us/ContactUs');
const CookiePolicy = require('steps/policy-pages/cookie-policy/CookiePolicy');
const Cookies = require('steps/policy-pages/cookie-policy/Cookies');
const PrivacyPolicy = require('steps/policy-pages/privacy-policy/PrivacyPolicy');
const TermsAndConditions = require('steps/policy-pages/terms-and-conditions/TermsAndConditions');
const init = [
Entry,
Exit,
Sessions,
Error500,
DuplicateError,
SessionTimeout,
SessionTimeoutRedirect
];
const startAnAppeal = [
BenefitType,
PostcodeChecker,
InvalidPostcode,
Independence,
CreateAccount,
IdamRedirect,
LanguagePreference
];
const compliance = [
HaveAMRN,
HaveContactedDWP,
DWPIssuingOffice,
CantAppeal,
CheckMRN,
ContactDWP,
MRNDate,
DWPIssuingOfficeEsa,
NoMRN,
MRNOverOneMonthLate,
MRNOverThirteenMonthsLate,
StillCanAppeal
];
const identity = [
AppellantContactDetails,
AppellantDOB,
AppellantName,
AppellantNINO,
Appointee,
AppealFormDownload
];
const appointee = [
AppointeeName,
AppointeeDOB,
AppointeeContactDetails,
SameAddress
];
const smsNotify = [
TextReminders,
SendToNumber,
EnterMobile,
SmsConfirmation
];
const representative = [
Representative,
RepresentativeDetails,
NoRepresentativeDetails
];
const reasonsForAppealing = [
ReasonForAppealing,
OtherReasonForAppealing
];
if (!evidenceUploadEnabled) {
reasonsForAppealing.push(SendingEvidence);
}
if (evidenceUploadEnabled) {
reasonsForAppealing.push(EvidenceProvide);
reasonsForAppealing.push(EvidenceUpload);
reasonsForAppealing.push(EvidenceDescription);
}
const hearing = [
HearingAvailability,
HearingSupport,
HearingArrangements,
DatesCantAttend,
NotAttendingHearing,
TheHearing,
HearingOptions
];
const pcq = [ Pcq ];
const checkYourAppeal = [ CheckYourAppeal ];
const draftAppeals = [ DraftAppeals ];
const editAppeal = [ EditAppeal ];
const newAppeal = [ NewAppeal ];
const archiveAppeal = [ ArchiveAppeal ];
const confirmation = [ Confirmation ];
const idam = [
IdamMockLogin,
Authenticated,
IdamLogin,
SignOut,
SignInBack
];
const policyPages = [
Accessibility,
ContactUs,
CookiePolicy,
Cookies,
PrivacyPolicy,
TermsAndConditions
];
module.exports = concat(
init,
startAnAppeal,
compliance,
identity,
appointee,
smsNotify,
representative,
reasonsForAppealing,
hearing,
pcq,
checkYourAppeal,
confirmation,
idam,
draftAppeals,
editAppeal,
newAppeal,
archiveAppeal,
policyPages
);