|
|
|
|
@ -18,10 +18,20 @@
|
|
|
|
|
methods: {
|
|
|
|
|
submit(event){
|
|
|
|
|
event.preventDefault();
|
|
|
|
|
console.log(this.description);
|
|
|
|
|
console.log(this.seconds);
|
|
|
|
|
console.log(this.comments);
|
|
|
|
|
console.log(this.practice_category_id);
|
|
|
|
|
const reqBody = {
|
|
|
|
|
description:this.description,
|
|
|
|
|
seconds: this.totalSeconds,
|
|
|
|
|
practice_category_id: this.practice_category_id
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(this.comments){
|
|
|
|
|
reqBody.comments = this.comments
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
axios.post(
|
|
|
|
|
import.meta.env.VITE_PRACTICE_TRACKER_API_URL+'sessions',
|
|
|
|
|
reqBody
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
start(event){
|
|
|
|
|
this.startTime = Date.now();
|
|
|
|
|
|