@pisell/private-materials 3.3.49 → 3.3.51
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/businessModel/SalesModel/index.d.ts +1 -0
- package/es/components/appointmentBooking/assets/resource.svg +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Content/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Header/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Resource/index.js +44 -5
- package/es/components/appointmentBooking/hooks.js +218 -177
- package/es/components/appointmentBooking/index.d.ts +1 -0
- package/es/components/appointmentBooking/locales.d.ts +3 -0
- package/es/components/appointmentBooking/locales.js +9 -0
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/addons/model.js +5 -5
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/productItem/index.js +14 -2
- package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
- package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/drawer/index.js +4 -2
- package/es/components/booking/components/footer/index.d.ts +1 -0
- package/es/components/booking/components/voucher/index.js +25 -17
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/info/client/index.js +2 -1
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/pet/index.js +3 -0
- package/es/components/booking/info/service/Lists.d.ts +1 -0
- package/es/components/booking/info/service/addService/index.d.ts +1 -0
- package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.js +27 -27
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/index.js +3 -3
- package/es/components/booking/info2/service/addService/utils.d.ts +3 -3
- package/es/components/booking/info2/service/addService/utils.js +48 -52
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info2/service/editService/index.js +1 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +23 -4
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/index.d.ts +1 -0
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -2
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.js +18 -6
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/index.d.ts +1 -0
- package/es/components/productExtension/server.js +2 -2
- package/es/components/productSelect/components/TabProduct/index.js +28 -10
- package/es/components/productSelect/components/TabProduct/tabs/index.d.ts +21 -0
- package/es/components/productSelect/components/TabProduct/tabs/index.js +243 -0
- package/es/components/productSelect/components/TabProduct/tabs/index.less +126 -0
- package/es/components/productSelect/components/pisellPriceText/index.d.ts +11 -0
- package/es/components/productSelect/components/pisellPriceText/index.js +43 -0
- package/es/components/productSelect/components/productGroup/index.js +20 -7
- package/es/components/productSelect/components/productGroup/index.less +14 -1
- package/es/components/productSelect/index.less +1 -2
- package/es/components/ruleSetting/index.d.ts +1 -0
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +16 -10
- package/es/components/ticketBooking/components/addServiceVariant/index.less +10 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +3 -1
- package/es/components/ticketBooking/index.js +2 -1
- package/es/components/ticketBooking/locales.d.ts +3 -0
- package/es/components/ticketBooking/locales.js +12 -3
- package/es/components/ticketBooking/utils/index.d.ts +5 -1
- package/es/components/ticketBooking/utils/index.js +35 -3
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/es/components/wallet/model.d.ts +9 -1
- package/es/hooks/useComponents.js +1 -1
- package/lib/businessModel/SalesModel/index.d.ts +1 -0
- package/lib/components/appointmentBooking/assets/resource.svg +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Content/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Header/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Resource/index.js +44 -5
- package/lib/components/appointmentBooking/hooks.js +12 -3
- package/lib/components/appointmentBooking/index.d.ts +1 -0
- package/lib/components/appointmentBooking/locales.d.ts +3 -0
- package/lib/components/appointmentBooking/locales.js +3 -0
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/productItem/index.js +8 -1
- package/lib/components/booking/components/drawer/index.js +2 -2
- package/lib/components/booking/components/footer/index.d.ts +1 -0
- package/lib/components/booking/components/voucher/index.js +31 -27
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/info/client/index.js +2 -1
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/pet/index.js +3 -0
- package/lib/components/booking/info/service/Lists.d.ts +1 -0
- package/lib/components/booking/info/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.js +2 -2
- package/lib/components/booking/info/utils.js +37 -1
- package/lib/components/booking/info2/index.js +7 -4
- package/lib/components/booking/info2/service/addService/utils.d.ts +3 -3
- package/lib/components/booking/info2/service/addService/utils.js +20 -13
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info2/service/editService/index.js +1 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +18 -8
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -2
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.js +8 -1
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/productExtension/index.d.ts +1 -0
- package/lib/components/productSelect/components/TabProduct/index.js +19 -6
- package/lib/components/productSelect/components/TabProduct/tabs/index.d.ts +21 -0
- package/lib/components/productSelect/components/TabProduct/tabs/index.js +202 -0
- package/lib/components/productSelect/components/TabProduct/tabs/index.less +126 -0
- package/lib/components/productSelect/components/pisellPriceText/index.d.ts +11 -0
- package/lib/components/productSelect/components/pisellPriceText/index.js +72 -0
- package/lib/components/productSelect/components/productGroup/index.js +24 -4
- package/lib/components/productSelect/components/productGroup/index.less +14 -1
- package/lib/components/productSelect/index.less +1 -2
- package/lib/components/ruleSetting/index.d.ts +1 -0
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +28 -15
- package/lib/components/ticketBooking/components/addServiceVariant/index.less +10 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +3 -1
- package/lib/components/ticketBooking/index.js +2 -1
- package/lib/components/ticketBooking/locales.d.ts +3 -0
- package/lib/components/ticketBooking/locales.js +6 -3
- package/lib/components/ticketBooking/utils/index.d.ts +5 -1
- package/lib/components/ticketBooking/utils/index.js +35 -3
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/lib/components/wallet/model.d.ts +9 -1
- package/package.json +2 -2
|
@@ -47,6 +47,7 @@ declare const _default: {
|
|
|
47
47
|
"pisell2.ticket-booking.add-to-cart": string;
|
|
48
48
|
"pisell2.ticket-booking.not-available-title": string;
|
|
49
49
|
"pisell2.ticket-booking.not-available-ok": string;
|
|
50
|
+
"pisell2.ticket-booking.in-cart": (number: number) => string;
|
|
50
51
|
};
|
|
51
52
|
"zh-CN": {
|
|
52
53
|
"pisell2.ticket-booking.info": string;
|
|
@@ -96,6 +97,7 @@ declare const _default: {
|
|
|
96
97
|
"pisell2.ticket-booking.add-to-cart": string;
|
|
97
98
|
"pisell2.ticket-booking.not-available-title": string;
|
|
98
99
|
"pisell2.ticket-booking.not-available-ok": string;
|
|
100
|
+
"pisell2.ticket-booking.in-cart": (number: number) => string;
|
|
99
101
|
};
|
|
100
102
|
"zh-HK": {
|
|
101
103
|
"pisell2.ticket-booking.info": string;
|
|
@@ -145,6 +147,7 @@ declare const _default: {
|
|
|
145
147
|
"pisell2.ticket-booking.add-to-cart": string;
|
|
146
148
|
"pisell2.ticket-booking.not-available-title": string;
|
|
147
149
|
"pisell2.ticket-booking.not-available-ok": string;
|
|
150
|
+
"pisell2.ticket-booking.in-cart": (number: number) => string;
|
|
148
151
|
};
|
|
149
152
|
};
|
|
150
153
|
export default _default;
|
|
@@ -46,7 +46,10 @@ export default {
|
|
|
46
46
|
"pisell2.ticket-booking.create-new": "Create new",
|
|
47
47
|
"pisell2.ticket-booking.add-to-cart": "Added to Cart",
|
|
48
48
|
"pisell2.ticket-booking.not-available-title": "Sorry, Not available at current time.",
|
|
49
|
-
"pisell2.ticket-booking.not-available-ok": "OK"
|
|
49
|
+
"pisell2.ticket-booking.not-available-ok": "OK",
|
|
50
|
+
"pisell2.ticket-booking.in-cart": function pisell2TicketBookingInCart(number) {
|
|
51
|
+
return "".concat(number, " in cart");
|
|
52
|
+
}
|
|
50
53
|
},
|
|
51
54
|
"zh-CN": {
|
|
52
55
|
"pisell2.ticket-booking.info": "信息",
|
|
@@ -95,7 +98,10 @@ export default {
|
|
|
95
98
|
"pisell2.ticket-booking.create-new": "新建",
|
|
96
99
|
"pisell2.ticket-booking.add-to-cart": "已加入购物车",
|
|
97
100
|
"pisell2.ticket-booking.not-available-title": "抱歉,目前不在可售时间。",
|
|
98
|
-
"pisell2.ticket-booking.not-available-ok": "好的"
|
|
101
|
+
"pisell2.ticket-booking.not-available-ok": "好的",
|
|
102
|
+
"pisell2.ticket-booking.in-cart": function pisell2TicketBookingInCart(number) {
|
|
103
|
+
return "\u5DF2\u6709".concat(number, "\u4EF6");
|
|
104
|
+
}
|
|
99
105
|
},
|
|
100
106
|
"zh-HK": {
|
|
101
107
|
"pisell2.ticket-booking.info": "資訊",
|
|
@@ -144,6 +150,9 @@ export default {
|
|
|
144
150
|
"pisell2.ticket-booking.create-new": "新建",
|
|
145
151
|
"pisell2.ticket-booking.add-to-cart": "已加入购物车",
|
|
146
152
|
"pisell2.ticket-booking.not-available-title": "抱歉,目前不在可售時間。",
|
|
147
|
-
"pisell2.ticket-booking.not-available-ok": "好的"
|
|
153
|
+
"pisell2.ticket-booking.not-available-ok": "好的",
|
|
154
|
+
"pisell2.ticket-booking.in-cart": function pisell2TicketBookingInCart(number) {
|
|
155
|
+
return "\u5DF2\u6709".concat(number, "\u4EF6");
|
|
156
|
+
}
|
|
148
157
|
}
|
|
149
158
|
};
|
|
@@ -12,4 +12,8 @@ export declare const restoreProductOtherData: (data: any) => {
|
|
|
12
12
|
product_variant_id: number;
|
|
13
13
|
quantity: number;
|
|
14
14
|
} | undefined;
|
|
15
|
-
export declare const addService: (list: any[], addItem: any) =>
|
|
15
|
+
export declare const addService: (list: any[], addItem: any) => {
|
|
16
|
+
list: any[];
|
|
17
|
+
quantity: any;
|
|
18
|
+
};
|
|
19
|
+
export declare const addServiceScroll: (rowKey: string, cacheItem: any) => void;
|
|
@@ -109,19 +109,26 @@ var isSameProduct = function isSameProduct(a, b) {
|
|
|
109
109
|
};
|
|
110
110
|
export var addService = function addService(list, addItem) {
|
|
111
111
|
var value = list;
|
|
112
|
+
var count;
|
|
112
113
|
// 预约商品直接添加
|
|
113
114
|
if (!isNormalProductByDurationSchedule(addItem)) {
|
|
114
115
|
value.push(addItem);
|
|
116
|
+
count = addItem._extend.quantity;
|
|
115
117
|
} else {
|
|
116
118
|
// 非预约商品判断是否相同,相同合并
|
|
117
119
|
var isNotSame = true;
|
|
118
120
|
value = list.map(function (item) {
|
|
119
121
|
if (isSameProduct(item, addItem)) {
|
|
120
|
-
var _item$_extend, _addItem$_extend;
|
|
122
|
+
var _item$_extend, _addItem$_extend, _item$_extend2;
|
|
121
123
|
isNotSame = false;
|
|
124
|
+
var quantity = ((item === null || item === void 0 || (_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : _item$_extend.quantity) || 1) + ((addItem === null || addItem === void 0 || (_addItem$_extend = addItem._extend) === null || _addItem$_extend === void 0 ? void 0 : _addItem$_extend.quantity) || 1);
|
|
125
|
+
count = quantity;
|
|
122
126
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
123
127
|
_extend: _objectSpread(_objectSpread({}, item._extend), {}, {
|
|
124
|
-
quantity:
|
|
128
|
+
quantity: quantity,
|
|
129
|
+
other: _objectSpread(_objectSpread({}, ((_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.other) || {}), {}, {
|
|
130
|
+
quantity: quantity
|
|
131
|
+
})
|
|
125
132
|
})
|
|
126
133
|
});
|
|
127
134
|
}
|
|
@@ -129,7 +136,32 @@ export var addService = function addService(list, addItem) {
|
|
|
129
136
|
});
|
|
130
137
|
if (isNotSame) {
|
|
131
138
|
value.push(addItem);
|
|
139
|
+
count = addItem._extend.quantity;
|
|
132
140
|
}
|
|
133
141
|
}
|
|
134
|
-
return
|
|
142
|
+
return {
|
|
143
|
+
list: value,
|
|
144
|
+
quantity: count
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
export var addServiceScroll = function addServiceScroll(rowKey, cacheItem) {
|
|
148
|
+
var list = document.querySelectorAll("#rowKey-".concat(rowKey));
|
|
149
|
+
setTimeout(function () {
|
|
150
|
+
if (list.length && isNormalProductByDurationSchedule(cacheItem)) {
|
|
151
|
+
list[list.length - 1].scrollIntoView({
|
|
152
|
+
behavior: 'smooth',
|
|
153
|
+
block: 'center'
|
|
154
|
+
});
|
|
155
|
+
} else {
|
|
156
|
+
setTimeout(function () {
|
|
157
|
+
var bookingWrap = document.querySelectorAll(".booking-info-warp");
|
|
158
|
+
if (bookingWrap.length) {
|
|
159
|
+
bookingWrap[0].scrollTo({
|
|
160
|
+
top: 99999,
|
|
161
|
+
behavior: 'smooth'
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}, 100);
|
|
165
|
+
}
|
|
166
|
+
});
|
|
135
167
|
};
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
addWalletCard: any;
|
|
4
|
+
}
|
|
5
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
+
walletDetailState: RechargeState;
|
|
7
|
+
} & {
|
|
8
|
+
dispatch: (params: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
total: number;
|
|
4
|
+
setup?: 'menu' | 'list' | 'detail' | string;
|
|
5
|
+
}
|
|
6
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
7
|
+
state: RechargeState;
|
|
8
|
+
} & {
|
|
9
|
+
dispatch: (params: {
|
|
10
|
+
type: string;
|
|
11
|
+
payload: any;
|
|
12
|
+
}) => void;
|
|
13
|
+
}>;
|
|
14
|
+
export {};
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
total: number;
|
|
4
|
+
}
|
|
5
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
+
state: RechargeState;
|
|
7
|
+
} & {
|
|
8
|
+
dispatch: (params: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -1 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
selectedGiftOptionId: string | null;
|
|
4
|
+
cardList: Array<{
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
price: number;
|
|
8
|
+
}>;
|
|
9
|
+
selectedItem: {
|
|
10
|
+
id?: string;
|
|
11
|
+
gift_price?: number;
|
|
12
|
+
price?: number;
|
|
13
|
+
name?: string;
|
|
14
|
+
variant_id?: string;
|
|
15
|
+
};
|
|
16
|
+
productId?: string;
|
|
17
|
+
detailId?: string;
|
|
18
|
+
total: string | number;
|
|
19
|
+
rechargeModalOpen: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
22
|
+
state: RechargeState;
|
|
23
|
+
} & {
|
|
24
|
+
dispatch: (params: {
|
|
25
|
+
type: string;
|
|
26
|
+
payload: any;
|
|
27
|
+
}) => void;
|
|
28
|
+
}>;
|
|
29
|
+
export {};
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
total: 0;
|
|
4
|
+
}
|
|
5
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
+
state: RechargeState;
|
|
7
|
+
} & {
|
|
8
|
+
dispatch: (params: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { IWalletListItemProps } from './serve';
|
|
2
3
|
export interface WalletCardItemProps {
|
|
3
4
|
id: string;
|
|
@@ -26,4 +27,11 @@ export interface WalletListProps {
|
|
|
26
27
|
currentSearchListItemCode?: string;
|
|
27
28
|
[key: string]: any;
|
|
28
29
|
}
|
|
29
|
-
export declare const Provider: any, Context:
|
|
30
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
31
|
+
global_wallet: WalletListProps;
|
|
32
|
+
} & {
|
|
33
|
+
dispatch: (params: {
|
|
34
|
+
type: string;
|
|
35
|
+
payload: any;
|
|
36
|
+
}) => void;
|
|
37
|
+
}>;
|
|
@@ -8,7 +8,7 @@ var useComponents = function useComponents(params) {
|
|
|
8
8
|
var _utils$getComponents;
|
|
9
9
|
var _ref = appHelper || {},
|
|
10
10
|
utils = _ref.utils;
|
|
11
|
-
return (utils === null || utils === void 0
|
|
11
|
+
return (utils === null || utils === void 0 ? void 0 : (_utils$getComponents = utils.getComponents) === null || _utils$getComponents === void 0 ? void 0 : _utils$getComponents.call(utils, components)) || [];
|
|
12
12
|
}, [components]);
|
|
13
13
|
return Cpt;
|
|
14
14
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1275.59 1275.59"><defs><style>.cls-1{fill:#a6a6a6;}</style></defs><g id="DxmwFQ.tif"><path class="cls-1" d="M636.87,977.58c-114.72,1.47-224.68-20.79-329.21-68-15.86-7.16-27.21-5.9-41.28,3.48C213.52,948.26,160,982.43,106.5,1016.73c-9.48,6.08-19.25,13.77-31.41,4.9-13-9.52-8.84-21.72-5.11-33.57,17.49-55.52,34-111.4,53.34-166.26,7.84-22.23,4.17-36.79-11.17-54.36C36.65,680.94,2.43,581,23.2,466.21c18-99.46,74-176.57,151-238.71C273.46,147.32,388.47,104,514.45,86.05c118.93-16.93,236.23-12.26,351.34,21.89,145.61,43.18,271,116.11,348.42,253.1,49,86.79,56.45,179,26.18,273.75-4.88,15.27-7.87,40.71-32.33,33.2-26.2-8-10.69-29.31-5.9-44.58,43.67-139.14-3.45-251.65-104.6-345.78C991.83,179.25,861.31,135,720.56,120c-146.14-15.54-287.38,5.21-419.35,72.83C199.54,244.92,115.73,315.67,75.28,426.91c-38.67,106.33-15.56,203,49.22,292.24,4.14,5.7,8,12.14,13.45,16.28,38,28.73,40.16,63.43,21.87,104.72C148.1,866.6,141.39,895.27,132.55,923c-2.35,7.39-7.94,16.28-1.15,22.29,7.8,6.92,14.27-2.48,20.45-6.38,37.3-23.55,74.68-47,111.42-71.41,15-10,28.85-10.45,44.66-2.72,148,72.35,303.66,87.56,464.76,62.18,2.62-.41,5.25-.7,7.86-1.16,14.24-2.49,28.51-1.69,31.3,15.32s-10.53,22.14-24.72,24.41c-41,6.55-82.07,12.48-123.76,12.07C654.53,977.5,645.7,977.58,636.87,977.58Z"/><path class="cls-1" d="M1033.47,1198.82c-10.6,0-21.19.18-31.78,0-39.56-.77-60.71-20.83-61.28-60.26-.27-19.06-1.81-36.46-15.66-51.38-4.39-4.72-7.17-13-7-19.55,1-39.88-20.87-70.15-41.08-101.14C821.4,881.7,821.09,797.61,876,725.15c62.22-82.07,179.6-102.34,265.78-45.9,89.35,58.51,116.38,169.16,63.78,262.88-12.06,21.5-25.44,42.29-38.6,63.17a108.78,108.78,0,0,0-16.33,49.79c-1.41,17.07-4.09,33.17-17.53,45.64-8.07,7.48-6.06,17.91-6.27,27.49-1.12,53.27-18.56,70.41-72.19,70.82-7.07,0-14.13,0-21.19,0Zm158.82-356.91c-3.34-65.92-35.67-113.78-95.24-140.62-60.42-27.23-118.46-17.53-167.61,26.49-47.76,42.77-66.7,96.58-47.38,160.23,7.78,25.6,22.78,47.57,37,69.91,18,28.32,36.23,56.7,37.17,92,.29,10.66,3.07,20.93,16,19.1,12.71-1.79,9.38-13,7.91-21.35q-9.6-54.74-19.93-109.33c-2-10.22-1.75-19.22,6.61-26.62,9.23-8.17,18.11-4.49,26.63,1,7.15,4.58,14.3,7.73,21.9,1.9,12.06-9.25,23.72-10.48,36-.34,6.3,5.21,12.84,3,19.81.11,29.47-12.11,39.23-5,34.33,26.56-5.53,35.71-13,71.11-19.52,106.68-1.56,8.62-4.23,19,7.81,21.78,11.43,2.62,16.2-6.24,16.73-15.66,2.4-42.66,25.38-76.24,47.2-110.54C1177.31,912.39,1194.61,880.63,1192.29,841.91Zm-159.57,316.58v-.28c12.32,0,24.71.84,36.94-.2,17-1.43,17.21-14.74,17.48-27.46.27-12.54-4.83-20.42-18.34-20.45q-34.33-.07-68.69.21c-13.61.13-21.4,6-20.94,20.9.43,13.63,4,25.14,19.26,27C1009.7,1159.59,1021.28,1158.49,1032.72,1158.49Zm1.72-202.58c-14,3-28.37,5.21-25.36,24,4,25.21,8.92,50.28,14,75.31,1.19,5.91,4.1,12.5,11.94,11.66,6.39-.68,7.5-7,8.54-12,4.85-23.27,8.23-46.91,14.29-69.85C1063.81,962.48,1048.2,960.53,1034.44,955.91Z"/><path class="cls-1" d="M639.31,407.39q-177.43-.06-354.85-.09c-8.8,0-17.7,0-26.37-1.3-9.74-1.42-16.3-7.62-16.29-17.81,0-9.93,5.86-16.66,15.75-18.41a122.26,122.26,0,0,1,21.06-1.36q356.16-.14,712.33-.08c8.81,0,17.7,0,26.42,1.09,10.46,1.33,19,6.48,19,18.27,0,13.21-9.32,18.08-21.07,18.91-8.79.63-17.63.79-26.45.79Q814.09,407.48,639.31,407.39Z"/><path class="cls-1" d="M639.72,508.17q178.74,0,357.48.06c8.77,0,17.76.22,26.24,2.13s13.39,8.66,13.14,17.6c-.21,7.72-4.61,13.91-12,15.69a113,113,0,0,1-26,3.06q-360.13.25-720.27.1a106,106,0,0,1-21-1.71c-9.79-2-15.52-8.75-15.41-18.73.12-10.32,6.62-16.18,16.63-17.19,8.75-.89,17.61-.95,26.43-1Q462.3,508.15,639.72,508.17Z"/><path class="cls-1" d="M448.43,687.14q-82,0-164,0c-7.05,0-14.1-.2-21.14-.51-12.23-.54-20.81-6.52-21-19.05-.27-14,8.57-20,22.32-20q183.78.17,367.57.13c13.67,0,26.26,4.07,25.34,20-1,16.95-15.35,19.67-29.28,19.71-59.93.18-119.87.08-179.81.08Z"/></g></svg>
|
|
@@ -40,6 +40,7 @@ var import_hooks = require("../../hooks");
|
|
|
40
40
|
var import_context = require("../../context");
|
|
41
41
|
var import_utils = require("../../utils");
|
|
42
42
|
var import_guests = __toESM(require("../../assets/guests.svg"));
|
|
43
|
+
var import_resource = __toESM(require("../../assets/resource.svg"));
|
|
43
44
|
var import_utils2 = require("@pisell/utils");
|
|
44
45
|
var import_index = require("./index.less");
|
|
45
46
|
var Resource = (0, import_react.forwardRef)((props, ref) => {
|
|
@@ -50,11 +51,14 @@ var Resource = (0, import_react.forwardRef)((props, ref) => {
|
|
|
50
51
|
resourceOtherParams,
|
|
51
52
|
currentStep,
|
|
52
53
|
setResourceOtherParams,
|
|
53
|
-
currentStepParams
|
|
54
|
+
currentStepParams,
|
|
55
|
+
currentSelectedResources
|
|
54
56
|
} = (0, import_context.useAppointmentBookingContext)();
|
|
55
57
|
const { getResourceList } = (0, import_hooks.useAppointmentBookingResource)();
|
|
56
58
|
const { checkSkipResourceStep } = (0, import_hooks.useIsSkipResourceStep)();
|
|
57
59
|
const { updateStep, nextStep } = (0, import_hooks.useAppointmentBookingStep)();
|
|
60
|
+
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
61
|
+
const utils = (0, import_hooks.contextUtils)();
|
|
58
62
|
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
59
63
|
next: async () => {
|
|
60
64
|
setResourceOtherParams({
|
|
@@ -68,6 +72,9 @@ var Resource = (0, import_react.forwardRef)((props, ref) => {
|
|
|
68
72
|
const { resources: resources2 } = getResourceList();
|
|
69
73
|
return resources2 || [];
|
|
70
74
|
}, []);
|
|
75
|
+
(0, import_react.useEffect)(() => {
|
|
76
|
+
setLoading(true);
|
|
77
|
+
}, []);
|
|
71
78
|
(0, import_react.useEffect)(() => {
|
|
72
79
|
const checkAndSkipResourceStep = async () => {
|
|
73
80
|
var _a;
|
|
@@ -104,7 +111,9 @@ var Resource = (0, import_react.forwardRef)((props, ref) => {
|
|
|
104
111
|
);
|
|
105
112
|
}, [currentStepParams.key, resources]);
|
|
106
113
|
const renderLists = (0, import_react.useMemo)(() => {
|
|
107
|
-
const appointmentCarts = carts.filter(
|
|
114
|
+
const appointmentCarts = carts.filter(
|
|
115
|
+
(n) => !(appointmentBooking == null ? void 0 : appointmentBooking.isTargetCartIdNormalProduct(n._id))
|
|
116
|
+
);
|
|
108
117
|
if (appointmentCarts.length > 1 || !(appointmentCarts == null ? void 0 : appointmentCarts.length)) {
|
|
109
118
|
return [];
|
|
110
119
|
}
|
|
@@ -142,7 +151,9 @@ var Resource = (0, import_react.forwardRef)((props, ref) => {
|
|
|
142
151
|
var _a;
|
|
143
152
|
setSelectedResource(e.id);
|
|
144
153
|
if (e.id) {
|
|
145
|
-
const index = carts.findIndex(
|
|
154
|
+
const index = carts.findIndex(
|
|
155
|
+
(n) => !(appointmentBooking == null ? void 0 : appointmentBooking.isTargetCartIdNormalProduct(n._id))
|
|
156
|
+
);
|
|
146
157
|
return appointmentBooking.updateCart({
|
|
147
158
|
_id: (_a = carts == null ? void 0 : carts[index]) == null ? void 0 : _a._id,
|
|
148
159
|
resources: (0, import_utils.updateCartResources)(carts == null ? void 0 : carts[index], e)
|
|
@@ -151,13 +162,41 @@ var Resource = (0, import_react.forwardRef)((props, ref) => {
|
|
|
151
162
|
};
|
|
152
163
|
(0, import_react.useEffect)(() => {
|
|
153
164
|
var _a, _b, _c;
|
|
154
|
-
const index = carts.findIndex(
|
|
165
|
+
const index = carts.findIndex(
|
|
166
|
+
(n) => !(appointmentBooking == null ? void 0 : appointmentBooking.isTargetCartIdNormalProduct(n._id))
|
|
167
|
+
);
|
|
155
168
|
const selectedResource2 = (_c = (_b = (_a = carts == null ? void 0 : carts[index]) == null ? void 0 : _a._origin) == null ? void 0 : _b.resources) == null ? void 0 : _c.find(
|
|
156
169
|
(item) => (item == null ? void 0 : item.form_id) === (appointmentBoard == null ? void 0 : appointmentBoard.form_id)
|
|
157
170
|
);
|
|
158
171
|
setSelectedResource((selectedResource2 == null ? void 0 : selectedResource2.id) || 0);
|
|
159
172
|
}, [carts, appointmentBoard == null ? void 0 : appointmentBoard.form_id]);
|
|
160
|
-
|
|
173
|
+
(0, import_react.useEffect)(() => {
|
|
174
|
+
if (resourcesResult) {
|
|
175
|
+
setLoading(false);
|
|
176
|
+
}
|
|
177
|
+
}, [resourcesResult]);
|
|
178
|
+
const currentResourceName = (0, import_react.useMemo)(() => {
|
|
179
|
+
var _a;
|
|
180
|
+
const currentResource = (_a = currentSelectedResources == null ? void 0 : currentSelectedResources[0]) == null ? void 0 : _a.currentSelectedResource;
|
|
181
|
+
const resourceItem = (currentResource == null ? void 0 : currentResource.resourceItem) || {};
|
|
182
|
+
const name = (0, import_utils.getResourceTitle)(
|
|
183
|
+
appointmentBooking,
|
|
184
|
+
resourceItem == null ? void 0 : resourceItem.code,
|
|
185
|
+
utils,
|
|
186
|
+
resourceItem
|
|
187
|
+
);
|
|
188
|
+
return name;
|
|
189
|
+
}, [currentSelectedResources]);
|
|
190
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-resource-wrap" }, loading ? /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { loading: true, active: true }) : !(resourcesResult == null ? void 0 : resourcesResult.length) ? /* @__PURE__ */ import_react.default.createElement(
|
|
191
|
+
import_materials.PisellEmpty,
|
|
192
|
+
{
|
|
193
|
+
description: import_utils2.locales.getText("pisell2.appointment.resource.tip")(
|
|
194
|
+
currentResourceName
|
|
195
|
+
),
|
|
196
|
+
maxWidth: 400,
|
|
197
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_materials.Image, { src: import_resource.default, preview: false, width: 44 })
|
|
198
|
+
}
|
|
199
|
+
) : /* @__PURE__ */ import_react.default.createElement(
|
|
161
200
|
import_materials.PisellCustomCheckboxGroup,
|
|
162
201
|
{
|
|
163
202
|
dataSource: resourcesResult,
|
|
@@ -197,6 +197,7 @@ var useAppointmentBookingStep = () => {
|
|
|
197
197
|
(0, import_utils3.scrollToFirstErrorCard)();
|
|
198
198
|
return;
|
|
199
199
|
}
|
|
200
|
+
let preKey = "";
|
|
200
201
|
currentSelectedResources == null ? void 0 : currentSelectedResources.forEach((cart) => {
|
|
201
202
|
var _a3, _b3;
|
|
202
203
|
const selectedResource2 = cart == null ? void 0 : cart.currentSelectedResource;
|
|
@@ -207,7 +208,8 @@ var useAppointmentBookingStep = () => {
|
|
|
207
208
|
if (formId) {
|
|
208
209
|
const description = import_utils.locales.getText("pisell2.appointment.fill-form");
|
|
209
210
|
const beforeKey = (0, import_utils2.getFormInsertBeforeKey)(currentKey, stepList2);
|
|
210
|
-
appointmentBooking.addStep({ key: formKey, description }, beforeKey);
|
|
211
|
+
appointmentBooking.addStep({ key: formKey, description }, preKey || beforeKey);
|
|
212
|
+
preKey = formKey;
|
|
211
213
|
} else {
|
|
212
214
|
appointmentBooking.removeStep(formKey);
|
|
213
215
|
}
|
|
@@ -235,12 +237,19 @@ var useAppointmentBookingStep = () => {
|
|
|
235
237
|
if (((_f = nextStep2 == null ? void 0 : nextStep2.key) == null ? void 0 : _f.startsWith("select-resource_")) || (nextStep2 == null ? void 0 : nextStep2.key) === "confirm-information") {
|
|
236
238
|
const selectedResource = ((_g = currentSelectedResources == null ? void 0 : currentSelectedResources[0]) == null ? void 0 : _g.currentSelectedResource) || {};
|
|
237
239
|
const renderItem = (selectedResource == null ? void 0 : selectedResource.renderItem) || {};
|
|
238
|
-
const checkHolder = () => {
|
|
240
|
+
const checkHolder = async () => {
|
|
239
241
|
setLoading(false);
|
|
240
242
|
if (isRetailTemplate || (appointmentBooking == null ? void 0 : appointmentBooking.isCartAllNormalProducts())) {
|
|
241
243
|
return appointmentBooking.next();
|
|
242
244
|
}
|
|
243
|
-
|
|
245
|
+
let cartLists = carts || [];
|
|
246
|
+
if (!(carts == null ? void 0 : carts.length)) {
|
|
247
|
+
const newCarts = await appointmentBooking.getCart();
|
|
248
|
+
cartLists = newCarts || [];
|
|
249
|
+
} else {
|
|
250
|
+
cartLists = carts || [];
|
|
251
|
+
}
|
|
252
|
+
const appoimentCarts = cartLists.filter((n) => !(appointmentBooking == null ? void 0 : appointmentBooking.isTargetCartIdNormalProduct(n._id)));
|
|
244
253
|
const { hasError } = (0, import_utils2.checkAndGoNext)(isFormSubject, checkAccount, appoimentCarts);
|
|
245
254
|
setIsErrorHolder(hasError);
|
|
246
255
|
if (hasError) {
|
|
@@ -106,6 +106,7 @@ declare const _default: {
|
|
|
106
106
|
'pisell2.appointment.add-guests': string;
|
|
107
107
|
'pisell2.appointment.policy': string;
|
|
108
108
|
'pisell2.appointment.policy.confirm': string;
|
|
109
|
+
'pisell2.appointment.resource.tip': (val: string) => string;
|
|
109
110
|
'pisell2.text.apply': string;
|
|
110
111
|
'pisell2.text.goodpass': string;
|
|
111
112
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -223,6 +224,7 @@ declare const _default: {
|
|
|
223
224
|
'pisell2.appointment.add-guests': string;
|
|
224
225
|
'pisell2.appointment.policy': string;
|
|
225
226
|
'pisell2.appointment.policy.confirm': string;
|
|
227
|
+
'pisell2.appointment.resource.tip': (val: string) => string;
|
|
226
228
|
'pisell2.text.apply': string;
|
|
227
229
|
'pisell2.text.goodpass': string;
|
|
228
230
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -340,6 +342,7 @@ declare const _default: {
|
|
|
340
342
|
'pisell2.appointment.add-guests': string;
|
|
341
343
|
'pisell2.appointment.policy': string;
|
|
342
344
|
'pisell2.appointment.policy.confirm': string;
|
|
345
|
+
'pisell2.appointment.resource.tip': (val: string) => string;
|
|
343
346
|
'pisell2.text.apply': string;
|
|
344
347
|
'pisell2.text.goodpass': string;
|
|
345
348
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -130,6 +130,7 @@ var locales_default = {
|
|
|
130
130
|
"pisell2.appointment.add-guests": "Add guests",
|
|
131
131
|
"pisell2.appointment.policy": "You have read and agreed to this policy",
|
|
132
132
|
"pisell2.appointment.policy.confirm": "Confirm",
|
|
133
|
+
"pisell2.appointment.resource.tip": (val) => `Tip: Change ${val || "resource"} using the dropdown in the cart.`,
|
|
133
134
|
"pisell2.text.apply": "Apply",
|
|
134
135
|
"pisell2.text.goodpass": "GoodPass",
|
|
135
136
|
"pisell2.text.goodpass.product-vouchers": "Product Vouchers",
|
|
@@ -247,6 +248,7 @@ var locales_default = {
|
|
|
247
248
|
"pisell2.appointment.add-guests": "添加预约人",
|
|
248
249
|
"pisell2.appointment.policy": "您已仔细阅读并同意此协议",
|
|
249
250
|
"pisell2.appointment.policy.confirm": "确定",
|
|
251
|
+
"pisell2.appointment.resource.tip": (val) => `提示:在右侧购物车中,通过下拉框修改“${val || "资源"}”`,
|
|
250
252
|
"pisell2.text.apply": "应用",
|
|
251
253
|
"pisell2.text.goodpass": "商品券",
|
|
252
254
|
"pisell2.text.goodpass.product-vouchers": "商品兑换券",
|
|
@@ -364,6 +366,7 @@ var locales_default = {
|
|
|
364
366
|
"pisell2.appointment.add-guests": "添加預約人",
|
|
365
367
|
"pisell2.appointment.policy": "您已仔細閱讀並同意此協議",
|
|
366
368
|
"pisell2.appointment.policy.confirm": "確定",
|
|
369
|
+
"pisell2.appointment.resource.tip": (val) => `提示:在右側購物車中,透過下拉框修改“${val || "資源"}”`,
|
|
367
370
|
"pisell2.text.apply": "應用",
|
|
368
371
|
"pisell2.text.goodpass": "商品券",
|
|
369
372
|
"pisell2.text.goodpass.product-vouchers": "商品兌換券",
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -36,6 +36,8 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_utils = require("@pisell/utils");
|
|
37
37
|
var import_classnames = __toESM(require("classnames"));
|
|
38
38
|
var import_utils2 = require("../../../utils");
|
|
39
|
+
var import_decimal = __toESM(require("decimal.js"));
|
|
40
|
+
var import_pisellPriceText = __toESM(require("../../../../productSelect/components/pisellPriceText"));
|
|
39
41
|
var import_index = require("./index.less");
|
|
40
42
|
var ProductItem = ({
|
|
41
43
|
item,
|
|
@@ -44,6 +46,11 @@ var ProductItem = ({
|
|
|
44
46
|
style,
|
|
45
47
|
className
|
|
46
48
|
}) => {
|
|
49
|
+
const { price, is_bundle, minimum_markup_price } = item;
|
|
50
|
+
let _price = price;
|
|
51
|
+
if (is_bundle) {
|
|
52
|
+
_price = new import_decimal.default(price).plus(new import_decimal.default(minimum_markup_price)).toFixed(2);
|
|
53
|
+
}
|
|
47
54
|
const stockText = (0, import_react.useMemo)(() => {
|
|
48
55
|
if (item.is_track === 0) {
|
|
49
56
|
return false;
|
|
@@ -73,7 +80,7 @@ var ProductItem = ({
|
|
|
73
80
|
className: "server-product-title"
|
|
74
81
|
},
|
|
75
82
|
item.title
|
|
76
|
-
), /* @__PURE__ */ import_react.default.createElement("div", { className: "server-product-time" }, (0, import_utils2.getDiscountTime)(item.service_times)), stockText && /* @__PURE__ */ import_react.default.createElement("div", { className: "server-product-time" }, stockText), /* @__PURE__ */ import_react.default.createElement("div", { className: "server-product-price" },
|
|
83
|
+
), /* @__PURE__ */ import_react.default.createElement("div", { className: "server-product-time" }, (0, import_utils2.getDiscountTime)(item.service_times)), stockText && /* @__PURE__ */ import_react.default.createElement("div", { className: "server-product-time" }, stockText), /* @__PURE__ */ import_react.default.createElement("div", { className: "server-product-price" }, /* @__PURE__ */ import_react.default.createElement(import_pisellPriceText.default, { value: _price, isMini: is_bundle })))
|
|
77
84
|
);
|
|
78
85
|
};
|
|
79
86
|
var productItem_default = ProductItem;
|
|
@@ -38,7 +38,7 @@ var import_ArrowLeft = __toESM(require("@pisell/icon/es/ArrowLeft"));
|
|
|
38
38
|
var import_index = require("./index.less");
|
|
39
39
|
var import_classnames = __toESM(require("classnames"));
|
|
40
40
|
var Drawer = (props) => {
|
|
41
|
-
const { hideScrollBar = true, showGoBack = true } = props;
|
|
41
|
+
const { hideScrollBar = true, showGoBack = true, mask = false } = props;
|
|
42
42
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
43
43
|
import_antd.Drawer,
|
|
44
44
|
{
|
|
@@ -52,7 +52,7 @@ var Drawer = (props) => {
|
|
|
52
52
|
title: false,
|
|
53
53
|
bodyStyle: { padding: 0 },
|
|
54
54
|
push: false,
|
|
55
|
-
mask
|
|
55
|
+
mask
|
|
56
56
|
},
|
|
57
57
|
/* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-lowcode__booking-drawer-title-wrap") }, /* @__PURE__ */ import_react.default.createElement(
|
|
58
58
|
"div",
|
|
@@ -101,24 +101,28 @@ var VoucherCard = (props) => {
|
|
|
101
101
|
});
|
|
102
102
|
return val;
|
|
103
103
|
}, [state.service.value]);
|
|
104
|
+
const { run } = (0, import_ahooks.useDebounceFn)(
|
|
105
|
+
() => {
|
|
106
|
+
var _a2, _b2;
|
|
107
|
+
if (productRef.current === state.service.value || !((_b2 = (_a2 = state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length)) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
if (isBooking4Shop) {
|
|
111
|
+
const val = shopDiscount.calcDiscount(state.service.value);
|
|
112
|
+
productRef.current = val.productList;
|
|
113
|
+
dispatch({
|
|
114
|
+
type: "setService",
|
|
115
|
+
payload: {
|
|
116
|
+
...services,
|
|
117
|
+
value: ((val == null ? void 0 : val.productList) || []).filter(Boolean)
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{ wait: 500 }
|
|
123
|
+
);
|
|
104
124
|
(0, import_react.useEffect)(() => {
|
|
105
|
-
|
|
106
|
-
if (productRef.current === state.service.value || !((_b2 = (_a2 = state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length)) {
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
if (isBooking4Shop) {
|
|
110
|
-
const val = shopDiscount.calcDiscount(state.service.value);
|
|
111
|
-
console.log("input: ", state.service.value);
|
|
112
|
-
console.log("output: ", val);
|
|
113
|
-
productRef.current = val.productList;
|
|
114
|
-
dispatch({
|
|
115
|
-
type: "setService",
|
|
116
|
-
payload: {
|
|
117
|
-
...services,
|
|
118
|
-
value: ((val == null ? void 0 : val.productList) || []).filter(Boolean)
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
}
|
|
125
|
+
run();
|
|
122
126
|
}, [JSON.stringify(serviceMemo), isBooking4Shop]);
|
|
123
127
|
const fn = (0, import_ahooks.useMemoizedFn)((result) => {
|
|
124
128
|
var _a2;
|
|
@@ -135,18 +139,18 @@ var VoucherCard = (props) => {
|
|
|
135
139
|
});
|
|
136
140
|
(0, import_react.useEffect)(() => {
|
|
137
141
|
if (!isBooking4Shop) return;
|
|
138
|
-
pisellos.effects.on(ShopDiscountHooks.onScanCustomerChange, (customer) => {
|
|
139
|
-
dispatch({
|
|
140
|
-
type: "setClient",
|
|
141
|
-
payload: {
|
|
142
|
-
value: customer
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
});
|
|
146
142
|
pisellos.effects.on(
|
|
147
|
-
ShopDiscountHooks.
|
|
148
|
-
|
|
143
|
+
ShopDiscountHooks.onScanCustomerChange,
|
|
144
|
+
(customer) => {
|
|
145
|
+
dispatch({
|
|
146
|
+
type: "setClient",
|
|
147
|
+
payload: {
|
|
148
|
+
value: customer
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
}
|
|
149
152
|
);
|
|
153
|
+
pisellos.effects.on(ShopDiscountHooks.onLoadPrepareCalcResult, fn);
|
|
150
154
|
pisellos.effects.on(
|
|
151
155
|
ShopDiscountHooks.onDiscountListChange,
|
|
152
156
|
(discount) => {
|