Skip to content

Commit

Permalink
Merge pull request #91 from Bansal0527/vue
Browse files Browse the repository at this point in the history
Sorting the data of Current Team page
  • Loading branch information
yuvrajrathva authored Sep 14, 2023
2 parents b09874b + 68e7127 commit 3243784
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 16 deletions.
10 changes: 5 additions & 5 deletions src/components/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
v-card.elevation-24
v-footer(color="basic" padless)
v-row(justify="center" no-gutters)
v-btn.mt-1.px-6(v-for="link in links" :key="link" :href="link.href" color="white" icon)
v-btn.mt-1.px-6(v-for="link in links" :key="link.href" :href="link.href" color="white" icon)
v-icon(size='30') {{link.icon}}
v-col.mt-n2.text-center(cols="12")
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
v-col.mt-n6.text-center.white--text(cols="12") © Copyright {{ new Date().getFullYear() }} Devlup Labs
</template>
<script>
import form from "../views/AboutUs.vue";
// import form from "../views/AboutUs.vue";
export default {
data() {
Expand Down Expand Up @@ -41,10 +41,10 @@ export default {
this.clicked = true;
this.scrollform();
}
},
components: {
form: form
}
// components: {
// form: form
// }
};
</script>
<style scoped>
Expand Down
9 changes: 6 additions & 3 deletions src/components/Header.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template lang="pug">
v-card.elevation-24
v-card.elevation-24
v-app-bar(app clipped-right flat floating style="opacity: 1.0")
v-app-bar-nav-icon.hidden-md-and-up(@click.stop="drawer = !drawer")
router-link(to='/')
Expand All @@ -14,7 +14,7 @@
v-btn#menu-activator(pa-2.ma-1 :key="team" style="box-shadow : none") Team
v-menu(activator='#menu-activator')
v-list
v-list-item(pa-2.ma-1 v-for='(item, index) in teams', :key='index', :value='index' :to="{name: item.link}")
v-list-item(pa-2.ma-1 v-for='item in teams', :key='item.text', :value='item.text' :to="{name: item.link}")
v-list-item-title {{ item.text }}

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


Expand Down Expand Up @@ -78,6 +78,9 @@ export default {
{ text: "Alumni Team", icon: "mdi-human-male-male" }
];
}
},
methods: {
team() {}
}
};
</script>
Expand Down
4 changes: 2 additions & 2 deletions src/views/AlumniTeam.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ export default {
fetch(url)
.then(e =>
e.json().then(e => {
console.log(e);
// console.log(e);
this.profiles = e;
console.log(this.profiles);
// console.log(this.profiles);
})
)
.finally(() => (this.loading = false));
Expand Down
18 changes: 16 additions & 2 deletions src/views/CurrentTeam.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,42 @@ div(align='center', justify='center')
<script>
const ProfileCard = () => import("../components/ProfileCard");
const Preloader = () => import("../components/Preloader");

const sortingObject = {
"Final Year": 1,
"Pre-Final Year": 2
};
export default {
name: "Profile",
components: { ProfileCard, Preloader },
data: () => ({
loading: true,
profiles: []
}),

methods: {
sortedProfiles() {
return this.profiles.slice().sort((a, b) => {
const rankA = sortingObject[a.currentDesignation];
const rankB = sortingObject[b.currentDesignation];
return rankA - rankB;
});
},

fetchProfiles() {
const url = `https://script.google.com/macros/s/AKfycbxOcYZanZnaQb_FDGvXC4FgDcIiZQXrVaCsSfufX2qYnvOIPDmlXMY7orw2xIlm-BxX/exec`;
this.loading = true;
fetch(url)
.then(e =>
e.json().then(e => {
console.log(e);
this.profiles = e;
console.log(this.profiles);
this.profiles = this.sortedProfiles();
})
)
.finally(() => (this.loading = false));
}
},

mounted() {
this.fetchProfiles();
}
Expand Down
6 changes: 3 additions & 3 deletions src/views/Project.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!-- Project[0]-> Project index -->

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

ProjectCard(:Project='Project')
Expand All @@ -28,7 +28,7 @@ export default {
fetch(url)
.then(e =>
e.json().then(e => {
console.log(e);
// console.log(e);
this.projects = e;
})
)
Expand Down
2 changes: 1 addition & 1 deletion src/views/WoC.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default {
fetch(url)
.then(e =>
e.json().then(e => {
console.log(e);
// console.log(e);
this.wocs = [...e.values.slice(1)];
})
)
Expand Down

0 comments on commit 3243784

Please sign in to comment.