mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Adds (per user) setting to show or hide scheduling tab
This commit is contained in:
parent
f33f1a339d
commit
e44159baea
@ -1253,7 +1253,14 @@ class InvenTreeUserSetting(BaseInvenTreeSetting):
|
||||
('MM/DD/YYYY', '02/22/2022'),
|
||||
('MMM DD YYYY', 'Feb 22 2022'),
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
'DISPLAY_SCHEDULE_TAB': {
|
||||
'name': _('Part Scheduling'),
|
||||
'description': _('Display part scheduling information'),
|
||||
'default': True,
|
||||
'validator': bool,
|
||||
},
|
||||
}
|
||||
|
||||
class Meta:
|
||||
|
@ -37,6 +37,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% settings_value 'DISPLAY_SCHEDULE_TAB' user=request.user as show_scheduling %}
|
||||
{% if show_scheduling %}
|
||||
<div class='panel panel-hidden' id='panel-scheduling'>
|
||||
<div class='panel-heading'>
|
||||
<div class='d-flex flex-wrap'>
|
||||
@ -48,6 +50,7 @@
|
||||
{% include "part/part_scheduling.html" %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class='panel panel-hidden' id='panel-allocations'>
|
||||
<div class='panel-heading'>
|
||||
|
@ -9,7 +9,7 @@
|
||||
{% trans "Parameters" as text %}
|
||||
{% include "sidebar_item.html" with label="part-parameters" text=text icon="fa-th-list" %}
|
||||
{% if part.is_template %}
|
||||
{% trans "Variants" as text %}
|
||||
{% trans "Variants" as text %}F
|
||||
{% include "sidebar_item.html" with label="variants" text=text icon="fa-shapes" %}
|
||||
{% endif %}
|
||||
{% trans "Stock" as text %}
|
||||
@ -44,8 +44,11 @@
|
||||
{% trans "Sales Orders" as text %}
|
||||
{% include "sidebar_item.html" with label="sales-orders" text=text icon="fa-truck" %}
|
||||
{% endif %}
|
||||
{% settings_value 'DISPLAY_SCHEDULE_TAB' user=request.user as show_scheduling %}
|
||||
{% if show_scheduling %}
|
||||
{% trans "Scheduling" as text %}
|
||||
{% include "sidebar_item.html" with label="scheduling" text=text icon="fa-calendar-alt" %}
|
||||
{% endif %}
|
||||
{% if part.trackable %}
|
||||
{% trans "Test Templates" as text %}
|
||||
{% include "sidebar_item.html" with label="test-templates" text=text icon="fa-vial" %}
|
||||
|
@ -18,6 +18,7 @@
|
||||
{% include "InvenTree/settings/setting.html" with key="DATE_DISPLAY_FORMAT" icon="fa-calendar-alt" user_setting=True %}
|
||||
{% include "InvenTree/settings/setting.html" with key="FORMS_CLOSE_USING_ESCAPE" icon="fa-window-close" user_setting=True %}
|
||||
{% include "InvenTree/settings/setting.html" with key="PART_SHOW_QUANTITY_IN_FORMS" icon="fa-hashtag" user_setting=True %}
|
||||
{% include "InvenTree/settings/setting.html" with key="DISPLAY_SCHEDULE_TAB" icon="fa-calendar-alt" user_setting=True %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user