UI elements

- Add a "sales order" menu item to the main navbar
- Add a "sales order" tab to customer detail page
This commit is contained in:
Oliver Walters 2020-04-20 19:47:29 +10:00
parent 974c98c95a
commit 5901b21e78
5 changed files with 18 additions and 5 deletions

View File

@ -1,8 +1,9 @@
{% extends "company/company_base.html" %} {% extends "company/company_base.html" %}
{% load static %} {% load static %}
{% block details %}
{% load i18n %} {% load i18n %}
{% block details %}
{% include 'company/tabs.html' with tab='po' %} {% include 'company/tabs.html' with tab='po' %}
<h4>{% trans "Purchase Orders" %}</h4> <h4>{% trans "Purchase Orders" %}</h4>

View File

@ -0,0 +1,12 @@
{% extends "company/company_base.html" %}
{% load static %}
{% load i18n %}
{% block details %}
{% include 'company/tabs.html' with tab='co' %}
<h4>{% trans "Sales Orders" %}</h4>
<hr>
{% endblock %}

View File

@ -18,12 +18,10 @@
</li> </li>
{% endif %} {% endif %}
{% if company.is_customer %} {% if company.is_customer %}
{% if 0 %}
<li{% if tab == 'co' %} class='active'{% endif %}> <li{% if tab == 'co' %} class='active'{% endif %}>
<a href="#">{% trans "Sales Orders" %}</a> <a href="{% url 'company-detail-sales-orders' company.id %}">{% trans "Sales Orders" %} <span class='badge'>{{ company.sales_orders.count }}</span></a>
</li> </li>
{% endif %} {% endif %}
{% endif %}
<li{% if tab == 'notes' %} class='active'{% endif %}> <li{% if tab == 'notes' %} class='active'{% endif %}>
<a href="{% url 'company-notes' company.id %}">{% trans "Notes" %}{% if company.notes %} <span class='glyphicon glyphicon-small glyphicon-info-sign'></span>{% endif %}</a> <a href="{% url 'company-notes' company.id %}">{% trans "Notes" %}{% if company.notes %} <span class='glyphicon glyphicon-small glyphicon-info-sign'></span>{% endif %}</a>
</li> </li>

View File

@ -15,7 +15,8 @@ company_detail_urls = [
url(r'parts/', views.CompanyDetail.as_view(template_name='company/detail_part.html'), name='company-detail-parts'), url(r'parts/', views.CompanyDetail.as_view(template_name='company/detail_part.html'), name='company-detail-parts'),
url(r'stock/?', views.CompanyDetail.as_view(template_name='company/detail_stock.html'), name='company-detail-stock'), url(r'stock/?', views.CompanyDetail.as_view(template_name='company/detail_stock.html'), name='company-detail-stock'),
url(r'purchase-orders/?', views.CompanyDetail.as_view(template_name='company/detail_purchase_orders.html'), name='company-detail-purchase-orders'), url(r'purchase-orders/?', views.CompanyDetail.as_view(template_name='company/purchase_orders.html'), name='company-detail-purchase-orders'),
url(r'sales-orders/?', views.CompanyDetail.as_view(template_name='company/sales_orders.html'), name='company-detail-sales-orders'),
url(r'notes/?', views.CompanyNotes.as_view(), name='company-notes'), url(r'notes/?', views.CompanyNotes.as_view(), name='company-notes'),
url(r'thumbnail/?', views.CompanyImage.as_view(), name='company-image'), url(r'thumbnail/?', views.CompanyImage.as_view(), name='company-image'),

View File

@ -22,6 +22,7 @@
<a class='dropdown-toggle' data-toggle='dropdown' href='#'><span class='fas fa-truck icon-header'></span>{% trans "Sell" %}</a> <a class='dropdown-toggle' data-toggle='dropdown' href='#'><span class='fas fa-truck icon-header'></span>{% trans "Sell" %}</a>
<ul class='dropdown-menu'> <ul class='dropdown-menu'>
<li><a href="{% url 'customer-index' %}"><span class='fas fa-user-tie icon-header'></span>{% trans "Customers" %}</a> <li><a href="{% url 'customer-index' %}"><span class='fas fa-user-tie icon-header'></span>{% trans "Customers" %}</a>
<li><a href="#"><span class='fas fa-list icon-header'></span>{% trans "Sales Orders" %}</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>