Compare commits

...

2 Commits

Author SHA1 Message Date
Tim Gröger db4f3c45c4 fix #29. amount value always positive 2023-05-03 13:18:27 +02:00
Tim Gröger 7a61dbef28 update dependencies 2023-05-03 13:17:49 +02:00
2 changed files with 10 additions and 5 deletions

View File

@ -21,14 +21,16 @@
"devDependencies": {
"@flaschengeist/api": "^1.0.0-alpha.7",
"@flaschengeist/types": "^1.0.0-alpha.10",
"@quasar/app": "^3.2.5",
"@typescript-eslint/eslint-plugin": "^5.7.0",
"@typescript-eslint/parser": "^5.7.0",
"@quasar/app-webpack": "^3.7.2",
"@typescript-eslint/eslint-plugin": "^5.8.0",
"@typescript-eslint/parser": "^5.8.0",
"axios": "^0.24.0",
"eslint": "^8.4.1",
"eslint": "^8.5.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^8.2.0",
"eslint-webpack-plugin": "^3.1.1",
"modify-source-webpack-plugin": "^3.0.0",
"pinia": "^2.0.6",
"prettier": "^2.5.1",
"quasar": "^2.3.4",

View File

@ -22,7 +22,7 @@
</div>
</template>
<script lang="ts">
import { defineComponent, ref, PropType, computed } from 'vue';
import { defineComponent, ref, PropType, computed, watch } from 'vue';
import { useBalanceStore } from '../store';
import { hasPermission, useUserStore } from '@flaschengeist/api';
import PERMISSIONS from '../permissions';
@ -58,6 +58,9 @@ export default defineComponent({
? <FG.User>props.user
: <FG.User>userStore.users.find((a) => a.userid === <string>props.user)
);
watch(amount, (a) => {
amount.value = Math.abs(a);
});
return { changeBalance, addShortcut, canAddCredit, amount };
},
});