40 Commits

Author SHA1 Message Date
SBD
e74731b789 0.0.185 route forms 2025-03-05 14:46:06 +03:00
SBD
8694856fc9 Merge remote-tracking branch 'origin/v2' into v2 2025-03-05 14:31:28 +03:00
SBD
3d2b70609d 0.0.184 w_route_card 2025-03-05 14:30:00 +03:00
SDE
dd260e229a 2.1.46 get_routes_Dict change sort routes 2025-02-28 17:53:50 +03:00
SBD
0bc8f85bee 0.0.183 routes 2025-02-28 17:51:42 +03:00
SBD
496534f76a 0.0.182 routes 2025-02-28 17:37:20 +03:00
SBD
d681f6739b 0.0.181 routes 2025-02-28 17:24:17 +03:00
SDE
64de7ea34c 2.1.45 country short_code > code 2025-02-28 17:22:50 +03:00
SBD
25c913c572 0.0.180 routes 2025-02-28 17:21:37 +03:00
SBD
f34a54a33c 0.0.179 routes 2025-02-28 17:14:58 +03:00
SBD
b511cbbdaf 0.0.178 routes 2025-02-28 17:09:16 +03:00
SBD
17c040f0d3 Merge remote-tracking branch 'origin/v2' into v2 2025-02-28 17:06:01 +03:00
SBD
f4a1da9ded 0.0.177 routes 2025-02-28 17:05:56 +03:00
SDE
79de035ae7 2.1.45 fixes text in create routes forms 2025-02-28 16:49:43 +03:00
SDE
ddc844456d 2.1.44 get_routes_Dict add now_DT 2025-02-28 16:24:50 +03:00
SBD
fef72df927 Merge remote-tracking branch 'origin/v2' into v2 2025-02-28 16:07:58 +03:00
SBD
134216c5f5 0.0.176 routes 2025-02-28 16:07:53 +03:00
SDE
685c201840 2.1.43 fix 2025-02-28 15:42:44 +03:00
SBD
fd343f098e 0.0.175 routes 2025-02-28 15:26:10 +03:00
SBD
053d7f79da Merge remote-tracking branch 'origin/v2' into v2 2025-02-28 15:17:05 +03:00
SBD
60a088236b 0.0.174 routes 2025-02-28 15:16:49 +03:00
SDE
768d82a026 2.1.42 elements_on_page set 25 2025-02-28 15:15:48 +03:00
SDE
1c51c7fbf5 2.1.41 create_or_change_route_ajax get route_id by POST 2025-02-28 15:12:58 +03:00
SBD
2196890105 0.0.173 routes 2025-02-28 15:12:04 +03:00
SBD
4bf27702a4 Merge remote-tracking branch 'origin/v2' into v2 2025-02-28 14:53:31 +03:00
SBD
4bf65b6eef 0.0.172 routes 2025-02-28 14:53:26 +03:00
SDE
98c6622e1f 2.1.40 cargo_type default change 2025-02-28 14:43:34 +03:00
SBD
e0baa07c4f 0.0.171 routes 2025-02-28 14:42:21 +03:00
SBD
e2d951ccbf Merge remote-tracking branch 'origin/v2' into v2 2025-02-28 14:33:00 +03:00
SBD
cdff6c1966 0.0.170 routes 2025-02-28 14:32:54 +03:00
SDE
00fe34bc0e 2.1.40 cargo_type_for_show сге 2025-02-28 14:24:44 +03:00
SBD
910ea908c3 0.0.169 routes 2025-02-24 17:49:24 +03:00
SBD
017d3b18ef 0.0.168 routes 2025-02-24 17:46:38 +03:00
SBD
61efc14b9a 0.0.167 routes 2025-02-24 17:44:03 +03:00
SBD
f3a28ddb30 0.0.166 routes 2025-02-24 17:13:29 +03:00
SBD
1dc8a64f9f 0.0.164 routes 2025-02-17 20:16:48 +03:00
SBD
56371267bc 0.0.163 routes 2025-02-17 20:01:54 +03:00
SBD
a68fe3970f 0.0.162 routes 2025-02-17 19:16:54 +03:00
SBD
217b1d89ea Merge remote-tracking branch 'origin/v2' into v2 2025-02-17 17:20:10 +03:00
SBD
4f2e3776ed 0.0.161 routes 2025-02-17 17:20:04 +03:00
34 changed files with 286 additions and 75 deletions

View File

