Fixed broken pray button

This commit is contained in:
Daniel J. Summers 2019-07-07 07:08:42 -05:00
parent 42615dae82
commit 57cd17c734
3 changed files with 6 additions and 4 deletions

View File

@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework> <TargetFramework>netcoreapp2.2</TargetFramework>
<Version>1.2.0.0</Version> <Version>1.2.1.0</Version>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,6 +1,6 @@
{ {
"name": "my-prayer-journal", "name": "my-prayer-journal",
"version": "1.2.0", "version": "1.2.1",
"description": "myPrayerJournal - Front End", "description": "myPrayerJournal - Front End",
"author": "Daniel J. Summers <daniel@bitbadger.solutions>", "author": "Daniel J. Summers <daniel@bitbadger.solutions>",
"private": true, "private": true,

View File

@ -104,8 +104,10 @@ export default new Vuex.Store({
progress.start() progress.start()
try { try {
let oldReq = (state.journal.filter(req => req.requestId === requestId) || [])[0] || {} let oldReq = (state.journal.filter(req => req.requestId === requestId) || [])[0] || {}
if (status !== 'Answered' && (oldReq.recurType !== recurType || oldReq.recurCount !== recurCount)) { if (!(status === 'Prayed' && updateText === '')) {
await api.updateRecurrence(requestId, recurType, recurCount) if (status !== 'Answered' && (oldReq.recurType !== recurType || oldReq.recurCount !== recurCount)) {
await api.updateRecurrence(requestId, recurType, recurCount)
}
} }
if (status !== 'Updated' || oldReq.text !== updateText) { if (status !== 'Updated' || oldReq.text !== updateText) {
await api.updateRequest(requestId, status, oldReq.text !== updateText ? updateText : '') await api.updateRequest(requestId, status, oldReq.text !== updateText ? updateText : '')