mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-14 07:52:15 +00:00
disabled sell button when user tries to sell more items than they own
This commit is contained in:
parent
0a23dd5311
commit
daccade2e2
1 changed files with 1 additions and 8 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue