tabexseriescomponents 0.0.413 → 0.0.414
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.cjs.js +181 -139
- package/dist/index.esm.js +181 -139
- package/dist/index.umd.js +181 -139
- package/package.json +1 -1
- package/src 2.zip +0 -0
- package/srcbeforeedits.zip +0 -0
package/dist/index.esm.js
CHANGED
|
@@ -13346,15 +13346,18 @@ var Select$1 = /*#__PURE__*/React.lazy(function () {
|
|
|
13346
13346
|
return import('react-select');
|
|
13347
13347
|
});
|
|
13348
13348
|
var Filter$1 = function Filter(props) {
|
|
13349
|
-
var
|
|
13349
|
+
var _css;
|
|
13350
13350
|
var lang = props.actions.lang;
|
|
13351
13351
|
var langdetect = props.actions.langdetect;
|
|
13352
13352
|
props.actions.productfiltercontext;
|
|
13353
13353
|
props.actions.setproductfiltercontext;
|
|
13354
13354
|
var ProductFilterObjContext = props.actions.ProductFilterObjContext;
|
|
13355
13355
|
var setProductFilterObjContext = props.actions.setProductFilterObjContext;
|
|
13356
|
-
|
|
13356
|
+
props.actions.authdetailsContext;
|
|
13357
|
+
var fetchproductoptionsQueryContext = props.actions.fetchproductoptionsQueryContext;
|
|
13358
|
+
var fetchCategoriesQueryContext = props.actions.fetchCategoriesQueryContext;
|
|
13357
13359
|
var routingcountext = props.actions.routingcountext;
|
|
13360
|
+
var fetchcollectionsQueryContext = props.actions.fetchcollectionsQueryContext;
|
|
13358
13361
|
var StaticPagesLinksContext = props.actions.StaticPagesLinksContext;
|
|
13359
13362
|
var ikimagecredcontext = props.actions.ikimagecredcontext;
|
|
13360
13363
|
var _useState = useState({
|
|
@@ -13380,7 +13383,8 @@ var Filter$1 = function Filter(props) {
|
|
|
13380
13383
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
13381
13384
|
sectionproperties = _useState6[0],
|
|
13382
13385
|
setsectionproperties = _useState6[1];
|
|
13383
|
-
|
|
13386
|
+
// const [instfilters, setinstfilters] = useState([...authdetailsContext.instinfo.instfilters]);
|
|
13387
|
+
var _useState7 = useState([]),
|
|
13384
13388
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
13385
13389
|
instfilters = _useState8[0],
|
|
13386
13390
|
setinstfilters = _useState8[1];
|
|
@@ -13388,11 +13392,11 @@ var Filter$1 = function Filter(props) {
|
|
|
13388
13392
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
13389
13393
|
collectionstobevisible = _useState10[0],
|
|
13390
13394
|
setcollectionstobevisible = _useState10[1];
|
|
13391
|
-
var _useState11 = useState(
|
|
13395
|
+
var _useState11 = useState([]),
|
|
13392
13396
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
13393
13397
|
instcollections = _useState12[0],
|
|
13394
13398
|
setinstcollections = _useState12[1];
|
|
13395
|
-
var _useState13 = useState(
|
|
13399
|
+
var _useState13 = useState([]),
|
|
13396
13400
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
13397
13401
|
instcategories = _useState14[0],
|
|
13398
13402
|
setinstcategories = _useState14[1];
|
|
@@ -13441,11 +13445,28 @@ var Filter$1 = function Filter(props) {
|
|
|
13441
13445
|
filterupdater();
|
|
13442
13446
|
}, []);
|
|
13443
13447
|
useEffect(function () {
|
|
13444
|
-
|
|
13445
|
-
|
|
13446
|
-
|
|
13447
|
-
|
|
13448
|
-
}, [
|
|
13448
|
+
if (fetchproductoptionsQueryContext.isSuccess) {
|
|
13449
|
+
var _fetchproductoptionsQ;
|
|
13450
|
+
setinstfilters(_toConsumableArray(fetchproductoptionsQueryContext === null || fetchproductoptionsQueryContext === void 0 || (_fetchproductoptionsQ = fetchproductoptionsQueryContext.data) === null || _fetchproductoptionsQ === void 0 || (_fetchproductoptionsQ = _fetchproductoptionsQ.data) === null || _fetchproductoptionsQ === void 0 ? void 0 : _fetchproductoptionsQ.productoptions));
|
|
13451
|
+
}
|
|
13452
|
+
}, [fetchproductoptionsQueryContext.isSuccess]);
|
|
13453
|
+
useEffect(function () {
|
|
13454
|
+
if (fetchCategoriesQueryContext.isSuccess) {
|
|
13455
|
+
var _fetchCategoriesQuery;
|
|
13456
|
+
setinstcategories(_toConsumableArray(fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery === void 0 || (_fetchCategoriesQuery = _fetchCategoriesQuery.data) === null || _fetchCategoriesQuery === void 0 ? void 0 : _fetchCategoriesQuery.categories));
|
|
13457
|
+
}
|
|
13458
|
+
}, [fetchCategoriesQueryContext.isSuccess]);
|
|
13459
|
+
useEffect(function () {
|
|
13460
|
+
if (fetchcollectionsQueryContext.isSuccess) {
|
|
13461
|
+
var _fetchcollectionsQuer;
|
|
13462
|
+
setinstcollections(_toConsumableArray(fetchcollectionsQueryContext === null || fetchcollectionsQueryContext === void 0 || (_fetchcollectionsQuer = fetchcollectionsQueryContext.data) === null || _fetchcollectionsQuer === void 0 || (_fetchcollectionsQuer = _fetchcollectionsQuer.data) === null || _fetchcollectionsQuer === void 0 ? void 0 : _fetchcollectionsQuer.collections));
|
|
13463
|
+
}
|
|
13464
|
+
}, [fetchcollectionsQueryContext.isSuccess]);
|
|
13465
|
+
// useEffect(() => {
|
|
13466
|
+
// // setinstfilters([...authdetailsContext.instinfo.instfilters]);
|
|
13467
|
+
// // setinstcollections([...authdetailsContext.instinfo.instcollections]);
|
|
13468
|
+
// // setinstcategories([...authdetailsContext?.instinfo?.instcategories]);
|
|
13469
|
+
// }, [authdetailsContext]);
|
|
13449
13470
|
useEffect(function () {
|
|
13450
13471
|
if (props.sectionpropertiesprops != undefined && props.sectionpropertiesprops.length != 0) {
|
|
13451
13472
|
setsectionproperties(props.sectionpropertiesprops);
|
|
@@ -13470,69 +13491,73 @@ var Filter$1 = function Filter(props) {
|
|
|
13470
13491
|
}, 500);
|
|
13471
13492
|
}, [raterangevalue]);
|
|
13472
13493
|
useEffect(function () {
|
|
13473
|
-
if (
|
|
13474
|
-
if ((
|
|
13475
|
-
|
|
13476
|
-
|
|
13477
|
-
|
|
13478
|
-
|
|
13479
|
-
|
|
13480
|
-
|
|
13481
|
-
|
|
13482
|
-
|
|
13483
|
-
|
|
13484
|
-
|
|
13485
|
-
|
|
13486
|
-
|
|
13487
|
-
|
|
13488
|
-
});
|
|
13489
|
-
}
|
|
13490
|
-
});
|
|
13491
|
-
});
|
|
13492
|
-
} else {
|
|
13493
|
-
instcategories === null || instcategories === void 0 || instcategories.forEach(function (catitem, catindex) {
|
|
13494
|
-
var _catitem$parentcollet2;
|
|
13495
|
-
catitem === null || catitem === void 0 || (_catitem$parentcollet2 = catitem.parentcolletions) === null || _catitem$parentcollet2 === void 0 || _catitem$parentcollet2.forEach(function (parentcolitem, parentcolindex) {
|
|
13496
|
-
var _parentcolitem$collec;
|
|
13497
|
-
parentcolitem === null || parentcolitem === void 0 || (_parentcolitem$collec = parentcolitem.collections) === null || _parentcolitem$collec === void 0 || _parentcolitem$collec.forEach(function (colitem, colindex) {
|
|
13498
|
-
var _ProductFilterObjCont2;
|
|
13499
|
-
ProductFilterObjContext === null || ProductFilterObjContext === void 0 || (_ProductFilterObjCont2 = ProductFilterObjContext.collections) === null || _ProductFilterObjCont2 === void 0 || _ProductFilterObjCont2.forEach(function (colitem2, colindex2) {
|
|
13500
|
-
if (colitem.collectionid == colitem2) {
|
|
13494
|
+
if (fetchCategoriesQueryContext.isSuccess && fetchcollectionsQueryContext.isSuccess) {
|
|
13495
|
+
if ((sectionproperties === null || sectionproperties === void 0 ? void 0 : sectionproperties.filterretreivetype) == 'Depend on chosen parent group') {
|
|
13496
|
+
if ((ProductFilterObjContext === null || ProductFilterObjContext === void 0 ? void 0 : ProductFilterObjContext.collections) != undefined && (ProductFilterObjContext === null || ProductFilterObjContext === void 0 ? void 0 : ProductFilterObjContext.collections) != null && Array.isArray(ProductFilterObjContext === null || ProductFilterObjContext === void 0 ? void 0 : ProductFilterObjContext.collections)) {
|
|
13497
|
+
var _parentidsfound;
|
|
13498
|
+
var collectiontobevisible = [];
|
|
13499
|
+
var parentidsfound = [];
|
|
13500
|
+
if (ProductFilterObjContext.ProductFetchingType == 'Parent Collection') {
|
|
13501
|
+
parentidsfound = ProductFilterObjContext === null || ProductFilterObjContext === void 0 ? void 0 : ProductFilterObjContext.collections;
|
|
13502
|
+
} else if (ProductFilterObjContext.ProductFetchingType == 'Category') {
|
|
13503
|
+
instcategories === null || instcategories === void 0 || instcategories.forEach(function (catitem, catindex) {
|
|
13504
|
+
var _ProductFilterObjCont;
|
|
13505
|
+
ProductFilterObjContext === null || ProductFilterObjContext === void 0 || (_ProductFilterObjCont = ProductFilterObjContext.collections) === null || _ProductFilterObjCont === void 0 || _ProductFilterObjCont.forEach(function (colitem2, colindex2) {
|
|
13506
|
+
if (catitem.categoryid == colitem2) {
|
|
13507
|
+
var _catitem$parentcollet;
|
|
13508
|
+
catitem === null || catitem === void 0 || (_catitem$parentcollet = catitem.parentcolletions) === null || _catitem$parentcollet === void 0 || _catitem$parentcollet.forEach(function (parentcolitem, parentcolindex) {
|
|
13501
13509
|
parentidsfound.push(parentcolitem.parentcollectionid);
|
|
13502
|
-
}
|
|
13510
|
+
});
|
|
13511
|
+
}
|
|
13512
|
+
});
|
|
13513
|
+
});
|
|
13514
|
+
} else {
|
|
13515
|
+
instcategories === null || instcategories === void 0 || instcategories.forEach(function (catitem, catindex) {
|
|
13516
|
+
var _catitem$parentcollet2;
|
|
13517
|
+
catitem === null || catitem === void 0 || (_catitem$parentcollet2 = catitem.parentcolletions) === null || _catitem$parentcollet2 === void 0 || _catitem$parentcollet2.forEach(function (parentcolitem, parentcolindex) {
|
|
13518
|
+
var _parentcolitem$collec;
|
|
13519
|
+
parentcolitem === null || parentcolitem === void 0 || (_parentcolitem$collec = parentcolitem.collections) === null || _parentcolitem$collec === void 0 || _parentcolitem$collec.forEach(function (colitem, colindex) {
|
|
13520
|
+
var _ProductFilterObjCont2;
|
|
13521
|
+
ProductFilterObjContext === null || ProductFilterObjContext === void 0 || (_ProductFilterObjCont2 = ProductFilterObjContext.collections) === null || _ProductFilterObjCont2 === void 0 || _ProductFilterObjCont2.forEach(function (colitem2, colindex2) {
|
|
13522
|
+
if (colitem.collectionid == colitem2) {
|
|
13523
|
+
parentidsfound.push(parentcolitem.parentcollectionid);
|
|
13524
|
+
}
|
|
13525
|
+
});
|
|
13503
13526
|
});
|
|
13504
13527
|
});
|
|
13505
13528
|
});
|
|
13529
|
+
}
|
|
13530
|
+
parentidsfound = parentidsfound.filter(function (val, id, array) {
|
|
13531
|
+
return array.indexOf(val) == id;
|
|
13506
13532
|
});
|
|
13507
|
-
|
|
13508
|
-
|
|
13509
|
-
|
|
13510
|
-
|
|
13511
|
-
|
|
13512
|
-
|
|
13513
|
-
|
|
13514
|
-
|
|
13515
|
-
|
|
13516
|
-
|
|
13517
|
-
|
|
13518
|
-
|
|
13519
|
-
|
|
13520
|
-
|
|
13521
|
-
|
|
13522
|
-
if (
|
|
13523
|
-
|
|
13533
|
+
if (((_parentidsfound = parentidsfound) === null || _parentidsfound === void 0 ? void 0 : _parentidsfound.length) != 0) {
|
|
13534
|
+
instcategories === null || instcategories === void 0 || instcategories.forEach(function (catitem, catindex) {
|
|
13535
|
+
var _catitem$parentcollet3;
|
|
13536
|
+
catitem === null || catitem === void 0 || (_catitem$parentcollet3 = catitem.parentcolletions) === null || _catitem$parentcollet3 === void 0 || _catitem$parentcollet3.forEach(function (parentcolitem, parentcolindex) {
|
|
13537
|
+
var _parentidsfound2;
|
|
13538
|
+
(_parentidsfound2 = parentidsfound) === null || _parentidsfound2 === void 0 || _parentidsfound2.forEach(function (parentidfounditem, parentidfoundindex) {
|
|
13539
|
+
if (parentidfounditem == (parentcolitem === null || parentcolitem === void 0 ? void 0 : parentcolitem.parentcollectionid)) {
|
|
13540
|
+
var _parentcolitem$collec2;
|
|
13541
|
+
parentcolitem === null || parentcolitem === void 0 || (_parentcolitem$collec2 = parentcolitem.collections) === null || _parentcolitem$collec2 === void 0 || _parentcolitem$collec2.forEach(function (colitem, colindex) {
|
|
13542
|
+
var iscolexists = false;
|
|
13543
|
+
collectiontobevisible === null || collectiontobevisible === void 0 || collectiontobevisible.forEach(function (colitemex, colindexex) {
|
|
13544
|
+
if (colitemex.collectionid == colitem.collectionid) {
|
|
13545
|
+
iscolexists = true;
|
|
13546
|
+
}
|
|
13547
|
+
});
|
|
13548
|
+
if (iscolexists == false) {
|
|
13549
|
+
collectiontobevisible.push(colitem);
|
|
13524
13550
|
}
|
|
13525
13551
|
});
|
|
13526
|
-
|
|
13527
|
-
|
|
13528
|
-
}
|
|
13529
|
-
});
|
|
13530
|
-
}
|
|
13552
|
+
}
|
|
13553
|
+
});
|
|
13531
13554
|
});
|
|
13532
13555
|
});
|
|
13533
|
-
|
|
13534
|
-
|
|
13535
|
-
|
|
13556
|
+
if ((collectiontobevisible === null || collectiontobevisible === void 0 ? void 0 : collectiontobevisible.length) != 0) {
|
|
13557
|
+
setcollectionstobevisible(collectiontobevisible);
|
|
13558
|
+
} else {
|
|
13559
|
+
setcollectionstobevisible(instcollections);
|
|
13560
|
+
}
|
|
13536
13561
|
} else {
|
|
13537
13562
|
setcollectionstobevisible(instcollections);
|
|
13538
13563
|
}
|
|
@@ -13542,10 +13567,8 @@ var Filter$1 = function Filter(props) {
|
|
|
13542
13567
|
} else {
|
|
13543
13568
|
setcollectionstobevisible(instcollections);
|
|
13544
13569
|
}
|
|
13545
|
-
} else {
|
|
13546
|
-
setcollectionstobevisible(instcollections);
|
|
13547
13570
|
}
|
|
13548
|
-
}, [ProductFilterObjContext]);
|
|
13571
|
+
}, [ProductFilterObjContext, fetchCategoriesQueryContext.isSuccess, fetchcollectionsQueryContext.isSuccess, instcategories, instcollections]);
|
|
13549
13572
|
useEffect(function () {
|
|
13550
13573
|
if (productfeatuesarr.length != 0) {
|
|
13551
13574
|
var tempfetchproductsfilerobjcontext = _objectSpread$28({}, ProductFilterObjContext);
|
|
@@ -13752,7 +13775,7 @@ var Filter$1 = function Filter(props) {
|
|
|
13752
13775
|
}))))));
|
|
13753
13776
|
};
|
|
13754
13777
|
var AccordionOuter = function AccordionOuter(categoryItem, categoryIndex) {
|
|
13755
|
-
var
|
|
13778
|
+
var _instcategories$categ;
|
|
13756
13779
|
return /*#__PURE__*/React.createElement(AccordionItem, {
|
|
13757
13780
|
uuid: categoryIndex
|
|
13758
13781
|
}, /*#__PURE__*/React.createElement(AccordionItemHeading, null, /*#__PURE__*/React.createElement(AccordionItemButton, null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -13791,7 +13814,7 @@ var Filter$1 = function Filter(props) {
|
|
|
13791
13814
|
onClick: function onClick() {
|
|
13792
13815
|
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, 'categories/' + categoryItem.categoryid);
|
|
13793
13816
|
}
|
|
13794
|
-
}, langdetect == 'en' ? sectionproperties.explorebtncontenten : sectionproperties.explorebtncontentar, ' ', langdetect == 'en' ? categoryItem.title_en : categoryItem.title_ar)),
|
|
13817
|
+
}, langdetect == 'en' ? sectionproperties.explorebtncontenten : sectionproperties.explorebtncontentar, ' ', langdetect == 'en' ? categoryItem.title_en : categoryItem.title_ar)), (_instcategories$categ = instcategories[categoryIndex]) === null || _instcategories$categ === void 0 ? void 0 : _instcategories$categ.parentcolletions.map(function (parentcollectionitem, parentcollectionindex) {
|
|
13795
13818
|
if (parentcollectionitem.isinftiler == 1) {
|
|
13796
13819
|
return /*#__PURE__*/React.createElement("div", {
|
|
13797
13820
|
"class": "col-lg-12"
|
|
@@ -15129,6 +15152,7 @@ var CardsSection = function CardsSection(props) {
|
|
|
15129
15152
|
var fetchingtype = props.actions.fetchingtype;
|
|
15130
15153
|
props.actions.addtofavoritescontext;
|
|
15131
15154
|
var fetchAuthorizationQueryContext = props.actions.fetchAuthorizationQueryContext;
|
|
15155
|
+
var fetchCategoriesQueryContext = props.actions.fetchCategoriesQueryContext;
|
|
15132
15156
|
var FetchVendorsQuery = props.actions.FetchVendorsQuery;
|
|
15133
15157
|
props.actions.ikimagecredcontext;
|
|
15134
15158
|
props.actions.sortbycontext;
|
|
@@ -15265,47 +15289,49 @@ var CardsSection = function CardsSection(props) {
|
|
|
15265
15289
|
tempfetchproductsfilerobjcontext.grouptyperefid = ProductsFetchingTypeSectionObj.grouptyperefid;
|
|
15266
15290
|
setProductFilterObjContext(_objectSpread$26({}, tempfetchproductsfilerobjcontext));
|
|
15267
15291
|
}
|
|
15292
|
+
setFetchQueriesEngineContext(_objectSpread$26({}, tempFetchQueriesEngineContext));
|
|
15293
|
+
}
|
|
15294
|
+
}, [fetchingtype, ProductsFetchingTypeSectionObj]);
|
|
15295
|
+
useEffect(function () {
|
|
15296
|
+
if ((fetchingtype === null || fetchingtype === void 0 ? void 0 : fetchingtype.length) != 0) {
|
|
15268
15297
|
if (fetchingtype == 'categories') {
|
|
15269
|
-
|
|
15270
|
-
|
|
15271
|
-
|
|
15298
|
+
var categories = [];
|
|
15299
|
+
if (fetchCategoriesQueryContext !== null && fetchCategoriesQueryContext !== void 0 && fetchCategoriesQueryContext.isSuccess) {
|
|
15300
|
+
var _fetchCategoriesQuery;
|
|
15301
|
+
categories = fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery === void 0 || (_fetchCategoriesQuery = _fetchCategoriesQuery.data) === null || _fetchCategoriesQuery === void 0 ? void 0 : _fetchCategoriesQuery.categories;
|
|
15272
15302
|
}
|
|
15303
|
+
cardobjassigner(categories);
|
|
15273
15304
|
}
|
|
15274
15305
|
if (fetchingtype == 'parentcollections' || fetchingtype == 'innercategories') {
|
|
15275
|
-
|
|
15276
|
-
|
|
15277
|
-
|
|
15278
|
-
|
|
15279
|
-
|
|
15280
|
-
|
|
15281
|
-
|
|
15282
|
-
|
|
15283
|
-
|
|
15284
|
-
|
|
15306
|
+
var _categories;
|
|
15307
|
+
var categories = [];
|
|
15308
|
+
if (fetchCategoriesQueryContext !== null && fetchCategoriesQueryContext !== void 0 && fetchCategoriesQueryContext.isSuccess) {
|
|
15309
|
+
var _fetchCategoriesQuery2;
|
|
15310
|
+
categories = fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery2 = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery2 === void 0 || (_fetchCategoriesQuery2 = _fetchCategoriesQuery2.data) === null || _fetchCategoriesQuery2 === void 0 ? void 0 : _fetchCategoriesQuery2.categories;
|
|
15311
|
+
}
|
|
15312
|
+
// if (fetchAuthorizationQueryContext?.isSuccess) {
|
|
15313
|
+
// var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
|
|
15314
|
+
// alert(JSON.stringify(categories));
|
|
15315
|
+
var parentcollections = [];
|
|
15316
|
+
(_categories = categories) === null || _categories === void 0 || _categories.forEach(function (catitem, catindex) {
|
|
15317
|
+
catitem === null || catitem === void 0 || catitem.parentcolletions.forEach(function (parentcolitem) {
|
|
15318
|
+
if (parentcolitem.isshowntocustomers == 1) {
|
|
15319
|
+
parentcolitem.categoryid = catitem.categoryid;
|
|
15320
|
+
parentcollections.push(parentcolitem);
|
|
15321
|
+
}
|
|
15322
|
+
});
|
|
15323
|
+
});
|
|
15324
|
+
if (fetchingtype == 'parentcollections') {
|
|
15325
|
+
if ((sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid) != null && (sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid) != undefined && (sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid) != 'all') {
|
|
15326
|
+
var arrafterfilter = [];
|
|
15327
|
+
parentcollections.forEach(function (parentcolitem, parcolindex) {
|
|
15328
|
+
if (parentcolitem.categoryid == (sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid)) {
|
|
15329
|
+
arrafterfilter.push(parentcolitem);
|
|
15285
15330
|
}
|
|
15286
15331
|
});
|
|
15287
|
-
|
|
15288
|
-
if (fetchingtype == 'parentcollections') {
|
|
15289
|
-
if ((sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid) != null && (sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid) != undefined && (sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid) != 'all') {
|
|
15290
|
-
var arrafterfilter = [];
|
|
15291
|
-
parentcollections.forEach(function (parentcolitem, parcolindex) {
|
|
15292
|
-
if (parentcolitem.categoryid == (sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid)) {
|
|
15293
|
-
arrafterfilter.push(parentcolitem);
|
|
15294
|
-
}
|
|
15295
|
-
});
|
|
15296
|
-
parentcollections = arrafterfilter;
|
|
15297
|
-
}
|
|
15298
|
-
if (props.collectionidprops != null && props.collectionidprops != undefined && props.collectionidprops != 'all') {
|
|
15299
|
-
var arrafterfilter = [];
|
|
15300
|
-
parentcollections.forEach(function (parentcolitem, parcolindex) {
|
|
15301
|
-
if (parentcolitem.categoryid == props.collectionidprops) {
|
|
15302
|
-
arrafterfilter.push(parentcolitem);
|
|
15303
|
-
}
|
|
15304
|
-
});
|
|
15305
|
-
parentcollections = arrafterfilter;
|
|
15306
|
-
}
|
|
15332
|
+
parentcollections = arrafterfilter;
|
|
15307
15333
|
}
|
|
15308
|
-
if (
|
|
15334
|
+
if (props.collectionidprops != null && props.collectionidprops != undefined && props.collectionidprops != 'all') {
|
|
15309
15335
|
var arrafterfilter = [];
|
|
15310
15336
|
parentcollections.forEach(function (parentcolitem, parcolindex) {
|
|
15311
15337
|
if (parentcolitem.categoryid == props.collectionidprops) {
|
|
@@ -15314,48 +15340,62 @@ var CardsSection = function CardsSection(props) {
|
|
|
15314
15340
|
});
|
|
15315
15341
|
parentcollections = arrafterfilter;
|
|
15316
15342
|
}
|
|
15317
|
-
cardobjassigner(parentcollections);
|
|
15318
15343
|
}
|
|
15344
|
+
if (fetchingtype == 'innercategories') {
|
|
15345
|
+
var arrafterfilter = [];
|
|
15346
|
+
parentcollections.forEach(function (parentcolitem, parcolindex) {
|
|
15347
|
+
if (parentcolitem.categoryid == props.collectionidprops) {
|
|
15348
|
+
arrafterfilter.push(parentcolitem);
|
|
15349
|
+
}
|
|
15350
|
+
});
|
|
15351
|
+
parentcollections = arrafterfilter;
|
|
15352
|
+
}
|
|
15353
|
+
cardobjassigner(parentcollections);
|
|
15354
|
+
// }
|
|
15319
15355
|
} else if (fetchingtype == 'innerparentcollections') {
|
|
15320
|
-
|
|
15321
|
-
|
|
15322
|
-
|
|
15323
|
-
var
|
|
15324
|
-
(
|
|
15325
|
-
|
|
15326
|
-
|
|
15327
|
-
|
|
15328
|
-
|
|
15329
|
-
|
|
15330
|
-
|
|
15331
|
-
|
|
15332
|
-
|
|
15333
|
-
|
|
15356
|
+
var _categories2;
|
|
15357
|
+
var categories = [];
|
|
15358
|
+
if (fetchCategoriesQueryContext !== null && fetchCategoriesQueryContext !== void 0 && fetchCategoriesQueryContext.isSuccess) {
|
|
15359
|
+
var _fetchCategoriesQuery3;
|
|
15360
|
+
categories = fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery3 = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery3 === void 0 || (_fetchCategoriesQuery3 = _fetchCategoriesQuery3.data) === null || _fetchCategoriesQuery3 === void 0 ? void 0 : _fetchCategoriesQuery3.categories;
|
|
15361
|
+
}
|
|
15362
|
+
// if (fetchAuthorizationQueryContext?.isSuccess) {
|
|
15363
|
+
// var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
|
|
15364
|
+
var collections = [];
|
|
15365
|
+
(_categories2 = categories) === null || _categories2 === void 0 || _categories2.forEach(function (catitem, catindex) {
|
|
15366
|
+
catitem === null || catitem === void 0 || catitem.parentcolletions.forEach(function (parentcolitem) {
|
|
15367
|
+
var _parentcolitem$collec;
|
|
15368
|
+
parentcolitem.categoryid = catitem.categoryid;
|
|
15369
|
+
parentcolitem === null || parentcolitem === void 0 || (_parentcolitem$collec = parentcolitem.collections) === null || _parentcolitem$collec === void 0 || _parentcolitem$collec.forEach(function (collitem, colindex) {
|
|
15370
|
+
if (collitem.isshowntocustomers == 1) {
|
|
15371
|
+
collitem.parentcollectionid = parentcolitem.parentcollectionid;
|
|
15372
|
+
collections.push(collitem);
|
|
15373
|
+
}
|
|
15334
15374
|
});
|
|
15335
15375
|
});
|
|
15336
|
-
|
|
15337
|
-
|
|
15338
|
-
|
|
15339
|
-
|
|
15340
|
-
|
|
15341
|
-
|
|
15342
|
-
|
|
15343
|
-
|
|
15344
|
-
|
|
15345
|
-
});
|
|
15346
|
-
if (iscollexists == false) {
|
|
15347
|
-
collectionsafterfilter.push(colitem);
|
|
15376
|
+
});
|
|
15377
|
+
if (fetchingtype == 'innerparentcollections') {
|
|
15378
|
+
var collectionsafterfilter = [];
|
|
15379
|
+
collections.forEach(function (colitem, colindex) {
|
|
15380
|
+
if (colitem.parentcollectionid == props.collectionidprops) {
|
|
15381
|
+
var iscollexists = false;
|
|
15382
|
+
collectionsafterfilter.forEach(function (existcolitem) {
|
|
15383
|
+
if (colitem.collectionid == existcolitem.collectionid) {
|
|
15384
|
+
iscollexists = true;
|
|
15348
15385
|
}
|
|
15386
|
+
});
|
|
15387
|
+
if (iscollexists == false) {
|
|
15388
|
+
collectionsafterfilter.push(colitem);
|
|
15349
15389
|
}
|
|
15350
|
-
}
|
|
15351
|
-
|
|
15352
|
-
|
|
15353
|
-
cardobjassigner(collections);
|
|
15390
|
+
}
|
|
15391
|
+
});
|
|
15392
|
+
collections = collectionsafterfilter;
|
|
15354
15393
|
}
|
|
15394
|
+
cardobjassigner(collections);
|
|
15395
|
+
// }
|
|
15355
15396
|
}
|
|
15356
|
-
setFetchQueriesEngineContext(_objectSpread$26({}, tempFetchQueriesEngineContext));
|
|
15357
15397
|
}
|
|
15358
|
-
}, [fetchingtype, ProductsFetchingTypeSectionObj]);
|
|
15398
|
+
}, [fetchingtype, ProductsFetchingTypeSectionObj, fetchCategoriesQueryContext.isSuccess]);
|
|
15359
15399
|
useEffect(function () {
|
|
15360
15400
|
if (fetchingtype == 'products') {
|
|
15361
15401
|
if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
|
|
@@ -15474,9 +15514,11 @@ var CardsSection = function CardsSection(props) {
|
|
|
15474
15514
|
cardobj.productcanrate = arrayItem.productinfo.productcanrate;
|
|
15475
15515
|
cardobj.sku = arrayItem.productinfo.sku;
|
|
15476
15516
|
if (langdetect == 'en') {
|
|
15477
|
-
|
|
15517
|
+
var _fetchAuthorizationQu;
|
|
15518
|
+
cardobj.currencyname = fetchAuthorizationQueryContext === null || fetchAuthorizationQueryContext === void 0 || (_fetchAuthorizationQu = fetchAuthorizationQueryContext.data) === null || _fetchAuthorizationQu === void 0 || (_fetchAuthorizationQu = _fetchAuthorizationQu.data) === null || _fetchAuthorizationQu === void 0 ? void 0 : _fetchAuthorizationQu.currencyname_en;
|
|
15478
15519
|
} else {
|
|
15479
|
-
|
|
15520
|
+
var _fetchAuthorizationQu2;
|
|
15521
|
+
cardobj.currencyname = fetchAuthorizationQueryContext === null || fetchAuthorizationQueryContext === void 0 || (_fetchAuthorizationQu2 = fetchAuthorizationQueryContext.data) === null || _fetchAuthorizationQu2 === void 0 || (_fetchAuthorizationQu2 = _fetchAuthorizationQu2.data) === null || _fetchAuthorizationQu2 === void 0 ? void 0 : _fetchAuthorizationQu2.currencyname_ar;
|
|
15480
15522
|
}
|
|
15481
15523
|
if (favoriteprojectscountContext != undefined && favoriteprojectscountContext.length != 0) {
|
|
15482
15524
|
favoriteprojectscountContext.forEach(function (favitem, favindex) {
|
|
@@ -15790,7 +15832,7 @@ var CardsSection = function CardsSection(props) {
|
|
|
15790
15832
|
isloading = true;
|
|
15791
15833
|
}
|
|
15792
15834
|
} else {
|
|
15793
|
-
if ((
|
|
15835
|
+
if ((fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 ? void 0 : fetchCategoriesQueryContext.isFetching) == true || (fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 ? void 0 : fetchCategoriesQueryContext.isFetching) == true) {
|
|
15794
15836
|
isloading = true;
|
|
15795
15837
|
}
|
|
15796
15838
|
}
|