|
|
|
|
@ -14,13 +14,23 @@
|
|
|
|
|
description.value = event.target.innerText
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMounted(()=>{
|
|
|
|
|
loadCategory()
|
|
|
|
|
window.addEventListener('keydown', (event)=>{
|
|
|
|
|
if(event.ctrlKey === true){
|
|
|
|
|
if(event.key === 'l') {
|
|
|
|
|
description.value = categorySessions.value[0].description
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const loadCategory = async () => {
|
|
|
|
|
const response = await fetch(import.meta.env.VITE_PRACTICE_TRACKER_API_URL+'show-category/'+currentWorkingCategory.value.id)
|
|
|
|
|
categorySessions.value = await response.json()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMounted(loadCategory)
|
|
|
|
|
|
|
|
|
|
watch(currentWorkingCategory, loadCategory)
|
|
|
|
|
defineExpose({loadCategory})
|
|
|
|
|
</script>
|
|
|
|
|
|