Skip to content

Commit

Permalink
Merge pull request #38 from traP-jp:buttonDesign
Browse files Browse the repository at this point in the history
状況設定ボタン追加実装
  • Loading branch information
Pugma authored Dec 17, 2023
2 parents 278734b + 7bad38b commit 3808410
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions src/pages/TaskDashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,25 @@ import router from '@/router'
const taskLista = ref<tasks>([])
const suggest = ref<tasks>([])
const difficulty = ref(3)
apiClient.task.getTasks().then((res) => (taskLista.value = res))
apiClient.suggestion.getSuggest('3').then((res) => (suggest.value = res))
apiClient.suggestion.getSuggest(difficulty.value.toString()).then((res) => (suggest.value = res))
const moveToAddTask = () => {
router.push('/AddTask')
}
const moveToAddCondtion = () => {
router.push('/AddCondition')
}
var ButtonStatus: boolean = false
const chageSuggestion = () => {
if (difficulty.value === 1) {
ButtonStatus = true
} else {
difficulty.value = difficulty.value - 1
}
}
</script>

<template>
Expand Down Expand Up @@ -47,7 +60,7 @@ const moveToAddTask = () => {
:horizontal-scroll="true"
/>
</div>
<v-btn>やりたくない</v-btn>
<v-btn @click="chageSuggestion" v-bind:disabled="ButtonStatus">やりたくない</v-btn>
<br />
<div class="pageContainer">
<svg
Expand Down Expand Up @@ -86,7 +99,10 @@ const moveToAddTask = () => {
<!-- <br /> -->
<br />
</div>
<v-btn @click="moveToAddTask">タスクを追加</v-btn>
<div class="pageContainer">
<v-btn @click="moveToAddCondtion">状況を追加</v-btn>
<v-btn @click="moveToAddTask">タスクを追加</v-btn>
</div>
<!-- <br /> -->
<div class="pageContainer">
<div>
Expand Down

0 comments on commit 3808410

Please sign in to comment.