show category for practice session just logged

practiced-songs
Matthew Huntington 1 year ago
parent 65f029207e
commit ec002cc020

@ -10,14 +10,16 @@
const currentWorkingCategoryID = ref(1) const currentWorkingCategoryID = ref(1)
const summaryRef = ref(null) const summaryRef = ref(null)
const statusRef = ref(null) const statusRef = ref(null)
const showCategoryRef = ref(null)
const updateCurrentWorkingCategoryID = (id) =>{ const updateCurrentWorkingCategoryID = (id) =>{
currentWorkingCategoryID.value = id currentWorkingCategoryID.value = id
} }
const refreshPage = () => { const refreshPage = (session) => {
summaryRef.value.loadData() summaryRef.value.loadData()
statusRef.value.loadData() statusRef.value.loadData()
showCategoryRef.value.loadCategory(session.practice_category_id)
} }
</script> </script>
@ -32,7 +34,7 @@
<Summary ref="summaryRef" @update="updateCurrentWorkingCategoryID"/> <Summary ref="summaryRef" @update="updateCurrentWorkingCategoryID"/>
</section> </section>
<section id="category"> <section id="category">
<ShowCategory :currentWorkingCategoryID="currentWorkingCategoryID"/> <ShowCategory ref="showCategoryRef" :currentWorkingCategoryID="currentWorkingCategoryID"/>
</section> </section>
<section id="songs"> <section id="songs">
<Songs/> <Songs/>

@ -32,6 +32,7 @@
}) })
watch(currentWorkingCategoryID, loadCategory) watch(currentWorkingCategoryID, loadCategory)
defineExpose ({loadCategory})
</script> </script>
<template> <template>

@ -49,7 +49,7 @@
this.comments = null; this.comments = null;
this.secondsToSubtract = 0; this.secondsToSubtract = 0;
window.localStorage.setItem('lastTotalSeconds', this.totalSeconds); window.localStorage.setItem('lastTotalSeconds', this.totalSeconds);
this.$emit('loggedTime') this.$emit('loggedTime', reqBody)
}); });
}, },

Loading…
Cancel
Save