From 6e5523b95ecd15a35a559891108f598908ee201a Mon Sep 17 00:00:00 2001 From: joeldlin <59644512+joeldlin@users.noreply.github.com> Date: Mon, 19 Feb 2024 11:58:41 +0100 Subject: [PATCH] Fikser denne buggen: (#233) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Under generering av ny utbetaling så er utbetalingsreferansen statisk, som forårsaker at utbetalingen blir sett på som duplikat og det vises bare 1 i innsyn og modia. Mer informasjon i: https://trello.com/c/CoS07oOZ/117-feil-med-utbetalinger-i-fagsystem-mock Co-authored-by: Åshild Lobben Simonsen --- src/content/parts/utbetaling/NyUtbetalingModal.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/content/parts/utbetaling/NyUtbetalingModal.tsx b/src/content/parts/utbetaling/NyUtbetalingModal.tsx index 14877e6..eb13d98 100644 --- a/src/content/parts/utbetaling/NyUtbetalingModal.tsx +++ b/src/content/parts/utbetaling/NyUtbetalingModal.tsx @@ -108,8 +108,12 @@ const defaultUtbetaling: Utbetaling = { }; const NyUtbetalingModal: React.FC = (props: Props) => { - const [modalUtbetaling, setModalUtbetaling] = - useState(initialUtbetaling); + + const utbetaling: Utbetaling = initialUtbetaling; + utbetaling.utbetalingsreferanse = generateFilreferanseId() + + const [modalUtbetaling, setModalUtbetaling] = useState(utbetaling); + const [kontonummerLabelPlaceholder, setKontonummerLabelPlaceholder] = useState("Kontonummer (Ikke satt)");