mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +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'),
|
('MM/DD/YYYY', '02/22/2022'),
|
||||||
('MMM DD YYYY', 'Feb 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:
|
class Meta:
|
||||||
|
@ -37,6 +37,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</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 panel-hidden' id='panel-scheduling'>
|
||||||
<div class='panel-heading'>
|
<div class='panel-heading'>
|
||||||
<div class='d-flex flex-wrap'>
|
<div class='d-flex flex-wrap'>
|
||||||
@ -48,6 +50,7 @@
|
|||||||
{% include "part/part_scheduling.html" %}
|
{% include "part/part_scheduling.html" %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class='panel panel-hidden' id='panel-allocations'>
|
<div class='panel panel-hidden' id='panel-allocations'>
|
||||||
<div class='panel-heading'>
|
<div class='panel-heading'>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
{% trans "Parameters" as text %}
|
{% trans "Parameters" as text %}
|
||||||
{% include "sidebar_item.html" with label="part-parameters" text=text icon="fa-th-list" %}
|
{% include "sidebar_item.html" with label="part-parameters" text=text icon="fa-th-list" %}
|
||||||
{% if part.is_template %}
|
{% 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" %}
|
{% include "sidebar_item.html" with label="variants" text=text icon="fa-shapes" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% trans "Stock" as text %}
|
{% trans "Stock" as text %}
|
||||||
@ -44,8 +44,11 @@
|
|||||||
{% trans "Sales Orders" as text %}
|
{% trans "Sales Orders" as text %}
|
||||||
{% include "sidebar_item.html" with label="sales-orders" text=text icon="fa-truck" %}
|
{% include "sidebar_item.html" with label="sales-orders" text=text icon="fa-truck" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% settings_value 'DISPLAY_SCHEDULE_TAB' user=request.user as show_scheduling %}
|
||||||
|
{% if show_scheduling %}
|
||||||
{% trans "Scheduling" as text %}
|
{% trans "Scheduling" as text %}
|
||||||
{% include "sidebar_item.html" with label="scheduling" text=text icon="fa-calendar-alt" %}
|
{% include "sidebar_item.html" with label="scheduling" text=text icon="fa-calendar-alt" %}
|
||||||
|
{% endif %}
|
||||||
{% if part.trackable %}
|
{% if part.trackable %}
|
||||||
{% trans "Test Templates" as text %}
|
{% trans "Test Templates" as text %}
|
||||||
{% include "sidebar_item.html" with label="test-templates" text=text icon="fa-vial" %}
|
{% 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="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="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="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>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user