@@ -25,7 +25,7 @@ def search_cities_in_db(search_str):
for item in objs_wo_tz:
item.get_n_save_timezone()
res_data = City.objects.filter(id__in=ids).values(
'id', 'name', 'country__name', 'timezone', 'country__flag', 'country__short_code'
'id', 'name', 'country__name', 'timezone', 'country__flag', 'country__code'
)
return list(res_data)

View File

@@ -58,7 +58,8 @@ class RouteForm(forms.ModelForm):
try:
if 'type_transport' in self.errors:
self.errors.pop('type_transport')
if self.instance and self.instance.owner_type == 'customer':
self.errors.pop('type_transport')
if 'phone' in cleaned_data and 'phone' in cleaned_data:
from BaseModels.validators.form_field_validators import get_phone_valid_error

View File

@@ -10,7 +10,7 @@ from datetime import datetime, timedelta
from django.db.models import F, Q
import copy
elements_on_page = 10
elements_on_page = 25
def get_cargo_types_by_type_transport(type_transport, form=None):
@@ -245,7 +245,8 @@ def get_routes_Dict(user=None, data=None):
).order_by(
F('rising_DT').desc(nulls_last=True),
# '-rising_DT',
'-departure_DT', '-arrival_DT', '-modifiedDT'
'-arrival_DT', '-modifiedDT'
# '-departure_DT',
)
routes_count = routes.count()
@@ -297,7 +298,8 @@ def get_routes_Dict(user=None, data=None):
'routes': routes,
'last_block': last_block,
'last_el': to_el,
'next_page_els_count': next_page_els_count
'next_page_els_count': next_page_els_count,
'now_DT': datetime.now(),
})
return res_Dict

View File

@@ -408,6 +408,10 @@ def create_or_change_route_ajax(request, route_id=None):
tpl_form_by_owner_type = 'v2/forms/f_create_mover_route.html'
tpl_block_by_owner_type = 'v2/blocks/b_create_mover_route.html'
if 'route_id' in data and data['route_id']:
route_id = data['route_id']
# del data['route_id']
route = None
if route_id:
route = Route.objects.get(id=route_id)

View File

@@ -76,7 +76,9 @@ class Route(BaseModel):
verbose_name=_('Куда можете доставить?'),
null=True, blank=True
)
cargo_type = models.CharField(choices=cargo_type_choices, default='parcel', verbose_name=_('Могу перевезти'))
cargo_type = models.CharField(
choices=cargo_type_choices, default='letter', verbose_name=_('Могу перевезти')
)
# не используем с v2
weight = models.IntegerField(verbose_name=_('Укажите вес до (кг)'), null=True, blank=True)
phone = models.CharField(verbose_name=_('Укажите номер для связи'), blank=True, null=True)

View File

