Convert multiple pages into SPA
This commit is contained in:
@@ -2,11 +2,10 @@
|
||||
import { onMount } from "svelte";
|
||||
import { formatDate } from "util/Formatting";
|
||||
import { mollie_proxy_call } from "./MollieAPI";
|
||||
import LoadingIndicator from "util/LoadingIndicator.svelte";
|
||||
import Euro from "util/Euro.svelte";
|
||||
import { loading_start } from "lib/Loading";
|
||||
|
||||
export let settlement = {}
|
||||
let loading = true
|
||||
let payments = []
|
||||
|
||||
let per_country = {}
|
||||
@@ -49,7 +48,7 @@ const load_all_payments = async (settlement_id) => {
|
||||
}
|
||||
|
||||
const get_payments = async () => {
|
||||
loading = true;
|
||||
loading_start()
|
||||
try {
|
||||
payments = await load_all_payments(settlement.id)
|
||||
|
||||
@@ -84,15 +83,13 @@ const get_payments = async () => {
|
||||
} catch (err) {
|
||||
alert(err);
|
||||
} finally {
|
||||
loading = false;
|
||||
loading_finish()
|
||||
}
|
||||
};
|
||||
|
||||
onMount(get_payments);
|
||||
</script>
|
||||
|
||||
<LoadingIndicator loading={loading}/>
|
||||
|
||||
<h3>Accounting information</h3>
|
||||
|
||||
{#if per_country.NL}
|
||||
|
Reference in New Issue
Block a user