Merge pull request 'dev' (#7) from dev into main

Reviewed-on: sysadminix/tripwithbonus#7
This commit is contained in:
2024-08-09 18:55:31 +03:00
22 changed files with 441 additions and 197 deletions

View File

@@ -2,7 +2,17 @@
{% load i18n %}
<div class="carrier-card {% if route.highlight_color %} highlight-color {% endif %}" data-number-of-route="{{ route.id }}">
{% if route.departure_DT %}
{% with current_datetime=route.from_city.get_current_datetime %}
{% with departure_datetime=route.departure_DT %}
{% if current_datetime|date:"Y-m-d H:i:s" > departure_datetime|date:"Y-m-d H:i:s" %}
<div class="carrier-card out_of_date" data-number-of-route="{{ route.id }}">
{% else %}
<div class="carrier-card {% if route.highlight_color %} highlight-color {% endif %}" data-number-of-route="{{ route.id }}">
{% endif %}
{% endwith %}
{% endwith %}
{% endif %}
{#<div class="carrier-card"{% if route.highlight_color %} style="border: 5px solid {{ route.highlight_color }};"{% endif %} data-number-of-route="{{ route.id }}">#}
<div class="left-part-carrier-card">
{# <div class="first-line-card-carrier">#}

View File

@@ -1,4 +1,4 @@
<div onmousedown='selectItemAddrPoint({{ id }}, "{{ fullname }}", "{{ ctrl_name }}")' class="autocomplete-result" data-index="{{ index }}">
<div onmousedown='selectItemAddrPoint({{ id }}, "{{ fullname }}", "{{ ctrl_name }}", "{{ city_DT }}")' class="autocomplete-result" data-index="{{ index }}">
{% if airport_fullname %}<div>{{ airport_fullname|safe }}</div>{% endif %}
<div class="autocomplete-location">{{ city_name }} / {{ country_name }}</div>
</div>

View File

@@ -2,17 +2,21 @@
{% load i18n %}
{% load subscribes_tags_extra %}
{% if route.departure_DT %}
{% now 'Y-m-d H:i:s' as current_date %}
{% with departure_date_string=route.departure_DT|date:"Y-m-d H:i:s" %}
{% if departure_date_string < current_date %}
<div class="carrier-card out_of_date" data-number-of-route="{{ route.id }}">
{% else %}
<div class="carrier-card {% if route.highlight_color %} highlight-color {% endif %}" data-number-of-route="{{ route.id }}">
{% endif %}
{% endwith %}
{#Current Datetime: {{ route.from_city.get_current_datetime }}<br>#}
{#Departure DT:{{ route.departure_DT }}<br>#}
{% if route.departure_DT %}
{% with current_datetime=route.from_city.get_current_datetime %}
{% with departure_datetime=route.departure_DT %}
{% if current_datetime|date:"Y-m-d H:i:s" > departure_datetime|date:"Y-m-d H:i:s" %}
<div class="carrier-card out_of_date" data-number-of-route="{{ route.id }}">
{% else %}
<div class="carrier-card {% if route.highlight_color %} highlight-color {% endif %}" data-number-of-route="{{ route.id }}">
{% endif %}
{% endwith %}
{% endwith %}
{% endif %}
<div class="left-part-carrier-card">
{% if route.owner_type == 'mover' %}
<div class="first-line-card-carrier">
@@ -144,7 +148,7 @@
<span class="phones_carrier_span{% if route.owner == user %} active{% endif %} el_for_open_el"></span>
<div class="clear_both"></div>
</a>
<a class="email_carrier" data-href="mailto:{{ route.owner.email }}">
<a class="email_carrier" data-href="mailto:">
<img class="inf_carrier_icon" src="{% static "/img/svg/email.svg" %}">
<span class="email_carrier_span{% if route.owner == user %} active{% endif %} el_for_open_el"></span>