@pisell/private-materials 3.0.60 → 3.0.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.js +6 -6
- package/build/lowcode/view.js +5 -5
- package/es/components/booking/addons/index.d.ts +1 -1
- package/es/components/booking/addons/model.d.ts +2 -1
- package/es/components/booking/components/customSelect/index.js +40 -7
- package/es/components/booking/components/footer/index.js +11 -10
- package/es/components/booking/components/footer/utils.js +12 -7
- package/es/components/booking/deposit/index.js +2 -1
- package/es/components/booking/forms/forms.d.ts +1 -1
- package/es/components/booking/forms/index.d.ts +1 -1
- package/es/components/booking/forms/index.js +136 -63
- package/es/components/booking/forms/model.d.ts +2 -1
- package/es/components/booking/forms/single/index.js +1 -1
- package/es/components/booking/index.d.ts +1 -1
- package/es/components/booking/info/client/index.js +124 -31
- package/es/components/booking/info/client/serve.d.ts +2 -0
- package/es/components/booking/info/client/serve.js +51 -0
- package/es/components/booking/info/index.d.ts +1 -1
- package/es/components/booking/info/index.js +8 -5
- package/es/components/booking/info/model.d.ts +2 -1
- package/es/components/booking/info/pet/index.js +4 -2
- package/es/components/booking/info/service/addService/index.js +0 -1
- package/es/components/booking/model.d.ts +3 -1
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +2 -1
- package/es/components/booking/payments/index.d.ts +1 -1
- package/es/components/booking/payments/model.d.ts +2 -1
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +2 -1
- package/lib/components/booking/addons/index.d.ts +1 -1
- package/lib/components/booking/addons/model.d.ts +2 -1
- package/lib/components/booking/components/customSelect/index.js +4 -4
- package/lib/components/booking/components/footer/index.js +3 -2
- package/lib/components/booking/components/footer/utils.js +8 -5
- package/lib/components/booking/deposit/index.js +2 -1
- package/lib/components/booking/forms/forms.d.ts +1 -1
- package/lib/components/booking/forms/index.d.ts +1 -1
- package/lib/components/booking/forms/index.js +38 -3
- package/lib/components/booking/forms/model.d.ts +2 -1
- package/lib/components/booking/forms/single/index.js +1 -1
- package/lib/components/booking/index.d.ts +1 -1
- package/lib/components/booking/info/client/index.js +40 -9
- package/lib/components/booking/info/client/serve.d.ts +2 -0
- package/lib/components/booking/info/client/serve.js +39 -0
- package/lib/components/booking/info/index.d.ts +1 -1
- package/lib/components/booking/info/index.js +5 -2
- package/lib/components/booking/info/model.d.ts +2 -1
- package/lib/components/booking/info/pet/index.js +2 -1
- package/lib/components/booking/info/service/addService/index.js +0 -1
- package/lib/components/booking/model.d.ts +3 -1
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +2 -1
- package/lib/components/booking/payments/index.d.ts +1 -1
- package/lib/components/booking/payments/model.d.ts +2 -1
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +2 -1
- package/package.json +3 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -1,8 +1,12 @@
|
|
|
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); }
|
|
1
2
|
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); }
|
|
2
3
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3
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."); }
|
|
4
5
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
6
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
7
|
+
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; }
|
|
8
|
+
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); } }
|
|
9
|
+
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); }); }; }
|
|
6
10
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
7
11
|
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."); }
|
|
8
12
|
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); }
|
|
@@ -165,9 +169,23 @@ var CustomSelect = function CustomSelect(props, ref) {
|
|
|
165
169
|
* @Author: zhiwei.Wang
|
|
166
170
|
* @Date: 2024-01-30 16:46
|
|
167
171
|
*/
|
|
168
|
-
var _onValueChange = function
|
|
169
|
-
|
|
170
|
-
|
|
172
|
+
var _onValueChange = /*#__PURE__*/function () {
|
|
173
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_val) {
|
|
174
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
175
|
+
while (1) switch (_context.prev = _context.next) {
|
|
176
|
+
case 0:
|
|
177
|
+
_context.next = 2;
|
|
178
|
+
return onValueChange(_val);
|
|
179
|
+
case 2:
|
|
180
|
+
case "end":
|
|
181
|
+
return _context.stop();
|
|
182
|
+
}
|
|
183
|
+
}, _callee);
|
|
184
|
+
}));
|
|
185
|
+
return function _onValueChange(_x2) {
|
|
186
|
+
return _ref.apply(this, arguments);
|
|
187
|
+
};
|
|
188
|
+
}();
|
|
171
189
|
|
|
172
190
|
/**
|
|
173
191
|
* @title: 选择
|
|
@@ -266,10 +284,25 @@ var CustomSelect = function CustomSelect(props, ref) {
|
|
|
266
284
|
* @Author: zhiwei.Wang
|
|
267
285
|
* @Date: 2024-01-30 16:47
|
|
268
286
|
*/
|
|
269
|
-
var handleApply = function
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
287
|
+
var handleApply = /*#__PURE__*/function () {
|
|
288
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_val) {
|
|
289
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
290
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
291
|
+
case 0:
|
|
292
|
+
_context2.next = 2;
|
|
293
|
+
return _onValueChange(_val || _value);
|
|
294
|
+
case 2:
|
|
295
|
+
closeDrawer();
|
|
296
|
+
case 3:
|
|
297
|
+
case "end":
|
|
298
|
+
return _context2.stop();
|
|
299
|
+
}
|
|
300
|
+
}, _callee2);
|
|
301
|
+
}));
|
|
302
|
+
return function handleApply(_x3) {
|
|
303
|
+
return _ref2.apply(this, arguments);
|
|
304
|
+
};
|
|
305
|
+
}();
|
|
273
306
|
useImperativeHandle(ref, function () {
|
|
274
307
|
return {
|
|
275
308
|
open: handleOpenModal,
|
|
@@ -40,7 +40,7 @@ import { DownOutlined } from "@ant-design/icons";
|
|
|
40
40
|
* @Date: 2024-01-30 16:51
|
|
41
41
|
*/
|
|
42
42
|
var Footer = function Footer(props) {
|
|
43
|
-
var _context$appHelper, _store$getState, _store$getState$call, _store$getState$call$, _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig4, _state$addons2, _state$addons4, _state$
|
|
43
|
+
var _context$appHelper, _store$getState, _store$getState$call, _store$getState$call$, _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig4, _state$addons2, _state$addons4, _state$bookingDetail11;
|
|
44
44
|
var state = props.state,
|
|
45
45
|
buttons = props.buttons,
|
|
46
46
|
dispatch = props.dispatch,
|
|
@@ -444,7 +444,7 @@ var Footer = function Footer(props) {
|
|
|
444
444
|
}, [isEdit, checkoutLoading, isDisabled, state, source]);
|
|
445
445
|
var handleMenuClick = /*#__PURE__*/function () {
|
|
446
446
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(e) {
|
|
447
|
-
var id, customer, res, _state$bookingDetail;
|
|
447
|
+
var id, customer, res, _state$bookingDetail, _state$bookingDetail2;
|
|
448
448
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
449
449
|
while (1) switch (_context6.prev = _context6.next) {
|
|
450
450
|
case 0:
|
|
@@ -473,7 +473,8 @@ var Footer = function Footer(props) {
|
|
|
473
473
|
id: id,
|
|
474
474
|
is_deposit: state.bookingDetail.is_deposit || Number((_state$bookingDetail = state.bookingDetail) === null || _state$bookingDetail === void 0 ? void 0 : _state$bookingDetail.deposit_amount),
|
|
475
475
|
deposit_payment_time: state.bookingDetail.deposit_payment_time,
|
|
476
|
-
customer: customer
|
|
476
|
+
customer: customer,
|
|
477
|
+
contacts: (_state$bookingDetail2 = state.bookingDetail) === null || _state$bookingDetail2 === void 0 ? void 0 : _state$bookingDetail2.contacts
|
|
477
478
|
},
|
|
478
479
|
callback: function callback() {}
|
|
479
480
|
});
|
|
@@ -586,10 +587,10 @@ var Footer = function Footer(props) {
|
|
|
586
587
|
* @Date: 2024-01-30 16:58
|
|
587
588
|
*/
|
|
588
589
|
var isCheckout = useMemo(function () {
|
|
589
|
-
var _state$
|
|
590
|
+
var _state$bookingDetail3, _state$bookingDetail4, _state$bookingDetail5;
|
|
590
591
|
var list = ["unfulfilled", "partially_paid", "unpaid", "payment_processing"];
|
|
591
592
|
// (支付状态 = 已支付 || 部分付款 || 未付款 || 支付处理中) && 预约状态 !== 已取消
|
|
592
|
-
if (!state.bookingId || ((_state$
|
|
593
|
+
if (!state.bookingId || ((_state$bookingDetail3 = state.bookingDetail) === null || _state$bookingDetail3 === void 0 ? void 0 : (_state$bookingDetail4 = _state$bookingDetail3.bookings) === null || _state$bookingDetail4 === void 0 ? void 0 : _state$bookingDetail4.appointment_status) !== "cancelled" && list.includes(state === null || state === void 0 ? void 0 : (_state$bookingDetail5 = state.bookingDetail) === null || _state$bookingDetail5 === void 0 ? void 0 : _state$bookingDetail5.payment_status) && !state.disabledEdit) {
|
|
593
594
|
return true;
|
|
594
595
|
} else {
|
|
595
596
|
if (total.notPaidAmount > 0) {
|
|
@@ -664,8 +665,8 @@ var Footer = function Footer(props) {
|
|
|
664
665
|
* 是否只有定金支付
|
|
665
666
|
*/
|
|
666
667
|
var isOnlyDeposit = useMemo(function () {
|
|
667
|
-
var _state$
|
|
668
|
-
if (state !== null && state !== void 0 && (_state$
|
|
668
|
+
var _state$bookingDetail6, _state$bookingDetail7, _state$bookingDetail8, _state$bookingDetail9;
|
|
669
|
+
if (state !== null && state !== void 0 && (_state$bookingDetail6 = state.bookingDetail) !== null && _state$bookingDetail6 !== void 0 && _state$bookingDetail6.deposit_payment_time && state !== null && state !== void 0 && (_state$bookingDetail7 = state.bookingDetail) !== null && _state$bookingDetail7 !== void 0 && (_state$bookingDetail8 = _state$bookingDetail7.payment_types) !== null && _state$bookingDetail8 !== void 0 && (_state$bookingDetail9 = _state$bookingDetail8.every) !== null && _state$bookingDetail9 !== void 0 && _state$bookingDetail9.call(_state$bookingDetail8, function (item) {
|
|
669
670
|
return item === 'deposit';
|
|
670
671
|
})) {
|
|
671
672
|
return true;
|
|
@@ -686,8 +687,8 @@ var Footer = function Footer(props) {
|
|
|
686
687
|
|
|
687
688
|
// 只有定金支付时,直接展示
|
|
688
689
|
if (isOnlyDeposit) {
|
|
689
|
-
var _state$
|
|
690
|
-
return "".concat(locales.getText("pisell2.text.deposit-paid"), " ").concat(formatAmount(state === null || state === void 0 ? void 0 : (_state$
|
|
690
|
+
var _state$bookingDetail10;
|
|
691
|
+
return "".concat(locales.getText("pisell2.text.deposit-paid"), " ").concat(formatAmount(state === null || state === void 0 ? void 0 : (_state$bookingDetail10 = state.bookingDetail) === null || _state$bookingDetail10 === void 0 ? void 0 : _state$bookingDetail10.deposit_amount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || "$"), " ").concat(total.duration ? "(".concat(total.duration, ")") : "");
|
|
691
692
|
}
|
|
692
693
|
|
|
693
694
|
// 有退款金额时, 直接展示 退款:$8.00
|
|
@@ -811,7 +812,7 @@ var Footer = function Footer(props) {
|
|
|
811
812
|
className: "order-total-item-label"
|
|
812
813
|
}, locales.getText("pisell1.text.subtotal")), /*#__PURE__*/React.createElement("span", {
|
|
813
814
|
className: "order-total-item-value"
|
|
814
|
-
}, formatAmount(total.productAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || "$"))), (((_state$
|
|
815
|
+
}, formatAmount(total.productAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || "$"))), (((_state$bookingDetail11 = state.bookingDetail) === null || _state$bookingDetail11 === void 0 ? void 0 : _state$bookingDetail11.surcharge) || []).map(function (d) {
|
|
815
816
|
return /*#__PURE__*/React.createElement("div", {
|
|
816
817
|
className: "order-total-item",
|
|
817
818
|
key: d.id
|
|
@@ -135,16 +135,16 @@ var formatBookings = function formatBookings(data) {
|
|
|
135
135
|
/**
|
|
136
136
|
* @title: 预约主体信息
|
|
137
137
|
* @description:
|
|
138
|
-
* @param {any}
|
|
138
|
+
* @param {any} state
|
|
139
139
|
* @param {any} values
|
|
140
140
|
* @return {*}
|
|
141
141
|
* @Author: zhiwei.Wang
|
|
142
142
|
* @Date: 2024-02-19 09:26
|
|
143
143
|
*/
|
|
144
|
-
var formatHolder = function formatHolder(
|
|
145
|
-
var
|
|
146
|
-
var form_id = (
|
|
147
|
-
var petValue = ((
|
|
144
|
+
var formatHolder = function formatHolder(state, values) {
|
|
145
|
+
var _state$bookingConfig, _state$bookingConfig$, _state$bookingConfig$2, _state$bookingConfig$3, _state$pet$value, _state$pet, _state$pet$originValu, _state$pet$originValu2;
|
|
146
|
+
var form_id = (state === null || state === void 0 ? void 0 : (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 ? void 0 : (_state$bookingConfig$ = _state$bookingConfig.config) === null || _state$bookingConfig$ === void 0 ? void 0 : (_state$bookingConfig$2 = _state$bookingConfig$.basic) === null || _state$bookingConfig$2 === void 0 ? void 0 : (_state$bookingConfig$3 = _state$bookingConfig$2.appointment_subject) === null || _state$bookingConfig$3 === void 0 ? void 0 : _state$bookingConfig$3.form_id) || 0;
|
|
147
|
+
var petValue = ((_state$pet$value = state.pet.value) === null || _state$pet$value === void 0 ? void 0 : _state$pet$value[form_id]) || [];
|
|
148
148
|
var obj = {
|
|
149
149
|
customer_id: values.customer_id,
|
|
150
150
|
form_id: form_id,
|
|
@@ -154,8 +154,13 @@ var formatHolder = function formatHolder(data, values) {
|
|
|
154
154
|
};
|
|
155
155
|
|
|
156
156
|
// 如果 value 为 空 并且originValue有值, 说明接口还没返回 这时候直接用接口的值
|
|
157
|
-
if (!petValue.length && (
|
|
158
|
-
obj.form_record =
|
|
157
|
+
if (!petValue.length && (_state$pet = state.pet) !== null && _state$pet !== void 0 && (_state$pet$originValu = _state$pet.originValue) !== null && _state$pet$originValu !== void 0 && (_state$pet$originValu2 = _state$pet$originValu.form_record) !== null && _state$pet$originValu2 !== void 0 && _state$pet$originValu2.length) {
|
|
158
|
+
obj.form_record = state.pet.originValue.form_record;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// 连锁加盟子店铺 增加参数
|
|
162
|
+
if (state.isFranchisee) {
|
|
163
|
+
obj.is_source_shop = 1;
|
|
159
164
|
}
|
|
160
165
|
return obj;
|
|
161
166
|
};
|
|
@@ -54,7 +54,8 @@ var Deposit = function Deposit(props) {
|
|
|
54
54
|
id: id,
|
|
55
55
|
is_deposit: 1,
|
|
56
56
|
deposit_payment_time: bookingDetail.deposit_payment_time,
|
|
57
|
-
customer: bookingDetail.customer
|
|
57
|
+
customer: bookingDetail.customer,
|
|
58
|
+
contacts: bookingDetail === null || bookingDetail === void 0 ? void 0 : bookingDetail.contacts
|
|
58
59
|
},
|
|
59
60
|
callback: function callback() {}
|
|
60
61
|
});
|
|
@@ -52,68 +52,136 @@ var Forms = Provider(function (props) {
|
|
|
52
52
|
geForms();
|
|
53
53
|
}
|
|
54
54
|
}, [(_state$bookingDetail2 = state.bookingDetail) === null || _state$bookingDetail2 === void 0 ? void 0 : (_state$bookingDetail3 = _state$bookingDetail2.bookings) === null || _state$bookingDetail3 === void 0 ? void 0 : _state$bookingDetail3.id, (_state$client = state.client) === null || _state$client === void 0 ? void 0 : (_state$client$value = _state$client.value) === null || _state$client$value === void 0 ? void 0 : _state$client$value.id]);
|
|
55
|
+
var getFranchiseeCompositeData = /*#__PURE__*/function () {
|
|
56
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref2) {
|
|
57
|
+
var request, params, arr, res;
|
|
58
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
59
|
+
while (1) switch (_context.prev = _context.next) {
|
|
60
|
+
case 0:
|
|
61
|
+
request = _ref2.request, params = _ref2.params;
|
|
62
|
+
arr = [];
|
|
63
|
+
arr.push(request(params));
|
|
64
|
+
if (state.isFranchisee) {
|
|
65
|
+
arr.push(request(_objectSpread(_objectSpread({}, params), {}, {
|
|
66
|
+
source_shop_customer: 1
|
|
67
|
+
})));
|
|
68
|
+
}
|
|
69
|
+
_context.next = 6;
|
|
70
|
+
return Promise.all(arr);
|
|
71
|
+
case 6:
|
|
72
|
+
res = _context.sent;
|
|
73
|
+
return _context.abrupt("return", res);
|
|
74
|
+
case 8:
|
|
75
|
+
case "end":
|
|
76
|
+
return _context.stop();
|
|
77
|
+
}
|
|
78
|
+
}, _callee);
|
|
79
|
+
}));
|
|
80
|
+
return function getFranchiseeCompositeData(_x2) {
|
|
81
|
+
return _ref3.apply(this, arguments);
|
|
82
|
+
};
|
|
83
|
+
}();
|
|
84
|
+
var getFranchiseeForms = /*#__PURE__*/function () {
|
|
85
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
86
|
+
var res, arr;
|
|
87
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
88
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
89
|
+
case 0:
|
|
90
|
+
_context2.next = 2;
|
|
91
|
+
return getFranchiseeCompositeData({
|
|
92
|
+
request: state.apis.getForms,
|
|
93
|
+
params: params
|
|
94
|
+
});
|
|
95
|
+
case 2:
|
|
96
|
+
res = _context2.sent;
|
|
97
|
+
if (!state.isFranchisee) {
|
|
98
|
+
_context2.next = 7;
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
arr = [];
|
|
102
|
+
res.forEach(function (item, index) {
|
|
103
|
+
arr = arr.concat(item.map(function (d) {
|
|
104
|
+
return _objectSpread(_objectSpread({}, d), {}, {
|
|
105
|
+
is_franchisor: index === 1 ? 1 : 0
|
|
106
|
+
});
|
|
107
|
+
}));
|
|
108
|
+
});
|
|
109
|
+
return _context2.abrupt("return", arr);
|
|
110
|
+
case 7:
|
|
111
|
+
return _context2.abrupt("return", res[0]);
|
|
112
|
+
case 8:
|
|
113
|
+
case "end":
|
|
114
|
+
return _context2.stop();
|
|
115
|
+
}
|
|
116
|
+
}, _callee2);
|
|
117
|
+
}));
|
|
118
|
+
return function getFranchiseeForms(_x3) {
|
|
119
|
+
return _ref4.apply(this, arguments);
|
|
120
|
+
};
|
|
121
|
+
}();
|
|
55
122
|
var getFormDataById = /*#__PURE__*/function () {
|
|
56
|
-
var
|
|
123
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(item) {
|
|
57
124
|
var _state$client2, _state$client2$value;
|
|
58
125
|
var _params, options, isCustomerForm, data;
|
|
59
|
-
return _regeneratorRuntime().wrap(function
|
|
60
|
-
while (1) switch (
|
|
126
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
127
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
61
128
|
case 0:
|
|
62
129
|
_params = {
|
|
63
130
|
form_id: item.form_id,
|
|
64
131
|
skip: 1,
|
|
65
|
-
num: 999
|
|
132
|
+
num: 999,
|
|
133
|
+
source_shop_customer: item.is_franchisor ? 1 : 0
|
|
66
134
|
};
|
|
67
135
|
options = []; // 客户数据 && 已经选择了客户
|
|
68
136
|
isCustomerForm = item.data_range === "customer" && !isWalkIn((_state$client2 = state.client) === null || _state$client2 === void 0 ? void 0 : (_state$client2$value = _state$client2.value) === null || _state$client2$value === void 0 ? void 0 : _state$client2$value.id); // 只有 客户数据 && 已经选择了客户 或者不是客户表单的才请求接口
|
|
69
137
|
if (!(item.data_range !== "customer" || isCustomerForm)) {
|
|
70
|
-
|
|
138
|
+
_context3.next = 9;
|
|
71
139
|
break;
|
|
72
140
|
}
|
|
73
141
|
if (isCustomerForm) {
|
|
74
142
|
_params.customer_id = state.client.value.id;
|
|
75
143
|
}
|
|
76
|
-
|
|
144
|
+
_context3.next = 7;
|
|
77
145
|
return state.apis.getPetsData(_params);
|
|
78
146
|
case 7:
|
|
79
|
-
data =
|
|
147
|
+
data = _context3.sent;
|
|
80
148
|
options = (data === null || data === void 0 ? void 0 : data.list) || [];
|
|
81
149
|
case 9:
|
|
82
|
-
return
|
|
150
|
+
return _context3.abrupt("return", _objectSpread(_objectSpread({}, item), {}, {
|
|
83
151
|
options: options
|
|
84
152
|
}));
|
|
85
153
|
case 10:
|
|
86
154
|
case "end":
|
|
87
|
-
return
|
|
155
|
+
return _context3.stop();
|
|
88
156
|
}
|
|
89
|
-
},
|
|
157
|
+
}, _callee3);
|
|
90
158
|
}));
|
|
91
|
-
return function getFormDataById(
|
|
92
|
-
return
|
|
159
|
+
return function getFormDataById(_x4) {
|
|
160
|
+
return _ref5.apply(this, arguments);
|
|
93
161
|
};
|
|
94
162
|
}();
|
|
95
163
|
var getFormData = /*#__PURE__*/function () {
|
|
96
|
-
var
|
|
164
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
97
165
|
var formList,
|
|
98
166
|
all,
|
|
99
|
-
|
|
100
|
-
return _regeneratorRuntime().wrap(function
|
|
101
|
-
while (1) switch (
|
|
167
|
+
_args4 = arguments;
|
|
168
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
169
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
102
170
|
case 0:
|
|
103
|
-
formList =
|
|
171
|
+
formList = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : [];
|
|
104
172
|
all = [];
|
|
105
173
|
all = formList.map(function (d) {
|
|
106
174
|
return getFormDataById(d);
|
|
107
175
|
});
|
|
108
|
-
return
|
|
176
|
+
return _context4.abrupt("return", Promise.all(all));
|
|
109
177
|
case 4:
|
|
110
178
|
case "end":
|
|
111
|
-
return
|
|
179
|
+
return _context4.stop();
|
|
112
180
|
}
|
|
113
|
-
},
|
|
181
|
+
}, _callee4);
|
|
114
182
|
}));
|
|
115
183
|
return function getFormData() {
|
|
116
|
-
return
|
|
184
|
+
return _ref6.apply(this, arguments);
|
|
117
185
|
};
|
|
118
186
|
}();
|
|
119
187
|
var getFormValues = function getFormValues(data) {
|
|
@@ -133,21 +201,21 @@ var Forms = Provider(function (props) {
|
|
|
133
201
|
return _values;
|
|
134
202
|
};
|
|
135
203
|
var geForms = /*#__PURE__*/function () {
|
|
136
|
-
var
|
|
204
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
137
205
|
var data, formData;
|
|
138
|
-
return _regeneratorRuntime().wrap(function
|
|
139
|
-
while (1) switch (
|
|
206
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
207
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
140
208
|
case 0:
|
|
141
209
|
setLoading(true);
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
return
|
|
210
|
+
_context5.prev = 1;
|
|
211
|
+
_context5.next = 4;
|
|
212
|
+
return getFranchiseeForms({
|
|
145
213
|
relation_type: relation_type,
|
|
146
214
|
relation_id: state.bookingDetail.bookings.id
|
|
147
215
|
// _config: { useCache: true },
|
|
148
216
|
});
|
|
149
217
|
case 4:
|
|
150
|
-
data =
|
|
218
|
+
data = _context5.sent;
|
|
151
219
|
data = data || [];
|
|
152
220
|
if (params.type === "form") {
|
|
153
221
|
// 去除预约主体
|
|
@@ -155,10 +223,11 @@ var Forms = Provider(function (props) {
|
|
|
155
223
|
return d.form_id !== (params === null || params === void 0 ? void 0 : params.form_id);
|
|
156
224
|
});
|
|
157
225
|
}
|
|
158
|
-
|
|
226
|
+
console.log("datadata", data);
|
|
227
|
+
_context5.next = 10;
|
|
159
228
|
return getFormData(data);
|
|
160
|
-
case
|
|
161
|
-
formData =
|
|
229
|
+
case 10:
|
|
230
|
+
formData = _context5.sent;
|
|
162
231
|
dispatch({
|
|
163
232
|
type: "setForm",
|
|
164
233
|
payload: {
|
|
@@ -167,21 +236,21 @@ var Forms = Provider(function (props) {
|
|
|
167
236
|
}
|
|
168
237
|
});
|
|
169
238
|
setLoading(false);
|
|
170
|
-
|
|
239
|
+
_context5.next = 19;
|
|
171
240
|
break;
|
|
172
|
-
case
|
|
173
|
-
|
|
174
|
-
|
|
241
|
+
case 15:
|
|
242
|
+
_context5.prev = 15;
|
|
243
|
+
_context5.t0 = _context5["catch"](1);
|
|
175
244
|
setLoading(false);
|
|
176
|
-
console.log("form_error",
|
|
177
|
-
case
|
|
245
|
+
console.log("form_error", _context5.t0);
|
|
246
|
+
case 19:
|
|
178
247
|
case "end":
|
|
179
|
-
return
|
|
248
|
+
return _context5.stop();
|
|
180
249
|
}
|
|
181
|
-
},
|
|
250
|
+
}, _callee5, null, [[1, 15]]);
|
|
182
251
|
}));
|
|
183
252
|
return function geForms() {
|
|
184
|
-
return
|
|
253
|
+
return _ref7.apply(this, arguments);
|
|
185
254
|
};
|
|
186
255
|
}();
|
|
187
256
|
useEffect(function () {
|
|
@@ -196,9 +265,13 @@ var Forms = Provider(function (props) {
|
|
|
196
265
|
});
|
|
197
266
|
}, []);
|
|
198
267
|
useEffect(function () {
|
|
268
|
+
var _context$appHelper2, _context$appHelper2$u, _context$appHelper2$u2, _context$appHelper2$u3;
|
|
269
|
+
var isFranchisee = 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.businessUtils) === null || _context$appHelper2$u2 === void 0 ? void 0 : (_context$appHelper2$u3 = _context$appHelper2$u2.getAppByModal) === null || _context$appHelper2$u3 === void 0 ? void 0 : _context$appHelper2$u3.call(_context$appHelper2$u2, "franchisee");
|
|
199
270
|
dispatch({
|
|
200
271
|
type: "setState",
|
|
201
|
-
payload: _objectSpread({}, globalState)
|
|
272
|
+
payload: _objectSpread(_objectSpread({}, globalState), {}, {
|
|
273
|
+
isFranchisee: isFranchisee
|
|
274
|
+
})
|
|
202
275
|
});
|
|
203
276
|
}, [globalState]);
|
|
204
277
|
|
|
@@ -206,34 +279,34 @@ var Forms = Provider(function (props) {
|
|
|
206
279
|
// type: single table multiple form
|
|
207
280
|
|
|
208
281
|
var saveBookingFormData = /*#__PURE__*/function () {
|
|
209
|
-
var
|
|
282
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
|
|
210
283
|
var data;
|
|
211
|
-
return _regeneratorRuntime().wrap(function
|
|
212
|
-
while (1) switch (
|
|
284
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
285
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
213
286
|
case 0:
|
|
214
|
-
|
|
215
|
-
|
|
287
|
+
_context6.prev = 0;
|
|
288
|
+
_context6.next = 3;
|
|
216
289
|
return state.apis.saveBookingFormData(params);
|
|
217
290
|
case 3:
|
|
218
|
-
data =
|
|
291
|
+
data = _context6.sent;
|
|
219
292
|
message.success(locales.getText("pisell2.text.forms") + locales.getText("pisell2.text.updated"));
|
|
220
293
|
state === null || state === void 0 ? void 0 : state.callback({
|
|
221
294
|
order_id: state.bookingId,
|
|
222
295
|
afterCloseUpdate: true
|
|
223
296
|
});
|
|
224
|
-
|
|
297
|
+
_context6.next = 10;
|
|
225
298
|
break;
|
|
226
299
|
case 8:
|
|
227
|
-
|
|
228
|
-
|
|
300
|
+
_context6.prev = 8;
|
|
301
|
+
_context6.t0 = _context6["catch"](0);
|
|
229
302
|
case 10:
|
|
230
303
|
case "end":
|
|
231
|
-
return
|
|
304
|
+
return _context6.stop();
|
|
232
305
|
}
|
|
233
|
-
},
|
|
306
|
+
}, _callee6, null, [[0, 8]]);
|
|
234
307
|
}));
|
|
235
|
-
return function saveBookingFormData(
|
|
236
|
-
return
|
|
308
|
+
return function saveBookingFormData(_x5) {
|
|
309
|
+
return _ref8.apply(this, arguments);
|
|
237
310
|
};
|
|
238
311
|
}();
|
|
239
312
|
var onValueChange = function onValueChange(data) {
|
|
@@ -256,16 +329,16 @@ var Forms = Provider(function (props) {
|
|
|
256
329
|
});
|
|
257
330
|
};
|
|
258
331
|
var addCallback = /*#__PURE__*/function () {
|
|
259
|
-
var
|
|
332
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(form) {
|
|
260
333
|
var _data, data;
|
|
261
|
-
return _regeneratorRuntime().wrap(function
|
|
262
|
-
while (1) switch (
|
|
334
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
335
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
263
336
|
case 0:
|
|
264
337
|
_data = _toConsumableArray(state.form.forms);
|
|
265
|
-
|
|
338
|
+
_context7.next = 3;
|
|
266
339
|
return getFormDataById(form);
|
|
267
340
|
case 3:
|
|
268
|
-
data =
|
|
341
|
+
data = _context7.sent;
|
|
269
342
|
_data = _data.map(function (d) {
|
|
270
343
|
return d.form_id === form.form_id ? data : d;
|
|
271
344
|
});
|
|
@@ -277,12 +350,12 @@ var Forms = Provider(function (props) {
|
|
|
277
350
|
});
|
|
278
351
|
case 6:
|
|
279
352
|
case "end":
|
|
280
|
-
return
|
|
353
|
+
return _context7.stop();
|
|
281
354
|
}
|
|
282
|
-
},
|
|
355
|
+
}, _callee7);
|
|
283
356
|
}));
|
|
284
|
-
return function addCallback(
|
|
285
|
-
return
|
|
357
|
+
return function addCallback(_x6) {
|
|
358
|
+
return _ref9.apply(this, arguments);
|
|
286
359
|
};
|
|
287
360
|
}();
|
|
288
361
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !!state.setGlobalState ? /*#__PURE__*/React.createElement(TabPane, {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Booking: (props: any) =>
|
|
1
|
+
declare const Booking: (props: any) => any;
|
|
2
2
|
export default Booking;
|