From 54bf5669d9dab1eb6f23521c7c29021b03b7b2eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nikola=20Dere=C5=BEi=C4=87?=
Date: Mon, 12 Feb 2024 16:18:56 +0100
Subject: [PATCH 1/4] updated readme
---
README.md | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/README.md b/README.md
index d1d4c4b..23b3846 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,5 @@
# ToDo
-* Popis lokacija:
- * omogućiti collapse za pojedine mjesece
+* Public page with instructions
# Authentication
Authentication consists of the following parts:
From 010bd09d47cb214275fa577c9b0edf6855ec3017 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nikola=20Dere=C5=BEi=C4=87?=
Date: Tue, 13 Feb 2024 11:16:07 +0100
Subject: [PATCH 2/4] BillEditForm: payed amount in same line with checkbox
---
app/ui/BillEditForm.tsx | 56 ++++++++++++++++++++---------------------
1 file changed, 27 insertions(+), 29 deletions(-)
diff --git a/app/ui/BillEditForm.tsx b/app/ui/BillEditForm.tsx
index 41076e2..9565fd3 100644
--- a/app/ui/BillEditForm.tsx
+++ b/app/ui/BillEditForm.tsx
@@ -35,13 +35,17 @@ export const BillEditForm:FC = ({ location, bill }) => {
const [ state, dispatch ] = useFormState(handleAction, initialState);
const [ isPaid, setIsPaid ] = React.useState(paid);
- const [ payedAmount, setPayedAmount ] = React.useState(initialPayedAmount ?? 0);
+ const [ payedAmount, setPayedAmount ] = React.useState(initialPayedAmount ? `${initialPayedAmount/100}` : "" );
const [ barcodeImage, setBarcodeImage ] = React.useState(initialBarcodeImage);
const billPaid_handleChange = (event: React.ChangeEvent) => {
setIsPaid(event.target.checked);
}
+ const payedAmount_handleChange = (event: React.ChangeEvent) => {
+ setPayedAmount(event.target.value);
+ }
+
const billAttachment_handleChange = (event: React.ChangeEvent) => {
findDecodePdf417(event)
.then(result => {
@@ -51,7 +55,7 @@ export const BillEditForm:FC = ({ location, bill }) => {
billInfo
} = result;
- setPayedAmount(billInfo.amount);
+ setPayedAmount(`${billInfo.amount/100}`);
setBarcodeImage(barcodeImage);
}
});
@@ -98,34 +102,28 @@ export const BillEditForm:FC = ({ location, bill }) => {
))}
-
-
-