Add article.listSearchIndex for client-side search preload
Returns all company articles with id, sku, name, and eans as a flat array. Walks the category tree to find reachable articles. Single query using recursive CTE + FOR JSON for eans.
This commit is contained in:
@@ -20,6 +20,7 @@ import articleOrderImages from './store/article/orderImages.js';
|
||||
import articleAddImage from './store/article/addImage.js';
|
||||
import articleCreateUnderParent from './store/article/createUnderParent.js';
|
||||
import articleGetBySku from './store/article/getBySku.js';
|
||||
import articleListSearchIndex from './store/article/listSearchIndex.js';
|
||||
import articleUpdateBySku from './store/article/updateBySku.js';
|
||||
import articleSetPricesBySku from './store/article/setPricesBySku.js';
|
||||
import articleSetEansBySku from './store/article/setEansBySku.js';
|
||||
@@ -95,6 +96,7 @@ export default class LibDashStore {
|
||||
this.article = {
|
||||
createUnderParent: articleCreateUnderParent(pool),
|
||||
getBySku: articleGetBySku(pool),
|
||||
listSearchIndex: articleListSearchIndex(pool),
|
||||
updateBySku: articleUpdateBySku(pool),
|
||||
setPricesBySku: articleSetPricesBySku(pool),
|
||||
setEansBySku: articleSetEansBySku(pool),
|
||||
|
||||
Reference in New Issue
Block a user