diff --git a/src/app/src/App.vue b/src/app/src/App.vue
index b4138f4..c4b9915 100644
--- a/src/app/src/App.vue
+++ b/src/app/src/App.vue
@@ -102,199 +102,187 @@ export default {
}
-
diff --git a/src/app/src/components/Journal.vue b/src/app/src/components/Journal.vue
index 564e394..1e31847 100644
--- a/src/app/src/components/Journal.vue
+++ b/src/app/src/components/Journal.vue
@@ -3,17 +3,22 @@ article.mpj-main-content-wide(role='main')
page-title(:title='title')
p(v-if='isLoadingJournal') Loading your prayer journal...
template(v-else)
- .mpj-text-center
- md-button(:to="{ name: 'EditRequest', params: { id: 'new' } }"
- role='button').
- #[md-icon add_box] Add a New Request
- br
- .mpj-journal(v-if='journal.length > 0')
- request-card(v-for='request in journal'
- :key='request.requestId'
- :request='request')
- p.text-center(v-else): em.
- No requests found; click the “Add a New Request” button to add one
+ md-empty-state(v-if='journal.length === 0'
+ md-icon='done_all'
+ md-label='No Requests to Show'
+ md-description='You have no requests to be shown; see the “Active” link above for snoozed/deferred requests, and the “Answered” link for answered requests')
+ md-button(:to="{ name: 'Journal' }").md-primary.md-raised Add a New Request
+ template(v-else)
+ .mpj-text-center
+ md-button(:to="{ name: 'EditRequest', params: { id: 'new' } }"
+ role='button').md-raised
+ md-icon add_box
+ = ' Add a New Request'
+ br
+ .mpj-journal
+ request-card(v-for='request in journal'
+ :key='request.requestId'
+ :request='request')
notes-edit
snooze-request
diff --git a/src/app/src/components/request/ActiveRequests.vue b/src/app/src/components/request/ActiveRequests.vue
index cc0e390..ef76526 100644
--- a/src/app/src/components/request/ActiveRequests.vue
+++ b/src/app/src/components/request/ActiveRequests.vue
@@ -1,12 +1,16 @@
-article.mpj-main-content(role='main')
- page-title(title='Active Requests')
- div(v-if='loaded').mpj-request-list
- p.mpj-text-center(v-if='requests.length === 0'): em.
- No active requests found; return to #[router-link(:to='{ name: "Journal" } ') your journal]
- request-list-item(v-for='req in requests'
- :key='req.requestId'
- :request='req')
+md-content(role='main').mpj-main-content
+ page-title(title='Active Requests'
+ hide-on-page=true)
+ template(v-if='loaded')
+ md-empty-state(v-if='requests.length === 0'
+ md-icon='sentiment_dissatisfied'
+ md-label='No Active Requests'
+ md-description='Your prayer journal has no active requests')
+ md-button(:to="{ name: 'Journal' }").md-primary.md-raised Return to your journal
+ request-list(v-if='requests.length !== 0'
+ title='Active Requests'
+ :requests='requests')
p(v-else) Loading journal...
@@ -15,7 +19,7 @@ article.mpj-main-content(role='main')
import { mapState } from 'vuex'
-import RequestListItem from '@/components/request/RequestListItem'
+import RequestList from '@/components/request/RequestList'
import actions from '@/store/action-types'
@@ -23,7 +27,7 @@ export default {
name: 'active-requests',
inject: ['progress'],
components: {
- RequestListItem
+ RequestList
},
data () {
return {
diff --git a/src/app/src/components/request/AnsweredRequests.vue b/src/app/src/components/request/AnsweredRequests.vue
index 9ad145e..8e19de1 100644
--- a/src/app/src/components/request/AnsweredRequests.vue
+++ b/src/app/src/components/request/AnsweredRequests.vue
@@ -1,12 +1,15 @@
article.mpj-main-content(role='main')
- page-title(title='Answered Requests')
- div(v-if='loaded').mpj-request-list
- p.text-center(v-if='requests.length === 0'): em.
- No answered requests found; once you have marked one as “Answered”, it will appear here
- request-list-item(v-for='req in requests'
- :key='req.requestId'
- :request='req')
+ page-title(title='Answered Requests'
+ hide-on-page=true)
+ template(v-if='loaded')
+ md-empty-state(v-if='requests.length === 0'
+ md-icon='sentiment_dissatisfied'
+ md-label='No Answered Requests'
+ md-description='Your prayer journal has no answered requests; once you have marked one as “Answered”, it will appear here')
+ request-list(v-if='requests.length !== 0'
+ title='Answered Requests'
+ :requests='requests')
p(v-else) Loading answered requests...
@@ -15,7 +18,7 @@ article.mpj-main-content(role='main')
import api from '@/api'
-import RequestListItem from '@/components/request/RequestListItem'
+import RequestList from '@/components/request/RequestList'
export default {
name: 'answered-requests',
@@ -24,7 +27,7 @@ export default {
'progress'
],
components: {
- RequestListItem
+ RequestList
},
data () {
return {
diff --git a/src/app/src/components/request/RequestList.vue b/src/app/src/components/request/RequestList.vue
new file mode 100644
index 0000000..9529245
--- /dev/null
+++ b/src/app/src/components/request/RequestList.vue
@@ -0,0 +1,40 @@
+
+md-table(md-card)
+ md-table-toolbar
+ h1.md-title {{ title }}
+ md-table-row
+ md-table-head Actions
+ md-table-head Request
+ request-list-item(v-for='req in requests'
+ :key='req.requestId'
+ :request='req')
+
+
+
+
diff --git a/src/app/src/components/request/RequestListItem.vue b/src/app/src/components/request/RequestListItem.vue
index 06b5709..3d14af3 100644
--- a/src/app/src/components/request/RequestListItem.vue
+++ b/src/app/src/components/request/RequestListItem.vue
@@ -1,31 +1,35 @@
-p.mpj-request-text
- | {{ request.text }}
- br
- br
- button(@click='viewFull'
- title='View Full Request').
- #[md-icon description] View Full Request
- |
- template(v-if='!isAnswered')
- button(@click='editRequest'
- title='Edit Request').
- #[md-icon edit] Edit Request
- |
- template(v-if='isSnoozed')
- button(@click='cancelSnooze()').
- #[md-icon restore] Cancel Snooze
- |
- template(v-if='isPending')
- button(@click='showNow()').
- #[md-icon restore] Show Now
- br(v-if='isSnoozed || isPending || isAnswered')
- small(v-if='isSnoozed').mpj-muted-text: em.
- Snooze expires #[date-from-now(:value='request.snoozedUntil')]
- small(v-if='isPending').mpj-muted-text: em.
- Request scheduled to reappear #[date-from-now(:value='request.showAfter')]
- small(v-if='isAnswered').mpj-muted-text: em.
- Answered #[date-from-now(:value='request.asOf')]
+md-table-row
+ md-table-cell.mpj-action-cell
+ md-button(@click='viewFull').md-icon-button.md-raised
+ md-icon description
+ md-tooltip(md-direction='top'
+ md-delay=250) View Full Request
+ template(v-if='!isAnswered')
+ md-button(@click='editRequest').md-icon-button.md-raised
+ md-icon edit
+ md-tooltip(md-direction='top'
+ md-delay=250) Edit Request
+ template(v-if='isSnoozed')
+ md-button(@click='cancelSnooze()').md-icon-button.md-raised
+ md-icon restore
+ md-tooltip(md-direction='top'
+ md-delay=250) Cancel Snooze
+ template(v-if='isPending')
+ md-button(@click='showNow()').md-icon-button.md-rasied
+ md-icon restore
+ md-tooltip(md-direction='top'
+ md-delay=250) Show Now
+ md-table-cell.mpj-request-cell
+ p.mpj-request-text
+ | {{ request.text }}
+ br(v-if='isSnoozed || isPending || isAnswered')
+ small(v-if='isSnoozed').mpj-muted-text: em.
+ Snooze expires #[date-from-now(:value='request.snoozedUntil')]
+ small(v-if='isPending').mpj-muted-text: em.
+ Request scheduled to reappear #[date-from-now(:value='request.showAfter')]
+ small(v-if='isAnswered').mpj-muted-text: em.
+ Answered #[date-from-now(:value='request.asOf')]
+
+
\ No newline at end of file
diff --git a/src/app/src/components/request/SnoozeRequest.vue b/src/app/src/components/request/SnoozeRequest.vue
index 098a43f..ef19c6d 100644
--- a/src/app/src/components/request/SnoozeRequest.vue
+++ b/src/app/src/components/request/SnoozeRequest.vue
@@ -4,6 +4,7 @@ md-dialog(:md-active.sync='snoozeVisible').mpj-skinny
md-content.mpj-dialog-content
span.mpj-text-muted Until
md-datepicker(v-model='form.snoozedUntil'
+ :md-disabled-dates='datesInPast'
md-immediately)
md-dialog-actions
md-button(:disabled='!isValid'
@@ -33,6 +34,7 @@ export default {
data () {
return {
snoozeVisible: false,
+ datesInPast: date => date < new Date(),
form: {
requestId: '',
snoozedUntil: ''
diff --git a/src/app/src/components/request/SnoozedRequests.vue b/src/app/src/components/request/SnoozedRequests.vue
index 9258093..513368f 100644
--- a/src/app/src/components/request/SnoozedRequests.vue
+++ b/src/app/src/components/request/SnoozedRequests.vue
@@ -1,12 +1,16 @@
article.mpj-main-content(role='main')
- page-title(title='Snoozed Requests')
- div(v-if='loaded').mpj-request-list
- p.mpj-text-center(v-if='requests.length === 0'): em.
- No snoozed requests found; return to #[router-link(:to='{ name: "Journal" } ') your journal]
- request-list-item(v-for='req in requests'
- :key='req.requestId'
- :request='req')
+ page-title(title='Snoozed Requests'
+ hide-on-page=true)
+ template(v-if='loaded')
+ md-empty-state(v-if='requests.length === 0'
+ md-icon='sentiment_dissatisfied'
+ md-label='No Snoozed Requests'
+ md-description='Your prayer journal has no snoozed requests')
+ md-button(:to="{ name: 'Journal' }").md-primary.md-raised Return to your journal
+ request-list(v-if='requests.length !== 0'
+ title='Snoozed Requests'
+ :requests='requests')
p(v-else) Loading journal...
@@ -17,13 +21,13 @@ import { mapState } from 'vuex'
import actions from '@/store/action-types'
-import RequestListItem from '@/components/request/RequestListItem'
+import RequestList from '@/components/request/RequestList'
export default {
name: 'snoozed-requests',
inject: ['progress'],
components: {
- RequestListItem
+ RequestList
},
data () {
return {