mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-17 09:25:20 +00:00
Merge pull request #3556 from vtomasr5/fix-saving-swarm-settings-placement-preferences
fix: Save Placement button not working for Preferences in Swarm settings
This commit is contained in:
+9
-4
@@ -17,9 +17,7 @@ import { Input } from "@/components/ui/input";
|
|||||||
import { api } from "@/utils/api";
|
import { api } from "@/utils/api";
|
||||||
|
|
||||||
const PreferenceSchema = z.object({
|
const PreferenceSchema = z.object({
|
||||||
Spread: z.object({
|
SpreadDescriptor: z.string(),
|
||||||
SpreadDescriptor: z.string(),
|
|
||||||
}),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const PlatformSchema = z.object({
|
const PlatformSchema = z.object({
|
||||||
@@ -116,7 +114,14 @@ export const PlacementForm = ({ id, type }: PlacementFormProps) => {
|
|||||||
mysqlId: id || "",
|
mysqlId: id || "",
|
||||||
mariadbId: id || "",
|
mariadbId: id || "",
|
||||||
mongoId: id || "",
|
mongoId: id || "",
|
||||||
placementSwarm: hasAnyValue ? formData : null,
|
placementSwarm: hasAnyValue
|
||||||
|
? {
|
||||||
|
...formData,
|
||||||
|
Preferences: formData.Preferences?.map((p) => ({
|
||||||
|
Spread: { SpreadDescriptor: p.SpreadDescriptor },
|
||||||
|
})),
|
||||||
|
}
|
||||||
|
: null,
|
||||||
});
|
});
|
||||||
|
|
||||||
toast.success("Placement updated successfully");
|
toast.success("Placement updated successfully");
|
||||||
|
|||||||
Reference in New Issue
Block a user