Skip to content

Commit

Permalink
fix: render kit link when edit service
Browse files Browse the repository at this point in the history
  • Loading branch information
ciniaeleonora committed Nov 30, 2022
1 parent 0f55ab3 commit 788ef45
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/views/Dashboard/Lab/Services/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ export default {
immediate: true,
handler: generalDebounce( async function() {
await this.getUpdateServiceFee()
console.log(this.document)
}, 500)
},
Expand All @@ -402,23 +403,28 @@ export default {
},
methods: {
async getService(sid) {
const detailService = await queryServicesById(this.api, sid)
async getService(id) {
console.log(id)
const detailService = await queryServicesById(this.api, id)
const { category, description, dnaCollectionProcess, expectedDuration, image, longDescription, name, pricesByCurrency, testResultSample } = detailService.info
this.document = {
category,
dnaCollectionProcess,
name,
description,
longDescription: longDescription.split("||")[0],
linkKit: longDescription.split("||")[1],
linkKit: longDescription.split("||").length > 1 ? "yes" : "no",
currency: pricesByCurrency[0].currency,
price: Number(await fromEther(pricesByCurrency[0].priceComponents[0].value.replaceAll(",", ""), pricesByCurrency[0].currency)),
qcPrice: Number(await fromEther(pricesByCurrency[0].additionalPrices[0].value.replaceAll(",", ""), pricesByCurrency[0].currency)),
duration: expectedDuration.duration,
durationType: expectedDuration.durationType
}
this.kitPurchaseLink = longDescription.split("||").length > 1 ? longDescription.split("||")[1] : ""
this.imageUrl = image
this.testResultSampleUrl = testResultSample
Expand Down

0 comments on commit 788ef45

Please sign in to comment.