diff --git a/src/components/show_category.vue b/src/components/show_category.vue
index d9e03d0..79874c0 100644
--- a/src/components/show_category.vue
+++ b/src/components/show_category.vue
@@ -4,6 +4,7 @@
import { onMounted, ref, watch, defineProps } from 'vue'
import {
description,
+ comments,
currentWorkingCategory,
currentWorkingInstrument
} from '../libs/state.js'
@@ -14,6 +15,10 @@
description.value = event.target.innerText
}
+ const copyComments = (event) => {
+ comments.value = event.target.innerText
+ }
+
onMounted(()=>{
loadCategory()
window.addEventListener('keydown', (event)=>{
@@ -51,7 +56,7 @@
| {{session.description}} |
- {{session.comments}} |
+ {{session.comments}} |
-
diff --git a/src/components/timer.vue b/src/components/timer.vue
index 465ff7b..b4e1034 100644
--- a/src/components/timer.vue
+++ b/src/components/timer.vue
@@ -36,7 +36,8 @@
copiedSongs,
currentWorkingCategory,
currentWorkingInstrument,
- description
+ description,
+ comments
} from '../libs/state.js'
export default {
@@ -80,8 +81,8 @@
reqBody.songs = copiedSongs.value
}
- if(this.comments){
- reqBody.comments = this.comments
+ if(comments.value){
+ reqBody.comments = comments.value
}
axios.post(
@@ -92,7 +93,7 @@
copiedSongs.value = []
this.totalSeconds = 0;
this.savedPreviousSeconds = 0;
- this.comments = null;
+ comments.value = null;
this.secondsToSubtract = 0;
this.manualHours = 0
this.manualMinutes = 0
diff --git a/src/libs/state.js b/src/libs/state.js
index 7a6783c..fb28c29 100644
--- a/src/libs/state.js
+++ b/src/libs/state.js
@@ -5,3 +5,4 @@ export const currentWorkingInstrument = ref(null)
export const instruments = ref([])
export const categories = ref([])
export const description = ref(null)
+export const comments = ref(null)
|