Fixed dashboard loading and error pages not showing properly and made lowest stock widget functional

This commit is contained in:
Keannu Christian Bernasol 2023-03-07 19:41:28 +08:00
parent d518abec77
commit fd7891359c
2 changed files with 30 additions and 7 deletions

View file

@ -57,6 +57,19 @@ export function UpdateProduct(product: UpdateProductParams) {
});
}
export function GetLowestStockedProduct() {
const token = JSON.parse(localStorage.getItem("token") || "{}");
return axios
.get("http://localhost:8000/api/v1/lowest_stock_product/", {
headers: {
Authorization: "Token " + token,
},
})
.then((response) => {
return response.data;
});
}
export function GetLogs() {
const token = JSON.parse(localStorage.getItem("token") || "{}");
return axios