@pisell/private-materials 6.3.45 → 6.3.47

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.
Files changed (90) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +9 -9
  11. package/es/components/Sales/Summary/utils.d.ts +1 -1
  12. package/es/components/appointmentBooking/components/Voucher/index.js +1 -0
  13. package/es/components/booking/components/voucher/index.js +3 -1
  14. package/es/components/booking/info/service2/utils.d.ts +1 -1
  15. package/es/components/booking/utils.d.ts +2 -2
  16. package/es/components/eftposPay/amount.d.ts +1 -1
  17. package/es/components/eftposPay/device.d.ts +1 -1
  18. package/es/components/eftposPay/hooks.d.ts +2 -2
  19. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +14 -6
  20. package/es/components/eftposPay/payo/config.js +70 -32
  21. package/es/components/eftposPay/payo/payment.d.ts +66 -0
  22. package/es/components/eftposPay/payo/payment.js +579 -0
  23. package/es/components/eftposPay/store/index.d.ts +6 -6
  24. package/es/components/eftposPay/utils/log/index.d.ts +110 -0
  25. package/es/components/eftposPay/utils/log/index.js +371 -0
  26. package/es/components/index.d.ts +2 -1
  27. package/es/components/index.js +2 -1
  28. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
  29. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
  30. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +2 -0
  31. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
  32. package/es/components/pay/toC/locales.d.ts +3 -0
  33. package/es/components/pay/toC/locales.js +6 -3
  34. package/es/components/wallet/Detail/index.js +34 -2
  35. package/es/components/wallet/Detail/index.less +11 -0
  36. package/es/components/wallet/Detail/locales.d.ts +6 -0
  37. package/es/components/wallet/Detail/locales.js +14 -2
  38. package/es/components/wallet/Voucher/index.js +11 -10
  39. package/es/components/wallet/components/WalletCard.js +5 -1
  40. package/es/components/wallet/index.js +4 -2
  41. package/es/components/wallet/serve.d.ts +7 -0
  42. package/es/components/wallet/utils.d.ts +48 -0
  43. package/es/components/wallet/utils.js +342 -0
  44. package/es/index.d.ts +3 -2
  45. package/es/index.js +4 -3
  46. package/es/plus/walletPassGallery/components/passDetail/index.js +72 -28
  47. package/es/plus/walletPassGallery/index.js +4 -2
  48. package/es/plus/walletPassGallery/serve.d.ts +2 -0
  49. package/es/plus/walletPassGallery/serve.js +1 -1
  50. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  51. package/lib/components/appointmentBooking/components/Voucher/index.js +1 -0
  52. package/lib/components/booking/components/voucher/index.js +3 -1
  53. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  54. package/lib/components/booking/utils.d.ts +2 -2
  55. package/lib/components/eftposPay/amount.d.ts +1 -1
  56. package/lib/components/eftposPay/device.d.ts +1 -1
  57. package/lib/components/eftposPay/hooks.d.ts +2 -2
  58. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +12 -6
  59. package/lib/components/eftposPay/payo/config.js +98 -73
  60. package/lib/components/eftposPay/payo/payment.d.ts +66 -0
  61. package/lib/components/eftposPay/payo/payment.js +357 -0
  62. package/lib/components/eftposPay/store/index.d.ts +6 -6
  63. package/lib/components/eftposPay/utils/log/index.d.ts +110 -0
  64. package/lib/components/eftposPay/utils/log/index.js +294 -0
  65. package/lib/components/index.d.ts +2 -1
  66. package/lib/components/index.js +3 -0
  67. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
  68. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
  69. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +1 -1
  70. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
  71. package/lib/components/pay/toC/locales.d.ts +3 -0
  72. package/lib/components/pay/toC/locales.js +6 -3
  73. package/lib/components/wallet/Detail/index.js +31 -3
  74. package/lib/components/wallet/Detail/index.less +11 -0
  75. package/lib/components/wallet/Detail/locales.d.ts +6 -0
  76. package/lib/components/wallet/Detail/locales.js +14 -2
  77. package/lib/components/wallet/Voucher/index.js +8 -8
  78. package/lib/components/wallet/components/WalletCard.js +4 -0
  79. package/lib/components/wallet/index.js +2 -2
  80. package/lib/components/wallet/serve.d.ts +7 -0
  81. package/lib/components/wallet/utils.d.ts +48 -0
  82. package/lib/components/wallet/utils.js +287 -0
  83. package/lib/index.d.ts +3 -2
  84. package/lib/index.js +5 -2
  85. package/lib/plus/walletPassGallery/components/passDetail/index.js +46 -12
  86. package/lib/plus/walletPassGallery/index.js +4 -2
  87. package/lib/plus/walletPassGallery/serve.d.ts +2 -0
  88. package/lib/plus/walletPassGallery/serve.js +1 -1
  89. package/lowcode/wallet-pass-detail/meta.ts +84 -0
  90. package/package.json +2 -2
