Skip to content

Commit

Permalink
refactor(proofs): add a Proof Action to the details page (#801)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn authored Sep 7, 2024
1 parent e5cceed commit d4b8e0a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/ProofActionMenuButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<v-list>
<PriceAddLink :proofId="proof.id" :proofType="proof.type" display="list-item" :disabled="!userCanAddPrice" />
<v-divider />
<v-list-item :slim="true" prepend-icon="mdi-eye-outline" :to="getProofDetailUrl">
{{ $t('Common.Details') }}
</v-list-item>
<v-list-item :slim="true" prepend-icon="mdi-pencil" :disabled="!userCanEditProof" @click="openEditDialog">
{{ $t('Common.Edit') }}
</v-list-item>
Expand Down Expand Up @@ -76,6 +79,9 @@ export default {
}
},
computed: {
getProofDetailUrl() {
return `/proofs/${this.proof.id}`
},
userCanAddPrice() {
return this.proof && (this.proof.type === 'PRICE_TAG' || this.proof.type === 'RECEIPT')
},
Expand Down

0 comments on commit d4b8e0a

Please sign in to comment.