mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-01 13:06:45 +00:00
Add button to order a supplier part
This commit is contained in:
parent
0b2c6cfd70
commit
b89002a450
@ -20,6 +20,9 @@ src="{% static 'img/blank_image.png' %}"
|
|||||||
<p>{{ part.supplier.name }} - {{ part.SKU }}</p>
|
<p>{{ part.supplier.name }} - {{ part.SKU }}</p>
|
||||||
<div class='btn-row'>
|
<div class='btn-row'>
|
||||||
<div class='btn-group action-buttons' role='group'>
|
<div class='btn-group action-buttons' role='group'>
|
||||||
|
<button type='button' class='btn btn-default btn-glyph' id='order-part' title='{% trans "Order part" %}'>
|
||||||
|
<span class='fas fa-shopping-cart'></span>
|
||||||
|
</button>
|
||||||
<button type='button' class='btn btn-default btn-glyph' id='edit-part' title='{% trans "Edit supplier part" %}'>
|
<button type='button' class='btn btn-default btn-glyph' id='edit-part' title='{% trans "Edit supplier part" %}'>
|
||||||
<span class='fas fa-edit icon-green'/>
|
<span class='fas fa-edit icon-green'/>
|
||||||
</button>
|
</button>
|
||||||
@ -91,6 +94,18 @@ src="{% static 'img/blank_image.png' %}"
|
|||||||
{% block js_ready %}
|
{% block js_ready %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
|
||||||
|
$('#order-part').click(function() {
|
||||||
|
launchModalForm(
|
||||||
|
"{% url 'order-parts' %}",
|
||||||
|
{
|
||||||
|
data: {
|
||||||
|
part: {{ part.part.id }},
|
||||||
|
},
|
||||||
|
reload: true,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
$('#edit-part').click(function () {
|
$('#edit-part').click(function () {
|
||||||
launchModalForm(
|
launchModalForm(
|
||||||
"{% url 'supplier-part-edit' part.id %}",
|
"{% url 'supplier-part-edit' part.id %}",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user