@pisell/private-materials 6.2.1 → 6.2.3
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 +13 -13
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/service/Lists.d.ts +1 -0
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/index.js +31 -5
- package/es/components/booking/materiels/holder/index.d.ts +1 -0
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.d.ts +1 -0
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/index.js +37 -7
- package/lib/components/booking/materiels/holder/index.d.ts +1 -0
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/package.json +1 -1
@@ -244,4 +244,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
|
|
244
244
|
* @Author: WangHan
|
245
245
|
* @Date: 2024-12-24 11:32
|
246
246
|
*/
|
247
|
-
export declare const updateServicePrice: (state: any) => never[]
|
247
|
+
export declare const updateServicePrice: (state: any) => Promise<any> | never[];
|
@@ -20,6 +20,7 @@ import Header from "../info/header";
|
|
20
20
|
import localeTexts from "../locales";
|
21
21
|
import { locales } from '@pisell/utils';
|
22
22
|
import ReloadResourceModal from "../components/reloadResourceModal";
|
23
|
+
import { sendWarningLog } from '@pisell/utils';
|
23
24
|
import { findNextDuration, flexibleObj, sliceDayIntoFiveMinutes, request } from "../utils";
|
24
25
|
import { formatResource } from "./utilsByBooking";
|
25
26
|
import { getErrorList } from "./utilsByBooking";
|
@@ -179,8 +180,22 @@ var Info = Provider(function (props) {
|
|
179
180
|
}));
|
180
181
|
case 3:
|
181
182
|
data = _context.sent;
|
182
|
-
|
183
|
-
|
183
|
+
try {
|
184
|
+
data.date = currentDate;
|
185
|
+
localStorage.setItem('bookingResourceList', JSON.stringify(data));
|
186
|
+
} catch (error) {
|
187
|
+
sendWarningLog({
|
188
|
+
title: "\u8BBE\u7F6E\u8D44\u6E90\u5931\u8D25",
|
189
|
+
content: [{
|
190
|
+
key: 'error',
|
191
|
+
value: JSON.stringify({
|
192
|
+
message: error === null || error === void 0 ? void 0 : error.message,
|
193
|
+
stack: error === null || error === void 0 ? void 0 : error.stack,
|
194
|
+
name: error === null || error === void 0 ? void 0 : error.name
|
195
|
+
})
|
196
|
+
}]
|
197
|
+
});
|
198
|
+
}
|
184
199
|
modal.dispatch({
|
185
200
|
type: 'setService',
|
186
201
|
payload: _objectSpread(_objectSpread({}, stateRef.current.service), {}, {
|
@@ -192,9 +207,20 @@ var Info = Provider(function (props) {
|
|
192
207
|
resolve(data);
|
193
208
|
_context.next = 14;
|
194
209
|
break;
|
195
|
-
case
|
196
|
-
_context.prev =
|
210
|
+
case 9:
|
211
|
+
_context.prev = 9;
|
197
212
|
_context.t0 = _context["catch"](0);
|
213
|
+
sendWarningLog({
|
214
|
+
title: "\u83B7\u53D6\u8D44\u6E90\u5931\u8D25",
|
215
|
+
content: [{
|
216
|
+
key: 'error',
|
217
|
+
value: JSON.stringify({
|
218
|
+
message: _context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message,
|
219
|
+
stack: _context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.stack,
|
220
|
+
name: _context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.name
|
221
|
+
})
|
222
|
+
}]
|
223
|
+
});
|
198
224
|
modal.dispatch({
|
199
225
|
type: 'setService',
|
200
226
|
payload: _objectSpread(_objectSpread({}, stateRef.current.service), {}, {
|
@@ -206,7 +232,7 @@ var Info = Provider(function (props) {
|
|
206
232
|
case "end":
|
207
233
|
return _context.stop();
|
208
234
|
}
|
209
|
-
}, _callee, null, [[0,
|
235
|
+
}, _callee, null, [[0, 9]]);
|
210
236
|
})), timeoutNumber);
|
211
237
|
}));
|
212
238
|
case 4:
|
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
|
|
15
15
|
readonly numRef: React.MutableRefObject<string | number | undefined>;
|
16
16
|
readonly orderIdRef: React.MutableRefObject<string | number>;
|
17
17
|
readonly modeRef: React.MutableRefObject<ModeEnum>;
|
18
|
-
readonly statusRef: React.MutableRefObject<"
|
18
|
+
readonly statusRef: React.MutableRefObject<"success" | "loading" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
|
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<"tyro" | "windcave" | "stripe" | "payo" | "linkly">;
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
25
25
|
};
|
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
|
|
174
174
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
175
175
|
type: EActionTypes;
|
176
176
|
payload: {
|
177
|
-
status: "
|
177
|
+
status: "success" | "loading" | "warn" | "fail" | "question";
|
178
178
|
};
|
179
179
|
};
|
180
180
|
/**
|
@@ -297,18 +297,18 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
297
297
|
amount?: string | number | undefined;
|
298
298
|
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
299
299
|
order_id?: string | number | undefined;
|
300
|
-
eftpos?: "
|
300
|
+
eftpos?: "tyro" | "windcave" | "stripe" | "payo" | "linkly" | undefined;
|
301
301
|
action?: "amount" | "pay" | "deviceList" | undefined;
|
302
302
|
key?: number | undefined;
|
303
303
|
step?: number | undefined;
|
304
304
|
title?: string | undefined;
|
305
305
|
subTitle?: string | undefined;
|
306
|
-
type?: "
|
306
|
+
type?: "unset" | "step" | undefined;
|
307
307
|
render?: boolean | undefined;
|
308
308
|
net?: boolean | undefined;
|
309
309
|
component?: string | undefined;
|
310
310
|
form?: string | undefined;
|
311
|
-
status?: "
|
311
|
+
status?: "success" | "loading" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
312
312
|
warn?: string | undefined;
|
313
313
|
steps?: {
|
314
314
|
/** 用于重置当前步骤 */
|
@@ -17,6 +17,6 @@ declare let modal: Omit<ModalStaticFunctions, "warn">;
|
|
17
17
|
export declare const setModal: (m: Omit<ModalStaticFunctions, "warn">) => void;
|
18
18
|
export declare const saveConfirm: () => Promise<{
|
19
19
|
destroy: () => void;
|
20
|
-
update: (configUpdate: import("antd
|
20
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
21
21
|
}>;
|
22
22
|
export { modal };
|
package/es/utils/index.d.ts
CHANGED
@@ -18,6 +18,6 @@ declare let modal: Omit<ModalStaticFunctions, 'warn'>;
|
|
18
18
|
export declare const setModal: (m: Omit<ModalStaticFunctions, 'warn'>) => void;
|
19
19
|
export declare const saveConfirm: () => Promise<{
|
20
20
|
destroy: () => void;
|
21
|
-
update: (configUpdate: import("antd
|
21
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
22
22
|
}>;
|
23
23
|
export { modal };
|
@@ -244,4 +244,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
|
|
244
244
|
* @Author: WangHan
|
245
245
|
* @Date: 2024-12-24 11:32
|
246
246
|
*/
|
247
|
-
export declare const updateServicePrice: (state: any) => never[]
|
247
|
+
export declare const updateServicePrice: (state: any) => Promise<any> | never[];
|
@@ -45,7 +45,8 @@ var import_header = __toESM(require("../info/header"));
|
|
45
45
|
var import_locales = __toESM(require("../locales"));
|
46
46
|
var import_utils = require("@pisell/utils");
|
47
47
|
var import_reloadResourceModal = __toESM(require("../components/reloadResourceModal"));
|
48
|
-
var import_utils2 = require("
|
48
|
+
var import_utils2 = require("@pisell/utils");
|
49
|
+
var import_utils3 = require("../utils");
|
49
50
|
var import_utilsByBooking = require("./utilsByBooking");
|
50
51
|
var import_utilsByBooking2 = require("./utilsByBooking");
|
51
52
|
var import_serve = require("./serve");
|
@@ -71,7 +72,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
71
72
|
const { style, globalState, modules = defaultModules, slot } = props;
|
72
73
|
const modal = (0, import_react.useContext)(import_model.Context);
|
73
74
|
const context = (0, import_useEngineContext.default)();
|
74
|
-
|
75
|
+
import_utils3.request.setRequest(context.appHelper.utils.request);
|
75
76
|
const params = (0, import_react.useMemo)(() => {
|
76
77
|
var _a2, _b2, _c2, _d2;
|
77
78
|
return ((_d2 = (_c2 = (_b2 = (_a2 = modal.state) == null ? void 0 : _a2.bookingConfig) == null ? void 0 : _b2.config) == null ? void 0 : _c2.basic) == null ? void 0 : _d2.appointment_subject) || {};
|
@@ -86,9 +87,9 @@ var Info = (0, import_model.Provider)((props) => {
|
|
86
87
|
bookingFunctions: {
|
87
88
|
formatResource: import_utilsByBooking.formatResource,
|
88
89
|
getErrorList: import_utilsByBooking2.getErrorList,
|
89
|
-
sliceDayIntoFiveMinutes:
|
90
|
-
findNextDuration:
|
91
|
-
flexibleObj:
|
90
|
+
sliceDayIntoFiveMinutes: import_utils3.sliceDayIntoFiveMinutes,
|
91
|
+
findNextDuration: import_utils3.findNextDuration,
|
92
|
+
flexibleObj: import_utils3.flexibleObj,
|
92
93
|
updateServiceDate: import_date2.updateServiceDate
|
93
94
|
}
|
94
95
|
});
|
@@ -174,8 +175,24 @@ var Info = (0, import_model.Provider)((props) => {
|
|
174
175
|
},
|
175
176
|
(_d2 = (_c2 = (_b2 = (_a2 = stateRef == null ? void 0 : stateRef.current) == null ? void 0 : _a2.service) == null ? void 0 : _b2.value) == null ? void 0 : _c2.map) == null ? void 0 : _d2.call(_c2, (item) => item == null ? void 0 : item.booking_id)
|
176
177
|
);
|
177
|
-
|
178
|
-
|
178
|
+
try {
|
179
|
+
data.date = currentDate;
|
180
|
+
localStorage.setItem("bookingResourceList", JSON.stringify(data));
|
181
|
+
} catch (error) {
|
182
|
+
(0, import_utils2.sendWarningLog)({
|
183
|
+
title: `设置资源失败`,
|
184
|
+
content: [
|
185
|
+
{
|
186
|
+
key: "error",
|
187
|
+
value: JSON.stringify({
|
188
|
+
message: error == null ? void 0 : error.message,
|
189
|
+
stack: error == null ? void 0 : error.stack,
|
190
|
+
name: error == null ? void 0 : error.name
|
191
|
+
})
|
192
|
+
}
|
193
|
+
]
|
194
|
+
});
|
195
|
+
}
|
179
196
|
modal.dispatch({
|
180
197
|
type: "setService",
|
181
198
|
payload: {
|
@@ -187,6 +204,19 @@ var Info = (0, import_model.Provider)((props) => {
|
|
187
204
|
});
|
188
205
|
resolve(data);
|
189
206
|
} catch (error) {
|
207
|
+
(0, import_utils2.sendWarningLog)({
|
208
|
+
title: `获取资源失败`,
|
209
|
+
content: [
|
210
|
+
{
|
211
|
+
key: "error",
|
212
|
+
value: JSON.stringify({
|
213
|
+
message: error == null ? void 0 : error.message,
|
214
|
+
stack: error == null ? void 0 : error.stack,
|
215
|
+
name: error == null ? void 0 : error.name
|
216
|
+
})
|
217
|
+
}
|
218
|
+
]
|
219
|
+
});
|
190
220
|
modal.dispatch({
|
191
221
|
type: "setService",
|
192
222
|
payload: {
|
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
|
|
15
15
|
readonly numRef: React.MutableRefObject<string | number | undefined>;
|
16
16
|
readonly orderIdRef: React.MutableRefObject<string | number>;
|
17
17
|
readonly modeRef: React.MutableRefObject<ModeEnum>;
|
18
|
-
readonly statusRef: React.MutableRefObject<"
|
18
|
+
readonly statusRef: React.MutableRefObject<"success" | "loading" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
|
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<"tyro" | "windcave" | "stripe" | "payo" | "linkly">;
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
25
25
|
};
|
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
|
|
174
174
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
175
175
|
type: EActionTypes;
|
176
176
|
payload: {
|
177
|
-
status: "
|
177
|
+
status: "success" | "loading" | "warn" | "fail" | "question";
|
178
178
|
};
|
179
179
|
};
|
180
180
|
/**
|
@@ -297,18 +297,18 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
297
297
|
amount?: string | number | undefined;
|
298
298
|
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
299
299
|
order_id?: string | number | undefined;
|
300
|
-
eftpos?: "
|
300
|
+
eftpos?: "tyro" | "windcave" | "stripe" | "payo" | "linkly" | undefined;
|
301
301
|
action?: "amount" | "pay" | "deviceList" | undefined;
|
302
302
|
key?: number | undefined;
|
303
303
|
step?: number | undefined;
|
304
304
|
title?: string | undefined;
|
305
305
|
subTitle?: string | undefined;
|
306
|
-
type?: "
|
306
|
+
type?: "unset" | "step" | undefined;
|
307
307
|
render?: boolean | undefined;
|
308
308
|
net?: boolean | undefined;
|
309
309
|
component?: string | undefined;
|
310
310
|
form?: string | undefined;
|
311
|
-
status?: "
|
311
|
+
status?: "success" | "loading" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
312
312
|
warn?: string | undefined;
|
313
313
|
steps?: {
|
314
314
|
/** 用于重置当前步骤 */
|
@@ -17,6 +17,6 @@ declare let modal: Omit<ModalStaticFunctions, "warn">;
|
|
17
17
|
export declare const setModal: (m: Omit<ModalStaticFunctions, "warn">) => void;
|
18
18
|
export declare const saveConfirm: () => Promise<{
|
19
19
|
destroy: () => void;
|
20
|
-
update: (configUpdate: import("antd
|
20
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
21
21
|
}>;
|
22
22
|
export { modal };
|
package/lib/utils/index.d.ts
CHANGED
@@ -18,6 +18,6 @@ declare let modal: Omit<ModalStaticFunctions, 'warn'>;
|
|
18
18
|
export declare const setModal: (m: Omit<ModalStaticFunctions, 'warn'>) => void;
|
19
19
|
export declare const saveConfirm: () => Promise<{
|
20
20
|
destroy: () => void;
|
21
|
-
update: (configUpdate: import("antd
|
21
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
22
22
|
}>;
|
23
23
|
export { modal };
|