@pisell/private-materials 3.3.23 → 3.3.24
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/render/default/view.js +5 -5
- package/build/lowcode/view.js +6 -6
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/addons/model.js +5 -5
- package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
- package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/footer/index.d.ts +0 -1
- package/es/components/booking/components/footer/index.js +5 -4
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/service/addService/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/index.js +39 -15
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/utils.d.ts +4 -0
- package/es/components/booking/info/utils.js +18 -1
- package/es/components/booking/info2/service/addService/index.d.ts +0 -1
- package/es/components/booking/info2/service/editService/index.js +25 -2
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/booking/utils.js +8 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/index.d.ts +1 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.d.ts +1 -0
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/server.js +2 -2
- package/es/components/ruleSetting/index.d.ts +1 -0
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/model.d.ts +9 -1
- package/es/hooks/useComponents.js +1 -1
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/footer/index.d.ts +0 -1
- package/lib/components/booking/components/footer/index.js +6 -9
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/index.js +32 -10
- package/lib/components/booking/info/utils.d.ts +4 -0
- package/lib/components/booking/info/utils.js +17 -0
- package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info2/service/editService/index.js +28 -4
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.js +8 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.d.ts +1 -0
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/ruleSetting/index.d.ts +1 -0
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/model.d.ts +9 -1
- package/package.json +4 -4
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { IWalletListItemProps } from './serve';
|
|
2
3
|
export interface WalletCardItemProps {
|
|
3
4
|
id: string;
|
|
@@ -26,4 +27,11 @@ export interface WalletListProps {
|
|
|
26
27
|
currentSearchListItemCode?: string;
|
|
27
28
|
[key: string]: any;
|
|
28
29
|
}
|
|
29
|
-
export declare const Provider: any, Context:
|
|
30
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
31
|
+
global_wallet: WalletListProps;
|
|
32
|
+
} & {
|
|
33
|
+
dispatch: (params: {
|
|
34
|
+
type: string;
|
|
35
|
+
payload: any;
|
|
36
|
+
}) => void;
|
|
37
|
+
}>;
|
|
@@ -8,7 +8,7 @@ var useComponents = function useComponents(params) {
|
|
|
8
8
|
var _utils$getComponents;
|
|
9
9
|
var _ref = appHelper || {},
|
|
10
10
|
utils = _ref.utils;
|
|
11
|
-
return (utils === null || utils === void 0
|
|
11
|
+
return (utils === null || utils === void 0 ? void 0 : (_utils$getComponents = utils.getComponents) === null || _utils$getComponents === void 0 ? void 0 : _utils$getComponents.call(utils, components)) || [];
|
|
12
12
|
}, [components]);
|
|
13
13
|
return Cpt;
|
|
14
14
|
};
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
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
|
+
}>;
|
|
@@ -41,16 +41,16 @@ var import_react = __toESM(require("react"));
|
|
|
41
41
|
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
42
42
|
var import_addons = require("../../addons");
|
|
43
43
|
var import_utils2 = require("../../info/service2/utils");
|
|
44
|
-
var import_utils3 = require("../../info/utils");
|
|
45
44
|
var import_serve = require("../../info2/serve");
|
|
46
45
|
var import_AppointmentProductModal = __toESM(require("./AppointmentProductModal"));
|
|
47
46
|
var import_FooterMenus = __toESM(require("./FooterMenus"));
|
|
48
47
|
var import_amount = require("./amount");
|
|
49
48
|
var import_index = require("./index.less");
|
|
50
49
|
var import_serve2 = require("./serve");
|
|
51
|
-
var
|
|
50
|
+
var import_utils3 = require("./utils");
|
|
52
51
|
var import_voucher = __toESM(require("../voucher"));
|
|
53
52
|
var import__ = require("../../../../index");
|
|
53
|
+
var import_useIsBooking4Shop = require("../../hooks/useIsBooking4Shop");
|
|
54
54
|
var Footer = (props) => {
|
|
55
55
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
56
56
|
const { state, buttons, dispatch, source } = props;
|
|
@@ -58,6 +58,7 @@ var Footer = (props) => {
|
|
|
58
58
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
59
59
|
const [checkoutLoading, setCheckoutLoading] = (0, import_react.useState)(false);
|
|
60
60
|
const [isShowPaymentLink, setIsShowPaymentLink] = (0, import_react.useState)(false);
|
|
61
|
+
const isBooking4Shop = (0, import_useIsBooking4Shop.useIsBooking4Shop)(state);
|
|
61
62
|
const appointmentProductRef = (0, import_react.useRef)(null);
|
|
62
63
|
const context = (0, import_useEngineContext.default)();
|
|
63
64
|
const { isTerminal, interaction, store, storage, businessUtils } = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
|
@@ -242,11 +243,7 @@ var Footer = (props) => {
|
|
|
242
243
|
}
|
|
243
244
|
};
|
|
244
245
|
const getApis = () => {
|
|
245
|
-
|
|
246
|
-
if ((0, import_utils3.isBooking4Shop)(
|
|
247
|
-
(_e2 = (_d2 = (_c2 = (_b2 = (_a2 = context.appHelper.utils.store) == null ? void 0 : _a2.getState) == null ? void 0 : _b2.call(_a2)) == null ? void 0 : _c2.global) == null ? void 0 : _d2.globalConfig) == null ? void 0 : _e2.id,
|
|
248
|
-
state.renderType
|
|
249
|
-
) || state.renderType === "dayBooking") {
|
|
246
|
+
if (isBooking4Shop || state.renderType === "dayBooking") {
|
|
250
247
|
return {
|
|
251
248
|
editBooking: import_serve.editBookings,
|
|
252
249
|
createBooking: import_serve.createBookings
|
|
@@ -274,7 +271,7 @@ var Footer = (props) => {
|
|
|
274
271
|
const isHasDayProducts = handleDaySubmit();
|
|
275
272
|
if (isHasDayProducts) return;
|
|
276
273
|
}
|
|
277
|
-
if ((0, import_utils2.getIsSubjectRequire)(state) && (0,
|
|
274
|
+
if (isBooking4Shop && (0, import_utils2.getIsSubjectRequire)(state) && (0, import_utils3.checkHolderIsError)(state)) {
|
|
278
275
|
return;
|
|
279
276
|
}
|
|
280
277
|
let _setLoading = type === "checkout" ? setCheckoutLoading : setLoading;
|
|
@@ -288,7 +285,7 @@ var Footer = (props) => {
|
|
|
288
285
|
}
|
|
289
286
|
try {
|
|
290
287
|
let callbackData = null;
|
|
291
|
-
let values = (0,
|
|
288
|
+
let values = (0, import_utils3.formatValues)({ ...state, ...saveOtherValue });
|
|
292
289
|
const api = state.bookingId ? editApi : createApi;
|
|
293
290
|
if (addonsEdit) {
|
|
294
291
|
await handleSaveAddons();
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
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,5 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from '../model';
|
|
1
3
|
export declare const walkInData: {
|
|
2
4
|
id: number;
|
|
3
5
|
nickname: string;
|
|
4
6
|
};
|
|
5
|
-
export declare const Provider: any, Context:
|
|
7
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
8
|
+
state: FormState;
|
|
9
|
+
} & {
|
|
10
|
+
dispatch: (params: {
|
|
11
|
+
type: string;
|
|
12
|
+
payload: any;
|
|
13
|
+
}) => void;
|
|
14
|
+
}>;
|
|
@@ -397,7 +397,7 @@ var Info = (_, ref) => {
|
|
|
397
397
|
isEventBookingMode
|
|
398
398
|
]);
|
|
399
399
|
const handleEdit = (0, import_ahooks.useMemoizedFn)((e) => {
|
|
400
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
400
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2;
|
|
401
401
|
const item = state.service.cacheItem;
|
|
402
402
|
let values = form.getFieldsValue();
|
|
403
403
|
let dayValue = {};
|
|
@@ -412,6 +412,14 @@ var Info = (_, ref) => {
|
|
|
412
412
|
dayValue.product_option = option || [];
|
|
413
413
|
}
|
|
414
414
|
const isSession = (0, import_utils3.isSessionProduct)(item);
|
|
415
|
+
const sessionValue = {};
|
|
416
|
+
if (isSession) {
|
|
417
|
+
sessionValue.startEndTime = {
|
|
418
|
+
startDate: (_f2 = item == null ? void 0 : item._extend) == null ? void 0 : _f2.start_date,
|
|
419
|
+
endDate: (_g2 = item == null ? void 0 : item._extend) == null ? void 0 : _g2.end_date,
|
|
420
|
+
duration: (_h2 = item == null ? void 0 : item._extend) == null ? void 0 : _h2.duration
|
|
421
|
+
};
|
|
422
|
+
}
|
|
415
423
|
state.action({
|
|
416
424
|
type: "pisell1.handleOpenProductModal",
|
|
417
425
|
data: {
|
|
@@ -424,15 +432,18 @@ var Info = (_, ref) => {
|
|
|
424
432
|
package: true
|
|
425
433
|
},
|
|
426
434
|
value: {
|
|
427
|
-
...((
|
|
428
|
-
...dayValue
|
|
435
|
+
...((_i2 = item._extend) == null ? void 0 : _i2.other) || {},
|
|
436
|
+
...dayValue,
|
|
437
|
+
...sessionValue
|
|
429
438
|
},
|
|
430
439
|
isOS: isSession,
|
|
431
|
-
customer_id: isDayBookingMode ? ((
|
|
440
|
+
customer_id: isDayBookingMode ? ((_k2 = (_j2 = state.client) == null ? void 0 : _j2.value) == null ? void 0 : _k2.id) || 1 : void 0
|
|
432
441
|
},
|
|
433
442
|
callback: async (e2, extension_type, detail) => {
|
|
434
443
|
var _a3, _b3, _c3, _d3;
|
|
435
444
|
const _detail = detail || item;
|
|
445
|
+
const other = JSON.parse(JSON.stringify(e2));
|
|
446
|
+
other.session = e2.session;
|
|
436
447
|
let cacheItem = {
|
|
437
448
|
..._detail,
|
|
438
449
|
product_id: item.id,
|
|
@@ -443,7 +454,7 @@ var Info = (_, ref) => {
|
|
|
443
454
|
// 将当前表单的值覆盖进去
|
|
444
455
|
...values,
|
|
445
456
|
// 覆盖选择的规格和套餐
|
|
446
|
-
other
|
|
457
|
+
other
|
|
447
458
|
},
|
|
448
459
|
new: 0
|
|
449
460
|
};
|
|
@@ -451,6 +462,7 @@ var Info = (_, ref) => {
|
|
|
451
462
|
if ((_b3 = (_a3 = cacheItem == null ? void 0 : cacheItem._extend) == null ? void 0 : _a3.other) == null ? void 0 : _b3.product_variant_id) {
|
|
452
463
|
cacheItem._extend.price = Number((_d3 = (_c3 = cacheItem._extend) == null ? void 0 : _c3.other) == null ? void 0 : _d3.price);
|
|
453
464
|
}
|
|
465
|
+
const sessionDetail = (0, import_utils7.editSessionProduct)(cacheItem, e2.session);
|
|
454
466
|
cacheItem._extend.total = _total;
|
|
455
467
|
cacheItem._extend.origin_total = _total;
|
|
456
468
|
dispatch({
|
|
@@ -459,12 +471,22 @@ var Info = (_, ref) => {
|
|
|
459
471
|
cacheItem
|
|
460
472
|
}
|
|
461
473
|
});
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
474
|
+
if (isDayBookingMode) {
|
|
475
|
+
setTimeout(() => {
|
|
476
|
+
updateMultiDay({
|
|
477
|
+
start_date: values.start_date,
|
|
478
|
+
end_date: values.end_date
|
|
479
|
+
});
|
|
480
|
+
}, 100);
|
|
481
|
+
} else {
|
|
482
|
+
form.setFieldsValue({
|
|
483
|
+
total: _total,
|
|
484
|
+
...(0, import_utils3.isSessionProduct)(cacheItem) && sessionDetail ? {
|
|
485
|
+
start_time: sessionDetail.start_time,
|
|
486
|
+
duration: sessionDetail.duration
|
|
487
|
+
} : {}
|
|
466
488
|
});
|
|
467
|
-
}
|
|
489
|
+
}
|
|
468
490
|
}
|
|
469
491
|
});
|
|
470
492
|
});
|
|
@@ -43,4 +43,8 @@ export declare const getMultiDayPrices: (data: DataEntry[]) => ResultStructure;
|
|
|
43
43
|
export declare const isDayBooking: (shopId: number) => boolean;
|
|
44
44
|
export declare const isOpenAddTime: (state: any) => boolean;
|
|
45
45
|
export declare const isShowAddTime: (state: any, currentService: any) => boolean;
|
|
46
|
+
export declare const editSessionProduct: (cacheItem: any, session: any) => {
|
|
47
|
+
duration: any;
|
|
48
|
+
start_time: any;
|
|
49
|
+
} | undefined;
|
|
46
50
|
export {};
|
|
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// src/components/booking/info/utils.ts
|
|
30
30
|
var utils_exports = {};
|
|
31
31
|
__export(utils_exports, {
|
|
32
|
+
editSessionProduct: () => editSessionProduct,
|
|
32
33
|
formatServiceListByTime: () => formatServiceListByTime,
|
|
33
34
|
getIsBundleOrCombination: () => getIsBundleOrCombination,
|
|
34
35
|
getMultiDayPrices: () => getMultiDayPrices,
|
|
@@ -162,8 +163,24 @@ var isShowAddTime = (state, currentService) => {
|
|
|
162
163
|
}
|
|
163
164
|
return true;
|
|
164
165
|
};
|
|
166
|
+
var editSessionProduct = (cacheItem, session) => {
|
|
167
|
+
if ((0, import_utils.isSessionProduct)(cacheItem) && session) {
|
|
168
|
+
cacheItem._extend.start_date = session.start_at;
|
|
169
|
+
cacheItem._extend.startDate = session.start_at;
|
|
170
|
+
cacheItem._extend.start_time = session.start_time;
|
|
171
|
+
cacheItem._extend.end_time = session.end_time;
|
|
172
|
+
cacheItem._extend.end_date = session.end_at;
|
|
173
|
+
cacheItem._extend.endDate = session.end_at;
|
|
174
|
+
cacheItem._extend.duration = (0, import_utils.getDays)({ _extend: cacheItem._extend }, "minutes");
|
|
175
|
+
return {
|
|
176
|
+
duration: cacheItem._extend.duration,
|
|
177
|
+
start_time: session.start_time
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
};
|
|
165
181
|
// Annotate the CommonJS export names for ESM import in node:
|
|
166
182
|
0 && (module.exports = {
|
|
183
|
+
editSessionProduct,
|
|
167
184
|
formatServiceListByTime,
|
|
168
185
|
getIsBundleOrCombination,
|
|
169
186
|
getMultiDayPrices,
|
|
@@ -49,6 +49,7 @@ var import_utils3 = require("../../../utils");
|
|
|
49
49
|
var import_utilsByBooking = require("../../utilsByBooking");
|
|
50
50
|
var import_utils4 = require("../addService/utils");
|
|
51
51
|
var import_materials = require("@pisell/materials");
|
|
52
|
+
var import_utils5 = require("../../../info/utils");
|
|
52
53
|
var submitLock = false;
|
|
53
54
|
var Info = (_, ref) => {
|
|
54
55
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E;
|
|
@@ -293,9 +294,18 @@ var Info = (_, ref) => {
|
|
|
293
294
|
return ((_d2 = (_c2 = (_b2 = (_a2 = state.service) == null ? void 0 : _a2.cacheItem) == null ? void 0 : _b2._extend) == null ? void 0 : _c2.other) == null ? void 0 : _d2.bundle) || [];
|
|
294
295
|
}, [(_m = (_l = (_k = (_j = state.service) == null ? void 0 : _j.cacheItem) == null ? void 0 : _k._extend) == null ? void 0 : _l.other) == null ? void 0 : _m.bundle]);
|
|
295
296
|
const handleEdit = (e) => {
|
|
297
|
+
var _a2, _b2, _c2;
|
|
296
298
|
const item = state.service.cacheItem;
|
|
297
299
|
let values = form.getFieldsValue();
|
|
298
300
|
const isSession = (0, import_utils3.isSessionProduct)(item);
|
|
301
|
+
const sessionValue = {};
|
|
302
|
+
if (isSession) {
|
|
303
|
+
sessionValue.startEndTime = {
|
|
304
|
+
startDate: (_a2 = item == null ? void 0 : item._extend) == null ? void 0 : _a2.start_date,
|
|
305
|
+
endDate: (_b2 = item == null ? void 0 : item._extend) == null ? void 0 : _b2.end_date,
|
|
306
|
+
duration: (_c2 = item == null ? void 0 : item._extend) == null ? void 0 : _c2.duration
|
|
307
|
+
};
|
|
308
|
+
}
|
|
299
309
|
state.action({
|
|
300
310
|
type: "pisell1.handleOpenProductModal",
|
|
301
311
|
data: {
|
|
@@ -308,11 +318,16 @@ var Info = (_, ref) => {
|
|
|
308
318
|
package: true
|
|
309
319
|
},
|
|
310
320
|
isOS: isSession,
|
|
311
|
-
value:
|
|
321
|
+
value: {
|
|
322
|
+
...item._extend.other,
|
|
323
|
+
...sessionValue
|
|
324
|
+
}
|
|
312
325
|
},
|
|
313
326
|
callback: (e2, extension_type, detail) => {
|
|
314
|
-
var
|
|
327
|
+
var _a3;
|
|
315
328
|
const _detail = detail || item;
|
|
329
|
+
const other = JSON.parse(JSON.stringify(e2));
|
|
330
|
+
other.session = e2.session;
|
|
316
331
|
let cacheItem = {
|
|
317
332
|
...item,
|
|
318
333
|
..._detail,
|
|
@@ -324,7 +339,7 @@ var Info = (_, ref) => {
|
|
|
324
339
|
// 将当前表单的值覆盖进去
|
|
325
340
|
...values,
|
|
326
341
|
// 覆盖选择的规格和套餐
|
|
327
|
-
other
|
|
342
|
+
other
|
|
328
343
|
},
|
|
329
344
|
new: 0
|
|
330
345
|
};
|
|
@@ -337,6 +352,15 @@ var Info = (_, ref) => {
|
|
|
337
352
|
});
|
|
338
353
|
} catch (err) {
|
|
339
354
|
}
|
|
355
|
+
const sessionDetail = (0, import_utils5.editSessionProduct)(cacheItem, e2.session);
|
|
356
|
+
if (sessionDetail) {
|
|
357
|
+
setTimeout(() => {
|
|
358
|
+
form.setFieldsValue({
|
|
359
|
+
start_time: sessionDetail.start_time,
|
|
360
|
+
duration: sessionDetail.duration
|
|
361
|
+
});
|
|
362
|
+
}, 200);
|
|
363
|
+
}
|
|
340
364
|
cacheItem._extend.origin_total = _total;
|
|
341
365
|
dispatch({
|
|
342
366
|
type: "setService",
|
|
@@ -346,7 +370,7 @@ var Info = (_, ref) => {
|
|
|
346
370
|
});
|
|
347
371
|
form.setFieldsValue({
|
|
348
372
|
total: _total,
|
|
349
|
-
capacity: (
|
|
373
|
+
capacity: (_a3 = cacheItem._extend) == null ? void 0 : _a3.capacity
|
|
350
374
|
});
|
|
351
375
|
}
|
|
352
376
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
amountSymbol: string;
|
|
3
4
|
apis: {
|
|
@@ -104,4 +105,11 @@ export declare const walkInData: {
|
|
|
104
105
|
id: number;
|
|
105
106
|
nickname: string;
|
|
106
107
|
};
|
|
107
|
-
export declare const Provider: any, Context:
|
|
108
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
109
|
+
state: FormState;
|
|
110
|
+
} & {
|
|
111
|
+
dispatch: (params: {
|
|
112
|
+
type: string;
|
|
113
|
+
payload: any;
|
|
114
|
+
}) => void;
|
|
115
|
+
}>;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
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 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
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
|
+
}>;
|
|
@@ -397,6 +397,7 @@ var getEndDate = (startDate, duration, endDate) => {
|
|
|
397
397
|
return startDate.add(duration, "minute");
|
|
398
398
|
};
|
|
399
399
|
var getServiceTimes = (service) => {
|
|
400
|
+
var _a, _b;
|
|
400
401
|
const startDate = (0, import_dayjs.default)(
|
|
401
402
|
(0, import_dayjs.default)(service._extend.start_date).format("YYYY-MM-DD ") + getServeStartTime(service._extend.start_time)
|
|
402
403
|
);
|
|
@@ -404,6 +405,13 @@ var getServiceTimes = (service) => {
|
|
|
404
405
|
flexibleObj.getValue(service._extend.duration),
|
|
405
406
|
"minute"
|
|
406
407
|
);
|
|
408
|
+
const session = (_b = (_a = service == null ? void 0 : service._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.session;
|
|
409
|
+
if (isSessionProduct(service) && session) {
|
|
410
|
+
return {
|
|
411
|
+
startDate: (0, import_dayjs.default)(session.start_at),
|
|
412
|
+
endDate: (0, import_dayjs.default)(session.end_at)
|
|
413
|
+
};
|
|
414
|
+
}
|
|
407
415
|
return {
|
|
408
416
|
startDate,
|
|
409
417
|
endDate
|
|
@@ -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<"stripe" | "payo" | "tyro" | "windcave">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -295,9 +295,9 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
295
295
|
name?: string | undefined;
|
|
296
296
|
symbol?: string | undefined;
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
|
-
mode?: "
|
|
298
|
+
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "
|
|
300
|
+
eftpos?: "stripe" | "payo" | "tyro" | "windcave" | undefined;
|
|
301
301
|
action?: "amount" | "deviceList" | "pay" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
platform: 'pc' | 'h5' | '' | undefined;
|
|
3
4
|
order: any;
|
|
@@ -24,4 +25,11 @@ export interface PayGroup {
|
|
|
24
25
|
pay_number?: string;
|
|
25
26
|
_order: any;
|
|
26
27
|
}
|
|
27
|
-
export declare const Provider: any, Context:
|
|
28
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
29
|
+
state: FormState;
|
|
30
|
+
} & {
|
|
31
|
+
dispatch: (params: {
|
|
32
|
+
type: string;
|
|
33
|
+
payload: any;
|
|
34
|
+
}) => void;
|
|
35
|
+
}>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
2
3
|
import dayjs from "dayjs";
|
|
3
4
|
export interface FormState {
|
|
@@ -68,4 +69,11 @@ export interface FormState {
|
|
|
68
69
|
};
|
|
69
70
|
setGlobalState: Function | null;
|
|
70
71
|
}
|
|
71
|
-
export declare const Provider: any, Context:
|
|
72
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
73
|
+
state: FormState;
|
|
74
|
+
} & {
|
|
75
|
+
dispatch: (params: {
|
|
76
|
+
type: string;
|
|
77
|
+
payload: any;
|
|
78
|
+
}) => void;
|
|
79
|
+
}>;
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
addWalletCard: any;
|
|
4
|
+
}
|
|
5
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
+
walletDetailState: RechargeState;
|
|
7
|
+
} & {
|
|
8
|
+
dispatch: (params: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
total: number;
|
|
4
|
+
setup?: 'menu' | 'list' | 'detail' | string;
|
|
5
|
+
}
|
|
6
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
7
|
+
state: RechargeState;
|
|
8
|
+
} & {
|
|
9
|
+
dispatch: (params: {
|
|
10
|
+
type: string;
|
|
11
|
+
payload: any;
|
|
12
|
+
}) => void;
|
|
13
|
+
}>;
|
|
14
|
+
export {};
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
total: number;
|
|
4
|
+
}
|
|
5
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
+
state: RechargeState;
|
|
7
|
+
} & {
|
|
8
|
+
dispatch: (params: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -1 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
selectedGiftOptionId: string | null;
|
|
4
|
+
cardList: Array<{
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
price: number;
|
|
8
|
+
}>;
|
|
9
|
+
selectedItem: {
|
|
10
|
+
id?: string;
|
|
11
|
+
gift_price?: number;
|
|
12
|
+
price?: number;
|
|
13
|
+
name?: string;
|
|
14
|
+
variant_id?: string;
|
|
15
|
+
};
|
|
16
|
+
productId?: string;
|
|
17
|
+
detailId?: string;
|
|
18
|
+
total: string | number;
|
|
19
|
+
rechargeModalOpen: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
22
|
+
state: RechargeState;
|
|
23
|
+
} & {
|
|
24
|
+
dispatch: (params: {
|
|
25
|
+
type: string;
|
|
26
|
+
payload: any;
|
|
27
|
+
}) => void;
|
|
28
|
+
}>;
|
|
29
|
+
export {};
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
total: 0;
|
|
4
|
+
}
|
|
5
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
+
state: RechargeState;
|
|
7
|
+
} & {
|
|
8
|
+
dispatch: (params: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { IWalletListItemProps } from './serve';
|
|
2
3
|
export interface WalletCardItemProps {
|
|
3
4
|
id: string;
|
|
@@ -26,4 +27,11 @@ export interface WalletListProps {
|
|
|
26
27
|
currentSearchListItemCode?: string;
|
|
27
28
|
[key: string]: any;
|
|
28
29
|
}
|
|
29
|
-
export declare const Provider: any, Context:
|
|
30
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
31
|
+
global_wallet: WalletListProps;
|
|
32
|
+
} & {
|
|
33
|
+
dispatch: (params: {
|
|
34
|
+
type: string;
|
|
35
|
+
payload: any;
|
|
36
|
+
}) => void;
|
|
37
|
+
}>;
|