Make customer add and edit forward back to edit form #62
This commit is contained in:
parent
e371d9900d
commit
69bf01fa27
3 changed files with 8 additions and 3 deletions
|
|
@ -27,6 +27,9 @@ customer_create_submit:
|
|||
controller: App\Controller\CustomerController::addSubmit
|
||||
methods: [POST]
|
||||
|
||||
customer_update_blank:
|
||||
path: /customers
|
||||
|
||||
customer_update:
|
||||
path: /customers/{id}
|
||||
controller: App\Controller\CustomerController::updateForm
|
||||
|
|
|
|||
|
|
@ -294,7 +294,8 @@ class CustomerController extends BaseController
|
|||
|
||||
// return successful response
|
||||
return $this->json([
|
||||
'success' => 'Changes have been saved!'
|
||||
'success' => 'Changes have been saved!',
|
||||
'id' => $row->getID()
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -457,7 +458,8 @@ class CustomerController extends BaseController
|
|||
|
||||
// return successful response
|
||||
return $this->json([
|
||||
'success' => 'Changes have been saved!'
|
||||
'success' => 'Changes have been saved!',
|
||||
'id' => $cust->getID()
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -434,7 +434,7 @@
|
|||
{% if app.request.query.get('ref') == 'jo' %}
|
||||
window.location.href = "{{ url('jo_in') }}";
|
||||
{% else %}
|
||||
window.location.href = "{{ url('customer_list') }}";
|
||||
window.location.href = "{{ url('customer_update_blank') }}/" + response.id;
|
||||
{% endif %}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue