diff --git a/static/js/user_profile_2.js b/static/js/user_profile_2.js index 8fc48ea..c26abbd 100644 --- a/static/js/user_profile_2.js +++ b/static/js/user_profile_2.js @@ -60,6 +60,8 @@ function select_tab_profile (el,url,owner_type=null, check_orders_required) { } document.querySelector("#ru_lang").href = confirm_url_f_lang_ru document.querySelector("#en_lang").href = confirm_url_f_lang_en + + daterangepickerInit($('.w_daterangepicker'), daterangepickerInit) // let header = document.querySelector("header") // header.scrollIntoView({ // behavior: "smooth", diff --git a/static/v2/js/forms/f_make_poster_order.js b/static/v2/js/forms/f_make_poster_order.js index fed8d28..af84c08 100644 --- a/static/v2/js/forms/f_make_poster_order.js +++ b/static/v2/js/forms/f_make_poster_order.js @@ -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; diff --git a/templates/blocks/routes/b_my_routes_list.html b/templates/blocks/routes/b_my_routes_list.html index 31d869d..38d7d61 100644 --- a/templates/blocks/routes/b_my_routes_list.html +++ b/templates/blocks/routes/b_my_routes_list.html @@ -3,100 +3,3 @@ {% include "widgets/routes/w_my_route.html" %} {% endfor %} - - -{#