-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7f14e5d
commit b0fdfb9
Showing
6 changed files
with
164 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,42 @@ | ||
<!-- Profile[0]->Profile index --> | ||
<template lang="pug"> | ||
div(align='center', justify='center') | ||
div(v-if="loading") | ||
Preloader | ||
div(v-else) | ||
v-container | ||
v-row(justify='left') | ||
v-flex.mb-10(v-for='Profile in profiles', :key='Profile[0]', xs12='',sm12='', md6='',lg4='',xl4='') | ||
ProfileCard(:Profile='Profile') | ||
</template> | ||
|
||
<script> | ||
const ProfileCard = () => import("../components/ProfileCard"); | ||
const Preloader = () => import("../components/Preloader"); | ||
export default { | ||
name: "Profile", | ||
components: { ProfileCard, Preloader }, | ||
data: () => ({ | ||
loading: true, | ||
profiles: [] | ||
}), | ||
methods: { | ||
fetchProfiles() { | ||
const spreadsheetId = "1gEG08lGpzhtVYzmjyOuYF5qlTFAWhvR2FeAuQlIlIuY"; | ||
const sheetname = "Profile"; | ||
const theKey = process.env.VUE_APP_API; | ||
const url = `https://sheets.googleapis.com/v4/spreadsheets/${spreadsheetId}/values/${sheetname}?alt=json&key=${theKey}`; | ||
this.loading = true; | ||
fetch(url) | ||
.then(e => | ||
e.json().then(e => { | ||
this.profiles = [...e.values.slice(1)]; | ||
console.log(this.profiles); | ||
}) | ||
) | ||
.finally(() => (this.loading = false)); | ||
} | ||
}, | ||
mounted() { | ||
this.fetchProfiles(); | ||
} | ||
}; | ||
</script> | ||
<!-- Profile[0]->Profile index --> | ||
<template lang="pug"> | ||
div(align='center', justify='center') | ||
div(v-if="loading") | ||
Preloader | ||
div(v-else) | ||
v-container | ||
v-row(justify='left') | ||
v-flex.mb-10(v-for='Profile in profiles', :key='Profile[0]', xs12='',sm12='', md6='',lg4='',xl4='') | ||
ProfileCard(:Profile='Profile') | ||
</template> | ||
|
||
<script> | ||
const ProfileCard = () => import("../components/ProfileCard"); | ||
const Preloader = () => import("../components/Preloader"); | ||
export default { | ||
name: "Profile", | ||
components: { ProfileCard, Preloader }, | ||
data: () => ({ | ||
loading: true, | ||
profiles: [] | ||
}), | ||
methods: { | ||
fetchProfiles() { | ||
const url = `https://script.google.com/macros/s/AKfycbwprDq5bguYad1gsfCLxbWxM1YXZfVlWiXYK1WCbrPj5WO8JbxjqSbnieVIoosOgMbVMA/exec`; | ||
this.loading = true; | ||
fetch(url) | ||
.then(e => | ||
e.json().then(e => { | ||
console.log(e); | ||
this.profiles = e; | ||
console.log(this.profiles); | ||
}) | ||
) | ||
.finally(() => (this.loading = false)); | ||
} | ||
}, | ||
mounted() { | ||
this.fetchProfiles(); | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!-- Profile[0]->Profile index --> | ||
<template lang="pug"> | ||
div(align='center', justify='center') | ||
div(v-if="loading") | ||
Preloader | ||
div(v-else) | ||
v-container | ||
v-row(justify='left') | ||
v-flex.mb-10(v-for='Profile in profiles', :key='Profile[0]', xs12='',sm12='', md6='',lg4='',xl4='') | ||
ProfileCard(:Profile='Profile') | ||
</template> | ||
|
||
<script> | ||
const ProfileCard = () => import("../components/ProfileCard"); | ||
const Preloader = () => import("../components/Preloader"); | ||
export default { | ||
name: "Profile", | ||
components: { ProfileCard, Preloader }, | ||
data: () => ({ | ||
loading: true, | ||
profiles: [] | ||
}), | ||
methods: { | ||
fetchProfiles() { | ||
const url = `https://script.google.com/macros/s/AKfycbwprDq5bguYad1gsfCLxbWxM1YXZfVlWiXYK1WCbrPj5WO8JbxjqSbnieVIoosOgMbVMA/exec`; | ||
this.loading = true; | ||
fetch(url) | ||
.then(e => | ||
e.json().then(e => { | ||
console.log(e); | ||
this.profiles = e; | ||
console.log(this.profiles); | ||
}) | ||
) | ||
.finally(() => (this.loading = false)); | ||
} | ||
}, | ||
mounted() { | ||
this.fetchProfiles(); | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters