4444 v-bind:type =" 'password'"
4545 v-bind:currentValuePassed =" ''" ></AccountInput >
4646 </section >
47+ <section v-if =" getShow === 'profile'" class =" profile-section flex flex-col items-start z-10 absolute bg-white-matcha px-8 pb-4 w-full top-0 left-0 h-screen md:ml-4 md:relative md:shadow-md md:rounded-md" >
48+ <SectionHeader v-bind:name =" 'profile'" v-on:click.native =" closeSetting()" ></SectionHeader >
49+ <div >
50+ <h1 class =" inline-block mr-4" >I am</h1 >
51+ <DropdownDisplayChoice
52+ class =" inline-block"
53+ v-on:saveSingleChoice =" saveSingleChoice"
54+ v-bind:name =" 'gender'"
55+ v-bind:starting-option =" this.$store.getters.getLoggedInUser.gender"
56+ v-bind:options =" ['male', 'female', 'other']" ></DropdownDisplayChoice >
57+ </div >
58+ <div class =" mt-4" >
59+ <h1 class =" inline-block mr-4" >Sexuality</h1 >
60+ <DropdownDisplayChoice
61+ class =" inline-block"
62+ v-on:saveSingleChoice =" saveSingleChoice"
63+ v-bind:name =" 'gender'"
64+ v-bind:starting-option =" this.$store.getters.getLoggedInUser.orientation"
65+ v-bind:options =" ['heterosexual', 'homosexual', 'bisexual', 'other']" ></DropdownDisplayChoice >
66+ </div >
67+ <div class =" mt-4" >
68+ <h1 class =" inline-block mr-3" >Interests</h1 >
69+ <DropdownDisplayChoices
70+ class =" inline-block"
71+ v-bind:options =" [
72+ 'swimming', 'wine', 'reading', 'foodie', 'netflix', 'music', 'yoga', 'golf',
73+ 'photography', 'baking', 'shopping', 'outdoors', 'art', 'travel', 'hiking',
74+ 'running', 'volunteering', 'cycling', 'climbing', 'tea', 'fishing', 'soccer',
75+ 'museum', 'dancing', 'surfing', 'karaoke', 'parties', 'diy',
76+ 'walking', 'cat lover', 'movies', 'gardening', 'trivia', 'working out',
77+ 'cooking', 'gamer', 'brunch', 'blogging', 'picknicking', 'athlete',
78+ 'dog lover', 'politics', 'environmentalism', 'instagram', 'spirituality',
79+ 'language exchange', 'sports', 'comedy', 'fashion', 'disney', 'vlogging',
80+ 'astrology', 'board games', 'craft beer', 'coffee', 'writer',
81+ ]"
82+ v-bind:startingOptions =" userInterests"
83+ v-bind:min =" 3"
84+ v-bind:max =" 10"
85+ v-bind:name =" 'interests'"
86+ v-on:saveMultipleChoice =" saveMultipleChoice" ></DropdownDisplayChoices >
87+ </div >
88+ <div class =" mt-4" >
89+ <AccountInput
90+ v-bind:name =" 'Bio'"
91+ v-bind:type =" 'bio'"
92+ v-bind:currentValuePassed =" this.$store.getters.getLoggedInUser.bio" ></AccountInput >
93+ </div >
94+ </section >
4795 </div >
4896 </div >
4997</template >
5098
5199<script >
100+ /* eslint-disable prefer-destructuring */
52101import NavBar from ' @/components/shared/NavBar.vue' ;
53102import MenuButton from ' @/components/app/settings/MenuButton.vue' ;
54103import SectionHeader from ' @/components/app/settings/SectionHeader.vue' ;
55104import AccountInput from ' @/components/app/settings/AccountInput.vue' ;
105+ import DropdownDisplayChoice from ' @/components/shared/DropdownDisplayChoice.vue' ;
106+ import DropdownDisplayChoices from ' @/components/shared/DropdownDisplayChoices.vue' ;
56107import imageMan from ' ../../assets/recommendations/avatars/man1.png' ;
57108import imageWoman from ' ../../assets/recommendations/avatars/woman1.png' ;
58109import imageOther from ' ../../assets/recommendations/avatars/other.png' ;
@@ -63,9 +114,11 @@ export default {
63114 MenuButton,
64115 AccountInput,
65116 SectionHeader,
117+ DropdownDisplayChoice,
118+ DropdownDisplayChoices,
66119 },
67120 data : () => ({
68- userInfo : {} ,
121+ userInterests : [] ,
69122 show: ' ' ,
70123 }),
71124 computed: {
@@ -74,6 +127,18 @@ export default {
74127 },
75128 },
76129 methods: {
130+ saveSingleChoice (... args ) {
131+ const [key , value ] = args;
132+ if (key === ' gender' ) {
133+ console .log (value);
134+ }
135+ },
136+ saveMultipleChoice (... args ) {
137+ const [key , value ] = args;
138+ if (key === ' interests' ) {
139+ console .log (value);
140+ }
141+ },
77142 showSetting (setting ) {
78143 this .show = setting;
79144 },
@@ -94,8 +159,10 @@ export default {
94159 },
95160 },
96161 beforeMount () {
97- console .log (this .$store .getters .getLoggedInUser );
98- // const userInfoRequest = this.$http.get();
162+ const tags = this .$store .getters .getLoggedInUser .tags ;
163+ for (let i = 0 ; i < tags .length ; i += 1 ) {
164+ this .userInterests .push (tags[i].name );
165+ }
99166 },
100167};
101168 </script >
0 commit comments