Misc final tweaks

- Handle notes being nil
- Distinguish between request not found, error retrieving notes, and no notes for present request
- Minor UI tweaks to use smart quotes
This commit was merged in pull request #14.
This commit is contained in:
Daniel J. Summers
2018-05-27 19:26:52 -05:00
parent d57e2e863a
commit 91daa387cb
6 changed files with 39 additions and 17 deletions

View File

@@ -3,6 +3,8 @@ article
page-title(title='Answered Requests')
p(v-if='!loaded') Loading answered requests...
div(v-if='loaded').mpj-answered-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
p.mpj-request-text(v-for='req in requests' :key='req.requestId')
| {{ req.text }}
br

View File

@@ -48,7 +48,7 @@ export default {
.sort(asOfDesc)[0].text
},
log () {
return this.request.notes
return (this.request.notes || [])
.map(note => ({ asOf: note.asOf, text: note.notes, status: 'Notes' }))
.concat(this.request.history)
.sort(asOfDesc)

View File

@@ -11,7 +11,8 @@ article
:request='request'
:events='eventBus'
:toast='toast')
p.text-center(v-if='journal.length === 0'): em No requests found; click the "Add a New Request" button to add one
p.text-center(v-if='journal.length === 0'): em.
No requests found; click the “Add a New Request” button to add one
edit-request(:events='eventBus'
:toast='toast')
notes-edit(:events='eventBus'
@@ -50,7 +51,7 @@ export default {
},
computed: {
title () {
return `${this.user.given_name}'s Prayer Journal`
return `${this.user.given_name}’s Prayer Journal`
},
journalCardRows () {
return chunk(this.journal, 3)

View File

@@ -18,11 +18,11 @@ export default {
},
watch: {
title () {
document.title = `${this.title} « myPrayerJournal`
document.title = `${this.title.replace('’', "'")} « myPrayerJournal`
}
},
created () {
document.title = `${this.title} « myPrayerJournal`
document.title = `${this.title.replace('’', "'")} « myPrayerJournal`
}
}
</script>