@@ -0,0 +1,294 @@
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/eftposPay/utils/log/index.ts
30
+ var log_exports = {};
31
+ __export(log_exports, {
32
+ default: () => log_default
33
+ });
34
+ module.exports = __toCommonJS(log_exports);
35
+ var import_dayjs = __toESM(require("dayjs"));
36
+ var import_utils = require("@pisell/utils");
37
+ var PAYMENT_LOGS_KEY = "pisell2_eftpos_payment_logs";
38
+ var PaymentLogInstance = class _PaymentLogInstance {
39
+ static instance;
40
+ /** 当前交易记录号 */
41
+ currentNumber = null;
42
+ /** 当前日志记录 */
43
+ currentRecord = null;
44
+ constructor() {
45
+ }
46
+ /**
47
+ * 获取单例实例
48
+ */
49
+ static getInstance() {
50
+ if (!_PaymentLogInstance.instance) {
51
+ _PaymentLogInstance.instance = new _PaymentLogInstance();
52
+ }
53
+ return _PaymentLogInstance.instance;
54
+ }
55
+ /**
56
+ * 初始化支付日志
57
+ * @param number 交易记录号
58
+ * @param options 初始化选项
59
+ */
60
+ init(number, options) {
61
+ try {
62
+ this.checkAndUploadOldLogs();
63
+ this.currentNumber = number;
64
+ this.currentRecord = {
65
+ number,
66
+ orderId: options == null ? void 0 : options.orderId,
67
+ deviceId: options == null ? void 0 : options.deviceId,
68
+ paymentType: options == null ? void 0 : options.paymentType,
69
+ createdAt: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm:ss.SSS"),
70
+ logs: []
71
+ };
72
+ this.addLog({
73
+ title: "EFTPOS日志初始化",
74
+ content: { number, ...options || {} }
75
+ });
76
+ console.log(`📝 支付日志初始化成功,交易号: ${number}`);
77
+ } catch (error) {
78
+ console.error("❌ 支付日志初始化失败:", error);
79
+ }
80
+ }
81
+ /**
82
+ * 添加日志条目
83
+ * @param title 日志标题
84
+ * @param content 日志内容
85
+ */
86
+ addLog(params) {
87
+ try {
88
+ if (!this.currentRecord || !this.currentNumber) {
89
+ console.warn("⚠️ 日志未初始化,无法添加日志");
90
+ return;
91
+ }
92
+ const logEntry = {
93
+ title: params.title,
94
+ time: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm:ss.SSS")
95
+ };
96
+ if (params == null ? void 0 : params.content) {
97
+ logEntry.content = params.content;
98
+ }
99
+ this.currentRecord.logs.push(logEntry);
100
+ this.saveToLocalStorage();
101
+ console.log(`📝 添加支付日志: ${params.title}`, logEntry);
102
+ } catch (error) {
103
+ console.error("❌ 添加日志失败:", error);
104
+ }
105
+ }
106
+ /**
107
+ * 构建日志内容
108
+ * @param record 日志记录
109
+ * @returns 格式化的日志内容数组
110
+ */
111
+ buildLogContent(record) {
112
+ return [
113
+ {
114
+ key: "交易记录号",
115
+ value: record.number
116
+ },
117
+ {
118
+ key: "订单ID",
119
+ value: (record == null ? void 0 : record.orderId) || "未知"
120
+ },
121
+ {
122
+ key: "设备ID",
123
+ value: (record == null ? void 0 : record.deviceId) || "未知"
124
+ },
125
+ {
126
+ key: "支付类型",
127
+ value: (record == null ? void 0 : record.paymentType) || "未知"
128
+ },
129
+ {
130
+ key: "创建时间",
131
+ value: record.createdAt
132
+ },
133
+ {
134
+ key: "详细日志",
135
+ value: JSON.stringify(record.logs || [])
136
+ }
137
+ ];
138
+ }
139
+ /**
140
+ * 发送单条日志记录到飞书
141
+ * @param record 日志记录
142
+ * @param isRestore 是否是恢复上传
143
+ */
144
+ sendLogRecord(record, isRestore = false) {
145
+ const prefix = isRestore ? "[恢复]" : "";
146
+ const title = `${prefix}支付日志-${record.paymentType || "Unknown"}-${record.orderId || "Unknown"}`;
147
+ const content = this.buildLogContent(record);
148
+ (0, import_utils.sendWarningLog)({ title, content });
149
+ console.log(`✅ 日志已发送到飞书: ${title}`);
150
+ }
151
+ /**
152
+ * 发送日志到飞书
153
+ * @param title 日志标题(可选,仅在需要自定义标题时使用)
154
+ */
155
+ sendLogs(title) {
156
+ try {
157
+ if (!this.currentRecord) {
158
+ console.warn("⚠️ 没有日志记录需要发送");
159
+ return;
160
+ }
161
+ if (title) {
162
+ const content = this.buildLogContent(this.currentRecord);
163
+ (0, import_utils.sendWarningLog)({ title, content });
164
+ console.log(`✅ 日志已发送到飞书: ${title}`);
165
+ } else {
166
+ this.sendLogRecord(this.currentRecord, false);
167
+ }
168
+ } catch (error) {
169
+ console.error("❌ 发送日志到飞书失败:", error);
170
+ }
171
+ }
172
+ /**
173
+ * 清除当前日志
174
+ * @param shouldSend 清除前是否发送到飞书,默认为 true
175
+ */
176
+ clearLogs(shouldSend = true) {
177
+ try {
178
+ if (!this.currentNumber) {
179
+ console.warn("⚠️ 没有活动的日志记录需要清除");
180
+ return;
181
+ }
182
+ if (shouldSend && this.currentRecord) {
183
+ this.sendLogs();
184
+ }
185
+ this.removeFromLocalStorage(this.currentNumber);
186
+ this.currentNumber = null;
187
+ this.currentRecord = null;
188
+ console.log("🧹 日志已清除");
189
+ } catch (error) {
190
+ console.error("❌ 清除日志失败:", error);
191
+ }
192
+ }
193
+ /**
194
+ * 检查并上传旧日志
195
+ */
196
+ checkAndUploadOldLogs() {
197
+ try {
198
+ const oldLogs = this.getOldLogsFromLocalStorage();
199
+ if (oldLogs.length === 0) {
200
+ return;
201
+ }
202
+ console.log(`📤 发现 ${oldLogs.length} 条旧日志记录,准备上传...`);
203
+ for (const log of oldLogs) {
204
+ try {
205
+ this.sendLogRecord(log, true);
206
+ this.removeFromLocalStorage(log.number);
207
+ console.log(`✅ 旧日志已上传并删除: ${log.number}`);
208
+ } catch (error) {
209
+ console.error(`❌ 上传旧日志失败 (${log.number}):`, error);
210
+ }
211
+ }
212
+ } catch (error) {
213
+ console.error("❌ 检查旧日志失败:", error);
214
+ }
215
+ }
216
+ /**
217
+ * 获取所有支付日志对象
218
+ */
219
+ getAllLogsObject() {
220
+ try {
221
+ const value = localStorage.getItem(PAYMENT_LOGS_KEY);
222
+ if (!value) {
223
+ return {};
224
+ }
225
+ return JSON.parse(value);
226
+ } catch (error) {
227
+ console.error("❌ 读取 localStorage 失败:", error);
228
+ return {};
229
+ }
230
+ }
231
+ /**
232
+ * 保存所有支付日志对象
233
+ */
234
+ saveAllLogsObject(logsObject) {
235
+ try {
236
+ localStorage.setItem(PAYMENT_LOGS_KEY, JSON.stringify(logsObject));
237
+ } catch (error) {
238
+ console.error("❌ 保存到 localStorage 失败:", error);
239
+ }
240
+ }
241
+ /**
242
+ * 保存到 localStorage
243
+ */
244
+ saveToLocalStorage() {
245
+ try {
246
+ if (!this.currentRecord || !this.currentNumber) {
247
+ return;
248
+ }
249
+ const allLogs = this.getAllLogsObject();
250
+ allLogs[this.currentNumber] = this.currentRecord;
251
+ this.saveAllLogsObject(allLogs);
252
+ } catch (error) {
253
+ console.error("❌ 保存到 localStorage 失败:", error);
254
+ }
255
+ }
256
+ /**
257
+ * 从 localStorage 中删除
258
+ */
259
+ removeFromLocalStorage(number) {
260
+ try {
261
+ const allLogs = this.getAllLogsObject();
262
+ delete allLogs[number];
263
+ this.saveAllLogsObject(allLogs);
264
+ } catch (error) {
265
+ console.error("❌ 从 localStorage 删除失败:", error);
266
+ }
267
+ }
268
+ /**
269
+ * 获取所有旧日志
270
+ */
271
+ getOldLogsFromLocalStorage() {
272
+ try {
273
+ const allLogs = this.getAllLogsObject();
274
+ return Object.values(allLogs);
275
+ } catch (error) {
276
+ console.error("❌ 获取旧日志失败:", error);
277
+ return [];
278
+ }
279
+ }
280
+ /**
281
+ * 获取当前日志记录(用于调试)
282
+ */
283
+ getCurrentRecord() {
284
+ return this.currentRecord;
285
+ }
286
+ /**
287
+ * 获取当前交易号(用于调试)
288
+ */
289
+ getCurrentNumber() {
290
+ return this.currentNumber;
291
+ }
292
+ };
293
+ var paymentLog = PaymentLogInstance.getInstance();
294
+ var log_default = paymentLog;
@@ -10,6 +10,7 @@ import RuleSetting from './ruleSetting';
10
10
  import TaxSelect from './taxSelect';
