0.0.12 form poster

This commit is contained in:
SBD
2025-01-12 18:21:08 +03:00
parent 4231e85a8e
commit 7357e750ae
4 changed files with 25 additions and 100 deletions

View File

@@ -9,7 +9,26 @@ function makePosterOrder(form) {
data: formData,
data_type: 'formData',
success: function (res) {
if (!res) return;
let created_route_id = res.route_id;
if (!created_route_id) return;
let profile_root = document.querySelector(".info_profile")
if (!profile_root) return;
profile_root.innerHTML = res.html
let created_route = document.querySelector(`[data-number-of-route="${created_route_id}"]`);
created_route.scrollIntoView({
behavior:"smooth",
block:'start',
inline:'start'
});
let new_url = window.location.pathname
new_url.replace('/create_route_for_customer', '/my_routes');
new_url.replace('/create_route_for_mover', '/my_routes');
window.location.pathname.replace(new_url, '')
}, error: function (res) {
if (!res.responseJSON) return;