getting category chooser to work with timer

practiced-songs
Matthew Huntington 1 year ago
parent b7690e1265
commit ab6a9425d0

@ -36,12 +36,13 @@
<main>
<section id="timer">
<Status ref="statusRef"/>
<!--<Timer
v-if="categories.length > 0"
<Timer
v-if="currentWorkingInstrument"
@loggedTime="refreshPage"
:categories="categories"
:instruments="instruments"
:currentWorkingCategory="currentWorkingCategory"/>-->
:categories="categories"
v-model:currentWorkingInstrument="currentWorkingInstrument"
v-model:currentWorkingCategory="currentWorkingCategory"/>
</section>
<section id="summary">
<Summary

@ -1,10 +1,14 @@
<script lang="ts">
<script setup>
const currentWorkingCategory = defineModel('currentWorkingCategory')
const currentWorkingInstrument = defineModel('currentWorkingInstrument')
const props = defineProps(['categories', 'instruments'])
</script>
<script>
import axios from 'axios';
import CategoryChooser from './category_chooser.vue'
import { getHours, getMinutes, createTimeObj, getAccumulatedSeconds, formatSeconds } from '../libs/time.js'
export default {
props: ['categories', 'currentWorkingCategory', 'instruments'],
data() {
return {
running: false,
@ -186,8 +190,8 @@
<label>Practice Category</label>
<CategoryChooser
@update="handleCategoryChange"
:currentWorkingCategory="currentWorkingCategory"
v-model:currentWorkingCategory="currentWorkingCategory"
v-model:currentWorkingInstrument="currentWorkingInstrument"
:instruments="instruments"
:categories="categories" />
<input type="Submit"/>

Loading…
Cancel
Save