@pisell/private-materials 3.3.25 → 3.3.27
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 +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +6 -6
- package/es/components/Sales/Customer/index.js +3 -1
- package/es/components/Sales/Event/Detail.js +5 -1
- package/es/components/Sales/Event/serve.d.ts +3 -0
- package/es/components/Sales/Init/index.d.ts +1 -0
- package/es/components/Sales/Init/index.js +3 -2
- package/es/components/Sales/Step/index.d.ts +2 -0
- package/es/components/Sales/Step/index.js +13 -4
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +5 -5
- package/es/components/appointmentBooking/components/Services/index.js +2 -0
- package/es/components/appointmentBooking/deposit/index.js +2 -2
- package/es/components/booking/addons/model.d.ts +1 -10
- 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 +5 -1
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/footer/index.d.ts +1 -0
- package/es/components/booking/components/footer/utils.js +16 -15
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/hooks/useQuotation.d.ts +4 -0
- package/es/components/booking/hooks/useQuotation.js +256 -0
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/addService/index.js +4 -4
- package/es/components/booking/info/service/editService/index.js +6 -3
- package/es/components/booking/info/service/index.js +4 -1
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service2/Group/utils.js +1 -1
- package/es/components/booking/info/service2/hooks/useSelectPet.js +6 -4
- package/es/components/booking/info/service2/index.js +4 -1
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/service/addService/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/index.js +29 -9
- package/es/components/booking/info2/service/editService/index.js +2 -0
- package/es/components/booking/info2/service/index.js +4 -1
- package/es/components/booking/locales.d.ts +6 -0
- package/es/components/booking/locales.js +9 -3
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/model.d.ts +1 -9
- 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 +1 -10
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +122 -31
- package/es/components/eventBooking/components/Provider/Event/index.js +20 -4
- package/es/components/eventBooking/components/Provider/Resource/index.js +26 -5
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +2 -2
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +1 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.js +5 -2
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.js +7 -2
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +3 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.js +60 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.less +63 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.d.ts +9 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.js +59 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.less +7 -0
- package/es/components/eventBooking/components/scheduleCalendar/index.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/index.js +30 -21
- package/es/components/eventBooking/components/scheduleCalendar/index.less +2 -0
- package/es/components/eventBooking/index.js +2 -2
- package/es/components/eventBooking/locales.d.ts +6 -0
- package/es/components/eventBooking/locales.js +166 -160
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +3 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.js +3 -2
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +73 -20
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.less +30 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.d.ts +16 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.js +60 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.less +38 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.d.ts +17 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.js +98 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.less +133 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +7 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.js +34 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.less +23 -0
- package/es/components/pay/toC/WalletPassBlock/index.d.ts +9 -2
- package/es/components/pay/toC/WalletPassBlock/index.js +119 -21
- package/es/components/pay/toC/WalletPassBlock/index.less +82 -13
- package/es/components/pay/toC/index.js +138 -89
- package/es/components/pay/toC/locales.d.ts +69 -3
- package/es/components/pay/toC/locales.js +132 -6
- package/es/components/pay/toC/model.d.ts +5 -9
- package/es/components/pay/toC/model.js +9 -0
- package/es/components/pay/toC/serve.d.ts +23 -0
- package/es/components/pay/toC/serve.js +34 -2
- package/es/components/pay/toC/utils.d.ts +3 -1
- package/es/components/pay/toC/utils.js +8 -3
- 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/productSelect/components/productGroup/index.less +4 -12
- package/es/components/productSelect/index.less +1 -1
- 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 +1 -9
- 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/ticketBooking/components/addServiceVariant/addService.js +15 -20
- package/es/components/ticketBooking/components/menuBar/index.less +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.less +2 -4
- package/es/components/wallet/Detail/model.d.ts +1 -13
- package/es/components/wallet/DiscountCard/model.d.ts +1 -14
- package/es/components/wallet/PointCard/model.d.ts +1 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/model.d.ts +1 -9
- package/es/hooks/useComponents.js +1 -1
- package/es/hooks/useLocale.d.ts +2 -0
- package/es/hooks/useLocale.js +7 -0
- package/es/hooks/useLoginUser.d.ts +2 -0
- package/es/hooks/useLoginUser.js +19 -0
- package/lib/components/Sales/Customer/index.js +3 -1
- package/lib/components/Sales/Event/Detail.js +5 -1
- package/lib/components/Sales/Event/serve.d.ts +3 -0
- package/lib/components/Sales/Init/index.d.ts +1 -0
- package/lib/components/Sales/Init/index.js +3 -2
- package/lib/components/Sales/Step/index.d.ts +2 -0
- package/lib/components/Sales/Step/index.js +13 -4
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +2 -2
- package/lib/components/appointmentBooking/components/Services/index.js +2 -0
- package/lib/components/appointmentBooking/deposit/index.js +2 -2
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/footer/index.d.ts +1 -0
- package/lib/components/booking/components/footer/utils.js +5 -4
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/hooks/useQuotation.d.ts +4 -0
- package/lib/components/booking/hooks/useQuotation.js +210 -0
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/addService/index.js +2 -3
- package/lib/components/booking/info/service/editService/index.js +5 -2
- package/lib/components/booking/info/service/index.js +3 -1
- package/lib/components/booking/info/service2/Group/utils.js +2 -2
- package/lib/components/booking/info/service2/hooks/useSelectPet.js +5 -3
- package/lib/components/booking/info/service2/index.js +3 -1
- package/lib/components/booking/info/utils.js +1 -1
- package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/index.js +25 -17
- package/lib/components/booking/info2/service/editService/index.js +2 -1
- package/lib/components/booking/info2/service/index.js +3 -1
- package/lib/components/booking/locales.d.ts +6 -0
- package/lib/components/booking/locales.js +9 -3
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +52 -4
- package/lib/components/eventBooking/components/Provider/Event/index.js +15 -3
- package/lib/components/eventBooking/components/Provider/Resource/index.js +16 -3
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +2 -2
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +7 -7
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.js +3 -1
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.js +6 -5
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +3 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.js +75 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.less +63 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.d.ts +9 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.js +64 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.less +7 -0
- package/lib/components/eventBooking/components/scheduleCalendar/index.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/index.js +17 -11
- package/lib/components/eventBooking/components/scheduleCalendar/index.less +2 -0
- package/lib/components/eventBooking/index.js +2 -2
- package/lib/components/eventBooking/locales.d.ts +6 -0
- package/lib/components/eventBooking/locales.js +10 -4
- package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +3 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.js +2 -2
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +52 -11
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.less +30 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.d.ts +16 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.js +87 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.less +38 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.d.ts +17 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.js +103 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.less +133 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +7 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.js +52 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.less +23 -0
- package/lib/components/pay/toC/WalletPassBlock/index.d.ts +9 -2
- package/lib/components/pay/toC/WalletPassBlock/index.js +115 -20
- package/lib/components/pay/toC/WalletPassBlock/index.less +82 -13
- package/lib/components/pay/toC/index.js +35 -9
- package/lib/components/pay/toC/locales.d.ts +69 -3
- package/lib/components/pay/toC/locales.js +72 -6
- package/lib/components/pay/toC/model.d.ts +5 -9
- package/lib/components/pay/toC/model.js +10 -0
- package/lib/components/pay/toC/serve.d.ts +23 -0
- package/lib/components/pay/toC/serve.js +12 -6
- package/lib/components/pay/toC/utils.d.ts +3 -1
- package/lib/components/pay/toC/utils.js +8 -3
- package/lib/components/productSelect/components/productGroup/index.less +4 -12
- package/lib/components/productSelect/index.less +1 -1
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +13 -16
- package/lib/components/ticketBooking/components/menuBar/index.less +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -4
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
- package/lib/components/wallet/PointCard/model.d.ts +1 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/model.d.ts +1 -9
- package/lib/hooks/useLocale.d.ts +2 -0
- package/lib/hooks/useLocale.js +41 -0
- package/lib/hooks/useLoginUser.d.ts +2 -0
- package/lib/hooks/useLoginUser.js +50 -0
- package/package.json +2 -2
package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.tsx
|
|
30
|
+
var ScheduleTimeItem_exports = {};
|
|
31
|
+
__export(ScheduleTimeItem_exports, {
|
|
32
|
+
default: () => ScheduleTimeItem_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(ScheduleTimeItem_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_materials = require("@pisell/materials");
|
|
37
|
+
var import_utils = require("@pisell/utils");
|
|
38
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
39
|
+
var import_index = require("./index.less");
|
|
40
|
+
var ScheduleTimeItem = ({ timeList }) => {
|
|
41
|
+
const [times, setTimes] = (0, import_react.useState)([]);
|
|
42
|
+
const [isExpand, setIsExpand] = (0, import_react.useState)(false);
|
|
43
|
+
(0, import_react.useEffect)(() => {
|
|
44
|
+
if ((timeList == null ? void 0 : timeList.length) > 4) {
|
|
45
|
+
setTimes(timeList == null ? void 0 : timeList.slice(0, 4));
|
|
46
|
+
} else {
|
|
47
|
+
setTimes(timeList);
|
|
48
|
+
}
|
|
49
|
+
}, [timeList]);
|
|
50
|
+
const handleExpand = () => {
|
|
51
|
+
const nextExpandStatus = !isExpand;
|
|
52
|
+
if (nextExpandStatus) {
|
|
53
|
+
setTimes(timeList);
|
|
54
|
+
} else {
|
|
55
|
+
setTimes(timeList == null ? void 0 : timeList.slice(0, 4));
|
|
56
|
+
}
|
|
57
|
+
setIsExpand(nextExpandStatus);
|
|
58
|
+
};
|
|
59
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "schedule-time-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "schedule-time-item-content-wrapper" }, (times == null ? void 0 : times.length) > 0 ? times == null ? void 0 : times.map((item) => /* @__PURE__ */ import_react.default.createElement(
|
|
60
|
+
"div",
|
|
61
|
+
{
|
|
62
|
+
className: (0, import_utils.isMobile)() ? "schedule-time-item-content-mobile" : "schedule-time-item-content",
|
|
63
|
+
key: (item.start_at || "") + (item.end_at || "")
|
|
64
|
+
},
|
|
65
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "schedule-time-item-content-time" }, (item == null ? void 0 : item.start_date) || ""),
|
|
66
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "schedule-time-item-content-time" }, (0, import_dayjs.default)((item == null ? void 0 : item.start_at) || "").format("HH:mm"), " - ", (0, import_dayjs.default)((item == null ? void 0 : item.end_at) || "").format("HH:mm"))
|
|
67
|
+
)) : /* @__PURE__ */ import_react.default.createElement(import_materials.PisellEmpty, null)), (timeList == null ? void 0 : timeList.length) > 4 && /* @__PURE__ */ import_react.default.createElement("div", { className: "schedule-time-item-expand-btn", onClick: handleExpand }, isExpand ? import_utils.locales.getText("pisell2.event.schedule.item.collapse") : import_utils.locales.getText("pisell2.event.schedule.item.expand"), /* @__PURE__ */ import_react.default.createElement(
|
|
68
|
+
import_materials.Iconfont,
|
|
69
|
+
{
|
|
70
|
+
type: isExpand ? "pisell2-chevron-up-double" : "pisell2-chevron-down-double",
|
|
71
|
+
className: "schedule-time-item-expand-btn-icon"
|
|
72
|
+
}
|
|
73
|
+
)));
|
|
74
|
+
};
|
|
75
|
+
var ScheduleTimeItem_default = ScheduleTimeItem;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
.schedule-time-item {
|
|
2
|
+
width: 100%;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: 16px;
|
|
6
|
+
|
|
7
|
+
.schedule-time-item-content-wrapper {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-wrap: wrap;
|
|
10
|
+
gap: 16px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.schedule-time-item-content-mobile {
|
|
14
|
+
width: 100%;
|
|
15
|
+
padding: 14px 16px;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: row;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: flex-start;
|
|
20
|
+
border-radius: 8px;
|
|
21
|
+
border: 1px solid #f5f5f5;
|
|
22
|
+
background: #fff;
|
|
23
|
+
gap: 8px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.schedule-time-item-content {
|
|
27
|
+
width: calc(50% - 8px);
|
|
28
|
+
padding: 14px 16px;
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
border-radius: 8px;
|
|
34
|
+
border: 1px solid #f5f5f5;
|
|
35
|
+
background: #fff;
|
|
36
|
+
|
|
37
|
+
.schedule-time-item-content-time {
|
|
38
|
+
color: #141414;
|
|
39
|
+
text-align: center;
|
|
40
|
+
font-size: 14px;
|
|
41
|
+
font-weight: 600;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.schedule-time-item-expand-btn {
|
|
46
|
+
display: flex;
|
|
47
|
+
flex: 1 0 0;
|
|
48
|
+
height: 48px;
|
|
49
|
+
padding: 14px 16px;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
align-items: center;
|
|
52
|
+
gap: 8px;
|
|
53
|
+
border-radius: 8px;
|
|
54
|
+
border: 1px solid #f5f5f5;
|
|
55
|
+
background: #fff;
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
|
|
58
|
+
.schedule-time-item-expand-btn-icon {
|
|
59
|
+
margin-top: 2px;
|
|
60
|
+
font-size: 20px;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
import { CalendarDataItem } from '../../../../type';
|
|
4
|
+
interface ScheduleTimesProps {
|
|
5
|
+
month: string;
|
|
6
|
+
schedulesData: CalendarDataItem[];
|
|
7
|
+
}
|
|
8
|
+
declare const ScheduleTimes: React.FC<ScheduleTimesProps>;
|
|
9
|
+
export default ScheduleTimes;
|
package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.tsx
|
|
30
|
+
var ScheduleTimes_exports = {};
|
|
31
|
+
__export(ScheduleTimes_exports, {
|
|
32
|
+
default: () => ScheduleTimes_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(ScheduleTimes_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
37
|
+
var import_materials = require("@pisell/materials");
|
|
38
|
+
var import_index = require("./index.less");
|
|
39
|
+
var import_ScheduleTimeItem = __toESM(require("../ScheduleTimeItem"));
|
|
40
|
+
var ScheduleTimes = ({
|
|
41
|
+
month,
|
|
42
|
+
schedulesData
|
|
43
|
+
}) => {
|
|
44
|
+
const [timeList, setTimeList] = (0, import_react.useState)([]);
|
|
45
|
+
(0, import_react.useEffect)(() => {
|
|
46
|
+
const timeList2 = [];
|
|
47
|
+
for (const item of schedulesData) {
|
|
48
|
+
const date = (0, import_dayjs.default)(item.date);
|
|
49
|
+
if (date.isAfter(month, "month")) {
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
if (date.isSame(month, "month")) {
|
|
53
|
+
timeList2.push(...(item == null ? void 0 : item.times) || []);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if ((timeList2 == null ? void 0 : timeList2.length) > 0) {
|
|
57
|
+
setTimeList(timeList2);
|
|
58
|
+
} else {
|
|
59
|
+
setTimeList([]);
|
|
60
|
+
}
|
|
61
|
+
}, [month, schedulesData]);
|
|
62
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "schedule-times-container" }, (timeList == null ? void 0 : timeList.length) > 0 ? /* @__PURE__ */ import_react.default.createElement(import_ScheduleTimeItem.default, { key: month, timeList }) : /* @__PURE__ */ import_react.default.createElement(import_materials.PisellEmpty, null));
|
|
63
|
+
};
|
|
64
|
+
var ScheduleTimes_default = ScheduleTimes;
|
|
@@ -8,6 +8,7 @@ export interface EventResourceUsabilityProps {
|
|
|
8
8
|
className?: string;
|
|
9
9
|
style?: React.CSSProperties;
|
|
10
10
|
onChange?: (e: number) => void;
|
|
11
|
+
type?: 'calendarView' | 'textList';
|
|
11
12
|
}
|
|
12
13
|
declare const EventScheduleCalendar: React.FC<EventResourceUsabilityProps>;
|
|
13
14
|
export default EventScheduleCalendar;
|
|
@@ -45,16 +45,17 @@ var EventScheduleCalendar = ({
|
|
|
45
45
|
showScheduleTime = true,
|
|
46
46
|
className,
|
|
47
47
|
style,
|
|
48
|
-
onChange
|
|
48
|
+
onChange,
|
|
49
|
+
type = "calendarView"
|
|
49
50
|
}) => {
|
|
51
|
+
const context = (0, import_useEngineContext.default)();
|
|
52
|
+
const utils = context.appHelper.utils || {};
|
|
53
|
+
const [selectedYear, setSelectedYear] = (0, import_react.useState)((0, import_dayjs.default)().year());
|
|
50
54
|
const [currentMonth, setCurrentMonth] = (0, import_react.useState)(
|
|
51
55
|
(/* @__PURE__ */ new Date()).toISOString().slice(0, 7)
|
|
52
56
|
);
|
|
53
57
|
const [selectedDate, setSelectedDate] = (0, import_react.useState)("");
|
|
54
58
|
const [selectedTimes, setSelectedTimes] = (0, import_react.useState)([]);
|
|
55
|
-
const context = (0, import_useEngineContext.default)();
|
|
56
|
-
const utils = context.appHelper.utils || {};
|
|
57
|
-
const [selectedYear, setSelectedYear] = (0, import_react.useState)((0, import_dayjs.default)().year());
|
|
58
59
|
(0, import_react.useEffect)(() => {
|
|
59
60
|
if (data == null ? void 0 : data.length) {
|
|
60
61
|
const today = /* @__PURE__ */ new Date();
|
|
@@ -63,9 +64,13 @@ var EventScheduleCalendar = ({
|
|
|
63
64
|
const itemDate = new Date(item.date);
|
|
64
65
|
return itemDate >= today;
|
|
65
66
|
});
|
|
66
|
-
if (firstAvailableDate) {
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
if (firstAvailableDate && (firstAvailableDate == null ? void 0 : firstAvailableDate.date)) {
|
|
68
|
+
const availableDate = firstAvailableDate.date;
|
|
69
|
+
const availableTimes = (firstAvailableDate == null ? void 0 : firstAvailableDate.times) || [];
|
|
70
|
+
setSelectedYear((0, import_dayjs.default)(availableDate).year());
|
|
71
|
+
setCurrentMonth(new Date(availableDate).toISOString().slice(0, 7));
|
|
72
|
+
setSelectedDate(availableDate);
|
|
73
|
+
setSelectedTimes(availableTimes || []);
|
|
69
74
|
}
|
|
70
75
|
}
|
|
71
76
|
}, [data]);
|
|
@@ -109,17 +114,18 @@ var EventScheduleCalendar = ({
|
|
|
109
114
|
schedulesData: data || [],
|
|
110
115
|
selectDate: selectedDate,
|
|
111
116
|
onSelect: handleSelectDate,
|
|
112
|
-
onChange: (e,
|
|
117
|
+
onChange: (e, type2) => {
|
|
113
118
|
setCurrentMonth(e);
|
|
114
119
|
const currentYear = (0, import_dayjs.default)().year();
|
|
115
120
|
const selectedYear2 = (0, import_dayjs.default)(e).year();
|
|
116
121
|
setSelectedYear(selectedYear2);
|
|
117
|
-
}
|
|
122
|
+
},
|
|
123
|
+
type
|
|
118
124
|
}
|
|
119
125
|
)),
|
|
120
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("category-list") }, selectedTimes.map((d, i) => {
|
|
126
|
+
type !== "textList" ? /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("category-list") }, selectedTimes.map((d, i) => {
|
|
121
127
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: "category-item", key: i }, showScheduleName ? /* @__PURE__ */ import_react.default.createElement("div", { className: "category-title" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "category-icon" }, /* @__PURE__ */ import_react.default.createElement("span", null)), /* @__PURE__ */ import_react.default.createElement("span", null, d.name)) : null, showScheduleTime ? /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("time") }, formatDateStr(d.start_at), " - ", formatDateStr(d.end_at)) : null);
|
|
122
|
-
}))
|
|
128
|
+
})) : null
|
|
123
129
|
);
|
|
124
130
|
};
|
|
125
131
|
var scheduleCalendar_default = EventScheduleCalendar;
|
|
@@ -62,7 +62,7 @@ var Content = () => {
|
|
|
62
62
|
form_data_status: "active"
|
|
63
63
|
});
|
|
64
64
|
}, [form_id]);
|
|
65
|
-
return
|
|
65
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
66
66
|
"div",
|
|
67
67
|
{
|
|
68
68
|
className: `event-booking-wrap ${(0, import_utils.isMobile)() ? "event-booking-mobile-wrap" : ""}`
|
|
@@ -70,7 +70,7 @@ var Content = () => {
|
|
|
70
70
|
/* @__PURE__ */ import_react.default.createElement(import_Header.default, null),
|
|
71
71
|
/* @__PURE__ */ import_react.default.createElement(import_Content.default, null),
|
|
72
72
|
(0, import_utils.isMobile)() && (currentStepData == null ? void 0 : currentStepData.key) !== "select-category" ? /* @__PURE__ */ import_react.default.createElement(import_Footer.default, null) : null
|
|
73
|
-
)
|
|
73
|
+
);
|
|
74
74
|
};
|
|
75
75
|
var EventBooking = () => {
|
|
76
76
|
return /* @__PURE__ */ import_react.default.createElement(import_Sales.default, { config: { useSessionStorage: true } }, /* @__PURE__ */ import_react.default.createElement(Content, null));
|
|
@@ -69,6 +69,8 @@ declare const _default: {
|
|
|
69
69
|
'pisell2.event.event.full.ok': string;
|
|
70
70
|
'pisell2.event.capacity.limit.reached.title': string;
|
|
71
71
|
'pisell2.event.capacity.limit.reached.tip': string;
|
|
72
|
+
'pisell2.event.schedule.item.expand': string;
|
|
73
|
+
'pisell2.event.schedule.item.collapse': string;
|
|
72
74
|
};
|
|
73
75
|
'zh-CN': {
|
|
74
76
|
'pisell2.event.calendar.limit.unavailable': string;
|
|
@@ -140,6 +142,8 @@ declare const _default: {
|
|
|
140
142
|
'pisell2.event.event.full.ok': string;
|
|
141
143
|
'pisell2.event.capacity.limit.reached.title': string;
|
|
142
144
|
'pisell2.event.capacity.limit.reached.tip': string;
|
|
145
|
+
'pisell2.event.schedule.item.expand': string;
|
|
146
|
+
'pisell2.event.schedule.item.collapse': string;
|
|
143
147
|
};
|
|
144
148
|
'zh-HK': {
|
|
145
149
|
'pisell2.event.calendar.limit.unavailable': string;
|
|
@@ -211,6 +215,8 @@ declare const _default: {
|
|
|
211
215
|
'pisell2.event.event.full.ok': string;
|
|
212
216
|
'pisell2.event.capacity.limit.reached.title': string;
|
|
213
217
|
'pisell2.event.capacity.limit.reached.tip': string;
|
|
218
|
+
'pisell2.event.schedule.item.expand': string;
|
|
219
|
+
'pisell2.event.schedule.item.collapse': string;
|
|
214
220
|
};
|
|
215
221
|
};
|
|
216
222
|
export default _default;
|
|
@@ -23,7 +23,7 @@ __export(locales_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(locales_exports);
|
|
25
25
|
var locales_default = {
|
|
26
|
-
|
|
26
|
+
en: {
|
|
27
27
|
"pisell2.event.calendar.limit.unavailable": "Unavailable",
|
|
28
28
|
"pisell2.event.calendar.limit.sold.out": "Sold out",
|
|
29
29
|
"pisell2.event.calendar.limit.call.to.book": "Call to book",
|
|
@@ -92,7 +92,9 @@ var locales_default = {
|
|
|
92
92
|
"pisell2.event.event.full.tip": "Sorry, this event has reached its maximum capacity. Please select another event.",
|
|
93
93
|
"pisell2.event.event.full.ok": "Ok",
|
|
94
94
|
"pisell2.event.capacity.limit.reached.title": "Capacity limit reached",
|
|
95
|
-
"pisell2.event.capacity.limit.reached.tip": "One or more events in your cart are no longer available due to full capacity. Please remove unavailable events from your cart to complete checkout."
|
|
95
|
+
"pisell2.event.capacity.limit.reached.tip": "One or more events in your cart are no longer available due to full capacity. Please remove unavailable events from your cart to complete checkout.",
|
|
96
|
+
"pisell2.event.schedule.item.expand": "See more",
|
|
97
|
+
"pisell2.event.schedule.item.collapse": "See less"
|
|
96
98
|
},
|
|
97
99
|
"zh-CN": {
|
|
98
100
|
"pisell2.event.calendar.limit.unavailable": "不可预约",
|
|
@@ -163,7 +165,9 @@ var locales_default = {
|
|
|
163
165
|
"pisell2.event.event.full.tip": "抱歉,当前活动名额已满。请选择其他活动。",
|
|
164
166
|
"pisell2.event.event.full.ok": "好的",
|
|
165
167
|
"pisell2.event.capacity.limit.reached.title": "活动名额已满",
|
|
166
|
-
"pisell2.event.capacity.limit.reached.tip": "购物车中有一个或多个活动已达预约上限,请将已满额的活动从购物车中移除后再完成结算。"
|
|
168
|
+
"pisell2.event.capacity.limit.reached.tip": "购物车中有一个或多个活动已达预约上限,请将已满额的活动从购物车中移除后再完成结算。",
|
|
169
|
+
"pisell2.event.schedule.item.expand": "查看更多",
|
|
170
|
+
"pisell2.event.schedule.item.collapse": "收起"
|
|
167
171
|
},
|
|
168
172
|
"zh-HK": {
|
|
169
173
|
"pisell2.event.calendar.limit.unavailable": "不可預約",
|
|
@@ -234,6 +238,8 @@ var locales_default = {
|
|
|
234
238
|
"pisell2.event.event.full.tip": "抱歉,當前活動名額已滿。請選擇其他活動。",
|
|
235
239
|
"pisell2.event.event.full.ok": "好的",
|
|
236
240
|
"pisell2.event.capacity.limit.reached.title": "活動名額已滿",
|
|
237
|
-
"pisell2.event.capacity.limit.reached.tip": "購物車中有一個或多個活動已達預約上限,請將已滿額的活動從購物車中移除後再完成結算。"
|
|
241
|
+
"pisell2.event.capacity.limit.reached.tip": "購物車中有一個或多個活動已達預約上限,請將已滿額的活動從購物車中移除後再完成結算。",
|
|
242
|
+
"pisell2.event.schedule.item.expand": "查看更多",
|
|
243
|
+
"pisell2.event.schedule.item.collapse": "收起"
|
|
238
244
|
}
|
|
239
245
|
};
|
|
@@ -7,6 +7,9 @@ export interface WalletPassListProps {
|
|
|
7
7
|
data?: PisellWalletPassCardProps[];
|
|
8
8
|
onChange?: (val: number[], valDetail: PisellWalletPassCardProps[]) => void;
|
|
9
9
|
value?: number[];
|
|
10
|
+
walletSetting: {
|
|
11
|
+
name: string;
|
|
12
|
+
};
|
|
10
13
|
}
|
|
11
14
|
export declare type WalletPassListRef = {
|
|
12
15
|
init: (params: MachineCodeListParams, formatList?: (val: WalletPassDataType[]) => WalletPassDataType[]) => void;
|
|
@@ -41,7 +41,7 @@ var import_utils2 = require("../utils");
|
|
|
41
41
|
var import_index = require("./index.less");
|
|
42
42
|
var WalletPassList = (0, import_react.forwardRef)(
|
|
43
43
|
(props, ref) => {
|
|
44
|
-
const { title, onChange, data: propsData, value } = props;
|
|
44
|
+
const { title, onChange, data: propsData, value, walletSetting } = props;
|
|
45
45
|
const [data, setData] = (0, import_react.useState)(
|
|
46
46
|
propsData || []
|
|
47
47
|
);
|
|
@@ -99,7 +99,7 @@ var WalletPassList = (0, import_react.forwardRef)(
|
|
|
99
99
|
style: { color: "#667085" }
|
|
100
100
|
}
|
|
101
101
|
),
|
|
102
|
-
description: import_utils.locales.getText("tocPay.text.walletPassEmpty")
|
|
102
|
+
description: import_utils.locales.getText("tocPay.text.walletPassEmpty")(walletSetting == null ? void 0 : walletSetting.name)
|
|
103
103
|
}
|
|
104
104
|
);
|
|
105
105
|
}, []);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { WalletPassDataType } from './serve';
|
|
3
3
|
import { PayGroup } from '../../model';
|
|
4
|
+
import './index.less';
|
|
4
5
|
export interface WalletPassRef {
|
|
5
6
|
init: (val?: PayGroup & {
|
|
6
7
|
customer_id?: number;
|
|
@@ -15,6 +16,10 @@ export interface WalletPassProps {
|
|
|
15
16
|
cards: WalletPassDataType[];
|
|
16
17
|
amount: number;
|
|
17
18
|
};
|
|
19
|
+
walletSetting: {
|
|
20
|
+
name: string;
|
|
21
|
+
popup_status: 0 | 1;
|
|
22
|
+
};
|
|
18
23
|
}
|
|
19
24
|
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<WalletPassProps & React.RefAttributes<WalletPassRef>>>;
|
|
20
25
|
export default _default;
|
|
@@ -36,18 +36,21 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_materials = require("@pisell/materials");
|
|
37
37
|
var import_utils = require("@pisell/utils");
|
|
38
38
|
var import_ahooks = require("ahooks");
|
|
39
|
+
var import_icons = require("@ant-design/icons");
|
|
39
40
|
var import_MultiModeSearch = __toESM(require("./MultiModeSearch"));
|
|
40
41
|
var import_List = __toESM(require("./List"));
|
|
41
42
|
var import_serve = require("./serve");
|
|
42
43
|
var import_utils2 = require("./utils");
|
|
43
44
|
var import_utils3 = require("../../utils");
|
|
45
|
+
var import_index = require("./index.less");
|
|
44
46
|
var { Amount } = import_materials.PisellText;
|
|
45
47
|
var WalletPass = (0, import_react.forwardRef)((props, ref) => {
|
|
46
48
|
var _a;
|
|
47
|
-
const { onWalletPassChange, walletPass } = props;
|
|
49
|
+
const { onWalletPassChange, walletPass, walletSetting } = props;
|
|
48
50
|
const [currentWalletPass, setCurrentWalletPass] = (0, import_react.useState)(walletPass);
|
|
49
51
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
50
52
|
const [searchOpen, setSearchOpen] = (0, import_react.useState)(false);
|
|
53
|
+
const [addList, setAddList] = (0, import_react.useState)([]);
|
|
51
54
|
const [order, setOrder] = (0, import_react.useState)(null);
|
|
52
55
|
const [searchData, setSearchData] = (0, import_react.useState)([]);
|
|
53
56
|
const [searchSelectData, setSearchSelectData] = (0, import_react.useState)({
|
|
@@ -82,11 +85,17 @@ var WalletPass = (0, import_react.forwardRef)((props, ref) => {
|
|
|
82
85
|
return (walletPassSelectCards == null ? void 0 : walletPassSelectCards.map((item) => item.id)) || [];
|
|
83
86
|
}, [walletPassSelectCards]);
|
|
84
87
|
const otherCustomerWalletPassList = (0, import_react.useMemo)(() => {
|
|
85
|
-
return (0, import_utils2.formatMachineCodeServer2CardList)(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
return (0, import_utils2.formatMachineCodeServer2CardList)(addList, selectValue);
|
|
89
|
+
}, [addList, selectValue]);
|
|
90
|
+
const other_exact_codes = (0, import_react.useMemo)(() => {
|
|
91
|
+
const codes = [];
|
|
92
|
+
addList.forEach((item) => {
|
|
93
|
+
if (!selectValue.includes(item.id)) {
|
|
94
|
+
codes.push(item.code);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
return codes;
|
|
98
|
+
}, [addList, selectValue]);
|
|
90
99
|
const refreshList = (0, import_ahooks.useMemoizedFn)(() => {
|
|
91
100
|
var _a2, _b;
|
|
92
101
|
if ((order == null ? void 0 : order.order_id) && (order == null ? void 0 : order.customer_id)) {
|
|
@@ -96,10 +105,29 @@ var WalletPass = (0, import_react.forwardRef)((props, ref) => {
|
|
|
96
105
|
available: 2,
|
|
97
106
|
prepare_payments,
|
|
98
107
|
filter_prepare_wallet_pass: 1,
|
|
99
|
-
sale_channel: ((_a2 = order._order) == null ? void 0 : _a2.sale_channel) || "online-store"
|
|
108
|
+
sale_channel: ((_a2 = order._order) == null ? void 0 : _a2.sale_channel) || "online-store",
|
|
109
|
+
other_exact_codes
|
|
100
110
|
},
|
|
101
111
|
// 已选择的卡片接口中不会返回,所以追加进入列表
|
|
102
|
-
(val) =>
|
|
112
|
+
(val) => {
|
|
113
|
+
const idMap = val.reduce((pre, cur) => {
|
|
114
|
+
return {
|
|
115
|
+
...pre,
|
|
116
|
+
[cur.id]: cur
|
|
117
|
+
};
|
|
118
|
+
}, {});
|
|
119
|
+
setAddList((prevState) => {
|
|
120
|
+
return prevState.map((item) => {
|
|
121
|
+
if (idMap[item.id]) {
|
|
122
|
+
return idMap[item.id];
|
|
123
|
+
}
|
|
124
|
+
return item;
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
return [...currentCustomerWalletPass || [], ...val].filter(
|
|
128
|
+
(item) => !(order == null ? void 0 : order.customer_id) || item.customer_id === (order == null ? void 0 : order.customer_id)
|
|
129
|
+
);
|
|
130
|
+
}
|
|
103
131
|
);
|
|
104
132
|
}
|
|
105
133
|
});
|
|
@@ -178,6 +206,14 @@ var WalletPass = (0, import_react.forwardRef)((props, ref) => {
|
|
|
178
206
|
"id"
|
|
179
207
|
)
|
|
180
208
|
);
|
|
209
|
+
setAddList((prevState) => {
|
|
210
|
+
return (0, import_utils.uniqueByKey)(
|
|
211
|
+
[...prevState, ...searchSelectData.details],
|
|
212
|
+
"id"
|
|
213
|
+
).filter(
|
|
214
|
+
(item) => !(order == null ? void 0 : order.customer_id) || item.customer_id !== (order == null ? void 0 : order.customer_id)
|
|
215
|
+
);
|
|
216
|
+
});
|
|
181
217
|
handleSearchModalClose();
|
|
182
218
|
};
|
|
183
219
|
const handleAddChange = (0, import_ahooks.useMemoizedFn)(
|
|
@@ -228,7 +264,7 @@ var WalletPass = (0, import_react.forwardRef)((props, ref) => {
|
|
|
228
264
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
229
265
|
import_materials.PisellModal,
|
|
230
266
|
{
|
|
231
|
-
title: /* @__PURE__ */ import_react.default.createElement("div", null,
|
|
267
|
+
title: /* @__PURE__ */ import_react.default.createElement("div", null, walletSetting.name),
|
|
232
268
|
open,
|
|
233
269
|
onCancel: () => handleWalletClose(),
|
|
234
270
|
cancelVisible: false,
|
|
@@ -236,9 +272,12 @@ var WalletPass = (0, import_react.forwardRef)((props, ref) => {
|
|
|
236
272
|
okText: /* @__PURE__ */ import_react.default.createElement("div", null, import_utils.locales.getText("tocPay.text.redeem"), " ", /* @__PURE__ */ import_react.default.createElement(Amount, { value: amount })),
|
|
237
273
|
onOk: handleRedeem
|
|
238
274
|
},
|
|
239
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "", style: { marginTop: 24 } }, /* @__PURE__ */ import_react.default.createElement(import_MultiModeSearch.default, { onChange: handleSearch }),
|
|
275
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "", style: { marginTop: 24 } }, /* @__PURE__ */ import_react.default.createElement(import_MultiModeSearch.default, { onChange: handleSearch }), /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-pass-modal-multi-selection-available" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-pass-modal-multi-selection-available-title" }, /* @__PURE__ */ import_react.default.createElement(import_icons.InfoCircleOutlined, { className: "wallet-pass-modal-multi-selection-available-title-icon" }), import_utils.locales.getText("tocPay.text.multipleSelectionAvailable")), /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-pass-modal-multi-selection-available-desc" }, import_utils.locales.getText(
|
|
276
|
+
"tocPay.text.youCanSelectMultipleWalletPassesToCombineForPayment"
|
|
277
|
+
)(walletSetting.name))), otherCustomerWalletPassList.length > 0 && /* @__PURE__ */ import_react.default.createElement(
|
|
240
278
|
import_List.default,
|
|
241
279
|
{
|
|
280
|
+
walletSetting,
|
|
242
281
|
data: otherCustomerWalletPassList,
|
|
243
282
|
title: import_utils.locales.getText("tocPay.text.couponCodesAdded"),
|
|
244
283
|
onChange: handleOtherChange,
|
|
@@ -247,7 +286,8 @@ var WalletPass = (0, import_react.forwardRef)((props, ref) => {
|
|
|
247
286
|
), /* @__PURE__ */ import_react.default.createElement(
|
|
248
287
|
import_List.default,
|
|
249
288
|
{
|
|
250
|
-
|
|
289
|
+
walletSetting,
|
|
290
|
+
title: walletSetting.name,
|
|
251
291
|
onChange: handleCurrentChange,
|
|
252
292
|
ref: listRef,
|
|
253
293
|
value: selectValue
|
|
@@ -271,6 +311,7 @@ var WalletPass = (0, import_react.forwardRef)((props, ref) => {
|
|
|
271
311
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "", style: { marginTop: 24 } }, /* @__PURE__ */ import_react.default.createElement(
|
|
272
312
|
import_List.default,
|
|
273
313
|
{
|
|
314
|
+
walletSetting,
|
|
274
315
|
data: searchData,
|
|
275
316
|
value: searchSelectData.ids,
|
|
276
317
|
onChange: handleAddChange
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.wallet-pass-modal-multi-selection-available {
|
|
2
|
+
border-radius: 10px;
|
|
3
|
+
background: #edf4ff;
|
|
4
|
+
display: flex;
|
|
5
|
+
padding: 12px 20px;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: flex-start;
|
|
8
|
+
margin-top: 20px;
|
|
9
|
+
.wallet-pass-modal-multi-selection-available-title {
|
|
10
|
+
color: var(--Color, #40484f);
|
|
11
|
+
font-size: 12px;
|
|
12
|
+
font-weight: 600;
|
|
13
|
+
line-height: 22px; /* 183.333% */
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
margin-bottom: 4px;
|
|
17
|
+
|
|
18
|
+
.wallet-pass-modal-multi-selection-available-title-icon {
|
|
19
|
+
color: #1E1E1E;
|
|
20
|
+
margin-right: 8px;
|
|
21
|
+
font-size: 16px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
.wallet-pass-modal-multi-selection-available-desc {
|
|
25
|
+
color: var(--Color, #40484f);
|
|
26
|
+
font-size: 12px;
|
|
27
|
+
font-weight: 400;
|
|
28
|
+
line-height: 16px; /* 133.333% */
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -8,6 +8,7 @@ export declare type MachineCodeListParams = {
|
|
|
8
8
|
}[];
|
|
9
9
|
filter_prepare_wallet_pass: 1 | 0;
|
|
10
10
|
sale_channel: string;
|
|
11
|
+
other_exact_codes?: string[];
|
|
11
12
|
};
|
|
12
13
|
export declare type WalletPassDataType = {
|
|
13
14
|
id: number;
|
|
@@ -33,6 +34,7 @@ export declare type WalletPassDataType = {
|
|
|
33
34
|
expire_time: string;
|
|
34
35
|
available_max_par_value: string;
|
|
35
36
|
available_max_amount: string;
|
|
37
|
+
recommended_usage_amount: string;
|
|
36
38
|
custom_expire_status: number;
|
|
37
39
|
wallet_pass_usage_unit: WalletPassUsageUnit;
|
|
38
40
|
custom_order_deduct_exhausted: number;
|
|
@@ -25,6 +25,7 @@ __export(utils_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(utils_exports);
|
|
26
26
|
var import_utils = require("@pisell/utils");
|
|
27
27
|
var import_materials = require("@pisell/materials");
|
|
28
|
+
var import_utils2 = require("../../utils");
|
|
28
29
|
var voucherTime = (data) => {
|
|
29
30
|
const config = import_materials.globalConfig.getConfig();
|
|
30
31
|
if (data == null ? void 0 : data.expire_date) {
|
|
@@ -43,7 +44,7 @@ var formatMachineCodeServer2CardList = (data, selectId = []) => {
|
|
|
43
44
|
name: item.product_name,
|
|
44
45
|
storeName: (_a = item.shop) == null ? void 0 : _a.name,
|
|
45
46
|
balance: item.balance_par_value,
|
|
46
|
-
redeem: item
|
|
47
|
+
redeem: (0, import_utils2.getAvailableMaxAmount)(item),
|
|
47
48
|
showRedeem: selectId.includes(item.id),
|
|
48
49
|
showBalanceSymbol: item.tag !== "point_card",
|
|
49
50
|
// balanceTitle: item.tag !== 'point_card' ? "" : "",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PayGroup } from '../../../model';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface WalletAvailableProps {
|
|
5
|
+
onOk: () => void;
|
|
6
|
+
payGroup?: PayGroup;
|
|
7
|
+
walletSetting: {
|
|
8
|
+
name: string;
|
|
9
|
+
popup_status: 0 | 1;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export interface WalletAvailableRef {
|
|
13
|
+
open: () => void;
|
|
14
|
+
}
|
|
15
|
+
declare const _default: React.ForwardRefExoticComponent<WalletAvailableProps & React.RefAttributes<WalletAvailableRef>>;
|
|
16
|
+
export default _default;
|