Change what elements the user can see on the index page, based on permissions!

This commit is contained in:
Oliver Walters 2020-10-05 23:11:55 +11:00
parent e5960f6ce4
commit 3e9c7cda21

View File

@ -9,18 +9,26 @@ InvenTree | Index
<hr>
<div class='col-sm-6'>
{% if perms.part.view_part %}
{% include "InvenTree/latest_parts.html" with collapse_id="latest_parts" %}
{% include "InvenTree/bom_invalid.html" with collapse_id="bom_invalid" %}
{% include "InvenTree/low_stock.html" with collapse_id="order" %}
{% include "InvenTree/po_outstanding.html" with collapse_id="po_outstanding" %}
{% include "InvenTree/starred_parts.html" with collapse_id="starred" %}
{% endif %}
{% if perms.build.view_build %}
{% include "InvenTree/build_pending.html" with collapse_id="build_pending" %}
{% endif %}
</div>
<div class='col-sm-6'>
{% include "InvenTree/starred_parts.html" with collapse_id="starred" %}
{% include "InvenTree/build_pending.html" with collapse_id="build_pending" %}
{% if perms.stock.view_stockitem %}
{% include "InvenTree/low_stock.html" with collapse_id="order" %}
{% include "InvenTree/required_stock_build.html" with collapse_id="stock_to_build" %}
{% endif %}
{% if perms.order.view_purchaseorder %}
{% include "InvenTree/po_outstanding.html" with collapse_id="po_outstanding" %}
{% endif %}
{% if perms.order.view_salesorder %}
{% include "InvenTree/so_outstanding.html" with collapse_id="so_outstanding" %}
{% endif %}
</div>
{% endblock %}