mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add translation layer for order.js
This commit is contained in:
parent
23bd9afaf8
commit
2c9b76575e
@ -78,6 +78,7 @@ dynamic_javascript_urls = [
|
|||||||
url(r'^part.js', DynamicJsView.as_view(template_name='js/part.js'), name='part.js'),
|
url(r'^part.js', DynamicJsView.as_view(template_name='js/part.js'), name='part.js'),
|
||||||
url(r'^stock.js', DynamicJsView.as_view(template_name='js/stock.js'), name='stock.js'),
|
url(r'^stock.js', DynamicJsView.as_view(template_name='js/stock.js'), name='stock.js'),
|
||||||
url(r'^build.js', DynamicJsView.as_view(template_name='js/build.js'), name='build.js'),
|
url(r'^build.js', DynamicJsView.as_view(template_name='js/build.js'), name='build.js'),
|
||||||
|
url(r'^order.js', DynamicJsView.as_view(template_name='js/order.js'), name='order.js'),
|
||||||
]
|
]
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
|
@ -106,7 +106,6 @@ InvenTree
|
|||||||
<script type='text/javascript' src="{% static 'script/inventree/filters.js' %}"></script>
|
<script type='text/javascript' src="{% static 'script/inventree/filters.js' %}"></script>
|
||||||
<script type='text/javascript' src="{% static 'script/inventree/tables.js' %}"></script>
|
<script type='text/javascript' src="{% static 'script/inventree/tables.js' %}"></script>
|
||||||
<script type='text/javascript' src="{% static 'script/inventree/modals.js' %}"></script>
|
<script type='text/javascript' src="{% static 'script/inventree/modals.js' %}"></script>
|
||||||
<script type='text/javascript' src="{% static 'script/inventree/order.js' %}"></script>
|
|
||||||
<script type='text/javascript' src="{% static 'script/inventree/company.js' %}"></script>
|
<script type='text/javascript' src="{% static 'script/inventree/company.js' %}"></script>
|
||||||
<script type='text/javascript' src="{% static 'script/inventree/notification.js' %}"></script>
|
<script type='text/javascript' src="{% static 'script/inventree/notification.js' %}"></script>
|
||||||
<script type='text/javascript' src="{% static 'script/inventree/sidenav.js' %}"></script>
|
<script type='text/javascript' src="{% static 'script/inventree/sidenav.js' %}"></script>
|
||||||
@ -114,6 +113,7 @@ InvenTree
|
|||||||
<script type='text/javascript' src="{% url 'part.js' %}"></script>
|
<script type='text/javascript' src="{% url 'part.js' %}"></script>
|
||||||
<script type='text/javascript' src="{% url 'stock.js' %}"></script>
|
<script type='text/javascript' src="{% url 'stock.js' %}"></script>
|
||||||
<script type='text/javascript' src="{% url 'build.js' %}"></script>
|
<script type='text/javascript' src="{% url 'build.js' %}"></script>
|
||||||
|
<script type='text/javascript' src="{% url 'order.js' %}"></script>
|
||||||
|
|
||||||
<script type='text/javascript' src="{% static 'fontawesome/js/solid.js' %}"></script>
|
<script type='text/javascript' src="{% static 'fontawesome/js/solid.js' %}"></script>
|
||||||
<script type='text/javascript' src="{% static 'fontawesome/js/brands.js' %}"></script>
|
<script type='text/javascript' src="{% static 'fontawesome/js/brands.js' %}"></script>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
{% load i18n %}
|
||||||
|
|
||||||
function removeOrderRowFromOrderWizard(e) {
|
function removeOrderRowFromOrderWizard(e) {
|
||||||
/* Remove a part selection from an order form. */
|
/* Remove a part selection from an order form. */
|
||||||
|
|
||||||
@ -121,7 +123,7 @@ function loadPurchaseOrderTable(table, options) {
|
|||||||
queryParams: filters,
|
queryParams: filters,
|
||||||
groupBy: false,
|
groupBy: false,
|
||||||
original: options.params,
|
original: options.params,
|
||||||
formatNoMatches: function() { return "No purchase orders found"; },
|
formatNoMatches: function() { return "{% trans "No purchase orders found" %}"; },
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
field: 'pk',
|
field: 'pk',
|
||||||
@ -131,7 +133,7 @@ function loadPurchaseOrderTable(table, options) {
|
|||||||
{
|
{
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: 'reference',
|
field: 'reference',
|
||||||
title: 'Purchase Order',
|
title: '{% trans "Purchase Order" %}',
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
return renderLink(value, `/order/purchase-order/${row.pk}/`);
|
return renderLink(value, `/order/purchase-order/${row.pk}/`);
|
||||||
}
|
}
|
||||||
@ -139,25 +141,25 @@ function loadPurchaseOrderTable(table, options) {
|
|||||||
{
|
{
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: 'supplier_detail',
|
field: 'supplier_detail',
|
||||||
title: 'Supplier',
|
title: '{% trans "Supplier" %}',
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
return imageHoverIcon(row.supplier_detail.image) + renderLink(row.supplier_detail.name, `/company/${row.supplier}/purchase-orders/`);
|
return imageHoverIcon(row.supplier_detail.image) + renderLink(row.supplier_detail.name, `/company/${row.supplier}/purchase-orders/`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'supplier_reference',
|
field: 'supplier_reference',
|
||||||
title: 'Supplier Reference',
|
title: '{% trans "Supplier Reference" %}',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: 'description',
|
field: 'description',
|
||||||
title: 'Description',
|
title: '{% trans "Description" %}',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: 'Status',
|
title: '{% trans "Status" %}',
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
return purchaseOrderStatusDisplay(row.status, row.status_text);
|
return purchaseOrderStatusDisplay(row.status, row.status_text);
|
||||||
}
|
}
|
||||||
@ -165,12 +167,12 @@ function loadPurchaseOrderTable(table, options) {
|
|||||||
{
|
{
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: 'creation_date',
|
field: 'creation_date',
|
||||||
title: 'Date',
|
title: '{% trans "Date" %}',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: 'line_items',
|
field: 'line_items',
|
||||||
title: 'Items'
|
title: '{% trans "Items" %}'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
@ -194,7 +196,7 @@ function loadSalesOrderTable(table, options) {
|
|||||||
queryParams: filters,
|
queryParams: filters,
|
||||||
groupBy: false,
|
groupBy: false,
|
||||||
original: options.params,
|
original: options.params,
|
||||||
formatNoMatches: function() { return "No sales orders found"; },
|
formatNoMatches: function() { return "{% trans "No sales orders found" %}"; },
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
field: 'pk',
|
field: 'pk',
|
||||||
@ -204,7 +206,7 @@ function loadSalesOrderTable(table, options) {
|
|||||||
{
|
{
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: 'reference',
|
field: 'reference',
|
||||||
title: 'Sales Order',
|
title: '{% trans "Sales Order" %}',
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
return renderLink(value, `/order/sales-order/${row.pk}/`);
|
return renderLink(value, `/order/sales-order/${row.pk}/`);
|
||||||
},
|
},
|
||||||
@ -212,25 +214,25 @@ function loadSalesOrderTable(table, options) {
|
|||||||
{
|
{
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: 'customer_detail',
|
field: 'customer_detail',
|
||||||
title: 'Customer',
|
title: '{% trans "Customer" %}',
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
return imageHoverIcon(row.customer_detail.image) + renderLink(row.customer_detail.name, `/company/${row.customer}/sales-orders/`);
|
return imageHoverIcon(row.customer_detail.image) + renderLink(row.customer_detail.name, `/company/${row.customer}/sales-orders/`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'customer_reference',
|
field: 'customer_reference',
|
||||||
title: 'Customer Reference',
|
title: '{% trans "Customer Reference" %}',
|
||||||
sotrable: true,
|
sotrable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: 'description',
|
field: 'description',
|
||||||
title: 'Description',
|
title: '{% trans "Description" %}',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: 'Status',
|
title: '{% trans "Status" %}',
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
return salesOrderStatusDisplay(row.status, row.status_text);
|
return salesOrderStatusDisplay(row.status, row.status_text);
|
||||||
}
|
}
|
||||||
@ -238,17 +240,17 @@ function loadSalesOrderTable(table, options) {
|
|||||||
{
|
{
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: 'creation_date',
|
field: 'creation_date',
|
||||||
title: 'Creation Date',
|
title: '{% trans "Creation Date" %}',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: 'shipment_date',
|
field: 'shipment_date',
|
||||||
title: "Shipment Date",
|
title: "{% trans "Shipment Date" %}",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: 'line_items',
|
field: 'line_items',
|
||||||
title: 'Items'
|
title: '{% trans "Items" %}'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user