@tallyui/connector-vendure 3.4.0 → 3.5.1
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/index.js +2 -1
- package/package.json +4 -4
- package/src/traits/product.ts +4 -0
package/dist/index.js
CHANGED
|
@@ -353,7 +353,8 @@ function createVendureProductTraits(barcodeField, stockLocationId, pricesInclude
|
|
|
353
353
|
getBarcode: (doc) => {
|
|
354
354
|
return barcodeField ? liveVariants(doc)[0]?.customFields?.[barcodeField] || void 0 : void 0;
|
|
355
355
|
},
|
|
356
|
-
getCategoryNames: (doc) => (doc.collections ?? []).map((c) => c.name).filter(Boolean)
|
|
356
|
+
getCategoryNames: (doc) => (doc.collections ?? []).map((c) => c.name).filter(Boolean),
|
|
357
|
+
getCategories: (doc) => (doc.collections ?? []).filter((c) => c.name).map((c) => ({ id: c.id != null ? String(c.id) : c.name, name: c.name }))
|
|
357
358
|
};
|
|
358
359
|
return traits;
|
|
359
360
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tallyui/connector-vendure",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Vendure connector for Tally UI",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"directory": "connectors/vendure"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@tallyui/core": "^3.
|
|
29
|
+
"@tallyui/core": "^3.5.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@tallyui/database": "3.
|
|
33
|
-
"@tallyui/pos": "3.
|
|
32
|
+
"@tallyui/database": "3.5.1",
|
|
33
|
+
"@tallyui/pos": "3.5.1",
|
|
34
34
|
"rxdb": "17.5.0"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
package/src/traits/product.ts
CHANGED
|
@@ -184,6 +184,10 @@ const traits: ProductTraits = {
|
|
|
184
184
|
|
|
185
185
|
getCategoryNames: (doc) =>
|
|
186
186
|
(doc.collections ?? []).map((c: any) => c.name).filter(Boolean),
|
|
187
|
+
|
|
188
|
+
getCategories: (doc) =>
|
|
189
|
+
(doc.collections ?? []).filter((c: any) => c.name)
|
|
190
|
+
.map((c: any) => ({ id: c.id != null ? String(c.id) : c.name, name: c.name })),
|
|
187
191
|
};
|
|
188
192
|
return traits;
|
|
189
193
|
}
|