1
0
Fork 0
forked from Kispi/Core

feat(webapp): add minimum and maximum amount for currency input

This commit is contained in:
Simon Giesel 2022-08-04 11:48:09 +02:00
parent f255ffcd94
commit 46d0ad8770
2 changed files with 5 additions and 0 deletions

View file

@ -5,6 +5,8 @@
type="number"
class="text-right pr-16"
step="1"
min="1"
max="100"
/>
<span class="text-sm opacity-50 absolute -ml-16 top-2/4 -mt-8 pointer-events-none">,00 Öro</span>
</div>

View file

@ -72,6 +72,9 @@ function handleOpen(event: {id: string, open: boolean}) {
}
function handleSubmit() {
if(input.value.$refs.input.$refs.input.value <= 0 || input.value.$refs.input.$refs.input.value > 100) {
return;
}
emit('submit', input.value.$refs.input.$refs.input.value);
abortButton.value.click();
}