This commit is contained in:
2023-07-26 16:04:23 +03:00
parent 4d07d613ad
commit 5586f73cae
4 changed files with 73 additions and 11 deletions

View File

@@ -914,7 +914,7 @@ hr {
form.new_route>div{
margin-bottom: 30px;
margin-top: 30px;
display: flex;
display: block ruby;
flex-direction: row;
flex-wrap: wrap;
}
@@ -926,6 +926,7 @@ form.new_route>div.range-slider{
form.new_route{
width:100%;
}
.departure_arrival>div,
@@ -944,7 +945,6 @@ div.from_to_country>div>input:nth-child(3){
display: block;
border-radius: 15px;
border: 1px solid #E6E6E6;
padding: 10px;
color: #272424;
font-family: Inter;
font-size: 16px;
@@ -953,12 +953,13 @@ div.from_to_country>div>input:nth-child(3){
line-height: 22px;
appearance: none;
background: url("/static/img/png/icon-arrow.png") no-repeat calc(100% - 15px) center;
width: 392px;
height: 60px;
}
div.departure_arrival>div>input{
display: block;
border-radius: 15px;
border: 1px solid #E6E6E6;
padding: 10px;
color: #272424;
font-family: Inter;
font-size: 16px;
@@ -966,6 +967,9 @@ div.departure_arrival>div>input{
font-weight: 400;
line-height: 22px;
appearance: none;
width: 392px;
height: 60px;
padding-left: 2px;
}
@@ -1034,18 +1038,22 @@ div.departure_arrival>div>input{
.input_list{
display: none;
}
.input_list.show{
display:block;
margin-top: 80px;
width: 30%;
height: max-content;
height: 200px;
position: absolute;
padding-top: 20px;
background-color: #ffcc80;
min-height: 200px;
overflow: scroll;
overflow-x:hidden;
}
.input_list.show{
display:block;
}
.input_list show.hide{
.input_list .hide{
display: none;
}

View File

@@ -46,3 +46,27 @@ function createRoute(){
});
}
function getRoute(){
$.ajax({
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
url: '/ru/routes/get_routes/',
type: "POST",
// async: true,
cache: false,
processData: false,
contentType: false,
// enctype: 'json',
// data: formData,
success: function(data){
console.log('data received')
// location.href = '/profile'
document.querySelector(".info_profile").innerHTML = data.html;
},
error: function (data, exception){
console.log(101)
}
});
}

View File

@@ -9,7 +9,7 @@
<img class="svg" src="/static/img/svg/PushPin.svg">
<a href="#">Разместить объявление</a>
</div>
<div>
<div onclick="getRoute()">
<img class="svg" src="/static/img/svg/Cards.svg">
<a href="#">Мои объявления</a>
</div>

View File

@@ -1,3 +1,33 @@
<div>
{{ andy }}
{% for route in routes %}
<div class="wraper">
<div class="route_info">
{{ route.get_cargo_type_display }}
{{ route.weight }}
{{ route.get_type_transport_display }}
<div class="route_info_point">
{{ route.from_address_point }}
{{ route.to_adress_point }}
</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">
</div>
</div>
{% endfor %}
</div>