Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Bug in pricing calculator #1233

Merged
merged 10 commits into from
Oct 19, 2023
14 changes: 11 additions & 3 deletions packages/playground/src/calculator/resource_pricing.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
<template>
<v-container class="custom-container">
<v-card color="title" class="d-flex justify-center items-center mt-3 pa-3 text-center">
<v-icon size="30" class="pr-3" color="white">mdi-calculator</v-icon>
<v-card-title class="pa-0" lor="white">Resource Pricing Calculator</v-card-title>
<v-icon size="30" class="pr-3">mdi-calculator</v-icon>
<v-card-title class="pa-0">Pricing Calculator</v-card-title>
</v-card>
<v-card class="pa-3">
<v-row class="mt-3 px-3 pl-6" style="max-width: 74.7rem">
<v-alert type="info" variant="tonal">
For more information about Threefold Pricing check <a class="app-link" @click="openManual()">here</a>
</v-alert>
</v-row>
<v-row class="mt-3 px-3">
<v-col cols="6">
<input-validator
Expand Down Expand Up @@ -237,7 +242,6 @@ watch([CRU, MRU, SRU, HRU, balance, isCertified, ipv4, currentbalance], async ()
sru: SRU.value,
ipv4u: ipv4.value,
certified: isCertified.value,
balance: balance.value,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now if I try to enter any balance check how much discount will get for this balance, it won't work

IMO, we should disable the balance text field if the switch is enabled without changing the current balance.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Fixed
video1956433406.mp4

});
}

Expand Down Expand Up @@ -289,6 +293,10 @@ onMounted(async () => {
console.error("Error fetching the grid:", error);
});
});

function openManual() {
window.open("https://manual.grid.tf/cloud/cloudunits_pricing.html", "_blank");
}
</script>

<style>
Expand Down