@fonixtree/magic-design 0.0.101 → 0.0.102

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.
@@ -217,7 +217,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
217
217
  storeName = _g[0],
218
218
  setStoreName = _g[1];
219
219
 
220
- var _h = (0, _react.useState)([]),
220
+ var _h = (0, _react.useState)(''),
221
221
  storeId = _h[0],
222
222
  setStoreId = _h[1];
223
223
 
@@ -293,27 +293,29 @@ var FilteredProductModal = function FilteredProductModal(props) {
293
293
 
294
294
  var columns = [{
295
295
  title: 'Image',
296
- dataIndex: 'productImageUrl',
297
- key: 'productImageUrl',
298
- render: function render(productImageUrl) {
296
+ dataIndex: 'imgUrl',
297
+ key: 'imgUrl',
298
+ width: 100,
299
+ render: function render(imgUrl, record) {
299
300
  return /*#__PURE__*/_react["default"].createElement("div", {
300
301
  className: "prodImage",
301
302
  style: {
302
- backgroundImage: "url(" + productImageUrl + ")"
303
+ backgroundImage: "url(\"" + (0, _commonUtil.convertImageUrl)(record.productImg || record.imgUrlContent || record.productImgContent) + "\")"
303
304
  }
304
305
  });
305
306
  }
306
307
  }, {
307
- title: 'Product Name',
308
- dataIndex: 'productName',
309
- key: 'productName',
308
+ title: 'Offer Name',
309
+ dataIndex: 'offerName',
310
+ key: 'offerName',
310
311
  ellipsis: true
311
- }, {
312
- title: 'SKU',
313
- dataIndex: 'attrValues',
314
- key: 'attrValues',
315
- ellipsis: true
316
- }, {
312
+ }, // {
313
+ // title: 'SKU',
314
+ // dataIndex: 'attrValues',
315
+ // key: 'attrValues',
316
+ // ellipsis: true,
317
+ // },
318
+ {
317
319
  title: 'Price',
318
320
  dataIndex: 'salesPrice',
319
321
  key: 'salesPrice',
@@ -453,7 +455,8 @@ var FilteredProductModal = function FilteredProductModal(props) {
453
455
  return v.key;
454
456
  }).join(','),
455
457
  labelIds: labelId.key,
456
- productName: productName,
458
+ q: productName,
459
+ // productName,
457
460
  storeId: storeId,
458
461
  minPrice: minimum * precision || '',
459
462
  maxPrice: maximum * precision || '',
@@ -465,10 +468,11 @@ var FilteredProductModal = function FilteredProductModal(props) {
465
468
  };
466
469
  return [4
467
470
  /*yield*/
468
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/products", params, 'GET')];
471
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/offers/es", params, 'POST')];
469
472
 
470
473
  case 1:
471
- res = _a.sent();
474
+ res = _a.sent(); // const res = await commonFetch(`${window.magicDesign.MBaseUrl}/products`, params, 'GET');
475
+
472
476
  setLoading(false);
473
477
  paginationParams.total = res.total;
474
478
 
@@ -217,7 +217,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
217
217
  storeName = _g[0],
218
218
  setStoreName = _g[1];
219
219
 
220
- var _h = (0, _react.useState)([]),
220
+ var _h = (0, _react.useState)(''),
221
221
  storeId = _h[0],
222
222
  setStoreId = _h[1];
223
223
 
@@ -293,27 +293,29 @@ var FilteredProductModal = function FilteredProductModal(props) {
293
293
 
294
294
  var columns = [{
295
295
  title: 'Image',
296
- dataIndex: 'productImageUrl',
297
- key: 'productImageUrl',
298
- render: function render(productImageUrl) {
296
+ dataIndex: 'imgUrl',
297
+ key: 'imgUrl',
298
+ width: 100,
299
+ render: function render(imgUrl, record) {
299
300
  return /*#__PURE__*/_react["default"].createElement("div", {
300
301
  className: "prodImage",
301
302
  style: {
302
- backgroundImage: "url(" + productImageUrl + ")"
303
+ backgroundImage: "url(\"" + (0, _commonUtil.convertImageUrl)(record.productImg || record.imgUrlContent || record.productImgContent) + "\")"
303
304
  }
304
305
  });
305
306
  }
306
307
  }, {
307
- title: 'Product Name',
308
- dataIndex: 'productName',
309
- key: 'productName',
308
+ title: 'Offer Name',
309
+ dataIndex: 'offerName',
310
+ key: 'offerName',
310
311
  ellipsis: true
311
- }, {
312
- title: 'SKU',
313
- dataIndex: 'attrValues',
314
- key: 'attrValues',
315
- ellipsis: true
316
- }, {
312
+ }, // {
313
+ // title: 'SKU',
314
+ // dataIndex: 'attrValues',
315
+ // key: 'attrValues',
316
+ // ellipsis: true,
317
+ // },
318
+ {
317
319
  title: 'Price',
318
320
  dataIndex: 'salesPrice',
319
321
  key: 'salesPrice',
@@ -453,7 +455,8 @@ var FilteredProductModal = function FilteredProductModal(props) {
453
455
  return v.key;
454
456
  }).join(','),
455
457
  labelIds: labelId.key,
456
- productName: productName,
458
+ q: productName,
459
+ // productName,
457
460
  storeId: storeId,
458
461
  minPrice: minimum * precision || '',
459
462
  maxPrice: maximum * precision || '',
@@ -465,10 +468,11 @@ var FilteredProductModal = function FilteredProductModal(props) {
465
468
  };
466
469
  return [4
467
470
  /*yield*/
468
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/products", params, 'GET')];
471
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/offers/es", params, 'POST')];
469
472
 
470
473
  case 1:
471
- res = _a.sent();
474
+ res = _a.sent(); // const res = await commonFetch(`${window.magicDesign.MBaseUrl}/products`, params, 'GET');
475
+
472
476
  setLoading(false);
473
477
  paginationParams.total = res.total;
474
478
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "0.0.101",
4
+ "version": "0.0.102",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",