mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Refactor sidebar for "sales order" page
This commit is contained in:
parent
5a2c20ea55
commit
00a0311c63
@ -161,11 +161,6 @@ src="{% static 'img/blank_image.png' %}"
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
|
||||
enableNavbar({
|
||||
label: 'so',
|
||||
toggleId: '#so-menu-toggle',
|
||||
});
|
||||
|
||||
$("#edit-order").click(function() {
|
||||
|
||||
constructForm('{% url "api-so-detail" order.pk %}', {
|
||||
|
@ -6,8 +6,8 @@
|
||||
{% load static %}
|
||||
{% load markdownify %}
|
||||
|
||||
{% block menubar %}
|
||||
{% include "order/so_navbar.html" %}
|
||||
{% block sidebar %}
|
||||
{% include "order/so_sidebar.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block page_content %}
|
||||
@ -191,9 +191,6 @@
|
||||
}
|
||||
);
|
||||
|
||||
attachNavCallbacks({
|
||||
name: 'sales-order',
|
||||
default: 'order-items'
|
||||
});
|
||||
|
||||
enableSidebar('salesorder');
|
||||
|
||||
{% endblock %}
|
@ -1,40 +0,0 @@
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load inventree_extras %}
|
||||
|
||||
<ul class='list-group'>
|
||||
<li class='list-group-item'>
|
||||
<a href='#' id='so-menu-toggle'>
|
||||
<span class='menu-tab-icon fas fa-expand-arrows-alt'></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class='list-group-item' title='{% trans "Sales Order Line Items" %}'>
|
||||
<a href='#' id='select-order-items' class='nav-toggle'>
|
||||
<span class='fas fa-list-ol sidebar-icon'></span>
|
||||
{% trans "Order Items" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class='list-group-item' title='{% trans "Build Orders" %}'>
|
||||
<a href='#' id='select-order-builds' class='nav-toggle'>
|
||||
<span class='fas fa-tools sidebar-icon'></span>
|
||||
{% trans "Build Orders" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class='list-group-item' title='{% trans "Sales Order Attachments" %}'>
|
||||
<a href='#' id='select-order-attachments' class='nav-toggle'>
|
||||
<span class='fas fa-paperclip sidebar-icon'></span>
|
||||
{% trans "Attachments" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class='list-group-item' title='{% trans "Notes" %}'>
|
||||
<a href='#' id='select-order-notes' class='nav-toggle'>
|
||||
<span class='fas fa-clipboard sidebar-icon'></span>
|
||||
{% trans "Notes" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
8
InvenTree/order/templates/order/so_sidebar.html
Normal file
8
InvenTree/order/templates/order/so_sidebar.html
Normal file
@ -0,0 +1,8 @@
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load inventree_extras %}
|
||||
|
||||
{% include "sidebar_item.html" with label='order-items' text="Line Items" icon="fa-list-ol" %}
|
||||
{% include "sidebar_item.html" with label='order-builds' text="Build Orders" icon="fa-tools" %}
|
||||
{% include "sidebar_item.html" with label='order-attachments' text="Attachments" icon="fa-paperclip" %}
|
||||
{% include "sidebar_item.html" with label='order-notes' text="Notes" icon="fa-clipboard" %}
|
@ -17,8 +17,6 @@ function activatePanel(label, panel_name, options={}) {
|
||||
$('.panel-visible').hide();
|
||||
$('.panel-visible').removeClass('panel-visible');
|
||||
|
||||
console.log('active panel:', label, panel_name);
|
||||
|
||||
// Find the target panel
|
||||
var panel = `#panel-${panel_name}`;
|
||||
var select = `#select-${panel_name}`;
|
||||
|
Loading…
Reference in New Issue
Block a user