Skip to content

Commit

Permalink
Features Event Component Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
vrijraj committed Apr 14, 2020
1 parent 101b868 commit 17d48f1
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions src/components/Events/FeaturesEvents/FeatureEvents.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,14 @@
</v-col>
</v-row>
<v-row class="my-0 pa-0" v-else-if="featureEvendsID.length>0">
<v-col class="my-0" md="3" lg="3" sm="3" cols="6" v-for="(item,i) in featureEvendsID" :key="i">
<div v-for="(itemp, k) in eventsData" :key="k" class="pa-0 ma-0">
<div v-if="itemp.id == item" class="pa-0 ma-0">
<div
style="cursor: pointer;border-left:8px solid #5AB55E"
class="pa-2 ma-0 lightModeCard"
@click="goToEventDetails(itemp.id)">
<p class="google-font ma-0 mt-0" style="font-size:120%;" >{{itemp.name | summary(8) }}</p>
<p class="google-font mt-0 mb-0" style="font-size:90%;">{{itemp.date}}</p>
<p class="google-font mt-0 mb-0" style="font-size:90%;">{{itemp.venue.name | summary(15) }}</p>
</div>
</div>
<v-col class="my-0" md="3" lg="3" sm="3" cols="6" v-for="(item,i) in featureEvendsData" :key="i">
<div
style="cursor: pointer;border-left:8px solid #5AB55E"
class="pa-2 ma-0 lightModeCard"
@click="goToEventDetails(item.id)">
<p class="google-font ma-0 mt-0" style="font-size:120%;" >{{item.name | summary(8) }}</p>
<p class="google-font mt-0 mb-0" style="font-size:90%;">{{item.date}}</p>
<p class="google-font mt-0 mb-0" style="font-size:90%;">{{item.venue.name | summary(15) }}</p>
</div>
</v-col>

Expand Down Expand Up @@ -78,7 +74,8 @@ export default {
showNetworkError:false,
featureEvendsID:[],
featureEvends:[],
eventsData:[]
eventsData:[],
featureEvendsData:[]
}),
mounted(){
Expand Down Expand Up @@ -123,6 +120,7 @@ export default {
this.showNetworkError = false
this.loader = true
this.eventsData = []
this.featureEvendsData = []
firebase.firestore
.collection("events")
.get()
Expand All @@ -131,6 +129,14 @@ export default {
this.eventsData.push(doc.data());
});
this.loader = false
this.featureEvendsID.map(res=>{
this.eventsData.map(obj=>{
if(obj.id == res){
this.featureEvendsData.push(obj)
}
})
})
})
.catch(err => {
this.loader = false
Expand Down

0 comments on commit 17d48f1

Please sign in to comment.