|  |  | @ -1,11 +1,11 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | <template> |  |  |  | <template> | 
			
		
	
		
		
			
				
					
					|  |  |  |   <FieldAreas |  |  |  |   <FieldAreas | 
			
		
	
		
		
			
				
					
					|  |  |  |     ref="areas" |  |  |  |     ref="areas" | 
			
		
	
		
		
			
				
					
					|  |  |  |     :fields="submitterFields" |  |  |  |     :steps="stepFields" | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     :values="values" |  |  |  |     :values="values" | 
			
		
	
		
		
			
				
					
					|  |  |  |     :attachments-index="attachmentsIndex" |  |  |  |     :attachments-index="attachmentsIndex" | 
			
		
	
		
		
			
				
					
					|  |  |  |     :current-field="currentField" |  |  |  |     :current-step="currentStepFields" | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     @focus-field="goToField($event, false, true)" |  |  |  |     @focus-step="goToStep($event, false, true)" | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   /> |  |  |  |   /> | 
			
		
	
		
		
			
				
					
					|  |  |  |   <form |  |  |  |   <form | 
			
		
	
		
		
			
				
					
					|  |  |  |     v-if="!isCompleted" |  |  |  |     v-if="!isCompleted" | 
			
		
	
	
		
		
			
				
					|  |  | @ -21,7 +21,7 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |       :value="authenticityToken" |  |  |  |       :value="authenticityToken" | 
			
		
	
		
		
			
				
					
					|  |  |  |     > |  |  |  |     > | 
			
		
	
		
		
			
				
					
					|  |  |  |     <input |  |  |  |     <input | 
			
		
	
		
		
			
				
					
					|  |  |  |       v-if="currentStep === submitterFields.length - 1" |  |  |  |       v-if="currentStep === stepFields.length - 1" | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       type="hidden" |  |  |  |       type="hidden" | 
			
		
	
		
		
			
				
					
					|  |  |  |       name="completed" |  |  |  |       name="completed" | 
			
		
	
		
		
			
				
					
					|  |  |  |       value="true" |  |  |  |       value="true" | 
			
		
	
	
		
		
			
				
					|  |  | @ -42,12 +42,12 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |           <input |  |  |  |           <input | 
			
		
	
		
		
			
				
					
					|  |  |  |             :id="currentField.uuid" |  |  |  |             :id="currentField.uuid" | 
			
		
	
		
		
			
				
					
					|  |  |  |             v-model="values[currentField.uuid]" |  |  |  |             v-model="values[currentField.uuid]" | 
			
		
	
		
		
			
				
					
					|  |  |  |             autofocus |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             class="base-input !text-2xl w-full" |  |  |  |             class="base-input !text-2xl w-full" | 
			
		
	
		
		
			
				
					
					|  |  |  |             :required="currentField.required" |  |  |  |             :required="currentField.required" | 
			
		
	
		
		
			
				
					
					|  |  |  |             placeholder="Type here..." |  |  |  |             placeholder="Type here..." | 
			
		
	
		
		
			
				
					
					|  |  |  |             type="text" |  |  |  |             type="text" | 
			
		
	
		
		
			
				
					
					|  |  |  |             :name="`values[${currentField.uuid}]`" |  |  |  |             :name="`values[${currentField.uuid}]`" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             @focus="$refs.areas.scrollIntoField(currentField)" | 
			
		
	
		
		
			
				
					
					|  |  |  |           > |  |  |  |           > | 
			
		
	
		
		
			
				
					
					|  |  |  |         </div> |  |  |  |         </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |       </div> |  |  |  |       </div> | 
			
		
	
	
		
		
			
				
					|  |  | @ -57,15 +57,15 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |           :for="currentField.uuid" |  |  |  |           :for="currentField.uuid" | 
			
		
	
		
		
			
				
					
					|  |  |  |           class="label text-2xl mb-2" |  |  |  |           class="label text-2xl mb-2" | 
			
		
	
		
		
			
				
					
					|  |  |  |         >{{ currentField.name }}</label> |  |  |  |         >{{ currentField.name }}</label> | 
			
		
	
		
		
			
				
					
					|  |  |  |         <div> |  |  |  |         <div class="text-center"> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |           <input |  |  |  |           <input | 
			
		
	
		
		
			
				
					
					|  |  |  |             :id="currentField.uuid" |  |  |  |             :id="currentField.uuid" | 
			
		
	
		
		
			
				
					
					|  |  |  |             v-model="values[currentField.uuid]" |  |  |  |             v-model="values[currentField.uuid]" | 
			
		
	
		
		
			
				
					
					|  |  |  |             class="base-input !text-2xl w-full text-center" |  |  |  |             class="base-input !text-2xl text-center w-full" | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             autofocus |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             :required="currentField.required" |  |  |  |             :required="currentField.required" | 
			
		
	
		
		
			
				
					
					|  |  |  |             type="date" |  |  |  |             type="date" | 
			
		
	
		
		
			
				
					
					|  |  |  |             :name="`values[${currentField.uuid}]`" |  |  |  |             :name="`values[${currentField.uuid}]`" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             @focus="$refs.areas.scrollIntoField(currentField)" | 
			
		
	
		
		
			
				
					
					|  |  |  |           > |  |  |  |           > | 
			
		
	
		
		
			
				
					
					|  |  |  |         </div> |  |  |  |         </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |       </div> |  |  |  |       </div> | 
			
		
	
	
		
		
			
				
					|  |  | @ -81,6 +81,7 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |           class="select base-input !text-2xl w-full text-center font-normal" |  |  |  |           class="select base-input !text-2xl w-full text-center font-normal" | 
			
		
	
		
		
			
				
					
					|  |  |  |           :name="`values[${currentField.uuid}]`" |  |  |  |           :name="`values[${currentField.uuid}]`" | 
			
		
	
		
		
			
				
					
					|  |  |  |           @change="values[currentField.uuid] = $event.target.value" |  |  |  |           @change="values[currentField.uuid] = $event.target.value" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           @focus="$refs.areas.scrollIntoField(currentField)" | 
			
		
	
		
		
			
				
					
					|  |  |  |         > |  |  |  |         > | 
			
		
	
		
		
			
				
					
					|  |  |  |           <option |  |  |  |           <option | 
			
		
	
		
		
			
				
					
					|  |  |  |             value="" |  |  |  |             value="" | 
			
		
	
	
		
		
			
				
					|  |  | @ -98,13 +99,14 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |           </option> |  |  |  |           </option> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </select> |  |  |  |         </select> | 
			
		
	
		
		
			
				
					
					|  |  |  |       </div> |  |  |  |       </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |       <div v-else-if="currentField.type === 'radio' && currentField.options?.length"> |  |  |  |       <div v-else-if="currentField.type === 'radio'"> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         <label |  |  |  |         <label | 
			
		
	
		
		
			
				
					
					|  |  |  |           v-if="currentField.name" |  |  |  |           v-if="currentField.name" | 
			
		
	
		
		
			
				
					
					|  |  |  |           :for="currentField.uuid" |  |  |  |           :for="currentField.uuid" | 
			
		
	
		
		
			
				
					
					|  |  |  |           class="label text-2xl mb-2" |  |  |  |           class="label text-2xl mb-2" | 
			
		
	
		
		
			
				
					
					|  |  |  |         >{{ currentField.name }}</label> |  |  |  |         >{{ currentField.name }}</label> | 
			
		
	
		
		
			
				
					
					|  |  |  |         <div class="space-y-3.5"> |  |  |  |         <div class="flex w-full"> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <div class="space-y-3.5 mx-auto"> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <div |  |  |  |             <div | 
			
		
	
		
		
			
				
					
					|  |  |  |               v-for="(option, index) in currentField.options" |  |  |  |               v-for="(option, index) in currentField.options" | 
			
		
	
		
		
			
				
					
					|  |  |  |               :key="index" |  |  |  |               :key="index" | 
			
		
	
	
		
		
			
				
					|  |  | @ -129,34 +131,43 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |             </div> |  |  |  |             </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |           </div> |  |  |  |           </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </div> |  |  |  |         </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |       <CheckboxStep |  |  |  |       </div> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         v-else-if="currentField.type === 'checkbox' && currentField.options?.length" |  |  |  |       <MultiSelectStep | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         v-else-if="currentField.type === 'multiple'" | 
			
		
	
		
		
			
				
					
					|  |  |  |         v-model="values[currentField.uuid]" |  |  |  |         v-model="values[currentField.uuid]" | 
			
		
	
		
		
			
				
					
					|  |  |  |         :field="currentField" |  |  |  |         :field="currentField" | 
			
		
	
		
		
			
				
					
					|  |  |  |       /> |  |  |  |       /> | 
			
		
	
		
		
			
				
					
					|  |  |  |       <div v-else-if="['radio', 'checkbox'].includes(currentField.type)"> |  |  |  |       <div | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         <div class="flex justify-center"> |  |  |  |         v-else-if="currentField.type === 'checkbox'" | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         class="flex w-full" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       > | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         <div | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           class="space-y-3.5 mx-auto" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         > | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <div | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             v-for="(field, index) in currentStepFields" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             :key="field.uuid" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           > | 
			
		
	
		
		
			
				
					
					|  |  |  |             <label |  |  |  |             <label | 
			
		
	
		
		
			
				
					
					|  |  |  |             :for="currentField.uuid" |  |  |  |               :for="field.uuid" | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |               class="flex items-center space-x-3" |  |  |  |               class="flex items-center space-x-3" | 
			
		
	
		
		
			
				
					
					|  |  |  |             > |  |  |  |             > | 
			
		
	
		
		
			
				
					
					|  |  |  |               <input |  |  |  |               <input | 
			
		
	
		
		
			
				
					
					|  |  |  |               :id="currentField.uuid" |  |  |  |                 :id="field.uuid" | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               :model-value="values[currentField.uuid]" |  |  |  |                 type="checkbox" | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               :type="currentField.type" |  |  |  |                 :name="`values[${field.uuid}]`" | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               :name="`values[${currentField.uuid}]`" |  |  |  |                 :value="false" | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               :value="true" |  |  |  |                 class="base-checkbox !h-7 !w-7" | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               class="!h-7 !w-7" |  |  |  |                 :checked="!!values[field.uuid]" | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               :class="{'base-radio' : currentField.type === 'radio', 'base-checkbox': currentField.type === 'checkbox'}" |  |  |  |                 @click="values[field.uuid] = !values[field.uuid]" | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               :checked="!!values[currentField.uuid]" |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               @click="values[currentField.uuid] = !values[currentField.uuid]" |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |               > |  |  |  |               > | 
			
		
	
		
		
			
				
					
					|  |  |  |               <span class="text-xl"> |  |  |  |               <span class="text-xl"> | 
			
		
	
		
		
			
				
					
					|  |  |  |               {{ currentField.name || currentField.type }} |  |  |  |                 {{ currentField.name || currentField.type + ' ' + (index + 1) }} | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |               </span> |  |  |  |               </span> | 
			
		
	
		
		
			
				
					
					|  |  |  |             </label> |  |  |  |             </label> | 
			
		
	
		
		
			
				
					
					|  |  |  |           </div> |  |  |  |           </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </div> |  |  |  |         </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |       <ImageStep |  |  |  |       <ImageStep | 
			
		
	
		
		
			
				
					
					|  |  |  |         v-else-if="currentField.type === 'image'" |  |  |  |         v-else-if="currentField.type === 'image'" | 
			
		
	
		
		
			
				
					
					|  |  |  |         v-model="values[currentField.uuid]" |  |  |  |         v-model="values[currentField.uuid]" | 
			
		
	
	
		
		
			
				
					|  |  | @ -199,12 +210,12 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |     <div class="flex justify-center"> |  |  |  |     <div class="flex justify-center"> | 
			
		
	
		
		
			
				
					
					|  |  |  |       <div class="flex items-center mt-5 mb-1"> |  |  |  |       <div class="flex items-center mt-5 mb-1"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         <a |  |  |  |         <a | 
			
		
	
		
		
			
				
					
					|  |  |  |           v-for="(field, index) in submitterFields" |  |  |  |           v-for="(step, index) in stepFields" | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           :key="field.uuid" |  |  |  |           :key="step[0].uuid" | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |           href="#" |  |  |  |           href="#" | 
			
		
	
		
		
			
				
					
					|  |  |  |           class="inline border border-base-300 h-3 w-3 rounded-full mx-1" |  |  |  |           class="inline border border-base-300 h-3 w-3 rounded-full mx-1" | 
			
		
	
		
		
			
				
					
					|  |  |  |           :class="{ 'bg-base-200': index === currentStep, 'bg-base-content': index < currentStep, 'bg-white': index > currentStep }" |  |  |  |           :class="{ 'bg-base-200': index === currentStep, 'bg-base-content': index < currentStep, 'bg-white': index > currentStep }" | 
			
		
	
		
		
			
				
					
					|  |  |  |           @click.prevent="goToField(field, true)" |  |  |  |           @click.prevent="goToStep(step, true)" | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         /> |  |  |  |         /> | 
			
		
	
		
		
			
				
					
					|  |  |  |       </div> |  |  |  |       </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |     </div> |  |  |  |     </div> | 
			
		
	
	
		
		
			
				
					|  |  | @ -220,7 +231,7 @@ import FieldAreas from './areas' | 
			
		
	
		
		
			
				
					
					|  |  |  | import ImageStep from './image_step' |  |  |  | import ImageStep from './image_step' | 
			
		
	
		
		
			
				
					
					|  |  |  | import SignatureStep from './signature_step' |  |  |  | import SignatureStep from './signature_step' | 
			
		
	
		
		
			
				
					
					|  |  |  | import AttachmentStep from './attachment_step' |  |  |  | import AttachmentStep from './attachment_step' | 
			
		
	
		
		
			
				
					
					|  |  |  | import CheckboxStep from './checkbox_step' |  |  |  | import MultiSelectStep from './multi_select_step' | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | import FormCompleted from './completed' |  |  |  | import FormCompleted from './completed' | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | export default { |  |  |  | export default { | 
			
		
	
	
		
		
			
				
					|  |  | @ -230,7 +241,7 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |     ImageStep, |  |  |  |     ImageStep, | 
			
		
	
		
		
			
				
					
					|  |  |  |     SignatureStep, |  |  |  |     SignatureStep, | 
			
		
	
		
		
			
				
					
					|  |  |  |     AttachmentStep, |  |  |  |     AttachmentStep, | 
			
		
	
		
		
			
				
					
					|  |  |  |     CheckboxStep, |  |  |  |     MultiSelectStep, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     FormCompleted |  |  |  |     FormCompleted | 
			
		
	
		
		
			
				
					
					|  |  |  |   }, |  |  |  |   }, | 
			
		
	
		
		
			
				
					
					|  |  |  |   props: { |  |  |  |   props: { | 
			
		
	
	
		
		
			
				
					|  |  | @ -270,12 +281,28 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |   }, |  |  |  |   }, | 
			
		
	
		
		
			
				
					
					|  |  |  |   computed: { |  |  |  |   computed: { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     currentStepFields () { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       return this.stepFields[this.currentStep] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |     currentField () { |  |  |  |     currentField () { | 
			
		
	
		
		
			
				
					
					|  |  |  |       return this.submitterFields[this.currentStep] |  |  |  |       return this.currentStepFields[0] | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     }, |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |     submitterFields () { |  |  |  |     submitterFields () { | 
			
		
	
		
		
			
				
					
					|  |  |  |       return this.fields.filter((f) => f.submitter_uuid === this.submitterUuid) |  |  |  |       return this.fields.filter((f) => f.submitter_uuid === this.submitterUuid) | 
			
		
	
		
		
			
				
					
					|  |  |  |     }, |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     stepFields () { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       return this.submitterFields.reduce((acc, f) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         const prevStep = acc[acc.length - 1] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (f.type === 'checkbox' && Array.isArray(prevStep) && prevStep[0].type === 'checkbox') { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           prevStep.push(f) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           acc.push([f]) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return acc | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }, []) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |     attachmentsIndex () { |  |  |  |     attachmentsIndex () { | 
			
		
	
		
		
			
				
					
					|  |  |  |       return this.attachments.reduce((acc, a) => { |  |  |  |       return this.attachments.reduce((acc, a) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |         acc[a.uuid] = a |  |  |  |         acc[a.uuid] = a | 
			
		
	
	
		
		
			
				
					|  |  | @ -289,17 +316,17 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |   }, |  |  |  |   }, | 
			
		
	
		
		
			
				
					
					|  |  |  |   mounted () { |  |  |  |   mounted () { | 
			
		
	
		
		
			
				
					
					|  |  |  |     this.currentStep = Math.min( |  |  |  |     this.currentStep = Math.min( | 
			
		
	
		
		
			
				
					
					|  |  |  |       this.submitterFields.indexOf([...this.submitterFields].reverse().find((field) => !!this.values[field.uuid])) + 1, |  |  |  |       this.stepFields.indexOf([...this.stepFields].reverse().find((fields) => fields.some((f) => !!this.values[f.uuid]))) + 1, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       this.submitterFields.length - 1 |  |  |  |       this.stepFields.length - 1 | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     ) |  |  |  |     ) | 
			
		
	
		
		
			
				
					
					|  |  |  |   }, |  |  |  |   }, | 
			
		
	
		
		
			
				
					
					|  |  |  |   methods: { |  |  |  |   methods: { | 
			
		
	
		
		
			
				
					
					|  |  |  |     goToField (field, scrollToArea = false, clickUpload = false) { |  |  |  |     goToStep (step, scrollToArea = false, clickUpload = false) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       this.currentStep = this.submitterFields.indexOf(field) |  |  |  |       this.currentStep = this.stepFields.indexOf(step) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |       this.$nextTick(() => { |  |  |  |       this.$nextTick(() => { | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (scrollToArea) { |  |  |  |         if (scrollToArea) { | 
			
		
	
		
		
			
				
					
					|  |  |  |           this.$refs.areas.scrollIntoField(field) |  |  |  |           this.$refs.areas.scrollIntoField(step[0]) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         this.$refs.form.querySelector('input[type="date"], input[type="text"], select')?.focus() |  |  |  |         this.$refs.form.querySelector('input[type="date"], input[type="text"], select')?.focus() | 
			
		
	
	
		
		
			
				
					|  |  | @ -322,10 +349,10 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |         method: 'POST', |  |  |  |         method: 'POST', | 
			
		
	
		
		
			
				
					
					|  |  |  |         body: new FormData(this.$refs.form) |  |  |  |         body: new FormData(this.$refs.form) | 
			
		
	
		
		
			
				
					
					|  |  |  |       }).then(response => { |  |  |  |       }).then(response => { | 
			
		
	
		
		
			
				
					
					|  |  |  |         const nextField = this.submitterFields[this.currentStep + 1] |  |  |  |         const nextStep = this.stepFields[this.currentStep + 1] | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (nextField) { |  |  |  |         if (nextStep) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           this.goToField(this.submitterFields[this.currentStep + 1], true) |  |  |  |           this.goToStep(this.stepFields[this.currentStep + 1], true) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         } else { |  |  |  |         } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |           this.isCompleted = true |  |  |  |           this.isCompleted = true | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
	
		
		
			
				
					|  |  | 
 |