Compare commits
40 Commits
3c6f90f103
...
v2_test2
| Author | SHA1 | Date | |
|---|---|---|---|
| e74731b789 | |||
| 8694856fc9 | |||
| 3d2b70609d | |||
| dd260e229a | |||
| 0bc8f85bee | |||
| 496534f76a | |||
| d681f6739b | |||
| 64de7ea34c | |||
| 25c913c572 | |||
| f34a54a33c | |||
| b511cbbdaf | |||
| 17c040f0d3 | |||
| f4a1da9ded | |||
| 79de035ae7 | |||
| ddc844456d | |||
| fef72df927 | |||
| 134216c5f5 | |||
| 685c201840 | |||
| fd343f098e | |||
| 053d7f79da | |||
| 60a088236b | |||
| 768d82a026 | |||
| 1c51c7fbf5 | |||
| 2196890105 | |||
| 4bf27702a4 | |||
| 4bf65b6eef | |||
| 98c6622e1f | |||
| e0baa07c4f | |||
| e2d951ccbf | |||
| cdff6c1966 | |||
| 00fe34bc0e | |||
| 910ea908c3 | |||
| 017d3b18ef | |||
| 61efc14b9a | |||
| f3a28ddb30 | |||
| 1dc8a64f9f | |||
| 56371267bc | |||
| a68fe3970f | |||
| 217b1d89ea | |||
| 4f2e3776ed |
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -9,7 +9,7 @@ register = template.Library()
|
||||
|
||||
|
||||
cargo_type_for_show = {
|
||||
'letter': _('Документы/письмо'),
|
||||
'letter': _('Документы'),
|
||||
'package': _('Посылка'),
|
||||
'passenger': _('Попутчик'),
|
||||
'parcel': _('Бандероль'),
|
||||
|
||||
@@ -239,7 +239,7 @@ body {
|
||||
}
|
||||
|
||||
header {
|
||||
margin-top: 20px;
|
||||
/*margin-top: 20px;*/
|
||||
padding: 5px 20px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
height: fit-content;
|
||||
box-sizing: border-box;
|
||||
|
||||
z-index: 1000;
|
||||
|
||||
.overlay{
|
||||
--bg: #F8F8F8CC;
|
||||
--backdrop-filter: blur(2px);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
31
static/v2/js/blocks/b_my_routes.js
Normal file
31
static/v2/js/blocks/b_my_routes.js
Normal 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()
|
||||
}
|
||||
@@ -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()
|
||||
}
|
||||
@@ -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}&`;
|
||||
})
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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" %}">
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 %}
|
||||
@@ -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 %}
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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="">
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
@@ -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="">
|
||||
|
||||
@@ -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="">
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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' %}
|
||||
|
||||
@@ -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' %}
|
||||
|
||||
Reference in New Issue
Block a user