parent
d0ea7cf3c6
commit
d1fd5f68e7
@ -25,7 +25,6 @@ article
|
||||
|
||||
import Vue from 'vue'
|
||||
import { mapState } from 'vuex'
|
||||
import chunk from 'lodash/chunk'
|
||||
|
||||
import EditRequest from './request/EditRequest'
|
||||
import FullRequest from './request/FullRequest'
|
||||
@ -53,9 +52,6 @@ export default {
|
||||
title () {
|
||||
return `${this.user.given_name}’s Prayer Journal`
|
||||
},
|
||||
journalCardRows () {
|
||||
return chunk(this.journal, 3)
|
||||
},
|
||||
toast () {
|
||||
return this.$parent.$refs.toast
|
||||
},
|
||||
|
@ -1,11 +1,12 @@
|
||||
<template lang="pug">
|
||||
b-col(md='6' lg='4')
|
||||
b-col(v-if="!isSnoozed" md='6' lg='4')
|
||||
.mpj-request-card
|
||||
b-card-header.text-center.py-1.
|
||||
#[b-btn(@click='markPrayed()' variant='outline-primary' title='Pray' size='sm'): icon(name='check')]
|
||||
#[b-btn(@click.stop='showEdit()' variant='outline-secondary' title='Edit' size='sm'): icon(name='pencil')]
|
||||
#[b-btn(@click.stop='showNotes()' variant='outline-secondary' title='Add Notes' size='sm'): icon(name='file-text-o')]
|
||||
#[b-btn(@click.stop='showFull()' variant='outline-secondary' title='View Full Request' size='sm'): icon(name='search')]
|
||||
#[b-btn(@click.stop='snooze()' variant='outline-secondary' title='Snooze Request' size='sm'): icon(name='clock-o')]
|
||||
b-card-body.p-0
|
||||
p.card-text.mpj-request-text.mb-1.px-3.pt-3
|
||||
| {{ request.text }}
|
||||
@ -27,6 +28,11 @@ export default {
|
||||
toast: { required: true },
|
||||
events: { required: true }
|
||||
},
|
||||
computed: {
|
||||
isSnoozed () {
|
||||
return Date.now() < this.request.snoozedUntil
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async markPrayed () {
|
||||
await this.$store.dispatch(actions.UPDATE_REQUEST, {
|
||||
@ -45,6 +51,9 @@ export default {
|
||||
},
|
||||
showNotes () {
|
||||
this.events.$emit('notes', this.request)
|
||||
},
|
||||
snooze () {
|
||||
// Nothing yet
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ import 'vue-toast/dist/vue-toast.min.css'
|
||||
|
||||
// Only import the icons we need; the whole set is ~500K!
|
||||
import 'vue-awesome/icons/check'
|
||||
import 'vue-awesome/icons/clock-o'
|
||||
import 'vue-awesome/icons/file-text-o'
|
||||
import 'vue-awesome/icons/pencil'
|
||||
import 'vue-awesome/icons/plus'
|
||||
|
Loading…
Reference in New Issue
Block a user