diff --git a/src/components/Dialog/DialogDeleteConfirmation.vue b/src/components/Dialog/DialogDeleteConfirmation.vue
index 08e0b915..9925262d 100644
--- a/src/components/Dialog/DialogDeleteConfirmation.vue
+++ b/src/components/Dialog/DialogDeleteConfirmation.vue
@@ -9,6 +9,28 @@
Are you sure you want delete this {{ type }}?
+
+
+ Estimated Transaction Weight
+
+
+ mdi-alert-circle-outline
+
+
+ Total fee paid in DBIO to execute this transaction.
+
+
+
+ {{ Number(fee).toFixed(4) }} DBIO
+
+
@@ -38,7 +60,8 @@ export default {
props: {
show: Boolean,
- type: String
+ type: String,
+ fee: { type: [String, Number]}
},
methods: {
diff --git a/src/views/Dashboard/Lab/OrderHistory/ProcessOrder/ProcessSpecimen/index.vue b/src/views/Dashboard/Lab/OrderHistory/ProcessOrder/ProcessSpecimen/index.vue
index d36a4e16..b924c112 100644
--- a/src/views/Dashboard/Lab/OrderHistory/ProcessOrder/ProcessSpecimen/index.vue
+++ b/src/views/Dashboard/Lab/OrderHistory/ProcessOrder/ProcessSpecimen/index.vue
@@ -1,7 +1,29 @@
-
+
+
+
-
-
-
-
-
-
+
+
+ Estimated Transaction Weight
+
+
+ mdi-alert-circle-outline
+
+
+ Total fee paid in DBIO to execute this transaction.
+
+
+
+
+ {{ Number(fee).toFixed(4) }} DBIO
+
+
+
Submit Result
@@ -160,7 +180,7 @@
@close="reportUploadSucceedDialog = false"
/>
-
Are you sure you want to submit the results?
+
+
+ Estimated Transaction Weight
+
+
+ mdi-alert-circle-outline
+
+
+ Total fee paid in DBIO to execute this transaction.
+
+
+
+
+ {{ Number(fee).toFixed(4) }} DBIO
+
+
+
@@ -196,7 +240,7 @@ import Dialog from "@/components/Dialog"
import { u8aToHex } from "@polkadot/util"
import Button from "@/components/Button"
import { uploadFile, getFileUrl, getIpfsMetaData } from "@/lib/pinata-proxy"
-import { submitTestResult, processDnaSample, submitTestResultFee } from "@/lib/polkadotProvider/command/geneticTesting"
+import { submitTestResult, processDnaSample, submitTestResultFee, processDnaSampleFee } from "@/lib/polkadotProvider/command/geneticTesting"
import { queryDnaTestResults } from "@/lib/polkadotProvider/query/geneticTesting"
import localStorage from "@/lib/local-storage"
@@ -359,7 +403,7 @@ export default {
},
async getFee() {
- const fee = await submitTestResultFee(this.api, this.pair, this.specimenNumber, this.nextStatus)
+ const fee = await submitTestResultFee(this.api, this.pair, this.specimenNumber)
this.fee = this.web3.utils.fromWei(String(fee.partialFee), "ether")
},
@@ -390,6 +434,13 @@ export default {
)
},
+ async showConfirmationDialog() {
+ const fee = await processDnaSampleFee(this.api, this.pair, this.specimenNumber, "ResultReady")
+ this.fee = this.web3.utils.fromWei(String(fee.partialFee), "ether")
+
+ this.confirmationDialog = true
+ },
+
async resultReady() {
this.isProcessing = true
await this.dispatch(
diff --git a/src/views/Dashboard/Lab/Registration/Services/List.vue b/src/views/Dashboard/Lab/Registration/Services/List.vue
index c38124a9..97a8e240 100644
--- a/src/views/Dashboard/Lab/Registration/Services/List.vue
+++ b/src/views/Dashboard/Lab/Registration/Services/List.vue
@@ -59,6 +59,7 @@
import { mapGetters, mapState } from "vuex"
import serviceHandler from "@/mixins/serviceHandler"
-import { deleteService } from "@/lib/polkadotProvider/command/services"
+import { deleteService, deleteServiceFee } from "@/lib/polkadotProvider/command/services"
import DialogDelete from "@/components/Dialog/DialogDeleteConfirmation"
export default {
@@ -84,7 +85,8 @@ export default {
data: () => ({
deleteConfirmation: false,
- service: null
+ service: null,
+ fee: 0
}),
computed: {
@@ -109,7 +111,7 @@ export default {
this.$emit("edit-service", service)
},
- toggleDelete(service) {
+ async toggleDelete(service) {
if (service) {
this.service = service
this.deleteConfirmation = true
@@ -117,6 +119,13 @@ export default {
this.service = null
this.deleteConfirmation = false
}
+
+ await this.getDeleteFee()
+ },
+
+ async getDeleteFee() {
+ const fee = await deleteServiceFee(this.api, this.pair, this.service.id)
+ this.fee = this.web3.utils.fromWei(String(fee.partialFee), "ether")
},
async deleteService() {
diff --git a/src/views/Dashboard/Lab/Registration/Services/index.vue b/src/views/Dashboard/Lab/Registration/Services/index.vue
index 27992841..670dacfb 100644
--- a/src/views/Dashboard/Lab/Registration/Services/index.vue
+++ b/src/views/Dashboard/Lab/Registration/Services/index.vue
@@ -482,8 +482,19 @@ export default {
clearServicesForm() {
this.$refs.serviceForm.resetValidation()
- this.$refs.serviceForm.reset()
- this.document.durationType = "Days"
+ this.document = {
+ category: "",
+ dnaCollectionProcess: "",
+ name: "",
+ currency: "DAI",
+ price: 0,
+ qcPrice: 0,
+ description: "",
+ longDescription: "",
+ duration: "",
+ durationType: "Days"
+ },
+ this.testResultSampleFile = ""
this.imageUrl = ""
this.fee = 0
},