@fonixtree/magic-design 2.0.192 → 2.0.193

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.
Files changed (35) hide show
  1. package/es/common/SelectStoreModal/SortableImageList/index.js +5 -5
  2. package/es/common/SelectStoreModal/index.js +100 -359
  3. package/es/common/SelectStoreModal/index.less +1 -1
  4. package/es/common/StoreSource/index.js +255 -0
  5. package/es/common/StoreSource/index.less +14 -0
  6. package/es/common/index.js +8 -0
  7. package/es/composite-comp/public/components/Stores/defaultJSON.js +2 -1
  8. package/es/composite-comp/public/components/Stores/mobile/StoreItem/img/defaultHImg.png +0 -0
  9. package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.js +5 -3
  10. package/es/composite-comp/public/components/Stores/mobile/index.js +8 -5
  11. package/es/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.js +15 -2
  12. package/es/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.less +14 -0
  13. package/es/locale/ar/ar.json +7 -1
  14. package/es/locale/en/en.json +7 -1
  15. package/es/locale/es/es.json +7 -1
  16. package/es/locale/mn/mn.json +7 -1
  17. package/es/utils/commonUtil.js +11 -1
  18. package/lib/common/SelectStoreModal/SortableImageList/index.js +5 -5
  19. package/lib/common/SelectStoreModal/index.js +100 -359
  20. package/lib/common/SelectStoreModal/index.less +1 -1
  21. package/lib/common/StoreSource/index.js +255 -0
  22. package/lib/common/StoreSource/index.less +14 -0
  23. package/lib/common/index.js +8 -0
  24. package/lib/composite-comp/public/components/Stores/defaultJSON.js +2 -1
  25. package/lib/composite-comp/public/components/Stores/mobile/StoreItem/img/defaultHImg.png +0 -0
  26. package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.js +5 -3
  27. package/lib/composite-comp/public/components/Stores/mobile/index.js +8 -5
  28. package/lib/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.js +15 -2
  29. package/lib/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.less +14 -0
  30. package/lib/locale/ar/ar.json +7 -1
  31. package/lib/locale/en/en.json +7 -1
  32. package/lib/locale/es/es.json +7 -1
  33. package/lib/locale/mn/mn.json +7 -1
  34. package/lib/utils/commonUtil.js +11 -1
  35. package/package.json +1 -1
