A lot is working...
...but a lot is not. The JSON for the journal is not including the Id field; I suspect the majority of the problems reside with that issue.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "my-prayer-journal",
|
||||
"version": "1.2.2",
|
||||
"version": "2.0.0",
|
||||
"description": "myPrayerJournal - Front End",
|
||||
"author": "Daniel J. Summers <daniel@bitbadger.solutions>",
|
||||
"private": true,
|
||||
@@ -8,9 +8,9 @@
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build --modern",
|
||||
"lint": "vue-cli-service lint",
|
||||
"apistart": "cd ../api/MyPrayerJournal.Api && dotnet run",
|
||||
"vue": "vue-cli-service build --modern && cd ../api/MyPrayerJournal.Api && dotnet run",
|
||||
"publish": "vue-cli-service build --modern && cd ../api/MyPrayerJournal.Api && dotnet publish -c Release"
|
||||
"apistart": "cd ../MyPrayerJournal.Api && dotnet run",
|
||||
"vue": "vue-cli-service build --modern && cd ../MyPrayerJournal.Api && dotnet run",
|
||||
"publish": "vue-cli-service build --modern && cd ../MyPrayerJournal.Api && dotnet publish -c Release"
|
||||
},
|
||||
"dependencies": {
|
||||
"auth0-js": "^9.7.3",
|
||||
|
||||
@@ -10,7 +10,7 @@ article.mpj-main-content-wide(role='main')
|
||||
br
|
||||
.mpj-journal(v-if='journal.length > 0')
|
||||
request-card(v-for='request in journal'
|
||||
:key='request.requestId'
|
||||
:key='request.Id'
|
||||
:request='request'
|
||||
:events='eventBus'
|
||||
:toast='toast')
|
||||
|
||||
@@ -5,7 +5,7 @@ article.mpj-main-content(role='main')
|
||||
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'
|
||||
:key='req.Id'
|
||||
:request='req'
|
||||
:toast='toast')
|
||||
p(v-else) Loading journal...
|
||||
|
||||
@@ -5,7 +5,7 @@ article.mpj-main-content(role='main')
|
||||
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'
|
||||
:key='req.Id'
|
||||
:request='req'
|
||||
:toast='toast')
|
||||
p(v-else) Loading answered requests...
|
||||
|
||||
@@ -134,7 +134,7 @@ export default {
|
||||
if (this.journal.length === 0) {
|
||||
await this.$store.dispatch(actions.LOAD_JOURNAL, this.$Progress)
|
||||
}
|
||||
const req = this.journal.filter(r => r.requestId === this.id)[0]
|
||||
const req = this.journal.filter(r => r.Id === this.id)[0]
|
||||
this.form.requestId = this.id
|
||||
this.form.requestText = req.text
|
||||
this.form.status = 'Updated'
|
||||
|
||||
@@ -85,7 +85,7 @@ export default {
|
||||
}
|
||||
},
|
||||
openDialog (request) {
|
||||
this.form.requestId = request.requestId
|
||||
this.form.requestId = request.Id
|
||||
this.notesVisible = true
|
||||
},
|
||||
async saveNotes () {
|
||||
|
||||
@@ -36,20 +36,20 @@ export default {
|
||||
async markPrayed () {
|
||||
await this.$store.dispatch(actions.UPDATE_REQUEST, {
|
||||
progress: this.$Progress,
|
||||
requestId: this.request.requestId,
|
||||
requestId: this.request.Id,
|
||||
status: 'Prayed',
|
||||
updateText: ''
|
||||
})
|
||||
this.toast.showToast('Request marked as prayed', { theme: 'success' })
|
||||
},
|
||||
showEdit () {
|
||||
this.$router.push({ name: 'EditRequest', params: { id: this.request.requestId } })
|
||||
this.$router.push({ name: 'EditRequest', params: { id: this.request.Id } })
|
||||
},
|
||||
showNotes () {
|
||||
this.events.$emit('notes', this.request)
|
||||
},
|
||||
snooze () {
|
||||
this.events.$emit('snooze', this.request.requestId)
|
||||
this.events.$emit('snooze', this.request.Id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,26 +60,26 @@ export default {
|
||||
async cancelSnooze () {
|
||||
await this.$store.dispatch(actions.SNOOZE_REQUEST, {
|
||||
progress: this.$Progress,
|
||||
requestId: this.request.requestId,
|
||||
requestId: this.request.Id,
|
||||
until: 0
|
||||
})
|
||||
this.toast.showToast('Request un-snoozed', { theme: 'success' })
|
||||
this.$parent.$emit('requestUnsnoozed')
|
||||
},
|
||||
editRequest () {
|
||||
this.$router.push({ name: 'EditRequest', params: { id: this.request.requestId } })
|
||||
this.$router.push({ name: 'EditRequest', params: { id: this.request.Id } })
|
||||
},
|
||||
async showNow () {
|
||||
await this.$store.dispatch(actions.SHOW_REQUEST_NOW, {
|
||||
progress: this.$Progress,
|
||||
requestId: this.request.requestId,
|
||||
requestId: this.request.Id,
|
||||
showAfter: Date.now()
|
||||
})
|
||||
this.toast.showToast('Recurrence skipped; request now shows in journal', { theme: 'success' })
|
||||
this.$parent.$emit('requestNowShown')
|
||||
},
|
||||
viewFull () {
|
||||
this.$router.push({ name: 'FullRequest', params: { id: this.request.requestId } })
|
||||
this.$router.push({ name: 'FullRequest', params: { id: this.request.Id } })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ article.mpj-main-content(role='main')
|
||||
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'
|
||||
:key='req.Id'
|
||||
:request='req'
|
||||
:toast='toast')
|
||||
p(v-else) Loading journal...
|
||||
|
||||
@@ -56,7 +56,7 @@ export default new Vuex.Store({
|
||||
state.journal.push(newRequest)
|
||||
},
|
||||
[mutations.REQUEST_UPDATED] (state, request) {
|
||||
let jrnl = state.journal.filter(it => it.requestId !== request.requestId)
|
||||
let jrnl = state.journal.filter(it => it.Id !== request.Id)
|
||||
if (request.lastStatus !== 'Answered') jrnl.push(request)
|
||||
state.journal = jrnl
|
||||
},
|
||||
@@ -103,7 +103,7 @@ export default new Vuex.Store({
|
||||
async [actions.UPDATE_REQUEST] ({ commit, state }, { progress, requestId, status, updateText, recurType, recurCount }) {
|
||||
progress.start()
|
||||
try {
|
||||
let oldReq = (state.journal.filter(req => req.requestId === requestId) || [])[0] || {}
|
||||
let oldReq = (state.journal.filter(req => req.Id === requestId) || [])[0] || {}
|
||||
if (!(status === 'Prayed' && updateText === '')) {
|
||||
if (status !== 'Answered' && (oldReq.recurType !== recurType || oldReq.recurCount !== recurCount)) {
|
||||
await api.updateRecurrence(requestId, recurType, recurCount)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const webpack = require('webpack')
|
||||
module.exports = {
|
||||
outputDir: '../api/MyPrayerJournal.Api/wwwroot',
|
||||
outputDir: '../MyPrayerJournal.Api/wwwroot',
|
||||
configureWebpack: {
|
||||
plugins: [
|
||||
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/)
|
||||
|
||||
Reference in New Issue
Block a user