@@ -281,10 +287,19 @@ export default {
type: Object,
required: true
},
+ submitter: {
+ type: Object,
+ required: true
+ },
submitterSlug: {
type: String,
required: true
},
+ emptyValueRequiredStep: {
+ type: Object,
+ required: false,
+ default: null
+ },
values: {
type: Object,
required: true
@@ -298,6 +313,7 @@ export default {
questions: null,
currentQuestionIndex: 0,
token: null,
+ reference: null,
answers: {},
error: null,
form: {
@@ -318,6 +334,9 @@ export default {
currentQuestion () {
return this.questions ? this.questions[this.currentQuestionIndex] : null
},
+ isRequiredFieldEmpty () {
+ return this.emptyValueRequiredStep && this.emptyValueRequiredStep[0] !== this.field
+ },
states () {
return [
{ code: 'AL', name: 'Alabama' },
@@ -388,6 +407,7 @@ export default {
restartKba () {
this.questions = null
this.token = null
+ this.reference = null
this.answers = {}
this.currentQuestionIndex = 0
this.error = null
@@ -432,6 +452,7 @@ export default {
if (data.output && data.output.questions && data.output.questions.questions) {
this.questions = data.output.questions.questions
this.token = data.continuations.questions.template.token
+ this.reference = data.meta.reference
this.questions.forEach(q => {
this.answers[q.id] = null
@@ -461,6 +482,7 @@ export default {
body: JSON.stringify({
token: this.token,
answers: formattedAnswers,
+ reference: this.reference,
submitter_slug: this.submitterSlug
}),
headers: { 'Content-Type': 'application/json' }
diff --git a/app/jobs/process_submitter_completion_job.rb b/app/jobs/process_submitter_completion_job.rb
index 68d09c53..0976b3bf 100644
--- a/app/jobs/process_submitter_completion_job.rb
+++ b/app/jobs/process_submitter_completion_job.rb
@@ -39,7 +39,7 @@ class ProcessSubmitterCompletionJob
submission = submitter.submission
complete_verification_events, sms_events =
- submitter.submission_events.where(event_type: %i[send_sms send_2fa_sms complete_verification])
+ submitter.submission_events.where(event_type: %i[send_sms send_2fa_sms complete_verification complete_kba])
.partition { |e| e.event_type == 'complete_verification' || e.event_type == 'complete_kba' }
complete_verification_event = complete_verification_events.first