@pisell/pisellos 0.0.57 → 0.0.59
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/core/index.d.ts.map +1 -0
- package/dist/effects/index.d.ts.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/modules/Account/index.d.ts.map +1 -0
- package/dist/modules/Account/types.d.ts.map +1 -0
- package/dist/modules/AccountList/index.d.ts.map +1 -0
- package/dist/modules/AccountList/types.d.ts.map +1 -0
- package/dist/modules/AccountList/utils.d.ts.map +1 -0
- package/dist/modules/BaseModule.d.ts.map +1 -0
- package/dist/modules/Cart/index.d.ts.map +1 -0
- package/dist/modules/Cart/types.d.ts.map +1 -0
- package/dist/modules/Cart/utils.d.ts.map +1 -0
- package/dist/modules/Date/index.d.ts.map +1 -0
- package/dist/modules/Date/types.d.ts.map +1 -0
- package/dist/modules/Date/utils.d.ts.map +1 -0
- package/dist/modules/Discount/index.d.ts.map +1 -0
- package/dist/modules/Discount/types.d.ts.map +1 -0
- package/dist/modules/Guests/index.d.ts.map +1 -0
- package/dist/modules/Guests/types.d.ts.map +1 -0
- package/dist/modules/Order/index.d.ts.map +1 -0
- package/dist/modules/Order/types.d.ts.map +1 -0
- package/dist/modules/Order/utils.d.ts.map +1 -0
- package/dist/modules/Payment/index.d.ts.map +1 -0
- package/dist/modules/Payment/types.d.ts.map +1 -0
- package/dist/modules/Product/index.d.ts.map +1 -0
- package/dist/modules/Product/types.d.ts.map +1 -0
- package/dist/modules/ProductList/index.d.ts.map +1 -0
- package/dist/modules/ProductList/types.d.ts.map +1 -0
- package/dist/modules/Resource/index.d.ts.map +1 -0
- package/dist/modules/Resource/types.d.ts.map +1 -0
- package/dist/modules/Resource/utils.d.ts.map +1 -0
- package/dist/modules/Rules/index.d.ts.map +1 -0
- package/dist/modules/Rules/types.d.ts.map +1 -0
- package/dist/modules/Schedule/index.d.ts.map +1 -0
- package/dist/modules/Schedule/type.d.ts.map +1 -0
- package/dist/modules/Schedule/types.d.ts.map +1 -0
- package/dist/modules/Schedule/utils.d.ts.map +1 -0
- package/dist/modules/Step/index.d.ts.map +1 -0
- package/dist/modules/Step/tyeps.d.ts.map +1 -0
- package/dist/modules/Summary/index.d.ts.map +1 -0
- package/dist/modules/Summary/types.d.ts.map +1 -0
- package/dist/modules/Summary/utils.d.ts.map +1 -0
- package/dist/modules/index.d.ts.map +1 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/request.d.ts.map +1 -0
- package/dist/plugins/shopStore.d.ts.map +1 -0
- package/dist/plugins/window.d.ts.map +1 -0
- package/dist/solution/BookingByStep/index.d.ts +0 -11
- package/dist/solution/BookingByStep/index.d.ts.map +1 -0
- package/dist/solution/BookingByStep/index.js +85 -112
- package/dist/solution/BookingByStep/types.d.ts.map +1 -0
- package/dist/solution/BookingByStep/utils/products.d.ts.map +1 -0
- package/dist/solution/BookingByStep/utils/resources.d.ts +6 -3
- package/dist/solution/BookingByStep/utils/resources.d.ts.map +1 -0
- package/dist/solution/BookingByStep/utils/resources.js +35 -6
- package/dist/solution/BuyTickets/index.d.ts.map +1 -0
- package/dist/solution/BuyTickets/types.d.ts.map +1 -0
- package/dist/solution/PlaceOrder/index.d.ts.map +1 -0
- package/dist/solution/ShopDiscount/index.d.ts.map +1 -0
- package/dist/solution/ShopDiscount/types.d.ts.map +1 -0
- package/dist/solution/ShopDiscount/utils.d.ts.map +1 -0
- package/dist/solution/index.d.ts.map +1 -0
- package/dist/store/createStore.d.ts.map +1 -0
- package/dist/types/index.d.ts.map +1 -0
- package/lib/solution/BookingByStep/index.d.ts +0 -11
- package/lib/solution/BookingByStep/index.js +70 -63
- package/lib/solution/BookingByStep/utils/resources.d.ts +6 -3
- package/lib/solution/BookingByStep/utils/resources.js +32 -5
- package/package.json +1 -1
|
@@ -1139,6 +1139,16 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1139
1139
|
if (cartItem._origin.start_time) {
|
|
1140
1140
|
var startTime = dayjs("".concat(cartItem._origin.start_date, " ").concat(cartItem._origin.start_time));
|
|
1141
1141
|
var endTime = dayjs("".concat(cartItem._origin.end_date, " ").concat(cartItem._origin.end_time));
|
|
1142
|
+
// 资源排下序,把单个资源靠前,组合资源排在后面
|
|
1143
|
+
productResources.sort(function (a, b) {
|
|
1144
|
+
var _a$metadata, _b$metadata;
|
|
1145
|
+
var aIsCombined = ((_a$metadata = a.metadata) === null || _a$metadata === void 0 || (_a$metadata = _a$metadata.combined_resource) === null || _a$metadata === void 0 ? void 0 : _a$metadata.status) === 1;
|
|
1146
|
+
var bIsCombined = ((_b$metadata = b.metadata) === null || _b$metadata === void 0 || (_b$metadata = _b$metadata.combined_resource) === null || _b$metadata === void 0 ? void 0 : _b$metadata.status) === 1;
|
|
1147
|
+
if (aIsCombined && !bIsCombined) return 1;
|
|
1148
|
+
if (!aIsCombined && bIsCombined) return -1;
|
|
1149
|
+
return 0;
|
|
1150
|
+
});
|
|
1151
|
+
var resourcesUseableMap = {};
|
|
1142
1152
|
productResources.forEach(function (n) {
|
|
1143
1153
|
n.renderList = n.renderList.filter(function (m) {
|
|
1144
1154
|
var recordCount = capacityMap[m.id] || 0;
|
|
@@ -1152,8 +1162,12 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1152
1162
|
},
|
|
1153
1163
|
time: item,
|
|
1154
1164
|
resource: m,
|
|
1155
|
-
currentCount: recordCount + (currentCapacity || 0)
|
|
1165
|
+
currentCount: recordCount + (currentCapacity || 0),
|
|
1166
|
+
resourcesUseableMap: resourcesUseableMap
|
|
1156
1167
|
});
|
|
1168
|
+
if ((resourcesUseableMap === null || resourcesUseableMap === void 0 ? void 0 : resourcesUseableMap[m.id]) !== false) {
|
|
1169
|
+
resourcesUseableMap[m.id] = res.usable;
|
|
1170
|
+
}
|
|
1157
1171
|
return res.usable;
|
|
1158
1172
|
});
|
|
1159
1173
|
return canUseTime;
|
|
@@ -1241,87 +1255,15 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1241
1255
|
return timeSlots;
|
|
1242
1256
|
}
|
|
1243
1257
|
|
|
1244
|
-
// 自动分派可用的资源-单种资源类型——此方法目前未使用,未经验证
|
|
1245
|
-
}, {
|
|
1246
|
-
key: "autoSelectResource",
|
|
1247
|
-
value: function autoSelectResource(_ref8) {
|
|
1248
|
-
var resourceProductData = _ref8.resourceProductData,
|
|
1249
|
-
resources = _ref8.resources,
|
|
1250
|
-
timeSlots = _ref8.timeSlots;
|
|
1251
|
-
var dateRange = this.store.date.getDateRange();
|
|
1252
|
-
if (timeSlots) {
|
|
1253
|
-
// 如果 start_time 存在,则直接根据 start_time 算出商品总共需要的时长,然后根据时长去匹配资源
|
|
1254
|
-
// const duration = resourceProductData.product.duration.value;
|
|
1255
|
-
// const start_time = timeSlots.start_at.format("YYYY-MM-DD HH:mm");
|
|
1256
|
-
// const end_time = dayjs(`${dateRange[0].date} ${start_time}`)
|
|
1257
|
-
// .add(duration, resourceProductData.product.duration.type)
|
|
1258
|
-
// .format("HH:mm");
|
|
1259
|
-
// 根据 start_time 和 end_time 去匹配资源
|
|
1260
|
-
var targetResource = null;
|
|
1261
|
-
var _iterator2 = _createForOfIteratorHelper(resources),
|
|
1262
|
-
_step2;
|
|
1263
|
-
try {
|
|
1264
|
-
var _loop = function _loop() {
|
|
1265
|
-
var n = _step2.value;
|
|
1266
|
-
var canUseTime = n.times.find(function (item) {
|
|
1267
|
-
var res = getIsUsableByTimeItem({
|
|
1268
|
-
timeSlice: timeSlots,
|
|
1269
|
-
time: item,
|
|
1270
|
-
resource: n,
|
|
1271
|
-
currentCount: 1
|
|
1272
|
-
});
|
|
1273
|
-
return res.usable;
|
|
1274
|
-
});
|
|
1275
|
-
if (canUseTime) {
|
|
1276
|
-
targetResource = n;
|
|
1277
|
-
return 1; // break
|
|
1278
|
-
}
|
|
1279
|
-
};
|
|
1280
|
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
1281
|
-
if (_loop()) break;
|
|
1282
|
-
}
|
|
1283
|
-
} catch (err) {
|
|
1284
|
-
_iterator2.e(err);
|
|
1285
|
-
} finally {
|
|
1286
|
-
_iterator2.f();
|
|
1287
|
-
}
|
|
1288
|
-
return {
|
|
1289
|
-
selectedResource: targetResource
|
|
1290
|
-
};
|
|
1291
|
-
} else {
|
|
1292
|
-
// 如果没有传递 timeSlots,证明是第一个资源,则直接拿商品的 duration,到资源列表里找一个公共可用的
|
|
1293
|
-
var duration = resourceProductData.product.duration.value;
|
|
1294
|
-
var resourcesMap = getResourcesMap(resources);
|
|
1295
|
-
var resourceIds = resources.map(function (n) {
|
|
1296
|
-
return n.id;
|
|
1297
|
-
});
|
|
1298
|
-
var _timeSlots = getTimeSlicesByResources({
|
|
1299
|
-
resourceIds: resourceIds,
|
|
1300
|
-
resourcesMap: resourcesMap,
|
|
1301
|
-
duration: duration,
|
|
1302
|
-
currentDate: dateRange[0].date,
|
|
1303
|
-
split: 10
|
|
1304
|
-
});
|
|
1305
|
-
// 如果timeSlots返回了 空数组,代表没有可用的资源了
|
|
1306
|
-
if (!_timeSlots) {
|
|
1307
|
-
return; // 给一个提示?
|
|
1308
|
-
}
|
|
1309
|
-
return {
|
|
1310
|
-
timeSlots: _timeSlots,
|
|
1311
|
-
selectedResource: resources[0]
|
|
1312
|
-
};
|
|
1313
|
-
}
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
1258
|
// 自动分派可用资源-pro 版,ui 传递某个账号,自动给某个账号下所有商品分配第一种资源
|
|
1317
1259
|
}, {
|
|
1318
1260
|
key: "autoSelectAccountResources",
|
|
1319
|
-
value: function autoSelectAccountResources(
|
|
1320
|
-
var holder_id =
|
|
1321
|
-
resources_code =
|
|
1322
|
-
timeSlots =
|
|
1323
|
-
countMap =
|
|
1324
|
-
capacity =
|
|
1261
|
+
value: function autoSelectAccountResources(_ref8) {
|
|
1262
|
+
var holder_id = _ref8.holder_id,
|
|
1263
|
+
resources_code = _ref8.resources_code,
|
|
1264
|
+
timeSlots = _ref8.timeSlots,
|
|
1265
|
+
countMap = _ref8.countMap,
|
|
1266
|
+
capacity = _ref8.capacity;
|
|
1325
1267
|
var dateRange = this.store.date.getDateRange();
|
|
1326
1268
|
var cartItems = this.store.cart.getItems();
|
|
1327
1269
|
// 取到账号下所有的商品,然后根据商品的 duration 和资源列表,获取所有可用的资源
|
|
@@ -1349,6 +1291,16 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1349
1291
|
}
|
|
1350
1292
|
});
|
|
1351
1293
|
});
|
|
1294
|
+
// 资源排下序,把单个资源靠前,组合资源排在后面
|
|
1295
|
+
resources.sort(function (a, b) {
|
|
1296
|
+
var _a$metadata2, _b$metadata2;
|
|
1297
|
+
var aIsCombined = ((_a$metadata2 = a.metadata) === null || _a$metadata2 === void 0 || (_a$metadata2 = _a$metadata2.combined_resource) === null || _a$metadata2 === void 0 ? void 0 : _a$metadata2.status) === 1;
|
|
1298
|
+
var bIsCombined = ((_b$metadata2 = b.metadata) === null || _b$metadata2 === void 0 || (_b$metadata2 = _b$metadata2.combined_resource) === null || _b$metadata2 === void 0 ? void 0 : _b$metadata2.status) === 1;
|
|
1299
|
+
if (aIsCombined && !bIsCombined) return 1;
|
|
1300
|
+
if (!aIsCombined && bIsCombined) return -1;
|
|
1301
|
+
return 0;
|
|
1302
|
+
});
|
|
1303
|
+
var resourcesUseableMap = {};
|
|
1352
1304
|
|
|
1353
1305
|
// 如果有选择时间了,则代表不是第一种资源了,则需要根据开始时间去匹配
|
|
1354
1306
|
// 每个商品
|
|
@@ -1359,19 +1311,23 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1359
1311
|
// .format("HH:mm");
|
|
1360
1312
|
// 根据 start_time 和 end_time 去匹配资源
|
|
1361
1313
|
var targetResource = null;
|
|
1362
|
-
var
|
|
1363
|
-
|
|
1314
|
+
var _iterator2 = _createForOfIteratorHelper(resources),
|
|
1315
|
+
_step2;
|
|
1364
1316
|
try {
|
|
1365
|
-
var
|
|
1366
|
-
var n =
|
|
1317
|
+
var _loop = function _loop() {
|
|
1318
|
+
var n = _step2.value;
|
|
1367
1319
|
var recordCount = countMap[n.id] || 0;
|
|
1368
1320
|
var canUseTime = n.times.find(function (item) {
|
|
1369
1321
|
var res = getIsUsableByTimeItem({
|
|
1370
1322
|
timeSlice: timeSlots,
|
|
1371
1323
|
time: item,
|
|
1372
1324
|
resource: n,
|
|
1373
|
-
currentCount: recordCount + (capacity || 0)
|
|
1325
|
+
currentCount: recordCount + (capacity || 0),
|
|
1326
|
+
resourcesUseableMap: resourcesUseableMap
|
|
1374
1327
|
});
|
|
1328
|
+
if ((resourcesUseableMap === null || resourcesUseableMap === void 0 ? void 0 : resourcesUseableMap[n.id]) !== false) {
|
|
1329
|
+
resourcesUseableMap[n.id] = res.usable;
|
|
1330
|
+
}
|
|
1375
1331
|
return res.usable;
|
|
1376
1332
|
});
|
|
1377
1333
|
if (canUseTime) {
|
|
@@ -1379,13 +1335,13 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1379
1335
|
return 1; // break
|
|
1380
1336
|
}
|
|
1381
1337
|
};
|
|
1382
|
-
for (
|
|
1383
|
-
if (
|
|
1338
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
1339
|
+
if (_loop()) break;
|
|
1384
1340
|
}
|
|
1385
1341
|
} catch (err) {
|
|
1386
|
-
|
|
1342
|
+
_iterator2.e(err);
|
|
1387
1343
|
} finally {
|
|
1388
|
-
|
|
1344
|
+
_iterator2.f();
|
|
1389
1345
|
}
|
|
1390
1346
|
return {
|
|
1391
1347
|
selectedResource: targetResource
|
|
@@ -1395,20 +1351,21 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1395
1351
|
var resourceIds = resources.map(function (n) {
|
|
1396
1352
|
return n.id;
|
|
1397
1353
|
});
|
|
1398
|
-
var
|
|
1354
|
+
var _timeSlots = getTimeSlicesByResources({
|
|
1399
1355
|
resourceIds: resourceIds,
|
|
1400
1356
|
resourcesMap: resourcesMap,
|
|
1401
1357
|
duration: duration,
|
|
1402
1358
|
currentDate: dateRange[0].date,
|
|
1403
1359
|
split: 10,
|
|
1404
|
-
capacity: capacity
|
|
1360
|
+
capacity: capacity,
|
|
1361
|
+
resourcesUseableMap: resourcesUseableMap
|
|
1405
1362
|
});
|
|
1406
1363
|
// 如果timeSlots返回了 空数组,代表没有可用的资源了
|
|
1407
|
-
if (!
|
|
1364
|
+
if (!_timeSlots) {
|
|
1408
1365
|
return; // 给一个提示?
|
|
1409
1366
|
}
|
|
1410
1367
|
return {
|
|
1411
|
-
timeSlots:
|
|
1368
|
+
timeSlots: _timeSlots,
|
|
1412
1369
|
selectedResource: resources[0]
|
|
1413
1370
|
};
|
|
1414
1371
|
}
|
|
@@ -1458,9 +1415,9 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1458
1415
|
}
|
|
1459
1416
|
if (recordTimeSlots) {
|
|
1460
1417
|
if (index !== 0 && recordTimeSlots) {
|
|
1461
|
-
var _item$_productOrigin$, _item$_productOrigin4,
|
|
1462
|
-
var start_at = dayjs(recordTimeSlots.end_time).add((_item$_productOrigin$ = (_item$_productOrigin4 = item._productOrigin) === null || _item$_productOrigin4 === void 0 || (_item$_productOrigin4 = _item$_productOrigin4.duration) === null || _item$_productOrigin4 === void 0 ? void 0 : _item$_productOrigin4.value) !== null && _item$_productOrigin$ !== void 0 ? _item$_productOrigin$ : 0, (
|
|
1463
|
-
var end_at = start_at.add((_item$_productOrigin$2 = (_item$_productOrigin6 = item._productOrigin) === null || _item$_productOrigin6 === void 0 || (_item$_productOrigin6 = _item$_productOrigin6.duration) === null || _item$_productOrigin6 === void 0 ? void 0 : _item$_productOrigin6.value) !== null && _item$_productOrigin$2 !== void 0 ? _item$_productOrigin$2 : 0, (
|
|
1418
|
+
var _item$_productOrigin$, _item$_productOrigin4, _ref9, _item$_productOrigin5, _item$_productOrigin$2, _item$_productOrigin6, _ref10, _item$_productOrigin7;
|
|
1419
|
+
var start_at = dayjs(recordTimeSlots.end_time).add((_item$_productOrigin$ = (_item$_productOrigin4 = item._productOrigin) === null || _item$_productOrigin4 === void 0 || (_item$_productOrigin4 = _item$_productOrigin4.duration) === null || _item$_productOrigin4 === void 0 ? void 0 : _item$_productOrigin4.value) !== null && _item$_productOrigin$ !== void 0 ? _item$_productOrigin$ : 0, (_ref9 = (_item$_productOrigin5 = item._productOrigin) === null || _item$_productOrigin5 === void 0 || (_item$_productOrigin5 = _item$_productOrigin5.duration) === null || _item$_productOrigin5 === void 0 ? void 0 : _item$_productOrigin5.type) !== null && _ref9 !== void 0 ? _ref9 : 'minutes');
|
|
1420
|
+
var end_at = start_at.add((_item$_productOrigin$2 = (_item$_productOrigin6 = item._productOrigin) === null || _item$_productOrigin6 === void 0 || (_item$_productOrigin6 = _item$_productOrigin6.duration) === null || _item$_productOrigin6 === void 0 ? void 0 : _item$_productOrigin6.value) !== null && _item$_productOrigin$2 !== void 0 ? _item$_productOrigin$2 : 0, (_ref10 = (_item$_productOrigin7 = item._productOrigin) === null || _item$_productOrigin7 === void 0 || (_item$_productOrigin7 = _item$_productOrigin7.duration) === null || _item$_productOrigin7 === void 0 ? void 0 : _item$_productOrigin7.type) !== null && _ref10 !== void 0 ? _ref10 : 'minutes');
|
|
1464
1421
|
recordTimeSlots = {
|
|
1465
1422
|
start_time: start_at.format('HH:mm'),
|
|
1466
1423
|
end_time: end_at.format('HH:mm'),
|
|
@@ -1616,12 +1573,14 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1616
1573
|
weekNum: 0
|
|
1617
1574
|
}];
|
|
1618
1575
|
}
|
|
1576
|
+
var resourcesUseableMap = {};
|
|
1619
1577
|
var timeSlots = getTimeSlicesByResources({
|
|
1620
1578
|
resourceIds: resourceIds,
|
|
1621
1579
|
resourcesMap: resourcesMap,
|
|
1622
1580
|
duration: duration,
|
|
1623
1581
|
currentDate: dateRange[0].date,
|
|
1624
|
-
split: 10
|
|
1582
|
+
split: 10,
|
|
1583
|
+
resourcesUseableMap: resourcesUseableMap
|
|
1625
1584
|
});
|
|
1626
1585
|
return timeSlots;
|
|
1627
1586
|
}
|
|
@@ -1650,9 +1609,9 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1650
1609
|
accountItems.forEach(function (item, index) {
|
|
1651
1610
|
var newResources = cloneDeep(item._origin.resources);
|
|
1652
1611
|
newResources.forEach(function (resource) {
|
|
1653
|
-
var _item$_productOrigin$4, _item$_productOrigin11,
|
|
1612
|
+
var _item$_productOrigin$4, _item$_productOrigin11, _ref11, _item$_productOrigin12;
|
|
1654
1613
|
resource.startTime = currentStartTime;
|
|
1655
|
-
resource.endTime = dayjs(currentStartTime).add((_item$_productOrigin$4 = (_item$_productOrigin11 = item._productOrigin) === null || _item$_productOrigin11 === void 0 || (_item$_productOrigin11 = _item$_productOrigin11.duration) === null || _item$_productOrigin11 === void 0 ? void 0 : _item$_productOrigin11.value) !== null && _item$_productOrigin$4 !== void 0 ? _item$_productOrigin$4 : 0, (
|
|
1614
|
+
resource.endTime = dayjs(currentStartTime).add((_item$_productOrigin$4 = (_item$_productOrigin11 = item._productOrigin) === null || _item$_productOrigin11 === void 0 || (_item$_productOrigin11 = _item$_productOrigin11.duration) === null || _item$_productOrigin11 === void 0 ? void 0 : _item$_productOrigin11.value) !== null && _item$_productOrigin$4 !== void 0 ? _item$_productOrigin$4 : 0, (_ref11 = (_item$_productOrigin12 = item._productOrigin) === null || _item$_productOrigin12 === void 0 || (_item$_productOrigin12 = _item$_productOrigin12.duration) === null || _item$_productOrigin12 === void 0 ? void 0 : _item$_productOrigin12.type) !== null && _ref11 !== void 0 ? _ref11 : 'minutes').format('YYYY-MM-DD HH:mm');
|
|
1656
1615
|
delete resource.times;
|
|
1657
1616
|
});
|
|
1658
1617
|
_this9.store.cart.updateItem({
|
|
@@ -1734,11 +1693,11 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1734
1693
|
}
|
|
1735
1694
|
}, {
|
|
1736
1695
|
key: "getTimeslotBySchedule",
|
|
1737
|
-
value: function getTimeslotBySchedule(
|
|
1696
|
+
value: function getTimeslotBySchedule(_ref12) {
|
|
1738
1697
|
var _this$store$currentPr2;
|
|
1739
|
-
var date =
|
|
1740
|
-
scheduleIds =
|
|
1741
|
-
resources =
|
|
1698
|
+
var date = _ref12.date,
|
|
1699
|
+
scheduleIds = _ref12.scheduleIds,
|
|
1700
|
+
resources = _ref12.resources;
|
|
1742
1701
|
var targetProduct = this.store.currentProduct;
|
|
1743
1702
|
var targetProductData = targetProduct === null || targetProduct === void 0 ? void 0 : targetProduct.getData();
|
|
1744
1703
|
var targetSchedules = [];
|
|
@@ -1763,6 +1722,16 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1763
1722
|
var allProductResources = productResources.flatMap(function (n) {
|
|
1764
1723
|
return n.renderList;
|
|
1765
1724
|
});
|
|
1725
|
+
// 资源排下序,把单个资源靠前,组合资源排在后面
|
|
1726
|
+
allProductResources.sort(function (a, b) {
|
|
1727
|
+
var _a$metadata3, _b$metadata3;
|
|
1728
|
+
var aIsCombined = ((_a$metadata3 = a.metadata) === null || _a$metadata3 === void 0 || (_a$metadata3 = _a$metadata3.combined_resource) === null || _a$metadata3 === void 0 ? void 0 : _a$metadata3.status) === 1;
|
|
1729
|
+
var bIsCombined = ((_b$metadata3 = b.metadata) === null || _b$metadata3 === void 0 || (_b$metadata3 = _b$metadata3.combined_resource) === null || _b$metadata3 === void 0 ? void 0 : _b$metadata3.status) === 1;
|
|
1730
|
+
if (aIsCombined && !bIsCombined) return 1;
|
|
1731
|
+
if (!aIsCombined && bIsCombined) return -1;
|
|
1732
|
+
return 0;
|
|
1733
|
+
});
|
|
1734
|
+
var resourcesUseableMap = {};
|
|
1766
1735
|
// 计算每个日程切片下日程可用的资源的容量总和
|
|
1767
1736
|
var formatScheduleTimeSlots = scheduleTimeSlots.map(function (item) {
|
|
1768
1737
|
var count = 0;
|
|
@@ -1780,8 +1749,12 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1780
1749
|
},
|
|
1781
1750
|
time: childTiem,
|
|
1782
1751
|
resource: m,
|
|
1783
|
-
currentCount: 1
|
|
1752
|
+
currentCount: 1,
|
|
1753
|
+
resourcesUseableMap: resourcesUseableMap
|
|
1784
1754
|
});
|
|
1755
|
+
if ((resourcesUseableMap === null || resourcesUseableMap === void 0 ? void 0 : resourcesUseableMap[m.id]) !== false) {
|
|
1756
|
+
resourcesUseableMap[m.id] = res.usable;
|
|
1757
|
+
}
|
|
1785
1758
|
// 如果资源可用,且是独占资源,remainingCapacity 始终为 1
|
|
1786
1759
|
if (res.usable && res.remainingCapacity >= count) {
|
|
1787
1760
|
count = res.remainingCapacity;
|
|
@@ -1802,16 +1775,16 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1802
1775
|
}
|
|
1803
1776
|
}, {
|
|
1804
1777
|
key: "addProductToCart",
|
|
1805
|
-
value: function addProductToCart(
|
|
1778
|
+
value: function addProductToCart(_ref13) {
|
|
1806
1779
|
var _this10 = this;
|
|
1807
|
-
var product =
|
|
1808
|
-
date =
|
|
1809
|
-
account =
|
|
1810
|
-
var
|
|
1811
|
-
bundle =
|
|
1812
|
-
options =
|
|
1813
|
-
origin =
|
|
1814
|
-
product_variant_id =
|
|
1780
|
+
var product = _ref13.product,
|
|
1781
|
+
date = _ref13.date,
|
|
1782
|
+
account = _ref13.account;
|
|
1783
|
+
var _ref14 = product || {},
|
|
1784
|
+
bundle = _ref14.bundle,
|
|
1785
|
+
options = _ref14.options,
|
|
1786
|
+
origin = _ref14.origin,
|
|
1787
|
+
product_variant_id = _ref14.product_variant_id;
|
|
1815
1788
|
var productData = _objectSpread(_objectSpread({}, origin), {}, {
|
|
1816
1789
|
product_variant_id: product_variant_id
|
|
1817
1790
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/solution/BookingByStep/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,UAAU,EACV,OAAO,EACP,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV,aAAa,EACb,cAAc,EACf,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,aAAa,CAAC;IACvB,IAAI,EAAE,UAAU,CAAC;IAIjB,QAAQ,EAAE,WAAW,CAAC;IACtB,MAAM,EAAE,eAAe,CAAC;IACxB,IAAI,EAAE,UAAU,CAAC;IACjB,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAE/B,OAAO,EAAE,aAAa,CAAC;IACvB,WAAW,EAAE,iBAAiB,CAAC;IAE/B,KAAK,EAAE,WAAW,CAAC;IACnB,OAAO,EAAE,aAAa,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,cAAc,CAAC;CAO1B;AAED,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,kBAAkB,EAC7D,UAAU,EAAE,CAAC,EACb,YAAY,EAAE,MAAM,EACpB,IAAI,CAAC,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,MAAM,GACf,kBAAkB,CAAC,CAAC,CAAC,CAkDvB;AAED,oBAAY,kBAAkB;IAC5B,QAAQ,2BAA2B;IACnC,SAAS,4BAA4B;IACrC,gBAAgB,mCAAmC;IACnD,cAAc,iCAAiC;IAC/C,YAAY,+BAA+B;IAC3C,iBAAiB,oCAAoC;IACrD,eAAe,kCAAkC;CAClD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../../../src/solution/BookingByStep/utils/products.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEpE;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,aAAc,WAAW,EAAE;;;;CAmCnE,CAAC"}
|
|
@@ -27,11 +27,12 @@ interface BookingItem {
|
|
|
27
27
|
* @return {*}
|
|
28
28
|
* @Author: zhiwei.Wang
|
|
29
29
|
*/
|
|
30
|
-
export declare const getIsUsableByTimeItem: ({ timeSlice, time, resource, currentCount, }: {
|
|
30
|
+
export declare const getIsUsableByTimeItem: ({ timeSlice, time, resource, currentCount, resourcesUseableMap, }: {
|
|
31
31
|
timeSlice: TimeSliceItem;
|
|
32
32
|
time: any;
|
|
33
33
|
resource: ResourceItem;
|
|
34
34
|
currentCount: number;
|
|
35
|
+
resourcesUseableMap: Record<string, boolean>;
|
|
35
36
|
}) => {
|
|
36
37
|
afterToDay: boolean;
|
|
37
38
|
capacity: boolean;
|
|
@@ -67,12 +68,13 @@ export declare const formatResources: ({ booking, resources, }: {
|
|
|
67
68
|
* @return {*}
|
|
68
69
|
* @Author: zhiwei.Wang
|
|
69
70
|
*/
|
|
70
|
-
export declare const getTimeSlicesByResource: ({ resource, duration, split, currentDate, capacity, }: {
|
|
71
|
+
export declare const getTimeSlicesByResource: ({ resource, duration, split, currentDate, capacity, resourcesUseableMap, }: {
|
|
71
72
|
resource: ResourceItem;
|
|
72
73
|
duration: number;
|
|
73
74
|
split: number;
|
|
74
75
|
currentDate: DateType | string;
|
|
75
76
|
capacity?: number | undefined;
|
|
77
|
+
resourcesUseableMap?: Record<string, boolean> | undefined;
|
|
76
78
|
}) => TimeSliceItem[];
|
|
77
79
|
/**
|
|
78
80
|
* @title: 获取时间切片列表的交集
|
|
@@ -101,13 +103,14 @@ export declare const getResourcesByIds: (resourcesMap: Record<string, ResourceIt
|
|
|
101
103
|
* @return {*}
|
|
102
104
|
* @Author: zhiwei.Wang
|
|
103
105
|
*/
|
|
104
|
-
export declare const getTimeSlicesByResources: ({ resourceIds, resourcesMap, duration, currentDate, split, capacity, }: {
|
|
106
|
+
export declare const getTimeSlicesByResources: ({ resourceIds, resourcesMap, duration, currentDate, split, capacity, resourcesUseableMap, }: {
|
|
105
107
|
resourceIds: number[];
|
|
106
108
|
resourcesMap: any;
|
|
107
109
|
duration: number;
|
|
108
110
|
currentDate: DateType | string;
|
|
109
111
|
split: number;
|
|
110
112
|
capacity?: number | undefined;
|
|
113
|
+
resourcesUseableMap: Record<string, boolean>;
|
|
111
114
|
}) => any[];
|
|
112
115
|
/**
|
|
113
116
|
* @title: 获取其他人的已选资源
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../../src/solution/BookingByStep/utils/resources.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C;;;;;GAKG;AAEH,KAAK,QAAQ,GAAG,KAAK,CAAC;AAQtB,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,QAAQ,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,UAAU,WAAW;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AA6JD;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB;eAOrB,aAAa;UAClB,GAAG;cACC,YAAY;kBACR,MAAM;yBACC,OAAO,MAAM,EAAE,OAAO,CAAC;;;;;;CA4C7C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,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,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,aAAc,YAAY,SAkB/D,CAAC"}
|
|
@@ -167,11 +167,14 @@ var checkCapacity = function checkCapacity(_ref) {
|
|
|
167
167
|
* @Author: zhiwei.Wang
|
|
168
168
|
*/
|
|
169
169
|
export var getIsUsableByTimeItem = function getIsUsableByTimeItem(_ref2) {
|
|
170
|
+
var _resource$combined_re;
|
|
170
171
|
var timeSlice = _ref2.timeSlice,
|
|
171
172
|
time = _ref2.time,
|
|
172
173
|
resource = _ref2.resource,
|
|
173
174
|
_ref2$currentCount = _ref2.currentCount,
|
|
174
|
-
currentCount = _ref2$currentCount === void 0 ? 1 : _ref2$currentCount
|
|
175
|
+
currentCount = _ref2$currentCount === void 0 ? 1 : _ref2$currentCount,
|
|
176
|
+
_ref2$resourcesUseabl = _ref2.resourcesUseableMap,
|
|
177
|
+
resourcesUseableMap = _ref2$resourcesUseabl === void 0 ? {} : _ref2$resourcesUseabl;
|
|
175
178
|
var status = {
|
|
176
179
|
afterToDay: false,
|
|
177
180
|
capacity: false,
|
|
@@ -180,7 +183,6 @@ export var getIsUsableByTimeItem = function getIsUsableByTimeItem(_ref2) {
|
|
|
180
183
|
};
|
|
181
184
|
// 最早可预约时间为 当前日期之后并且提前量之后
|
|
182
185
|
var earliest = dayjs();
|
|
183
|
-
|
|
184
186
|
// 不可预约提前量时间之前的
|
|
185
187
|
if (!checkAfterToDay(timeSlice.start_at, earliest)) {
|
|
186
188
|
return status;
|
|
@@ -192,6 +194,16 @@ export var getIsUsableByTimeItem = function getIsUsableByTimeItem(_ref2) {
|
|
|
192
194
|
resource: resource,
|
|
193
195
|
currentCount: currentCount
|
|
194
196
|
});
|
|
197
|
+
if ((_resource$combined_re = resource.combined_resource) !== null && _resource$combined_re !== void 0 && _resource$combined_re.status) {
|
|
198
|
+
// 组合资源中子资源是否可用
|
|
199
|
+
var resourceIds = resource.combined_resource.resource_ids;
|
|
200
|
+
resourceIds.forEach(function (id) {
|
|
201
|
+
// 只要有一个子资源不可用,整个组合资源都不可用
|
|
202
|
+
if ((resourcesUseableMap === null || resourcesUseableMap === void 0 ? void 0 : resourcesUseableMap[id]) === false) {
|
|
203
|
+
checkCapacityResult.status = false;
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
}
|
|
195
207
|
if (!checkCapacityResult.status) {
|
|
196
208
|
return status;
|
|
197
209
|
}
|
|
@@ -341,7 +353,9 @@ export var getTimeSlicesByResource = function getTimeSlicesByResource(_ref4) {
|
|
|
341
353
|
split = _ref4$split === void 0 ? 10 : _ref4$split,
|
|
342
354
|
_ref4$currentDate = _ref4.currentDate,
|
|
343
355
|
currentDate = _ref4$currentDate === void 0 ? dayjs() : _ref4$currentDate,
|
|
344
|
-
capacity = _ref4.capacity
|
|
356
|
+
capacity = _ref4.capacity,
|
|
357
|
+
_ref4$resourcesUseabl = _ref4.resourcesUseableMap,
|
|
358
|
+
resourcesUseableMap = _ref4$resourcesUseabl === void 0 ? {} : _ref4$resourcesUseabl;
|
|
345
359
|
var times = resource.times;
|
|
346
360
|
|
|
347
361
|
// 存储所有时间切片
|
|
@@ -378,8 +392,12 @@ export var getTimeSlicesByResource = function getTimeSlicesByResource(_ref4) {
|
|
|
378
392
|
timeSlice: timeSlice,
|
|
379
393
|
time: time,
|
|
380
394
|
resource: resource,
|
|
381
|
-
currentCount: capacity || 1
|
|
395
|
+
currentCount: capacity || 1,
|
|
396
|
+
resourcesUseableMap: resourcesUseableMap
|
|
382
397
|
});
|
|
398
|
+
if ((resourcesUseableMap === null || resourcesUseableMap === void 0 ? void 0 : resourcesUseableMap[resource.id]) !== false) {
|
|
399
|
+
resourcesUseableMap[resource.id] = _status.usable;
|
|
400
|
+
}
|
|
383
401
|
if (_status.usable) {
|
|
384
402
|
// 添加时间切片 09:00 ~ 10:00 09:20 ~ 10:20 09:00 ~ 10:00 09:20 ~ 10:20 11:00 ~ 12:00 11:20 ~ 12:20
|
|
385
403
|
timeSlices.push(_objectSpread(_objectSpread({}, timeSlice), {}, {
|
|
@@ -453,9 +471,19 @@ export var getTimeSlicesByResources = function getTimeSlicesByResources(_ref5) {
|
|
|
453
471
|
duration = _ref5.duration,
|
|
454
472
|
currentDate = _ref5.currentDate,
|
|
455
473
|
split = _ref5.split,
|
|
456
|
-
capacity = _ref5.capacity
|
|
474
|
+
capacity = _ref5.capacity,
|
|
475
|
+
resourcesUseableMap = _ref5.resourcesUseableMap;
|
|
457
476
|
// 获取资源列表
|
|
458
477
|
var resources = getResourcesByIds(resourcesMap, resourceIds);
|
|
478
|
+
// 资源排下序,把单个资源靠前,组合资源排在后面
|
|
479
|
+
resources.sort(function (a, b) {
|
|
480
|
+
var _a$metadata, _b$metadata;
|
|
481
|
+
var aIsCombined = ((_a$metadata = a.metadata) === null || _a$metadata === void 0 || (_a$metadata = _a$metadata.combined_resource) === null || _a$metadata === void 0 ? void 0 : _a$metadata.status) === 1;
|
|
482
|
+
var bIsCombined = ((_b$metadata = b.metadata) === null || _b$metadata === void 0 || (_b$metadata = _b$metadata.combined_resource) === null || _b$metadata === void 0 ? void 0 : _b$metadata.status) === 1;
|
|
483
|
+
if (aIsCombined && !bIsCombined) return 1;
|
|
484
|
+
if (!aIsCombined && bIsCombined) return -1;
|
|
485
|
+
return 0;
|
|
486
|
+
});
|
|
459
487
|
|
|
460
488
|
// 获取资源列表中所有的时间切片
|
|
461
489
|
var timeSliceList = resources.reduce(function (acc, item) {
|
|
@@ -464,7 +492,8 @@ export var getTimeSlicesByResources = function getTimeSlicesByResources(_ref5) {
|
|
|
464
492
|
duration: duration,
|
|
465
493
|
split: split,
|
|
466
494
|
currentDate: currentDate,
|
|
467
|
-
capacity: capacity
|
|
495
|
+
capacity: capacity,
|
|
496
|
+
resourcesUseableMap: resourcesUseableMap
|
|
468
497
|
}));
|
|
469
498
|
}, []);
|
|
470
499
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/solution/B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AW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;GAEG;AACH,oBAAY,eAAe;IACzB,QAAQ,wBAAwB;IAChC,SAAS,yBAAyB;IAClC,oBAAoB,oCAAoC;IACxD,qBAAqB,qCAAqC;IAC1D,aAAa,6BAA6B;IAC1C,YAAY,4BAA4B;IACxC,YAAY,4BAA4B;IACxC,YAAY,2BAA2B;IACvC,gBAAgB,gCAAgC;CACjD;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,YAAY,EAAE,WAAW,CAAC;IAC1B,aAAa,EAAE,WAAW,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/solution/PlaceOrder/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/solution/ShopDiscount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAiB,UAAU,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAwC,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGzE,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGxD,qBAAa,gBAAiB,SAAQ,UAAW,YAAW,MAAM;IAChE,SAAS,CAAC,WAAW,SAAkB;IACvC,SAAS,CAAC,cAAc,SAAW;IAEnC,UAAU,UAAQ;IAElB,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,KAAK,CAAoB;IACjC,OAAO,CAAC,OAAO,CAAqB;gBAExB,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM;IAarC,UAAU,CAAC,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AO,CAAC,eAAe;IA0CvB,OAAO,CAAC,eAAe;YAKT,iBAAiB;YAgBjB,iBAAiB;CAyChC;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/solution/ShopDiscount/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,oBAAY,iBAAiB;IAC3B,QAAQ,0BAA0B;IAClC,SAAS,2BAA2B;IACpC,kBAAkB,oCAAoC;IACtD,gBAAgB,kCAAkC;IAClD,oBAAoB,sCAAsC;IAC1D,iBAAiB,mCAAmC;IACpD,uBAAuB,yCAAyC;CACjE;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,IAAI,GAAG,QAAQ,CAAC;IAC1B,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAChC,KAAK,EAAE,WAAW,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/solution/ShopDiscount/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,sBAAsB,MAAM,QAGlD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/solution/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createStore.d.ts","sourceRoot":"","sources":["../../src/store/createStore.ts"],"names":[],"mappings":"AAQA,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAC1C,YAAY,EAAE,CAAC,EACf,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,GAC5C;IAAE,KAAK,EAAE,CAAC,CAAA;CAAE,CAiCd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACtC;AAGD,MAAM,WAAW,aAAa;IAC5B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAGD,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,CACV,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,aAAa,KACnB,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAErC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;C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eAAe,CAAC;CAC3B"}
|
|
@@ -146,17 +146,6 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
146
146
|
resources: any[];
|
|
147
147
|
currentResourceId: number;
|
|
148
148
|
}): TimeSliceItem[];
|
|
149
|
-
autoSelectResource({ resourceProductData, resources, timeSlots, }: {
|
|
150
|
-
resourceProductData: any;
|
|
151
|
-
resources: any[];
|
|
152
|
-
timeSlots?: TimeSliceItem;
|
|
153
|
-
}): {
|
|
154
|
-
selectedResource: any;
|
|
155
|
-
timeSlots?: undefined;
|
|
156
|
-
} | {
|
|
157
|
-
timeSlots: any[];
|
|
158
|
-
selectedResource: any;
|
|
159
|
-
} | undefined;
|
|
160
149
|
autoSelectAccountResources({ holder_id, resources_code, timeSlots, countMap, capacity, }: {
|
|
161
150
|
holder_id: string;
|
|
162
151
|
resources_code: string | number;
|