Smart Cost: higher precision limit via slot click (#17099)
This commit is contained in:
parent
bb8bf49f8d
commit
a95c335882
1 changed files with 3 additions and 8 deletions
|
|
@ -288,17 +288,12 @@ export default {
|
|||
slotHovered(index) {
|
||||
this.activeIndex = index;
|
||||
},
|
||||
setSelectedSmartCostLimit(limit) {
|
||||
const nextOption = this.costOptions.find(({ value }) => value >= limit);
|
||||
if (nextOption) {
|
||||
this.selectedSmartCostLimit = nextOption.value;
|
||||
}
|
||||
},
|
||||
slotSelected(index) {
|
||||
const price = this.slots[index].price;
|
||||
if (price !== undefined) {
|
||||
this.setSelectedSmartCostLimit(price);
|
||||
this.saveSmartCostLimit(this.selectedSmartCostLimit);
|
||||
// 3 decimal precision
|
||||
const priceRounded = Math.ceil(price * 1000) / 1000;
|
||||
this.saveSmartCostLimit(priceRounded);
|
||||
}
|
||||
},
|
||||
changeSmartCostLimit($event) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue