umwd-components 0.1.825 → 0.1.827
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/node_modules/color-string/index.js +1 -1
- package/dist/cjs/node_modules/crypto-js/index.js +1 -1
- package/dist/cjs/src/data/loaders/e-commerce/getSingleReturnStock.js +7 -0
- package/dist/cjs/src/index.js +1 -1
- package/dist/cjs/tsconfig.build.tsbuildinfo +1 -1
- package/dist/esm/src/data/loaders/e-commerce/getSingleReturnStock.js +21 -0
- package/dist/esm/src/index.js +1 -0
- package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
- package/dist/esm/types/data/loaders/e-commerce/getSingleReturnStock.d.ts +2 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
/*
|
|
3
|
+
* UMWD-Components
|
|
4
|
+
* @copyright Jelle Paulus
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { fetchData } from '../loaders.js';
|
|
9
|
+
import { getStrapiURL } from '../../../lib/utils.js';
|
|
10
|
+
import { unstable_noStore } from 'next/cache';
|
|
11
|
+
|
|
12
|
+
const baseUrl = getStrapiURL();
|
|
13
|
+
// this returns an stock oversight for a returned product
|
|
14
|
+
// it's different from regular stock as it counts iro's (incoming return orders)
|
|
15
|
+
async function getSingleReturnStock(documentId) {
|
|
16
|
+
unstable_noStore();
|
|
17
|
+
const url = new URL(`/api/products/getReturnStock/${documentId}`, baseUrl);
|
|
18
|
+
return await fetchData(url.href);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { getSingleReturnStock };
|
package/dist/esm/src/index.js
CHANGED
|
@@ -155,6 +155,7 @@ export { createOpoAction } from './data/actions/e-commerce/opo/createOpoAction.j
|
|
|
155
155
|
export { EditStockForm } from './components/e-commerce/products/EditStockForm.js';
|
|
156
156
|
export { EditReturnStockForm } from './components/e-commerce/products/EditReturnStockForm.js';
|
|
157
157
|
export { getSingleStock } from './data/loaders/e-commerce/getSingleStock.js';
|
|
158
|
+
export { getSingleReturnStock } from './data/loaders/e-commerce/getSingleReturnStock.js';
|
|
158
159
|
export { default as CsvDownloader } from './components/common/csv/CsvDownloader.js';
|
|
159
160
|
export { getProductModel } from './data/loaders/e-commerce/getProductModel.js';
|
|
160
161
|
export { queryAllProducts } from './data/loaders/e-commerce/queryAllProducts.js';
|