@@ -0,0 +1,255 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = StoreSource;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _locale = require("../../locale");
13
+
14
+ var _commonUtil = require("../../utils/commonUtil");
15
+
16
+ var _Button = _interopRequireDefault(require("../Button"));
17
+
18
+ require("./index.less");
19
+
20
+ var _SelectStoreModal = _interopRequireDefault(require("../SelectStoreModal"));
21
+
22
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
+
24
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
+
26
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
+
28
+ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) {
30
+ return value instanceof P ? value : new P(function (resolve) {
31
+ resolve(value);
32
+ });
33
+ }
34
+
35
+ return new (P || (P = Promise))(function (resolve, reject) {
36
+ function fulfilled(value) {
37
+ try {
38
+ step(generator.next(value));
39
+ } catch (e) {
40
+ reject(e);
41
+ }
42
+ }
43
+
44
+ function rejected(value) {
45
+ try {
46
+ step(generator["throw"](value));
47
+ } catch (e) {
48
+ reject(e);
49
+ }
50
+ }
51
+
52
+ function step(result) {
53
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
54
+ }
55
+
56
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
57
+ });
58
+ };
59
+
60
+ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
61
+ var _ = {
62
+ label: 0,
63
+ sent: function sent() {
64
+ if (t[0] & 1) throw t[1];
65
+ return t[1];
66
+ },
67
+ trys: [],
68
+ ops: []
69
+ },
70
+ f,
71
+ y,
72
+ t,
73
+ g;
74
+ return g = {
75
+ next: verb(0),
76
+ "throw": verb(1),
77
+ "return": verb(2)
78
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
79
+ return this;
80
+ }), g;
81
+
82
+ function verb(n) {
83
+ return function (v) {
84
+ return step([n, v]);
85
+ };
86
+ }
87
+
88
+ function step(op) {
89
+ if (f) throw new TypeError("Generator is already executing.");
90
+
91
+ while (_) {
92
+ try {
93
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
94
+ if (y = 0, t) op = [op[0] & 2, t.value];
95
+
96
+ switch (op[0]) {
97
+ case 0:
98
+ case 1:
99
+ t = op;
100
+ break;
101
+
102
+ case 4:
103
+ _.label++;
104
+ return {
105
+ value: op[1],
106
+ done: false
107
+ };
108
+
109
+ case 5:
110
+ _.label++;
111
+ y = op[1];
112
+ op = [0];
113
+ continue;
114
+
115
+ case 7:
116
+ op = _.ops.pop();
117
+
118
+ _.trys.pop();
119
+
120
+ continue;
121
+
122
+ default:
123
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
124
+ _ = 0;
125
+ continue;
126
+ }
127
+
128
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
129
+ _.label = op[1];
130
+ break;
131
+ }
132
+
133
+ if (op[0] === 6 && _.label < t[1]) {
134
+ _.label = t[1];
135
+ t = op;
136
+ break;
137
+ }
138
+
139
+ if (t && _.label < t[2]) {
140
+ _.label = t[2];
141
+
142
+ _.ops.push(op);
143
+
144
+ break;
145
+ }
146
+
147
+ if (t[2]) _.ops.pop();
148
+
149
+ _.trys.pop();
150
+
151
+ continue;
152
+ }
153
+
154
+ op = body.call(thisArg, _);
155
+ } catch (e) {
156
+ op = [6, e];
157
+ y = 0;
158
+ } finally {
159
+ f = t = 0;
160
+ }
161
+ }
162
+
163
+ if (op[0] & 5) throw op[1];
164
+ return {
165
+ value: op[0] ? op[1] : void 0,
166
+ done: true
167
+ };
168
+ }
169
+ };
170
+
171
+ function StoreSource(_a) {
172
+ var _this = this;
173
+
174
+ var value = _a.value,
175
+ onChange = _a.onChange;
176
+
177
+ var _b = (0, _react.useState)([]),
178
+ selectedStores = _b[0],
179
+ setSelectedStores = _b[1];
180
+
181
+ var _c = (0, _react.useState)(false),
182
+ visible = _c[0],
183
+ setVisbile = _c[1];
184
+
185
+ var onSelectProduct = function onSelectProduct() {
186
+ return __awaiter(_this, void 0, void 0, function () {
187
+ var res;
188
+ return __generator(this, function (_a) {
189
+ switch (_a.label) {
190
+ case 0:
191
+ if (!(value && value.length > 0)) return [3
192
+ /*break*/
193
+ , 2];
194
+ return [4
195
+ /*yield*/
196
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/stores/page", {
197
+ storeIds: value,
198
+ state: 'A'
199
+ }, 'GET')];
200
+
201
+ case 1:
202
+ res = _a.sent();
203
+ setSelectedStores(res.list || []);
204
+ return [3
205
+ /*break*/
206
+ , 3];
207
+
208
+ case 2:
209
+ setSelectedStores([]);
210
+ _a.label = 3;
211
+
212
+ case 3:
213
+ setVisbile(true);
214
+ return [2
215
+ /*return*/
216
+ ];
217
+ }
218
+ });
219
+ });
220
+ };
221
+
222
+ var handleModalSave = function handleModalSave(list) {
223
+ var ids = list.map(function (prod) {
224
+ return prod.storeId;
225
+ }).join(',');
226
+ onChange(ids);
227
+ };
228
+
229
+ var getLength = function getLength() {
230
+ if (!value) {
231
+ return 0;
232
+ }
233
+
234
+ return value.split(',').length;
235
+ };
236
+
237
+ return /*#__PURE__*/_react["default"].createElement("div", {
238
+ className: "storeSourceWrap"
239
+ }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
240
+ onClick: onSelectProduct,
241
+ type: "primary"
242
+ }, (0, _locale.i18n)('SELECT_STORE')), /*#__PURE__*/_react["default"].createElement("div", {
243
+ className: "total"
244
+ }, (0, _locale.i18n)('TOTAL_STORES', {
245
+ count: getLength()
246
+ })), visible && /*#__PURE__*/_react["default"].createElement(_SelectStoreModal["default"], {
247
+ closeModal: function closeModal() {
248
+ return setVisbile(false);
249
+ },
250
+ defaultList: selectedStores,
251
+ handleModalSave: handleModalSave,
252
+ maxSelect: 100,
253
+ visible: visible
254
+ }));
255
+ }
@@ -0,0 +1,14 @@
1
+ .storeSourceWrap {
2
+ margin-bottom: 15px;
3
+
4
+ .total {
5
+ margin-top: 10px;
6
+ font-family: 'Open Sans';
7
+ font-style: normal;
8
+ font-weight: 400;
9
+ font-size: 16px;
10
+ line-height: 24px;
11
+ text-align: center;
12
+ color: #8493AF;
13
+ }
14
+ }
@@ -135,6 +135,12 @@ Object.defineProperty(exports, "Slider", {
135
135
  return _Slider["default"];
136
136
  }
137
137
  });
