@pisell/private-materials 6.4.33 → 6.5.1
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 +6 -6
- package/build/lowcode/view.js +6 -6
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/footer/index.js +7 -23
- package/es/components/booking/forms/footer.d.ts +1 -0
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/header/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- 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/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/checkout/PaymentModal.js +33 -23
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +1 -1
- package/es/components/checkout/components/PaymentResultToast/index.js +1 -1
- package/es/components/checkout/components/ScrollableList/index.js +1 -0
- package/es/components/eftpos/surcharge/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -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/hooks.d.ts +1 -1
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/es/components/pay/toB/components/Content/Header.d.ts +0 -1
- package/es/components/pay/toB/components/MX51/index.js +44 -14
- package/es/components/pay/toB/types/index.d.ts +12 -0
- package/es/components/pay/toB/types/index.js +4 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/taxSelect/index.d.ts +0 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +9 -1
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -1
- package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -2
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +4 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +3 -1
- package/es/components/ticketBooking/index.d.ts +1 -0
- package/es/components/ticketBooking/index.js +5 -2
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- 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/hooks/useWalletCard.d.ts +1 -0
- package/es/components/wallet/model.d.ts +9 -1
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/hooks/printer.d.ts +4 -0
- package/es/hooks/printer.js +35 -0
- package/es/plus/clientName/index.d.ts +0 -1
- package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +0 -1
- package/es/plus/clinetSearch/Add/GenderField/index.d.ts +0 -1
- package/es/plus/saasCreateOrganization/index.d.ts +0 -1
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/footer/index.js +7 -8
- package/lib/components/booking/forms/footer.d.ts +1 -0
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/header/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -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/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- 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.d.ts +2 -2
- package/lib/components/checkout/PaymentModal.js +17 -7
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +1 -1
- package/lib/components/checkout/components/PaymentResultToast/index.js +1 -1
- package/lib/components/checkout/components/ScrollableList/index.js +1 -0
- package/lib/components/eftpos/surcharge/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -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/hooks.d.ts +1 -1
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/lib/components/pay/toB/components/Content/Header.d.ts +0 -1
- package/lib/components/pay/toB/components/MX51/index.js +37 -12
- package/lib/components/pay/toB/types/index.d.ts +12 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/taxSelect/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +8 -1
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -1
- package/lib/components/ticketBooking/components/addServiceVariant/index.js +3 -2
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +4 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +11 -9
- package/lib/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/ticketBooking/index.js +2 -2
- package/lib/components/ticketBooking/utils/index.d.ts +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/hooks/useWalletCard.d.ts +1 -0
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/hooks/printer.d.ts +4 -0
- package/lib/hooks/printer.js +60 -0
- package/lib/plus/clientName/index.d.ts +0 -1
- package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +0 -1
- package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +0 -1
- package/lib/plus/saasCreateOrganization/index.d.ts +0 -1
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/package.json +1 -1
@@ -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
|
+
}>;
|
@@ -0,0 +1,35 @@
|
|
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 useEngineContext from "./useEngineContext";
|
8
|
+
var usePrinter = function usePrinter() {
|
9
|
+
var _context$appHelper;
|
10
|
+
var context = useEngineContext();
|
11
|
+
var _ref = (context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {},
|
12
|
+
action = _ref.action;
|
13
|
+
var nativePrint = function nativePrint(data, _callback) {
|
14
|
+
// 转换注意事项:
|
15
|
+
// data.type: 0 是JSBridge调用小票打印,nativePlugin中调用时需要转为 'INVOICE'
|
16
|
+
// data.type: 99 是JSBridge调用全部打印,nativePlugin中调用时需要转为 'ALL'
|
17
|
+
action({
|
18
|
+
type: 'webpos.handlePrint',
|
19
|
+
data: data,
|
20
|
+
callback: function callback(res) {
|
21
|
+
if (typeof (res === null || res === void 0 ? void 0 : res.status) === 'string') {
|
22
|
+
_callback === null || _callback === void 0 || _callback(_objectSpread(_objectSpread({}, res || {}), {}, {
|
23
|
+
result: (res === null || res === void 0 ? void 0 : res.status) == 'success' ? true : false
|
24
|
+
}));
|
25
|
+
} else {
|
26
|
+
_callback === null || _callback === void 0 || _callback(res);
|
27
|
+
}
|
28
|
+
}
|
29
|
+
});
|
30
|
+
};
|
31
|
+
return {
|
32
|
+
nativePrint: nativePrint
|
33
|
+
};
|
34
|
+
};
|
35
|
+
export default usePrinter;
|
@@ -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
|
+
}>;
|
@@ -59,7 +59,6 @@ var import_materials = require("@pisell/materials");
|
|
59
59
|
var import_useCustomer = require("../../../ticketBooking/hooks/pisellos/useCustomer");
|
60
60
|
var import_ahooks = require("ahooks");
|
61
61
|
var import_lodash = require("lodash");
|
62
|
-
var import_hooks = require("../../../appointmentBooking/hooks");
|
63
62
|
var Footer = (props) => {
|
64
63
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
65
64
|
const { state, buttons, dispatch, source } = props;
|
@@ -483,10 +482,10 @@ var Footer = (props) => {
|
|
483
482
|
setPaymentCallback(() => (paymentResult) => {
|
484
483
|
var _a2, _b2, _c2, _d2;
|
485
484
|
console.log("Payment result:", paymentResult);
|
486
|
-
setIsPaymentModalOpen(false);
|
487
485
|
if ((paymentResult == null ? void 0 : paymentResult.status) === "success") {
|
488
486
|
console.log("Payment completed successfully");
|
489
487
|
(_b2 = (_a2 = window == null ? void 0 : window.shopApi) == null ? void 0 : _a2.bookingTicket) == null ? void 0 : _b2.clearAllCart();
|
488
|
+
setIsPaymentModalOpen(false);
|
490
489
|
setPaymentModalData(null);
|
491
490
|
setPaymentCallback(null);
|
492
491
|
} else if ((paymentResult == null ? void 0 : paymentResult.status) === "cancelled") {
|
@@ -494,10 +493,12 @@ var Footer = (props) => {
|
|
494
493
|
if (res == null ? void 0 : res.order_id) {
|
495
494
|
(_d2 = (_c2 = window == null ? void 0 : window.shopApi) == null ? void 0 : _c2.booking) == null ? void 0 : _d2.voidBooking(res.order_id);
|
496
495
|
}
|
496
|
+
setIsPaymentModalOpen(false);
|
497
497
|
setPaymentModalData(null);
|
498
498
|
setPaymentCallback(null);
|
499
499
|
} else {
|
500
500
|
console.log("Payment status:", paymentResult == null ? void 0 : paymentResult.status);
|
501
|
+
setIsPaymentModalOpen(false);
|
501
502
|
setPaymentModalData(null);
|
502
503
|
setPaymentCallback(null);
|
503
504
|
}
|
@@ -1194,10 +1195,10 @@ var Footer = (props) => {
|
|
1194
1195
|
const { selectCustomer } = (0, import_useCustomer.useCustomer)({
|
1195
1196
|
changeCustomerToGlobalState
|
1196
1197
|
});
|
1197
|
-
const shopDiscount = (0, import_hooks.useShopDiscount)();
|
1198
1198
|
const { clearAllScanListenersTaskQueue } = (0, import_useScanManager.default)();
|
1199
1199
|
const handleClearAllAndReset = () => {
|
1200
|
-
var _a2;
|
1200
|
+
var _a2, _b2;
|
1201
|
+
(_b2 = (_a2 = window == null ? void 0 : window.shopApi) == null ? void 0 : _a2.bookingTicket) == null ? void 0 : _b2.clearAllCart();
|
1201
1202
|
clearAllScanListenersTaskQueue();
|
1202
1203
|
dispatch({
|
1203
1204
|
type: "setService",
|
@@ -1235,7 +1236,6 @@ var Footer = (props) => {
|
|
1235
1236
|
orderNote: ""
|
1236
1237
|
}
|
1237
1238
|
});
|
1238
|
-
(_a2 = shopDiscount == null ? void 0 : shopDiscount.clear) == null ? void 0 : _a2.call(shopDiscount);
|
1239
1239
|
};
|
1240
1240
|
return /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { title: false, round: true, loading: showFooter, active: true }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-footer-total" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-footer-left" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-footer-left-total" }, totalText), /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-footer-left-arrears" }, arrearsText)), /* @__PURE__ */ import_react.default.createElement(
|
1241
1241
|
"span",
|
@@ -1325,13 +1325,12 @@ var Footer = (props) => {
|
|
1325
1325
|
state,
|
1326
1326
|
dispatch,
|
1327
1327
|
onClose: (reset) => {
|
1328
|
+
console.log("🔄 Footer: Closing PaymentModal");
|
1328
1329
|
setIsPaymentModalOpen(false);
|
1329
1330
|
setPaymentModalData(null);
|
1330
1331
|
setPaymentCallback(null);
|
1331
1332
|
if (reset) {
|
1332
|
-
|
1333
|
-
handleClearAllAndReset();
|
1334
|
-
}, 0);
|
1333
|
+
handleClearAllAndReset();
|
1335
1334
|
}
|
1336
1335
|
}
|
1337
1336
|
}
|
@@ -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
|
+
}>;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
/// <reference types="react" />
|
1
2
|
export interface FormState {
|
2
3
|
amountSymbol: string;
|
3
4
|
apis: {
|
@@ -105,4 +106,11 @@ export declare const walkInData: {
|
|
105
106
|
id: number;
|
106
107
|
nickname: string;
|
107
108
|
};
|
108
|
-
export declare const Provider: any, Context:
|
109
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
110
|
+
state: FormState;
|
111
|
+
} & {
|
112
|
+
dispatch: (params: {
|
113
|
+
type: string;
|
114
|
+
payload: any;
|
115
|
+
}) => void;
|
116
|
+
}>;
|
@@ -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
|
+
}>;
|
@@ -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 | "flexible" | {
|
169
169
|
type: string;
|
170
170
|
value: number;
|
171
|
-
}
|
171
|
+
};
|
172
172
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
173
173
|
export declare const getIsEdit: (state: any) => boolean;
|
174
174
|
export {};
|
@@ -64,6 +64,7 @@ var import_lodash = require("lodash");
|
|
64
64
|
var import_utils2 = require("./utils");
|
65
65
|
var import_usePaymentLogger = __toESM(require("./hooks/usePaymentLogger"));
|
66
66
|
var import_antd = require("antd");
|
67
|
+
var import_printer = __toESM(require("../../hooks/printer"));
|
67
68
|
var CheckoutHooks = {
|
68
69
|
OnStateAmountChanged: "checkout:onStateAmountChanged",
|
69
70
|
OnBalanceDueAmountChanged: "checkout:onBalanceDueAmountChanged",
|
@@ -117,6 +118,7 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
117
118
|
const walletPassRef = (0, import_react.useRef)(null);
|
118
119
|
const [paymentItems, setPaymentItems] = (0, import_react.useState)([]);
|
119
120
|
const [walletPassData, setWalletPassData] = (0, import_react.useState)({});
|
121
|
+
const { nativePrint } = (0, import_printer.default)();
|
120
122
|
const isOrderFree = (0, import_react.useMemo)(() => {
|
121
123
|
if (!customAmount) return false;
|
122
124
|
const amount = parseFloat(customAmount);
|
@@ -299,7 +301,10 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
299
301
|
}
|
300
302
|
if (checkoutModule && isModalOpen) {
|
301
303
|
checkoutModule.getPaymentMethodsAsync().then(async (paymentMethods2) => {
|
302
|
-
const reorderedPaymentMethods = await (0, import_utils2.reorderPaymentMethodList)(
|
304
|
+
const reorderedPaymentMethods = await (0, import_utils2.reorderPaymentMethodList)(
|
305
|
+
paymentMethods2,
|
306
|
+
interaction
|
307
|
+
);
|
303
308
|
setPaymentMethods(reorderedPaymentMethods);
|
304
309
|
const isShowCashPayment = paymentMethods2.some(
|
305
310
|
(item) => item.code === "CASHMANUAL"
|
@@ -512,11 +517,12 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
512
517
|
data: {
|
513
518
|
order_id: responseData.order_id,
|
514
519
|
machine_code_print_info: responseData == null ? void 0 : responseData.machine_code_print_info,
|
515
|
-
small_ticket_data: (_b2 = responseData == null ? void 0 : responseData.payment_info) == null ? void 0 : _b2.small_ticket_data
|
520
|
+
small_ticket_data: (_b2 = responseData == null ? void 0 : responseData.payment_info) == null ? void 0 : _b2.small_ticket_data,
|
521
|
+
machine_code_print_info_v2: responseData == null ? void 0 : responseData.machine_code_print_info_v2
|
516
522
|
}
|
517
523
|
};
|
518
524
|
console.log("print_order_onOrderSynced_params>>>>", params);
|
519
|
-
(
|
525
|
+
nativePrint(params, (res) => {
|
520
526
|
console.log("print_order_onOrderSynced_res>>>>", res);
|
521
527
|
});
|
522
528
|
} catch (error) {
|
@@ -685,7 +691,7 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
685
691
|
data: { order_id: data.orderId }
|
686
692
|
};
|
687
693
|
try {
|
688
|
-
(
|
694
|
+
nativePrint(params, (res) => {
|
689
695
|
console.log("handleButtonClick_print-receipt_res>>>>", res);
|
690
696
|
if (!(res == null ? void 0 : res.result)) {
|
691
697
|
Toast == null ? void 0 : Toast.error((res == null ? void 0 : res.msg) || "");
|
@@ -988,6 +994,7 @@ var PaymentModal = ({
|
|
988
994
|
const [windowHeight, setWindowHeight] = (0, import_react.useState)(0);
|
989
995
|
const [showRetryModal, setShowRetryModal] = (0, import_react.useState)(false);
|
990
996
|
const Toast = (0, import_useToast.default)();
|
997
|
+
const { nativePrint } = (0, import_printer.default)();
|
991
998
|
const handleRetry = async () => {
|
992
999
|
const checkoutModule = pisellos == null ? void 0 : pisellos.getModule("checkout");
|
993
1000
|
const res = await (checkoutModule == null ? void 0 : checkoutModule.manualSyncOrderAsync());
|
@@ -1216,6 +1223,7 @@ var PaymentModal = ({
|
|
1216
1223
|
order_rounding_setting: getData("order_rounding_setting"),
|
1217
1224
|
shop_wallet_pass_id
|
1218
1225
|
});
|
1226
|
+
console.time("initCheckoutData");
|
1219
1227
|
const newData = (0, import_lodash.cloneDeep)(data);
|
1220
1228
|
await checkout.createLocalOrderAsync({
|
1221
1229
|
orderData: newData.order_info,
|
@@ -1223,6 +1231,7 @@ var PaymentModal = ({
|
|
1223
1231
|
autoPayment: true,
|
1224
1232
|
totalInfo: newData.subtotal_info
|
1225
1233
|
});
|
1234
|
+
console.timeEnd("initCheckoutData");
|
1226
1235
|
const orderInfo2 = checkout.getCurrentOrderInfo();
|
1227
1236
|
if (orderInfo2 && orderInfo2.totalAmount) {
|
1228
1237
|
setTotalAmount(orderInfo2.totalAmount);
|
@@ -1270,7 +1279,8 @@ var PaymentModal = ({
|
|
1270
1279
|
data: {
|
1271
1280
|
order_id: responseData.order_id,
|
1272
1281
|
machine_code_print_info: responseData == null ? void 0 : responseData.machine_code_print_info,
|
1273
|
-
small_ticket_data: (_c2 = responseData == null ? void 0 : responseData.payment_info) == null ? void 0 : _c2.small_ticket_data
|
1282
|
+
small_ticket_data: (_c2 = responseData == null ? void 0 : responseData.payment_info) == null ? void 0 : _c2.small_ticket_data,
|
1283
|
+
machine_code_print_info_v2: responseData == null ? void 0 : responseData.machine_code_print_info_v2
|
1274
1284
|
}
|
1275
1285
|
};
|
1276
1286
|
console.log("print_order_onOrderSynced_params>>>>", params);
|
@@ -1281,7 +1291,7 @@ var PaymentModal = ({
|
|
1281
1291
|
params
|
1282
1292
|
}
|
1283
1293
|
});
|
1284
|
-
(
|
1294
|
+
nativePrint(params, (res) => {
|
1285
1295
|
console.log("print_order_onOrderSynced_res>>>>", res);
|
1286
1296
|
logger == null ? void 0 : logger.addLog({
|
1287
1297
|
type: "info",
|
@@ -1425,7 +1435,7 @@ var PaymentModal = ({
|
|
1425
1435
|
data: { order_id: data2.orderId }
|
1426
1436
|
};
|
1427
1437
|
try {
|
1428
|
-
(
|
1438
|
+
nativePrint(params, (res) => {
|
1429
1439
|
console.log("handleButtonClick_print-receipt_res>>>>", res);
|
1430
1440
|
if (!(res == null ? void 0 : res.result)) {
|
1431
1441
|
Toast == null ? void 0 : Toast.error((res == null ? void 0 : res.msg) || "");
|
@@ -15,7 +15,7 @@ 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<"loading" | "
|
18
|
+
readonly statusRef: React.MutableRefObject<"loading" | "success" | "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>;
|
@@ -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: "loading" | "
|
177
|
+
status: "loading" | "success" | "warn" | "fail" | "question";
|
178
178
|
};
|
179
179
|
};
|
180
180
|
/**
|
@@ -295,10 +295,10 @@ 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?: "pay" | "refund" | "fullPay" | "query" | undefined;
|
299
299
|
order_id?: string | number | undefined;
|
300
300
|
eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
|
301
|
-
action?: "
|
301
|
+
action?: "pay" | "amount" | "deviceList" | undefined;
|
302
302
|
key?: number | undefined;
|
303
303
|
step?: number | undefined;
|
304
304
|
title?: string | undefined;
|
@@ -308,7 +308,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
308
308
|
net?: boolean | undefined;
|
309
309
|
component?: string | undefined;
|
310
310
|
form?: string | undefined;
|
311
|
-
status?: "loading" | "
|
311
|
+
status?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
312
312
|
warn?: string | undefined;
|
313
313
|
steps?: {
|
314
314
|
/** 用于重置当前步骤 */
|