"Mark Prayed" works

This commit is contained in:
Daniel J. Summers
2017-09-22 22:30:00 -05:00
parent c703d717d8
commit 181dc5ea63
9 changed files with 127 additions and 87 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
el-col(:span='4'): strong Actions
el-col(:span='16'): strong Request
el-col(:span='4'): strong As Of
request-list-item(v-for="request in journal" v-bind:request="request" v-bind:key="request.requestId")
request-list-item(v-for="request in journal" :request="request" :key="request.requestId")
</template>
<script>
@@ -28,7 +28,10 @@ export default {
},
methods: {
saveRequest: async function () {
await this.$store.dispatch(actions.ADD_REQUEST, this.form.requestText)
await this.$store.dispatch(actions.ADD_REQUEST, {
progress: this.$Progress,
requestText: this.form.requestText
})
this.showNewVisible = false
}
}
@@ -10,8 +10,12 @@
</template>
<script>
'use strict'
import moment from 'moment'
import actions from '@/store/action-types'
export default {
name: 'request-list-item',
props: ['request'],
@@ -20,8 +24,10 @@ export default {
},
methods: {
markPrayed () {
alert(`Marking ${this.request.requestId} prayed`)
// TODO: write function
this.$store.dispatch(actions.MARK_PRAYED, {
progress: this.$Progress,
requestId: this.request.requestId
})
}
},
computed: {