fix bug on client create redirect

This commit is contained in:
Casey 2026-01-27 12:45:01 -06:00
parent 9596798bf4
commit 786d4ecd39

View file

@ -297,8 +297,9 @@ const handleSubmit = async () => {
const createdClient = await Api.createClient(client.value); const createdClient = await Api.createClient(client.value);
console.log("Created client:", createdClient); console.log("Created client:", createdClient);
notificationStore.addSuccess("Client created successfully!"); notificationStore.addSuccess("Client created successfully!");
stripped_name = createdClient.customerName.split("-#-")[0].trim();
// Navigate to the created client // Navigate to the created client
router.push('/client?client=' + encodeURIComponent(createdClient.name)); router.push('/client?client=' + encodeURIComponent(stripped_name));
} else { } else {
// TODO: Implement save logic // TODO: Implement save logic
notificationStore.addSuccess("Changes saved successfully!"); notificationStore.addSuccess("Changes saved successfully!");