File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 3232 <span class =" label" > Deadline: </span >
3333 <datepicker v-model =" date" :bootstrap-styling =" true" ></datepicker >
3434 </div >
35- <button :disabled =" !submitEnabled" @click =" createGrades" >
36- Generate Grades
35+ <button :disabled =" !submitEnabled || isGeneratingGrades " @click =" createGrades" >
36+ {{isGeneratingGrades ? 'Generating...' : ' Generate Grades'}}
3737 </button >
3838 </div >
3939 </div >
6060 sources: [],
6161 selectedGrading: null ,
6262 selectedSource: null ,
63+ isGeneratingGrades: false ,
6364 date: new Date () // TODO: default to the assignment due date instead
6465 }
6566 },
106107 },
107108 methods: {
108109 createGrades : function () {
110+ this .isGeneratingGrades = true
109111 const url = this .sources [this .selectedSource ].id === ' OVERALL' ? ' /api/grades/all' : ' /api/grades/grades'
110112 const token = localStorage .getItem (" nb.user" );
111113 const course = JSON .parse (localStorage .getItem (' nb.current.course' ))
136138 hiddenElement .target = ' _blank' ;
137139 hiddenElement .download = ' grades.csv' ;
138140 hiddenElement .click ();
141+ this .isGeneratingGrades = false
139142 })
140143 }
141144 },
You can’t perform that action at this time.
0 commit comments