Merge pull request #1023 from SchrodingersGat/index-permissions

Change what elements the user can see on the index page
This commit is contained in:
Oliver 2020-10-05 23:19:13 +11:00 committed by GitHub
commit 796e89c921
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 %}