@@ -9,7 +9,7 @@ register = template.Library()
cargo_type_for_show = {
'letter': _('Документы/письмо'),
'letter': _('Документы'),
'package': _('Посылка'),
'passenger': _('Попутчик'),
'parcel': _('Бандероль'),

View File

@@ -239,7 +239,7 @@ body {
}
header {
margin-top: 20px;
/*margin-top: 20px;*/
padding: 5px 20px;
position: sticky;
top: 0;

View File

@@ -25,9 +25,10 @@ const initialiseState = (reg) => {
}
const showNotAllowed = (message) => {
const button = document.querySelector('form>button');
button.innerHTML = `${message}`;
button.setAttribute('disabled', 'true');
// const button = document.querySelector('form>button');
// button.innerHTML = `${message}`;
// button.setAttribute('disabled', 'true');
console.log(message);
};

View File

@@ -4,6 +4,7 @@
border-radius: 10px;
position: relative;
min-height: 254px;
margin-top: 120px;
.first_imgs_line, .second_imgs_line {
display: flex;
align-items: center;

View File

@@ -5,6 +5,8 @@
height: fit-content;
box-sizing: border-box;
z-index: 1000;
.overlay{
--bg: #F8F8F8CC;
--backdrop-filter: blur(2px);

View File

@@ -12,16 +12,19 @@
display: grid;
grid-template-columns: 30% calc(100% - 30% - 41px);
gap: 41px;
/*.routes_search_results{*/
/* @media (max-width: 1160px) {*/
/* width: calc(100dvw - 40px);*/
/* }*/
/*}*/
.routes_search_results{
.next_page{
margin: 50px 0;
width: 100%;
background: #212121;
height: 1px;
}
}
@media (max-width: 1440px) {
margin-top: 40px;
}
@media (max-width: 800px) {
grid-template-columns: 1fr;
grid-template-columns: 100%;
}
@media (max-width: 768px) {
margin-top: 40px;

View File

@@ -65,6 +65,104 @@
--route-text-container-bg: #FFFFFF;
--route-text-img-filter: unset;
}
&.disabled{
--route-card-bg: #FFFFFF;
--card-splitter-bg: #E6E6E6;
--route-text-container-bg: #F1F1F1;
--route-text-img-filter: brightness(0) saturate(100%) invert(100%) sepia(2%) saturate(256%) hue-rotate(113deg) brightness(115%) contrast(89%);
.route_card_info_data{
.route_card_text_container{
color: #A9A9A9!important;
}
}
.card_owner_type.mover, .card_owner_type.customer{
--route-owner-type-color: #A9A9A9!important;
}
.route_btn.inactive, .route_btn, .route_btn.solid{
--route-btn-bg: #FFF;
&.solid{
--route-btn-bg: #A9A9A9;
&:hover{
--route-btn-hover-bg: #A9A9A9!important;
--route-btn-hover-text-color: #FFF!important;
}
.route_btn_title{
--route-btn-title-color: #FFF!important;
}
}
--route-btn-border: 1.5px solid #A9A9A9;
--route-btn-text-data-color: #A9A9A9!important;
--route-btn-hover-text-color: #A9A9A9!important;
box-shadow: none!important;
&:hover{
--route-btn-hover-bg: #FFF!important;
}
.route_btn_title{
--route-btn-title-color: #A9A9A9!important;
}
}
.route_btn img{
filter: brightness(0) saturate(100%) invert(77%) sepia(0%) saturate(270%) hue-rotate(138deg) brightness(90%) contrast(83%);
}
--route-cargo-type-color: #A9A9A9;
.route_card_owner_avatar{
filter: grayscale(1);
}
.card_owner_name, div.orange{
color: #A9A9A9!important;
}
.route_card_route_data{
.route_way_data{
.route_transport{
.route_transport_name{
color: #A9A9A9!important;
}
img{
filter: grayscale(1);
}
}
}
.from_to_place_data{
.label{
color: #A9A9A9!important;
}
.place{
.place_title{
color: #A9A9A9!important;
}
.country{
.country_code{
color: #A9A9A9!important;
}
}
img{
filter: grayscale(1);
}
}
}
}
.route_number{
color: #A9A9A9!important;
}
.route_date_data{
color: #A9A9A9!important;
}
.way_progress_line_container{
.way_progress_arrows_line{display: none!important;}
.way_progress_line{
background: #A9A9A9!important;
}
.way_progress_round:first-of-type, .way_progress_round:last-of-type{
border: 3px solid #A9A9A9!important;
}
}
.route_card_actions_container{
.delete_route{
color: #FF613A;
}
}
}
.route_card_info_data{
&.mobile{display: none}
@media (max-width: 1024px) {
@@ -122,6 +220,7 @@
}
.route_card_text_container{
position: relative;
overflow-wrap: anywhere;
@media (max-width: 992px) {
--big-font-size: 14px;
}
@@ -420,8 +519,8 @@
}
}
.way_progress_line{
width: calc(100% - 10px);
margin-left: 10px;
width: calc(100% - 20px);
margin-left: 11px;
height: 4px;
position: absolute;
top: 2px;
@@ -430,7 +529,7 @@
}
.way_progress_arrows_line{
width: calc(100% - 10px);
margin-left: 10px;
margin-left: 11px;
height: 4px;
position: absolute;
top: 2px;
@@ -502,6 +601,13 @@
align-items: center;
justify-content: center;
text-align: unset;
.route_btn_title{
max-width: calc(100% - 21px);
font-size: 14px!important;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
&:not(&.inactive):not(&.unhovered){
&:hover{
@@ -575,6 +681,10 @@
display: grid;
grid-template-columns: calc(100% - 47px) 37px;
gap: 10px;
.route_btn{
max-width: 155px!important;
width: fit-content;
}
}
.chat_btn{
padding: 6.5px;
@@ -587,4 +697,4 @@
filter: invert(1);
}
}
}
}

View File

@@ -54,7 +54,7 @@
.w_select_country_content{
position: absolute;
top: var(--select-height);
z-index: 100;
z-index: 10000;
width: 100%;
background: #FFFFFF;
border: 2px solid var(--select-border);

View File

@@ -0,0 +1,31 @@
function loadMoreMyRoutesRoutes (el){
if (!el) return;
let formData = new FormData();
let from_el = parseInt(el.dataset.from_el);
let to_el = from_el + parseInt(el.dataset.more_count);
formData.append('from_el', from_el);
formData.append('to_el', to_el);
let request = new api({
url: '/routes/get_routes/',
data: formData,
data_type: 'formData',
success: (res) => {
if (!res.html) return;
let $parent = $('.info_profile')[0];
let $next_page_btn = $parent.querySelector('.container_btns[data-next_page_btn]')
$next_page_btn.remove();
appendNodes($parent, templateStrToNode(`
<div class="next_page" style="
margin: 50px 0;
width: 100%;
background: #212121;
height: 1px;"></div>
`));
appendNodes($parent, templateStrToNode(res.html));
}
});
request.ajaxRequest()
}

View File

@@ -17,11 +17,48 @@ function searchRoutes (form=undefined) {
data_type: 'formData',
success: function (res) {
if (!res.html) return;
let $parent = $('.routes_search_results .routes_cont')[0]
let $parent = $('.routes_search_results')[0];
$parent.innerHTML = res.html;
}
})
request.ajaxRequest()
}
function loadMoreRoutes (el) {
if (!el) return;
let from_el = parseInt(el.dataset.from_el);
let to_el = from_el + parseInt(el.dataset.more_count);
let $filter_form = $('.b_filter_routes form')[0];
let $search_form = $('.b_search_routes form')[0];
let formData = getFormData($search_form);
formData = getFormData($filter_form, formData);
let owner_type = 'mover'
formData.append('owner_type', owner_type);
formData.append('from_el', from_el);
formData.append('to_el', to_el);
let query = formDataToQueryString(formData, [$filter_form, $search_form]);
query+=`owner_type=${owner_type}`
window.history.pushState(null, null, `?${query}`);
let request = new api({
url: '/routes/find_routes/',
data: formData,
data_type: 'formData',
success: function (res) {
if (!res.html) return;
let $parent = $('.routes_search_results')[0];
let $next_page_btn = $parent.querySelector('.container_btns[data-next_page_btn]')
$next_page_btn.remove();
appendNodes($parent, templateStrToNode(`
<div class="next_page"></div>
`));
appendNodes($parent, templateStrToNode(res.html));
}
})
request.ajaxRequest()
}

View File

@@ -266,18 +266,8 @@ function getFormDataElValue($field) {
function formDataToQueryString (formData, forms) {
let str = ``
formData.forEach((index, name) => {
let el = null;
for (let i = 0; i < forms.length; i++) {
let _el = forms[i].querySelector(`[data-name="${name}"]`)
if (_el){
el = _el;
i = forms.length;
}
}
if (!el) return;
let value = getFormDataElValue(el);
formData.forEach((value, name) => {
str+=`${name}=${value}&`;
})

View File

@@ -4,6 +4,7 @@ function makeMoverOrder(form) {
let formData = getFormData(form);
formData.append('owner_type', 'mover');
if (form.dataset.route_id) formData.set('route_id', form.dataset.route_id);
let request = new api({
url: '/routes/create_or_change_route/',
data: formData,

View File

@@ -4,6 +4,7 @@ function makePosterOrder(form) {
let formData = getFormData(form);
formData.append('owner_type', 'customer');
if (form.dataset.route_id) formData.set('route_id', form.dataset.route_id);
let request = new api({
url: '/routes/create_or_change_route/',
data: formData,

View File

@@ -45,7 +45,7 @@ function daterangepickerInit(el, callback, date) {
$($datarangepicker).daterangepicker({
"autoapply": true,
"linkedCalendars": false,
"singleDatePicker": !!el.dataset.range,
"singleDatePicker": !!!$datarangepicker.dataset.range,
"timePicker": false,
"timePicker24Hour": false,
"minDate": min_date,

View File

@@ -1,5 +1,5 @@
function changeRoute(el) {
if (!el) return;
if (!el || el.closest('.disabled')) return;
let $parent = el.closest(".w_route_card")
if (!$parent) return;
@@ -14,6 +14,11 @@ function changeRoute(el) {
success: (res) => {
if (!res.html) return;
$(".info_profile")[0].innerHTML = res.html;
window.scrollTo({
top: 0,
left: 0,
behavior: "smooth"
});
datarangepickerinitAll()
}, error: (res) => {
@@ -47,7 +52,7 @@ function deleteRoute(el) {
}
function raiseRoute(el) {
if (!el || el.dataset.actions_count === '0') return;
if (!el || el.dataset.actions_count === '0' || el.closest('.disabled')) return;
let $parent = el.closest(".w_route_card")
if (!$parent) return;
@@ -90,7 +95,7 @@ function raiseRoute(el) {
}
function highlightRoute(el) {
if (!el || el.dataset.actions_count === '0') return;
if (!el || el.dataset.actions_count === '0' || el.closest('.disabled')) return;
let $parent = el.closest(".w_route_card")
if (!$parent) return;
@@ -118,7 +123,7 @@ function highlightRoute(el) {
}
function respondBtnClickEvent(el, authentificated) {
if (!el) return;
if (!el || el.closest('.disabled')) return;
if (authentificated !== 'False') {
let $parent = el.closest(".w_route_card")
let $responde_cont = $parent.querySelector(".respond_route_cont")
@@ -135,16 +140,16 @@ function respondBtnClickEvent(el, authentificated) {
}
function clickedUnregisteredMsgRoute (el) {
if (!el) return;
if (!el || el.closest('.disabled')) return;
let $parent = el.closest(".route_card_text_container")
$parent.classList.add('clicked');
}
function unwrapRouteComment (el){
if (!el) return;
if (!el || el.closest('.disabled')) return;
let $parent = el.closest(".wrapped")
if (!$parent) return;
$parent.classList.remove('wrapped');
}
}

View File

@@ -37,6 +37,7 @@
<script src='{% static "v2/js/widgets/w_textarea_w_counter.js" %}'></script>
<script src='{% static "v2/js/forms/f_make_poster_order.js" %}'></script>
<script src='{% static "v2/js/forms/f_make_mover_order.js" %}'></script>
<script src='{% static "v2/js/blocks/b_my_routes.js" %}'></script>
{% include "connect_ws_js.html" %}
<link rel="stylesheet" href="{% static "v2/css/widgets/w_route_card.css" %}">

View File

@@ -16,20 +16,20 @@
<form name="filter_routes">
<div class="label" style="margin-bottom: 16px;">{% trans "Способ перевозки" %}</div>
<div class="field_container line" data-type="checkbox" data-name="type_transport">
<div class="checkbox{% if route_form.initial.type_transport %} checked{% endif %}" data-value="road" onclick="chooseCheckbox(this, searchRoutes)"></div>
<div class="checkbox{% if 'road' in form.initial.type_transport %} checked{% endif %}" data-value="road" onclick="chooseCheckbox(this, searchRoutes)"></div>
<div class="checkbox_label" onclick="chooseCheckbox(this, searchRoutes)">{% trans "Автоперевозка" %}</div>
{% if route_form.errors.type_transport %}<div class="error_container">{{ route_form.errors.type_transport.0 }}</div>{% endif %}
{% if form.errors.type_transport %}<div class="error_container">{{ form.errors.type_transport.0 }}</div>{% endif %}
</div>
<div class="field_container line" data-type="checkbox" data-name="type_transport">
<div class="checkbox{% if route_form.initial.type_transport %} checked{% endif %}" data-value="avia" onclick="chooseCheckbox(this, searchRoutes)"></div>
<div class="checkbox{% if 'avia' in form.initial.type_transport %} checked{% endif %}" data-value="avia" onclick="chooseCheckbox(this, searchRoutes)"></div>
<div class="checkbox_label" onclick="chooseCheckbox(this, searchRoutes)">{% trans "Авиатранспорт" %}</div>
{% if route_form.errors.type_transport %}<div class="error_container">{{ route_form.errors.type_transport.0 }}</div>{% endif %}
{% if form.errors.type_transport %}<div class="error_container">{{ form.errors.type_transport.0 }}</div>{% endif %}
</div>
<div class="field_container" data-type="select" data-name="cargo_type">
<label for="id_cargo_type">{% trans "Тип посылки" %}</label>
<select name="cargo_type" id="id_cargo_type" onchange="searchRoutes()">
<option value="">{% trans "Любой" %}</option>
{% for cargo_type in route_form.fields.cargo_type.choices %}
{% for cargo_type in form.fields.cargo_type.choices %}
<option value="{{ cargo_type.0 }}">{{ cargo_type.1 }}</option>
{% endfor %}
</select>

View File

@@ -5,4 +5,15 @@
{% for route in routes %}
{% include 'v2/widgets/w_route_card.html' with route=route %}
{% endfor %}
</div>
</div>
{% if not last_block %}
<div class="container_btns" data-next_page_btn="true" style="--justify: center;margin-top: 20px">
<div class="primary_btn"
onclick="loadMoreMyRoutesRoutes(this)"
style="--padding: 19px 34px 21px 34px"
data-from_el="{{ last_el }}"
data-more_count="{{ next_page_els_count }}">
{% trans "Показать ещё" %} {{ next_page_els_count }}
</div>
</div>
{% endif %}

View File

@@ -5,6 +5,14 @@
{% include "v2/widgets/w_route_card_for_search.html" %}
{% endfor %}
</div>
<div class="container_btns" style="--justify: center;">
<div class="primary_btn" style="--padding: 19px 34px 21px 34px">{% trans "Показать ещё 10" %}</div>
</div>
{% if not last_block %}
<div class="container_btns" data-next_page_btn="true" style="--justify: center;margin-top: 20px">
<div class="primary_btn"
onclick="loadMoreRoutes(this)"
style="--padding: 19px 34px 21px 34px"
data-from_el="{{ last_el }}"
data-more_count="{{ next_page_els_count }}">
{% trans "Показать ещё" %} {{ next_page_els_count }}
</div>
</div>
{% endif %}

View File

@@ -2,10 +2,10 @@
{% load i18n %}
{% load reference_data_tags %}
<div class="cw_w_select_widget_for_select" data-id="{{ id }}" data-name="{{ name }}/{{ country__name }}" data-country_code="{{ country__short_code }}" data-flag="{{ MEDIA_URL }}{{ country__flag }}" onclick="selectCountry(this)" data-now="{{ timezone|get_cur_DT_by_tz }}">
<div class="cw_w_select_widget_for_select" data-id="{{ id }}" data-name="{{ name }}/{{ country__name }}" data-country_code="{{ country__code }}" data-flag="{{ MEDIA_URL }}{{ country__flag }}" onclick="selectCountry(this)" data-now="{{ timezone|get_cur_DT_by_tz }}">
<div class="cw_country_inf_part">
<img src="{{ MEDIA_URL }}{{ country__flag }}" alt="">
<div class="cw_country_code">{{ country__short_code }}</div>
<div class="cw_country_code">{{ country__code }}</div>
</div>
<div class="cw_name_country">{{ name }}/{{ country__name }}</div>
</div>

View File

@@ -17,10 +17,10 @@
</div>
</div>
</div>
<div class="route_btn mobile inactive" style="--route-btn-width: auto;--route-btn-height: min-content;--route-btn-padding: 7.5px 11px;--route-btn-margin: 20.5px 0 0 0;">
<a class="route_btn mobile inactive" {% if now_DT <= route.arrival_DT %}href="tel:{{ route.phone }}"{% endif %} style="--route-btn-width: auto;--route-btn-height: min-content;--route-btn-padding: 7.5px 11px;--route-btn-margin: 20.5px 0 0 0;">
<img src="{% static "v2/icons/widgets/w_route_card/phone_half_opacity.svg" %}" alt="">
<div class="route_btn_title big">{{ route.phone }}</div>
</div>
</a>
<div class="route_card_actions_container mobile">
<div class="route_btn solid" style="--route-btn-width: auto;" data-action="change" onclick="changeRoute(this)">
<div class="route_btn_title">{% trans "Редактировать" %}</div>

View File

@@ -2,15 +2,15 @@
{% load i18n %}
<div class="respond_route_cont mobile" style="display: none;margin-top: 23px;">
<div class="route_btn unhovered" style="--route-btn-width: max-content;--route-btn-height: min-content;--route-btn-padding: 7.5px 11px;">
<div class="route_btn unhovered" style="--route-btn-height: min-content;--route-btn-padding: 7.5px 11px;">
<img src="{% static "v2/icons/widgets/w_route_card/phone.svg" %}" alt="">
<div class="route_btn_title big">
<a {% if now_DT <= route.arrival_DT %}href="tel:{{ route.phone }}"{% endif %} class="route_btn_title big">
{% if route.phone %}
{{ route.phone|truncatechars:20 }}
{% else %}
{% trans "Номер не указан" %}
{% endif %}
</div>
</a>
</div>
<div class="chat_btn">
<img src="{% static "v2/icons/widgets/w_route_card/chat.png" %}" alt="">

View File

@@ -12,10 +12,10 @@
<div class="card_owner_type {{ route.owner_type }}">{% if route.owner_type == 'customer' %}{% trans "Нужен перевозчик" %}{% else %}{% trans "Могу перевезти" %}{% endif %}</div>
<div class="card_cargo_type">{% trans "Тип посылки:" %} <div class="orange">{{ route.cargo_type|get_cargo_type_for_show }}</div></div>
</div>
<div class="route_btn inactive" style="--route-btn-width: max-content;--route-btn-height: min-content;--route-btn-padding: 7.5px 11px;">
<a class="route_btn inactive" {% if now_DT <= route.arrival_DT %}href="tel:{{ route.phone }}"{% endif %} style="--route-btn-width: max-content;--route-btn-height: min-content;--route-btn-padding: 7.5px 11px;max-width: 155px;">
<img src="{% static "v2/icons/widgets/w_route_card/phone_half_opacity.svg" %}" alt="">
<div class="route_btn_title big">{{ route.phone }}</div>
</div>
</a>
</div>
<div class="route_card_text_container">
{% if route.comment %}

View File

@@ -15,13 +15,13 @@
<div class="respond_route_cont" style="display: none;">
<div class="route_btn unhovered" style="--route-btn-width: max-content;--route-btn-height: min-content;--route-btn-padding: 7.5px 11px;">
<img src="{% static "v2/icons/widgets/w_route_card/phone.svg" %}" alt="">
<div class="route_btn_title big">
<a class="route_btn_title big" {% if now_DT <= route.arrival_DT %}href="tel:{{ route.phone }}"{% endif %}>
{% if route.phone %}
{{ route.phone|truncatechars:20 }}
{% else %}
{% trans "Номер не указан" %}
{% endif %}
</div>
</a>
</div>
<div class="chat_btn">
<img src="{% static "v2/icons/widgets/w_route_card/chat.png" %}" alt="">

View File

@@ -5,7 +5,7 @@
<div class="route_card_route_data_cont">
<div class="route_card_route_data">
<div class="from_to_place_data">
<div class="label departure_from">{% trans "Забрать из:" %}</div>
<div class="label departure_from">{% if route.owner_type == 'mover' %}{% trans "Выезжаю из:" %}{% else %}{% trans "Забрать из:" %}{% endif %}</div>
<div class="place">
<div class="country">
<img src="{{ route.from_city.country.flag.url }}" alt="">
@@ -42,7 +42,7 @@
{% endif %}
</div>
<div class="from_to_place_data">
<div class="label arrival_to">{% trans "Доставить в:" %}</div>
<div class="label arrival_to">{% if route.owner_type == 'mover' %}{% trans "Прибываю в:" %}{% else %}{% trans "Доставить в:" %}{% endif %}</div>
<div class="place">
<div class="country">
<img src="{{ route.to_city.country.flag.url }}" alt="">
@@ -80,7 +80,7 @@
</div>
<div class="right_part_route_card">
<div class="from_to_place_data">
<div class="label departure_from">{% trans "Забрать из:" %}</div>
<div class="label departure_from">{% if route.owner_type == 'mover' %}{% trans "Выезжаю из:" %}{% else %}{% trans "Забрать из:" %}{% endif %}</div>
<div class="place">
<div class="country">
<img src="{{ route.from_city.country.flag.url }}" alt="">
@@ -121,7 +121,7 @@
{% endif %}
</div>
<div class="from_to_place_data">
<div class="label arrival_to">{% trans "Доставить в:" %}</div>
<div class="label arrival_to">{% if route.owner_type == 'mover' %}{% trans "Прибываю в:" %}{% else %}{% trans "Доставить в:" %}{% endif %}</div>
<div class="place">
<div class="country">
<img src="{{ route.to_city.country.flag.url }}" alt="">

View File

@@ -1,7 +1,7 @@
{% load static %}
{% load i18n %}
<form name="make_poster_order" class="f_make_poster_order" data-owner_type="customer">
<form name="make_poster_order" {% if form.instance.id %}data-route_id="{{ form.instance.id }}"{% endif %} class="f_make_poster_order" data-owner_type="customer">
<div class="form_line">
<div class="field_container" data-type="radio" data-name="type_transport">
{% trans "Обязательно учитывайте Правила и особенности перевозки выбранным Вами видом транспорта" as attention_type_transport %}

View File

@@ -1,7 +1,7 @@
{% load static %}
{% load i18n %}
<form name="make_mover_order" class="f_make_poster_order" data-owner_type="mover">
<form name="make_mover_order" class="f_make_poster_order" {% if form.instance.id %}data-route_id="{{ form.instance.id }}"{% endif %} data-owner_type="mover">
<div class="form_line">
<div class="field_container" data-type="radio" data-name="type_transport">
{% trans "Обязательно учитывайте Правила и особенности перевозки выбранным Вами видом транспорта" as attention_type_transport %}
@@ -16,12 +16,12 @@
<div class="form_line _50_grid">
<div class="field_container" data-type="location" data-name="from_city" data-datepicker="departure_DT">
<label for="id_from_city"><div class="required_field_icon">*</div> {% trans "Пункт отправления" %}</label>
{% include 'v2/widgets/w_select_country.html' with name='from_city' placeholder=placeholder_for_city initial=form.initial.from_city %}
{% include 'v2/widgets/w_select_country.html' with name='from_city' placeholder=placeholder_for_city initial=form.instance.from_city %}
{% if form.errors.from_city %}<div class="error_container">{{ form.errors.from_city.0 }}</div>{% endif %}
</div>
<div class="field_container" data-type="location" data-name="to_city" data-datepicker="arrival_DT">
<label for="id_from_city"><div class="required_field_icon">*</div> {% trans "Пункт прибытия" %}</label>
{% include 'v2/widgets/w_select_country.html' with name='to_city' placeholder=placeholder_for_city initial=form.initial.to_city %}
{% include 'v2/widgets/w_select_country.html' with name='to_city' placeholder=placeholder_for_city initial=form.instance.to_city %}
{% if form.errors.to_city %}<div class="error_container">{{ form.errors.to_city.0 }}</div>{% endif %}
</div>
</div>
@@ -46,8 +46,8 @@
</div>
<div class="form_line">
<div class="field_container" data-type="input" style="width: 100%" data-name="phone">
{% trans "Если вы оставите это поле пустым - перевозчики смогут только написать вам в личные сообщения на нашем сайте TripWB.com" as attention_phone %}
<label for="id_cargo_type">{% trans "Контактный номер телефона, по которому с Вами могут связаться перевозчики" %}</label>
{% trans "Если вы оставите это поле пустым - отправители смогут только написать вам в личные сообщения на нашем сайте TripWB.com" as attention_phone %}
<label for="id_cargo_type">{% trans "Контактный номер телефона, по которому с Вами могут связаться отправители" %}</label>
<input class="half" style="height: unset;" type="text" name="phone" id="id_phone" placeholder="{% trans 'Укажите телефон' %}"{% if form.initial.phone %} value="{{ form.initial.phone }}" {% endif %} oninput="resetFieldError(this);">
{% if form.errors.phone %}<div class="error_container">{{ form.errors.phone.0 }}</div>{% endif %}
{% include 'v2/widgets/w_pay_attention.html' with text=attention_phone %}
@@ -64,7 +64,7 @@
<div class="form_line">
<div class="field_container line" data-type="checkbox" data-name="receive_msg_by_email">
<div class="checkbox{% if form.initial.receive_msg_by_email %} checked{% endif %}" onclick="chooseCheckbox(this)"></div>
<div class="checkbox_label" onclick="chooseCheckbox(this)">{% trans "Хочу получать уведомления на E-mail о появлении перевозчика по моим критериям" %}</div>
<div class="checkbox_label" onclick="chooseCheckbox(this)">{% trans "Хочу получать уведомления на E-mail о появлении отправителя по моим критериям" %}</div>
{% if form.errors.receive_msg_by_email %}<div class="error_container">{{ form.errors.receive_msg_by_email.0 }}</div>{% endif %}
{% include 'v2/widgets/w_additional_info.html' %}
</div>

View File

@@ -1,7 +1,7 @@
{% load i18n %}
{% load static %}
<div class="w_customer_route_card w_route_card{% if route.is_highlighted_now %} highlighted{% endif %}" data-route_id="{{ route.id }}" data-owner_type="{{ route.owner_type }}">
<div class="w_customer_route_card w_route_card{% if route.is_highlighted_now %} highlighted{% endif %}{% if now_DT > route.arrival_DT %} disabled{% endif %}" data-route_id="{{ route.id }}" data-owner_type="{{ route.owner_type }}">
{% include 'v2/content_widgets/w_route_card/route_card_info_data.html' %}
{% include 'v2/content_widgets/w_route_card/route_card_route_data.html' %}
{% include 'v2/content_widgets/w_route_card/route_card_actions_container.html' %}

View File

@@ -1,7 +1,7 @@
{% load i18n %}
{% load static %}
<div class="w_customer_route_card w_route_card{% if route.is_highlighted_now %} highlighted{% endif %}" data-route_id="{{ route.id }}" data-owner_type="{{ route.owner_type }}">
<div class="w_customer_route_card w_route_card{% if route.is_highlighted_now %} highlighted{% endif %}{% if now_DT > route.arrival_DT %} disabled{% endif %}" data-route_id="{{ route.id }}" data-owner_type="{{ route.owner_type }}">
{% include 'v2/content_widgets/w_route_card/route_card_info_data_for_search.html' %}
{% include 'v2/content_widgets/w_route_card/route_card_route_data.html' %}
{% include 'v2/content_widgets/w_route_card/route_card_actions_container_for_search.html' %}