This commit is contained in:
seb
2026-09-27 21:01:20 +02:00
parent bab15b0978
commit 68b793c9ba
17 changed files with 1695 additions and 23 deletions

View File

@@ -1,8 +1,8 @@
import { getStore } from './store.js';
export async function createUnderParent({ googleAuthId, parentId, name }) {
export async function createUnderParent({ googleAuthId, parentId, name, track_stock }) {
const store = await getStore();
return store.article.createUnderParent({ googleAuthId, parentId, name });
return store.article.createUnderParent({ googleAuthId, parentId, name, track_stock });
}
export async function getBySku(googleAuthId, sku) {
@@ -60,6 +60,11 @@ export async function setWeightBySku(googleAuthId, sku, weight) {
return store.article.setWeightBySku(googleAuthId, sku, weight);
}
export async function setTrackStockBySku(googleAuthId, sku, trackStock) {
const store = await getStore();
return store.article.setTrackStockBySku(googleAuthId, sku, trackStock);
}
export async function setCategoryIdsBySku(googleAuthId, sku, categoryIds) {
const store = await getStore();
return store.article.setCategoryIdsBySku(googleAuthId, sku, categoryIds);

View File

@@ -20,6 +20,11 @@ export async function update(googleAuthId, id, data) {
return store.warehouse.update(googleAuthId, id, data);
}
export async function order(googleAuthId, data) {
const store = await getStore();
return store.warehouse.order(googleAuthId, data);
}
export async function remove(googleAuthId, id) {
const store = await getStore();
return store.warehouse.delete(googleAuthId, id);