0.0.12 form poster
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -3,100 +3,3 @@
|
||||
{% include "widgets/routes/w_my_route.html" %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{#<div class="my_route">#}
|
||||
{# <div class="route_info">#}
|
||||
{# <div class="route_info_about">#}
|
||||
{# <span>#}
|
||||
{# Тип:{{ route.get_cargo_type_display }}#}
|
||||
{# </span>#}
|
||||
{##}
|
||||
{# <span>#}
|
||||
{# Вес:{{ route.weight }} кг#}
|
||||
{# </span>#}
|
||||
{##}
|
||||
{# <span>#}
|
||||
{##}
|
||||
{# {{ route.get_type_transport_display }}#}
|
||||
{# </span>#}
|
||||
{##}
|
||||
{# </div>#}
|
||||
{##}
|
||||
{# <div class="route_info_point">#}
|
||||
{##}
|
||||
{# <div>#}
|
||||
{# <div>#}
|
||||
{# <span>#}
|
||||
{# {{ route.from_country.name }}/{{ route.from_city.name }}#}
|
||||
{# </span>#}
|
||||
{##}
|
||||
{# <div></div>#}
|
||||
{# </div>#}
|
||||
{##}
|
||||
{##}
|
||||
{# <span>#}
|
||||
{# {{ route.to_country.name }}/{{ route.to_city.name }}#}
|
||||
{# </span>#}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
{##}
|
||||
{# <div class="route_info_date">#}
|
||||
{# Отправка: {{route.departure_DT }}#}
|
||||
{# Прибытие: {{route.arrival_DT }}#}
|
||||
{# </div>#}
|
||||
{##}
|
||||
{# <div class="route_info_ft_place">#}
|
||||
{# Откуда заберёт:{{ route.from_place }}#}
|
||||
{# Куда доставит:{{ route.to_place }}#}
|
||||
{# </div>#}
|
||||
{##}
|
||||
{# </div>#}
|
||||
{##}
|
||||
{# #}
|
||||
{# <div class="route_contact">#}
|
||||
{##}
|
||||
{# <h2>Контакты перевозчика:</h2>#}
|
||||
{##}
|
||||
{# <div class="route_contact_name">#}
|
||||
{# {{ route.owner.last_name }} {{ route.owner.first_name }}#}
|
||||
{# </div>#}
|
||||
{##}
|
||||
{# <div class="route_contact_phone_email">#}
|
||||
{# {{ route.phone }}#}
|
||||
{# <br>#}
|
||||
{# {{ route.extra_phone }}#}
|
||||
{# <br>#}
|
||||
{# {{ route.owner.email }}#}
|
||||
{# </div>#}
|
||||
{# <div class="button_edit_route">#}
|
||||
{# <button onclick="editRoute({{ route.id }})"#}
|
||||
{# id="edit_route">#}
|
||||
{# Редактировать#}
|
||||
{# </button>#}
|
||||
{# </div>#}
|
||||
{# <div class="button_remove_route">#}
|
||||
{# <button#}
|
||||
{# onclick="confirmRemove(this)"#}
|
||||
{# id="remove_route">#}
|
||||
{# Удалить#}
|
||||
{# </button>#}
|
||||
{# </div>#}
|
||||
{##}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
{% if route.departure_DT %}
|
||||
{% if route.arrival_DT %}
|
||||
{% with current_datetime=route.from_city.get_current_datetime %}
|
||||
{% with departure_datetime=route.departure_DT %}
|
||||
{# time to time solve#}
|
||||
{% with arrival_DT=route.arrival_DT %}
|
||||
{% with highlight_end_DT=route.highlight_end_DT %}
|
||||
{% if current_datetime|date:"Y-m-d H:i:s" > departure_datetime|date:"Y-m-d H:i:s" %}
|
||||
{% if current_datetime|date:"Y-m-d H:i:s" > arrival_DT|date:"Y-m-d H:i:s" %}
|
||||
<div class="carrier-card out_of_date" data-number-of-route="{{ route.id }}">
|
||||
{% else %}
|
||||
<div class="carrier-card {% if route.highlight_color and highlight_end_DT|date:"Y-m-d H:i:s" > current_datetime|date:"Y-m-d H:i:s" %} highlight-color {% endif %}" data-number-of-route="{{ route.id }}">
|
||||
|
||||
Reference in New Issue
Block a user