@pisell/private-materials 3.2.22 → 3.2.23
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 +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/appointmentBooking/assets/guests.svg +1 -0
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +83 -104
- package/es/components/appointmentBooking/components/Cart/Item/Total.js +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.js +32 -18
- package/es/components/appointmentBooking/components/Cart/Item/index.less +7 -4
- package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Content/index.js +11 -11
- package/es/components/appointmentBooking/components/Date/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Date/index.js +49 -32
- package/es/components/appointmentBooking/components/Date/index.less +5 -0
- package/es/components/appointmentBooking/components/Guest/index.js +8 -21
- package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.js +44 -7
- package/es/components/appointmentBooking/components/Resource/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Resource/index.js +28 -20
- package/es/components/appointmentBooking/components/Resource/index.less +5 -0
- package/es/components/appointmentBooking/components/Services/index.js +20 -9
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +47 -32
- package/es/components/appointmentBooking/components/TimeSlicing/index.less +4 -0
- package/es/components/appointmentBooking/components/Voucher/index.js +28 -18
- package/es/components/appointmentBooking/context.d.ts +2 -0
- package/es/components/appointmentBooking/context.js +7 -1
- package/es/components/appointmentBooking/hooks.d.ts +45 -9
- package/es/components/appointmentBooking/hooks.js +158 -121
- package/es/components/appointmentBooking/index.d.ts +0 -1
- package/es/components/appointmentBooking/index.js +12 -7
- package/es/components/appointmentBooking/locales.d.ts +30 -0
- package/es/components/appointmentBooking/locales.js +30 -0
- package/es/components/appointmentBooking/utils.d.ts +19 -0
- package/es/components/appointmentBooking/utils.js +68 -1
- package/es/components/booking/components/footer/utils.js +15 -15
- package/es/components/booking/components/voucher/index.d.ts +1 -1
- package/es/components/booking/components/voucher/index.js +28 -27
- package/es/components/booking/deposit/index.d.ts +0 -1
- package/es/components/booking/forms/single/index.d.ts +0 -1
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- package/es/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
- package/es/components/booking/hooks/useIsBooking4Shop.js +10 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/header/index.d.ts +0 -1
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/index.d.ts +0 -1
- package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/index.d.ts +0 -1
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/materiels/contacts/index.d.ts +0 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftpos/form/index.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftpos/index.d.ts +0 -1
- package/es/components/eftpos/pos.d.ts +0 -1
- package/es/components/eftpos/surcharge/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/app.d.ts +0 -1
- package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/es/components/eftposPay/component/fail/index.d.ts +0 -1
- package/es/components/eftposPay/component/fail/network.d.ts +0 -1
- package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/es/components/eftposPay/component/manual/index.d.ts +0 -1
- package/es/components/eftposPay/component/signature/index.d.ts +0 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.d.ts +0 -1
- package/es/components/eftposPay/pay.d.ts +0 -1
- package/es/components/eftposPay/store/index.d.ts +3 -3
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/es/components/eventBooking/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/products/index.d.ts +0 -1
- package/es/components/schedules/resources/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/schedules/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Cart/Product.js +3 -0
- package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.js +4 -3
- package/es/components/shoppingCart/type.d.ts +1 -0
- package/es/components/taxSelect/index.d.ts +0 -1
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/assets/guests.svg +1 -0
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +37 -27
- package/lib/components/appointmentBooking/components/Cart/Item/Total.js +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +23 -11
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +7 -4
- package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Content/index.js +3 -5
- package/lib/components/appointmentBooking/components/Date/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Date/index.js +53 -47
- package/lib/components/appointmentBooking/components/Date/index.less +5 -0
- package/lib/components/appointmentBooking/components/Guest/index.js +6 -5
- package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.js +25 -3
- package/lib/components/appointmentBooking/components/Resource/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Resource/index.js +16 -17
- package/lib/components/appointmentBooking/components/Resource/index.less +5 -0
- package/lib/components/appointmentBooking/components/Services/index.js +21 -2
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +23 -21
- package/lib/components/appointmentBooking/components/TimeSlicing/index.less +4 -0
- package/lib/components/appointmentBooking/components/Voucher/index.js +28 -16
- package/lib/components/appointmentBooking/context.d.ts +2 -0
- package/lib/components/appointmentBooking/context.js +4 -1
- package/lib/components/appointmentBooking/hooks.d.ts +45 -9
- package/lib/components/appointmentBooking/hooks.js +28 -41
- package/lib/components/appointmentBooking/index.d.ts +0 -1
- package/lib/components/appointmentBooking/index.js +11 -7
- package/lib/components/appointmentBooking/locales.d.ts +30 -0
- package/lib/components/appointmentBooking/locales.js +30 -0
- package/lib/components/appointmentBooking/utils.d.ts +19 -0
- package/lib/components/appointmentBooking/utils.js +39 -1
- package/lib/components/booking/components/footer/utils.js +1 -15
- package/lib/components/booking/components/voucher/index.d.ts +1 -1
- package/lib/components/booking/components/voucher/index.js +28 -17
- package/lib/components/booking/deposit/index.d.ts +0 -1
- package/lib/components/booking/forms/single/index.d.ts +0 -1
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
- package/lib/components/booking/hooks/useIsBooking4Shop.js +51 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/header/index.d.ts +0 -1
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/materiels/contacts/index.d.ts +0 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftpos/form/index.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftpos/index.d.ts +0 -1
- package/lib/components/eftpos/pos.d.ts +0 -1
- package/lib/components/eftpos/surcharge/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/app.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/network.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
- package/lib/components/eftposPay/component/signature/index.d.ts +0 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.d.ts +0 -1
- package/lib/components/eftposPay/pay.d.ts +0 -1
- package/lib/components/eftposPay/store/index.d.ts +3 -3
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/lib/components/eventBooking/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/products/index.d.ts +0 -1
- package/lib/components/schedules/resources/index.d.ts +0 -1
- package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/schedules/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +1 -0
- package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.js +3 -2
- package/lib/components/shoppingCart/type.d.ts +1 -0
- package/lib/components/taxSelect/index.d.ts +0 -1
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/package.json +4 -4
|
@@ -13,11 +13,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
13
13
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
14
14
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
15
15
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
16
|
+
import { useState, useEffect } from 'react';
|
|
16
17
|
import { usePisellOS } from "../../hooks/useEngineContext";
|
|
17
18
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
18
|
-
import { getUniqueId } from "@pisell/utils";
|
|
19
19
|
import { sortResources } from "./utils";
|
|
20
|
-
import { useState, useEffect } from 'react';
|
|
21
20
|
import { useAppointmentBookingContext } from "./context";
|
|
22
21
|
export var useAppointmentBooking = function useAppointmentBooking() {
|
|
23
22
|
var pisellOS = usePisellOS();
|
|
@@ -27,6 +26,14 @@ export var useShopDiscount = function useShopDiscount() {
|
|
|
27
26
|
var pisellOS = usePisellOS();
|
|
28
27
|
return pisellOS.getModule('shopDiscount');
|
|
29
28
|
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @title: 监听步骤发生变化
|
|
32
|
+
* @description:
|
|
33
|
+
* @return {*}
|
|
34
|
+
* @Author: WangHan
|
|
35
|
+
* @Date: 2025-04-15 11:11
|
|
36
|
+
*/
|
|
30
37
|
export var useAppointmentBookingStep = function useAppointmentBookingStep() {
|
|
31
38
|
var _appointmentBooking$s;
|
|
32
39
|
var pisellOS = usePisellOS();
|
|
@@ -34,12 +41,7 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
|
|
|
34
41
|
appointmentBooking = _useAppointmentBookin.appointmentBooking,
|
|
35
42
|
setCurrentStep = _useAppointmentBookin.setCurrentStep,
|
|
36
43
|
setIsLastStep = _useAppointmentBookin.setIsLastStep;
|
|
37
|
-
// const appointmentBooking = useAppointmentBooking();
|
|
38
44
|
var stepList = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$s = appointmentBooking.store) === null || _appointmentBooking$s === void 0 || (_appointmentBooking$s = _appointmentBooking$s.step) === null || _appointmentBooking$s === void 0 || (_appointmentBooking$s = _appointmentBooking$s.store) === null || _appointmentBooking$s === void 0 ? void 0 : _appointmentBooking$s.stepList) || [];
|
|
39
|
-
|
|
40
|
-
// const [currentStep, setCurrentStep] = useState<any>(appointmentBooking.getCurrentStep());
|
|
41
|
-
// const [isLastStep, setIsLastStep] = useState<any>(false)
|
|
42
|
-
|
|
43
45
|
useEffect(function () {
|
|
44
46
|
pisellOS.effects.on('appointmentBooking_step:changed', /*#__PURE__*/function () {
|
|
45
47
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(res) {
|
|
@@ -64,75 +66,102 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
|
|
|
64
66
|
}());
|
|
65
67
|
}, []);
|
|
66
68
|
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @title: 获取商品数据
|
|
72
|
+
* @description:
|
|
73
|
+
* @return {*}
|
|
74
|
+
* @Author: WangHan
|
|
75
|
+
* @Date: 2025-04-15 11:12
|
|
76
|
+
*/
|
|
67
77
|
export var useAppointmentBookingProduct = function useAppointmentBookingProduct() {
|
|
68
78
|
var _useAppointmentBookin2 = useAppointmentBookingContext(),
|
|
69
79
|
appointmentBooking = _useAppointmentBookin2.appointmentBooking,
|
|
70
80
|
setProducts = _useAppointmentBookin2.setProducts;
|
|
71
|
-
// const [products, setProducts] = useState<any>([]);
|
|
72
81
|
var productModuleParams = appointmentBooking.otherParams.productModuleParams;
|
|
73
82
|
useEffect(function () {
|
|
74
83
|
appointmentBooking.loadProducts(productModuleParams).then(function (res) {
|
|
75
|
-
console.log(res, 'loadProductsloadProducts');
|
|
76
84
|
setProducts(res || []);
|
|
77
85
|
});
|
|
78
86
|
}, []);
|
|
79
87
|
};
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @title: 更新购物车数据
|
|
91
|
+
* @description:
|
|
92
|
+
* @return {*}
|
|
93
|
+
* @Author: WangHan
|
|
94
|
+
* @Date: 2025-04-15 11:12
|
|
95
|
+
*/
|
|
80
96
|
export var useAppointmentBookingCart = function useAppointmentBookingCart() {
|
|
81
|
-
var _appointmentBooking$s2;
|
|
82
97
|
var pisellOS = usePisellOS();
|
|
83
98
|
var _useAppointmentBookin3 = useAppointmentBookingContext(),
|
|
84
99
|
appointmentBooking = _useAppointmentBookin3.appointmentBooking,
|
|
85
100
|
setCarts = _useAppointmentBookin3.setCarts,
|
|
86
101
|
setSummary = _useAppointmentBookin3.setSummary;
|
|
87
|
-
var
|
|
102
|
+
var getCartAndSummary = /*#__PURE__*/function () {
|
|
103
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
104
|
+
var carts, summary;
|
|
105
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
106
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
107
|
+
case 0:
|
|
108
|
+
_context2.next = 2;
|
|
109
|
+
return appointmentBooking.getCart();
|
|
110
|
+
case 2:
|
|
111
|
+
carts = _context2.sent;
|
|
112
|
+
setCarts(carts || []);
|
|
113
|
+
_context2.next = 6;
|
|
114
|
+
return appointmentBooking.getSummary();
|
|
115
|
+
case 6:
|
|
116
|
+
summary = _context2.sent;
|
|
117
|
+
setSummary(summary || {});
|
|
118
|
+
console.log(carts, summary, 'appointmentBooking_cart:changed');
|
|
119
|
+
case 9:
|
|
120
|
+
case "end":
|
|
121
|
+
return _context2.stop();
|
|
122
|
+
}
|
|
123
|
+
}, _callee2);
|
|
124
|
+
}));
|
|
125
|
+
return function getCartAndSummary() {
|
|
126
|
+
return _ref2.apply(this, arguments);
|
|
127
|
+
};
|
|
128
|
+
}();
|
|
88
129
|
useEffect(function () {
|
|
89
|
-
|
|
90
|
-
pisellOS.effects.on('appointmentBooking_cart:changed', /*#__PURE__*/function () {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
_context2.next = 6;
|
|
102
|
-
return appointmentBooking.getSummary();
|
|
103
|
-
case 6:
|
|
104
|
-
summary = _context2.sent;
|
|
105
|
-
setSummary(summary || {});
|
|
106
|
-
console.log(carts, summary, 'appointmentBooking_cart:changed');
|
|
107
|
-
case 9:
|
|
108
|
-
case "end":
|
|
109
|
-
return _context2.stop();
|
|
110
|
-
}
|
|
111
|
-
}, _callee2);
|
|
112
|
-
}));
|
|
113
|
-
return function (_x2) {
|
|
114
|
-
return _ref2.apply(this, arguments);
|
|
115
|
-
};
|
|
116
|
-
}());
|
|
117
|
-
appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$g = appointmentBooking.getCart) === null || _appointmentBooking$g === void 0 || _appointmentBooking$g.call(appointmentBooking).then(function (data) {
|
|
118
|
-
setCarts(data || []);
|
|
119
|
-
});
|
|
130
|
+
getCartAndSummary();
|
|
131
|
+
pisellOS.effects.on('appointmentBooking_cart:changed', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
132
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
133
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
134
|
+
case 0:
|
|
135
|
+
getCartAndSummary();
|
|
136
|
+
case 1:
|
|
137
|
+
case "end":
|
|
138
|
+
return _context3.stop();
|
|
139
|
+
}
|
|
140
|
+
}, _callee3);
|
|
141
|
+
})));
|
|
120
142
|
}, []);
|
|
121
|
-
return {
|
|
122
|
-
cart: cart
|
|
123
|
-
};
|
|
124
143
|
};
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* @title: 获取登录状态
|
|
147
|
+
* @description:
|
|
148
|
+
* @return {*}
|
|
149
|
+
* @Author: WangHan
|
|
150
|
+
* @Date: 2025-04-15 11:14
|
|
151
|
+
*/
|
|
125
152
|
export var useAppointmentBookingLogin = function useAppointmentBookingLogin() {
|
|
126
153
|
var _utils$token, _utils$token$get;
|
|
127
154
|
var context = useEngineContext();
|
|
128
155
|
var utils = context.appHelper.utils || {};
|
|
129
156
|
var isLogin = !!(utils !== null && utils !== void 0 && (_utils$token = utils.token) !== null && _utils$token !== void 0 && (_utils$token$get = _utils$token.get) !== null && _utils$token$get !== void 0 && _utils$token$get.call(_utils$token));
|
|
130
157
|
var openLoginModal = function openLoginModal(params) {
|
|
131
|
-
var
|
|
132
|
-
callback =
|
|
158
|
+
var _ref4 = params || {},
|
|
159
|
+
callback = _ref4.callback;
|
|
133
160
|
utils.action({
|
|
134
161
|
type: 'pisell1.login',
|
|
135
|
-
data: {
|
|
162
|
+
data: {
|
|
163
|
+
type: 'plugin'
|
|
164
|
+
},
|
|
136
165
|
callback: callback
|
|
137
166
|
});
|
|
138
167
|
};
|
|
@@ -141,55 +170,77 @@ export var useAppointmentBookingLogin = function useAppointmentBookingLogin() {
|
|
|
141
170
|
openLoginModal: openLoginModal
|
|
142
171
|
};
|
|
143
172
|
};
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @title: 获取账户
|
|
176
|
+
* @description:
|
|
177
|
+
* @return {*}
|
|
178
|
+
* @Author: WangHan
|
|
179
|
+
* @Date: 2025-04-15 11:15
|
|
180
|
+
*/
|
|
144
181
|
export var useAppointmentBookingAccount = function useAppointmentBookingAccount() {
|
|
145
|
-
var _utils$getStore$getSt, _userInfo, _userInfo2, _userInfo3, _currentUserName, _userInfo4, _userInfo5;
|
|
146
182
|
var pisellOS = usePisellOS();
|
|
147
|
-
var context = useEngineContext();
|
|
148
|
-
var utils = context.appHelper.utils || {};
|
|
149
183
|
var appointmentBooking = useAppointmentBooking();
|
|
150
184
|
var _useState = useState([]),
|
|
151
185
|
_useState2 = _slicedToArray(_useState, 2),
|
|
152
186
|
accountLists = _useState2[0],
|
|
153
187
|
setAccountLists = _useState2[1];
|
|
154
|
-
var
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
188
|
+
var getAccountLists = /*#__PURE__*/function () {
|
|
189
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
190
|
+
var _appointmentBooking$s2;
|
|
191
|
+
var data;
|
|
192
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
193
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
194
|
+
case 0:
|
|
195
|
+
_context4.next = 2;
|
|
196
|
+
return appointmentBooking.getAccounts();
|
|
197
|
+
case 2:
|
|
198
|
+
data = _context4.sent;
|
|
199
|
+
setAccountLists(data || []);
|
|
200
|
+
console.log('currentUser4455777', appointmentBooking, (_appointmentBooking$s2 = appointmentBooking.store) === null || _appointmentBooking$s2 === void 0 || (_appointmentBooking$s2 = _appointmentBooking$s2.accountList) === null || _appointmentBooking$s2 === void 0 || (_appointmentBooking$s2 = _appointmentBooking$s2.store) === null || _appointmentBooking$s2 === void 0 ? void 0 : _appointmentBooking$s2.accountList, data);
|
|
201
|
+
case 5:
|
|
202
|
+
case "end":
|
|
203
|
+
return _context4.stop();
|
|
204
|
+
}
|
|
205
|
+
}, _callee4);
|
|
206
|
+
}));
|
|
207
|
+
return function getAccountLists() {
|
|
208
|
+
return _ref5.apply(this, arguments);
|
|
209
|
+
};
|
|
210
|
+
}();
|
|
163
211
|
useEffect(function () {
|
|
164
212
|
pisellOS.effects.on('appointmentBooking_accountList:changed', /*#__PURE__*/function () {
|
|
165
|
-
var
|
|
166
|
-
return _regeneratorRuntime().wrap(function
|
|
167
|
-
while (1) switch (
|
|
213
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(res) {
|
|
214
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
215
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
168
216
|
case 0:
|
|
169
217
|
if (res.path === 'accounts') {
|
|
170
|
-
|
|
171
|
-
setAccountLists(data || []);
|
|
172
|
-
});
|
|
218
|
+
getAccountLists();
|
|
173
219
|
}
|
|
174
220
|
case 1:
|
|
175
221
|
case "end":
|
|
176
|
-
return
|
|
222
|
+
return _context5.stop();
|
|
177
223
|
}
|
|
178
|
-
},
|
|
224
|
+
}, _callee5);
|
|
179
225
|
}));
|
|
180
|
-
return function (
|
|
181
|
-
return
|
|
226
|
+
return function (_x2) {
|
|
227
|
+
return _ref6.apply(this, arguments);
|
|
182
228
|
};
|
|
183
229
|
}());
|
|
184
|
-
|
|
185
|
-
setAccountLists(data || []);
|
|
186
|
-
});
|
|
230
|
+
getAccountLists();
|
|
187
231
|
}, []);
|
|
188
232
|
return {
|
|
189
|
-
currentUser: currentUser,
|
|
190
233
|
accountLists: accountLists
|
|
191
234
|
};
|
|
192
235
|
};
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* @title: 获取资源数据
|
|
239
|
+
* @description:
|
|
240
|
+
* @return {*}
|
|
241
|
+
* @Author: WangHan
|
|
242
|
+
* @Date: 2025-04-15 11:29
|
|
243
|
+
*/
|
|
193
244
|
export var useAppointmentBookingResource = function useAppointmentBookingResource() {
|
|
194
245
|
var _useAppointmentBookin4 = useAppointmentBookingContext(),
|
|
195
246
|
appointmentBooking = _useAppointmentBookin4.appointmentBooking,
|
|
@@ -197,80 +248,66 @@ export var useAppointmentBookingResource = function useAppointmentBookingResourc
|
|
|
197
248
|
setTimes = _useAppointmentBookin4.setTimes,
|
|
198
249
|
setResourceOtherParams = _useAppointmentBookin4.setResourceOtherParams,
|
|
199
250
|
resourceOtherParams = _useAppointmentBookin4.resourceOtherParams;
|
|
200
|
-
var
|
|
201
|
-
resourceSort =
|
|
202
|
-
console.log(appointmentBooking, 'appointmentBooking22');
|
|
251
|
+
var _ref7 = (appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.otherParams) || {},
|
|
252
|
+
resourceSort = _ref7.resourceSort;
|
|
203
253
|
|
|
204
254
|
// 设置时间切片
|
|
205
255
|
var getResourceTimeSlot = /*#__PURE__*/function () {
|
|
206
|
-
var
|
|
256
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
|
|
207
257
|
var data;
|
|
208
|
-
return _regeneratorRuntime().wrap(function
|
|
209
|
-
while (1) switch (
|
|
258
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
259
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
210
260
|
case 0:
|
|
211
|
-
|
|
212
|
-
return appointmentBooking.
|
|
261
|
+
_context6.next = 2;
|
|
262
|
+
return appointmentBooking.getTimeSlotByAllResources(params);
|
|
213
263
|
case 2:
|
|
214
|
-
data =
|
|
264
|
+
data = _context6.sent;
|
|
215
265
|
setTimes(data || []);
|
|
216
266
|
case 4:
|
|
217
267
|
case "end":
|
|
218
|
-
return
|
|
268
|
+
return _context6.stop();
|
|
219
269
|
}
|
|
220
|
-
},
|
|
270
|
+
}, _callee6);
|
|
221
271
|
}));
|
|
222
|
-
return function getResourceTimeSlot(
|
|
223
|
-
return
|
|
272
|
+
return function getResourceTimeSlot(_x3) {
|
|
273
|
+
return _ref8.apply(this, arguments);
|
|
224
274
|
};
|
|
225
275
|
}();
|
|
226
276
|
|
|
227
277
|
// 设置资源列表
|
|
228
|
-
var getResourceList =
|
|
229
|
-
var
|
|
230
|
-
|
|
231
|
-
return
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
});
|
|
240
|
-
setResources(resources || []);
|
|
241
|
-
return _context5.abrupt("return", resources);
|
|
242
|
-
case 4:
|
|
243
|
-
case "end":
|
|
244
|
-
return _context5.stop();
|
|
245
|
-
}
|
|
246
|
-
}, _callee5);
|
|
247
|
-
}));
|
|
248
|
-
return function getResourceList() {
|
|
249
|
-
return _ref7.apply(this, arguments);
|
|
250
|
-
};
|
|
251
|
-
}();
|
|
278
|
+
var getResourceList = function getResourceList() {
|
|
279
|
+
var resources = appointmentBooking.getResourcesList();
|
|
280
|
+
resources = resources.map(function (item) {
|
|
281
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
282
|
+
resources: sortResources((item === null || item === void 0 ? void 0 : item.resources) || [], resourceSort)
|
|
283
|
+
});
|
|
284
|
+
});
|
|
285
|
+
setResources(resources || []);
|
|
286
|
+
console.log(resources, 'resourcesresources');
|
|
287
|
+
return resources;
|
|
288
|
+
};
|
|
252
289
|
|
|
253
290
|
// 获取自动分配
|
|
254
291
|
var autoSelectAllProductResources = /*#__PURE__*/function () {
|
|
255
|
-
var
|
|
292
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(code) {
|
|
256
293
|
var res;
|
|
257
|
-
return _regeneratorRuntime().wrap(function
|
|
258
|
-
while (1) switch (
|
|
294
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
295
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
259
296
|
case 0:
|
|
260
|
-
|
|
297
|
+
_context7.next = 2;
|
|
261
298
|
return appointmentBooking.autoSelectAllProductResources(code);
|
|
262
299
|
case 2:
|
|
263
|
-
res =
|
|
264
|
-
console.log(res, 'autoSelectAllProductResources');
|
|
300
|
+
res = _context7.sent;
|
|
265
301
|
setResourceOtherParams(_objectSpread(_objectSpread({}, resourceOtherParams), res));
|
|
302
|
+
return _context7.abrupt("return", res);
|
|
266
303
|
case 5:
|
|
267
304
|
case "end":
|
|
268
|
-
return
|
|
305
|
+
return _context7.stop();
|
|
269
306
|
}
|
|
270
|
-
},
|
|
307
|
+
}, _callee7);
|
|
271
308
|
}));
|
|
272
|
-
return function autoSelectAllProductResources(
|
|
273
|
-
return
|
|
309
|
+
return function autoSelectAllProductResources(_x4) {
|
|
310
|
+
return _ref9.apply(this, arguments);
|
|
274
311
|
};
|
|
275
312
|
}();
|
|
276
313
|
return {
|
|
@@ -1,22 +1,27 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
|
-
import Content from "./components/Content";
|
|
3
2
|
import { isMobile, locales } from '@pisell/utils';
|
|
4
3
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
5
|
-
import "./index.less";
|
|
6
|
-
import localeTexts from "./locales";
|
|
7
4
|
import { AppointmentBookingProvider } from "./context";
|
|
5
|
+
import Content from "./components/Content";
|
|
6
|
+
import localeTexts from "./locales";
|
|
8
7
|
import { useAppointmentBooking, useAppointmentBookingAccount } from "./hooks";
|
|
8
|
+
import "./index.less";
|
|
9
9
|
var AppointmentBooking = function AppointmentBooking() {
|
|
10
10
|
var _utils$storage;
|
|
11
11
|
var context = useEngineContext();
|
|
12
|
-
var appointmentBooking = useAppointmentBooking();
|
|
13
|
-
var appointmentBookingAccount = useAppointmentBookingAccount();
|
|
14
12
|
var utils = context.appHelper.utils || {};
|
|
15
13
|
locales.init(localeTexts, (utils === null || utils === void 0 || (_utils$storage = utils.storage) === null || _utils$storage === void 0 ? void 0 : _utils$storage.get('umi_locale')) || 'en');
|
|
14
|
+
var appointmentBooking = useAppointmentBooking();
|
|
15
|
+
var _useAppointmentBookin = useAppointmentBookingAccount(),
|
|
16
|
+
accountLists = _useAppointmentBookin.accountLists;
|
|
17
|
+
console.log(appointmentBooking, 'wh97886786currentUser4455777');
|
|
16
18
|
useEffect(function () {
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
+
var res = appointmentBooking.getAccounts();
|
|
20
|
+
console.log(res, 'wh98867');
|
|
19
21
|
}, []);
|
|
22
|
+
useEffect(function () {
|
|
23
|
+
console.log(accountLists, 'wh98867555');
|
|
24
|
+
}, [accountLists]);
|
|
20
25
|
return /*#__PURE__*/React.createElement("div", {
|
|
21
26
|
className: "parallel-booking-wrap ".concat(isMobile() ? 'parallel-booking-mobile-wrap' : '')
|
|
22
27
|
}, /*#__PURE__*/React.createElement(AppointmentBookingProvider, null, /*#__PURE__*/React.createElement(Content, null)));
|
|
@@ -70,11 +70,21 @@ declare const _default: {
|
|
|
70
70
|
'pisell2.event.capacity.limit.reached.title': string;
|
|
71
71
|
'pisell2.event.capacity.limit.reached.tip': string;
|
|
72
72
|
'pisell2.appointment.booking.empty.service': string;
|
|
73
|
+
'pisell2.appointment.booking.empty.time': string;
|
|
73
74
|
'pisell2.appointment.service.title': (val: number) => string;
|
|
74
75
|
'pisell2.appointment.add.guest': string;
|
|
75
76
|
'pisell2.appointment.edit.service': string;
|
|
76
77
|
'pisell2.appointment.remove.guest': string;
|
|
77
78
|
'pisell2.appointment.no.available.service': string;
|
|
79
|
+
'pisell2.appointment.max.guest': string;
|
|
80
|
+
'pisell2.appointment.no.available.time': string;
|
|
81
|
+
'pisell2.appointment.monday': string;
|
|
82
|
+
'pisell2.appointment.tuesday': string;
|
|
83
|
+
'pisell2.appointment.wednesday': string;
|
|
84
|
+
'pisell2.appointment.thursday': string;
|
|
85
|
+
'pisell2.appointment.friday': string;
|
|
86
|
+
'pisell2.appointment.saturday': string;
|
|
87
|
+
'pisell2.appointment.sunday': string;
|
|
78
88
|
'pisell2.text.apply': string;
|
|
79
89
|
'pisell2.text.goodpass': string;
|
|
80
90
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -156,11 +166,21 @@ declare const _default: {
|
|
|
156
166
|
'pisell2.event.capacity.limit.reached.title': string;
|
|
157
167
|
'pisell2.event.capacity.limit.reached.tip': string;
|
|
158
168
|
'pisell2.appointment.booking.empty.service': string;
|
|
169
|
+
'pisell2.appointment.booking.empty.time': string;
|
|
159
170
|
'pisell2.appointment.service.title': (val: number) => string;
|
|
160
171
|
'pisell2.appointment.add.guest': string;
|
|
161
172
|
'pisell2.appointment.edit.service': string;
|
|
162
173
|
'pisell2.appointment.remove.guest': string;
|
|
163
174
|
'pisell2.appointment.no.available.service': string;
|
|
175
|
+
'pisell2.appointment.max.guest': string;
|
|
176
|
+
'pisell2.appointment.no.available.time': string;
|
|
177
|
+
'pisell2.appointment.monday': string;
|
|
178
|
+
'pisell2.appointment.tuesday': string;
|
|
179
|
+
'pisell2.appointment.wednesday': string;
|
|
180
|
+
'pisell2.appointment.thursday': string;
|
|
181
|
+
'pisell2.appointment.friday': string;
|
|
182
|
+
'pisell2.appointment.saturday': string;
|
|
183
|
+
'pisell2.appointment.sunday': string;
|
|
164
184
|
'pisell2.text.apply': string;
|
|
165
185
|
'pisell2.text.goodpass': string;
|
|
166
186
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -242,11 +262,21 @@ declare const _default: {
|
|
|
242
262
|
'pisell2.event.capacity.limit.reached.title': string;
|
|
243
263
|
'pisell2.event.capacity.limit.reached.tip': string;
|
|
244
264
|
'pisell2.appointment.booking.empty.service': string;
|
|
265
|
+
'pisell2.appointment.booking.empty.time': string;
|
|
245
266
|
'pisell2.appointment.service.title': (val: number) => string;
|
|
246
267
|
'pisell2.appointment.add.guest': string;
|
|
247
268
|
'pisell2.appointment.edit.service': string;
|
|
248
269
|
'pisell2.appointment.remove.guest': string;
|
|
249
270
|
'pisell2.appointment.no.available.service': string;
|
|
271
|
+
'pisell2.appointment.max.guest': string;
|
|
272
|
+
'pisell2.appointment.no.available.time': string;
|
|
273
|
+
'pisell2.appointment.monday': string;
|
|
274
|
+
'pisell2.appointment.tuesday': string;
|
|
275
|
+
'pisell2.appointment.wednesday': string;
|
|
276
|
+
'pisell2.appointment.thursday': string;
|
|
277
|
+
'pisell2.appointment.friday': string;
|
|
278
|
+
'pisell2.appointment.saturday': string;
|
|
279
|
+
'pisell2.appointment.sunday': string;
|
|
250
280
|
'pisell2.text.apply': string;
|
|
251
281
|
'pisell2.text.goodpass': string;
|
|
252
282
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -82,6 +82,7 @@ export default {
|
|
|
82
82
|
'pisell2.event.capacity.limit.reached.title': 'Capacity limit reached',
|
|
83
83
|
'pisell2.event.capacity.limit.reached.tip': 'One or more events in your cart are no longer available due to full capacity. Please remove unavailable events from your cart to complete checkout.',
|
|
84
84
|
'pisell2.appointment.booking.empty.service': 'No service',
|
|
85
|
+
'pisell2.appointment.booking.empty.time': 'No time',
|
|
85
86
|
'pisell2.appointment.service.title': function pisell2AppointmentServiceTitle(val) {
|
|
86
87
|
return "".concat(val, " ").concat(val > 1 ? 'services' : 'service');
|
|
87
88
|
},
|
|
@@ -89,6 +90,15 @@ export default {
|
|
|
89
90
|
'pisell2.appointment.edit.service': "Edit services",
|
|
90
91
|
'pisell2.appointment.remove.guest': "Remove guest",
|
|
91
92
|
'pisell2.appointment.no.available.service': "No available times for this service. Please choose another.",
|
|
93
|
+
'pisell2.appointment.max.guest': "Book a group appointment for up to 6 guests",
|
|
94
|
+
'pisell2.appointment.no.available.time': "No availability Try booking different time",
|
|
95
|
+
'pisell2.appointment.monday': 'Mon',
|
|
96
|
+
'pisell2.appointment.tuesday': 'Tue',
|
|
97
|
+
'pisell2.appointment.wednesday': 'Wed',
|
|
98
|
+
'pisell2.appointment.thursday': 'Thu',
|
|
99
|
+
'pisell2.appointment.friday': 'Fri',
|
|
100
|
+
'pisell2.appointment.saturday': 'Sat',
|
|
101
|
+
'pisell2.appointment.sunday': 'Sun',
|
|
92
102
|
'pisell2.text.apply': 'Apply',
|
|
93
103
|
'pisell2.text.goodpass': "GoodPass",
|
|
94
104
|
'pisell2.text.goodpass.product-vouchers': "Product Vouchers",
|
|
@@ -182,6 +192,7 @@ export default {
|
|
|
182
192
|
'pisell2.event.capacity.limit.reached.title': '活动名额已满',
|
|
183
193
|
'pisell2.event.capacity.limit.reached.tip': '购物车中有一个或多个活动已达预约上限,请将已满额的活动从购物车中移除后再完成结算。',
|
|
184
194
|
'pisell2.appointment.booking.empty.service': '暂无服务',
|
|
195
|
+
'pisell2.appointment.booking.empty.time': '暂无时间',
|
|
185
196
|
'pisell2.appointment.service.title': function pisell2AppointmentServiceTitle(val) {
|
|
186
197
|
return "".concat(val, "\u4E2A\u670D\u52A1");
|
|
187
198
|
},
|
|
@@ -189,6 +200,15 @@ export default {
|
|
|
189
200
|
'pisell2.appointment.edit.service': "编辑服务",
|
|
190
201
|
'pisell2.appointment.remove.guest': "移除预约人",
|
|
191
202
|
'pisell2.appointment.no.available.service': "此服务无可用时间,请选择其他服务。",
|
|
203
|
+
'pisell2.appointment.max.guest': "最多为6人预约",
|
|
204
|
+
'pisell2.appointment.no.available.time': "无可用 请选择其他时间",
|
|
205
|
+
'pisell2.appointment.monday': '周一',
|
|
206
|
+
'pisell2.appointment.tuesday': '周二',
|
|
207
|
+
'pisell2.appointment.wednesday': '周三',
|
|
208
|
+
'pisell2.appointment.thursday': '周四',
|
|
209
|
+
'pisell2.appointment.friday': '周五',
|
|
210
|
+
'pisell2.appointment.saturday': '周六',
|
|
211
|
+
'pisell2.appointment.sunday': '周日',
|
|
192
212
|
'pisell2.text.apply': '应用',
|
|
193
213
|
'pisell2.text.goodpass': "商品券",
|
|
194
214
|
'pisell2.text.goodpass.product-vouchers': "商品兑换券",
|
|
@@ -282,6 +302,7 @@ export default {
|
|
|
282
302
|
'pisell2.event.capacity.limit.reached.title': '活動名額已滿',
|
|
283
303
|
'pisell2.event.capacity.limit.reached.tip': '購物車中有一個或多個活動已達預約上限,請將已滿額的活動從購物車中移除後再完成結算。',
|
|
284
304
|
'pisell2.appointment.booking.empty.service': '暫無服務',
|
|
305
|
+
'pisell2.appointment.booking.empty.time': '暫無時間',
|
|
285
306
|
'pisell2.appointment.service.title': function pisell2AppointmentServiceTitle(val) {
|
|
286
307
|
return "".concat(val, "\u4E2A\u670D\u52D9");
|
|
287
308
|
},
|
|
@@ -289,6 +310,15 @@ export default {
|
|
|
289
310
|
'pisell2.appointment.edit.service': "編輯服務",
|
|
290
311
|
'pisell2.appointment.remove.guest': "移除預約人",
|
|
291
312
|
'pisell2.appointment.no.available.service': "此服务无可用时间,请选择其他服务。",
|
|
313
|
+
'pisell2.appointment.max.guest': "最多为6人预约",
|
|
314
|
+
'pisell2.appointment.no.available.time': "無可用 請選擇其他時間",
|
|
315
|
+
'pisell2.appointment.monday': '周壹',
|
|
316
|
+
'pisell2.appointment.tuesday': '周二',
|
|
317
|
+
'pisell2.appointment.wednesday': '周三',
|
|
318
|
+
'pisell2.appointment.thursday': '周四',
|
|
319
|
+
'pisell2.appointment.friday': '周五',
|
|
320
|
+
'pisell2.appointment.saturday': '周六',
|
|
321
|
+
'pisell2.appointment.sunday': '周日',
|
|
292
322
|
'pisell2.text.apply': '應用',
|
|
293
323
|
'pisell2.text.goodpass': "商品券",
|
|
294
324
|
'pisell2.text.goodpass.product-vouchers': "商品兌換券",
|
|
@@ -56,3 +56,22 @@ export declare const formatCarts: (data: any[], resources: any[]) => any[];
|
|
|
56
56
|
* @Date: 2025-04-14 11:16
|
|
57
57
|
*/
|
|
58
58
|
export declare const sortResources: (resources: any[], resourceSort: any[]) => any[] | undefined;
|
|
59
|
+
export declare const getMeAccount: (val: any[]) => any;
|
|
60
|
+
export declare const formatCustomer: (val: any) => {
|
|
61
|
+
id: any;
|
|
62
|
+
username: string;
|
|
63
|
+
};
|
|
64
|
+
export declare const formatCurrentUser: () => {
|
|
65
|
+
id: any;
|
|
66
|
+
username: string;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* @title: 检查是否有空的账户
|
|
70
|
+
* @description:
|
|
71
|
+
* @param {any} carts
|
|
72
|
+
* @param {any} accounts
|
|
73
|
+
* @return {*}
|
|
74
|
+
* @Author: WangHan
|
|
75
|
+
* @Date: 2025-04-15 17:05
|
|
76
|
+
*/
|
|
77
|
+
export declare const isEmptyGuest: (carts: any[], accounts: any[]) => boolean;
|