fix bug on client create redirect
This commit is contained in:
parent
9596798bf4
commit
786d4ecd39
1 changed files with 2 additions and 1 deletions
|
|
@ -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!");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue