0.0.44 w route card

This commit is contained in:
SBD
2025-01-17 19:43:35 +03:00
parent 34ef2f23b7
commit b3f4eec2e9
3 changed files with 31 additions and 4 deletions

View File

@@ -34,6 +34,9 @@
--route-btn-title-color: #272424; --route-btn-title-color: #272424;
--route-btn-text-data-color: #27242499; --route-btn-text-data-color: #27242499;
--route-date-data-justify: center;
--route-date-data-margin: 4px 0 0 0;
background: var(--route-card-bg); background: var(--route-card-bg);
margin: var(--route-card-margin); margin: var(--route-card-margin);
box-shadow: var(--route-card-box_shadow); box-shadow: var(--route-card-box_shadow);
@@ -64,6 +67,7 @@
padding: var(--route-text-container-padding); padding: var(--route-text-container-padding);
margin: var(--route-text-container-margin); margin: var(--route-text-container-margin);
border-radius: var(--route-text-container-border-radius); border-radius: var(--route-text-container-border-radius);
font-size: var(--big-font-size);
} }
.route_card_owner_info{ .route_card_owner_info{
height: 47px; height: 47px;
@@ -134,7 +138,7 @@
gap: 5px; gap: 5px;
img{ img{
width: 24px; width: 16px;
height: 12px; height: 12px;
display: block; display: block;
object-fit: contain; object-fit: contain;
@@ -172,6 +176,7 @@
.way_progress_line_container{ .way_progress_line_container{
position: relative; position: relative;
width: 100%; width: 100%;
height: 15px;
.way_progress_round{ .way_progress_round{
height: 20px; height: 20px;
width: 20px; width: 20px;
@@ -278,5 +283,21 @@
font-size: var(--small-font-size); font-size: var(--small-font-size);
color: var(--route-btn-text-data-color); color: var(--route-btn-text-data-color);
} }
img{
min-width: 16px;
display: block;
}
}
.route_date_data{
display: flex;
align-items: center;
gap: 5px;
justify-content: var(--route-date-data-justify);
margin: var(--route-date-data-margin);
font-size: var(--medium-font-size);
width: 100%;
.date_data_value{
font-weight: 600;
}
} }
} }

View File

@@ -8,7 +8,7 @@ function changeRoute(el) {
'owner_type': $parent.dataset.owner_type, 'owner_type': $parent.dataset.owner_type,
} }
let request = new api({ let request = new api({
url: '/routes/create_or_change_route/', url: '/routes/edit_route/',
data: data, data: data,
data_type: 'json', data_type: 'json',
success: (res) => { success: (res) => {

View File

@@ -4,7 +4,7 @@
<div class="w_customer_route_card w_route_card" data-route_id="{{ route.id }}" data-owner_type="{{ route.owner_type }}"> <div class="w_customer_route_card w_route_card" data-route_id="{{ route.id }}" data-owner_type="{{ route.owner_type }}">
<div class="route_card_info_data"> <div class="route_card_info_data">
<img class="route_card_text_img" src="{% static "v2/icons/widgets/w_route_card/route_card_avatar_spline.svg" %}"> <img class="route_card_text_img" src="{% static "v2/icons/widgets/w_route_card/route_card_avatar_spline.svg" %}">
<img class="route_card_owner_avatar" src="{% static "v2/icons/widgets/w_additional_info/Info.svg" %}"> <img class="route_card_owner_avatar" src="{{ route.owner.user_profile.avatar.url }}">
<div class="route_card_owner_info"> <div class="route_card_owner_info">
<div class="route_card_info_left_part"> <div class="route_card_info_left_part">
<div class="card_owner_name">{{ route.owner }}</div> <div class="card_owner_name">{{ route.owner }}</div>
@@ -12,7 +12,7 @@
<div class="card_owner_type {{ route.owner_type }}">{% if route.owner_type == 'customer' %}{% trans "Нужен перевозчик" %}{% else %}{% trans "Могу перевезти" %}{% endif %}</div> <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.get_cargo_type_display }}</div></div> <div class="card_cargo_type">{% trans "Тип посылки:" %} <div class="orange">{{ route.get_cargo_type_display }}</div></div>
</div> </div>
<div class="route_btn inactive" style="--route-btn-width: 206px;--route-btn-height: min-content;"> <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=""> <img src="{% static "v2/icons/widgets/w_route_card/phone_half_opacity.svg" %}" alt="">
<div class="route_btn_title big">{{ route.phone }}</div> <div class="route_btn_title big">{{ route.phone }}</div>
</div> </div>
@@ -56,6 +56,12 @@
<div class="way_progress_arrows_line"></div> <div class="way_progress_arrows_line"></div>
<div class="way_progress_round"></div> <div class="way_progress_round"></div>
</div> </div>
{% if route.owner_type == 'customer' %}
<div class="route_date_data">
{% trans "Дата доставки:" %}
<div class="date_data_value">{{ route.arrival_DT|date:'d F Y' }}</div>
</div>
{% endif %}
</div> </div>
<div class="from_to_place_data"> <div class="from_to_place_data">
<div class="label arrival_to">{% trans "Доставить в:" %}</div> <div class="label arrival_to">{% trans "Доставить в:" %}</div>