@pisell/private-materials 3.4.43 → 3.4.44
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 +9 -1
- package/build/lowcode/preview.js +149 -149
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +8 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +3 -2
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +273 -76
- package/es/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
- package/es/components/appointmentBooking/hooks.d.ts +1 -0
- package/es/components/appointmentBooking/hooks.js +30 -30
- package/es/components/appointmentBooking/locales.d.ts +3 -0
- package/es/components/appointmentBooking/locales.js +9 -6
- package/es/components/booking/components/customSelect/index.js +1 -1
- package/es/components/booking/components/footer/index.js +4 -1
- package/es/components/booking/components/footer/utils.js +75 -73
- package/es/components/booking/forms/footer.js +24 -10
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/info/client/index.js +28 -13
- package/es/components/booking/info/clientVariant/hooks/useClientFn.js +16 -10
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +10 -2
- package/es/components/booking/info/clientVariant/vertical/index.js +1 -1
- package/es/components/booking/info/main.js +3 -2
- package/es/components/booking/info/model.js +5 -0
- package/es/components/booking/info2/index.js +3 -2
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
- package/es/components/booking/info2/service/contactInfoMode/index.js +94 -0
- package/es/components/booking/locales.d.ts +6 -0
- package/es/components/booking/locales.js +12 -3
- package/es/components/booking/model.d.ts +4 -0
- package/es/components/booking/model.js +3 -0
- package/es/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/plus/clientName/index.d.ts +4 -0
- package/es/plus/clientName/index.js +18 -0
- package/es/plus/clientName/index.less +10 -0
- package/es/plus/clientName/type.d.ts +13 -0
- package/es/plus/clientName/type.js +1 -0
- package/es/plus/clientName/utils.d.ts +2 -0
- package/es/plus/clientName/utils.js +18 -0
- package/es/plus/contactInfo/components/Avatar/index.d.ts +10 -0
- package/es/plus/contactInfo/components/Avatar/index.js +30 -0
- package/es/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/es/plus/contactInfo/components/SwipeAction/index.js +360 -0
- package/es/plus/contactInfo/components/SwipeAction/index.less +74 -0
- package/es/plus/contactInfo/index.d.ts +6 -0
- package/es/plus/contactInfo/index.js +198 -0
- package/es/plus/contactInfo/index.less +621 -0
- package/es/plus/contactInfo/locales.d.ts +15 -0
- package/es/plus/contactInfo/locales.js +14 -0
- package/es/plus/contactInfo/types.d.ts +91 -0
- package/es/plus/contactInfo/types.js +1 -0
- package/es/plus/contactInfo/utils.d.ts +7 -0
- package/es/plus/contactInfo/utils.js +50 -0
- package/es/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
- package/es/plus/contactInfoModal/ContactInfoContent.js +74 -0
- package/es/plus/contactInfoModal/index.d.ts +41 -0
- package/es/plus/contactInfoModal/index.js +155 -0
- package/es/plus/contactInfoModal/index.less +19 -0
- package/es/plus/contactInfoModal/locales.d.ts +66 -0
- package/es/plus/contactInfoModal/locales.js +65 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +5 -3
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +156 -13
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
- package/lib/components/appointmentBooking/hooks.d.ts +1 -0
- package/lib/components/appointmentBooking/hooks.js +73 -35
- package/lib/components/appointmentBooking/locales.d.ts +3 -0
- package/lib/components/appointmentBooking/locales.js +6 -3
- package/lib/components/booking/components/customSelect/index.js +1 -1
- package/lib/components/booking/components/footer/index.js +4 -1
- package/lib/components/booking/components/footer/utils.js +93 -68
- package/lib/components/booking/forms/footer.js +29 -11
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/info/client/index.js +14 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +7 -2
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +11 -4
- package/lib/components/booking/info/clientVariant/vertical/index.js +34 -17
- package/lib/components/booking/info/main.js +5 -4
- package/lib/components/booking/info/model.js +5 -0
- package/lib/components/booking/info2/index.js +5 -4
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
- package/lib/components/booking/info2/service/contactInfoMode/index.js +111 -0
- package/lib/components/booking/locales.d.ts +6 -0
- package/lib/components/booking/locales.js +12 -3
- package/lib/components/booking/model.d.ts +4 -0
- package/lib/components/booking/model.js +3 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lib/plus/clientName/index.d.ts +4 -0
- package/lib/plus/clientName/index.js +53 -0
- package/lib/plus/clientName/index.less +10 -0
- package/lib/plus/clientName/type.d.ts +13 -0
- package/lib/plus/clientName/type.js +17 -0
- package/lib/plus/clientName/utils.d.ts +2 -0
- package/lib/plus/clientName/utils.js +43 -0
- package/lib/plus/contactInfo/components/Avatar/index.d.ts +10 -0
- package/lib/plus/contactInfo/components/Avatar/index.js +56 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.js +373 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.less +74 -0
- package/lib/plus/contactInfo/index.d.ts +6 -0
- package/lib/plus/contactInfo/index.js +226 -0
- package/lib/plus/contactInfo/index.less +621 -0
- package/lib/plus/contactInfo/locales.d.ts +15 -0
- package/lib/plus/contactInfo/locales.js +38 -0
- package/lib/plus/contactInfo/types.d.ts +91 -0
- package/lib/plus/contactInfo/types.js +17 -0
- package/lib/plus/contactInfo/utils.d.ts +7 -0
- package/lib/plus/contactInfo/utils.js +64 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.js +129 -0
- package/lib/plus/contactInfoModal/index.d.ts +41 -0
- package/lib/plus/contactInfoModal/index.js +139 -0
- package/lib/plus/contactInfoModal/index.less +19 -0
- package/lib/plus/contactInfoModal/locales.d.ts +66 -0
- package/lib/plus/contactInfoModal/locales.js +89 -0
- package/lowcode/contact-info/fragments/cardStyle.ts +68 -0
- package/lowcode/contact-info/fragments/nameStyle.ts +33 -0
- package/lowcode/contact-info/fragments/pisellAvatar.ts +103 -0
- package/lowcode/contact-info/fragments/textStyle.ts +33 -0
- package/lowcode/contact-info/meta.ts +199 -0
- package/lowcode/contact-info-modal/meta.ts +98 -0
- package/package.json +4 -2
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
var _excluded = ["customer_id"];
|
|
3
3
|
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; }
|
|
4
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
5
|
-
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."); }
|
|
6
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
7
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
8
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
6
|
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; }
|
|
11
7
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
12
8
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
10
|
+
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."); }
|
|
11
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
12
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
13
13
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
14
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
15
15
|
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); } }
|
|
@@ -84,7 +84,7 @@ var Client = function Client() {
|
|
|
84
84
|
}, [state.disabledEdit]);
|
|
85
85
|
var getClients = /*#__PURE__*/function () {
|
|
86
86
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
87
|
-
var customer_id, resetParams, _setLoading, _state$client, api, data, list, _payload, customerItem, totalList;
|
|
87
|
+
var customer_id, resetParams, _setLoading, _state$client, api, withKey, data, list, _payload, customerItem, totalList;
|
|
88
88
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
89
89
|
while (1) switch (_context.prev = _context.next) {
|
|
90
90
|
case 0:
|
|
@@ -101,14 +101,20 @@ var Client = function Client() {
|
|
|
101
101
|
}
|
|
102
102
|
// let _setLoading = resetParams.skip === 1 ? setLoading : setLoadLoading;
|
|
103
103
|
_setLoading(true);
|
|
104
|
-
api = state.isFranchisee ? getFranchiseeCustomerList : state.apis.getClientsEs;
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
api = state.isFranchisee ? getFranchiseeCustomerList : state.apis.getClientsEs; // 默认返回用户的联系信息
|
|
105
|
+
withKey = _toConsumableArray((resetParams === null || resetParams === void 0 ? void 0 : resetParams.with) || []);
|
|
106
|
+
if (!withKey.includes('contactsInfo')) {
|
|
107
|
+
withKey.push('contactsInfo');
|
|
108
|
+
}
|
|
109
|
+
_context.next = 8;
|
|
110
|
+
return api(_objectSpread(_objectSpread({}, resetParams), {}, {
|
|
111
|
+
with: withKey
|
|
112
|
+
}, !state.isFranchisee ? {
|
|
107
113
|
_config: {
|
|
108
114
|
abort: true
|
|
109
115
|
}
|
|
110
116
|
} : {}));
|
|
111
|
-
case
|
|
117
|
+
case 8:
|
|
112
118
|
data = _context.sent;
|
|
113
119
|
list = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (d) {
|
|
114
120
|
return _objectSpread(_objectSpread({}, d), {}, {
|
|
@@ -145,7 +151,7 @@ var Client = function Client() {
|
|
|
145
151
|
setLoadLoading(false);
|
|
146
152
|
isLoadClient = true;
|
|
147
153
|
return _context.abrupt("return", {});
|
|
148
|
-
case
|
|
154
|
+
case 21:
|
|
149
155
|
case "end":
|
|
150
156
|
return _context.stop();
|
|
151
157
|
}
|
|
@@ -420,6 +426,15 @@ var Client = function Client() {
|
|
|
420
426
|
// searchChange('');
|
|
421
427
|
},
|
|
422
428
|
optionRender: function optionRender(item) {
|
|
429
|
+
console.log('render_optionRender', item);
|
|
430
|
+
// 显示优先级:如果客户中存在email或phone,则优先显示,否则显示联系信息中的email和phone
|
|
431
|
+
var displayEmail = item === null || item === void 0 ? void 0 : item.email;
|
|
432
|
+
var displayPhone = item === null || item === void 0 ? void 0 : item.phone;
|
|
433
|
+
if (!displayEmail && !displayPhone) {
|
|
434
|
+
var _item$contacts_info, _item$contacts_info2;
|
|
435
|
+
displayEmail = item === null || item === void 0 || (_item$contacts_info = item.contacts_info) === null || _item$contacts_info === void 0 || (_item$contacts_info = _item$contacts_info.value) === null || _item$contacts_info === void 0 ? void 0 : _item$contacts_info.email;
|
|
436
|
+
displayPhone = item === null || item === void 0 || (_item$contacts_info2 = item.contacts_info) === null || _item$contacts_info2 === void 0 || (_item$contacts_info2 = _item$contacts_info2.value) === null || _item$contacts_info2 === void 0 || (_item$contacts_info2 = _item$contacts_info2.phone) === null || _item$contacts_info2 === void 0 ? void 0 : _item$contacts_info2.phone;
|
|
437
|
+
}
|
|
423
438
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Avatar, {
|
|
424
439
|
className: "pisell-lowcode__booking-client-list-item-avatar",
|
|
425
440
|
src: image.ali(item.cover, 100) || undefined,
|
|
@@ -432,11 +447,11 @@ var Client = function Client() {
|
|
|
432
447
|
className: "pisell-lowcode__booking-client-list-item-info-name"
|
|
433
448
|
}, getNickname(item)), /*#__PURE__*/React.createElement("div", {
|
|
434
449
|
className: "pisell-lowcode__booking-client-list-item-info-desc"
|
|
435
|
-
},
|
|
450
|
+
}, displayEmail ? /*#__PURE__*/React.createElement("div", {
|
|
436
451
|
className: ""
|
|
437
|
-
},
|
|
452
|
+
}, displayEmail) : null, displayPhone ? /*#__PURE__*/React.createElement("div", {
|
|
438
453
|
className: ""
|
|
439
|
-
},
|
|
454
|
+
}, displayPhone) : null), /*#__PURE__*/React.createElement("div", {
|
|
440
455
|
className: 'pisell-lowcode__booking-client-list-item-info-waiver',
|
|
441
456
|
title: getWaiverTitle(item.waiver_form)
|
|
442
457
|
}, (item.waiver_form || []).map(function (item) {
|
|
@@ -52,7 +52,7 @@ var useClientFn = function useClientFn(_params) {
|
|
|
52
52
|
num: 5,
|
|
53
53
|
total: 0,
|
|
54
54
|
search: '',
|
|
55
|
-
with: ['formRecord'],
|
|
55
|
+
with: ['formRecord', 'contactsInfo'],
|
|
56
56
|
relation_form_id: state === null || state === void 0 || (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.config) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.basic) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.appointment_subject) === null || _state$bookingConfig === void 0 ? void 0 : _state$bookingConfig.form_id
|
|
57
57
|
}),
|
|
58
58
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
@@ -76,7 +76,7 @@ var useClientFn = function useClientFn(_params) {
|
|
|
76
76
|
}, [(_state$client$value2 = state.client.value) === null || _state$client$value2 === void 0 ? void 0 : _state$client$value2.id]);
|
|
77
77
|
var getClients = /*#__PURE__*/function () {
|
|
78
78
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref, returnResult) {
|
|
79
|
-
var customer_id, customer_ids, resetParams, _setLoading, _state$client, api, data, list, _payload, customerItem, totalList;
|
|
79
|
+
var customer_id, customer_ids, resetParams, _setLoading, _state$client, api, withKey, data, list, _payload, customerItem, totalList;
|
|
80
80
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
81
81
|
while (1) switch (_context.prev = _context.next) {
|
|
82
82
|
case 0:
|
|
@@ -93,8 +93,12 @@ var useClientFn = function useClientFn(_params) {
|
|
|
93
93
|
}
|
|
94
94
|
_setLoading(true);
|
|
95
95
|
api = state.isFranchisee ? getFranchiseeCustomerList : state.apis.getClients;
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
withKey = _toConsumableArray((resetParams === null || resetParams === void 0 ? void 0 : resetParams.with) || []);
|
|
97
|
+
if (!withKey.includes('contactsInfo')) {
|
|
98
|
+
withKey.push('contactsInfo');
|
|
99
|
+
}
|
|
100
|
+
_context.next = 8;
|
|
101
|
+
return api(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, resetParams), resetParams.search ? {
|
|
98
102
|
num: 10
|
|
99
103
|
} : {}), state.isFranchisee ? {
|
|
100
104
|
franchisee_customer_ids: customer_ids
|
|
@@ -104,8 +108,10 @@ var useClientFn = function useClientFn(_params) {
|
|
|
104
108
|
_config: {
|
|
105
109
|
abort: true
|
|
106
110
|
}
|
|
107
|
-
} : {})
|
|
108
|
-
|
|
111
|
+
} : {}), {}, {
|
|
112
|
+
with: withKey
|
|
113
|
+
}));
|
|
114
|
+
case 8:
|
|
109
115
|
data = _context.sent;
|
|
110
116
|
list = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (d) {
|
|
111
117
|
var _d$form_record;
|
|
@@ -120,11 +126,11 @@ var useClientFn = function useClientFn(_params) {
|
|
|
120
126
|
});
|
|
121
127
|
});
|
|
122
128
|
if (!returnResult) {
|
|
123
|
-
_context.next =
|
|
129
|
+
_context.next = 12;
|
|
124
130
|
break;
|
|
125
131
|
}
|
|
126
132
|
return _context.abrupt("return", list);
|
|
127
|
-
case
|
|
133
|
+
case 12:
|
|
128
134
|
_payload = {
|
|
129
135
|
clients: list
|
|
130
136
|
}; // 有传递, 则表示新增客户之后刷新列表的, 应该默认选中
|
|
@@ -163,7 +169,7 @@ var useClientFn = function useClientFn(_params) {
|
|
|
163
169
|
setLoading(false);
|
|
164
170
|
setLoadLoading(false);
|
|
165
171
|
return _context.abrupt("return", {});
|
|
166
|
-
case
|
|
172
|
+
case 23:
|
|
167
173
|
case "end":
|
|
168
174
|
return _context.stop();
|
|
169
175
|
}
|
|
@@ -294,7 +300,7 @@ var useClientFn = function useClientFn(_params) {
|
|
|
294
300
|
if (getIsWalkIn(item === null || item === void 0 ? void 0 : item.id)) {
|
|
295
301
|
return locales.getText('pisell2.text.select-a-customer');
|
|
296
302
|
}
|
|
297
|
-
var firstLastName = item.first_name || item.last_name ? "".concat(item.first_name, " ").concat(item.last_name) :
|
|
303
|
+
var firstLastName = item.first_name || item.last_name ? "".concat(item.first_name, " ").concat(item.last_name) : '';
|
|
298
304
|
return item.name || (item.display_name || '').trim() || (item.nickname || '').trim() || firstLastName.trim() || '';
|
|
299
305
|
}, [locales.localeMap]);
|
|
300
306
|
useEffect(function () {
|
|
@@ -323,6 +323,7 @@ var SelectDrawer = function SelectDrawer(props, ref) {
|
|
|
323
323
|
return _ref4.apply(this, arguments);
|
|
324
324
|
};
|
|
325
325
|
}();
|
|
326
|
+
console.log('options7777', options);
|
|
326
327
|
return /*#__PURE__*/React.createElement(Drawer, {
|
|
327
328
|
showGoBack: showHeader,
|
|
328
329
|
title: showHeader && locales.getText('pisell2.text.select-customer'),
|
|
@@ -335,7 +336,7 @@ var SelectDrawer = function SelectDrawer(props, ref) {
|
|
|
335
336
|
margin: '16px 0',
|
|
336
337
|
height: 44
|
|
337
338
|
},
|
|
338
|
-
placeholder: locales.getText('pisell2.text.search'),
|
|
339
|
+
placeholder: locales.getText('pisell2.booking.text.search-placeholder'),
|
|
339
340
|
value: search,
|
|
340
341
|
allowClear: true,
|
|
341
342
|
onChange: function onChange(e) {
|
|
@@ -376,6 +377,13 @@ var SelectDrawer = function SelectDrawer(props, ref) {
|
|
|
376
377
|
delay: 500
|
|
377
378
|
}, !!options.length ? options.map(function (item) {
|
|
378
379
|
var _holder$form2;
|
|
380
|
+
var displayEmail = item === null || item === void 0 ? void 0 : item.email;
|
|
381
|
+
var displayPhone = item === null || item === void 0 ? void 0 : item.phone;
|
|
382
|
+
if (!displayEmail && !displayPhone) {
|
|
383
|
+
var _item$contacts_info, _item$contacts_info2;
|
|
384
|
+
displayEmail = item === null || item === void 0 || (_item$contacts_info = item.contacts_info) === null || _item$contacts_info === void 0 || (_item$contacts_info = _item$contacts_info.value) === null || _item$contacts_info === void 0 ? void 0 : _item$contacts_info.email;
|
|
385
|
+
displayPhone = item === null || item === void 0 || (_item$contacts_info2 = item.contacts_info) === null || _item$contacts_info2 === void 0 || (_item$contacts_info2 = _item$contacts_info2.value) === null || _item$contacts_info2 === void 0 || (_item$contacts_info2 = _item$contacts_info2.phone) === null || _item$contacts_info2 === void 0 ? void 0 : _item$contacts_info2.phone;
|
|
386
|
+
}
|
|
379
387
|
return /*#__PURE__*/React.createElement("div", {
|
|
380
388
|
className: "vertical-client-select-drawer-content-item",
|
|
381
389
|
key: item.id
|
|
@@ -385,7 +393,7 @@ var SelectDrawer = function SelectDrawer(props, ref) {
|
|
|
385
393
|
},
|
|
386
394
|
cover: item.cover,
|
|
387
395
|
title: getNickname(item),
|
|
388
|
-
desc: [
|
|
396
|
+
desc: [displayEmail, displayPhone],
|
|
389
397
|
checked: item.id === client.id,
|
|
390
398
|
style: showPet ? {
|
|
391
399
|
marginBottom: 6
|
|
@@ -262,7 +262,7 @@ var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
262
262
|
case 7:
|
|
263
263
|
_context.next = 9;
|
|
264
264
|
return getClients({
|
|
265
|
-
with: ['formRecord'],
|
|
265
|
+
with: ['formRecord', 'contactsInfo'],
|
|
266
266
|
relation_form_id: boardConfig === null || boardConfig === void 0 ? void 0 : boardConfig.form_id,
|
|
267
267
|
skip: 1,
|
|
268
268
|
num: 20,
|
|
@@ -27,6 +27,7 @@ import "./index.less";
|
|
|
27
27
|
import Notes from "./notes";
|
|
28
28
|
import { Service2Cart } from "./service2";
|
|
29
29
|
import { isDayBooking, isEventBooking, isTerminalDayBooking } from "./service2/utils";
|
|
30
|
+
import ContactInfoMode from "../info2/service/contactInfoMode";
|
|
30
31
|
var defaultModules = {
|
|
31
32
|
client: 1,
|
|
32
33
|
date: 1,
|
|
@@ -37,7 +38,7 @@ var defaultModules = {
|
|
|
37
38
|
};
|
|
38
39
|
locales.init(localeTexts, getLocale());
|
|
39
40
|
var Info = Provider(function (props) {
|
|
40
|
-
var _modal$state2, _modal$state5, _context$appHelper4, _modal$state6;
|
|
41
|
+
var _modal$state2, _modal$state5, _context$appHelper4, _modal$state6, _modal$state7;
|
|
41
42
|
var style = props.style,
|
|
42
43
|
globalState = props.globalState,
|
|
43
44
|
_props$modules = props.modules,
|
|
@@ -143,7 +144,7 @@ var Info = Provider(function (props) {
|
|
|
143
144
|
bodyClassName: classNames('booking-info-warp', _defineProperty(_defineProperty({}, 'create-booking-page-info-wrap', isBookingCreatePage), 'create-booking-page-info-wrap-create', isBookingCreatePageCreateMode && !isTerminalDayBooking(modal.state)))
|
|
144
145
|
}, /*#__PURE__*/React.createElement("div", {
|
|
145
146
|
className: "booking-info"
|
|
146
|
-
}, createHeader, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, modules.holder && !((_modal$
|
|
147
|
+
}, createHeader, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, (modal === null || modal === void 0 || (_modal$state6 = modal.state) === null || _modal$state6 === void 0 || (_modal$state6 = _modal$state6.bookingConfig) === null || _modal$state6 === void 0 || (_modal$state6 = _modal$state6.config) === null || _modal$state6 === void 0 || (_modal$state6 = _modal$state6.cart_settings_tab) === null || _modal$state6 === void 0 || (_modal$state6 = _modal$state6.display_contact_info) === null || _modal$state6 === void 0 ? void 0 : _modal$state6.show_contact_info) === true ? /*#__PURE__*/React.createElement(ContactInfoMode, 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, /*#__PURE__*/React.createElement(Skeleton, {
|
|
147
148
|
loading: globalState.loading,
|
|
148
149
|
round: true,
|
|
149
150
|
active: true,
|
|
@@ -21,6 +21,11 @@ var _miniRedux = miniRedux({
|
|
|
21
21
|
});
|
|
22
22
|
// return { ...state, client: { ...state.client, ...payload } };
|
|
23
23
|
},
|
|
24
|
+
setContactsInfo: function setContactsInfo(state, payload) {
|
|
25
|
+
state.setGlobalState({
|
|
26
|
+
contacts_info: _objectSpread(_objectSpread({}, state.contacts_info), payload)
|
|
27
|
+
});
|
|
28
|
+
},
|
|
24
29
|
setService: function setService(state, payload) {
|
|
25
30
|
var obj = {};
|
|
26
31
|
// 拦截, 如果服务列表里 有两个相近时间的服务, 删除最后一个
|
|
@@ -32,6 +32,7 @@ import classNames from 'classnames';
|
|
|
32
32
|
import useCreateBookingPageHeader from "../hooks/useCreateBookingPageHeader";
|
|
33
33
|
import { getLocale } from "../../../utils/locales";
|
|
34
34
|
import { useDebounceEffect } from 'ahooks';
|
|
35
|
+
import ContactInfoMode from "./service/contactInfoMode";
|
|
35
36
|
var defaultModules = {
|
|
36
37
|
client: 1,
|
|
37
38
|
date: 1,
|
|
@@ -41,7 +42,7 @@ var defaultModules = {
|
|
|
41
42
|
};
|
|
42
43
|
locales.init(localeTexts, getLocale());
|
|
43
44
|
var Info = Provider(function (props) {
|
|
44
|
-
var _modal$state2, _modal$state4, _modal$state6, _context$appHelper4, _modal$state7;
|
|
45
|
+
var _modal$state2, _modal$state4, _modal$state6, _context$appHelper4, _modal$state7, _modal$state8;
|
|
45
46
|
// return <Payments {...props} />;
|
|
46
47
|
var style = props.style,
|
|
47
48
|
globalState = props.globalState,
|
|
@@ -230,7 +231,7 @@ var Info = Provider(function (props) {
|
|
|
230
231
|
height: context !== null && context !== void 0 && (_context$appHelper4 = context.appHelper) !== null && _context$appHelper4 !== void 0 && (_context$appHelper4 = _context$appHelper4.utils) !== null && _context$appHelper4 !== void 0 && _context$appHelper4.isMobile ? '100%' : '100vh'
|
|
231
232
|
}), "bodyClassName", classNames('booking-info-warp', _defineProperty(_defineProperty({}, 'create-booking-page-info-wrap', isBookingCreatePage), 'create-booking-page-info-wrap-create', isBookingCreatePageCreateMode))), /*#__PURE__*/React.createElement("div", {
|
|
232
233
|
className: "booking-info"
|
|
233
|
-
}, createHeader, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, modules.holder && !((_modal$
|
|
234
|
+
}, createHeader, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, (modal === null || modal === void 0 || (_modal$state7 = modal.state) === null || _modal$state7 === void 0 || (_modal$state7 = _modal$state7.bookingConfig) === null || _modal$state7 === void 0 || (_modal$state7 = _modal$state7.config) === null || _modal$state7 === void 0 || (_modal$state7 = _modal$state7.cart_settings_tab) === null || _modal$state7 === void 0 || (_modal$state7 = _modal$state7.display_contact_info) === null || _modal$state7 === void 0 ? void 0 : _modal$state7.show_contact_info) === true ? /*#__PURE__*/React.createElement(ContactInfoMode, null) : null, modules.holder && !((_modal$state8 = modal.state) !== null && _modal$state8 !== void 0 && _modal$state8.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, /*#__PURE__*/React.createElement(Skeleton, {
|
|
234
235
|
loading: globalState.loading,
|
|
235
236
|
round: true,
|
|
236
237
|
active: true,
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import React, { useContext, useEffect } from 'react';
|
|
8
|
+
import { locales } from '@pisell/utils';
|
|
9
|
+
import ContactInfo from "../../../../../plus/contactInfo";
|
|
10
|
+
import { Context } from "../../../info/model";
|
|
11
|
+
var ContactInfoMode = function ContactInfoMode() {
|
|
12
|
+
var _state$client$value6, _state$contacts_info3, _state$contacts_info4;
|
|
13
|
+
var _useContext = useContext(Context),
|
|
14
|
+
state = _useContext.state,
|
|
15
|
+
dispatch = _useContext.dispatch;
|
|
16
|
+
console.log('state>>>>>>>>>', state);
|
|
17
|
+
useEffect(function () {
|
|
18
|
+
var _state$contacts_info, _state$client$value, _state$client$value2, _state$contacts_info2;
|
|
19
|
+
// 如果客户id发生变化,则获取客户信息中的ContactInfo,如果不存在,则使用客户信息填充ContactInfo
|
|
20
|
+
console.log('state>>>>>>>>>111', state === null || state === void 0 || (_state$contacts_info = state.contacts_info) === null || _state$contacts_info === void 0 ? void 0 : _state$contacts_info.client_id);
|
|
21
|
+
console.log('state>>>>>>>>>222', (_state$client$value = state.client.value) === null || _state$client$value === void 0 ? void 0 : _state$client$value.id);
|
|
22
|
+
if (((_state$client$value2 = state.client.value) === null || _state$client$value2 === void 0 ? void 0 : _state$client$value2.id) != (state === null || state === void 0 || (_state$contacts_info2 = state.contacts_info) === null || _state$contacts_info2 === void 0 ? void 0 : _state$contacts_info2.client_id)) {
|
|
23
|
+
var _state$client$value3;
|
|
24
|
+
var contactInfo = (_state$client$value3 = state.client.value) === null || _state$client$value3 === void 0 || (_state$client$value3 = _state$client$value3.contacts_info) === null || _state$client$value3 === void 0 ? void 0 : _state$client$value3.value;
|
|
25
|
+
if (!contactInfo) {
|
|
26
|
+
var _state$client, _state$client$value4;
|
|
27
|
+
var _ref = ((_state$client = state.client) === null || _state$client === void 0 ? void 0 : _state$client.value) || {},
|
|
28
|
+
first_name = _ref.first_name,
|
|
29
|
+
last_name = _ref.last_name,
|
|
30
|
+
phone = _ref.phone,
|
|
31
|
+
country_calling_code = _ref.country_calling_code,
|
|
32
|
+
country_code = _ref.country_code,
|
|
33
|
+
email = _ref.email;
|
|
34
|
+
dispatch({
|
|
35
|
+
type: 'setContactsInfo',
|
|
36
|
+
payload: {
|
|
37
|
+
value: {
|
|
38
|
+
first_name: first_name || '',
|
|
39
|
+
last_name: last_name || '',
|
|
40
|
+
phone: {
|
|
41
|
+
phone: phone || '',
|
|
42
|
+
country_calling_code: country_calling_code || '',
|
|
43
|
+
country_code: country_code || ''
|
|
44
|
+
},
|
|
45
|
+
email: email || ''
|
|
46
|
+
},
|
|
47
|
+
client_id: (_state$client$value4 = state.client.value) === null || _state$client$value4 === void 0 ? void 0 : _state$client$value4.id
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
} else {
|
|
51
|
+
var _state$client$value5;
|
|
52
|
+
dispatch({
|
|
53
|
+
type: 'setContactsInfo',
|
|
54
|
+
payload: {
|
|
55
|
+
value: _objectSpread({}, contactInfo || {}),
|
|
56
|
+
client_id: (_state$client$value5 = state.client.value) === null || _state$client$value5 === void 0 ? void 0 : _state$client$value5.id
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}, [(_state$client$value6 = state.client.value) === null || _state$client$value6 === void 0 ? void 0 : _state$client$value6.id, state === null || state === void 0 || (_state$contacts_info3 = state.contacts_info) === null || _state$contacts_info3 === void 0 ? void 0 : _state$contacts_info3.client_id]);
|
|
62
|
+
var handleSave = function handleSave(value) {
|
|
63
|
+
dispatch({
|
|
64
|
+
type: 'setContactsInfo',
|
|
65
|
+
payload: {
|
|
66
|
+
value: value,
|
|
67
|
+
edit: true
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
72
|
+
style: {
|
|
73
|
+
marginTop: '24px'
|
|
74
|
+
}
|
|
75
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
76
|
+
className: "pisell-lowcode__booking-contact-info-title",
|
|
77
|
+
style: {
|
|
78
|
+
fontSize: '16px',
|
|
79
|
+
fontWeight: 500,
|
|
80
|
+
marginBottom: '8px'
|
|
81
|
+
}
|
|
82
|
+
}, locales.getText('pisell2.booking.text.contact-info.title')), /*#__PURE__*/React.createElement(ContactInfo, {
|
|
83
|
+
dataSource: ((_state$contacts_info4 = state.contacts_info) === null || _state$contacts_info4 === void 0 ? void 0 : _state$contacts_info4.value) || null,
|
|
84
|
+
isShowDelete: false,
|
|
85
|
+
isShowAvatar: false,
|
|
86
|
+
isShowPhone: true,
|
|
87
|
+
isShowEmail: true,
|
|
88
|
+
style: {
|
|
89
|
+
padding: '14px 0 14px 14px'
|
|
90
|
+
},
|
|
91
|
+
onSave: handleSave
|
|
92
|
+
}));
|
|
93
|
+
};
|
|
94
|
+
export default ContactInfoMode;
|
|
@@ -273,6 +273,8 @@ declare const _default: {
|
|
|
273
273
|
'pisell2.text.quotation.product.change.title': string;
|
|
274
274
|
'pisell2.text.quotation.product.change.describe': string;
|
|
275
275
|
'pisell2.text.form.link.to.another.record.more': string;
|
|
276
|
+
'pisell2.booking.text.contact-info.title': string;
|
|
277
|
+
'pisell2.booking.text.search-placeholder': string;
|
|
276
278
|
};
|
|
277
279
|
'zh-CN': {
|
|
278
280
|
'pisell2.text.refunded-amount': string;
|
|
@@ -548,6 +550,8 @@ declare const _default: {
|
|
|
548
550
|
'pisell2.text.quotation.product.change.title': string;
|
|
549
551
|
'pisell2.text.quotation.product.change.describe': string;
|
|
550
552
|
'pisell2.text.form.link.to.another.record.more': string;
|
|
553
|
+
'pisell2.booking.text.contact-info.title': string;
|
|
554
|
+
'pisell2.booking.text.search-placeholder': string;
|
|
551
555
|
};
|
|
552
556
|
'zh-HK': {
|
|
553
557
|
'pisell2.text.refunded-amount': string;
|
|
@@ -823,6 +827,8 @@ declare const _default: {
|
|
|
823
827
|
'pisell2.text.quotation.product.change.title': string;
|
|
824
828
|
'pisell2.text.quotation.product.change.describe': string;
|
|
825
829
|
'pisell2.text.form.link.to.another.record.more': string;
|
|
830
|
+
'pisell2.booking.text.contact-info.title': string;
|
|
831
|
+
'pisell2.booking.text.search-placeholder': string;
|
|
826
832
|
};
|
|
827
833
|
};
|
|
828
834
|
export default _default;
|
|
@@ -317,7 +317,10 @@ export default {
|
|
|
317
317
|
},
|
|
318
318
|
'pisell2.text.quotation.product.change.title': "Notification",
|
|
319
319
|
'pisell2.text.quotation.product.change.describe': "Product updates available: Please refresh the following items to load the latest data.",
|
|
320
|
-
'pisell2.text.form.link.to.another.record.more': 'View More'
|
|
320
|
+
'pisell2.text.form.link.to.another.record.more': 'View More',
|
|
321
|
+
// 联系信息
|
|
322
|
+
'pisell2.booking.text.contact-info.title': 'Contact info',
|
|
323
|
+
'pisell2.booking.text.search-placeholder': 'Search Customers / Contacts'
|
|
321
324
|
},
|
|
322
325
|
'zh-CN': {
|
|
323
326
|
'pisell2.text.refunded-amount': '已退金额',
|
|
@@ -641,7 +644,10 @@ export default {
|
|
|
641
644
|
},
|
|
642
645
|
'pisell2.text.quotation.product.change.title': "提示",
|
|
643
646
|
'pisell2.text.quotation.product.change.describe': "以下商品信息已更新,请重新编辑相关商品以同步最新数据。",
|
|
644
|
-
'pisell2.text.form.link.to.another.record.more': '查看更多'
|
|
647
|
+
'pisell2.text.form.link.to.another.record.more': '查看更多',
|
|
648
|
+
// 联系信息
|
|
649
|
+
'pisell2.booking.text.contact-info.title': '联系信息',
|
|
650
|
+
'pisell2.booking.text.search-placeholder': '搜索客户/联系信息'
|
|
645
651
|
},
|
|
646
652
|
'zh-HK': {
|
|
647
653
|
'pisell2.text.refunded-amount': '已退金額',
|
|
@@ -965,6 +971,9 @@ export default {
|
|
|
965
971
|
},
|
|
966
972
|
'pisell2.text.quotation.product.change.title': "提示",
|
|
967
973
|
'pisell2.text.quotation.product.change.describe': "以下商品信息已更新,请重新编辑相关商品以同步最新数据。",
|
|
968
|
-
'pisell2.text.form.link.to.another.record.more': '查看更多'
|
|
974
|
+
'pisell2.text.form.link.to.another.record.more': '查看更多',
|
|
975
|
+
// 联系信息
|
|
976
|
+
'pisell2.booking.text.contact-info.title': '聯繫信息',
|
|
977
|
+
'pisell2.booking.text.search-placeholder': '搜索客戶/聯系信息'
|
|
969
978
|
}
|
|
970
979
|
};
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
.booking-info-create-new,
|
|
9
9
|
.pisell-lowcode__booking-field-title,
|
|
10
10
|
.pisell-lowcode__shopping-cart-empty,
|
|
11
|
-
.pisell-lowcode__booking-service-clear-btn
|
|
11
|
+
.pisell-lowcode__booking-service-clear-btn,
|
|
12
|
+
.pisell-lowcode__booking-contact-info-title {
|
|
12
13
|
color: #ffffff;
|
|
13
14
|
}
|
|
14
15
|
}
|
package/es/index.d.ts
CHANGED
|
@@ -52,3 +52,5 @@ export { default as PinModal } from './components/pinModal';
|
|
|
52
52
|
export { default as PinVerifyModal } from './components/pinVerifyModal';
|
|
53
53
|
export { OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth } from './components/authentication/admin';
|
|
54
54
|
export type { SaaSAdminAuthProps, OrgAdminAuthProps, DeviceAuthProps, POSOperatorAuthProps, CustomerOAuthConfigProps } from './components/authentication/admin';
|
|
55
|
+
export { default as ContactInfo } from './plus/contactInfo';
|
|
56
|
+
export { default as ContactInfoModal } from './plus/contactInfoModal';
|
package/es/index.js
CHANGED
|
@@ -54,4 +54,6 @@ export { default as SaasRegister } from "./plus/saasRegister";
|
|
|
54
54
|
export { default as SaasCreateOrganization } from "./plus/saasCreateOrganization";
|
|
55
55
|
export { default as PinModal } from "./components/pinModal";
|
|
56
56
|
export { default as PinVerifyModal } from "./components/pinVerifyModal";
|
|
57
|
-
export { OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth } from "./components/authentication/admin";
|
|
57
|
+
export { OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth } from "./components/authentication/admin";
|
|
58
|
+
export { default as ContactInfo } from "./plus/contactInfo";
|
|
59
|
+
export { default as ContactInfoModal } from "./plus/contactInfoModal";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import "./index.less";
|
|
4
|
+
import { getClientName } from "./utils";
|
|
5
|
+
var ClientName = function ClientName(_ref) {
|
|
6
|
+
var className = _ref.className,
|
|
7
|
+
dataSource = _ref.dataSource,
|
|
8
|
+
style = _ref.style;
|
|
9
|
+
var name = useMemo(function () {
|
|
10
|
+
return getClientName(dataSource);
|
|
11
|
+
}, [dataSource]);
|
|
12
|
+
if (!dataSource) return null;
|
|
13
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
className: classNames('pisell-client-name', className),
|
|
15
|
+
style: style || {}
|
|
16
|
+
}, name);
|
|
17
|
+
};
|
|
18
|
+
export default ClientName;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type ClientData = {
|
|
3
|
+
display_name?: string;
|
|
4
|
+
nickname?: string;
|
|
5
|
+
first_name?: string;
|
|
6
|
+
last_name?: string;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
};
|
|
9
|
+
export interface IClientNameProps {
|
|
10
|
+
dataSource?: string | ClientData | null;
|
|
11
|
+
className?: string;
|
|
12
|
+
style?: React.CSSProperties;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export var getClientName = function getClientName(dataSource) {
|
|
2
|
+
if (!dataSource || typeof dataSource === 'string') {
|
|
3
|
+
return dataSource;
|
|
4
|
+
}
|
|
5
|
+
var first_name = dataSource.first_name,
|
|
6
|
+
last_name = dataSource.last_name,
|
|
7
|
+
display_name = dataSource.display_name,
|
|
8
|
+
nickname = dataSource.nickname;
|
|
9
|
+
var finalName = '';
|
|
10
|
+
if (display_name) {
|
|
11
|
+
finalName = display_name;
|
|
12
|
+
} else if (nickname) {
|
|
13
|
+
finalName = nickname;
|
|
14
|
+
} else if (first_name || last_name) {
|
|
15
|
+
finalName = "".concat(first_name, " ").concat(last_name).trim();
|
|
16
|
+
}
|
|
17
|
+
return finalName;
|
|
18
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AvatarConfig } from '../../types';
|
|
3
|
+
import '../../index.less';
|
|
4
|
+
interface AvatarProps {
|
|
5
|
+
config?: AvatarConfig;
|
|
6
|
+
name: string;
|
|
7
|
+
cover?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const Avatar: React.FC<AvatarProps>;
|
|
10
|
+
export default Avatar;
|