click to duplicate comments

main
Matthew Huntington 3 months ago
parent 3e619cb27f
commit 19d7a922c0

@ -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 @@
<tbody>
<tr v-for="session in categorySessions">
<td @click="copy">{{session.description}}</td>
<td>{{session.comments}}</td>
<td @click="copyComments">{{session.comments}}</td>
<td>
<ul>
<li v-for="song in session.songs">

@ -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

@ -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)

Loading…
Cancel
Save