138
+ Object.defineProperty(exports, "StoreSource", {
139
+ enumerable: true,
140
+ get: function get() {
141
+ return _StoreSource["default"];
142
+ }
143
+ });
138
144
  Object.defineProperty(exports, "SwiperBan", {
139
145
  enumerable: true,
140
146
  get: function get() {
@@ -204,6 +210,8 @@ var _ButtonIconLayout = _interopRequireDefault(require("./ButtonIconLayout"));
204
210
 
205
211
  var _ProductSource = _interopRequireDefault(require("./ProductSource"));
206
212
 
213
+ var _StoreSource = _interopRequireDefault(require("./StoreSource"));
214
+
207
215
  var _ImgArea = _interopRequireDefault(require("./ImgArea"));
208
216
 
209
217
  var _SystemNotification = _interopRequireDefault(require("./SystemNotification"));
@@ -320,7 +320,8 @@ var getDefaultJSON = function getDefaultJSON() {
320
320
  hover: null
321
321
  },
322
322
  sourceType: '1',
323
- maxProdNum: 5
323
+ maxProdNum: 5,
324
+ storeIds: ''
324
325
  },
325
326
  spacing: {
326
327
  mobile: {
@@ -11,6 +11,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
11
11
 
12
12
  var _defaultImg = _interopRequireDefault(require("./img/defaultImg.png"));
13
13
 
14
+ var _defaultHImg = _interopRequireDefault(require("./img/defaultHImg.png"));
15
+
14
16
  var _commonUtil = require("../../../../../../utils/commonUtil");
15
17
 
16
18
  var _currencyUtil = require("../../../../../../utils/currencyUtil");
@@ -123,7 +125,7 @@ function (_super) {
123
125
  }, /*#__PURE__*/_react["default"].createElement(_common.NewImg, {
124
126
  className: "product-img",
125
127
  lazy: true,
126
- src: data.storePosterUrl || _defaultImg["default"]
128
+ src: data.storePosterUrl || _defaultHImg["default"]
127
129
  }), freeDeliveryLabel.open && data.freeShipping === 'Y' && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
128
130
  className: "flag",
129
131
  data: freeDeliveryLabel
@@ -139,7 +141,7 @@ function (_super) {
139
141
  readonly: true
140
142
  }), data.newFlag === 'Y' && /*#__PURE__*/_react["default"].createElement("span", {
141
143
  className: "new"
142
- }, "New")), minOrder.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
144
+ }, (0, _locale.i18n)('NEW'))), minOrder.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
143
145
  className: "minOrder no-reversed",
144
146
  data: __assign(__assign({}, minOrder), {
145
147
  text: (0, _commonUtil.reverseStrArr)([(0, _locale.i18n)('MIN_ORDER'), ':', (data.minOrderAmount || 0) + " IQD"])
@@ -199,7 +201,7 @@ function (_super) {
199
201
  readonly: true
200
202
  }), data.newFlag === 'Y' && /*#__PURE__*/_react["default"].createElement("span", {
201
203
  className: "new"
202
- }, "New")), storeDesc.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
204
+ }, (0, _locale.i18n)('NEW'))), storeDesc.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
203
205
  className: "desc",
