Skip to content

Commit

Permalink
final cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Jun 5, 2024
1 parent 3000bb3 commit 045528b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/PriceAddButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default {
computed: {
getAddUrl() {
if (this.proofId) {
return `${this.ADD_PRICE_BASE_URL}?proof=${this.proofId}`
return `${this.ADD_PRICE_BASE_URL}?proof_id=${this.proofId}`
}
return `${this.ADD_PRICE_BASE_URL}?code=${this.productCode}`
}
Expand Down
13 changes: 7 additions & 6 deletions src/views/AddPriceSingle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,8 @@ export default {
else {
this.setProductCode(this.$route.query.code)
}
} else if (this.$route.query.proof) {
this.getProofById(this.$route.query.proof);
} else if (this.$route.query.proof_id) {
this.getProofById(this.$route.query.proof_id)
}
this.initPriceSingleForm()
},
Expand Down Expand Up @@ -415,6 +415,7 @@ export default {
handleProofSelected(proof) {
this.addPriceSingleForm.proof_id = proof.id
this.addPriceSingleForm.date = new Date(proof.created).toISOString().split('T')[0]
// this.proofDateSuccessMessage = true
this.proofImagePreview = this.getProofUrl(proof)
this.proofSelectedSuccessMessage = true
this.proofSelectedMessage = true
Expand All @@ -427,12 +428,12 @@ export default {
return `${import.meta.env.VITE_OPEN_PRICES_APP_URL}/img/${proof.file_path}`
},
getProofById(proofId) {
this.loading = true;
this.loading = true
api.getProofById(proofId)
.then(proof => {
this.handleProofSelected(proof);
this.loading = false;
});
this.handleProofSelected(proof)
this.loading = false
})
},
newProof(source) {
if (source === 'gallery') {
Expand Down

0 comments on commit 045528b

Please sign in to comment.