From 597bf8be73d0a39e0c9b315d067da083c058663c Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 16 Dec 2020 16:13:38 +1100 Subject: [PATCH] Add date input to build target_date --- InvenTree/build/forms.py | 6 ++++++ InvenTree/build/templates/build/build_base.html | 14 ++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/InvenTree/build/forms.py b/InvenTree/build/forms.py index 9c72113f3b..fef116d7f3 100644 --- a/InvenTree/build/forms.py +++ b/InvenTree/build/forms.py @@ -32,6 +32,12 @@ class EditBuildForm(HelperForm): 'reference': _('Build Order reference') } + target_date = forms.DateField( + widget=forms.DateInput( + attrs={'type': 'date'} + ) + ) + class Meta: model = Build fields = [ diff --git a/InvenTree/build/templates/build/build_base.html b/InvenTree/build/templates/build/build_base.html index 3a94398e87..22c70d1b0a 100644 --- a/InvenTree/build/templates/build/build_base.html +++ b/InvenTree/build/templates/build/build_base.html @@ -37,7 +37,12 @@ src="{% static 'img/blank_image.png' %}" {% endif %} -

{% build_status_label build.status large=True %}

+

+ {% build_status_label build.status large=True %} + {% if build.is_overdue %} + {% trans "Overdue" %} + {% endif %} +


{{ build.title }}

@@ -81,7 +86,12 @@ src="{% static 'img/blank_image.png' %}" {% trans "Status" %} - {% build_status_label build.status %} + + {% build_status_label build.status %} + {% if build.is_overdue %} + {% trans "Overdue" %} + {% endif %} +