204
206
  data: __assign(__assign({}, storeDesc), {
205
207
  text: data.comments
@@ -243,21 +243,21 @@ function (_super) {
243
243
  };
244
244
  _this.sourceType = '1';
245
245
  _this.maxProdNum = 5;
246
+ _this.storeIds = '';
246
247
 
247
248
  _this.getData = function () {
248
249
  return __awaiter(_this, void 0, void 0, function () {
249
- var _a, maxProdNum, sourceType, params, info, res, list;
250
+ var _a, maxProdNum, sourceType, storeIds, params, info, res, list;
250
251
 
251
252
  var _b;
252
253
 
253
254
  return __generator(this, function (_c) {
254
255
  switch (_c.label) {
255
256
  case 0:
256
- _a = this.props.panelProps.content, maxProdNum = _a.maxProdNum, sourceType = _a.sourceType;
257
+ _a = this.props.panelProps.content, maxProdNum = _a.maxProdNum, sourceType = _a.sourceType, storeIds = _a.storeIds;
257
258
  params = {
258
259
  pageIndex: 1,
259
- pageSize: maxProdNum,
260
- pageTotal: true
260
+ pageSize: maxProdNum
261
261
  };
262
262
 
263
263
  if (sourceType === '2') {
@@ -266,6 +266,8 @@ function (_super) {
266
266
  params.newFlag = 'Y';
267
267
  } else if (sourceType === '4') {
268
268
  params.sortType = '1';
269
+ } else if (sourceType === '5') {
270
+ params.storeIdList = (storeIds === null || storeIds === void 0 ? void 0 : storeIds.split(',')) || [];
269
271
  }
270
272
 
271
273
  if ((0, _commonUtil.isLogin)()) {
@@ -303,10 +305,11 @@ function (_super) {
303
305
  };
304
306
 
305
307
  Mobile.prototype.componentWillReceiveProps = function (nextProps) {
306
- if (nextProps.panelProps.content.sourceType !== this.sourceType || nextProps.panelProps.content.maxProdNum !== this.maxProdNum) {
308
+ if (nextProps.panelProps.content.sourceType !== this.sourceType || nextProps.panelProps.content.maxProdNum !== this.maxProdNum || nextProps.panelProps.content.storeIds !== this.storeIds) {
307
309
  this.getData();
308
310
  this.sourceType = nextProps.panelProps.content.sourceType;
309
311
  this.maxProdNum = nextProps.panelProps.content.maxProdNum;
312
+ this.storeIds = nextProps.panelProps.content.storeIds;
310
313
  }
311
314
  };
312
315
 
@@ -19,6 +19,8 @@ var _common = require("../../../../../common");
19
19
 
20
20
  var _locale = require("../../../../../locale");
21
21
 
22
+ require("./index.less");
23
+
22
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
25
 
24
26
  var __extends = void 0 && (void 0).__extends || function () {
@@ -133,7 +135,9 @@ function (_super) {
133
135
  metaOption: panelProps.distance
134
136
  }],
135
137
  type: "switch"
136
- }), /*#__PURE__*/_react["default"].createElement(_common.Field, {
138
+ }), /*#__PURE__*/_react["default"].createElement("div", {
139
+ className: "sourceOfProduct"
140
+ }, /*#__PURE__*/_react["default"].createElement(_common.Field, {
137
141
  title: (0, _locale.i18n)('SOURCE_OF_ACTIVITY'),
138
142
  topSplit: true
139
143
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
@@ -153,7 +157,16 @@ function (_super) {
153
157
  value: "4"
154
158
  }, (0, _locale.i18n)('HIGH_SALES_STORES')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
155
159
  value: "5"
156
- }, (0, _locale.i18n)('SELECT_STORES')))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
160
+ }, (0, _locale.i18n)('SELECT_STORES')))), panelProps.sourceType === '5' && /*#__PURE__*/_react["default"].createElement("div", {
161
+ className: "greyBg"
162
+ }, /*#__PURE__*/_react["default"].createElement(_common.StoreSource, {
163
+ onChange: function onChange(ids) {
164
+ panelProps.storeIds = ids;
165
+
166
+ _this.reRender();
167
+ },
168
+ value: panelProps.storeIds
169
+ }))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
157
170
  title: (0, _locale.i18n)('PRODUCT_QUANTITY'),
158
171
  topSplit: true
159
172
  }, /*#__PURE__*/_react["default"].createElement(_antd.Radio.Group, {
@@ -0,0 +1,14 @@
1
+ .stores_content {
2
+ .sourceOfProduct {
3
+ border-top: 1px solid #D2D9E5;
4
+ padding-top: 20px;
5
+ padding-bottom: 10px;
6
+
7
+ .greyBg {
8
+ background: #F5F6F7;
9
+ border-radius: 6px;
10
+ padding: 12px;
11
+ padding-bottom: 1px;
12
+ }
13
+ }
14
+ }
@@ -1,4 +1,10 @@
1
1
  {
2
+ "NEW": "New",
3
+ "ALL": "All",
4
+ "CLOSE": "Close",
5
+ "OPEN": "Open",
6
+ "SELECT_STORE": "Select Store",
7
+ "STORE_LOGO": "Store Logo",
2
8
  "STORE_STATE": "Store State",
3
9
  "BUSINESS_TYPE": "Business Type",
4
10
  "STORE_SELECT": "Store Select",
@@ -47,7 +53,6 @@
47
53
  "CAMPAIGN_NAME": "Campaign Name",
48
54
  "PROCESSING": "Processing",
49
55
  "HAS_NOT_STARTED": "Has not started",
50
- "ALL": "ALL",
51
56
  "PERIOD_OF_VAILDITY": "Period of Vaildity",
52
57
  "COUPON_VALUE": "Coupon Value",
53
58
  "COUPON_NAME": "Coupon Name",
@@ -351,6 +356,7 @@
351
356
  "ADD_IMAGE": "Add Image",
352
357
  "ADD_BANNER": "Add Banner",
353
358
  "TOTAL_PRODUCTS": "Total {count} products",
359
+ "TOTAL_STORES": "Total {count} stores",
354
360
  "SELECTED": "Selected",
355
361
  "GROUP_BUY": "Group Buy",
356
362
  "RESET": "Reset",
@@ -1,4 +1,10 @@
1
1
  {
2
+ "NEW": "New",
3
+ "ALL": "All",
4
+ "CLOSE": "Close",
5
+ "OPEN": "Open",
6
+ "SELECT_STORE": "Select Store",
7
+ "STORE_LOGO": "Store Logo",
2
8
  "STORE_STATE": "Store State",
3
9
  "BUSINESS_TYPE": "Business Type",
4
10
  "STORE_SELECT": "Store Select",
@@ -47,7 +53,6 @@
47
53
  "CAMPAIGN_NAME": "Campaign Name",
48
54
  "PROCESSING": "Processing",
49
55
  "HAS_NOT_STARTED": "Has not started",
50
- "ALL": "ALL",
51
56
  "PERIOD_OF_VAILDITY": "Period of Vaildity",
52
57
  "COUPON_VALUE": "Coupon Value",
53
58
  "COUPON_NAME": "Coupon Name",
@@ -351,6 +356,7 @@
351
356
  "ADD_IMAGE": "Add Image",
352
357
  "ADD_BANNER": "Add Banner",
353
358
  "TOTAL_PRODUCTS": "Total {count} products",
359
+ "TOTAL_STORES": "Total {count} stores",
354
360
  "SELECTED": "Selected",
355
361
  "GROUP_BUY": "Group Buy",
356
362
  "RESET": "Reset",
@@ -1,4 +1,10 @@
1
1
  {
2
+ "NEW": "New",
3
+ "ALL": "TODO",
4
+ "CLOSE": "Close",
5
+ "OPEN": "Open",
6
+ "SELECT_STORE": "Select Store",
7
+ "STORE_LOGO": "Store Logo",
2
8
  "STORE_STATE": "Store State",
3
9
  "BUSINESS_TYPE": "Business Type",
4
10
  "STORE_SELECT": "Store Select",
@@ -47,7 +53,6 @@
47
53
  "CAMPAIGN_NAME": "Campaign Name",
48
54
  "PROCESSING": "Processing",
49
55
  "HAS_NOT_STARTED": "Has not started",
50
- "ALL": "TODO",
51
56
  "PERIOD_OF_VAILDITY": "Period of Vaildity",
52
57
  "COUPON_VALUE": "Coupon Value",
53
58
  "COUPON_NAME": "Coupon Name",
@@ -351,6 +356,7 @@
351
356
  "ADD_IMAGE": "Añadir Imagen",
352
357
  "ADD_BANNER": "Agregar Banner",
353
358
  "TOTAL_PRODUCTS": "Total {count} productos",
359
+ "TOTAL_STORES": "Total {count} stores",
354
360
  "SELECTED": "Seleccionado",
355
361
  "GROUP_BUY": "Compra en grupo",
356
362
  "RESET": "Restablecer",
@@ -1,4 +1,10 @@
1
1
  {
2
+ "NEW": "New",
3
+ "ALL": "БҮГД",
4
+ "CLOSE": "Close",
5
+ "OPEN": "Open",
6
+ "SELECT_STORE": "Select Store",
7
+ "STORE_LOGO": "Store Logo",
2
8
  "STORE_STATE": "Store State",
3
9
  "BUSINESS_TYPE": "Business Type",
4
10
  "STORE_SELECT": "Store Select",
@@ -47,7 +53,6 @@
47
53
  "CAMPAIGN_NAME": "Аяны нэр",
48
54
  "PROCESSING": "Боловсруулж байна",
49
55
  "HAS_NOT_STARTED": "Эхлээгүй байна",
50
- "ALL": "БҮГД",
51
56
  "PERIOD_OF_VAILDITY": "Хүчинтэй байх хугацаа",
52
57
  "COUPON_VALUE": "Купоны үнэ цэнэ",
53
58
  "COUPON_NAME": "Купоны нэр",
@@ -351,6 +356,7 @@
351
356
  "ADD_IMAGE": "Зураг нэмэх",
352
357
  "ADD_BANNER": "Баннер нэмэх",
353
358
  "TOTAL_PRODUCTS": "Нийт {count} бүтээгдэхүүн",
359
+ "TOTAL_STORES": "Total {count} stores",
354
360
  "SELECTED": "Сонгосон",
355
361
  "GROUP_BUY": "Бүлгийн худалдан авалт",
356
362
  "RESET": "Дахин тохируулах",
@@ -245,12 +245,22 @@ function commonFetch(url, data, method) {
245
245
  var _a, _b;
246
246
 
247
247
  var credentials = localStorage.getItem('credentials');
248
+ var csrf = localStorage.getItem('X-CSRF-TOKEN');
248
249
  var headers = {
250
+ Accept: 'application/json',
249
251
  'Content-Type': 'application/json; charset=UTF-8',
250
252
  credentials: credentials,
251
- accessToken: credentials
253
+ accessToken: credentials,
254
+ 'X-CSRF-TOKEN': csrf
252
255
  };
253
256
 
257
+ if (url.endsWith('portal/login')) {
258
+ headers = __assign(__assign({}, headers), {
259
+ 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8',
260
+ 'X-Requested-With': 'XMLHttpRequest'
261
+ });
262
+ }
263
+
254
264
  if (_method === 'GET') {
255
265
  if ((_a = window.magicDesign) === null || _a === void 0 ? void 0 : _a.fetch) {
256
266
  window.magicDesign.fetch(url, {
@@ -56,10 +56,10 @@ function SortableImageList(_a) {
56
56
 
57
57
  var moveCard = (0, _react.useCallback)(function (dragNodeId, hoverNodeId) {
58
58
  var dragIndex = list.findIndex(function (comp) {
59
- return comp.productId === Number(dragNodeId);
59
+ return comp.storeId === Number(dragNodeId);
60
60
  });
61
61
  var hoverIndex = list.findIndex(function (comp) {
62
- return comp.productId === Number(hoverNodeId);
62
+ return comp.storeId === Number(hoverNodeId);
63
63
  });
64
64
  setList(function (prevCards) {
65
65
  var newList = (0, _immutabilityHelper["default"])(prevCards, {
@@ -95,7 +95,7 @@ function SortableImageList(_a) {
95
95
  }, /*#__PURE__*/_react["default"].createElement("img", {
96
96
  alt: "",
97
97
  className: "selectedItemImg " + (item.state !== 'A' ? 'invalid' : ''),
98
- "data-nodeid": item.productId,
98
+ "data-nodeid": item.storeId,
99
99
  draggable: "true",
100
100
  onDragEnd: onDragEnd,
101
101
  onDragEnter: onDragEnter,
@@ -103,8 +103,8 @@ function SortableImageList(_a) {
103
103
  e.preventDefault();
104
104
  },
105
105
  onDragStart: onDragStart,
106
- src: item.productImageUrl,
107
- title: item.productName
106
+ src: item.storeLogoUrl,
107
+ title: item.storeName
108
108
  }), /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
109
109
  className: "selectedItemClose",
110
110
  color: "#000",