{% extends "part/part_base.html" %}
{% load static %}
{% load i18n %}

{% block details %}

{% include 'part/tabs.html' with tab='sales-orders' %}

<h4>{% trans "Sales Orders" %}</h4>
<hr>

<div id='button-bar'>
    <div class='button-toolbar container-fluid' style='float: right;'>
        {% if 0 %}
        <button class='btn btn-primary' type='button' id='part-order2' title='{% trans "New sales order" %}'>{% trans "New Order" %}</button>
        {% endif %}
        <div class='filter-list' id='filter-list-salesorder'>
            <!-- An empty div in which the filter list will be constructed -->
        </div>
    </div>
</div>

<table class='table table-striped table-condensed po-table' id='sales-order-table' data-toolbar='#button-bar'>
</table>

{% endblock %}

{% block js_ready %}
{{ block.super }}

loadSalesOrderTable($("#sales-order-table"), {
    url: "{% url 'api-so-list' %}",
    params: {
        part: {{ part.id }},
    },
});

{% endblock %}
