@pisell/private-materials 3.3.82 → 3.3.83
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/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.js +14 -8
- package/es/components/appointmentBooking/components/Services/index.js +36 -38
- package/es/components/appointmentBooking/components/Voucher/index.js +1 -1
- package/es/components/appointmentBooking/index.js +0 -14
- package/es/components/appointmentBooking/index.less +1 -1
- package/es/components/appointmentBooking/locales.d.ts +3 -0
- package/es/components/appointmentBooking/locales.js +3 -0
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/footer/utils.d.ts +0 -1
- package/es/components/booking/components/footer/utils.js +1 -1
- package/es/components/booking/components/voucher/index.js +2 -2
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.js +2 -3
- package/es/components/booking/info/utils.d.ts +50 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +0 -10
- package/es/components/booking/info2/service/addService/utils.js +13 -44
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info2/service/editService/Resources/index.js +8 -22
- package/es/components/booking/info2/service/editService/Resources/index.less +0 -6
- package/es/components/booking/info2/utilsByBooking.js +0 -9
- package/es/components/booking/locales.d.ts +0 -3
- package/es/components/booking/locales.js +0 -3
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/model.d.ts +1 -9
- 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 +1 -10
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.d.ts +1 -10
- 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 +3 -3
- 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.js +7 -21
- package/es/components/eventBooking/locales.js +3 -3
- package/es/components/index.d.ts +1 -3
- package/es/components/index.js +1 -3
- 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 +1 -9
- 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 +1 -9
- 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.js +1 -1
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +138 -257
- package/es/components/ticketBooking/locales.d.ts +146 -164
- package/es/components/ticketBooking/locales.js +147 -195
- package/es/components/wallet/Detail/model.d.ts +1 -13
- package/es/components/wallet/DiscountCard/model.d.ts +1 -14
- package/es/components/wallet/PointCard/model.d.ts +1 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/model.d.ts +1 -9
- package/es/hooks/useComponents.js +1 -1
- package/es/index.d.ts +0 -2
- package/es/index.js +1 -3
- 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/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.js +3 -2
- package/lib/components/appointmentBooking/components/Services/index.js +18 -19
- package/lib/components/appointmentBooking/components/Voucher/index.js +1 -1
- package/lib/components/appointmentBooking/index.js +0 -11
- package/lib/components/appointmentBooking/index.less +1 -1
- package/lib/components/appointmentBooking/locales.d.ts +3 -0
- package/lib/components/appointmentBooking/locales.js +3 -0
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/footer/utils.d.ts +0 -1
- package/lib/components/booking/components/footer/utils.js +0 -2
- package/lib/components/booking/components/voucher/index.js +23 -11
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.js +2 -2
- package/lib/components/booking/info/utils.d.ts +50 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +0 -10
- package/lib/components/booking/info2/service/addService/utils.js +4 -27
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info2/service/editService/Resources/index.js +10 -54
- package/lib/components/booking/info2/service/editService/Resources/index.less +0 -6
- package/lib/components/booking/info2/utilsByBooking.js +0 -6
- package/lib/components/booking/locales.d.ts +0 -3
- package/lib/components/booking/locales.js +0 -3
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- 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 +3 -3
- 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.js +7 -11
- package/lib/components/eventBooking/locales.js +3 -3
- package/lib/components/index.d.ts +1 -3
- package/lib/components/index.js +0 -6
- package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +139 -263
- package/lib/components/ticketBooking/locales.d.ts +146 -164
- package/lib/components/ticketBooking/locales.js +4 -22
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
- package/lib/components/wallet/PointCard/model.d.ts +1 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/model.d.ts +1 -9
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -6
- package/lib/utils/index.d.ts +1 -1
- package/package.json +4 -4
- package/es/components/booking/editBookingModal/index.d.ts +0 -5
- package/es/components/booking/editBookingModal/index.js +0 -386
- package/es/components/booking/editBookingModal/index.less +0 -8
- package/es/components/booking/editBookingModal/locales.d.ts +0 -21
- package/es/components/booking/editBookingModal/locales.js +0 -20
- package/es/components/booking/editBookingModal/mock.d.ts +0 -807
- package/es/components/booking/editBookingModal/mock.js +0 -2993
- package/es/components/booking/editBookingModal/serve.d.ts +0 -51
- package/es/components/booking/editBookingModal/serve.js +0 -288
- package/es/components/booking/editBookingModal/type.d.ts +0 -12
- package/es/components/booking/editBookingModal/type.js +0 -1
- package/es/components/booking/editBookingModal/utils.d.ts +0 -12
- package/es/components/booking/editBookingModal/utils.js +0 -157
- package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +0 -7
- package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +0 -26
- package/es/components/booking/info2/service/editService/ResourcesV2/index.d.ts +0 -10
- package/es/components/booking/info2/service/editService/ResourcesV2/index.js +0 -308
- package/es/components/booking/info2/service/editService/ResourcesV2/index.less +0 -44
- 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/editBookingModal/index.d.ts +0 -5
- package/lib/components/booking/editBookingModal/index.js +0 -363
- package/lib/components/booking/editBookingModal/index.less +0 -8
- package/lib/components/booking/editBookingModal/locales.d.ts +0 -21
- package/lib/components/booking/editBookingModal/locales.js +0 -44
- package/lib/components/booking/editBookingModal/mock.d.ts +0 -807
- package/lib/components/booking/editBookingModal/mock.js +0 -3314
- package/lib/components/booking/editBookingModal/serve.d.ts +0 -51
- package/lib/components/booking/editBookingModal/serve.js +0 -178
- package/lib/components/booking/editBookingModal/type.d.ts +0 -12
- package/lib/components/booking/editBookingModal/type.js +0 -17
- package/lib/components/booking/editBookingModal/utils.d.ts +0 -12
- package/lib/components/booking/editBookingModal/utils.js +0 -158
- package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +0 -7
- package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +0 -53
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.d.ts +0 -10
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +0 -311
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.less +0 -44
- 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/edit-booking-modal/meta.ts +0 -53
- package/lowcode/step-controller/meta.ts +0 -88
|
@@ -1,386 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
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; }
|
|
3
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
6
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
7
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
11
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
12
|
-
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); } }
|
|
13
|
-
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); }); }; }
|
|
14
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
17
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
18
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
19
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
|
-
import React, { useState, useMemo, useLayoutEffect, useImperativeHandle, forwardRef, useEffect } from 'react';
|
|
21
|
-
import { Form, Button, DatePicker } from 'antd';
|
|
22
|
-
import { PisellContainer, Iconfont, Spin } from '@pisell/materials';
|
|
23
|
-
import dayjs from 'dayjs';
|
|
24
|
-
import { locales } from '@pisell/utils';
|
|
25
|
-
import useEngineContext from "../../../hooks/useEngineContext";
|
|
26
|
-
import { request } from "../../../utils";
|
|
27
|
-
import ResourcesV2 from "../info2/service/editService/ResourcesV2";
|
|
28
|
-
import { formatResources } from "../info2/service/addService/utils";
|
|
29
|
-
import { createCacheItem, updateChildBooking } from "./serve";
|
|
30
|
-
import { init, updateResourceErrors } from "./serve";
|
|
31
|
-
import { checkResourcesFormat } from "../../booking/components/footer/utils";
|
|
32
|
-
import localeTexts from "./locales";
|
|
33
|
-
import "./index.less";
|
|
34
|
-
var EditBookingModal = function EditBookingModal(props, ref) {
|
|
35
|
-
var _useState = useState(false),
|
|
36
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
37
|
-
open = _useState2[0],
|
|
38
|
-
setOpen = _useState2[1];
|
|
39
|
-
var _useState3 = useState({}),
|
|
40
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
41
|
-
params = _useState4[0],
|
|
42
|
-
setParams = _useState4[1];
|
|
43
|
-
var _useState5 = useState(false),
|
|
44
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
45
|
-
loading = _useState6[0],
|
|
46
|
-
setLoading = _useState6[1];
|
|
47
|
-
var _useState7 = useState(false),
|
|
48
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
49
|
-
updating = _useState8[0],
|
|
50
|
-
setUpdating = _useState8[1];
|
|
51
|
-
var _useState9 = useState(null),
|
|
52
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
53
|
-
data = _useState10[0],
|
|
54
|
-
setData = _useState10[1];
|
|
55
|
-
var context = useEngineContext();
|
|
56
|
-
var _Form$useForm = Form.useForm(),
|
|
57
|
-
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
58
|
-
form = _Form$useForm2[0];
|
|
59
|
-
var useToDate = Form.useWatch('toDate', form);
|
|
60
|
-
var useResource = Form.useWatch('resource', form);
|
|
61
|
-
useImperativeHandle(ref, function () {
|
|
62
|
-
return {
|
|
63
|
-
open: function open(params) {
|
|
64
|
-
console.log('change', params);
|
|
65
|
-
setParams(params);
|
|
66
|
-
setOpen(true);
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
});
|
|
70
|
-
var getInitData = /*#__PURE__*/function () {
|
|
71
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
72
|
-
var _data$toResource;
|
|
73
|
-
var mockProps, _data, _initResourceVal, toResourceFormId, _data$toResource2, _formatResources, list, maps, currentForm, relation_id, _currentForm$renderLi, _currentForm$renderLi2, _currentForm$renderLi3, _currentForm$renderLi4, _targetResource, _cloned, _idx;
|
|
74
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
75
|
-
while (1) switch (_context.prev = _context.next) {
|
|
76
|
-
case 0:
|
|
77
|
-
mockProps = params;
|
|
78
|
-
_context.next = 3;
|
|
79
|
-
return init(mockProps);
|
|
80
|
-
case 3:
|
|
81
|
-
_data = _context.sent;
|
|
82
|
-
setData(_data);
|
|
83
|
-
|
|
84
|
-
// 初始预期资源(日历放置点对应的资源)
|
|
85
|
-
_initResourceVal = _data.childrenBooking._extend.resource; // 目标资源所在 form_id
|
|
86
|
-
toResourceFormId = (_data$toResource = _data.toResource) === null || _data$toResource === void 0 ? void 0 : _data$toResource.form_id; // 若 1. 起止资源不同 且2. 能通过目标资源id找到所在资源组
|
|
87
|
-
// 则查找放置点所对应资源信息
|
|
88
|
-
if (params.fromResourceId !== params.toResourceId && toResourceFormId) {
|
|
89
|
-
_formatResources = formatResources({
|
|
90
|
-
cacheItem: _data.childrenBooking,
|
|
91
|
-
resourcesOrigin: _data.resourcesOrigin
|
|
92
|
-
}), list = _formatResources.list, maps = _formatResources.maps;
|
|
93
|
-
currentForm = maps[toResourceFormId];
|
|
94
|
-
relation_id = (_data$toResource2 = _data.toResource) === null || _data$toResource2 === void 0 ? void 0 : _data$toResource2.id;
|
|
95
|
-
if (currentForm && relation_id) {
|
|
96
|
-
_targetResource = {
|
|
97
|
-
relation_type: ((_currentForm$renderLi = currentForm.renderListMaps[relation_id]) === null || _currentForm$renderLi === void 0 || (_currentForm$renderLi = _currentForm$renderLi.usable) === null || _currentForm$renderLi === void 0 ? void 0 : _currentForm$renderLi.relation_type) || 'form',
|
|
98
|
-
form_id: toResourceFormId,
|
|
99
|
-
relation_id: relation_id,
|
|
100
|
-
like_status: 'common',
|
|
101
|
-
children: (_currentForm$renderLi2 = currentForm.renderListMaps) === null || _currentForm$renderLi2 === void 0 || (_currentForm$renderLi2 = _currentForm$renderLi2[relation_id]) === null || _currentForm$renderLi2 === void 0 ? void 0 : _currentForm$renderLi2.children,
|
|
102
|
-
metadata: _objectSpread(_objectSpread({}, (_currentForm$renderLi3 = currentForm.renderListMaps) === null || _currentForm$renderLi3 === void 0 || (_currentForm$renderLi3 = _currentForm$renderLi3[relation_id]) === null || _currentForm$renderLi3 === void 0 ? void 0 : _currentForm$renderLi3.metadata), {}, {
|
|
103
|
-
form_name: currentForm.title,
|
|
104
|
-
resource_name: (_currentForm$renderLi4 = currentForm.renderListMaps[relation_id]) === null || _currentForm$renderLi4 === void 0 ? void 0 : _currentForm$renderLi4.main_field
|
|
105
|
-
})
|
|
106
|
-
}; // 同一类型关联多个资源
|
|
107
|
-
if (Array.isArray(_initResourceVal[toResourceFormId])) {
|
|
108
|
-
_cloned = _toConsumableArray(_initResourceVal[toResourceFormId]);
|
|
109
|
-
_idx = _cloned.findIndex(function (rs) {
|
|
110
|
-
return rs.relation_id == params.fromResourceId;
|
|
111
|
-
});
|
|
112
|
-
if (_idx !== -1) {
|
|
113
|
-
_cloned[_idx] = _targetResource; // 替换现有对象
|
|
114
|
-
} else {
|
|
115
|
-
_cloned.push(_targetResource); // 添加新对象
|
|
116
|
-
}
|
|
117
|
-
_initResourceVal = _objectSpread(_objectSpread({}, _initResourceVal), {}, _defineProperty({}, toResourceFormId, _cloned));
|
|
118
|
-
} else {
|
|
119
|
-
// 单选
|
|
120
|
-
_initResourceVal = _objectSpread(_objectSpread({}, _initResourceVal), {}, _defineProperty({}, toResourceFormId, [_targetResource]));
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
setTimeout(function () {
|
|
125
|
-
form.setFieldsValue({
|
|
126
|
-
resource: _initResourceVal,
|
|
127
|
-
fromDate: [dayjs("".concat(mockProps.event.start_date, " ").concat(mockProps.event.start_time)), dayjs("".concat(mockProps.event.end_date, " ").concat(mockProps.event.end_time))],
|
|
128
|
-
toDate: [dayjs(mockProps.toStartDate), dayjs(mockProps.toEndDate)]
|
|
129
|
-
});
|
|
130
|
-
}, 100);
|
|
131
|
-
case 9:
|
|
132
|
-
case "end":
|
|
133
|
-
return _context.stop();
|
|
134
|
-
}
|
|
135
|
-
}, _callee);
|
|
136
|
-
}));
|
|
137
|
-
return function getInitData(_x) {
|
|
138
|
-
return _ref.apply(this, arguments);
|
|
139
|
-
};
|
|
140
|
-
}();
|
|
141
|
-
useLayoutEffect(function () {
|
|
142
|
-
var _context$appHelper$ut;
|
|
143
|
-
locales.init(localeTexts, ((_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut = _context$appHelper$ut.storage) === null || _context$appHelper$ut === void 0 ? void 0 : _context$appHelper$ut.get('umi_locale')) || 'en');
|
|
144
|
-
request.setRequest(context.appHelper.utils.request);
|
|
145
|
-
}, []);
|
|
146
|
-
useEffect(function () {
|
|
147
|
-
if (!open) return;
|
|
148
|
-
getInitData(params);
|
|
149
|
-
}, [params, open]);
|
|
150
|
-
var resourceData = useMemo(function () {
|
|
151
|
-
if (!data) {
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
return formatResources({
|
|
155
|
-
cacheItem: data.childrenBooking,
|
|
156
|
-
resourcesOrigin: data.resourcesOrigin
|
|
157
|
-
});
|
|
158
|
-
}, [data]);
|
|
159
|
-
var updateResource = function updateResource(resource) {
|
|
160
|
-
form.setFieldsValue({
|
|
161
|
-
resource: resource
|
|
162
|
-
});
|
|
163
|
-
};
|
|
164
|
-
var originCacheItem = useMemo(function () {
|
|
165
|
-
if (!data) {
|
|
166
|
-
return null;
|
|
167
|
-
}
|
|
168
|
-
var _cacheItem = createCacheItem(data.childrenBooking, {
|
|
169
|
-
toDate: [data.childrenBooking._extend.start_date, data.childrenBooking._extend.end_date],
|
|
170
|
-
resource: data.childrenBooking._extend.resource
|
|
171
|
-
});
|
|
172
|
-
console.log('_origin_cacheItem', _cacheItem);
|
|
173
|
-
var _formatResources2 = formatResources({
|
|
174
|
-
cacheItem: _cacheItem,
|
|
175
|
-
resourcesOrigin: data.resourcesOrigin
|
|
176
|
-
}),
|
|
177
|
-
list = _formatResources2.list,
|
|
178
|
-
maps = _formatResources2.maps;
|
|
179
|
-
return _objectSpread(_objectSpread({}, _cacheItem), {}, {
|
|
180
|
-
_data: {
|
|
181
|
-
resources: list,
|
|
182
|
-
resourceMaps: maps
|
|
183
|
-
}
|
|
184
|
-
});
|
|
185
|
-
}, [data]);
|
|
186
|
-
var cacheItem = useMemo(function () {
|
|
187
|
-
if (!data) {
|
|
188
|
-
return null;
|
|
189
|
-
}
|
|
190
|
-
var _cacheItem = createCacheItem(data.childrenBooking, {
|
|
191
|
-
toDate: useToDate,
|
|
192
|
-
resource: useResource
|
|
193
|
-
});
|
|
194
|
-
console.log('_cacheItem', _cacheItem);
|
|
195
|
-
var _formatResources3 = formatResources({
|
|
196
|
-
cacheItem: _cacheItem,
|
|
197
|
-
resourcesOrigin: data.resourcesOrigin
|
|
198
|
-
}),
|
|
199
|
-
list = _formatResources3.list,
|
|
200
|
-
maps = _formatResources3.maps;
|
|
201
|
-
var resource = updateResourceErrors(maps, _cacheItem);
|
|
202
|
-
updateResource(resource);
|
|
203
|
-
return _objectSpread(_objectSpread({}, _cacheItem), {}, {
|
|
204
|
-
_data: {
|
|
205
|
-
resources: list,
|
|
206
|
-
resourceMaps: maps
|
|
207
|
-
}
|
|
208
|
-
});
|
|
209
|
-
}, [data, useToDate, useResource]);
|
|
210
|
-
var initState = function initState() {
|
|
211
|
-
form.resetFields();
|
|
212
|
-
setData(null);
|
|
213
|
-
setOpen(false);
|
|
214
|
-
};
|
|
215
|
-
var onCancel = function onCancel() {
|
|
216
|
-
initState();
|
|
217
|
-
props === null || props === void 0 || props.onCancel();
|
|
218
|
-
};
|
|
219
|
-
var onOk = /*#__PURE__*/function () {
|
|
220
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
221
|
-
var values, _data$childrenBooking, _extend, order_id, start_date, start_time, end_date, end_time;
|
|
222
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
223
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
224
|
-
case 0:
|
|
225
|
-
values = form.getFieldsValue(); // console.log('values', values, data, cacheItem);
|
|
226
|
-
// return;
|
|
227
|
-
setUpdating(true);
|
|
228
|
-
_context2.prev = 2;
|
|
229
|
-
_data$childrenBooking = data.childrenBooking, _extend = _data$childrenBooking._extend, order_id = _data$childrenBooking.order_id;
|
|
230
|
-
start_date = values.toDate[0].format('YYYY-MM-DD');
|
|
231
|
-
start_time = values.toDate[0].format('HH:mm');
|
|
232
|
-
end_date = values.toDate[1].format('YYYY-MM-DD');
|
|
233
|
-
end_time = values.toDate[1].format('HH:mm');
|
|
234
|
-
_context2.next = 10;
|
|
235
|
-
return updateChildBooking(order_id, _objectSpread(_objectSpread({}, _extend), {}, {
|
|
236
|
-
resources: Object.values(values.resource).reduce(function (pre, cur) {
|
|
237
|
-
var newList = checkResourcesFormat(cur, cacheItem);
|
|
238
|
-
pre = pre.concat(newList);
|
|
239
|
-
return pre;
|
|
240
|
-
}, []),
|
|
241
|
-
start_date: start_date,
|
|
242
|
-
start_time: start_time,
|
|
243
|
-
end_date: end_date,
|
|
244
|
-
end_time: end_time,
|
|
245
|
-
duration: values.toDate[1].diff(values.toDate[0], 'minutes')
|
|
246
|
-
}));
|
|
247
|
-
case 10:
|
|
248
|
-
setOpen(false);
|
|
249
|
-
props === null || props === void 0 || props.onOk();
|
|
250
|
-
_context2.next = 17;
|
|
251
|
-
break;
|
|
252
|
-
case 14:
|
|
253
|
-
_context2.prev = 14;
|
|
254
|
-
_context2.t0 = _context2["catch"](2);
|
|
255
|
-
console.error(_context2.t0);
|
|
256
|
-
case 17:
|
|
257
|
-
setUpdating(false);
|
|
258
|
-
case 18:
|
|
259
|
-
case "end":
|
|
260
|
-
return _context2.stop();
|
|
261
|
-
}
|
|
262
|
-
}, _callee2, null, [[2, 14]]);
|
|
263
|
-
}));
|
|
264
|
-
return function onOk() {
|
|
265
|
-
return _ref2.apply(this, arguments);
|
|
266
|
-
};
|
|
267
|
-
}();
|
|
268
|
-
console.log('data', data);
|
|
269
|
-
return /*#__PURE__*/React.createElement(PisellContainer, {
|
|
270
|
-
renderType: 'modal',
|
|
271
|
-
props: {
|
|
272
|
-
title: locales.getText('pisell2.text.booking.confirm-changes'),
|
|
273
|
-
open: open,
|
|
274
|
-
cancelVisible: false,
|
|
275
|
-
bodyStyle: {
|
|
276
|
-
padding: 24
|
|
277
|
-
},
|
|
278
|
-
width: 680,
|
|
279
|
-
onCancel: onCancel,
|
|
280
|
-
okButtonProps: {},
|
|
281
|
-
onOk: function onOk() {},
|
|
282
|
-
footer: null,
|
|
283
|
-
className: 'pisell-edit-booking-modal'
|
|
284
|
-
}
|
|
285
|
-
}, /*#__PURE__*/React.createElement(Spin, {
|
|
286
|
-
spinning: !data
|
|
287
|
-
}, /*#__PURE__*/React.createElement(Form, {
|
|
288
|
-
form: form,
|
|
289
|
-
layout: "vertical"
|
|
290
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
291
|
-
style: {
|
|
292
|
-
display: 'flex',
|
|
293
|
-
alignItems: 'center',
|
|
294
|
-
gap: 8,
|
|
295
|
-
color: '#1b1b1b',
|
|
296
|
-
fontWeight: '500'
|
|
297
|
-
}
|
|
298
|
-
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
299
|
-
type: "pisell2-copy-03",
|
|
300
|
-
style: {
|
|
301
|
-
fontSize: 16
|
|
302
|
-
}
|
|
303
|
-
}), locales.getText('pisell2.text.booking.time-change')), /*#__PURE__*/React.createElement(Form.Item, {
|
|
304
|
-
name: "fromDate",
|
|
305
|
-
label: "From"
|
|
306
|
-
}, /*#__PURE__*/React.createElement(DatePicker.RangePicker, {
|
|
307
|
-
format: 'YYYY-MM-DD HH:mm',
|
|
308
|
-
showTime: true,
|
|
309
|
-
presets: [],
|
|
310
|
-
disabled: true,
|
|
311
|
-
style: {
|
|
312
|
-
width: '100%'
|
|
313
|
-
},
|
|
314
|
-
size: "large"
|
|
315
|
-
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
316
|
-
name: "toDate",
|
|
317
|
-
label: "To"
|
|
318
|
-
}, /*#__PURE__*/React.createElement(DatePicker.RangePicker, {
|
|
319
|
-
format: 'YYYY-MM-DD HH:mm',
|
|
320
|
-
showTime: true,
|
|
321
|
-
presets: [],
|
|
322
|
-
style: {
|
|
323
|
-
width: '100%'
|
|
324
|
-
},
|
|
325
|
-
size: "large"
|
|
326
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
327
|
-
style: {
|
|
328
|
-
display: 'flex',
|
|
329
|
-
alignItems: 'center',
|
|
330
|
-
gap: 8,
|
|
331
|
-
color: '#1b1b1b',
|
|
332
|
-
fontWeight: '500'
|
|
333
|
-
}
|
|
334
|
-
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
335
|
-
type: "pisell2-mark",
|
|
336
|
-
style: {
|
|
337
|
-
fontSize: 16
|
|
338
|
-
}
|
|
339
|
-
}), locales.getText('pisell2.text.booking.resource-change.detail')), data ? /*#__PURE__*/React.createElement("div", {
|
|
340
|
-
style: {
|
|
341
|
-
marginTop: 16
|
|
342
|
-
}
|
|
343
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
344
|
-
name: "resource"
|
|
345
|
-
}, /*#__PURE__*/React.createElement(ResourcesV2, {
|
|
346
|
-
state: {},
|
|
347
|
-
resourceData: resourceData,
|
|
348
|
-
cacheItem: cacheItem,
|
|
349
|
-
getCurrentCacheItem: function getCurrentCacheItem() {
|
|
350
|
-
return cacheItem;
|
|
351
|
-
},
|
|
352
|
-
config: {
|
|
353
|
-
autoAllocation: false,
|
|
354
|
-
labelCol: {
|
|
355
|
-
span: 24
|
|
356
|
-
},
|
|
357
|
-
resourceErrorIcon: true,
|
|
358
|
-
disabled: false
|
|
359
|
-
},
|
|
360
|
-
originCacheItem: originCacheItem,
|
|
361
|
-
originValue: originCacheItem._extend.resource
|
|
362
|
-
}))) : null)), /*#__PURE__*/React.createElement("div", {
|
|
363
|
-
className: "",
|
|
364
|
-
style: {
|
|
365
|
-
display: 'flex',
|
|
366
|
-
gap: 12
|
|
367
|
-
}
|
|
368
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
369
|
-
onClick: onCancel,
|
|
370
|
-
block: true,
|
|
371
|
-
size: "large",
|
|
372
|
-
style: {
|
|
373
|
-
borderRadius: 20
|
|
374
|
-
}
|
|
375
|
-
}, locales.getText('pisell2.text.cancel')), /*#__PURE__*/React.createElement(Button, {
|
|
376
|
-
type: "primary",
|
|
377
|
-
onClick: onOk,
|
|
378
|
-
block: true,
|
|
379
|
-
size: "large",
|
|
380
|
-
loading: updating,
|
|
381
|
-
style: {
|
|
382
|
-
borderRadius: 20
|
|
383
|
-
}
|
|
384
|
-
}, locales.getText('pisell2.text.confirm'))));
|
|
385
|
-
};
|
|
386
|
-
export default /*#__PURE__*/forwardRef(EditBookingModal);
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
en: {
|
|
3
|
-
'pisell2.text.login': string;
|
|
4
|
-
'pisell2.text.booking.confirm-changes': string;
|
|
5
|
-
'pisell2.text.booking.time-change': string;
|
|
6
|
-
'pisell2.text.booking.resource-change.detail': string;
|
|
7
|
-
};
|
|
8
|
-
'zh-CN': {
|
|
9
|
-
'pisell2.text.login': string;
|
|
10
|
-
'pisell2.text.booking.confirm-changes': string;
|
|
11
|
-
'pisell2.text.booking.time-change': string;
|
|
12
|
-
'pisell2.text.booking.resource-change.detail': string;
|
|
13
|
-
};
|
|
14
|
-
'zh-HK': {
|
|
15
|
-
'pisell2.text.login': string;
|
|
16
|
-
'pisell2.text.booking.confirm-changes': string;
|
|
17
|
-
'pisell2.text.booking.time-change': string;
|
|
18
|
-
'pisell2.text.booking.resource-change.detail': string;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export default _default;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
en: {
|
|
3
|
-
'pisell2.text.login': 'Login',
|
|
4
|
-
'pisell2.text.booking.confirm-changes': 'Confirm Booking Changes',
|
|
5
|
-
'pisell2.text.booking.time-change': 'Time Change',
|
|
6
|
-
'pisell2.text.booking.resource-change.detail': 'Resource Change Details'
|
|
7
|
-
},
|
|
8
|
-
'zh-CN': {
|
|
9
|
-
'pisell2.text.login': '登录',
|
|
10
|
-
'pisell2.text.booking.confirm-changes': '确认预约变更',
|
|
11
|
-
'pisell2.text.booking.time-change': '时间变更',
|
|
12
|
-
'pisell2.text.booking.resource-change.detail': '资源变更详情'
|
|
13
|
-
},
|
|
14
|
-
'zh-HK': {
|
|
15
|
-
'pisell2.text.login': '登录',
|
|
16
|
-
'pisell2.text.booking.confirm-changes': '確認預約變更',
|
|
17
|
-
'pisell2.text.booking.time-change': '時間變更',
|
|
18
|
-
'pisell2.text.booking.resource-change.detail': '資源變更詳情'
|
|
19
|
-
}
|
|
20
|
-
};
|