Skip to content
This repository was archived by the owner on Jul 27, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
224 changes: 140 additions & 84 deletions Closure_Front_End/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Closure_Front_End/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"axios": "^0.21.1",
"core-js": "^3.6.5",
"vue": "^3.0.0",
"vue-router": "^4.0.0-0"
"vue-router": "^4.0.0-0",
"vue3-chart-v2": "^0.8.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
Expand Down
20 changes: 17 additions & 3 deletions Closure_Front_End/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@
<div class="navbar-item">
<div class="buttons">
<!-- Check that the SDK client is not currently loading before accessing is methods -->
<!-- analytics -->
<router-link
v-if="$auth.isAuthenticated.value"
class="button is-small is-dark"
to="/analytics"
>
<span class="icon is-small is-right">
<i class="fas fa-chart-pie"></i>
</span>
</router-link>

<!-- settings -->
<router-link
v-if="$auth.isAuthenticated.value"
class="button is-small is-dark"
Expand All @@ -17,6 +29,7 @@
<i class="fas fa-user-cog"></i>
</span>
</router-link>

<div v-if="!$auth.loading.value">
<button
class="button is-small is-dark menu-label"
Expand Down Expand Up @@ -56,8 +69,9 @@ export default {
this.$auth
.getIdTokenClaims()
.then((response) => (this.username = response.nickname));
this.$http.get(`students/${this.username}`)
.then((response) => this.student = response);
this.$http
.get(`students/${this.username}`)
.then((response) => (this.student = response));
}
},
methods: {
Expand All @@ -68,7 +82,7 @@ export default {
// Log the user out
logout() {
this.$auth.logout({
returnTo: process.env.VUE_APP_AUTH0_REDIRECT_URI
returnTo: process.env.VUE_APP_AUTH0_REDIRECT_URI,
});
},
},
Expand Down
44 changes: 44 additions & 0 deletions Closure_Front_End/src/components/LineChart.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@


<script>
import { defineComponent } from "vue";
import { Line } from "vue3-chart-v2";

export default defineComponent({
name: "MonthlyChart",
extends: Line,
// props: {
// chartData: {
// type: Object,
// required: true
// },
// chartOptions: {
// type: Object,
// required: false
// },
// },
mounted() {
this.renderChart({
labels: [0,1, 2, 3, 4, 5, 6, 7, 8],
datasets: [
{
label: "total points",
backgroundColor: "#999999",
fill: false,
data: [0,25, 56, 70, 80, 90, 105, 125, 134],
Copy link
Owner

@ScDor ScDor Jun 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

134? What's this? (as well as all other hardcoded values)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the number of points required for completing a CS degree.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Does the order mean anything?
  2. is it hardcoded for development purposes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. no, it approximates the cummulative number of points up to the appropriate semseter
  2. it is hardcoded

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. why?

xAxisId: "semester",
options: {
scales: {
title:
{
display: true,
text : 'semester',
},
},
},
},
],
});
},
});
</script>
Loading