@pisell/private-materials 6.2.48 → 6.2.50
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 +2 -2
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +27 -3
- package/es/components/appointmentBooking/components/Content/index.js +3 -3
- package/es/components/appointmentBooking/components/Services/index.js +36 -18
- package/es/components/appointmentBooking/components/Voucher/index.js +6 -5
- package/es/components/appointmentBooking/hooks.js +10 -2
- package/es/components/appointmentBooking/index.js +10 -0
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/footer/index.js +12 -1
- package/es/components/booking/editBookingModal/index.js +8 -2
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/locales.d.ts +6 -0
- package/es/components/booking/locales.js +21 -9
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/linkly/hooks/normal.js +3 -3
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +25 -4
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +34 -8
- package/es/components/index.d.ts +3 -1
- package/es/components/index.js +3 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +6 -3
- package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +112 -24
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +38 -2
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.js +78 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +6 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +9 -0
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/pay/toC/utils.js +1 -1
- package/es/components/pinModal/hooks.d.ts +7 -0
- package/es/components/pinModal/hooks.js +65 -0
- package/es/components/pinModal/index.d.ts +4 -0
- package/es/components/pinModal/index.js +98 -0
- package/es/components/pinModal/index.less +44 -0
- package/es/components/pinModal/locales.d.ts +27 -0
- package/es/components/pinModal/locales.js +26 -0
- package/es/components/pinModal/serve.d.ts +6 -0
- package/es/components/pinModal/serve.js +11 -0
- package/es/components/pinModal/types.d.ts +0 -0
- package/es/components/pinModal/types.js +0 -0
- package/es/components/pinVerifyModal/hooks.d.ts +7 -0
- package/es/components/pinVerifyModal/hooks.js +80 -0
- package/es/components/pinVerifyModal/index.d.ts +5 -0
- package/es/components/pinVerifyModal/index.js +218 -0
- package/es/components/pinVerifyModal/index.less +92 -0
- package/es/components/pinVerifyModal/locales.d.ts +24 -0
- package/es/components/pinVerifyModal/locales.js +23 -0
- package/es/components/pinVerifyModal/types.d.ts +33 -0
- package/es/components/pinVerifyModal/types.js +1 -0
- package/es/components/ruleSetting/locales.js +3 -3
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/ticketBooking/components/ticketBooking/index.js +58 -10
- package/es/components/ticketBooking/components/timeBar/index.js +2 -1
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/components/wallet/Detail/index.js +251 -63
- package/es/components/wallet/Detail/locales.d.ts +51 -0
- package/es/components/wallet/Detail/locales.js +57 -3
- package/es/components/wallet/Detail/model.d.ts +1 -13
- package/es/components/wallet/Detail/serve.js +5 -1
- package/es/components/wallet/DiscountCard/model.d.ts +1 -14
- package/es/components/wallet/PointCard/model.d.ts +1 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/components/UsageRules/index.d.ts +23 -0
- package/es/components/wallet/components/UsageRules/index.js +147 -0
- package/es/components/wallet/components/UsageRules/index.less +157 -0
- package/es/components/wallet/components/WalletCard.js +8 -3
- package/es/components/wallet/components/index.d.ts +1 -0
- package/es/components/wallet/components/index.js +2 -1
- package/es/components/wallet/model.d.ts +1 -9
- package/es/components/walletList/index.js +20 -2
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +22 -2
- package/lib/components/appointmentBooking/components/Content/index.js +2 -2
- package/lib/components/appointmentBooking/components/Services/index.js +13 -3
- package/lib/components/appointmentBooking/components/Voucher/index.js +2 -1
- package/lib/components/appointmentBooking/hooks.js +10 -2
- package/lib/components/appointmentBooking/index.js +6 -0
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/footer/index.js +15 -2
- package/lib/components/booking/components/voucher/index.js +1 -3
- package/lib/components/booking/editBookingModal/index.js +6 -1
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/locales.d.ts +6 -0
- package/lib/components/booking/locales.js +15 -9
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/linkly/hooks/normal.js +3 -3
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +16 -4
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +30 -8
- package/lib/components/index.d.ts +3 -1
- package/lib/components/index.js +6 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +2 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +84 -36
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +38 -2
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.js +18 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +6 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +7 -2
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/pay/toC/utils.js +1 -1
- package/lib/components/pinModal/hooks.d.ts +7 -0
- package/lib/components/pinModal/hooks.js +85 -0
- package/lib/components/pinModal/index.d.ts +4 -0
- package/lib/components/pinModal/index.js +88 -0
- package/lib/components/pinModal/index.less +44 -0
- package/lib/components/pinModal/locales.d.ts +27 -0
- package/lib/components/pinModal/locales.js +50 -0
- package/lib/components/pinModal/serve.d.ts +6 -0
- package/lib/components/pinModal/serve.js +37 -0
- package/lib/components/pinModal/types.d.ts +0 -0
- package/lib/components/pinModal/types.js +0 -0
- package/lib/components/pinVerifyModal/hooks.d.ts +7 -0
- package/lib/components/pinVerifyModal/hooks.js +93 -0
- package/lib/components/pinVerifyModal/index.d.ts +5 -0
- package/lib/components/pinVerifyModal/index.js +230 -0
- package/lib/components/pinVerifyModal/index.less +92 -0
- package/lib/components/pinVerifyModal/locales.d.ts +24 -0
- package/lib/components/pinVerifyModal/locales.js +47 -0
- package/lib/components/pinVerifyModal/types.d.ts +33 -0
- package/lib/components/pinVerifyModal/types.js +17 -0
- package/lib/components/ruleSetting/locales.js +3 -3
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/ticketBooking/components/ticketBooking/index.js +50 -6
- package/lib/components/ticketBooking/components/timeBar/index.js +2 -1
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/components/wallet/Detail/index.js +140 -8
- package/lib/components/wallet/Detail/locales.d.ts +51 -0
- package/lib/components/wallet/Detail/locales.js +57 -3
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- package/lib/components/wallet/Detail/serve.js +6 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
- package/lib/components/wallet/PointCard/model.d.ts +1 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/components/UsageRules/index.d.ts +23 -0
- package/lib/components/wallet/components/UsageRules/index.js +113 -0
- package/lib/components/wallet/components/UsageRules/index.less +157 -0
- package/lib/components/wallet/components/WalletCard.js +3 -1
- package/lib/components/wallet/components/index.d.ts +1 -0
- package/lib/components/wallet/components/index.js +3 -0
- package/lib/components/wallet/model.d.ts +1 -9
- package/lib/components/walletList/index.js +19 -2
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lowcode/pin-modal/meta.ts +37 -0
- package/lowcode/pin-verify-modal/meta.ts +80 -0
- package/package.json +3 -3
@@ -7,7 +7,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
7
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 e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
8
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
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); }); }; }
|
10
|
-
import React, { forwardRef, useImperativeHandle, useEffect } from 'react';
|
10
|
+
import React, { forwardRef, useImperativeHandle, useEffect, useRef } from 'react';
|
11
11
|
import { locales, isMobile } from '@pisell/utils';
|
12
12
|
import useEngineContext from "../../../../hooks/useEngineContext";
|
13
13
|
import { useAppointmentBookingContext } from "../../context";
|
@@ -18,9 +18,12 @@ import { getFormParams } from "./utils";
|
|
18
18
|
import "./index.less";
|
19
19
|
var ConfirmInformation = /*#__PURE__*/forwardRef(function (props, ref) {
|
20
20
|
var _context$appHelper;
|
21
|
+
// 用于跟踪是否已经订阅了事件,避免重复订阅
|
22
|
+
var hasSubscribedRef = useRef(false);
|
21
23
|
var context = useEngineContext();
|
22
24
|
var config = (context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.constants) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.config) || {};
|
23
25
|
var utils = contextUtils();
|
26
|
+
var pubsub = context.appHelper.utils.pubsub;
|
24
27
|
var _ref = useAppointmentBookingContext(),
|
25
28
|
appointmentBooking = _ref.appointmentBooking,
|
26
29
|
summary = _ref.summary,
|
@@ -252,15 +255,36 @@ var ConfirmInformation = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
252
255
|
return _ref4.apply(this, arguments);
|
253
256
|
};
|
254
257
|
}();
|
258
|
+
var handleSubmit = function handleSubmit() {
|
259
|
+
var _utils$businessUtils, _utils$businessUtils$;
|
260
|
+
// 如果用户是guest用户,下单时则拉起注册弹窗
|
261
|
+
if (utils !== null && utils !== void 0 && (_utils$businessUtils = utils.businessUtils) !== null && _utils$businessUtils !== void 0 && (_utils$businessUtils$ = _utils$businessUtils.isGuestUser) !== null && _utils$businessUtils$ !== void 0 && _utils$businessUtils$.call(_utils$businessUtils)) {
|
262
|
+
var _utils$businessUtils2, _utils$businessUtils3;
|
263
|
+
// 避免重复订阅
|
264
|
+
if (!hasSubscribedRef.current) {
|
265
|
+
pubsub.subscribe('bind.guest.user', handleNext);
|
266
|
+
hasSubscribedRef.current = true;
|
267
|
+
}
|
268
|
+
utils === null || utils === void 0 || (_utils$businessUtils2 = utils.businessUtils) === null || _utils$businessUtils2 === void 0 || (_utils$businessUtils3 = _utils$businessUtils2.openRegisterModal) === null || _utils$businessUtils3 === void 0 || _utils$businessUtils3.call(_utils$businessUtils2, true);
|
269
|
+
return;
|
270
|
+
}
|
271
|
+
handleNext();
|
272
|
+
};
|
273
|
+
useEffect(function () {
|
274
|
+
return function () {
|
275
|
+
pubsub.unsubscribe('bind.guest.user', handleNext);
|
276
|
+
hasSubscribedRef.current = false;
|
277
|
+
};
|
278
|
+
}, []);
|
255
279
|
useImperativeHandle(ref, function () {
|
256
280
|
return {
|
257
|
-
next:
|
281
|
+
next: handleSubmit
|
258
282
|
};
|
259
283
|
});
|
260
284
|
return /*#__PURE__*/React.createElement("div", {
|
261
285
|
className: "appointment-confirm-information-wrap"
|
262
286
|
}, isMobile() ? /*#__PURE__*/React.createElement(CartItem, {
|
263
|
-
onNext:
|
287
|
+
onNext: handleSubmit
|
264
288
|
}) : /*#__PURE__*/React.createElement("div", {
|
265
289
|
className: "appointment-confirm-information-content"
|
266
290
|
}, /*#__PURE__*/React.createElement("div", {
|
@@ -87,7 +87,7 @@ var Layout = function Layout() {
|
|
87
87
|
var pubsub = context.appHelper.utils.pubsub;
|
88
88
|
useEffect(function () {
|
89
89
|
var handleLoginSuccess = /*#__PURE__*/function () {
|
90
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
90
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(res) {
|
91
91
|
var _utils$storage, user, currentUser, accountLists, meAccount;
|
92
92
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
93
93
|
while (1) switch (_context.prev = _context.next) {
|
@@ -118,13 +118,13 @@ var Layout = function Layout() {
|
|
118
118
|
}
|
119
119
|
}, _callee);
|
120
120
|
}));
|
121
|
-
return function handleLoginSuccess() {
|
121
|
+
return function handleLoginSuccess(_x) {
|
122
122
|
return _ref2.apply(this, arguments);
|
123
123
|
};
|
124
124
|
}();
|
125
125
|
pubsub.subscribe('pisell1.login.success', handleLoginSuccess);
|
126
126
|
return function () {
|
127
|
-
pubsub.unsubscribe('pisell1.login.success');
|
127
|
+
pubsub.unsubscribe('pisell1.login.success', handleLoginSuccess);
|
128
128
|
};
|
129
129
|
}, []);
|
130
130
|
useEffect(function () {
|
@@ -99,7 +99,7 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
99
99
|
},
|
100
100
|
callback: function () {
|
101
101
|
var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
102
|
-
var product, session, startDate, endDate, _data$origin, resources, activeStatus, index, stepList, hasResourceStep, description;
|
102
|
+
var product, res, session, startDate, endDate, _res, _data$origin, resources, activeStatus, _res2, index, stepList, hasResourceStep, description;
|
103
103
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
104
104
|
while (1) switch (_context.prev = _context.next) {
|
105
105
|
case 0:
|
@@ -117,7 +117,7 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
117
117
|
|
118
118
|
// 零售模版,直接加入购物车
|
119
119
|
if (!isRetailTemplate) {
|
120
|
-
_context.next =
|
120
|
+
_context.next = 12;
|
121
121
|
break;
|
122
122
|
}
|
123
123
|
if (!(data !== null && data !== void 0 && data.isCancel)) {
|
@@ -126,51 +126,69 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
126
126
|
}
|
127
127
|
return _context.abrupt("return");
|
128
128
|
case 8:
|
129
|
-
appointmentBooking.storeProduct(product);
|
129
|
+
res = appointmentBooking.storeProduct(product);
|
130
|
+
if (!(!res.success && res.errorCode === 'not_enough_stock')) {
|
131
|
+
_context.next = 11;
|
132
|
+
break;
|
133
|
+
}
|
134
|
+
return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.unuse.stock')));
|
135
|
+
case 11:
|
130
136
|
return _context.abrupt("return");
|
131
|
-
case
|
137
|
+
case 12:
|
132
138
|
session = data === null || data === void 0 ? void 0 : data.session;
|
133
139
|
if (!session) {
|
134
|
-
_context.next =
|
140
|
+
_context.next = 24;
|
135
141
|
break;
|
136
142
|
}
|
137
143
|
startDate = dayjs(session === null || session === void 0 ? void 0 : session.start_at).format('YYYY-MM-DD');
|
138
144
|
endDate = dayjs(session === null || session === void 0 ? void 0 : session.end_at).format('YYYY-MM-DD');
|
139
|
-
appointmentBooking.addProductToCart({
|
145
|
+
_res = appointmentBooking.addProductToCart({
|
140
146
|
product: _objectSpread({}, product),
|
141
147
|
date: {
|
142
148
|
startTime: "".concat(startDate, " ").concat(session === null || session === void 0 ? void 0 : session.start_time),
|
143
149
|
endTime: "".concat(endDate, " ").concat(session === null || session === void 0 ? void 0 : session.end_time)
|
144
150
|
}
|
145
151
|
});
|
146
|
-
|
152
|
+
if (!(!_res.success && _res.errorCode === 'not_enough_stock')) {
|
153
|
+
_context.next = 19;
|
154
|
+
break;
|
155
|
+
}
|
156
|
+
return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.unuse.stock')));
|
157
|
+
case 19:
|
158
|
+
appointmentBooking.closeProductDetail();
|
159
|
+
_context.next = 22;
|
147
160
|
return appointmentBooking.getAvailableDate({
|
148
161
|
startDate: startDate,
|
149
162
|
endDate: endDate
|
150
163
|
});
|
151
|
-
case
|
152
|
-
_context.next =
|
164
|
+
case 22:
|
165
|
+
_context.next = 34;
|
153
166
|
break;
|
154
|
-
case
|
167
|
+
case 24:
|
155
168
|
resources = (data === null || data === void 0 || (_data$origin = data.origin) === null || _data$origin === void 0 || (_data$origin = _data$origin.product_resource) === null || _data$origin === void 0 ? void 0 : _data$origin.resources) || [];
|
156
169
|
activeStatus = resources.find(function (item) {
|
157
170
|
return item.status === 1;
|
158
171
|
});
|
159
172
|
if (!(!activeStatus && !appointmentBooking.isTargetNormalProduct(data === null || data === void 0 ? void 0 : data.origin))) {
|
160
|
-
_context.next =
|
173
|
+
_context.next = 28;
|
161
174
|
break;
|
162
175
|
}
|
163
176
|
return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.no.available.service')));
|
164
|
-
case
|
165
|
-
appointmentBooking.storeProduct(product);
|
166
|
-
|
177
|
+
case 28:
|
178
|
+
_res2 = appointmentBooking.storeProduct(product);
|
179
|
+
if (!(!_res2.success && _res2.errorCode === 'not_enough_stock')) {
|
180
|
+
_context.next = 31;
|
181
|
+
break;
|
182
|
+
}
|
183
|
+
return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.unuse.stock')));
|
184
|
+
case 31:
|
167
185
|
if (!(type === 'duration')) {
|
168
|
-
_context.next =
|
186
|
+
_context.next = 34;
|
169
187
|
break;
|
170
188
|
}
|
171
|
-
_context.next =
|
189
|
+
_context.next = 34;
|
172
190
|
return appointmentBooking.getAvailableDate();
|
173
|
-
case
|
191
|
+
case 34:
|
174
192
|
appointmentBooking.closeProductDetail();
|
175
193
|
|
176
194
|
// 先选择日期流程
|
@@ -199,7 +217,7 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
199
217
|
removeStep('select-time');
|
200
218
|
}
|
201
219
|
}
|
202
|
-
case
|
220
|
+
case 36:
|
203
221
|
case "end":
|
204
222
|
return _context.stop();
|
205
223
|
}
|
@@ -136,13 +136,14 @@ var VoucherCard = function VoucherCard(props) {
|
|
136
136
|
// // apply code
|
137
137
|
var onScanCode = /*#__PURE__*/function () {
|
138
138
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
139
|
-
var val;
|
139
|
+
var customerId, val;
|
140
140
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
141
141
|
while (1) switch (_context.prev = _context.next) {
|
142
142
|
case 0:
|
143
|
-
|
144
|
-
|
145
|
-
|
143
|
+
customerId = currentUser.id;
|
144
|
+
_context.next = 3;
|
145
|
+
return shopDiscount.scanCode(code, customerId);
|
146
|
+
case 3:
|
146
147
|
val = _context.sent;
|
147
148
|
if (val !== null && val !== void 0 && val.isAvailable) {
|
148
149
|
batchUpdateCart(val.productList);
|
@@ -152,7 +153,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
152
153
|
content: val.type === 'server' ? locales.getText('pisell2.text.goodpass.code-invalid') : locales.getText('pisell2.text.goodpass.code-invalid-cart')
|
153
154
|
});
|
154
155
|
}
|
155
|
-
case
|
156
|
+
case 5:
|
156
157
|
case "end":
|
157
158
|
return _context.stop();
|
158
159
|
}
|
@@ -206,6 +206,12 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
|
|
206
206
|
if (!result) {
|
207
207
|
return Toast(locales.getText('pisell2.appointment.unuse.date'));
|
208
208
|
}
|
209
|
+
var capacityResult = appointmentBooking.checkMaxDurationCapacity();
|
210
|
+
if (!capacityResult.success) {
|
211
|
+
var getMessage = locales.getText('pisell2.appointment.unuse.capacity');
|
212
|
+
var message = typeof getMessage === 'function' ? getMessage(capacityResult.minAvailableCount) : getMessage;
|
213
|
+
return Toast(message);
|
214
|
+
}
|
209
215
|
}
|
210
216
|
if (!isRetailTemplate && currentKey !== null && currentKey !== void 0 && currentKey.startsWith('select-resource')) {
|
211
217
|
var _currentSelectedResou;
|
@@ -357,8 +363,10 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
|
|
357
363
|
}
|
358
364
|
// const accountLists = await appointmentBooking.getAccounts()
|
359
365
|
pubsub = utils.pubsub;
|
360
|
-
pubsub.once('pisell1.login.success', function () {
|
361
|
-
|
366
|
+
pubsub.once('pisell1.login.success', function (res) {
|
367
|
+
if (res === 'success') {
|
368
|
+
checkHolder();
|
369
|
+
}
|
362
370
|
});
|
363
371
|
return _context3.abrupt("return", openLoginModal({
|
364
372
|
callback: function callback(status) {
|
@@ -24,6 +24,16 @@ var AppointmentBooking = function AppointmentBooking() {
|
|
24
24
|
if (!data.length) {
|
25
25
|
var currentUser = formatCurrentUser(utils);
|
26
26
|
appointmentBooking.addAccounts([currentUser]);
|
27
|
+
} else if (data.length >= 1) {
|
28
|
+
var meAccount = data === null || data === void 0 ? void 0 : data.find(function (d) {
|
29
|
+
return !(d !== null && d !== void 0 && d.isGuest);
|
30
|
+
});
|
31
|
+
// 如果 length >= 1 找到非 guest 账号,检测这个账号是否跟 localStorage 里已登录的账号 id 一致
|
32
|
+
// 如果不一致的话,则setLoginAccount ls 里的账号
|
33
|
+
var _currentUser = formatCurrentUser(utils);
|
34
|
+
if (_currentUser && meAccount.id !== _currentUser.id) {
|
35
|
+
appointmentBooking.setLoginAccount(meAccount.id, _currentUser);
|
36
|
+
}
|
27
37
|
}
|
28
38
|
});
|
29
39
|
}, []);
|
@@ -1,10 +1 @@
|
|
1
|
-
|
2
|
-
import { FormState } from "../model";
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
4
|
-
state: FormState;
|
5
|
-
} & {
|
6
|
-
dispatch: (params: {
|
7
|
-
type: string;
|
8
|
-
payload: any;
|
9
|
-
}) => void;
|
10
|
-
}>;
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -435,7 +435,7 @@ var Footer = function Footer(props) {
|
|
435
435
|
*/
|
436
436
|
var handleSave = /*#__PURE__*/function () {
|
437
437
|
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(_ref4) {
|
438
|
-
var type, _ref4$messageShow, messageShow, isHasDayProducts, _setLoading, _getApis, createBooking, editBooking, editApi, createApi, saveOtherValue, _state$onSave, callbackData, values, api;
|
438
|
+
var type, _ref4$messageShow, messageShow, isHasDayProducts, _setLoading, _getApis, createBooking, editBooking, editApi, createApi, saveOtherValue, _state$onSave, _store$getState, _window, callbackData, values, api;
|
439
439
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
440
440
|
while (1) switch (_context4.prev = _context4.next) {
|
441
441
|
case 0:
|
@@ -492,6 +492,17 @@ var Footer = function Footer(props) {
|
|
492
492
|
}, {
|
493
493
|
key: '日期',
|
494
494
|
value: dayjs().format('YYYY-MM-DD HH:mm')
|
495
|
+
}, {
|
496
|
+
key: '店铺id',
|
497
|
+
value: store === null || store === void 0 || (_store$getState = store.getState) === null || _store$getState === void 0 || (_store$getState = _store$getState.call(store)) === null || _store$getState === void 0 || (_store$getState = _store$getState.global) === null || _store$getState === void 0 || (_store$getState = _store$getState.globalConfig) === null || _store$getState === void 0 ? void 0 : _store$getState.id
|
498
|
+
}, {
|
499
|
+
key: 'shopApi',
|
500
|
+
value: JSON.stringify((_window = window) === null || _window === void 0 ? void 0 : _window.shopApi, function (key, value) {
|
501
|
+
if (typeof value === 'function') {
|
502
|
+
return 'function';
|
503
|
+
}
|
504
|
+
return value;
|
505
|
+
})
|
495
506
|
}]
|
496
507
|
});
|
497
508
|
|
@@ -71,7 +71,7 @@ var EditBookingModal = function EditBookingModal(props, ref) {
|
|
71
71
|
var getInitData = /*#__PURE__*/function () {
|
72
72
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
73
73
|
var _data$fromResource, _data$toResource;
|
74
|
-
var mockProps, _data, _initResourceVal, fromResourceFormId, toResourceFormId, _form_id, _data$toResource2, _formatResources, list, maps, currentForm, relation_id, _currentForm$renderLi, _currentForm$renderLi2, _currentForm$renderLi3, _currentForm$renderLi4, _targetResource, _cloned, _idx, _sameResource;
|
74
|
+
var mockProps, _data, _initResourceVal, fromResourceFormId, toResourceFormId, _form_id, _data$toResource2, _formatResources, list, maps, currentForm, relation_id, _currentForm$renderLi, _currentForm$renderLi2, _currentForm$renderLi3, _currentForm$renderLi4, _targetResource, _cloned, _idx, _sameResource, _targetIdx;
|
75
75
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
76
76
|
while (1) switch (_context.prev = _context.next) {
|
77
77
|
case 0:
|
@@ -129,7 +129,13 @@ var EditBookingModal = function EditBookingModal(props, ref) {
|
|
129
129
|
_cloned[_idx] = _targetResource; // 替换现有对象
|
130
130
|
}
|
131
131
|
} else {
|
132
|
-
|
132
|
+
// 未发现原资源位置(短时间内通过其它渠道修改过资源)
|
133
|
+
_targetIdx = _cloned.findIndex(function (rs) {
|
134
|
+
return rs.relation_id == (_targetResource === null || _targetResource === void 0 ? void 0 : _targetResource.relation_id);
|
135
|
+
}); // 判断是否已经包含了目标资源,不包含则加入进来
|
136
|
+
if (_targetIdx === -1) {
|
137
|
+
_cloned.push(_targetResource); // 添加新对象
|
138
|
+
}
|
133
139
|
}
|
134
140
|
_initResourceVal = _objectSpread(_objectSpread({}, _initResourceVal), {}, _defineProperty({}, _form_id, _cloned));
|
135
141
|
} else {
|
@@ -1,10 +1 @@
|
|
1
|
-
|
2
|
-
import { FormState } from "../model";
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
4
|
-
state: FormState;
|
5
|
-
} & {
|
6
|
-
dispatch: (params: {
|
7
|
-
type: string;
|
8
|
-
payload: any;
|
9
|
-
}) => void;
|
10
|
-
}>;
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -1,14 +1,5 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { FormState } from '../model';
|
3
1
|
export declare const walkInData: {
|
4
2
|
id: number;
|
5
3
|
nickname: string;
|
6
4
|
};
|
7
|
-
export declare const Provider:
|
8
|
-
state: FormState;
|
9
|
-
} & {
|
10
|
-
dispatch: (params: {
|
11
|
-
type: string;
|
12
|
-
payload: any;
|
13
|
-
}) => void;
|
14
|
-
}>;
|
5
|
+
export declare const Provider: any, Context: any;
|
@@ -156,6 +156,8 @@ declare const _default: {
|
|
156
156
|
'pisell2.text.deposit-delete-message': string;
|
157
157
|
'pisell2.text.deposit-paid': string;
|
158
158
|
"pisell2.text.stock": string;
|
159
|
+
'pisell2.appointment.unuse.stock': string;
|
160
|
+
'pisell2.appointment.unuse.capacity': (count: number) => string;
|
159
161
|
'pisell2.text.payment-link': string;
|
160
162
|
'pisell2.text.send-mail': string;
|
161
163
|
'pisell2.text.copy-to-clipboard': string;
|
@@ -458,6 +460,8 @@ declare const _default: {
|
|
458
460
|
'pisell2.text.deposit-delete-message': string;
|
459
461
|
'pisell2.text.deposit-paid': string;
|
460
462
|
"pisell2.text.stock": string;
|
463
|
+
'pisell2.appointment.unuse.stock': string;
|
464
|
+
'pisell2.appointment.unuse.capacity': (count: number) => string;
|
461
465
|
'pisell2.text.payment-link': string;
|
462
466
|
'pisell2.text.send-mail': string;
|
463
467
|
'pisell2.text.copy-to-clipboard': string;
|
@@ -760,6 +764,8 @@ declare const _default: {
|
|
760
764
|
'pisell2.text.deposit-delete-message': string;
|
761
765
|
'pisell2.text.deposit-paid': string;
|
762
766
|
"pisell2.text.stock": string;
|
767
|
+
'pisell2.appointment.unuse.stock': string;
|
768
|
+
'pisell2.appointment.unuse.capacity': (count: number) => string;
|
763
769
|
'pisell2.text.payment-link': string;
|
764
770
|
'pisell2.text.send-mail': string;
|
765
771
|
'pisell2.text.copy-to-clipboard': string;
|
@@ -102,7 +102,7 @@ export default {
|
|
102
102
|
var obj = {
|
103
103
|
shop: 'Paid from Merchant Portal',
|
104
104
|
'mini-program': 'Paid from WeChat Mini-program',
|
105
|
-
pos: 'Paid from
|
105
|
+
pos: 'Paid from Terminal',
|
106
106
|
PC: 'Paid from Website',
|
107
107
|
app: 'Paid from APP'
|
108
108
|
};
|
@@ -145,7 +145,7 @@ export default {
|
|
145
145
|
'pisell2.text.edit-profile': 'Edit profile',
|
146
146
|
'pisell2.text.remove-contact': 'Remove contact',
|
147
147
|
'pisell2.text.order.sales.channel.online': "Online store",
|
148
|
-
'pisell2.text.order.sales.channel.pos-terminal': "
|
148
|
+
'pisell2.text.order.sales.channel.pos-terminal': "Terminal",
|
149
149
|
'pisell2.text.order.sales.channel.boxcocal': "Boxlocal",
|
150
150
|
'pisell2.text.order.sales.channel.tableorder': "Table order",
|
151
151
|
'pisell2.text.order.sales.channel.reserve': "Google reservation",
|
@@ -174,6 +174,10 @@ export default {
|
|
174
174
|
'pisell2.text.deposit-delete-message': "It cannot be restored after deletion. Please confirm the operation.",
|
175
175
|
'pisell2.text.deposit-paid': "Deposit paid",
|
176
176
|
"pisell2.text.stock": "Stock",
|
177
|
+
'pisell2.appointment.unuse.stock': "Not enough stock",
|
178
|
+
'pisell2.appointment.unuse.capacity': function pisell2AppointmentUnuseCapacity(count) {
|
179
|
+
return "Only ".concat(count, " spots available. Please reduce quantity.");
|
180
|
+
},
|
177
181
|
'pisell2.text.payment-link': "Payment link",
|
178
182
|
'pisell2.text.send-mail': "Send email",
|
179
183
|
'pisell2.text.copy-to-clipboard': "Copy to clipboard",
|
@@ -187,7 +191,7 @@ export default {
|
|
187
191
|
'page.booking.text.available': 'Available',
|
188
192
|
'page.booking.text.fully-booked': 'Fully booked',
|
189
193
|
'page.booking.text.unlimited': 'Unlimited',
|
190
|
-
'pisell2.text.terminal-edit-message': "This operation cannot be performed. To proceed, please use the
|
194
|
+
'pisell2.text.terminal-edit-message': "This operation cannot be performed. To proceed, please use the Terminal.",
|
191
195
|
"pisell2.text.actions": "Actions",
|
192
196
|
"pisell2.text.add-client": "Add customer",
|
193
197
|
// 日称tab
|
@@ -464,7 +468,7 @@ export default {
|
|
464
468
|
var obj = {
|
465
469
|
shop: '在 管理后台 支付',
|
466
470
|
'mini-program': '在 微信小程序 支付',
|
467
|
-
pos: '在
|
471
|
+
pos: '在 终端 支付',
|
468
472
|
PC: '在 网站 支付',
|
469
473
|
app: '在 手机应用程序 支付'
|
470
474
|
};
|
@@ -502,7 +506,7 @@ export default {
|
|
502
506
|
'pisell2.text.edit-profile': '编辑个人资料',
|
503
507
|
'pisell2.text.remove-contact': '删除联系人',
|
504
508
|
'pisell2.text.order.sales.channel.online': "在线店铺",
|
505
|
-
'pisell2.text.order.sales.channel.pos-terminal': "
|
509
|
+
'pisell2.text.order.sales.channel.pos-terminal': "终端",
|
506
510
|
'pisell2.text.order.sales.channel.boxcocal': "Boxlocal",
|
507
511
|
'pisell2.text.order.sales.channel.tableorder': "扫码点餐",
|
508
512
|
'pisell2.text.order.sales.channel.reserve': "谷歌预约",
|
@@ -531,11 +535,15 @@ export default {
|
|
531
535
|
'pisell2.text.deposit-delete-message': "删除后不可恢复,请确认操作",
|
532
536
|
'pisell2.text.deposit-paid': "已付定金",
|
533
537
|
"pisell2.text.stock": "库存",
|
538
|
+
'pisell2.appointment.unuse.stock': "库存不足",
|
539
|
+
'pisell2.appointment.unuse.capacity': function pisell2AppointmentUnuseCapacity(count) {
|
540
|
+
return "\u4EC5\u53EF\u9884\u7EA6 ".concat(count, " \u4E2A\uFF0C\u8BF7\u51CF\u5C11\u6570\u91CF");
|
541
|
+
},
|
534
542
|
'pisell2.text.payment-link': "付款链接",
|
535
543
|
'pisell2.text.send-mail': "发送邮件",
|
536
544
|
'pisell2.text.copy-to-clipboard': "复制到剪切板",
|
537
545
|
'pisell2.text.ok': "好的",
|
538
|
-
'pisell2.text.terminal-edit-message': "
|
546
|
+
'pisell2.text.terminal-edit-message': "此操作不可使用,如需使用请至终端设备操作。",
|
539
547
|
'page.booking.text.add-time': '加时',
|
540
548
|
'page.booking.text.quantity': '数量',
|
541
549
|
'page.booking.text.sales': '销售',
|
@@ -821,7 +829,7 @@ export default {
|
|
821
829
|
var obj = {
|
822
830
|
shop: '在 管理後臺 支付',
|
823
831
|
'mini-program': '在 微信小程序 支付',
|
824
|
-
pos: '在
|
832
|
+
pos: '在 終端 支付',
|
825
833
|
PC: '在 網站 支付',
|
826
834
|
app: '在 手機應用程序 支付'
|
827
835
|
};
|
@@ -859,7 +867,7 @@ export default {
|
|
859
867
|
'pisell2.text.edit-profile': '編輯個人資料',
|
860
868
|
'pisell2.text.remove-contact': '删除聯系人',
|
861
869
|
'pisell2.text.order.sales.channel.online': "在線店鋪",
|
862
|
-
'pisell2.text.order.sales.channel.pos-terminal': "
|
870
|
+
'pisell2.text.order.sales.channel.pos-terminal': "终端",
|
863
871
|
'pisell2.text.order.sales.channel.boxcocal': "Boxlocal",
|
864
872
|
'pisell2.text.order.sales.channel.tableorder': "掃碼點餐",
|
865
873
|
'pisell2.text.order.sales.channel.reserve': "谷歌預約",
|
@@ -888,11 +896,15 @@ export default {
|
|
888
896
|
'pisell2.text.deposit-delete-message': "刪除後不可恢復,請確認操作",
|
889
897
|
'pisell2.text.deposit-paid': "已付定金",
|
890
898
|
"pisell2.text.stock": "庫存",
|
899
|
+
'pisell2.appointment.unuse.stock': "庫存不足",
|
900
|
+
'pisell2.appointment.unuse.capacity': function pisell2AppointmentUnuseCapacity(count) {
|
901
|
+
return "\u50C5\u53EF\u9810\u7D04 ".concat(count, " \u500B\uFF0C\u8ACB\u6E1B\u5C11\u6578\u91CF");
|
902
|
+
},
|
891
903
|
'pisell2.text.payment-link': "付款鏈接",
|
892
904
|
'pisell2.text.send-mail': "發送郵件",
|
893
905
|
'pisell2.text.copy-to-clipboard': "複製到剪切板",
|
894
906
|
'pisell2.text.ok': "好的",
|
895
|
-
'pisell2.text.terminal-edit-message': "
|
907
|
+
'pisell2.text.terminal-edit-message': "此操作不可使用,如需使用請至終端設備操作。",
|
896
908
|
'page.booking.text.add-time': '加時',
|
897
909
|
'page.booking.text.quantity': '數量',
|
898
910
|
'page.booking.text.sales': '銷售',
|
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
export interface FormState {
|
3
2
|
amountSymbol: string;
|
4
3
|
apis: {
|
@@ -106,11 +105,4 @@ export declare const walkInData: {
|
|
106
105
|
id: number;
|
107
106
|
nickname: string;
|
108
107
|
};
|
109
|
-
export declare const Provider:
|
110
|
-
state: FormState;
|
111
|
-
} & {
|
112
|
-
dispatch: (params: {
|
113
|
-
type: string;
|
114
|
-
payload: any;
|
115
|
-
}) => void;
|
116
|
-
}>;
|
108
|
+
export declare const Provider: any, Context: any;
|
@@ -1,10 +1 @@
|
|
1
|
-
|
2
|
-
import { FormState } from "../model";
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
4
|
-
state: FormState;
|
5
|
-
} & {
|
6
|
-
dispatch: (params: {
|
7
|
-
type: string;
|
8
|
-
payload: any;
|
9
|
-
}) => void;
|
10
|
-
}>;
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -1,10 +1 @@
|
|
1
|
-
|
2
|
-
import { FormState } from "../model";
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
4
|
-
state: FormState;
|
5
|
-
} & {
|
6
|
-
dispatch: (params: {
|
7
|
-
type: string;
|
8
|
-
payload: any;
|
9
|
-
}) => void;
|
10
|
-
}>;
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
22
|
-
readonly eftposRef: React.MutableRefObject<"
|
22
|
+
readonly eftposRef: React.MutableRefObject<"payo" | "tyro" | "windcave" | "stripe" | "linkly">;
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
25
25
|
};
|
@@ -74,7 +74,7 @@ export var useLinklyPayOrRefund = function useLinklyPayOrRefund(handleCheck) {
|
|
74
74
|
var status = res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.status;
|
75
75
|
|
76
76
|
// 继续查询交易状态
|
77
|
-
if (status
|
77
|
+
if (status == 0) {
|
78
78
|
var _res$data2;
|
79
79
|
// 交易流水号
|
80
80
|
numRef.current = res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.session_id;
|
@@ -89,7 +89,7 @@ export var useLinklyPayOrRefund = function useLinklyPayOrRefund(handleCheck) {
|
|
89
89
|
setTimeout(function () {
|
90
90
|
var _resultQueryRef$curre;
|
91
91
|
(_resultQueryRef$curre = resultQueryRef.current) === null || _resultQueryRef$curre === void 0 || _resultQueryRef$curre.call(resultQueryRef);
|
92
|
-
});
|
92
|
+
}, 300);
|
93
93
|
return;
|
94
94
|
}
|
95
95
|
|
@@ -99,7 +99,7 @@ export var useLinklyPayOrRefund = function useLinklyPayOrRefund(handleCheck) {
|
|
99
99
|
}));
|
100
100
|
|
101
101
|
// 交易成功
|
102
|
-
if (status
|
102
|
+
if (status == 1) {
|
103
103
|
var _handleLinklySuccessR;
|
104
104
|
(_handleLinklySuccessR = handleLinklySuccessRef.current) === null || _handleLinklySuccessR === void 0 || _handleLinklySuccessR.call(handleLinklySuccessRef, res);
|
105
105
|
return;
|