11
11
  import ToCPay from './pay/toC';
12
12
  import WalletList from './walletList';
13
+ import Wallet from './wallet';
13
14
  import WorkspaceListDetail from './workSpaceListDetail/';
14
15
  import WorkspaceList from './workSpaceList';
15
16
  import PisellSelectCustomerModal from './pisellSelectCustomerModal';
@@ -19,4 +20,4 @@ import StepController from './stepController';
19
20
  import PinModal from './pinModal';
20
21
  import PinVerifyModal from './pinVerifyModal';
21
22
  import { OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth } from './authentication/admin';
22
- export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, EditBookingModal, StepController, PinModal, PinVerifyModal, OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth, };
23
+ export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, Wallet, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, EditBookingModal, StepController, PinModal, PinVerifyModal, OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth, };
@@ -55,6 +55,7 @@ __export(components_exports, {
55
55
  SubTotal: () => import_subTotal.default,
56
56
  TaxSelect: () => import_taxSelect.default,
57
57
  ToCPay: () => import_toC.default,
58
+ Wallet: () => import_wallet.default,
58
59
  WalletList: () => import_walletList.default,
59
60
  WorkspaceList: () => import_workSpaceList.default,
60
61
  WorkspaceListDetail: () => import_workSpaceListDetail.default
@@ -72,6 +73,7 @@ var import_ruleSetting = __toESM(require("./ruleSetting"));
72
73
  var import_taxSelect = __toESM(require("./taxSelect"));
73
74
  var import_toC = __toESM(require("./pay/toC"));
74
75
  var import_walletList = __toESM(require("./walletList"));
76
+ var import_wallet = __toESM(require("./wallet"));
75
77
  var import_workSpaceListDetail = __toESM(require("./workSpaceListDetail/"));
76
78
  var import_workSpaceList = __toESM(require("./workSpaceList"));
77
79
  var import_pisellSelectCustomerModal = __toESM(require("./pisellSelectCustomerModal"));
@@ -109,6 +111,7 @@ var import_admin = require("./authentication/admin");
109
111
  SubTotal,
110
112
  TaxSelect,
111
113
  ToCPay,
114
+ Wallet,
112
115
  WalletList,
113
116
  WorkspaceList,
114
117
  WorkspaceListDetail
@@ -50,6 +50,12 @@ export declare type WalletPassDataType = {
50
50
  shop: Shop;
51
51
  wallet_pass_usage?: any;
52
52
  balance_par_value: string;
53
+ custom_schedule_snapshot?: {
54
+ data: any[];
55
+ };
56
+ metadata?: {
57
+ validity_type: string;
58
+ };
53
59
  };
54
60
  declare type Shop = {
55
61
  id: number;
@@ -39,7 +39,7 @@ var voucherTime = (data) => {
39
39
  };
40
40
  var formatMachineCodeServer2CardList = (data, selectId = []) => {
41
41
  return (data || []).map((item) => {
42
- var _a, _b, _c;
42
+ var _a, _b, _c, _d, _e;
43
43
  return {
44
44
  id: item.id,
45
45
  name: item.product_name,
@@ -58,7 +58,9 @@ var formatMachineCodeServer2CardList = (data, selectId = []) => {
58
58
  cover: (_c = item.product) == null ? void 0 : _c.cover,
59
59
  qrCode: item.code,
60
60
  validDate: voucherTime(item),
61
- originData: item
61
+ originData: item,
62
+ scheduleList: ((_d = item.custom_schedule_snapshot) == null ? void 0 : _d.data) || [],
63
+ validDateBySchedule: ((_e = item.metadata) == null ? void 0 : _e.validity_type) === "custom_schedule_validity"
62
64
  };
63
65
  });
64
66
  };
@@ -83,6 +83,6 @@ var PaymentReturnContent = ({
83
83
  });
84
84
  }
85
85
  };
86
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "payment-return-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "payment-return-content-img" }, /* @__PURE__ */ import_react.default.createElement("img", { src: `${prefix}/payment-content.png`, alt: "success" })), /* @__PURE__ */ import_react.default.createElement("div", { className: "payment-return-content-buttons" }, /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { block: true, className: "payment-return-content-order-button", onClick: handleViewOrder }, import_utils.locales.getText("tocPay.text.paymentCompletedAndViewOrder")), /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { block: true, onClick: handleGoBack }, import_utils.locales.getText("tocPay.text.returnAndSelectOtherPaymentMethod"))));
86
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "payment-return-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "payment-return-content-img" }, /* @__PURE__ */ import_react.default.createElement("img", { src: `${prefix}/payment-content.png`, alt: "success" })), /* @__PURE__ */ import_react.default.createElement("div", { className: "payment-return-content-text" }, import_utils.locales.getText("tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater")), /* @__PURE__ */ import_react.default.createElement("div", { className: "payment-return-content-buttons" }, /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { block: true, className: "payment-return-content-order-button", onClick: handleViewOrder }, import_utils.locales.getText("tocPay.text.paymentCompletedAndViewOrder")), /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { block: true, onClick: handleGoBack }, import_utils.locales.getText("tocPay.text.returnAndSelectOtherPaymentMethod"))));
87
87
  };
88
88
  var PaymentReturnContent_default = PaymentReturnContent;
@@ -1,16 +1,26 @@
1
1
  .payment-return-content {
2
2
  padding: 100px 46px 0;
3
+ max-height: 100vh;
4
+ display: flex;
5
+ flex-direction: column;
6
+ gap: 24px;
3
7
 
4
8
  .payment-return-content-img {
5
9
  width: 100%;
6
- margin-bottom: 60px;
7
10
  min-height: 270px;
11
+ display: flex;
12
+ justify-content: center;
13
+ align-items: center;
8
14
  img {
9
- width: 100%;
15
+ max-width: 100%;
10
16
  height: 100%;
17
+ max-height: 480px;
11
18
  }
12
19
  }
13
-
20
+ .payment-return-content-text {
21
+ color: var(--Gray-600, #475467);
22
+ text-align: center;
23
+ }
14
24
  .payment-return-content-buttons {
15
25
  display: flex;
16
26
  flex-direction: column;
@@ -97,6 +97,7 @@ declare const _default: {
97
97
  'tocPay.text.returnAndSelectOtherPaymentMethod': string;
98
98
  'tocPay.text.paymentCompletedAndViewOrder': string;
99
99
  'tocPay.text.paymentFailed': string;
100
+ 'tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater': string;
100
101
  };
101
102
  'zh-CN': {
102
103
  'tocPay.text.checkout': string;
@@ -195,6 +196,7 @@ declare const _default: {
195
196
  'tocPay.text.returnAndSelectOtherPaymentMethod': string;
196
197
  'tocPay.text.paymentCompletedAndViewOrder': string;
197
198
  'tocPay.text.paymentFailed': string;
199
+ 'tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater': string;
198
200
  };
199
201
  'zh-HK': {
200
202
  'tocPay.text.checkout': string;
@@ -293,6 +295,7 @@ declare const _default: {
293
295
  'tocPay.text.returnAndSelectOtherPaymentMethod': string;
294
296
  'tocPay.text.paymentCompletedAndViewOrder': string;
295
297
  'tocPay.text.paymentFailed': string;
298
+ 'tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater': string;
296
299
  };
297
300
  };
298
301
  export default _default;
@@ -120,7 +120,8 @@ var locales_default = {
120
120
  "tocPay.text.viewDetail": "View detail",
121
121
  "tocPay.text.returnAndSelectOtherPaymentMethod": "Go Back / Choose Another Payment",
122
122
  "tocPay.text.paymentCompletedAndViewOrder": "Payment Completed / View Order",
123
- "tocPay.text.paymentFailed": "Not paid yet, please check if the payment is successful"
123
+ "tocPay.text.paymentFailed": "Not paid yet, please check if the payment is successful",
124
+ "tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater": "We are verifying your payment. Please check your order status later."
124
125
  },
125
126
  "zh-CN": {
126
127
  "tocPay.text.checkout": "结账",
@@ -218,7 +219,8 @@ var locales_default = {
218
219
  "tocPay.text.viewDetail": "查看详情",
219
220
  "tocPay.text.returnAndSelectOtherPaymentMethod": "返回 / 选择其他支付方式",
220
221
  "tocPay.text.paymentCompletedAndViewOrder": "支付完成 / 查看订单",
221
- "tocPay.text.paymentFailed": "未支付完成,请检查是否支付成功"
222
+ "tocPay.text.paymentFailed": "未支付完成,请检查是否支付成功",
223
+ "tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater": "我们正在确认您的支付状态,请稍后查看订单状态。"
222
224
  },
223
225
  "zh-HK": {
224
226
  "tocPay.text.checkout": "結帳",
@@ -316,6 +318,7 @@ var locales_default = {
316
318
  "tocPay.text.viewDetail": "查看詳情",
317
319
  "tocPay.text.returnAndSelectOtherPaymentMethod": "返回 / 選擇其他支付方式",
318
320
  "tocPay.text.paymentCompletedAndViewOrder": "支付完成 / 查看訂單",
319
- "tocPay.text.paymentFailed": "未支付完成,请检查是否支付成功"
321
+ "tocPay.text.paymentFailed": "未支付完成,请检查是否支付成功",
322
+ "tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater": "我們正在確認您的支付狀態,請稍後查看訂單狀態。"
320
323
  }
321
324
  };
@@ -45,6 +45,7 @@ var import_locales = __toESM(require("./locales"));
45
45
  var import_serve = require("./serve");
46
46
  var import_utils2 = require("./../../../utils");
47
47
  var import_components = require("../components");
48
+ var import_utils3 = require("../utils");
48
49
  var import_index = require("./index.less");
49
50
  var { Text } = import_materials2.Typography;
50
51
  import_dayjs.default.extend(import_timezone.default);
@@ -65,8 +66,10 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
65
66
  encoded = "",
66
67
  balance,
67
68
  expire_date = "",
68
- product = {}
69
+ product = {},
70
+ custom_schedule_snapshot
69
71
  } = detail;
72
+ console.log(detail, "detail22");
70
73
  const {
71
74
  description = "",
72
75
  extension_data = [],
@@ -212,8 +215,33 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
212
215
  onGoogleClick();
213
216
  }
214
217
  };
218
+ const scheduleList = (0, import_react.useMemo)(() => {
219
+ return (custom_schedule_snapshot == null ? void 0 : custom_schedule_snapshot.data) || [];
220
+ }, [custom_schedule_snapshot]);
215
221
  (0, import_react.useEffect)(() => {
216
222
  var _a2;
223
+ const detail2 = (0, import_utils3.formatScheduleText)(scheduleList, "zh-CN");
224
+ let expireText = expire_date ? expire_date : import_utils.locales.getText("page.wallet.expireDate");
225
+ if (scheduleList.length > 0) {
226
+ let validityTexts = "";
227
+ let excludedText = "";
228
+ let includedText = "";
229
+ detail2.forEach((item) => {
230
+ if (item.validityTexts.length > 0) {
231
+ validityTexts = `${validityTexts}${item.validityTexts.join("\n")}
232
+ `;
233
+ }
234
+ if (item.excluded_date.length > 0) {
235
+ excludedText = `${excludedText}${item.excluded_date.join("\n")}
236
+ `;
237
+ }
238
+ if (item.included_date.length > 0) {
239
+ includedText = `${includedText}${item.included_date.join("\n")}
240
+ `;
241
+ }
242
+ });
243
+ expireText = /* @__PURE__ */ import_react.default.createElement("span", { className: "wallet-detail-expire-text" }, validityTexts, excludedText && /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-expire-text-title" }, import_utils.locales.getText("page.wallet.notValidDate")), excludedText, includedText && /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-expire-text-title" }, import_utils.locales.getText("page.wallet.includedDate")), includedText);
244
+ }
217
245
  let data = [
218
246
  {
219
247
  label: import_utils.locales.getText("page.wallet.cardName"),
@@ -226,11 +254,11 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
226
254
  },
227
255
  {
228
256
  label: import_utils.locales.getText("page.wallet.validDate"),
229
- value: expire_date ? expire_date : import_utils.locales.getText("page.wallet.expireDate")
257
+ value: expireText
230
258
  }
231
259
  ];
232
260
  if (tag === "product_discount_card") {
233
- const isFixedAmount = ((_a2 = detail.metadata) == null ? void 0 : _a2.discount_card_type) === "fixed_amount";
261
+ const isFixedAmount = ((_a2 = detail2.metadata) == null ? void 0 : _a2.discount_card_type) === "fixed_amount";
234
262
  data.splice(2, 0, {
235
263
  label: import_utils.locales.getText("page.wallet.discount"),
236
264
  value: balance ? isFixedAmount ? `${symbol}${Number(balance)}` : `${Number(balance)}%` : ""
@@ -373,3 +373,14 @@
373
373
  font-weight: 500;
374
374
  line-height: 24px;
375
375
  }
376
+
377
+ .wallet-detail-expire-text {
378
+ white-space: pre-wrap;
379
+ }
380
+
381
+ .wallet-detail-expire-text-title {
382
+ font-size: 14px;
383
+ font-weight: 500;
384
+ line-height: 20px;
385
+ color: #667085;
386
+ }
@@ -21,6 +21,8 @@ declare const _default: {
21
21
  'page.wallet.addGoogle': string;
22
22
  'page.wallet.viewDetails': string;
23
23
  'page.wallet.expireDate': string;
24
+ 'page.wallet.notValidDate': string;
25
+ 'page.wallet.includedDate': string;
24
26
  'page.wallet.urlEmpty': string;
25
27
  'page.wallet.notIOS': string;
26
28
  'page.wallet.addSuccess': string;
@@ -69,6 +71,8 @@ declare const _default: {
69
71
  'page.wallet.addGoogle': string;
70
72
  'page.wallet.viewDetails': string;
71
73
  'page.wallet.expireDate': string;
74
+ 'page.wallet.notValidDate': string;
75
+ 'page.wallet.includedDate': string;
72
76
  'page.wallet.urlEmpty': string;
73
77
  'page.wallet.notIOS': string;
74
78
  'page.wallet.addSuccess': string;
@@ -117,6 +121,8 @@ declare const _default: {
117
121
  'page.wallet.addGoogle': string;
118
122
  'page.wallet.viewDetails': string;
119
123
  'page.wallet.expireDate': string;
124
+ 'page.wallet.notValidDate': string;
125
+ 'page.wallet.includedDate': string;
120
126
  'page.wallet.urlEmpty': string;
121
127
  'page.wallet.notIOS': string;
122
128
  'page.wallet.addSuccess': string;
@@ -48,6 +48,10 @@ var locales_default = {
48
48
  "page.wallet.addGoogle": "Add to Google Wallet",
49
49
  "page.wallet.viewDetails": "See details",
50
50
  "page.wallet.expireDate": "Long term",
51
+ "page.wallet.notValidDate": "Not valid on",
52
+ // 不可用日期
53
+ "page.wallet.includedDate": "Included dates",
54
+ // 包含日期
51
55
  "page.wallet.urlEmpty": "Wallet link is empty",
52
56
  "page.wallet.notIOS": "Apple Wallet is not supported on non-iOS devices",
53
57
  "page.wallet.addSuccess": "Successfully added to wallet",
@@ -100,6 +104,10 @@ var locales_default = {
100
104
  "page.wallet.addGoogle": "添加到谷歌钱包",
101
105
  "page.wallet.viewDetails": "查看详情",
102
106
  "page.wallet.expireDate": "长期",
107
+ "page.wallet.notValidDate": "不可用日期",
108
+ // 不可用日期
109
+ "page.wallet.includedDate": "包含日期",
110
+ // 包含日期
103
111
  "page.wallet.urlEmpty": "钱包链接为空",
104
112
  "page.wallet.notIOS": "非iOS设备不支持Apple Wallet",
105
113
  "page.wallet.addSuccess": "已成功添加到钱包",
@@ -111,7 +119,7 @@ var locales_default = {
111
119
  // Usage Rules
112
120
  "page.wallet.usageRules": "使用规则",
113
121
  "page.wallet.usageRulesSubtitle": "请仔细阅读以下使用条件",
114
- "page.wallet.timeUsageLimits": "时间使用限制",
122
+ "page.wallet.timeUsageLimits": "使用频次限制",
115
123
  "page.wallet.totalQuantityControl": "总量控制",
116
124
  "page.wallet.dailyLimit": "每日限制:",
117
125
  "page.wallet.weeklyLimit": "每周限制:",
@@ -152,6 +160,10 @@ var locales_default = {
152
160
  "page.wallet.addGoogle": "添加到谷歌錢包",
153
161
  "page.wallet.viewDetails": "查看詳情",
154
162
  "page.wallet.expireDate": "長期",
163
+ "page.wallet.notValidDate": "不可用日期",
164
+ // 不可用日期
165
+ "page.wallet.includedDate": "包含日期",
166
+ // 包含日期
155
167
  "page.wallet.urlEmpty": "錢包連結為空",
156
168
  "page.wallet.notIOS": "非iOS設備不支持Apple Wallet",
157
169
  "page.wallet.addSuccess": "已成功添加到錢包",
@@ -163,7 +175,7 @@ var locales_default = {
163
175
  // Usage Rules
164
176
  "page.wallet.usageRules": "使用規則",
165
177
  "page.wallet.usageRulesSubtitle": "請仔細閱讀以下使用條件",
166
- "page.wallet.timeUsageLimits": "時間使用限制",
178
+ "page.wallet.timeUsageLimits": "使用頻次限制",
167
179
  "page.wallet.totalQuantityControl": "總量控制",
168
180
  "page.wallet.dailyLimit": "每日限制:",
169
181
  "page.wallet.weeklyLimit": "每週限制:",
@@ -65,6 +65,14 @@ var Voucher = (0, import_model.Provider)((props) => {
65
65
  recordViewRef.current.closeDetailModal();
66
66
  }
67
67
  }, [globalState.setup]);
68
+ const handleBack = (0, import_react.useCallback)(() => {
69
+ if (recordViewRef.current) {
70
+ recordViewRef.current.closeDetailModal();
71
+ }
72
+ setGlobalState({
73
+ setup: "list"
74
+ });
75
+ }, [recordViewRef, setGlobalState]);
68
76
  const renderItem = (item) => /* @__PURE__ */ import_react.default.createElement(
69
77
  import_WalletCard.default,
70
78
  {
@@ -82,14 +90,6 @@ var Voucher = (0, import_model.Provider)((props) => {
82
90
  if (isEmpty) {
83
91
  return /* @__PURE__ */ import_react.default.createElement(import_materials.PisellEmpty, null);
84
92
  }
85
- const handleBack = (0, import_react.useCallback)(() => {
86
- if (recordViewRef.current) {
87
- recordViewRef.current.closeDetailModal();
88
- }
89
- setGlobalState({
90
- setup: "list"
91
- });
92
- }, [recordViewRef, setGlobalState]);
93
93
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, platform !== "pc" && /* @__PURE__ */ import_react.default.createElement(Title, { className: "wallet-voucher-title" }, import_utils.locales.getText("page.wallet.voucher")), /* @__PURE__ */ import_react.default.createElement(
94
94
  import_materials.CardMetricItem,
95
95
  {
@@ -55,6 +55,8 @@ var WalletCard = ({
55
55
  product_cover = "",
56
56
  par_value = "",
57
57
  unified_messages = {},
58
+ custom_schedule_snapshot,
59
+ metadata,
58
60
  ...rest
59
61
  } = item;
60
62
  const platform = (0, import_react.useMemo)(() => (0, import_utils.isMobile)() ? "h5" : "pc", []);
@@ -66,6 +68,8 @@ var WalletCard = ({
66
68
  import_materials.PisellWalletPassCard,
67
69
  {
68
70
  ...rest,
71
+ scheduleList: (custom_schedule_snapshot == null ? void 0 : custom_schedule_snapshot.data) || [],
72
+ validDateBySchedule: (metadata == null ? void 0 : metadata.validity_type) === "custom_schedule_validity",
69
73
  balanceTitle,
70
74
  showDetail: false,
71
75
  showRedeem: false,