From 46d0ad8770f8896b7f39697e76efed749398cb49 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 4 Aug 2022 11:48:09 +0200 Subject: [PATCH] feat(webapp): add minimum and maximum amount for currency input --- src/components/atoms/AtomCurrencyInput.vue | 2 ++ src/components/molecules/MoleculeInputModal.vue | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/components/atoms/AtomCurrencyInput.vue b/src/components/atoms/AtomCurrencyInput.vue index 5cb8904..ce1235b 100644 --- a/src/components/atoms/AtomCurrencyInput.vue +++ b/src/components/atoms/AtomCurrencyInput.vue @@ -5,6 +5,8 @@ type="number" class="text-right pr-16" step="1" + min="1" + max="100" /> ,00 Öro diff --git a/src/components/molecules/MoleculeInputModal.vue b/src/components/molecules/MoleculeInputModal.vue index 8273cc0..1db0bf6 100644 --- a/src/components/molecules/MoleculeInputModal.vue +++ b/src/components/molecules/MoleculeInputModal.vue @@ -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(); }