@pisell/private-materials 6.6.75 → 6.6.77
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 +5 -5
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/booking/components/footer/utils.js +1 -1
- package/es/components/booking/components/voucher/index.js +9 -3
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/booking/components/footer/utils.js +1 -1
- package/lib/components/booking/components/voucher/index.js +9 -3
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/package.json +3 -3
|
@@ -653,7 +653,7 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
653
653
|
}
|
|
654
654
|
if (!isDay && !isEvent) {
|
|
655
655
|
list = list.filter(function (item) {
|
|
656
|
-
return !isNormalProductByDurationSchedule(item);
|
|
656
|
+
return !isNormalProductByDurationSchedule(item) || !!item.schedule_event_id;
|
|
657
657
|
});
|
|
658
658
|
}
|
|
659
659
|
var dayParams = {};
|
|
@@ -43,7 +43,7 @@ var ShopDiscountHooks = {
|
|
|
43
43
|
};
|
|
44
44
|
var services = {};
|
|
45
45
|
var VoucherCard = function VoucherCard(props) {
|
|
46
|
-
var _context$appHelper, _state$client$value, _state$pet2, _state$service3;
|
|
46
|
+
var _context$appHelper, _state$client$value, _state$bookingDetail2, _state$pet2, _state$service3;
|
|
47
47
|
var context = useEngineContext();
|
|
48
48
|
var state = props.state,
|
|
49
49
|
dispatch = props.dispatch,
|
|
@@ -116,6 +116,12 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
116
116
|
}, [(_state$client$value = state.client.value) === null || _state$client$value === void 0 ? void 0 : _state$client$value.id, isBooking4Shop], {
|
|
117
117
|
wait: 200
|
|
118
118
|
});
|
|
119
|
+
useEffect(function () {
|
|
120
|
+
if (shopDiscount !== null && shopDiscount !== void 0 && shopDiscount.setOrderId) {
|
|
121
|
+
var _shopDiscount$setOrde, _state$bookingDetail;
|
|
122
|
+
(_shopDiscount$setOrde = shopDiscount.setOrderId) === null || _shopDiscount$setOrde === void 0 || _shopDiscount$setOrde.call(shopDiscount, ((_state$bookingDetail = state.bookingDetail) === null || _state$bookingDetail === void 0 ? void 0 : _state$bookingDetail.id) || (state === null || state === void 0 ? void 0 : state.bookingId));
|
|
123
|
+
}
|
|
124
|
+
}, [(_state$bookingDetail2 = state.bookingDetail) === null || _state$bookingDetail2 === void 0 ? void 0 : _state$bookingDetail2.id, state === null || state === void 0 ? void 0 : state.bookingId]);
|
|
119
125
|
|
|
120
126
|
// 设置productList
|
|
121
127
|
useEffect(function () {
|
|
@@ -199,8 +205,8 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
199
205
|
shopDiscount === null || shopDiscount === void 0 || (_shopDiscount$setBook = shopDiscount.setBookingSubject) === null || _shopDiscount$setBook === void 0 || _shopDiscount$setBook.call(shopDiscount, (_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 ? void 0 : _state$bookingConfig.appointment_subject);
|
|
200
206
|
}, [state.bookingConfig]);
|
|
201
207
|
var disabled = useMemo(function () {
|
|
202
|
-
var _state$
|
|
203
|
-
if (['paid', 'partially_paid'].includes((_state$
|
|
208
|
+
var _state$bookingDetail3;
|
|
209
|
+
if (['paid', 'partially_paid'].includes((_state$bookingDetail3 = state.bookingDetail) === null || _state$bookingDetail3 === void 0 ? void 0 : _state$bookingDetail3.payment_status) && hasEveryBookingId([].concat(_toConsumableArray(state.addons.value || []), _toConsumableArray(state.service.value || [])))) {
|
|
204
210
|
return true;
|
|
205
211
|
}
|
|
206
212
|
return false;
|
|
@@ -4,6 +4,6 @@ declare const useSendModal: (bookingId?: number) => {
|
|
|
4
4
|
setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
5
5
|
handleOpen: () => void;
|
|
6
6
|
handleValuesChange: (val: any) => void;
|
|
7
|
-
handleOk: (values: SendModalValues) => Promise<
|
|
7
|
+
handleOk: (values: SendModalValues) => Promise<any>;
|
|
8
8
|
};
|
|
9
9
|
export default useSendModal;
|
|
@@ -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<"stripe" | "tyro" | "
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"stripe" | "tyro" | "mx51" | "payo" | "windcave" | "linkly" | "huifu" | "adyenpos" | "adyenalipay" | "adyenwechat">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -301,8 +301,8 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
301
301
|
amount?: string | number | undefined;
|
|
302
302
|
mode?: "pay" | "refund" | "fullPay" | "query" | undefined;
|
|
303
303
|
order_id?: string | number | undefined;
|
|
304
|
-
eftpos?: "stripe" | "tyro" | "
|
|
305
|
-
action?: "
|
|
304
|
+
eftpos?: "stripe" | "tyro" | "mx51" | "payo" | "windcave" | "linkly" | "huifu" | "adyenpos" | "adyenalipay" | "adyenwechat" | undefined;
|
|
305
|
+
action?: "pay" | "amount" | "deviceList" | undefined;
|
|
306
306
|
key?: number | undefined;
|
|
307
307
|
step?: number | undefined;
|
|
308
308
|
title?: string | undefined;
|
|
@@ -478,7 +478,7 @@ var formatBookings = (data, values) => {
|
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
480
|
if (!isDay && !isEvent) {
|
|
481
|
-
list = list.filter((item) => !(0, import_utils4.isNormalProductByDurationSchedule)(item));
|
|
481
|
+
list = list.filter((item) => !(0, import_utils4.isNormalProductByDurationSchedule)(item) || !!item.schedule_event_id);
|
|
482
482
|
}
|
|
483
483
|
let dayParams = {};
|
|
484
484
|
const eventOtherParams = data.eventOtherParams;
|
|
@@ -48,7 +48,7 @@ var import_utils3 = require("../../info/clientVariant/utils");
|
|
|
48
48
|
var import_useShopDiscountModule = require("../../../ticketBooking/hooks/pisellos/useShopDiscountModule");
|
|
49
49
|
var services = {};
|
|
50
50
|
var VoucherCard = (props) => {
|
|
51
|
-
var _a, _b, _c, _d, _e;
|
|
51
|
+
var _a, _b, _c, _d, _e, _f;
|
|
52
52
|
const context = (0, import_useEngineContext.default)();
|
|
53
53
|
const { state, dispatch, source, isInModal = false } = props;
|
|
54
54
|
const [showDetail, setShowDetail] = (0, import_react.useState)(isInModal ? true : false);
|
|
@@ -98,6 +98,12 @@ var VoucherCard = (props) => {
|
|
|
98
98
|
wait: 200
|
|
99
99
|
}
|
|
100
100
|
);
|
|
101
|
+
(0, import_react.useEffect)(() => {
|
|
102
|
+
var _a2, _b2;
|
|
103
|
+
if (shopDiscount == null ? void 0 : shopDiscount.setOrderId) {
|
|
104
|
+
(_b2 = shopDiscount.setOrderId) == null ? void 0 : _b2.call(shopDiscount, ((_a2 = state.bookingDetail) == null ? void 0 : _a2.id) || (state == null ? void 0 : state.bookingId));
|
|
105
|
+
}
|
|
106
|
+
}, [(_c = state.bookingDetail) == null ? void 0 : _c.id, state == null ? void 0 : state.bookingId]);
|
|
101
107
|
(0, import_react.useEffect)(() => {
|
|
102
108
|
if (isBooking4Shop && shopDiscount) {
|
|
103
109
|
shopDiscount.setProductList([
|
|
@@ -173,7 +179,7 @@ var VoucherCard = (props) => {
|
|
|
173
179
|
holderChangedRef.current = true;
|
|
174
180
|
return list || [];
|
|
175
181
|
}
|
|
176
|
-
}, [(
|
|
182
|
+
}, [(_d = state.pet) == null ? void 0 : _d.value, isBooking4Shop]);
|
|
177
183
|
(0, import_react.useEffect)(() => {
|
|
178
184
|
var _a2, _b2, _c2, _d2;
|
|
179
185
|
console.log("update booking subject", state.bookingConfig);
|
|
@@ -370,7 +376,7 @@ var VoucherCard = (props) => {
|
|
|
370
376
|
{
|
|
371
377
|
style: { width: "100%" },
|
|
372
378
|
isInModal: isInModal || false,
|
|
373
|
-
dataSource: ((
|
|
379
|
+
dataSource: ((_f = (_e = state.service) == null ? void 0 : _e.value) == null ? void 0 : _f.length) ? availableData : [],
|
|
374
380
|
mixedSort,
|
|
375
381
|
onChange: (val) => {
|
|
376
382
|
const detail = shopDiscount.setDiscountSelected({
|
|
@@ -4,6 +4,6 @@ declare const useSendModal: (bookingId?: number) => {
|
|
|
4
4
|
setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
5
5
|
handleOpen: () => void;
|
|
6
6
|
handleValuesChange: (val: any) => void;
|
|
7
|
-
handleOk: (values: SendModalValues) => Promise<
|
|
7
|
+
handleOk: (values: SendModalValues) => Promise<any>;
|
|
8
8
|
};
|
|
9
9
|
export default useSendModal;
|
|
@@ -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<"stripe" | "tyro" | "
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"stripe" | "tyro" | "mx51" | "payo" | "windcave" | "linkly" | "huifu" | "adyenpos" | "adyenalipay" | "adyenwechat">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -301,8 +301,8 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
301
301
|
amount?: string | number | undefined;
|
|
302
302
|
mode?: "pay" | "refund" | "fullPay" | "query" | undefined;
|
|
303
303
|
order_id?: string | number | undefined;
|
|
304
|
-
eftpos?: "stripe" | "tyro" | "
|
|
305
|
-
action?: "
|
|
304
|
+
eftpos?: "stripe" | "tyro" | "mx51" | "payo" | "windcave" | "linkly" | "huifu" | "adyenpos" | "adyenalipay" | "adyenwechat" | undefined;
|
|
305
|
+
action?: "pay" | "amount" | "deviceList" | undefined;
|
|
306
306
|
key?: number | undefined;
|
|
307
307
|
step?: number | undefined;
|
|
308
308
|
title?: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.77",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"@react-spring/web": "^9.6.1",
|
|
65
65
|
"@use-gesture/react": "^10.3.1",
|
|
66
66
|
"@pisell/utils": "3.0.2",
|
|
67
|
-
"@pisell/materials": "6.6.18",
|
|
68
67
|
"@pisell/icon": "0.0.11",
|
|
69
|
-
"@pisell/date-picker": "3.0.7"
|
|
68
|
+
"@pisell/date-picker": "3.0.7",
|
|
69
|
+
"@pisell/materials": "6.6.18"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"react": "^18.0.0",
|