disabled sell button when user tries to sell more items than they own

This commit is contained in:
CuriousMagpie 2023-05-15 12:03:58 -04:00
parent 0a23dd5311
commit daccade2e2

View file

@ -77,7 +77,7 @@
</div>
<button
class="btn btn-primary"
:disabled="maxOwned > selectedAmountToSell"
:disabled="selectedAmountToSell > itemContextToSell.itemCount"
@click="sellItems()"
>
{{ $t('sellItems') }}
@ -376,13 +376,6 @@ export default {
this.selectedAmountToSell = 0;
}
},
// preventSellingMoreThanOwned ($event) {
// const { value } = $event.target;
// if (Number(value) < this.selectedAmountToSell) {
// this.selectedAmountToSell = this.itemCount;
// console.log('yay');
// }
// },
maxOwned () {
const maxOwned = this.itemContextToSell.itemCount;
return maxOwned;