ui: Persist success notification, redirect to list
Tabitha requested that the application returns to the transaction list after the form was submitted successfully. Before the navigation starts, we still want to see the info toast, though. Since the navigation may take a few seconds, we keep the toast open indefinitely.bugfix/ci-buildah
parent
69b511613f
commit
9cef220f90
|
@ -96,7 +96,13 @@ async function submitForm(data: FormData) {
|
||||||
btnsubmit.loading = false;
|
btnsubmit.loading = false;
|
||||||
if (r) {
|
if (r) {
|
||||||
if (r.ok) {
|
if (r.ok) {
|
||||||
notify("Successfully updated transaction");
|
notify(
|
||||||
|
"Successfully updated transaction",
|
||||||
|
undefined,
|
||||||
|
undefined,
|
||||||
|
null,
|
||||||
|
);
|
||||||
|
window.location.href = "/transactions";
|
||||||
} else {
|
} else {
|
||||||
const html = await r.text();
|
const html = await r.text();
|
||||||
if (html) {
|
if (html) {
|
||||||
|
|
Loading…
Reference in New Issue