Skip to content

Commit 3243784

Browse files
authored
Merge pull request #91 from Bansal0527/vue
Sorting the data of Current Team page
2 parents b09874b + 68e7127 commit 3243784

File tree

6 files changed

+33
-16
lines changed

6 files changed

+33
-16
lines changed

src/components/Footer.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
v-card.elevation-24
33
v-footer(color="basic" padless)
44
v-row(justify="center" no-gutters)
5-
v-btn.mt-1.px-6(v-for="link in links" :key="link" :href="link.href" color="white" icon)
5+
v-btn.mt-1.px-6(v-for="link in links" :key="link.href" :href="link.href" color="white" icon)
66
v-icon(size='30') {{link.icon}}
77
v-col.mt-n2.text-center(cols="12")
88
v-btn.text-center.white--text.font-weight-bold.blue.darken-2.round(to='./about' text='' plain='' justify='center' color='white' @click="viewform" ) Contact Us
99
v-col.mt-n6.text-center.white--text(cols="12") © Copyright {{ new Date().getFullYear() }} Devlup Labs
1010
</template>
1111
<script>
12-
import form from "../views/AboutUs.vue";
12+
// import form from "../views/AboutUs.vue";
1313
1414
export default {
1515
data() {
@@ -41,10 +41,10 @@ export default {
4141
this.clicked = true;
4242
this.scrollform();
4343
}
44-
},
45-
components: {
46-
form: form
4744
}
45+
// components: {
46+
// form: form
47+
// }
4848
};
4949
</script>
5050
<style scoped>

src/components/Header.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template lang="pug">
2-
v-card.elevation-24
2+
v-card.elevation-24
33
v-app-bar(app clipped-right flat floating style="opacity: 1.0")
44
v-app-bar-nav-icon.hidden-md-and-up(@click.stop="drawer = !drawer")
55
router-link(to='/')
@@ -14,7 +14,7 @@
1414
v-btn#menu-activator(pa-2.ma-1 :key="team" style="box-shadow : none") Team
1515
v-menu(activator='#menu-activator')
1616
v-list
17-
v-list-item(pa-2.ma-1 v-for='(item, index) in teams', :key='index', :value='index' :to="{name: item.link}")
17+
v-list-item(pa-2.ma-1 v-for='item in teams', :key='item.text', :value='item.text' :to="{name: item.link}")
1818
v-list-item-title {{ item.text }}
1919

2020
v-navigation-drawer(v-model="drawer" app left temporary style="z-index: 5")
@@ -33,7 +33,7 @@
3333
v-list-item-content(v-on="on")
3434
v-list-item-title.grey--text Team
3535
v-list
36-
v-list-item(v-for='(item, index) in teams', :key='index', :value='index' :to="{name: item.link}")
36+
v-list-item(v-for='item in teams', :key='item.text', :value='item.text' :to="{name: item.link}")
3737
v-list-item-title {{ item.text }}
3838

3939

@@ -78,6 +78,9 @@ export default {
7878
{ text: "Alumni Team", icon: "mdi-human-male-male" }
7979
];
8080
}
81+
},
82+
methods: {
83+
team() {}
8184
}
8285
};
8386
</script>

src/views/AlumniTeam.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ export default {
2727
fetch(url)
2828
.then(e =>
2929
e.json().then(e => {
30-
console.log(e);
30+
// console.log(e);
3131
this.profiles = e;
32-
console.log(this.profiles);
32+
// console.log(this.profiles);
3333
})
3434
)
3535
.finally(() => (this.loading = false));

src/views/CurrentTeam.vue

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,42 @@ div(align='center', justify='center')
1313
<script>
1414
const ProfileCard = () => import("../components/ProfileCard");
1515
const Preloader = () => import("../components/Preloader");
16+
17+
const sortingObject = {
18+
"Final Year": 1,
19+
"Pre-Final Year": 2
20+
};
1621
export default {
1722
name: "Profile",
1823
components: { ProfileCard, Preloader },
1924
data: () => ({
2025
loading: true,
2126
profiles: []
2227
}),
28+
2329
methods: {
30+
sortedProfiles() {
31+
return this.profiles.slice().sort((a, b) => {
32+
const rankA = sortingObject[a.currentDesignation];
33+
const rankB = sortingObject[b.currentDesignation];
34+
return rankA - rankB;
35+
});
36+
},
37+
2438
fetchProfiles() {
2539
const url = `https://script.google.com/macros/s/AKfycbxOcYZanZnaQb_FDGvXC4FgDcIiZQXrVaCsSfufX2qYnvOIPDmlXMY7orw2xIlm-BxX/exec`;
2640
this.loading = true;
2741
fetch(url)
2842
.then(e =>
2943
e.json().then(e => {
30-
console.log(e);
3144
this.profiles = e;
32-
console.log(this.profiles);
45+
this.profiles = this.sortedProfiles();
3346
})
3447
)
3548
.finally(() => (this.loading = false));
3649
}
3750
},
51+
3852
mounted() {
3953
this.fetchProfiles();
4054
}

src/views/Project.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<!-- Project[0]-> Project index -->
22

33
<template lang="pug">
4-
div(align='center', justify='center')
4+
div(align='center')
55
div(v-if="loading")
66
Preloader
77
div(v-else)
88
v-container
9-
v-row(justify='left')
9+
v-row
1010
v-flex.mb-6(v-for='Project in projects', :key='Project[0]', xs12='',sm12='', md6='',lg4='',xl4='')
1111

1212
ProjectCard(:Project='Project')
@@ -28,7 +28,7 @@ export default {
2828
fetch(url)
2929
.then(e =>
3030
e.json().then(e => {
31-
console.log(e);
31+
// console.log(e);
3232
this.projects = e;
3333
})
3434
)

src/views/WoC.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default {
3636
fetch(url)
3737
.then(e =>
3838
e.json().then(e => {
39-
console.log(e);
39+
// console.log(e);
4040
this.wocs = [...e.values.slice(1)];
4141
})
4242
)

0 commit comments

Comments
 (0)