addio-admin-sdk 1.7.98 → 1.7.100
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/Interfaces/Menu/index.d.ts +5 -0
- package/dist/Interfaces/Menu/index.js +7 -1
- package/dist/Interfaces/Menu/index.js.map +1 -1
- package/dist/lib/Cart/index.js +16 -0
- package/dist/lib/Cart/index.js.map +1 -1
- package/dist/lib/Declination/index.js +1 -1
- package/dist/lib/Declination/index.js.map +1 -1
- package/dist/lib/ProductAttribute/index.js +1 -1
- package/dist/lib/ProductAttribute/index.js.map +1 -1
- package/dist/lib/Space/index.d.ts +2 -1
- package/dist/lib/Space/index.js +3 -3
- package/dist/lib/Space/index.js.map +1 -1
- package/dist/rules/GR/constants/products.d.ts +3 -0
- package/dist/rules/GR/constants/products.js +4 -1
- package/dist/rules/GR/constants/products.js.map +1 -1
- package/dist/rules/GR/utils/cart.d.ts +1 -0
- package/dist/rules/GR/utils/cart.js +54 -1
- package/dist/rules/GR/utils/cart.js.map +1 -1
- package/dist/rules/GR/utils/expedition.js +2 -1
- package/dist/rules/GR/utils/expedition.js.map +1 -1
- package/dist/rules/GR/utils/g2.js +25 -7
- package/dist/rules/GR/utils/g2.js.map +1 -1
- package/dist/rules/GR/utils/products.d.ts +4 -0
- package/dist/rules/GR/utils/products.js +53 -3
- package/dist/rules/GR/utils/products.js.map +1 -1
- package/dist/utils/cart.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MenuEntryType = void 0;
|
|
3
|
+
exports.MenuPositionEnum = exports.MenuEntryType = void 0;
|
|
4
4
|
var MenuEntryType;
|
|
5
5
|
(function (MenuEntryType) {
|
|
6
6
|
MenuEntryType["Category"] = "category";
|
|
@@ -8,4 +8,10 @@ var MenuEntryType;
|
|
|
8
8
|
MenuEntryType["Url"] = "url";
|
|
9
9
|
MenuEntryType["Empty"] = "empty";
|
|
10
10
|
})(MenuEntryType = exports.MenuEntryType || (exports.MenuEntryType = {}));
|
|
11
|
+
var MenuPositionEnum;
|
|
12
|
+
(function (MenuPositionEnum) {
|
|
13
|
+
MenuPositionEnum["MAIN_WEB"] = "main_menu_web";
|
|
14
|
+
MenuPositionEnum["FOOTER_WEB"] = "menu_footer_web";
|
|
15
|
+
MenuPositionEnum["POS_HOME"] = "menu_pos_home";
|
|
16
|
+
})(MenuPositionEnum = exports.MenuPositionEnum || (exports.MenuPositionEnum = {}));
|
|
11
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Interfaces/Menu/index.ts"],"names":[],"mappings":";;;AAWA,IAAY,aAKX;AALD,WAAY,aAAa;IACxB,sCAAqB,CAAA;IACrB,wCAAuB,CAAA;IACvB,4BAAW,CAAA;IACX,gCAAe,CAAA;AAChB,CAAC,EALW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAKxB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Interfaces/Menu/index.ts"],"names":[],"mappings":";;;AAWA,IAAY,aAKX;AALD,WAAY,aAAa;IACxB,sCAAqB,CAAA;IACrB,wCAAuB,CAAA;IACvB,4BAAW,CAAA;IACX,gCAAe,CAAA;AAChB,CAAC,EALW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAKxB;AAWD,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC3B,8CAA0B,CAAA;IAC1B,kDAA8B,CAAA;IAC9B,8CAA0B,CAAA;AAC3B,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B"}
|
package/dist/lib/Cart/index.js
CHANGED
|
@@ -438,6 +438,7 @@ class Cart extends baseService_1.BaseServiceClass {
|
|
|
438
438
|
return itemsAndRestrictions;
|
|
439
439
|
};
|
|
440
440
|
this.verifyCartItems = async (space, orgID, saveToDatabase) => {
|
|
441
|
+
var _b, _c, _d;
|
|
441
442
|
try {
|
|
442
443
|
const actionsDone = [];
|
|
443
444
|
const isGR = space.data().id === services_1.SpaceIdEnum.GR;
|
|
@@ -475,6 +476,7 @@ class Cart extends baseService_1.BaseServiceClass {
|
|
|
475
476
|
if (!!__1.isTestEnv)
|
|
476
477
|
console.log('customPriceList.length: ', !!customPriceList && customPriceList.length);
|
|
477
478
|
let verifiedItems = [];
|
|
479
|
+
let installationParentProduct;
|
|
478
480
|
for (let cartItem of this.data().items) {
|
|
479
481
|
cartItem = Object.assign(Object.assign({}, cartItem), { state_after_verification: null });
|
|
480
482
|
if (!!cartItem.is_temp_prod || !!cartItem.price_override) {
|
|
@@ -529,6 +531,9 @@ class Cart extends baseService_1.BaseServiceClass {
|
|
|
529
531
|
if (!!proID && !!proCustomerTitle) {
|
|
530
532
|
parentProduct = await (0, products_1.updateProductWithInfo)(parentProduct, '', space, space.data().id, proCustomerTitle);
|
|
531
533
|
}
|
|
534
|
+
if (cartItem.parent_slug === 'installation-gazon') {
|
|
535
|
+
installationParentProduct = parentProduct;
|
|
536
|
+
}
|
|
532
537
|
let queryDeclination = parentProduct.declinations.find((decli) => decli.sku === cartItem.sku);
|
|
533
538
|
if (!!!queryDeclination) {
|
|
534
539
|
if (!!__1.isTestEnv)
|
|
@@ -736,6 +741,17 @@ class Cart extends baseService_1.BaseServiceClass {
|
|
|
736
741
|
}
|
|
737
742
|
verifiedItems.push(cartItem);
|
|
738
743
|
}
|
|
744
|
+
if (!!proID && !!proCustomerTitle && !!customPriceList && !!customPriceList.length) {
|
|
745
|
+
let installationParent = installationParentProduct;
|
|
746
|
+
if (!!!installationParent && verifiedItems.some((i) => i.parent_slug === 'installation-gazon')) {
|
|
747
|
+
const indexed = await space.indexedProducts.get({
|
|
748
|
+
query: [{ field: 'slug', operator: '==', value: 'installation-gazon' }]
|
|
749
|
+
});
|
|
750
|
+
if (!!indexed.length)
|
|
751
|
+
installationParent = (_d = (_c = (_b = indexed[0]).data) === null || _c === void 0 ? void 0 : _c.call(_b)) !== null && _d !== void 0 ? _d : indexed[0];
|
|
752
|
+
}
|
|
753
|
+
verifiedItems = (0, cart_2.applyInstallationToutInclusToVerifiedItems)(verifiedItems, customPriceList, !!proCustomerTitle, installationParent);
|
|
754
|
+
}
|
|
739
755
|
this._data = Object.assign(Object.assign({}, this._data), { items: verifiedItems.filter((item) => !!item) });
|
|
740
756
|
this.save({
|
|
741
757
|
items: verifiedItems.filter((item) => !!item)
|