@pisell/private-materials 6.4.19 → 6.4.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +11 -11
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +6 -6
- package/es/components/booking/info/main.js +2 -2
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/checkout/PaymentModal.js +17 -7
- package/es/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +1 -0
- package/lib/components/booking/info/main.js +5 -5
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/checkout/PaymentModal.js +5 -0
- package/lib/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +1 -0
- package/package.json +12 -12
- package/es/hooks/useEngineContext.d.ts +0 -3
- package/lib/hooks/useEngineContext.d.ts +0 -3
@@ -36,7 +36,7 @@ var defaultModules = {
|
|
36
36
|
};
|
37
37
|
locales.init(localeTexts, getLocale());
|
38
38
|
var Info = Provider(function (props) {
|
39
|
-
var _modal$state2, _modal$state3,
|
39
|
+
var _modal$state2, _modal$state3, _modal$state4;
|
40
40
|
var style = props.style,
|
41
41
|
globalState = props.globalState,
|
42
42
|
_props$modules = props.modules,
|
@@ -128,7 +128,7 @@ var Info = Provider(function (props) {
|
|
128
128
|
}, [modules.note, globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, globalState.render, (_modal$state3 = modal.state) === null || _modal$state3 === void 0 || (_modal$state3 = _modal$state3.notes) === null || _modal$state3 === void 0 ? void 0 : _modal$state3.orderNote]);
|
129
129
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !!modal.state.setGlobalState ? /*#__PURE__*/React.createElement(TabPane, {
|
130
130
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
131
|
-
height:
|
131
|
+
height: '100%'
|
132
132
|
}),
|
133
133
|
header: header,
|
134
134
|
footer: /*#__PURE__*/React.createElement(Footer, {
|
@@ -165,10 +165,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
165
165
|
export declare const getDuration: (duration: number | {
|
166
166
|
type: string;
|
167
167
|
value: number;
|
168
|
-
}) => number |
|
168
|
+
}) => number | {
|
169
169
|
type: string;
|
170
170
|
value: number;
|
171
|
-
};
|
171
|
+
} | "flexible";
|
172
172
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
173
173
|
export declare const getIsEdit: (state: any) => boolean;
|
174
174
|
export {};
|
@@ -1048,25 +1048,35 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
1048
1048
|
};
|
1049
1049
|
var handleSendCustomerPaymentLink = /*#__PURE__*/function () {
|
1050
1050
|
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(data) {
|
1051
|
-
var isCurrentOrderSynced, res;
|
1051
|
+
var order, stateAmount, isCurrentOrderSynced, res;
|
1052
1052
|
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
1053
1053
|
while (1) switch (_context12.prev = _context12.next) {
|
1054
1054
|
case 0:
|
1055
1055
|
// 先检测订单是否同步过,如果没有,需要先手动下单
|
1056
|
+
// 如果是定金模式,则需要设置当前待付金额至 os 的 deposit_amount
|
1057
|
+
order = checkoutModule.getCurrentOrderInfo();
|
1058
|
+
if (!order.isDeposit) {
|
1059
|
+
_context12.next = 5;
|
1060
|
+
break;
|
1061
|
+
}
|
1062
|
+
stateAmount = checkoutModule.getStateAmount();
|
1063
|
+
_context12.next = 5;
|
1064
|
+
return checkoutModule.setDepositAmountAsync(stateAmount);
|
1065
|
+
case 5:
|
1056
1066
|
isCurrentOrderSynced = checkoutModule.isCurrentOrderSynced();
|
1057
1067
|
if (isCurrentOrderSynced) {
|
1058
|
-
_context12.next =
|
1068
|
+
_context12.next = 9;
|
1059
1069
|
break;
|
1060
1070
|
}
|
1061
|
-
_context12.next =
|
1071
|
+
_context12.next = 9;
|
1062
1072
|
return checkoutModule.manualSyncOrderAsync();
|
1063
|
-
case
|
1064
|
-
_context12.next =
|
1073
|
+
case 9:
|
1074
|
+
_context12.next = 11;
|
1065
1075
|
return checkoutModule.sendCustomerPayLinkAsync({
|
1066
1076
|
emails: data.emails,
|
1067
1077
|
order_ids: [checkoutModule.getCurrentOrderId()]
|
1068
1078
|
});
|
1069
|
-
case
|
1079
|
+
case 11:
|
1070
1080
|
res = _context12.sent;
|
1071
1081
|
// 支付链接发送成功 转 toC,这边可以关掉了
|
1072
1082
|
if (res.success) {
|
@@ -1075,7 +1085,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
1075
1085
|
} else {
|
1076
1086
|
Toast === null || Toast === void 0 || Toast.error(res.message || locales.getText('pisell2.checkout.send-payment-link.error'));
|
1077
1087
|
}
|
1078
|
-
case
|
1088
|
+
case 13:
|
1079
1089
|
case "end":
|
1080
1090
|
return _context12.stop();
|
1081
1091
|
}
|
@@ -64,7 +64,7 @@ var defaultModules = {
|
|
64
64
|
};
|
65
65
|
import_utils.locales.init(import_locales.default, (0, import_locales2.getLocale)());
|
66
66
|
var Info = (0, import_model.Provider)((props) => {
|
67
|
-
var _a, _b, _c, _d, _e, _f, _g
|
67
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
68
68
|
const { style, globalState, modules = defaultModules, slot } = props;
|
69
69
|
const modal = (0, import_react.useContext)(import_model.Context);
|
70
70
|
const context = (0, import_useEngineContext.default)();
|
@@ -90,7 +90,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
90
90
|
}
|
91
91
|
}, []);
|
92
92
|
(0, import_react.useEffect)(() => {
|
93
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2,
|
93
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k, _l, _m;
|
94
94
|
const isFranchisee = (_d2 = (_c2 = (_b2 = (_a2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _a2.utils) == null ? void 0 : _b2.businessUtils) == null ? void 0 : _c2.getAppByModal) == null ? void 0 : _d2.call(_c2, "franchisee");
|
95
95
|
modal.dispatch({
|
96
96
|
type: "setState",
|
@@ -99,7 +99,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
99
99
|
...globalState,
|
100
100
|
isTerminal: (_g2 = (_f2 = (_e2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _e2.utils) == null ? void 0 : _f2.isTerminal) == null ? void 0 : _g2.call(_f2),
|
101
101
|
isFranchisee,
|
102
|
-
timezone: (_m = (_l = (_k = (_j = (
|
102
|
+
timezone: (_m = (_l = (_k = (_j = (_i = (_h = context == null ? void 0 : context.appHelper) == null ? void 0 : _h.utils) == null ? void 0 : _i.store) == null ? void 0 : _j.getState()) == null ? void 0 : _k.global) == null ? void 0 : _l.globalConfig) == null ? void 0 : _m.timezone,
|
103
103
|
isDayBooking: (globalState == null ? void 0 : globalState.renderType) === "dayBooking"
|
104
104
|
}
|
105
105
|
});
|
@@ -152,7 +152,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
152
152
|
{
|
153
153
|
style: {
|
154
154
|
...style,
|
155
|
-
height:
|
155
|
+
height: "100%"
|
156
156
|
},
|
157
157
|
header,
|
158
158
|
footer: /* @__PURE__ */ import_react.default.createElement(
|
@@ -171,7 +171,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
171
171
|
dispatch: modal.dispatch,
|
172
172
|
source: "info"
|
173
173
|
},
|
174
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, modules.client ? /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, modules.holder && !((
|
174
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, modules.client ? /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, modules.holder && !((_g = modal.state) == null ? void 0 : _g.disabledEdit) ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, params.type === "form" ? /* @__PURE__ */ import_react.default.createElement(import_pet.default, null) : null) : null, modules.date ? /* @__PURE__ */ import_react.default.createElement(import_date.default, null) : null, /* @__PURE__ */ import_react.default.createElement(
|
175
175
|
import_antd.Skeleton,
|
176
176
|
{
|
177
177
|
loading: globalState.loading,
|
@@ -165,10 +165,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
165
165
|
export declare const getDuration: (duration: number | {
|
166
166
|
type: string;
|
167
167
|
value: number;
|
168
|
-
}) => number |
|
168
|
+
}) => number | {
|
169
169
|
type: string;
|
170
170
|
value: number;
|
171
|
-
};
|
171
|
+
} | "flexible";
|
172
172
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
173
173
|
export declare const getIsEdit: (state: any) => boolean;
|
174
174
|
export {};
|
@@ -744,6 +744,11 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
744
744
|
};
|
745
745
|
};
|
746
746
|
const handleSendCustomerPaymentLink = async (data) => {
|
747
|
+
const order = checkoutModule.getCurrentOrderInfo();
|
748
|
+
if (order.isDeposit) {
|
749
|
+
const stateAmount = checkoutModule.getStateAmount();
|
750
|
+
await checkoutModule.setDepositAmountAsync(stateAmount);
|
751
|
+
}
|
747
752
|
const isCurrentOrderSynced = checkoutModule.isCurrentOrderSynced();
|
748
753
|
if (!isCurrentOrderSynced) {
|
749
754
|
await checkoutModule.manualSyncOrderAsync();
|
package/package.json
CHANGED
@@ -1,12 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pisell/private-materials",
|
3
|
-
"version": "6.4.
|
4
|
-
"scripts": {
|
5
|
-
"dev": "father dev",
|
6
|
-
"build": "father build",
|
7
|
-
"lowcode:dev": "build-scripts start --config ./build.lowcode.js",
|
8
|
-
"lowcode:build": " build-scripts build --config ./build.lowcode.js"
|
9
|
-
},
|
3
|
+
"version": "6.4.21",
|
10
4
|
"main": "./lib/index.js",
|
11
5
|
"module": "./es/index.js",
|
12
6
|
"types": "./lib/index.d.ts",
|
@@ -56,10 +50,6 @@
|
|
56
50
|
"@dnd-kit/modifiers": "^6.0.1",
|
57
51
|
"@dnd-kit/sortable": "^7.0.2",
|
58
52
|
"@dnd-kit/utilities": "^3.2.1",
|
59
|
-
"@pisell/date-picker": "workspace:*",
|
60
|
-
"@pisell/icon": "workspace:*",
|
61
|
-
"@pisell/materials": "workspace:*",
|
62
|
-
"@pisell/utils": "workspace:*",
|
63
53
|
"ahooks": "^3.7.6",
|
64
54
|
"antd": "^5.6.3",
|
65
55
|
"classnames": "^2.3.2",
|
@@ -68,7 +58,11 @@
|
|
68
58
|
"rc-virtual-list": "^3.11.3",
|
69
59
|
"react-infinite-scroll-component": "^6.1.0",
|
70
60
|
"react-resizable": "^3.0.5",
|
71
|
-
"styled-components": "^6.0.0-rc.3"
|
61
|
+
"styled-components": "^6.0.0-rc.3",
|
62
|
+
"@pisell/date-picker": "3.0.7",
|
63
|
+
"@pisell/icon": "0.0.11",
|
64
|
+
"@pisell/materials": "6.4.3",
|
65
|
+
"@pisell/utils": "3.0.2"
|
72
66
|
},
|
73
67
|
"peerDependencies": {
|
74
68
|
"react": "^18.0.0",
|
@@ -76,5 +70,11 @@
|
|
76
70
|
},
|
77
71
|
"componentConfig": {
|
78
72
|
"materialSchema": "https://unpkg.com/@pisell/materials@1.0.1/build/lowcode/assets-prod.json"
|
73
|
+
},
|
74
|
+
"scripts": {
|
75
|
+
"dev": "father dev",
|
76
|
+
"build": "father build",
|
77
|
+
"lowcode:dev": "build-scripts start --config ./build.lowcode.js",
|
78
|
+
"lowcode:build": " build-scripts build --config ./build.lowcode.js"
|
79
79
|
}
|
80
80
|
}
|