@pisell/private-materials 3.0.152-gray → 3.0.153
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 +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +12 -12
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/components/booking/addons/model.d.ts +1 -2
- package/es/components/booking/components/footer/index.js +51 -36
- package/es/components/booking/components/footer/utils.js +35 -4
- package/es/components/booking/forms/forms.d.ts +0 -1
- package/es/components/booking/forms/forms.js +2 -4
- package/es/components/booking/forms/model.d.ts +1 -2
- package/es/components/booking/forms/single/index.d.ts +1 -1
- package/es/components/booking/forms/single/index.js +3 -4
- package/es/components/booking/index.js +1 -1
- package/es/components/booking/info/index.d.ts +4 -12
- package/es/components/booking/info/index.js +12 -123
- package/es/components/booking/info/index.less +0 -9
- package/es/components/booking/info/main.d.ts +12 -0
- package/es/components/booking/info/main.js +124 -0
- package/es/components/booking/info/model.js +0 -1
- package/es/components/booking/info/pet/index.js +1 -1
- package/es/components/booking/info/service/addService/index.d.ts +2 -8
- package/es/components/booking/info/service/addService/index.js +36 -82
- package/es/components/booking/info/service/addService/index.less +1 -27
- package/es/components/booking/info/service/addTimeModal/index.js +4 -4
- package/es/components/booking/info/service/editService/index.js +13 -11
- package/es/components/booking/info/utils.d.ts +1 -0
- package/es/components/booking/info/utils.js +7 -0
- package/es/components/booking/info2/index.d.ts +12 -0
- package/es/components/booking/{dashboard → info2}/index.js +196 -222
- package/es/components/booking/info2/serve.d.ts +6 -0
- package/es/components/booking/info2/serve.js +79 -0
- package/es/components/booking/info2/service/actions/index.d.ts +6 -0
- package/es/components/booking/info2/service/actions/index.js +86 -0
- package/es/components/booking/info2/service/addService/index.d.ts +6 -0
- package/es/components/booking/info2/service/addService/index.js +403 -0
- package/es/components/booking/info2/service/addService/mock.d.ts +214 -0
- package/es/components/booking/info2/service/addService/mock.js +332 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +71 -0
- package/es/components/booking/info2/service/addService/utils.js +510 -0
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +4 -0
- package/es/components/booking/info2/service/addTimeModal/index.js +681 -0
- package/es/components/booking/info2/service/addTimeModal/serve.d.ts +9 -0
- package/es/components/booking/{dashboard → info2/service/addTimeModal}/serve.js +51 -5
- package/es/components/booking/info2/service/addTimeModal/utils.d.ts +31 -0
- package/es/components/booking/info2/service/addTimeModal/utils.js +176 -0
- package/es/components/booking/info2/service/editService/Capacity/index.d.ts +4 -0
- package/es/components/booking/info2/service/editService/Capacity/index.js +121 -0
- package/es/components/booking/info2/service/editService/Capacity/index.less +1 -0
- package/es/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.d.ts +7 -0
- package/es/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +28 -0
- package/es/components/booking/info2/service/editService/Resources/index.d.ts +4 -0
- package/es/components/booking/info2/service/editService/Resources/index.js +233 -0
- package/es/components/booking/info2/service/editService/Resources/index.less +21 -0
- package/es/components/booking/info2/service/editService/index.d.ts +7 -0
- package/es/components/booking/info2/service/editService/index.js +617 -0
- package/es/components/booking/info2/service/editService/index.less +99 -0
- package/es/components/booking/info2/service/editService/utils.d.ts +11 -0
- package/es/components/booking/{info/addServiceVariant/index.js → info2/service/editService/utils.js} +30 -26
- package/es/components/booking/info2/service/index.d.ts +4 -0
- package/es/components/booking/info2/service/index.js +55 -0
- package/es/components/booking/info2/service/serviceItem/index.d.ts +4 -0
- package/es/components/booking/info2/service/serviceItem/index.js +176 -0
- package/es/components/booking/info2/service/serviceItem/index.less +125 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +6 -0
- package/es/components/booking/info2/service/serviceList/index.js +106 -0
- package/es/components/booking/info2/service/serviceList/index.less +0 -0
- package/es/components/booking/info2/utilsByBooking.d.ts +34 -0
- package/es/components/booking/info2/utilsByBooking.js +349 -0
- package/es/components/booking/locales.d.ts +3 -48
- package/es/components/booking/locales.js +9 -48
- package/es/components/booking/materiels/resources/index.d.ts +2 -2
- package/es/components/booking/materiels/resources/index.js +11 -11
- package/es/components/booking/mock.d.ts +1 -0
- package/es/components/booking/mock.js +66 -0
- package/es/components/booking/model.d.ts +0 -2
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +1 -2
- package/es/components/booking/payments/model.d.ts +1 -2
- package/es/components/booking/utils.d.ts +1 -1
- package/es/components/booking/utils.js +51 -54
- package/es/components/index.d.ts +1 -1
- package/es/components/index.js +1 -1
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +1 -2
- package/es/index.d.ts +1 -3
- package/es/index.js +2 -4
- package/lib/components/booking/addons/model.d.ts +1 -2
- package/lib/components/booking/components/footer/index.js +31 -8
- package/lib/components/booking/components/footer/utils.js +29 -4
- package/lib/components/booking/forms/forms.d.ts +0 -1
- package/lib/components/booking/forms/forms.js +2 -5
- package/lib/components/booking/forms/model.d.ts +1 -2
- package/lib/components/booking/forms/single/index.d.ts +1 -1
- package/lib/components/booking/forms/single/index.js +2 -4
- package/lib/components/booking/index.js +2 -2
- package/lib/components/booking/info/client/index.js +8 -1
- package/lib/components/booking/info/index.d.ts +4 -12
- package/lib/components/booking/info/index.js +14 -118
- package/lib/components/booking/info/index.less +0 -9
- package/lib/components/booking/info/main.d.ts +12 -0
- package/lib/components/booking/info/main.js +152 -0
- package/lib/components/booking/info/pet/index.js +1 -2
- package/lib/components/booking/info/service/addService/index.d.ts +2 -8
- package/lib/components/booking/info/service/addService/index.js +29 -66
- package/lib/components/booking/info/service/addService/index.less +1 -27
- package/lib/components/booking/info/service/addTimeModal/index.js +1 -0
- package/lib/components/booking/info/service/editService/index.js +6 -9
- package/lib/components/booking/info/utils.d.ts +1 -0
- package/lib/components/booking/info/utils.js +9 -0
- package/lib/components/booking/info2/index.d.ts +12 -0
- package/lib/components/booking/info2/index.js +202 -0
- package/lib/components/booking/info2/serve.d.ts +6 -0
- package/lib/components/booking/{dashboard → info2}/serve.js +25 -5
- package/lib/components/booking/info2/service/actions/index.d.ts +6 -0
- package/lib/components/booking/info2/service/actions/index.js +102 -0
- package/lib/components/booking/info2/service/addService/index.d.ts +6 -0
- package/lib/components/booking/info2/service/addService/index.js +355 -0
- package/lib/components/booking/info2/service/addService/mock.d.ts +214 -0
- package/lib/components/booking/info2/service/addService/mock.js +398 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +71 -0
- package/lib/components/booking/info2/service/addService/utils.js +377 -0
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +4 -0
- package/lib/components/booking/info2/service/addTimeModal/index.js +558 -0
- package/lib/components/booking/info2/service/addTimeModal/serve.d.ts +9 -0
- package/lib/components/booking/info2/service/addTimeModal/serve.js +45 -0
- package/lib/components/booking/info2/service/addTimeModal/utils.d.ts +31 -0
- package/lib/components/booking/info2/service/addTimeModal/utils.js +157 -0
- package/lib/components/booking/info2/service/editService/Capacity/index.d.ts +4 -0
- package/lib/components/booking/info2/service/editService/Capacity/index.js +97 -0
- package/lib/components/booking/info2/service/editService/Capacity/index.less +1 -0
- package/lib/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.d.ts +7 -0
- package/lib/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +54 -0
- package/lib/components/booking/info2/service/editService/Resources/index.d.ts +4 -0
- package/lib/components/booking/info2/service/editService/Resources/index.js +212 -0
- package/lib/components/booking/info2/service/editService/Resources/index.less +21 -0
- package/lib/components/booking/info2/service/editService/index.d.ts +7 -0
- package/lib/components/booking/info2/service/editService/index.js +483 -0
- package/lib/components/booking/info2/service/editService/index.less +99 -0
- package/lib/components/booking/info2/service/editService/utils.d.ts +11 -0
- package/lib/components/booking/info2/service/editService/utils.js +0 -0
- package/lib/components/booking/info2/service/index.d.ts +4 -0
- package/lib/components/booking/info2/service/index.js +75 -0
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +4 -0
- package/lib/components/booking/info2/service/serviceItem/index.js +184 -0
- package/lib/components/booking/info2/service/serviceItem/index.less +125 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +6 -0
- package/lib/components/booking/info2/service/serviceList/index.js +130 -0
- package/lib/components/booking/info2/service/serviceList/index.less +0 -0
- package/lib/components/booking/info2/utilsByBooking.d.ts +34 -0
- package/lib/components/booking/info2/utilsByBooking.js +257 -0
- package/lib/components/booking/locales.d.ts +3 -48
- package/lib/components/booking/locales.js +3 -48
- package/lib/components/booking/materiels/resources/index.d.ts +2 -2
- package/lib/components/booking/mock.d.ts +1 -0
- package/lib/components/booking/mock.js +67 -2
- package/lib/components/booking/model.d.ts +0 -2
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +1 -2
- package/lib/components/booking/payments/model.d.ts +1 -2
- package/lib/components/booking/utils.d.ts +1 -1
- package/lib/components/booking/utils.js +22 -57
- package/lib/components/eftposPay/tyro/index.js +3 -1
- package/lib/components/index.d.ts +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +1 -2
- package/lib/index.d.ts +1 -3
- package/lib/index.js +1 -7
- package/package.json +3 -3
- package/es/components/booking/dashboard/index.d.ts +0 -10
- package/es/components/booking/dashboard/serve.d.ts +0 -1
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -7
- package/lib/components/booking/dashboard/index.d.ts +0 -10
- package/lib/components/booking/dashboard/index.js +0 -225
- package/lib/components/booking/dashboard/serve.d.ts +0 -1
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -7
- package/lib/components/booking/info/addServiceVariant/index.js +0 -58
- package/lowcode/booking-dashboard/meta.ts +0 -130
- package/lowcode/booking-vertical-add-service/meta.ts +0 -124
- package/lowcode/vertical-add-service/meta.ts +0 -71
|
@@ -1,242 +1,216 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
var _excluded = ["otherParams", "backgroundColors", "labelColor", "valueColor", "refreshKey"];
|
|
3
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
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 exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
|
+
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); } }
|
|
4
|
+
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); }); }; }
|
|
5
5
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
6
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
7
|
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; }
|
|
8
8
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
9
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
import React, { useEffect, useState } from 'react';
|
|
21
|
-
import { PisellStatisticList } from '@pisell/materials';
|
|
22
|
-
import { isArr, locales } from '@pisell/utils';
|
|
23
|
-
import dayjs from 'dayjs';
|
|
24
|
-
import useEngineContext from "../../../hooks/useEngineContext";
|
|
25
|
-
import { request } from "../utils";
|
|
26
|
-
import { getBookingList } from "./serve";
|
|
10
|
+
import React, { useContext, useEffect, useMemo } from 'react';
|
|
11
|
+
import { Provider, Context } from "../info/model";
|
|
12
|
+
import Client from "../info/client";
|
|
13
|
+
import Service from "./service";
|
|
14
|
+
import Pet from "../info/pet";
|
|
15
|
+
import DateCom from "../info/date";
|
|
16
|
+
import Footer from "../components/footer";
|
|
17
|
+
import TabPane from "../components/tabPane";
|
|
18
|
+
import AddNote from "../notes/addNote";
|
|
19
|
+
import Header from "../info/header";
|
|
27
20
|
import localeTexts from "../locales";
|
|
21
|
+
import { locales } from '@pisell/utils';
|
|
22
|
+
import { findNextDuration, flexibleObj, sliceDayIntoFiveMinutes, request } from "../utils";
|
|
23
|
+
import { formatResource } from "./utilsByBooking";
|
|
24
|
+
import { getErrorList } from "./utilsByBooking";
|
|
25
|
+
import { getResourceList } from "./serve";
|
|
26
|
+
import { updateServiceDate } from "../info/date";
|
|
27
|
+
import useEngineContext from "../../../hooks/useEngineContext";
|
|
28
|
+
import Notes from "../info/notes";
|
|
29
|
+
import "../info/index.less";
|
|
30
|
+
var defaultModules = {
|
|
31
|
+
client: 1,
|
|
32
|
+
date: 1,
|
|
33
|
+
service: 1,
|
|
34
|
+
holder: 1,
|
|
35
|
+
note: 1
|
|
36
|
+
};
|
|
28
37
|
locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
var Info = Provider(function (props) {
|
|
39
|
+
var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state4, _modal$state4$notes, _modal$state6, _modal$state6$date, _modal$state6$date$va, _context$appHelper4, _context$appHelper4$u, _modal$state7, _React$createElement;
|
|
40
|
+
// return <Payments {...props} />;
|
|
41
|
+
var style = props.style,
|
|
42
|
+
globalState = props.globalState,
|
|
43
|
+
_props$modules = props.modules,
|
|
44
|
+
modules = _props$modules === void 0 ? defaultModules : _props$modules,
|
|
45
|
+
slot = props.slot;
|
|
46
|
+
var modal = useContext(Context);
|
|
37
47
|
var context = useEngineContext();
|
|
38
48
|
request.setRequest(context.appHelper.utils.request);
|
|
39
|
-
var
|
|
40
|
-
|
|
41
|
-
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
{
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
49
|
+
var params = useMemo(function () {
|
|
50
|
+
var _modal$state, _modal$state$bookingC, _modal$state$bookingC2, _modal$state$bookingC3;
|
|
51
|
+
return ((_modal$state = modal.state) === null || _modal$state === void 0 ? void 0 : (_modal$state$bookingC = _modal$state.bookingConfig) === null || _modal$state$bookingC === void 0 ? void 0 : (_modal$state$bookingC2 = _modal$state$bookingC.config) === null || _modal$state$bookingC2 === void 0 ? void 0 : (_modal$state$bookingC3 = _modal$state$bookingC2.basic) === null || _modal$state$bookingC3 === void 0 ? void 0 : _modal$state$bookingC3.appointment_subject) || {};
|
|
52
|
+
}, [(_modal$state2 = modal.state) === null || _modal$state2 === void 0 ? void 0 : (_modal$state2$booking = _modal$state2.bookingConfig) === null || _modal$state2$booking === void 0 ? void 0 : (_modal$state2$booking2 = _modal$state2$booking.config) === null || _modal$state2$booking2 === void 0 ? void 0 : (_modal$state2$booking3 = _modal$state2$booking2.basic) === null || _modal$state2$booking3 === void 0 ? void 0 : _modal$state2$booking3.appointment_subject]);
|
|
53
|
+
useEffect(function () {
|
|
54
|
+
document.body.id = 'body';
|
|
55
|
+
// 注入函数到页面的state内
|
|
56
|
+
if (props.setState) {
|
|
57
|
+
props.setState({
|
|
58
|
+
bookingFunctions: {
|
|
59
|
+
formatResource: formatResource,
|
|
60
|
+
getErrorList: getErrorList,
|
|
61
|
+
sliceDayIntoFiveMinutes: sliceDayIntoFiveMinutes,
|
|
62
|
+
findNextDuration: findNextDuration,
|
|
63
|
+
flexibleObj: flexibleObj,
|
|
64
|
+
updateServiceDate: updateServiceDate
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}, []);
|
|
69
|
+
useEffect(function () {
|
|
70
|
+
var _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper2, _context$appHelper2$u, _context$appHelper2$u2, _context$appHelper3, _context$appHelper3$u, _context$appHelper3$u2, _context$appHelper3$u3, _context$appHelper3$u4, _context$appHelper3$u5;
|
|
71
|
+
var isFranchisee = context === null || context === void 0 ? void 0 : (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : (_context$appHelper$ut = _context$appHelper.utils) === null || _context$appHelper$ut === void 0 ? void 0 : (_context$appHelper$ut2 = _context$appHelper$ut.businessUtils) === null || _context$appHelper$ut2 === void 0 ? void 0 : (_context$appHelper$ut3 = _context$appHelper$ut2.getAppByModal) === null || _context$appHelper$ut3 === void 0 ? void 0 : _context$appHelper$ut3.call(_context$appHelper$ut2, 'franchisee');
|
|
72
|
+
modal.dispatch({
|
|
73
|
+
type: 'setState',
|
|
74
|
+
payload: _objectSpread(_objectSpread({
|
|
75
|
+
setGlobalState: props.setGlobalState
|
|
76
|
+
}, globalState), {}, {
|
|
77
|
+
isTerminal: context === null || context === void 0 ? void 0 : (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : (_context$appHelper2$u = _context$appHelper2.utils) === null || _context$appHelper2$u === void 0 ? void 0 : (_context$appHelper2$u2 = _context$appHelper2$u.isTerminal) === null || _context$appHelper2$u2 === void 0 ? void 0 : _context$appHelper2$u2.call(_context$appHelper2$u),
|
|
78
|
+
isFranchisee: isFranchisee,
|
|
79
|
+
timezone: context === null || context === void 0 ? void 0 : (_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 ? void 0 : (_context$appHelper3$u = _context$appHelper3.utils) === null || _context$appHelper3$u === void 0 ? void 0 : (_context$appHelper3$u2 = _context$appHelper3$u.store) === null || _context$appHelper3$u2 === void 0 ? void 0 : (_context$appHelper3$u3 = _context$appHelper3$u2.getState()) === null || _context$appHelper3$u3 === void 0 ? void 0 : (_context$appHelper3$u4 = _context$appHelper3$u3.global) === null || _context$appHelper3$u4 === void 0 ? void 0 : (_context$appHelper3$u5 = _context$appHelper3$u4.globalConfig) === null || _context$appHelper3$u5 === void 0 ? void 0 : _context$appHelper3$u5.timezone
|
|
80
|
+
})
|
|
81
|
+
});
|
|
82
|
+
}, [globalState]);
|
|
83
|
+
var addNote = function addNote(e) {
|
|
84
|
+
modal.dispatch({
|
|
85
|
+
type: 'setNotes',
|
|
86
|
+
payload: {
|
|
87
|
+
orderNote: e,
|
|
88
|
+
edit: true
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
var header = useMemo(function () {
|
|
93
|
+
if ((globalState === null || globalState === void 0 ? void 0 : globalState.renderType) === 'eventBooking') {
|
|
94
|
+
return locales.getText('pisell2.text.enroll.detail');
|
|
95
|
+
}
|
|
96
|
+
return globalState !== null && globalState !== void 0 && globalState.bookingId ? /*#__PURE__*/React.createElement(Header, {
|
|
97
|
+
state: modal.state,
|
|
98
|
+
dispatch: modal.dispatch
|
|
99
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
100
|
+
className: "",
|
|
101
|
+
style: {
|
|
102
|
+
height: 0
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}, [globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, modal.state, modal.dispatch, globalState === null || globalState === void 0 ? void 0 : globalState.renderType]);
|
|
106
|
+
var notes = useMemo(function () {
|
|
107
|
+
var _modal$state3, _modal$state3$notes;
|
|
108
|
+
if (!modules.note) {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
return globalState !== null && globalState !== void 0 && globalState.bookingId ? globalState.renderType === 'eventBooking' ? /*#__PURE__*/React.createElement(Notes, null) : null : /*#__PURE__*/React.createElement(AddNote, {
|
|
112
|
+
value: (_modal$state3 = modal.state) === null || _modal$state3 === void 0 ? void 0 : (_modal$state3$notes = _modal$state3.notes) === null || _modal$state3$notes === void 0 ? void 0 : _modal$state3$notes.orderNote,
|
|
113
|
+
onChange: addNote
|
|
114
|
+
});
|
|
115
|
+
}, [modules.note, globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, globalState.render, (_modal$state4 = modal.state) === null || _modal$state4 === void 0 ? void 0 : (_modal$state4$notes = _modal$state4.notes) === null || _modal$state4$notes === void 0 ? void 0 : _modal$state4$notes.orderNote]);
|
|
116
|
+
var currentDate = useMemo(function () {
|
|
117
|
+
var _modal$state5, _modal$state5$date;
|
|
118
|
+
if ((_modal$state5 = modal.state) !== null && _modal$state5 !== void 0 && (_modal$state5$date = _modal$state5.date) !== null && _modal$state5$date !== void 0 && _modal$state5$date.value) {
|
|
119
|
+
return modal.state.date.value.format('YYYY-MM-DD');
|
|
120
|
+
}
|
|
121
|
+
return null;
|
|
122
|
+
}, [(_modal$state6 = modal.state) === null || _modal$state6 === void 0 ? void 0 : (_modal$state6$date = _modal$state6.date) === null || _modal$state6$date === void 0 ? void 0 : (_modal$state6$date$va = _modal$state6$date.value) === null || _modal$state6$date$va === void 0 ? void 0 : _modal$state6$date$va.format('YYYY-MM-DD')]);
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @title: 获取资源列表数据
|
|
126
|
+
* @description:
|
|
127
|
+
* @return {*}
|
|
128
|
+
* @Author: zhiwei.Wang
|
|
129
|
+
* @Date: 2024-01-09 13:38
|
|
130
|
+
*/
|
|
131
|
+
var getResourcesData = /*#__PURE__*/function () {
|
|
132
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
133
|
+
var bookingResourceList, timeoutNumber, _bookingResourceList;
|
|
134
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
135
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
100
136
|
case 0:
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
137
|
+
bookingResourceList = localStorage.getItem('bookingResourceList');
|
|
138
|
+
timeoutNumber = 0; // 如果本地有数据, 则先使用本地数据
|
|
139
|
+
if (bookingResourceList) {
|
|
140
|
+
bookingResourceList = JSON.parse(bookingResourceList);
|
|
141
|
+
|
|
142
|
+
// 匹配日期, 避免资源列表不是当天的
|
|
143
|
+
if (((_bookingResourceList = bookingResourceList) === null || _bookingResourceList === void 0 ? void 0 : _bookingResourceList.date) === currentDate) {
|
|
144
|
+
timeoutNumber = 200;
|
|
145
|
+
modal.dispatch({
|
|
146
|
+
type: 'setService',
|
|
147
|
+
payload: {
|
|
148
|
+
resourcesOrigin: bookingResourceList.list || [],
|
|
149
|
+
resourcesOriginMap: bookingResourceList.listMap
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
try {
|
|
155
|
+
// 同步最新数据用, 增加延迟为了不和getProduct接口冲突
|
|
156
|
+
setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
157
|
+
var data;
|
|
158
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
159
|
+
while (1) switch (_context.prev = _context.next) {
|
|
160
|
+
case 0:
|
|
161
|
+
_context.next = 2;
|
|
162
|
+
return getResourceList({
|
|
163
|
+
date: currentDate
|
|
164
|
+
});
|
|
165
|
+
case 2:
|
|
166
|
+
data = _context.sent;
|
|
167
|
+
data.date = currentDate;
|
|
168
|
+
localStorage.setItem('bookingResourceList', JSON.stringify(data));
|
|
169
|
+
modal.dispatch({
|
|
170
|
+
type: 'setService',
|
|
171
|
+
payload: {
|
|
172
|
+
resourcesOrigin: data.list || [],
|
|
173
|
+
resourcesOriginMap: data.listMap
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
case 6:
|
|
177
|
+
case "end":
|
|
178
|
+
return _context.stop();
|
|
179
|
+
}
|
|
180
|
+
}, _callee);
|
|
181
|
+
})), timeoutNumber);
|
|
182
|
+
} catch (err) {
|
|
183
|
+
console.log(err, 'err');
|
|
184
|
+
}
|
|
113
185
|
case 4:
|
|
114
186
|
case "end":
|
|
115
|
-
return
|
|
187
|
+
return _context2.stop();
|
|
116
188
|
}
|
|
117
|
-
},
|
|
189
|
+
}, _callee2);
|
|
118
190
|
}));
|
|
119
|
-
return function
|
|
191
|
+
return function getResourcesData() {
|
|
120
192
|
return _ref.apply(this, arguments);
|
|
121
193
|
};
|
|
122
194
|
}();
|
|
123
|
-
var calcBookingDataCount = function calcBookingDataCount(data) {
|
|
124
|
-
// 当前在场团体
|
|
125
|
-
var groupsOnSiteNow = '-';
|
|
126
|
-
// 当前在场人数
|
|
127
|
-
var peopleOnSiteNow = '-';
|
|
128
|
-
// 今日游客总数
|
|
129
|
-
var totalVisitorsToday = 0;
|
|
130
|
-
// 正在进行中的游客
|
|
131
|
-
var ongoing = 0;
|
|
132
|
-
// 即将到达的游客
|
|
133
|
-
var upcoming = 0;
|
|
134
|
-
// 超时的游客
|
|
135
|
-
var overdue = '-';
|
|
136
|
-
// 已完成的游客
|
|
137
|
-
var completed = 0;
|
|
138
|
-
// 已离场的游客
|
|
139
|
-
var departed = '-';
|
|
140
|
-
data.forEach(function (item) {
|
|
141
|
-
if (isArr(item.children)) {
|
|
142
|
-
item.children.forEach(function (child) {
|
|
143
|
-
var start = dayjs("".concat(child.start_date, " ").concat(child.start_time));
|
|
144
|
-
var end = dayjs("".concat(child.end_date, " ").concat(child.end_time));
|
|
145
|
-
|
|
146
|
-
// 今日游客总数
|
|
147
|
-
totalVisitorsToday += child.number;
|
|
148
|
-
// 正在进行中的游客
|
|
149
|
-
if (start < dayjs() && end > dayjs()) {
|
|
150
|
-
ongoing += child.number || 1;
|
|
151
|
-
}
|
|
152
|
-
// 即将到达的游客
|
|
153
|
-
if (dayjs() < start) {
|
|
154
|
-
upcoming += child.number || 1;
|
|
155
|
-
}
|
|
156
|
-
// 已完成的游客
|
|
157
|
-
if (dayjs() > end) {
|
|
158
|
-
completed += child.number || 1;
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
setData([
|
|
164
|
-
// 当前在场团体
|
|
165
|
-
{
|
|
166
|
-
label: locales.getText('pisell2.booking.dashboard.groups-on-site-now'),
|
|
167
|
-
tip: locales.getText('pisell2.booking.dashboard.groups-on-site-now-tip'),
|
|
168
|
-
value: "".concat(groupsOnSiteNow)
|
|
169
|
-
},
|
|
170
|
-
// 当前在场人数
|
|
171
|
-
{
|
|
172
|
-
label: locales.getText('pisell2.booking.dashboard.people-on-site-now'),
|
|
173
|
-
tip: locales.getText('pisell2.booking.dashboard.people-on-site-now-tip'),
|
|
174
|
-
value: "".concat(peopleOnSiteNow)
|
|
175
|
-
},
|
|
176
|
-
// 今日游客总数
|
|
177
|
-
{
|
|
178
|
-
label: locales.getText('pisell2.booking.dashboard.total-visitors-today'),
|
|
179
|
-
tip: locales.getText('pisell2.booking.dashboard.total-visitors-today-tip'),
|
|
180
|
-
value: "".concat(totalVisitorsToday)
|
|
181
|
-
},
|
|
182
|
-
// 正在进行中的游客
|
|
183
|
-
{
|
|
184
|
-
label: locales.getText('pisell2.booking.dashboard.ongoing-visitors'),
|
|
185
|
-
tip: locales.getText('pisell2.booking.dashboard.ongoing-visitors-tip'),
|
|
186
|
-
value: "".concat(ongoing)
|
|
187
|
-
},
|
|
188
|
-
// 即将到达的游客
|
|
189
|
-
{
|
|
190
|
-
label: locales.getText('pisell2.booking.dashboard.upcoming-visitors'),
|
|
191
|
-
tip: locales.getText('pisell2.booking.dashboard.upcoming-visitors-tip'),
|
|
192
|
-
value: "".concat(upcoming)
|
|
193
|
-
},
|
|
194
|
-
// 超时的游客
|
|
195
|
-
{
|
|
196
|
-
label: locales.getText('pisell2.booking.dashboard.overdue-visitors'),
|
|
197
|
-
tip: locales.getText('pisell2.booking.dashboard.overdue-visitors-tip'),
|
|
198
|
-
value: "".concat(overdue)
|
|
199
|
-
},
|
|
200
|
-
// 已完成的游客
|
|
201
|
-
{
|
|
202
|
-
label: locales.getText('pisell2.booking.dashboard.completed-visitors'),
|
|
203
|
-
tip: locales.getText('pisell2.booking.dashboard.completed-visitors-tip'),
|
|
204
|
-
value: "".concat(completed)
|
|
205
|
-
},
|
|
206
|
-
// 已离场的游客
|
|
207
|
-
{
|
|
208
|
-
label: locales.getText('pisell2.booking.dashboard.departed-visitors'),
|
|
209
|
-
tip: locales.getText('pisell2.booking.dashboard.departed-visitors-tip'),
|
|
210
|
-
value: "".concat(departed)
|
|
211
|
-
}]);
|
|
212
|
-
};
|
|
213
|
-
useEffect(function () {
|
|
214
|
-
calcBookingDataCount(bookingData);
|
|
215
|
-
|
|
216
|
-
// 每分钟重新计算预约数据
|
|
217
|
-
var timer = setInterval(function () {
|
|
218
|
-
calcBookingDataCount(bookingData);
|
|
219
|
-
}, 60 * 1000);
|
|
220
|
-
return function () {
|
|
221
|
-
clearInterval(timer);
|
|
222
|
-
};
|
|
223
|
-
}, [bookingData]);
|
|
224
195
|
useEffect(function () {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}
|
|
242
|
-
|
|
196
|
+
// setTimeout(() => {
|
|
197
|
+
if (currentDate) {
|
|
198
|
+
getResourcesData();
|
|
199
|
+
}
|
|
200
|
+
// }, 20);
|
|
201
|
+
}, [currentDate]);
|
|
202
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !!modal.state.setGlobalState ? /*#__PURE__*/React.createElement(TabPane, (_React$createElement = {
|
|
203
|
+
style: style,
|
|
204
|
+
header: header,
|
|
205
|
+
footer: /*#__PURE__*/React.createElement(Footer, {
|
|
206
|
+
state: modal.state,
|
|
207
|
+
dispatch: modal.dispatch,
|
|
208
|
+
source: "info"
|
|
209
|
+
})
|
|
210
|
+
}, _defineProperty(_React$createElement, "style", {
|
|
211
|
+
height: context !== null && context !== void 0 && (_context$appHelper4 = context.appHelper) !== null && _context$appHelper4 !== void 0 && (_context$appHelper4$u = _context$appHelper4.utils) !== null && _context$appHelper4$u !== void 0 && _context$appHelper4$u.isMobile ? '100%' : '100vh'
|
|
212
|
+
}), _defineProperty(_React$createElement, "bodyClassName", "booking-info-warp"), _React$createElement), /*#__PURE__*/React.createElement("div", {
|
|
213
|
+
className: "booking-info"
|
|
214
|
+
}, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, modules.holder && !((_modal$state7 = modal.state) !== null && _modal$state7 !== void 0 && _modal$state7.disabledEdit) ? /*#__PURE__*/React.createElement(React.Fragment, null, params.type === 'form' ? /*#__PURE__*/React.createElement(Pet, null) : null) : null, modules.date ? /*#__PURE__*/React.createElement(DateCom, null) : null, modules.service ? /*#__PURE__*/React.createElement(React.Fragment, null, modal.state.date.value ? /*#__PURE__*/React.createElement(Service, null) : null) : null, notes, slot ? slot : null)) : null);
|
|
215
|
+
});
|
|
216
|
+
export default Info;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
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 exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
|
+
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); } }
|
|
4
|
+
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); }); }; }
|
|
5
|
+
import { request } from "../utils";
|
|
6
|
+
import { getNoResource2 } from "../mock";
|
|
7
|
+
export var getResourceList = /*#__PURE__*/function () {
|
|
8
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
9
|
+
var _yield$request$getReq, data, resourceList;
|
|
10
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11
|
+
while (1) switch (_context.prev = _context.next) {
|
|
12
|
+
case 0:
|
|
13
|
+
_context.next = 2;
|
|
14
|
+
return request.getRequest().get("/shop/schedule/resource/list", params);
|
|
15
|
+
case 2:
|
|
16
|
+
_yield$request$getReq = _context.sent;
|
|
17
|
+
data = _yield$request$getReq.data;
|
|
18
|
+
resourceList = (data || {}).concat([getNoResource2({})]);
|
|
19
|
+
return _context.abrupt("return", {
|
|
20
|
+
list: resourceList,
|
|
21
|
+
listMap: resourceList.reduce(function (prev, item) {
|
|
22
|
+
prev[item.id] = item;
|
|
23
|
+
return prev;
|
|
24
|
+
}, {})
|
|
25
|
+
});
|
|
26
|
+
case 6:
|
|
27
|
+
case "end":
|
|
28
|
+
return _context.stop();
|
|
29
|
+
}
|
|
30
|
+
}, _callee);
|
|
31
|
+
}));
|
|
32
|
+
return function getResourceList(_x) {
|
|
33
|
+
return _ref.apply(this, arguments);
|
|
34
|
+
};
|
|
35
|
+
}();
|
|
36
|
+
export var createBookings = /*#__PURE__*/function () {
|
|
37
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
38
|
+
var _yield$request$getReq2, data;
|
|
39
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
40
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
41
|
+
case 0:
|
|
42
|
+
_context2.next = 2;
|
|
43
|
+
return request.getRequest().post("/shop/v1.1/order/appointment", params);
|
|
44
|
+
case 2:
|
|
45
|
+
_yield$request$getReq2 = _context2.sent;
|
|
46
|
+
data = _yield$request$getReq2.data;
|
|
47
|
+
return _context2.abrupt("return", data);
|
|
48
|
+
case 5:
|
|
49
|
+
case "end":
|
|
50
|
+
return _context2.stop();
|
|
51
|
+
}
|
|
52
|
+
}, _callee2);
|
|
53
|
+
}));
|
|
54
|
+
return function createBookings(_x2) {
|
|
55
|
+
return _ref2.apply(this, arguments);
|
|
56
|
+
};
|
|
57
|
+
}();
|
|
58
|
+
export var editBookings = /*#__PURE__*/function () {
|
|
59
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params, id) {
|
|
60
|
+
var _yield$request$getReq3, data;
|
|
61
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
62
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
63
|
+
case 0:
|
|
64
|
+
_context3.next = 2;
|
|
65
|
+
return request.getRequest().put("/shop/v1.1/order/appointment/".concat(id), params);
|
|
66
|
+
case 2:
|
|
67
|
+
_yield$request$getReq3 = _context3.sent;
|
|
68
|
+
data = _yield$request$getReq3.data;
|
|
69
|
+
return _context3.abrupt("return", data);
|
|
70
|
+
case 5:
|
|
71
|
+
case "end":
|
|
72
|
+
return _context3.stop();
|
|
73
|
+
}
|
|
74
|
+
}, _callee3);
|
|
75
|
+
}));
|
|
76
|
+
return function editBookings(_x3, _x4) {
|
|
77
|
+
return _ref3.apply(this, arguments);
|
|
78
|
+
};
|
|
79
|
+
}();
|