Skip to content

Commit

Permalink
feat(Proofs): allow editing proofs with existing prices. ref #689
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Oct 26, 2024
1 parent ee37c37 commit 1dafd62
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/ProofActionMenuButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ export default {
return this.proof && constants.PROOF_TYPE_USER_EDITABLE_LIST.includes(this.proof.type)
},
userCanEditProof() {
// user must be proof owner
// and proof must not have any prices
return this.proof.price_count === 0
// user must be proof owner (already checked in parent component)
// only allow edition of certain proof types
return constants.PROOF_TYPE_USER_EDITABLE_LIST.includes(this.proof.type)
},
userCanDeleteProof() {
// user must be proof owner
// user must be proof owner (already checked in parent component)
// and proof must not have any prices
return this.proof.price_count === 0
},
Expand Down

0 comments on commit 1dafd62

Please sign in to comment.