Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions components/profile/c_info_card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<v-layout wrap>
<v-flex xs12 md12 class="pa-0 ma-0">
<v-card class="mx-auto" raised height="480">
<v-img :src="placeholder" :lazy-src="placeholder" aspect-ratio="1" class="grey lighten-2" height="400"
max-height="400">
<v-img :src="placeholder" :lazy-src="placeholder" aspect-ratio="1" class="grey lighten-2" height="250"
max-height="300">
<template v-slot:placeholder>
<v-row class="fill-height ma-0" align="center" justify="center">
<v-progress-circular indeterminate color="grey lighten-5"></v-progress-circular>
Expand All @@ -26,7 +26,7 @@
<v-type-divider type="Info"></v-type-divider>
</v-flex>
<v-flex xs12 md12 class="ma-0 pa-0">
<v-address-card :address="address"></v-address-card>
<v-address-card :address="address">{{userdata.address}}</v-address-card>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @MexinaD v-address-card is a custom component defined in components and registered to c_cards as child component of c_card_info with name v-address-card.

Since it is a custom component and child of another component, In vue we can only pass data to a child component by using props and not Interpolation

The address component will expect address of type Object. So we should pass it as :address="ADDRESS_OBJECT"

</v-flex>

<v-flex xs12 md12 class="ma-0 pa-0">
Expand Down Expand Up @@ -60,14 +60,14 @@
</v-row>
</div>
</v-flex>

<!--
<v-flex xs12 md12 class="ma-0 pa-0">
<v-address-card :address="address1"></v-address-card>
</v-flex>
<v-flex xs12 md12 class="ma-0 pa-0">
<v-address-card :address="address2"></v-address-card>
</v-flex>

-->
</v-layout>
</v-container>
</v-flex>
Expand All @@ -90,8 +90,8 @@
</span>
</v-col>
<v-col>
<span class="font-weight-light text-caption">
<v-icon>mdi-map-marker</v-icon>New York, NY
<span class="font-weight-light text-captain">
<v-icon>mdi-map-marker</v-icon>{{ userdata.address }}
</span>
</v-col>
</v-row>
Expand Down Expand Up @@ -329,7 +329,7 @@
</v-flex>

<v-flex xs12 md8>
<v-text-field v-model="address" :label="$t('label.heading.addressline')" placeholder="Snow Rock PI"
<v-text-field v-model="userdata.address" :label="$t('label.heading.addressline')" placeholder="Snow Rock PI"
class="purple-input" />
</v-flex>
<v-flex xs12 md4>
Expand Down Expand Up @@ -359,7 +359,7 @@
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="blue darken-1" text @click="dialog = false">
<v-btn color="blue darken-1" text @click="dialog4 = false">
Close
</v-btn>
<v-btn color="blue darken-1" text @click.stop="dialog5 = true">
Expand Down Expand Up @@ -430,7 +430,7 @@
<v-card-actions>
<v-spacer></v-spacer>

<v-btn style="text-transform: capitalize" color="green darken-1" outlined small @click="dialog = false">{{
<v-btn style="text-transform: capitalize" color="green darken-1" outlined small @click="dialog5 = false">{{
$t('label.button.btnDisagree')
}}</v-btn>

Expand Down
1 change: 1 addition & 0 deletions static/js/c_card.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export default {
if (this.userdata.picture == null) {
delete this.userdata.picture;
this.dialog5 = false;
this.dialog4 = false;
this.$store.dispatch("updateProfile", this.userdata);
}
},
Expand Down
5 changes: 4 additions & 1 deletion static/js/profile.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { toISOString } from "core-js/core/date";

export default {
data: () => ({
valid: false,
Expand Down Expand Up @@ -57,7 +59,8 @@ export default {
updateProfileWithCreadentials() {
if (this.userdata.picture == null) {
delete this.userdata.picture;
this.dialog = false;
this.dialog5 = false;
this.dialog4 = false;
this.$store.dispatch('updateProfile', this.userdata);
}

Expand Down
4 changes: 2 additions & 2 deletions static/locales/content-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@
"btnhome": "Home",
"btnsave": "Save",
"btnFollow": "Follow",
"btnupdateprofile": "updateprofile",
"btnupdateprofile": "Update Profile",
"btnsubmit": "Submit",
"btnSearch": "Search",
"btnSave": "Save",
"btnNo": "No",
"btnDisagree": "I Dis Agree",
"btnDisagree": "I Disagree",
"btnAgree": "I Agree"
},
"message": {
Expand Down
2 changes: 1 addition & 1 deletion static/locales/content-sw.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"btnhome": "Mwanzo",
"btnsave": "Hifadhi",
"btnNo": "Hapana",
"btnupdateprofile": "sasisha wasifu",
"btnupdateprofile": "Sasisha Wasifu",
"btnFollow": "Fuata",
"btnclear": "Futa",
"btnsubmit": "Wasilisha",
Expand Down