fix: only show start date for single day batches (#726)

This commit is contained in:
Md Hussain Nagaria
2024-01-22 10:55:36 +05:30
committed by GitHub
parent bac229c731
commit b700013704
3 changed files with 24 additions and 15 deletions

View File

@@ -49,11 +49,14 @@
<use href="#icon-calendar"></use>
</svg>
<span>
{{ frappe.utils.format_date(batch_info.start_date, "long") }} -
{{ frappe.utils.format_date(batch_info.start_date, "long") }}
</span>
{% if batch_info.start_date != batch_info.end_date %}
<span>
{{ frappe.utils.format_date(batch_info.end_date, "long") }}
- {{ frappe.utils.format_date(batch_info.end_date, "long") }}
</span>
{% endif %}
</div>
<span class="seperator"></span>
@@ -646,4 +649,4 @@
<link rel="stylesheet" href="https://uicdn.toast.com/calendar/latest/toastui-calendar.min.css" />
<script src="https://uicdn.toast.com/calendar/latest/toastui-calendar.min.js"></script>
{% endblock %}
{% endblock %}

View File

@@ -57,11 +57,13 @@
<use href="#icon-calendar"></use>
</svg>
<span>
{{ frappe.utils.format_date(batch_info.start_date, "long") }} -
</span>
<span>
{{ frappe.utils.format_date(batch_info.end_date, "long") }}
{{ frappe.utils.format_date(batch_info.start_date, "long") }}
</span>
{% if batch_info.start_date != batch_info.end_date %}
<span>
- {{ frappe.utils.format_date(batch_info.end_date, "long") }}
</span>
{% endif %}
</div>
{% if batch_info.start_time and batch_info.end_time %}
@@ -115,11 +117,13 @@
<use href="#icon-calendar"></use>
</svg>
<span>
{{ frappe.utils.format_date(batch_info.start_date, "long") }} -
</span>
<span>
{{ frappe.utils.format_date(batch_info.end_date, "long") }}
{{ frappe.utils.format_date(batch_info.start_date, "long") }}
</span>
{% if batch_info.start_date != batch_info.end_date %}
<span>
- {{ frappe.utils.format_date(batch_info.end_date, "long") }}
</span>
{% endif %}
</div>
{% if batch_info.start_time and batch_info.end_time %}
@@ -239,4 +243,4 @@
let batch_info = {{ batch_info | json }};
</script>
{% endif %}
{% endblock %}
{% endblock %}

View File

@@ -140,11 +140,13 @@
<use href="#icon-calendar"></use>
</svg>
<span>
{{ frappe.utils.format_date(batch.start_date, "medium") }} -
{{ frappe.utils.format_date(batch.start_date, "medium") }}
</span>
{% if batch.start_date != batch.end_date %}
<span>
{{ frappe.utils.format_date(batch.end_date, "medium") }}
- {{ frappe.utils.format_date(batch.end_date, "long") }}
</span>
{% endif %}
</div>
<div class="mb-2">
@@ -204,4 +206,4 @@
let batch_info = null;
</script>
{% endif %}
{% endblock %}
{% endblock %}