Update:Show prompt before marking item as finished that has progress #805

This commit is contained in:
advplyr committed 2022-07-30 12:40:43 -05:00
1 parent 92bedeac15
commit 53cf6edd6a
5 files changed
+47 -5

No files matched your search

@@ -124,7 +124,21 @@ export default {
})
}
},
toggleFinished() {
toggleFinished(confirmed = false) {
if (!this.userIsFinished && this.itemProgressPercent > 0 && !confirmed) {
const payload = {
message: `Are you sure you want to mark "${this.title}" as finished?`,
callback: (confirmed) => {
if (confirmed) {
this.toggleFinished(true)
}
},
type: 'yesNo'
}
this.$store.commit('globals/setConfirmPrompt', payload)
return
}
var updatePayload = {
isFinished: !this.userIsFinished
}