0.0.152 routes

This commit is contained in:
SBD
2025-02-14 16:20:26 +03:00
parent 0a56555f35
commit e1053073a1
5 changed files with 22 additions and 8 deletions

View File

@@ -131,6 +131,15 @@
border-radius: var(--route-text-container-border-radius);
font-size: var(--big-font-size);
&.wrapped{
.route_card_text_container_txt{
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
}
&.msg{
.route_card_text_container_txt{
background-image: linear-gradient(94.66deg, rgba(0, 0, 0, 1) 0%, rgba(241, 241, 241, 0) 8.64%, rgba(241, 241, 241, 0.98) 16.62%);

View File

@@ -5,10 +5,11 @@ function searchRoutes (form=undefined) {
let formData = getFormData($search_form);
formData = getFormData($filter_form, formData);
formData.append('owner_type', 'mover');
let owner_type = 'mover'
formData.append('owner_type', owner_type);
let query = formDataToQueryString(formData, [$filter_form, $search_form]);
query+='owner_type=mover'
query+=`owner_type=${owner_type}`
window.history.pushState(null, null, `?${query}`);
let request = new api({
url: '/routes/find_routes/',

View File

@@ -138,4 +138,12 @@ function clickedUnregisteredMsgRoute (el) {
let $parent = el.closest(".route_card_text_container")
$parent.classList.add('clicked');
}
function unwrapRouteComment (el){
if (!el) return;
let $parent = el.closest(".wrapped")
if (!$parent) return;
$parent.classList.remove('wrapped');
}

View File

@@ -34,10 +34,6 @@
<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;">
<img src="{% static "v2/icons/widgets/w_route_card/phone_half_opacity.svg" %}" alt="">
<div class="route_btn_title big">{{ route.phone }}</div>
</div>
</div>
<div class="card_owner_name">{{ route.owner }}</div>
<div class="route_card_text_container">

View File

@@ -31,7 +31,7 @@
<div class="route_btn_title big">{% trans "Откликнуться" %}</div>
</div>
</div>
<div class="route_card_text_container{% if not user.is_authenticated %} msg{% endif %}">
<div class="route_card_text_container wrapped{% if not user.is_authenticated %} msg{% endif %}" onclick="unwrapRouteComment(this)">
<div class="route_card_text_container_txt">
{% if route.comment %}
{{ route.comment|linebreaksbr }}
@@ -63,7 +63,7 @@
</div>
</div>
<div class="card_owner_name">{{ route.owner }}</div>
<div class="route_card_text_container{% if not user.is_authenticated %} msg{% endif %}">
<div class="route_card_text_container wrapped{% if not user.is_authenticated %} msg{% endif %}" onclick="unwrapRouteComment(this)">
<div class="route_card_text_container_txt">
{% if route.comment %}
{{ route.comment|linebreaksbr }}