Further API calls

- getStock
- getStockLocation
- getCompanies
This commit is contained in:
Oliver 2018-05-05 00:00:48 +10:00
parent 7e4b0630b6
commit ee347c6165

View File

@ -11,7 +11,7 @@ function inventreeGet(url, filters={}) {
error: function(xhr, ajaxOptions, thrownError) { error: function(xhr, ajaxOptions, thrownError) {
console.error('Error on GET at ' + url); console.error('Error on GET at ' + url);
console.error(thrownError); console.error(thrownError);
return {}; return {error: thrownError};
} }
}) })
} }
@ -25,3 +25,15 @@ function getParts(filters={}) {
function getPartCategories(filters={}) { function getPartCategories(filters={}) {
return inventreeGet('/api/part/category/', filters); return inventreeGet('/api/part/category/', filters);
} }
function getStock(filters={}) {
return inventreeGet('/api/stock/', filters);
}
function getStockLocations(filters={}) {
return inventreeGet('/api/stock/location/', filters)
}
function getCompanies(filters={}) {
return inventreeGet('/api/company/', filters);
}