From b0fdfb9c5ac5247c758fd7ff198359782f28613e Mon Sep 17 00:00:00 2001 From: Mayank Bansal Date: Wed, 30 Aug 2023 20:34:55 +0530 Subject: [PATCH] adding dropdown to teampage --- package.json | 11 +-- src/components/Header.vue | 81 +++++++++++++++------ src/router/index.js | 15 ++-- src/views/{Profile.vue => AlumniTeam.vue} | 86 +++++++++++------------ src/views/CurrentTeam.vue | 42 +++++++++++ src/views/Project.vue | 7 +- 6 files changed, 164 insertions(+), 78 deletions(-) rename src/views/{Profile.vue => AlumniTeam.vue} (71%) create mode 100644 src/views/CurrentTeam.vue diff --git a/package.json b/package.json index 902264f..56e1378 100644 --- a/package.json +++ b/package.json @@ -3,10 +3,10 @@ "version": "0.1.0", "private": true, "scripts": { - "serve": "vue-cli-service serve", - "build": "vue-cli-service build", - "lint": "vue-cli-service lint" - }, + "serve": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve", + "build": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build", + "lint": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service lint" +}, "dependencies": { "core-js": "^3.6.4", "node-sass": "^7.0.1", @@ -42,4 +42,7 @@ "git add" ] } + } + + diff --git a/src/components/Header.vue b/src/components/Header.vue index d0bccfd..f93677a 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -1,30 +1,51 @@ diff --git a/src/router/index.js b/src/router/index.js index 21e9211..e550a47 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,6 +1,5 @@ import Vue from "vue"; import VueRouter from "vue-router"; - Vue.use(VueRouter); const routes = [ @@ -47,16 +46,22 @@ const routes = [ meta: { title: "Podcast" } }, { - path: "/team", - name: "Team", - component: () => import("../views/Profile"), - meta: { title: "Team" } + path: "/current_team", + name: "current_team", + component: () => import("../views/CurrentTeam"), // Replace "../views/Profile" with the path to the component for the current team + meta: { title: "Current Team" } }, { path: "/WoC", name: "WoC", component: () => import("../views/WoC"), meta: { title: "WoC" } + }, + { + path: "/alumni_team", + name: "alumni_team", + component: () => import("../views/AlumniTeam"), // Add the route for the AlumniTeam component + meta: { title: "Alumni Team" } } ]; diff --git a/src/views/Profile.vue b/src/views/AlumniTeam.vue similarity index 71% rename from src/views/Profile.vue rename to src/views/AlumniTeam.vue index b0fdf77..b295060 100644 --- a/src/views/Profile.vue +++ b/src/views/AlumniTeam.vue @@ -1,44 +1,42 @@ - - - - + + + + diff --git a/src/views/CurrentTeam.vue b/src/views/CurrentTeam.vue new file mode 100644 index 0000000..3e4c8ad --- /dev/null +++ b/src/views/CurrentTeam.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/Project.vue b/src/views/Project.vue index f61d2ee..ee8b786 100644 --- a/src/views/Project.vue +++ b/src/views/Project.vue @@ -23,16 +23,13 @@ export default { }), methods: { fetchProjects() { - const spreadsheetId = "1gEG08lGpzhtVYzmjyOuYF5qlTFAWhvR2FeAuQlIlIuY"; - const theKey = process.env.VUE_APP_API; - const sheetname = "Project"; - const url = `https://sheets.googleapis.com/v4/spreadsheets/${spreadsheetId}/values/${sheetname}?key=${theKey}`; + const url = `https://script.google.com/macros/s/AKfycbxsb_2WN21NJ4p_yEVS8DoCIcs-3lL9VlB5zgbGXeEhfERHkjkIcFOTvkhw1m69irgH7g/exec`; this.loading = true; fetch(url) .then(e => e.json().then(e => { console.log(e); - this.projects = [...e.values.slice(1)]; + this.projects = e; }) ) .finally(() => (this.loading = false));