|
|
|
|
@ -46,6 +46,7 @@
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
submitting:false,
|
|
|
|
|
startTime:0,
|
|
|
|
|
savedPreviousSeconds:0,
|
|
|
|
|
totalSeconds:0,
|
|
|
|
|
@ -68,6 +69,11 @@
|
|
|
|
|
formatSeconds,
|
|
|
|
|
submit(event){
|
|
|
|
|
event.preventDefault();
|
|
|
|
|
if(this.submitting){
|
|
|
|
|
return
|
|
|
|
|
} else {
|
|
|
|
|
this.submitting = true
|
|
|
|
|
}
|
|
|
|
|
const reqBody = {
|
|
|
|
|
description:description.value,
|
|
|
|
|
seconds: this.totalSeconds,
|
|
|
|
|
@ -97,6 +103,9 @@
|
|
|
|
|
this.manualSeconds = 0
|
|
|
|
|
window.localStorage.setItem('lastTotalSeconds', this.totalSeconds);
|
|
|
|
|
this.$emit('loggedTime', reqBody)
|
|
|
|
|
this.submitting = false
|
|
|
|
|
},()=>{
|
|
|
|
|
this.submitting = false
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
@ -238,7 +247,7 @@
|
|
|
|
|
|
|
|
|
|
<label>Practice Category</label>
|
|
|
|
|
<CategoryChooser />
|
|
|
|
|
<input type="submit"/>
|
|
|
|
|
<input :disabled="submitting" type="submit"/>
|
|
|
|
|
|
|
|
|
|
<label>Comments</label>
|
|
|
|
|
<textarea v-model="comments"/>
|
|
|
|
|
|