Resolve "Allow for JO creation from customer vehicle" #863

Merged
jankstudio merged 2 commits from 62-allow-for-jo-creation-from-customer-vehicle into master 2018-03-31 18:45:15 +00:00
3 changed files with 8 additions and 3 deletions
Showing only changes of commit 69bf01fa27 - Show all commits

View file

@ -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

View file

@ -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()
]);
}
}

View file

@ -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 %}
}
});