diff --git a/public/app.css b/public/app.css index b6067ef..505288b 100644 --- a/public/app.css +++ b/public/app.css @@ -10,6 +10,11 @@ body { a { color:white; } + + tbody tr:nth-child(even) td, + tbody tr:nth-child(even) td a { + color:black; + } } td,th { diff --git a/src/components/show_category.vue b/src/components/show_category.vue index 788a565..cbbd08a 100644 --- a/src/components/show_category.vue +++ b/src/components/show_category.vue @@ -31,26 +31,28 @@ - - + + - - - - + - - - - +
id descriptionsecondsdurationsongs comments created atcategory idcategoryinstrument
{{session.id}} {{session.description}} {{formatSeconds(session.seconds)}} + + {{session.comments}}{{session.created_at}}{{session.category_id}}{{session.category}}{{session.instrument}}{{new Date(session.created_at).toLocaleString("en-US")}}
diff --git a/src/components/songs.vue b/src/components/songs.vue index 66bd7e4..01b9818 100644 --- a/src/components/songs.vue +++ b/src/components/songs.vue @@ -11,9 +11,9 @@ const copy = (title) => { navigator.clipboard.writeText(title); } - const paste = (title) => { - if(copiedSongs.value.indexOf(title) === -1){ - copiedSongs.value.push(title) + const paste = (song) => { + if(copiedSongs.value.findIndex(copiedSong=>copiedSong.id === song.id) === -1){ + copiedSongs.value.push(song) } } @@ -31,10 +31,12 @@ {{song.id}} - {{song.title}} + + {{song.title}} +
- + {{song.notes}} diff --git a/src/components/timer.vue b/src/components/timer.vue index 4b7966f..2314a88 100644 --- a/src/components/timer.vue +++ b/src/components/timer.vue @@ -40,7 +40,7 @@ } from '../libs/state.js' const removeSong = (song) => { - copiedSongs.value = copiedSongs.value.filter(curr => curr !== song) + copiedSongs.value = copiedSongs.value.filter(curr => curr.id !== song.id) } export default { @@ -71,13 +71,11 @@ const reqBody = { description:description.value, seconds: this.totalSeconds, - practice_category_id: currentWorkingCategory.value.id + practice_category_id: currentWorkingCategory.value.id, } - if(reqBody.description && copiedSongs.value.length > 0){ - reqBody.description += `: ${copiedSongs.value.join(', ')}` - } else if (copiedSongs.value.length > 0){ - reqBody.description = `${copiedSongs.value.join(', ')}` + if(copiedSongs.value.length > 0){ + reqBody.songs = copiedSongs.value } if(this.comments){ @@ -230,8 +228,9 @@ +