fixes integration settings save bug
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
description,
|
description,
|
||||||
}: Props = $props();
|
}: Props = $props();
|
||||||
</script>
|
</script>
|
||||||
<div class="border border-input-border rounded-lg p-4 space-y-4">
|
<div class="border border-input-border rounded-lg p-4 space-y-4 flex flex-col justify-between">
|
||||||
<img class="h-20" src={img} alt="integration logo"/>
|
<img class="h-20" src={img} alt="integration logo"/>
|
||||||
<div>
|
<div>
|
||||||
<h5 class="text-xl font-semibold">{title}</h5>
|
<h5 class="text-xl font-semibold">{title}</h5>
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
schema: KomootSchema,
|
schema: KomootSchema,
|
||||||
}),
|
}),
|
||||||
onSubmit: async (form) => {
|
onSubmit: async (form) => {
|
||||||
|
form.active = integration?.komoot?.active ?? form.active
|
||||||
onsave?.(form);
|
onsave?.(form);
|
||||||
modal.closeModal();
|
modal.closeModal();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
schema: StravaSchema,
|
schema: StravaSchema,
|
||||||
}),
|
}),
|
||||||
onSubmit: async (form) => {
|
onSubmit: async (form) => {
|
||||||
|
form.active = integration?.strava?.active ?? form.active
|
||||||
onsave?.(form);
|
onsave?.(form);
|
||||||
modal.closeModal();
|
modal.closeModal();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { IntegrationUpdateSchema } from "$lib/models/api/integration_schema";
|
import { IntegrationUpdateSchema } from "$lib/models/api/integration_schema";
|
||||||
import type { Integration } from "$lib/models/integration";
|
import type { Integration } from "$lib/models/integration";
|
||||||
import { pb } from "$lib/pocketbase";
|
|
||||||
import { Collection, handleError, remove, show, update } from "$lib/util/api_util";
|
import { Collection, handleError, remove, show, update } from "$lib/util/api_util";
|
||||||
import { json, type RequestEvent } from "@sveltejs/kit";
|
import { json, type RequestEvent } from "@sveltejs/kit";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user