@pisell/private-materials 3.3.78 → 3.3.80
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 +13 -13
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +5 -5
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/businessModel/SalesModel/Sales/index.js +4 -37
- package/es/components/Sales/Resource/index.js +2 -2
- package/es/components/Sales/Resource/serve.d.ts +0 -7
- package/es/components/Sales/Resource/serve.js +0 -10
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +2 -4
- package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/es/components/appointmentBooking/components/Content/index.less +1 -1
- package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.js +14 -8
- package/es/components/appointmentBooking/components/Services/index.js +36 -38
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Voucher/index.js +0 -13
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +7 -6
- package/es/components/appointmentBooking/index.d.ts +0 -1
- package/es/components/appointmentBooking/index.js +0 -14
- package/es/components/appointmentBooking/index.less +1 -1
- package/es/components/appointmentBooking/locales.js +3 -3
- package/es/components/booking/addons/index.js +2 -9
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/addons/model.js +0 -5
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/selectProductItem/index.js +1 -3
- package/es/components/booking/components/TabProduct/selectProductItem/index.less +0 -6
- 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/footer/amount.js +1 -2
- package/es/components/booking/components/footer/index.d.ts +0 -1
- package/es/components/booking/components/footer/index.js +3 -9
- package/es/components/booking/components/footer/utils.js +36 -74
- package/es/components/booking/components/voucher/index.d.ts +0 -1
- package/es/components/booking/components/voucher/index.js +66 -110
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service2/utils.js +2 -6
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/service/addService/index.d.ts +0 -1
- package/es/components/booking/info2/service/addService/index.js +2 -2
- package/es/components/booking/info2/service/editService/index.js +2 -5
- package/es/components/booking/info2/utilsByBooking.d.ts +1 -1
- package/es/components/booking/info2/utilsByBooking.js +3 -5
- package/es/components/booking/locales.d.ts +0 -3
- package/es/components/booking/locales.js +3 -6
- 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/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Event/index.js +4 -13
- package/es/components/eventBooking/components/bookingDetailModal/index.js +3 -19
- package/es/components/eventBooking/index.d.ts +0 -1
- package/es/components/eventBooking/index.js +7 -21
- package/es/components/eventBooking/locales.js +3 -3
- package/es/components/index.d.ts +1 -2
- package/es/components/index.js +1 -2
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/index.js +4 -5
- package/es/components/pay/toC/model.d.ts +9 -1
- 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/Forms/index.js +12 -12
- 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/server.js +2 -2
- package/es/components/productExtension/server.js +2 -2
- 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.d.ts +1 -1
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +5 -6
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +3 -124
- package/es/components/ticketBooking/locales.d.ts +146 -164
- package/es/components/ticketBooking/locales.js +147 -195
- package/es/components/ticketBooking/utils/index.d.ts +1 -5
- package/es/components/ticketBooking/utils/index.js +6 -58
- 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/model.d.ts +9 -1
- package/es/hooks/useComponents.js +1 -1
- package/es/index.d.ts +0 -1
- package/es/index.js +1 -2
- package/es/utils/index.d.ts +1 -1
- package/lib/businessModel/SalesModel/Sales/index.js +8 -22
- package/lib/components/Sales/Resource/index.js +1 -1
- package/lib/components/Sales/Resource/serve.d.ts +0 -7
- package/lib/components/Sales/Resource/serve.js +2 -9
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +4 -5
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/lib/components/appointmentBooking/components/Content/index.less +1 -1
- package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.js +3 -2
- package/lib/components/appointmentBooking/components/Services/index.js +18 -19
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Voucher/index.js +0 -9
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +1 -0
- package/lib/components/appointmentBooking/index.d.ts +0 -1
- package/lib/components/appointmentBooking/index.js +0 -11
- package/lib/components/appointmentBooking/index.less +1 -1
- package/lib/components/appointmentBooking/locales.js +3 -3
- package/lib/components/booking/addons/index.js +2 -10
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/addons/model.js +0 -3
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/selectProductItem/index.js +1 -5
- package/lib/components/booking/components/TabProduct/selectProductItem/index.less +0 -6
- package/lib/components/booking/components/footer/amount.js +1 -2
- package/lib/components/booking/components/footer/index.d.ts +0 -1
- package/lib/components/booking/components/footer/index.js +5 -10
- package/lib/components/booking/components/footer/utils.js +12 -48
- package/lib/components/booking/components/voucher/index.d.ts +0 -1
- package/lib/components/booking/components/voucher/index.js +67 -111
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/service2/utils.js +1 -3
- package/lib/components/booking/info/utils.js +3 -1
- package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/index.js +2 -2
- package/lib/components/booking/info2/service/editService/index.js +2 -5
- package/lib/components/booking/info2/utilsByBooking.d.ts +1 -1
- package/lib/components/booking/info2/utilsByBooking.js +2 -3
- package/lib/components/booking/locales.d.ts +0 -3
- package/lib/components/booking/locales.js +3 -6
- 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/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Event/index.js +3 -10
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +3 -9
- package/lib/components/eventBooking/index.d.ts +0 -1
- package/lib/components/eventBooking/index.js +7 -11
- package/lib/components/eventBooking/locales.js +3 -3
- package/lib/components/index.d.ts +1 -2
- package/lib/components/index.js +0 -3
- package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +4 -6
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +3 -124
- package/lib/components/ticketBooking/locales.d.ts +146 -164
- package/lib/components/ticketBooking/locales.js +4 -22
- package/lib/components/ticketBooking/utils/index.d.ts +1 -5
- package/lib/components/ticketBooking/utils/index.js +5 -48
- 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/model.d.ts +9 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -3
- package/lib/utils/index.d.ts +1 -1
- package/package.json +4 -4
- package/es/components/booking/components/voucher/utils.d.ts +0 -4
- package/es/components/booking/components/voucher/utils.js +0 -15
- package/es/components/stepController/components/Content/index.d.ts +0 -7
- package/es/components/stepController/components/Content/index.js +0 -9
- package/es/components/stepController/components/Content/index.less +0 -8
- package/es/components/stepController/components/Footer/index.d.ts +0 -8
- package/es/components/stepController/components/Footer/index.js +0 -15
- package/es/components/stepController/components/Footer/index.less +0 -39
- package/es/components/stepController/components/Header/index.d.ts +0 -20
- package/es/components/stepController/components/Header/index.js +0 -97
- package/es/components/stepController/components/Header/index.less +0 -21
- package/es/components/stepController/index.d.ts +0 -5
- package/es/components/stepController/index.js +0 -64
- package/es/components/stepController/index.less +0 -11
- package/es/components/stepController/locales.d.ts +0 -27
- package/es/components/stepController/locales.js +0 -32
- package/es/components/stepController/types.d.ts +0 -23
- package/es/components/stepController/types.js +0 -1
- package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
- package/es/components/ticketBooking/utils/formatProductMessage.js +0 -62
- package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
- package/es/components/ticketBooking/utils/formatTime.js +0 -144
- package/es/hooks/useWindowSize.d.ts +0 -5
- package/es/hooks/useWindowSize.js +0 -26
- package/lib/components/booking/components/voucher/utils.d.ts +0 -4
- package/lib/components/booking/components/voucher/utils.js +0 -43
- package/lib/components/stepController/components/Content/index.d.ts +0 -7
- package/lib/components/stepController/components/Content/index.js +0 -40
- package/lib/components/stepController/components/Content/index.less +0 -8
- package/lib/components/stepController/components/Footer/index.d.ts +0 -8
- package/lib/components/stepController/components/Footer/index.js +0 -49
- package/lib/components/stepController/components/Footer/index.less +0 -39
- package/lib/components/stepController/components/Header/index.d.ts +0 -20
- package/lib/components/stepController/components/Header/index.js +0 -104
- package/lib/components/stepController/components/Header/index.less +0 -21
- package/lib/components/stepController/index.d.ts +0 -5
- package/lib/components/stepController/index.js +0 -89
- package/lib/components/stepController/index.less +0 -11
- package/lib/components/stepController/locales.d.ts +0 -27
- package/lib/components/stepController/locales.js +0 -50
- package/lib/components/stepController/types.d.ts +0 -23
- package/lib/components/stepController/types.js +0 -17
- package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
- package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -84
- package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
- package/lib/components/ticketBooking/utils/formatTime.js +0 -139
- package/lib/hooks/useWindowSize.d.ts +0 -5
- package/lib/hooks/useWindowSize.js +0 -51
- package/lowcode/step-controller/meta.ts +0 -88
|
@@ -148,7 +148,7 @@ var checkResourcesFormat = (resources, service, isChild) => {
|
|
|
148
148
|
return resources.map((resource) => {
|
|
149
149
|
var _a;
|
|
150
150
|
if (!isChild) {
|
|
151
|
-
resource.capacity = (0, import_utilsByBooking.getSumCapacity)({ cacheItem: service }
|
|
151
|
+
resource.capacity = (0, import_utilsByBooking.getSumCapacity)({ cacheItem: service });
|
|
152
152
|
}
|
|
153
153
|
checkSubResourcesCapacity(resource);
|
|
154
154
|
return {
|
|
@@ -177,16 +177,12 @@ var formatResource = (service) => {
|
|
|
177
177
|
}
|
|
178
178
|
};
|
|
179
179
|
var formatHolders = (state, item, values) => {
|
|
180
|
-
var _a, _b, _c, _d, _e, _f
|
|
180
|
+
var _a, _b, _c, _d, _e, _f;
|
|
181
181
|
const form_id = ((_d = (_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.appointment_subject) == null ? void 0 : _d.form_id) || 0;
|
|
182
|
-
let form_record = ((_e = item._extend) == null ? void 0 : _e.holder_id) ? [(_f = item._extend) == null ? void 0 : _f.holder_id] : [];
|
|
183
|
-
if (((_g = item._extend) == null ? void 0 : _g.holder_id) && (0, import_utils5.isArr)((_h = item._extend) == null ? void 0 : _h.holder_id)) {
|
|
184
|
-
form_record = (_i = item._extend) == null ? void 0 : _i.holder_id;
|
|
185
|
-
}
|
|
186
182
|
let obj = {
|
|
187
183
|
customer_id: values.customer_id,
|
|
188
184
|
form_id,
|
|
189
|
-
form_record
|
|
185
|
+
form_record: ((_e = item._extend) == null ? void 0 : _e.holder_id) ? [(_f = item._extend) == null ? void 0 : _f.holder_id] : []
|
|
190
186
|
};
|
|
191
187
|
if (state.isFranchisee) {
|
|
192
188
|
obj.is_source_shop = 1;
|
|
@@ -221,7 +217,7 @@ var formatMetaData = (item) => {
|
|
|
221
217
|
}
|
|
222
218
|
return metadata;
|
|
223
219
|
};
|
|
224
|
-
var formatProducts = (item
|
|
220
|
+
var formatProducts = (item) => {
|
|
225
221
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
226
222
|
const total = Number(item._extend.total);
|
|
227
223
|
const origin_total = Number(item._extend.origin_total);
|
|
@@ -230,7 +226,7 @@ var formatProducts = (item, quantity) => {
|
|
|
230
226
|
const discount_type = discount_amount < 0 ? "change_price" : "discount";
|
|
231
227
|
const notManualDiscount = discount_list.filter((item2) => item2.type !== "product");
|
|
232
228
|
return {
|
|
233
|
-
"num":
|
|
229
|
+
"num": item._extend.quantity,
|
|
234
230
|
"price": formatProductPrice(item),
|
|
235
231
|
"source_product_price": (_a = item._extend) == null ? void 0 : _a.price,
|
|
236
232
|
"product_id": (item == null ? void 0 : item.product_id) || item.id,
|
|
@@ -272,13 +268,6 @@ var formatAppointmentProductLists = (data) => {
|
|
|
272
268
|
} catch (error) {
|
|
273
269
|
}
|
|
274
270
|
};
|
|
275
|
-
var getHolderByIndex = (holder, index) => {
|
|
276
|
-
var _a;
|
|
277
|
-
return {
|
|
278
|
-
...holder,
|
|
279
|
-
form_record: [(_a = holder == null ? void 0 : holder.form_record) == null ? void 0 : _a[index]].filter(Boolean)
|
|
280
|
-
};
|
|
281
|
-
};
|
|
282
271
|
var formatBookings = (data, values) => {
|
|
283
272
|
const isDay = (0, import_utils4.isDaysBooking)(data);
|
|
284
273
|
const isEvent = (0, import_utils4.isEventBooking)(data);
|
|
@@ -298,7 +287,7 @@ var formatBookings = (data, values) => {
|
|
|
298
287
|
let dayParams = {};
|
|
299
288
|
const eventOtherParams = data.eventOtherParams;
|
|
300
289
|
let bookings = [];
|
|
301
|
-
list.
|
|
290
|
+
bookings = list.map((item) => {
|
|
302
291
|
var _a, _b, _c, _d;
|
|
303
292
|
let start_date = item._extend.startDate.format("YYYY-MM-DD");
|
|
304
293
|
let end_date = item._extend.endDate.format("YYYY-MM-DD");
|
|
@@ -320,7 +309,7 @@ var formatBookings = (data, values) => {
|
|
|
320
309
|
dayParams.holder = formatHolders(data, item, values);
|
|
321
310
|
dayParams.duration = (0, import_utils3.getDays)({ _extend: { start_date: startDateTime, end_date: endDateTime } }, "minutes");
|
|
322
311
|
}
|
|
323
|
-
|
|
312
|
+
return {
|
|
324
313
|
"product": formatProducts(item),
|
|
325
314
|
"relation_products": formatRelationDetails(item._extend.relation_details),
|
|
326
315
|
"id": item.booking_id || 0,
|
|
@@ -342,18 +331,6 @@ var formatBookings = (data, values) => {
|
|
|
342
331
|
...eventOtherParams || {},
|
|
343
332
|
...dayParams
|
|
344
333
|
};
|
|
345
|
-
if (isDay) {
|
|
346
|
-
bookings.push(booking);
|
|
347
|
-
return;
|
|
348
|
-
}
|
|
349
|
-
for (let i = 0; i < (item._extend.quantity || 1); i++) {
|
|
350
|
-
bookings.push({
|
|
351
|
-
...booking,
|
|
352
|
-
"product": formatProducts(item, 1),
|
|
353
|
-
"number": item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: item }, false) : item._extend.number || 1,
|
|
354
|
-
"holder": getHolderByIndex(booking.holder, i)
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
334
|
});
|
|
358
335
|
return bookings;
|
|
359
336
|
};
|
|
@@ -398,7 +375,7 @@ var formatHolder = (state, values) => {
|
|
|
398
375
|
return obj;
|
|
399
376
|
};
|
|
400
377
|
var formatValues = (state) => {
|
|
401
|
-
var _a, _b, _c, _d, _e, _f
|
|
378
|
+
var _a, _b, _c, _d, _e, _f;
|
|
402
379
|
let values = {
|
|
403
380
|
type: state.renderType === "eventBooking" ? "event_booking_v2" : "appointment_booking",
|
|
404
381
|
platform: "shop",
|
|
@@ -432,20 +409,17 @@ var formatValues = (state) => {
|
|
|
432
409
|
values.relation_products = formatRelationProducts(state);
|
|
433
410
|
} else {
|
|
434
411
|
values.relation_products = formatNormalProducts(state);
|
|
435
|
-
if (!((_b = values.relation_products) == null ? void 0 : _b.length)) {
|
|
436
|
-
values.relation_products = void 0;
|
|
437
|
-
}
|
|
438
412
|
}
|
|
439
413
|
values.bookings = formatBookings(state, values);
|
|
440
|
-
if (((
|
|
441
|
-
let startTime = `${(
|
|
414
|
+
if (((_c = (_b = values == null ? void 0 : values.bookings) == null ? void 0 : _b[0]) == null ? void 0 : _c.select_date) && !(state == null ? void 0 : state.bookingId)) {
|
|
415
|
+
let startTime = `${(_e = (_d = values == null ? void 0 : values.bookings) == null ? void 0 : _d[0]) == null ? void 0 : _e.start_time}`;
|
|
442
416
|
startTime = `${startTime || "00:00"}:00`;
|
|
443
417
|
values.schedule_date = `${values.bookings[0].select_date} ${startTime}`;
|
|
444
418
|
}
|
|
445
419
|
if (isDay) {
|
|
446
420
|
values.metadata.is_multiday_appointment = 1;
|
|
447
421
|
}
|
|
448
|
-
if (!((
|
|
422
|
+
if (!((_f = values == null ? void 0 : values.bookings) == null ? void 0 : _f.length)) {
|
|
449
423
|
values.type = "virtual";
|
|
450
424
|
}
|
|
451
425
|
return values;
|
|
@@ -453,17 +427,7 @@ var formatValues = (state) => {
|
|
|
453
427
|
var checkHolderIsError = (state) => {
|
|
454
428
|
var _a, _b;
|
|
455
429
|
const holderError = state.service.value.some((item) => {
|
|
456
|
-
|
|
457
|
-
if ((0, import_utils4.isNormalProductByDurationSchedule)(item)) {
|
|
458
|
-
return false;
|
|
459
|
-
}
|
|
460
|
-
if (item._extend.quantity === 1 && !item._extend.holder_id) {
|
|
461
|
-
return true;
|
|
462
|
-
}
|
|
463
|
-
if (item._extend.quantity > 1 && ((_b2 = (_a2 = item._extend) == null ? void 0 : _a2.holder_id) == null ? void 0 : _b2.length) !== item._extend.quantity) {
|
|
464
|
-
return true;
|
|
465
|
-
}
|
|
466
|
-
return false;
|
|
430
|
+
return !item._extend.holder_id && !(0, import_utils4.isNormalProductByDurationSchedule)(item);
|
|
467
431
|
});
|
|
468
432
|
const clientId = (_b = (_a = state.client) == null ? void 0 : _a.value) == null ? void 0 : _b.id;
|
|
469
433
|
if (holderError && (!clientId || clientId === 0 || clientId === 1)) {
|
|
@@ -42,7 +42,6 @@ var import_materials = require("@pisell/materials");
|
|
|
42
42
|
var import_useIsBooking4Shop = require("../../hooks/useIsBooking4Shop");
|
|
43
43
|
var import_index = require("./index.less");
|
|
44
44
|
var import_ahooks = require("ahooks");
|
|
45
|
-
var import_utils2 = require("./utils");
|
|
46
45
|
var ShopDiscountHooks = {
|
|
47
46
|
onInited: "shopDiscount:onInited",
|
|
48
47
|
onDestroy: "shopDiscount:onDestroy",
|
|
@@ -55,33 +54,37 @@ var ShopDiscountHooks = {
|
|
|
55
54
|
};
|
|
56
55
|
var services = {};
|
|
57
56
|
var VoucherCard = (props) => {
|
|
58
|
-
var _a, _b
|
|
57
|
+
var _a, _b;
|
|
59
58
|
const context = (0, import_useEngineContext.default)();
|
|
60
|
-
const { state, dispatch
|
|
59
|
+
const { state, dispatch } = props;
|
|
61
60
|
const [showDetail, setShowDetail] = (0, import_react.useState)(false);
|
|
62
61
|
const { pisellos } = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
|
63
62
|
const [code, setCode] = (0, import_react.useState)("");
|
|
64
63
|
const [discountList, setDisCountList] = (0, import_react.useState)([]);
|
|
65
|
-
const
|
|
66
|
-
const addonsValueRef = (0, import_react.useRef)(state.addons.value);
|
|
64
|
+
const productRef = (0, import_react.useRef)(state.service.value);
|
|
67
65
|
const isBooking4Shop = (0, import_useIsBooking4Shop.useIsBooking4Shop)(state);
|
|
68
66
|
const shopDiscount = pisellos.getModule("shopDiscount");
|
|
69
67
|
services = state.service;
|
|
70
|
-
(0,
|
|
68
|
+
const availableData = (0, import_react.useMemo)(() => {
|
|
69
|
+
if (!isBooking4Shop) return [];
|
|
70
|
+
const shopDiscount2 = pisellos.getModule("shopDiscount");
|
|
71
|
+
return discountList.filter((item) => !!item.isAvailable).map((discount) => {
|
|
72
|
+
return {
|
|
73
|
+
...discount,
|
|
74
|
+
savedAmount: shopDiscount2.calcDiscountApplicableProductTotalPrice(discount)
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
}, [discountList, isBooking4Shop]);
|
|
78
|
+
(0, import_react.useEffect)(() => {
|
|
71
79
|
if (isBooking4Shop) {
|
|
72
80
|
shopDiscount.setCustomer(state.client.value);
|
|
73
81
|
}
|
|
74
|
-
}, [(_b = state.client.value) == null ? void 0 : _b.id, isBooking4Shop]
|
|
75
|
-
wait: 200
|
|
76
|
-
});
|
|
82
|
+
}, [(_b = state.client.value) == null ? void 0 : _b.id, isBooking4Shop]);
|
|
77
83
|
(0, import_react.useEffect)(() => {
|
|
78
84
|
if (isBooking4Shop) {
|
|
79
|
-
shopDiscount.setProductList(
|
|
80
|
-
...state.service.value,
|
|
81
|
-
...state.addons.value
|
|
82
|
-
]);
|
|
85
|
+
shopDiscount.setProductList(state.service.value);
|
|
83
86
|
}
|
|
84
|
-
}, [state.service.value,
|
|
87
|
+
}, [state.service.value, isBooking4Shop]);
|
|
85
88
|
const serviceMemo = (0, import_react.useMemo)(() => {
|
|
86
89
|
var _a2;
|
|
87
90
|
const val = (_a2 = state.service.value || []) == null ? void 0 : _a2.map((value) => {
|
|
@@ -89,6 +92,7 @@ var VoucherCard = (props) => {
|
|
|
89
92
|
return {
|
|
90
93
|
booking_id: value.booking_id,
|
|
91
94
|
id: value.id,
|
|
95
|
+
_id: value._id,
|
|
92
96
|
price: value.price,
|
|
93
97
|
total: (_a3 = value == null ? void 0 : value._extend) == null ? void 0 : _a3.total,
|
|
94
98
|
discount_list: value.discount_list,
|
|
@@ -97,141 +101,89 @@ var VoucherCard = (props) => {
|
|
|
97
101
|
});
|
|
98
102
|
return val;
|
|
99
103
|
}, [state.service.value]);
|
|
100
|
-
const addonsMemo = (0, import_react.useMemo)(() => {
|
|
101
|
-
var _a2;
|
|
102
|
-
const val = (_a2 = state.addons.value || []) == null ? void 0 : _a2.map((value) => {
|
|
103
|
-
var _a3, _b2;
|
|
104
|
-
return {
|
|
105
|
-
booking_id: value.booking_id,
|
|
106
|
-
id: value.id,
|
|
107
|
-
_id: value._id,
|
|
108
|
-
price: value.price,
|
|
109
|
-
total: (_a3 = value == null ? void 0 : value._extend) == null ? void 0 : _a3.total,
|
|
110
|
-
discount_list: value.discount_list,
|
|
111
|
-
_key: value._key,
|
|
112
|
-
num: (_b2 = value == null ? void 0 : value._extend) == null ? void 0 : _b2.quantity
|
|
113
|
-
};
|
|
114
|
-
});
|
|
115
|
-
return val;
|
|
116
|
-
}, [state.addons.value]);
|
|
117
|
-
const disabled = (0, import_react.useMemo)(() => {
|
|
118
|
-
var _a2;
|
|
119
|
-
if (["paid", "partially_paid"].includes((_a2 = state.bookingDetail) == null ? void 0 : _a2.payment_status) && [...addonsMemo, ...serviceMemo].every((item) => item.booking_id)) {
|
|
120
|
-
return true;
|
|
121
|
-
}
|
|
122
|
-
return false;
|
|
123
|
-
}, [state, addonsMemo, serviceMemo]);
|
|
124
104
|
const { run } = (0, import_ahooks.useDebounceFn)(
|
|
125
105
|
() => {
|
|
126
106
|
var _a2, _b2;
|
|
127
|
-
if (
|
|
107
|
+
if (productRef.current === state.service.value || !((_b2 = (_a2 = state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length)) {
|
|
128
108
|
return;
|
|
129
109
|
}
|
|
130
110
|
if (isBooking4Shop) {
|
|
131
|
-
const val = shopDiscount.calcDiscount(
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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
|
+
});
|
|
138
120
|
}
|
|
139
121
|
},
|
|
140
122
|
{ wait: 500 }
|
|
141
123
|
);
|
|
142
124
|
(0, import_react.useEffect)(() => {
|
|
143
125
|
run();
|
|
144
|
-
}, [JSON.stringify(serviceMemo),
|
|
126
|
+
}, [JSON.stringify(serviceMemo), isBooking4Shop]);
|
|
145
127
|
const fn = (0, import_ahooks.useMemoizedFn)((result) => {
|
|
146
128
|
var _a2;
|
|
147
129
|
if (!(result == null ? void 0 : result.productList) || ((_a2 = result == null ? void 0 : result.productList) == null ? void 0 : _a2.some((item) => !item))) {
|
|
148
130
|
return;
|
|
149
131
|
}
|
|
150
|
-
|
|
132
|
+
dispatch({
|
|
133
|
+
type: "setService",
|
|
134
|
+
payload: {
|
|
135
|
+
...services,
|
|
136
|
+
value: result.productList
|
|
137
|
+
}
|
|
138
|
+
});
|
|
151
139
|
});
|
|
152
140
|
(0, import_react.useEffect)(() => {
|
|
153
141
|
if (!isBooking4Shop) return;
|
|
154
|
-
const onScanCustomerChange = (customer) => {
|
|
155
|
-
dispatch({
|
|
156
|
-
type: "setClient",
|
|
157
|
-
payload: {
|
|
158
|
-
value: customer
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
};
|
|
162
|
-
const onDiscountListChange = (discount) => {
|
|
163
|
-
setDisCountList(discount);
|
|
164
|
-
};
|
|
165
142
|
pisellos.effects.on(
|
|
166
143
|
ShopDiscountHooks.onScanCustomerChange,
|
|
167
|
-
|
|
144
|
+
(customer) => {
|
|
145
|
+
dispatch({
|
|
146
|
+
type: "setClient",
|
|
147
|
+
payload: {
|
|
148
|
+
value: customer
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
}
|
|
168
152
|
);
|
|
169
153
|
pisellos.effects.on(ShopDiscountHooks.onLoadPrepareCalcResult, fn);
|
|
170
154
|
pisellos.effects.on(
|
|
171
155
|
ShopDiscountHooks.onDiscountListChange,
|
|
172
|
-
|
|
156
|
+
(discount) => {
|
|
157
|
+
setDisCountList(discount);
|
|
158
|
+
}
|
|
173
159
|
);
|
|
174
160
|
return () => {
|
|
175
161
|
shopDiscount.clear();
|
|
176
|
-
pisellos.effects.off(ShopDiscountHooks.onCustomerChange
|
|
177
|
-
pisellos.effects.off(ShopDiscountHooks.onLoadPrepareCalcResult
|
|
178
|
-
pisellos.effects.off(ShopDiscountHooks.onDiscountListChange
|
|
162
|
+
pisellos.effects.off(ShopDiscountHooks.onCustomerChange);
|
|
163
|
+
pisellos.effects.off(ShopDiscountHooks.onLoadPrepareCalcResult);
|
|
164
|
+
pisellos.effects.off(ShopDiscountHooks.onDiscountListChange);
|
|
179
165
|
};
|
|
180
166
|
}, [state.bookingId, isBooking4Shop, fn]);
|
|
181
|
-
const productListToValue = (0, import_ahooks.useMemoizedFn)((list, edit) => {
|
|
182
|
-
const { serviceList, addonsList } = (0, import_utils2.getServiceAddons)(list);
|
|
183
|
-
serviceValueRef.current = serviceList;
|
|
184
|
-
addonsValueRef.current = addonsList;
|
|
185
|
-
let other = {};
|
|
186
|
-
if (edit) {
|
|
187
|
-
other = {
|
|
188
|
-
edit: true
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
dispatch({
|
|
192
|
-
type: "setService",
|
|
193
|
-
payload: {
|
|
194
|
-
value: serviceList,
|
|
195
|
-
...other
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
dispatch({
|
|
199
|
-
type: "setAddons",
|
|
200
|
-
payload: {
|
|
201
|
-
value: addonsList,
|
|
202
|
-
...other
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
});
|
|
206
167
|
const onScanCode = async () => {
|
|
207
168
|
const val = await shopDiscount.scanCode(code);
|
|
208
169
|
console.log(val);
|
|
209
170
|
if (val == null ? void 0 : val.isAvailable) {
|
|
210
|
-
|
|
171
|
+
productRef.current = val.productList;
|
|
172
|
+
dispatch({
|
|
173
|
+
type: "setService",
|
|
174
|
+
payload: {
|
|
175
|
+
value: val.productList,
|
|
176
|
+
edit: true
|
|
177
|
+
}
|
|
178
|
+
});
|
|
211
179
|
setCode("");
|
|
212
180
|
} else {
|
|
213
181
|
(0, import_materials.PisellToast)({
|
|
214
|
-
content:
|
|
182
|
+
content: import_utils.locales.getText("pisell2.text.goodpass.code-invalid")
|
|
215
183
|
});
|
|
216
184
|
}
|
|
217
185
|
};
|
|
218
|
-
const availableData = (0, import_react.useMemo)(() => {
|
|
219
|
-
if (!isBooking4Shop) return [];
|
|
220
|
-
const shopDiscount2 = pisellos.getModule("shopDiscount");
|
|
221
|
-
return discountList.filter((item) => !!item.isAvailable).map((discount) => {
|
|
222
|
-
return {
|
|
223
|
-
...discount,
|
|
224
|
-
isDisabled: discount.isDisabled || discount.isDisabledForProductUsed || disabled,
|
|
225
|
-
savedAmount: shopDiscount2.calcDiscountApplicableProductTotalPrice(discount)
|
|
226
|
-
};
|
|
227
|
-
});
|
|
228
|
-
}, [discountList, isBooking4Shop, disabled]);
|
|
229
186
|
if (!isBooking4Shop) return null;
|
|
230
|
-
const mixedSort = (val) => {
|
|
231
|
-
return [...val].sort((a, b) => {
|
|
232
|
-
return Number(b == null ? void 0 : b.isSelected) - Number(a == null ? void 0 : a.isSelected);
|
|
233
|
-
});
|
|
234
|
-
};
|
|
235
187
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-footer-voucher-container" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "voucher-title" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "voucher-title-left" }, import_utils.locales.getText("pisell2.text.goodpass")), /* @__PURE__ */ import_react.default.createElement(
|
|
236
188
|
"span",
|
|
237
189
|
{
|
|
@@ -262,8 +214,7 @@ var VoucherCard = (props) => {
|
|
|
262
214
|
import_materials.PisellGoodPassCard,
|
|
263
215
|
{
|
|
264
216
|
style: { width: "100%" },
|
|
265
|
-
dataSource:
|
|
266
|
-
mixedSort,
|
|
217
|
+
dataSource: availableData,
|
|
267
218
|
onChange: (val) => {
|
|
268
219
|
const shopDiscount2 = pisellos.getModule("shopDiscount");
|
|
269
220
|
const detail = shopDiscount2.setDiscountSelected({
|
|
@@ -271,7 +222,13 @@ var VoucherCard = (props) => {
|
|
|
271
222
|
isSelected: val.isSelected
|
|
272
223
|
});
|
|
273
224
|
console.log("setDiscountSelected:", detail);
|
|
274
|
-
|
|
225
|
+
dispatch({
|
|
226
|
+
type: "setService",
|
|
227
|
+
payload: {
|
|
228
|
+
edit: true,
|
|
229
|
+
value: detail.productList
|
|
230
|
+
}
|
|
231
|
+
});
|
|
275
232
|
}
|
|
276
233
|
}
|
|
277
234
|
) : null,
|
|
@@ -284,7 +241,6 @@ var VoucherCard = (props) => {
|
|
|
284
241
|
setCode((_a2 = e.target) == null ? void 0 : _a2.value);
|
|
285
242
|
},
|
|
286
243
|
size: "small",
|
|
287
|
-
allowClear: true,
|
|
288
244
|
placeholder: import_utils.locales.getText("pisell2.text.goodpass.enter-code")
|
|
289
245
|
}
|
|
290
246
|
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { size: "small", onClick: onScanCode, disabled: !code }, import_utils.locales.getText("pisell2.text.apply")))
|
|
@@ -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
|
+
}>;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from '../model';
|
|
1
3
|
export declare const walkInData: {
|
|
2
4
|
id: number;
|
|
3
5
|
nickname: string;
|
|
4
6
|
};
|
|
5
|
-
export declare const Provider: any, Context:
|
|
7
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
8
|
+
state: FormState;
|
|
9
|
+
} & {
|
|
10
|
+
dispatch: (params: {
|
|
11
|
+
type: string;
|
|
12
|
+
payload: any;
|
|
13
|
+
}) => void;
|
|
14
|
+
}>;
|
|
@@ -178,7 +178,7 @@ var handleChangeHolder = (products, currentItem, other) => {
|
|
|
178
178
|
...item,
|
|
179
179
|
_extend: {
|
|
180
180
|
...item._extend,
|
|
181
|
-
holder_id:
|
|
181
|
+
holder_id: other.id
|
|
182
182
|
}
|
|
183
183
|
};
|
|
184
184
|
}
|
|
@@ -514,8 +514,6 @@ var getGeneralParams = (item, state, isParallelResource) => {
|
|
|
514
514
|
actionText: import_utils2.locales.getText("page.booking.text.add-time"),
|
|
515
515
|
isMultipleResource: true,
|
|
516
516
|
multiResources,
|
|
517
|
-
holderMaxCount: item == null ? void 0 : item._extend.quantity,
|
|
518
|
-
holderMode: (item == null ? void 0 : item._extend.quantity) > 1 ? "multiple" : void 0,
|
|
519
517
|
isErrorHolder: getIsSubjectRequire(state),
|
|
520
518
|
addHolderButtonText: ((_c = (_b = formData == null ? void 0 : formData[0]) == null ? void 0 : _b.form) == null ? void 0 : _c.title) || "",
|
|
521
519
|
holder_id: (_d = item == null ? void 0 : item._extend) == null ? void 0 : _d.holder_id,
|
|
@@ -47,7 +47,7 @@ var import_utils2 = require("./utils");
|
|
|
47
47
|
var import_utils3 = require("../../../utils");
|
|
48
48
|
var import_utils4 = require("@pisell/utils");
|
|
49
49
|
var import_ahooks = require("ahooks");
|
|
50
|
-
var import_utils5 = require("
|
|
50
|
+
var import_utils5 = require("../../../info/service2/utils");
|
|
51
51
|
var shopList = [
|
|
52
52
|
2886,
|
|
53
53
|
4422,
|
|
@@ -202,7 +202,7 @@ var Info = (props) => {
|
|
|
202
202
|
session: isSession,
|
|
203
203
|
variant: true,
|
|
204
204
|
package: true,
|
|
205
|
-
number: (0, import_utils5.
|
|
205
|
+
number: (0, import_utils5.isNormalProductByDurationSchedule)(item)
|
|
206
206
|
},
|
|
207
207
|
is_eject: isEject ? 1 : 0,
|
|
208
208
|
isOnlySession,
|
|
@@ -51,7 +51,6 @@ var import_utils4 = require("../addService/utils");
|
|
|
51
51
|
var import_materials = require("@pisell/materials");
|
|
52
52
|
var import_utils5 = require("../../../info/utils");
|
|
53
53
|
var import_utils6 = require("../../../info/service2/utils");
|
|
54
|
-
var import_utils7 = require("../../../../ticketBooking/utils");
|
|
55
54
|
var submitLock = false;
|
|
56
55
|
var Info = (_, ref) => {
|
|
57
56
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F;
|
|
@@ -192,11 +191,9 @@ var Info = (_, ref) => {
|
|
|
192
191
|
}
|
|
193
192
|
_item._extend = _extend;
|
|
194
193
|
_item._time = (/* @__PURE__ */ new Date()).getTime();
|
|
195
|
-
_item._serviceKey = (0, import_utils7.genServiceKey)(_item);
|
|
196
194
|
let _id = _item == null ? void 0 : _item._id;
|
|
197
195
|
if (!_list.some((d) => d._id === _id)) {
|
|
198
|
-
|
|
199
|
-
_list = detail.list;
|
|
196
|
+
_list.push(_item);
|
|
200
197
|
} else {
|
|
201
198
|
if (isChangeTotal.current) {
|
|
202
199
|
delete _item.discount_list;
|
|
@@ -335,7 +332,7 @@ var Info = (_, ref) => {
|
|
|
335
332
|
session: isSession,
|
|
336
333
|
variant: true,
|
|
337
334
|
package: true,
|
|
338
|
-
number: (0,
|
|
335
|
+
number: (0, import_utils6.isNormalProductByDurationSchedule)(item)
|
|
339
336
|
},
|
|
340
337
|
isOS: isSession,
|
|
341
338
|
customer_id: (_e2 = (_d2 = state.client) == null ? void 0 : _d2.value) == null ? void 0 : _e2.id,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const getResourceTimeIsUsable: (item: any, cacheItem: any, resourceItem: any) => any;
|
|
2
|
-
export declare const getSumCapacity: ({ cacheItem }: any
|
|
2
|
+
export declare const getSumCapacity: ({ cacheItem }: any) => number;
|
|
3
3
|
/**
|
|
4
4
|
* @title: 查找是否有可用的time
|
|
5
5
|
* @description:
|
|
@@ -114,13 +114,12 @@ var getResourceTimeIsUsable = (item, cacheItem, resourceItem) => {
|
|
|
114
114
|
};
|
|
115
115
|
return time;
|
|
116
116
|
};
|
|
117
|
-
var getSumCapacity = ({ cacheItem }
|
|
118
|
-
var _a;
|
|
117
|
+
var getSumCapacity = ({ cacheItem }) => {
|
|
119
118
|
let sum = 0;
|
|
120
119
|
for (let item of cacheItem._extend.capacity || []) {
|
|
121
120
|
sum += item.value;
|
|
122
121
|
}
|
|
123
|
-
return sum
|
|
122
|
+
return sum;
|
|
124
123
|
};
|
|
125
124
|
var formatTimes = (resourceItem, cacheItem) => {
|
|
126
125
|
let usableTimes = [];
|
|
@@ -261,7 +261,6 @@ declare const _default: {
|
|
|
261
261
|
'pisell2.text.goodpass.code': string;
|
|
262
262
|
'pisell2.text.goodpass.enter-code': string;
|
|
263
263
|
'pisell2.text.goodpass.code-invalid': string;
|
|
264
|
-
'pisell2.text.goodpass.code-invalid-cart': string;
|
|
265
264
|
'pisell2.text.status.valid': string;
|
|
266
265
|
'pisell2.text.status.expired': string;
|
|
267
266
|
'pisell2.text.validity.expired': (str: string) => string;
|
|
@@ -532,7 +531,6 @@ declare const _default: {
|
|
|
532
531
|
'pisell2.text.goodpass.code': string;
|
|
533
532
|
'pisell2.text.goodpass.enter-code': string;
|
|
534
533
|
'pisell2.text.goodpass.code-invalid': string;
|
|
535
|
-
'pisell2.text.goodpass.code-invalid-cart': string;
|
|
536
534
|
'pisell2.text.status.valid': string;
|
|
537
535
|
'pisell2.text.status.expired': string;
|
|
538
536
|
'pisell2.text.validity.expired': (str: string) => string;
|
|
@@ -803,7 +801,6 @@ declare const _default: {
|
|
|
803
801
|
'pisell2.text.goodpass.code': string;
|
|
804
802
|
'pisell2.text.goodpass.enter-code': string;
|
|
805
803
|
'pisell2.text.goodpass.code-invalid': string;
|
|
806
|
-
'pisell2.text.goodpass.code-invalid-cart': string;
|
|
807
804
|
'pisell2.text.status.valid': string;
|
|
808
805
|
'pisell2.text.status.expired': string;
|
|
809
806
|
'pisell2.text.validity.expired': (str: string) => string;
|
|
@@ -311,13 +311,12 @@ var locales_default = {
|
|
|
311
311
|
"pisell2.text.send-form-reminder-tooltip": "Refresh forms",
|
|
312
312
|
"pisell2.text.send-form-reminder-refresh": "Forms refreshed successfully",
|
|
313
313
|
"pisell2.text.send-form-reminder-error-message": "Please select at least one reminder method",
|
|
314
|
-
"pisell2.text.goodpass": "
|
|
314
|
+
"pisell2.text.goodpass": "GoodPass",
|
|
315
315
|
"pisell2.text.goodpass.product-vouchers": "Product Vouchers",
|
|
316
316
|
"pisell2.text.goodpass.view-more": "View More",
|
|
317
317
|
"pisell2.text.goodpass.code": "Code",
|
|
318
318
|
"pisell2.text.goodpass.enter-code": "Enter Code",
|
|
319
319
|
"pisell2.text.goodpass.code-invalid": "Current code is invalid",
|
|
320
|
-
"pisell2.text.goodpass.code-invalid-cart": "No eligible items in the cart",
|
|
321
320
|
"pisell2.text.status.valid": "Valid",
|
|
322
321
|
"pisell2.text.status.expired": "Expired",
|
|
323
322
|
"pisell2.text.validity.expired": (str) => {
|
|
@@ -614,13 +613,12 @@ var locales_default = {
|
|
|
614
613
|
"pisell2.text.send-form-reminder-tooltip": "刷新表单",
|
|
615
614
|
"pisell2.text.send-form-reminder-refresh": "已刷新表单",
|
|
616
615
|
"pisell2.text.send-form-reminder-error-message": "请至少选择一种提醒方式",
|
|
617
|
-
"pisell2.text.goodpass": "
|
|
616
|
+
"pisell2.text.goodpass": "商品券",
|
|
618
617
|
"pisell2.text.goodpass.product-vouchers": "商品兑换券",
|
|
619
618
|
"pisell2.text.goodpass.view-more": "查看更多",
|
|
620
619
|
"pisell2.text.goodpass.code": "券码",
|
|
621
620
|
"pisell2.text.goodpass.enter-code": "请输入券码",
|
|
622
621
|
"pisell2.text.goodpass.code-invalid": "当前券码不可用",
|
|
623
|
-
"pisell2.text.goodpass.code-invalid-cart": "当前购物车中无可用商品",
|
|
624
622
|
"pisell2.text.status.valid": "有效",
|
|
625
623
|
"pisell2.text.status.expired": "已过期",
|
|
626
624
|
"pisell2.text.validity.expired": (str) => {
|
|
@@ -917,13 +915,12 @@ var locales_default = {
|
|
|
917
915
|
"pisell2.text.send-form-reminder-tooltip": "刷新表單",
|
|
918
916
|
"pisell2.text.send-form-reminder-refresh": "已刷新表單",
|
|
919
917
|
"pisell2.text.send-form-reminder-error-message": "請至少選擇一種提醒方式",
|
|
920
|
-
"pisell2.text.goodpass": "
|
|
918
|
+
"pisell2.text.goodpass": "商品券",
|
|
921
919
|
"pisell2.text.goodpass.product-vouchers": "商品兌換券",
|
|
922
920
|
"pisell2.text.goodpass.view-more": "查看更多",
|
|
923
921
|
"pisell2.text.goodpass.code": "券碼",
|
|
924
922
|
"pisell2.text.goodpass.enter-code": "請輸入券碼",
|
|
925
923
|
"pisell2.text.goodpass.code-invalid": "當前券碼不可用",
|
|
926
|
-
"pisell2.text.goodpass.code-invalid-cart": "當前購物車中無可用商品",
|
|
927
924
|
"pisell2.text.status.valid": "有效",
|
|
928
925
|
"pisell2.text.status.expired": "已過期",
|
|
929
926
|
"pisell2.text.validity.expired": (str) => {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
amountSymbol: string;
|
|
3
4
|
apis: {
|
|
@@ -104,4 +105,11 @@ export declare const walkInData: {
|
|
|
104
105
|
id: number;
|
|
105
106
|
nickname: string;
|
|
106
107
|
};
|
|
107
|
-
export declare const Provider: any, Context:
|
|
108
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
109
|
+
state: FormState;
|
|
110
|
+
} & {
|
|
111
|
+
dispatch: (params: {
|
|
112
|
+
type: string;
|
|
113
|
+
payload: any;
|
|
114
|
+
}) => void;
|
|
115
|
+
}>;
|