@pisell/pisellos 0.0.387 → 0.0.389

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.
@@ -38,7 +38,7 @@ export var CashPaymentImpl = /*#__PURE__*/function () {
38
38
  paymentItem = {
39
39
  amount: amount.toString(),
40
40
  code: cashMethod.code,
41
- id: cashMethod.id,
41
+ custom_payment_id: cashMethod.id,
42
42
  name: cashMethod.name,
43
43
  type: cashMethod.type,
44
44
  voucher_id: ''
@@ -38,7 +38,7 @@ export var EftposPaymentImpl = /*#__PURE__*/function () {
38
38
  paymentItem = {
39
39
  amount: amount.toString(),
40
40
  code: eftposMethod.code,
41
- id: eftposMethod.id,
41
+ custom_payment_id: eftposMethod.id,
42
42
  name: eftposMethod.name,
43
43
  type: eftposMethod.type,
44
44
  voucher_id: ''
@@ -1170,7 +1170,7 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
1170
1170
  currentTime = formatDateTime(new Date());
1171
1171
  newPaymentItem = {
1172
1172
  uuid: paymentUuid,
1173
- id: paymentItem.id || 0,
1173
+ custom_payment_id: paymentItem.custom_payment_id || 0,
1174
1174
  name: paymentItem.name,
1175
1175
  code: paymentItem.code,
1176
1176
  type: paymentItem.type,
@@ -1697,7 +1697,7 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
1697
1697
  uuid: payment.uuid,
1698
1698
  amount: payment.amount,
1699
1699
  code: payment.code,
1700
- id: payment.id,
1700
+ custom_payment_id: payment.custom_payment_id,
1701
1701
  name: payment.name,
1702
1702
  type: payment.type,
1703
1703
  voucher_id: payment.voucher_id,
@@ -96,7 +96,7 @@ export interface PaymentItem {
96
96
  /** 支付类型,跟支付列表上对应的支付方式保持一致 */
97
97
  code: string;
98
98
  /** 支付类型id,跟支付列表上对应的支付方式保持一致 */
99
- id: number;
99
+ custom_payment_id: number;
100
100
  /** 支付类型名称,跟支付列表上对应的支付方式保持一致 */
101
101
  name: string;
102
102
  /** 支付类型type,跟支付列表上对应的支付方式保持一致 */
@@ -225,7 +225,7 @@ export interface PaymentItemInput {
225
225
  /** 支付类型,跟支付列表上对应的支付方式保持一致 */
226
226
  code: string;
227
227
  /** 支付类型id,跟支付列表上对应的支付方式保持一致 */
228
- id: number;
228
+ custom_payment_id: number;
229
229
  /** 支付类型名称,跟支付列表上对应的支付方式保持一致 */
230
230
  name: string;
231
231
  /** 支付类型type,跟支付列表上对应的支付方式保持一致 */
@@ -644,7 +644,7 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
644
644
  paymentItem = {
645
645
  amount: amount.toString(),
646
646
  code: walletMethod.code,
647
- id: walletMethod.id,
647
+ custom_payment_id: walletMethod.id,
648
648
  name: walletMethod.name,
649
649
  type: walletMethod.type,
650
650
  voucher_id: voucherId || ''
@@ -16,7 +16,7 @@ export declare class RulesModule extends BaseModule implements Module, RulesModu
16
16
  getRulesList(): Rules[];
17
17
  getWalletPassEvaluator(): import("../..").WalletPassEvaluator | undefined;
18
18
  private checkHolderMatch;
19
- isDiscountListAvailable({ oldDiscountList, newDiscountList, productList, orderTotalAmount, holders, }: {
19
+ isDiscountListAvailable({ oldDiscountList, newDiscountList, productList, orderTotalAmount, holders, isFormSubject, }: {
20
20
  oldDiscountList: Discount[];
21
21
  newDiscountList: Discount[];
22
22
  productList: any[];
@@ -24,18 +24,20 @@ export declare class RulesModule extends BaseModule implements Module, RulesModu
24
24
  holders: {
25
25
  form_record_id: number;
26
26
  }[];
27
+ isFormSubject: boolean;
27
28
  }): {
28
29
  isAvailable: boolean;
29
30
  discountList: Discount[];
30
31
  productList: any[];
31
32
  };
32
- calcDiscount({ discountList, productList, orderTotalAmount, holders, }: {
33
+ calcDiscount({ discountList, productList, orderTotalAmount, holders, isFormSubject, }: {
33
34
  discountList: Discount[];
34
35
  productList: any[];
35
36
  orderTotalAmount: number;
36
37
  holders: {
37
38
  form_record_id: number;
38
39
  }[];
40
+ isFormSubject: boolean;
39
41
  }, options?: {
40
42
  isSelected?: boolean;
41
43
  discountId?: number;
@@ -130,7 +130,8 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
130
130
  newDiscountList = _ref.newDiscountList,
131
131
  productList = _ref.productList,
132
132
  orderTotalAmount = _ref.orderTotalAmount,
133
- holders = _ref.holders;
133
+ holders = _ref.holders,
134
+ isFormSubject = _ref.isFormSubject;
134
135
  // 首先检查是否有新的优惠券可应用
135
136
  if (!newDiscountList || newDiscountList.length === 0) {
136
137
  return {
@@ -162,7 +163,8 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
162
163
  discountList: mergedDiscountList,
163
164
  productList: _toConsumableArray(productList),
164
165
  orderTotalAmount: orderTotalAmount,
165
- holders: holders
166
+ holders: holders,
167
+ isFormSubject: isFormSubject
166
168
  }, {
167
169
  scan: true
168
170
  });
@@ -201,7 +203,8 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
201
203
  var discountList = _ref2.discountList,
202
204
  productList = _ref2.productList,
203
205
  orderTotalAmount = _ref2.orderTotalAmount,
204
- holders = _ref2.holders;
206
+ holders = _ref2.holders,
207
+ isFormSubject = _ref2.isFormSubject;
205
208
  // 识别出来是不是在编辑的界面里又新增了商品
206
209
  // 这种情况下,如果有可用的优惠券,也会自动勾选上
207
210
  var isEditModeAddNewProduct = productList.find(function (n) {
@@ -498,7 +501,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
498
501
  // 拿到discount配置的holder信息 product信息 product.holder 加在 isLimitedProduct
499
502
  var _tempVar = (flatItem === null || flatItem === void 0 ? void 0 : flatItem.type) === 'bundle' ? flatItem === null || flatItem === void 0 ? void 0 : flatItem.parentProduct : flatItem === null || flatItem === void 0 ? void 0 : flatItem.product;
500
503
  var isHolderMatch = _this3.checkHolderMatch(discount, {
501
- isNeedHolder: _tempVar === null || _tempVar === void 0 ? void 0 : _tempVar.isNeedHolder,
504
+ isNeedHolder: isFormSubject && !(_tempVar !== null && _tempVar !== void 0 && _tempVar.isNormalProduct),
502
505
  holder_id: (_tempVar === null || _tempVar === void 0 ? void 0 : _tempVar.holder_id) || product.holder_id
503
506
  }, holders);
504
507
  var timeLimit = true;
@@ -645,7 +648,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
645
648
  // 拿到discount配置的holder信息 product信息 product.holder 不可用return false
646
649
  var _tempVar = (flatItem === null || flatItem === void 0 ? void 0 : flatItem.type) === 'bundle' ? flatItem === null || flatItem === void 0 ? void 0 : flatItem.parentProduct : flatItem === null || flatItem === void 0 ? void 0 : flatItem.product;
647
650
  var isHolderMatch = _this3.checkHolderMatch(discount, {
648
- isNeedHolder: _tempVar === null || _tempVar === void 0 ? void 0 : _tempVar.isNeedHolder,
651
+ isNeedHolder: isFormSubject && !(_tempVar !== null && _tempVar !== void 0 && _tempVar.isNormalProduct),
649
652
  holder_id: (_tempVar === null || _tempVar === void 0 ? void 0 : _tempVar.holder_id) || product.holder_id
650
653
  }, holders);
651
654
  // 如果 holder 不匹配,则不适用
@@ -26,6 +26,7 @@ export interface RulesModuleAPI {
26
26
  holders: {
27
27
  form_record_id: number;
28
28
  }[];
29
+ isFormSubject: boolean;
29
30
  }) => DiscountResult;
30
31
  }
31
32
  type ProductDetail = {
@@ -308,7 +308,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
308
308
  date: string;
309
309
  status: string;
310
310
  week: string;
311
- weekNum: 0 | 2 | 1 | 3 | 4 | 5 | 6;
311
+ weekNum: 0 | 1 | 2 | 3 | 4 | 5 | 6;
312
312
  }[]>;
313
313
  submitTimeSlot(timeSlots: TimeSliceItem): void;
314
314
  private getScheduleDataByIds;
@@ -25,6 +25,10 @@ export declare class ShopDiscountImpl extends BaseModule implements Module {
25
25
  setHolders(holders: {
26
26
  form_record_id: number;
27
27
  }[]): void;
28
+ setBookingSubject(bookingSubject: {
29
+ type?: 'form' | 'customer';
30
+ [key: string]: any;
31
+ }): void;
28
32
  calcDiscount(productList: Record<string, any>[], options?: SetDiscountSelectedParams): {
29
33
  productList: Record<string, any>[];
30
34
  discountList: Discount[];
@@ -55,7 +55,8 @@ export var ShopDiscountImpl = /*#__PURE__*/function (_BaseModule) {
55
55
  currentBookingTime: "",
56
56
  filteredDiscountList: [],
57
57
  orderTotalAmount: 0,
58
- holders: []
58
+ holders: [],
59
+ bookingSubject: undefined
59
60
  };
60
61
  return _this;
61
62
  }
@@ -300,11 +301,17 @@ export var ShopDiscountImpl = /*#__PURE__*/function (_BaseModule) {
300
301
  value: function setHolders(holders) {
301
302
  this.store.holders = holders;
302
303
  }
304
+ }, {
305
+ key: "setBookingSubject",
306
+ value: function setBookingSubject(bookingSubject) {
307
+ this.store.bookingSubject = bookingSubject;
308
+ }
303
309
 
304
310
  // 计算优惠券
305
311
  }, {
306
312
  key: "calcDiscount",
307
313
  value: function calcDiscount(productList, options) {
314
+ var _this$store$bookingSu;
308
315
  this.store.productList = productList;
309
316
  var rulesModule = this.core.getModule("".concat(this.name, "_rules"));
310
317
  if (!rulesModule) {
@@ -317,7 +324,8 @@ export var ShopDiscountImpl = /*#__PURE__*/function (_BaseModule) {
317
324
  productList: productList,
318
325
  discountList: this.getDiscountList(),
319
326
  orderTotalAmount: this.store.orderTotalAmount || 0,
320
- holders: this.store.holders || []
327
+ holders: this.store.holders || [],
328
+ isFormSubject: ((_this$store$bookingSu = this.store.bookingSubject) === null || _this$store$bookingSu === void 0 ? void 0 : _this$store$bookingSu.type) === 'form'
321
329
  }, options) || {
322
330
  productList: productList,
323
331
  discountList: this.getDiscountList()
@@ -390,7 +398,7 @@ export var ShopDiscountImpl = /*#__PURE__*/function (_BaseModule) {
390
398
  key: "scanCode",
391
399
  value: function () {
392
400
  var _scanCode = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(code, customerId) {
393
- var _this$store$discount3, resultDiscountList, rulesModule, withScanList, currentSelectedDiscountList, _ref2, newProductList, newDiscountList, isAvailable, _this$options$otherPa6;
401
+ var _this$store$discount3, _this$store$bookingSu2, resultDiscountList, rulesModule, withScanList, currentSelectedDiscountList, _ref2, newProductList, newDiscountList, isAvailable, _this$options$otherPa6;
394
402
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
395
403
  while (1) switch (_context5.prev = _context5.next) {
396
404
  case 0:
@@ -457,7 +465,8 @@ export var ShopDiscountImpl = /*#__PURE__*/function (_BaseModule) {
457
465
  oldDiscountList: this.getDiscountList(),
458
466
  newDiscountList: withScanList,
459
467
  orderTotalAmount: this.store.orderTotalAmount || 0,
460
- holders: this.store.holders || []
468
+ holders: this.store.holders || [],
469
+ isFormSubject: ((_this$store$bookingSu2 = this.store.bookingSubject) === null || _this$store$bookingSu2 === void 0 ? void 0 : _this$store$bookingSu2.type) === 'form'
461
470
  }) || {
462
471
  isAvailable: false,
463
472
  productList: this.store.productList || [],
@@ -32,6 +32,10 @@ export interface ShopDiscountState {
32
32
  form_id?: number;
33
33
  main_field?: string;
34
34
  }[];
35
+ bookingSubject?: {
36
+ type?: 'form' | 'customer';
37
+ [key: string]: any;
38
+ };
35
39
  }
36
40
  export interface SetDiscountSelectedParams {
37
41
  discountId: number;
@@ -35,7 +35,7 @@ var CashPaymentImpl = class {
35
35
  const paymentItem = {
36
36
  amount: amount.toString(),
37
37
  code: cashMethod.code,
38
- id: cashMethod.id,
38
+ custom_payment_id: cashMethod.id,
39
39
  name: cashMethod.name,
40
40
  type: cashMethod.type,
41
41
  voucher_id: ""
@@ -34,7 +34,7 @@ var EftposPaymentImpl = class {
34
34
  const paymentItem = {
35
35
  amount: amount.toString(),
36
36
  code: eftposMethod.code,
37
- id: eftposMethod.id,
37
+ custom_payment_id: eftposMethod.id,
38
38
  name: eftposMethod.name,
39
39
  type: eftposMethod.type,
40
40
  voucher_id: ""
@@ -591,7 +591,7 @@ var PaymentModule = class extends import_BaseModule.BaseModule {
591
591
  const currentTime = formatDateTime(/* @__PURE__ */ new Date());
592
592
  const newPaymentItem = {
593
593
  uuid: paymentUuid,
594
- id: paymentItem.id || 0,
594
+ custom_payment_id: paymentItem.custom_payment_id || 0,
595
595
  name: paymentItem.name,
596
596
  code: paymentItem.code,
597
597
  type: paymentItem.type,
@@ -858,7 +858,7 @@ var PaymentModule = class extends import_BaseModule.BaseModule {
858
858
  uuid: payment.uuid,
859
859
  amount: payment.amount,
860
860
  code: payment.code,
861
- id: payment.id,
861
+ custom_payment_id: payment.custom_payment_id,
862
862
  name: payment.name,
863
863
  type: payment.type,
864
864
  voucher_id: payment.voucher_id,
@@ -96,7 +96,7 @@ export interface PaymentItem {
96
96
  /** 支付类型,跟支付列表上对应的支付方式保持一致 */
97
97
  code: string;
98
98
  /** 支付类型id,跟支付列表上对应的支付方式保持一致 */
99
- id: number;
99
+ custom_payment_id: number;
100
100
  /** 支付类型名称,跟支付列表上对应的支付方式保持一致 */
101
101
  name: string;
102
102
  /** 支付类型type,跟支付列表上对应的支付方式保持一致 */
@@ -225,7 +225,7 @@ export interface PaymentItemInput {
225
225
  /** 支付类型,跟支付列表上对应的支付方式保持一致 */
226
226
  code: string;
227
227
  /** 支付类型id,跟支付列表上对应的支付方式保持一致 */
228
- id: number;
228
+ custom_payment_id: number;
229
229
  /** 支付类型名称,跟支付列表上对应的支付方式保持一致 */
230
230
  name: string;
231
231
  /** 支付类型type,跟支付列表上对应的支付方式保持一致 */
@@ -455,7 +455,7 @@ var WalletPassPaymentImpl = class {
455
455
  const paymentItem = {
456
456
  amount: amount.toString(),
457
457
  code: walletMethod.code,
458
- id: walletMethod.id,
458
+ custom_payment_id: walletMethod.id,
459
459
  name: walletMethod.name,
460
460
  type: walletMethod.type,
461
461
  voucher_id: voucherId || ""
@@ -16,7 +16,7 @@ export declare class RulesModule extends BaseModule implements Module, RulesModu
16
16
  getRulesList(): Rules[];
17
17
  getWalletPassEvaluator(): import("../..").WalletPassEvaluator | undefined;
18
18
  private checkHolderMatch;
19
- isDiscountListAvailable({ oldDiscountList, newDiscountList, productList, orderTotalAmount, holders, }: {
19
+ isDiscountListAvailable({ oldDiscountList, newDiscountList, productList, orderTotalAmount, holders, isFormSubject, }: {
20
20
  oldDiscountList: Discount[];
21
21
  newDiscountList: Discount[];
22
22
  productList: any[];
@@ -24,18 +24,20 @@ export declare class RulesModule extends BaseModule implements Module, RulesModu
24
24
  holders: {
25
25
  form_record_id: number;
26
26
  }[];
27
+ isFormSubject: boolean;
27
28
  }): {
28
29
  isAvailable: boolean;
29
30
  discountList: Discount[];
30
31
  productList: any[];
31
32
  };
32
- calcDiscount({ discountList, productList, orderTotalAmount, holders, }: {
33
+ calcDiscount({ discountList, productList, orderTotalAmount, holders, isFormSubject, }: {
33
34
  discountList: Discount[];
34
35
  productList: any[];
35
36
  orderTotalAmount: number;
36
37
  holders: {
37
38
  form_record_id: number;
38
39
  }[];
40
+ isFormSubject: boolean;
39
41
  }, options?: {
40
42
  isSelected?: boolean;
41
43
  discountId?: number;
@@ -81,7 +81,8 @@ var RulesModule = class extends import_BaseModule.BaseModule {
81
81
  newDiscountList,
82
82
  productList,
83
83
  orderTotalAmount,
84
- holders
84
+ holders,
85
+ isFormSubject
85
86
  }) {
86
87
  if (!newDiscountList || newDiscountList.length === 0) {
87
88
  return {
@@ -113,7 +114,8 @@ var RulesModule = class extends import_BaseModule.BaseModule {
113
114
  discountList: mergedDiscountList,
114
115
  productList: [...productList],
115
116
  orderTotalAmount,
116
- holders
117
+ holders,
118
+ isFormSubject
117
119
  },
118
120
  {
119
121
  scan: true
@@ -145,7 +147,8 @@ var RulesModule = class extends import_BaseModule.BaseModule {
145
147
  discountList,
146
148
  productList,
147
149
  orderTotalAmount,
148
- holders
150
+ holders,
151
+ isFormSubject
149
152
  }, options) {
150
153
  const isEditModeAddNewProduct = productList.find((n) => n.booking_id) && productList.find((n) => !n.booking_id);
151
154
  const editModeDiscount = [];
@@ -345,7 +348,7 @@ var RulesModule = class extends import_BaseModule.BaseModule {
345
348
  const isHolderMatch = this.checkHolderMatch(
346
349
  discount,
347
350
  {
348
- isNeedHolder: _tempVar == null ? void 0 : _tempVar.isNeedHolder,
351
+ isNeedHolder: isFormSubject && !(_tempVar == null ? void 0 : _tempVar.isNormalProduct),
349
352
  holder_id: (_tempVar == null ? void 0 : _tempVar.holder_id) || product.holder_id
350
353
  },
351
354
  holders
@@ -472,7 +475,7 @@ var RulesModule = class extends import_BaseModule.BaseModule {
472
475
  const isHolderMatch = this.checkHolderMatch(
473
476
  discount,
474
477
  {
475
- isNeedHolder: _tempVar == null ? void 0 : _tempVar.isNeedHolder,
478
+ isNeedHolder: isFormSubject && !(_tempVar == null ? void 0 : _tempVar.isNormalProduct),
476
479
  holder_id: (_tempVar == null ? void 0 : _tempVar.holder_id) || product.holder_id
477
480
  },
478
481
  holders
@@ -26,6 +26,7 @@ export interface RulesModuleAPI {
26
26
  holders: {
27
27
  form_record_id: number;
28
28
  }[];
29
+ isFormSubject: boolean;
29
30
  }) => DiscountResult;
30
31
  }
31
32
  type ProductDetail = {
@@ -308,7 +308,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
308
308
  date: string;
309
309
  status: string;
310
310
  week: string;
311
- weekNum: 0 | 2 | 1 | 3 | 4 | 5 | 6;
311
+ weekNum: 0 | 1 | 2 | 3 | 4 | 5 | 6;
312
312
  }[]>;
313
313
  submitTimeSlot(timeSlots: TimeSliceItem): void;
314
314
  private getScheduleDataByIds;
@@ -25,6 +25,10 @@ export declare class ShopDiscountImpl extends BaseModule implements Module {
25
25
  setHolders(holders: {
26
26
  form_record_id: number;
27
27
  }[]): void;
28
+ setBookingSubject(bookingSubject: {
29
+ type?: 'form' | 'customer';
30
+ [key: string]: any;
31
+ }): void;
28
32
  calcDiscount(productList: Record<string, any>[], options?: SetDiscountSelectedParams): {
29
33
  productList: Record<string, any>[];
30
34
  discountList: Discount[];
@@ -55,7 +55,8 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
55
55
  currentBookingTime: "",
56
56
  filteredDiscountList: [],
57
57
  orderTotalAmount: 0,
58
- holders: []
58
+ holders: [],
59
+ bookingSubject: void 0
59
60
  };
60
61
  }
61
62
  // =========== 生命周期方法 ===========
@@ -200,8 +201,12 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
200
201
  setHolders(holders) {
201
202
  this.store.holders = holders;
202
203
  }
204
+ setBookingSubject(bookingSubject) {
205
+ this.store.bookingSubject = bookingSubject;
206
+ }
203
207
  // 计算优惠券
204
208
  calcDiscount(productList, options) {
209
+ var _a;
205
210
  this.store.productList = productList;
206
211
  const rulesModule = this.core.getModule(`${this.name}_rules`);
207
212
  if (!rulesModule) {
@@ -212,7 +217,8 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
212
217
  productList,
213
218
  discountList: this.getDiscountList(),
214
219
  orderTotalAmount: this.store.orderTotalAmount || 0,
215
- holders: this.store.holders || []
220
+ holders: this.store.holders || [],
221
+ isFormSubject: ((_a = this.store.bookingSubject) == null ? void 0 : _a.type) === "form"
216
222
  },
217
223
  options
218
224
  ) || { productList, discountList: this.getDiscountList() };
@@ -259,7 +265,7 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
259
265
  }
260
266
  // 扫码输入code
261
267
  async scanCode(code, customerId) {
262
- var _a, _b;
268
+ var _a, _b, _c;
263
269
  try {
264
270
  const resultDiscountList = await ((_a = this.store.discount) == null ? void 0 : _a.batchSearch(code, customerId)) || [];
265
271
  const rulesModule = this.store.rules;
@@ -303,7 +309,8 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
303
309
  oldDiscountList: this.getDiscountList(),
304
310
  newDiscountList: withScanList,
305
311
  orderTotalAmount: this.store.orderTotalAmount || 0,
306
- holders: this.store.holders || []
312
+ holders: this.store.holders || [],
313
+ isFormSubject: ((_b = this.store.bookingSubject) == null ? void 0 : _b.type) === "form"
307
314
  }) || {
308
315
  isAvailable: false,
309
316
  productList: this.store.productList || [],
@@ -313,7 +320,7 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
313
320
  this.setDiscountList(newDiscountList || []);
314
321
  this.store.originalDiscountList = newDiscountList || [];
315
322
  this.setProductList(newProductList || []);
316
- if (this.isWalkIn() && resultDiscountList.length && ((_b = this.options.otherParams) == null ? void 0 : _b.platform) === "shop") {
323
+ if (this.isWalkIn() && resultDiscountList.length && ((_c = this.options.otherParams) == null ? void 0 : _c.platform) === "shop") {
317
324
  await this.getCustomerWallet(
318
325
  resultDiscountList[0].customer_id
319
326
  );
@@ -32,6 +32,10 @@ export interface ShopDiscountState {
32
32
  form_id?: number;
33
33
  main_field?: string;
34
34
  }[];
35
+ bookingSubject?: {
36
+ type?: 'form' | 'customer';
37
+ [key: string]: any;
38
+ };
35
39
  }
36
40
  export interface SetDiscountSelectedParams {
37
41
  discountId: number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "0.0.387",
4
+ "version": "0.0.389",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",