Skip to content

Commit

Permalink
refactor(Proof card): re-add the type input (set to PRICE_TAG) to be …
Browse files Browse the repository at this point in the history
…more explicit. ref #983
  • Loading branch information
raphodn committed Jan 4, 2025
1 parent d87c8cb commit bd53763
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion src/components/ProofTypeInputRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,23 @@ export default {
type: Object,
default: () => ({ type: null })
},
hideProofTypeReceiptChoice: {
type: Boolean,
default: false
},
},
data() {
return {
proofTypeList: constants.PROOF_TYPE_LIST,
// proofTypeList: constants.PROOF_TYPE_LIST,
}
},
computed: {
proofTypeList() {
if (this.hideProofTypeReceiptChoice) {
return constants.PROOF_TYPE_LIST.filter(pt => pt.key !== constants.PROOF_TYPE_RECEIPT)
}
return constants.PROOF_TYPE_LIST
}
}
}
</script>
2 changes: 1 addition & 1 deletion src/components/ProofUploadCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
density="compact"
:text="$t('ProofAdd.HowToMultiple')"
/>
<ProofTypeInputRow v-if="!typePriceTagOnly" :proofTypeForm="proofForm" />
<ProofTypeInputRow :proofTypeForm="proofForm" :hideProofTypeReceiptChoice="typePriceTagOnly" />
<ProofImageInputRow :proofImageForm="proofForm" :hideRecentProofChoice="hideRecentProofChoice" :multiple="multiple" @proofList="proofImageList = $event" />
<LocationInputRow :locationForm="proofForm" />
<ProofMetadataInputRow :proofMetadataForm="proofForm" :proofType="proofForm.type" />
Expand Down

0 comments on commit bd53763

Please sign in to comment.