Skip to content
Snippets Groups Projects
Commit 3d6e549f authored by Michale Friedrich's avatar Michale Friedrich
Browse files

Register Form Cleanup

parent 7f95c18c
No related branches found
No related tags found
1 merge request!7Integration
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
<br> <br>
<h2>Income Sources</h2> <h2>Income Sources</h2>
<p>Does the student receive unemployemnt benefits?</p> <p>Does the student receive unemployemnt benefits?</p>
<input type="radio" id="yes" value="yes" name="unemployementBenefit" v-model="unemploymentBenefit" required> <input type="radio" id="yes" value="yes" name="unemployementBenefit" v-model="unemployementBenefit" required>
<label for="yes">Yes</label> <label for="yes">Yes</label>
<br> <br>
<input type="radio" id="no" value="no" name="unemploymentBenefit" v-model="unemploymentBenefit" required> <input type="radio" id="no" value="no" name="unemployementBenefit" v-model="unemployementBenefit" required>
<label for="no">no</label> <label for="no">No</label>
<br> <br>
<p>Does the student receive any of the following? (check as many as apply):</p> <p>Does the student receive any of the following? (check as many as apply):</p>
<input type="checkbox" id="social_security" value="social_security" v-model="studentBenefits"> <input type="checkbox" id="social_security" value="social_security" v-model="studentBenefits">
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<button @click.prevent="addMember">Add Household Member</button> <button @click.prevent="addMember">Add Household Member</button>
<br> <br>
<div class="household" v-for="(member,counter) in household" v-bind:key="counter"> <div class="household" v-for="(member,counter) in household" v-bind:key="counter">
<span @click.prevent="deleteMember(counter)"></span> <span @click.prevent="deleteMember(counter)">[Click to delete]</span>
<br> <br>
<label for="age">Age of household member:</label> <label for="age">Age of household member:</label>
<select name="age" v-model="member.age"> <select name="age" v-model="member.age">
...@@ -79,7 +79,7 @@ export default { ...@@ -79,7 +79,7 @@ export default {
return { return {
campusStatus: '', campusStatus: '',
zipCode: '', zipCode: '',
unemploymentBenefit: '', unemployementBenefit: '',
studentBenefits: [], studentBenefits: [],
assistance: [], assistance: [],
household: [{ household: [{
...@@ -88,15 +88,18 @@ export default { ...@@ -88,15 +88,18 @@ export default {
} }
}, },
methods: { methods: {
// Send Guest Information to Backend
async submitForm(){ async submitForm(){
let newGuestInfo = { campusStatus: this.campusStatus, zipCode: this.zipCode, householdStatus: this.householdStatus, studentAge: this.studentAge, employmentStatus: this.employmentStatus, studentBenefits: this.studentBenifets, snapAssistance: this.snapAssistance, pounds: this.pounds}; let newGuestInfo = { campusStatus: this.campusStatus, zipCode: this.zipCode, householdStatus: this.householdStatus, studentAge: this.studentAge, employmentStatus: this.employmentStatus, studentBenefits: this.studentBenifets, snapAssistance: this.snapAssistance, pounds: this.pounds};
axios.post("http://localhost:10001/v0", newGuestInfo); axios.post("http://localhost:10001/v0", newGuestInfo);
}, },
// Add household memeber to household array
addMember() { addMember() {
this.household.push({ this.household.push({
age: '' age: ''
}) })
}, },
// Delete household memeber from household memebr array
deleteMember(counter){ deleteMember(counter){
this.household.splice(counter, 1); this.household.splice(counter, 1);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment