@pisell/private-materials 6.12.202 → 6.12.203
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/meta.js +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.js +3 -3
- package/es/components/pay/toC/serve.js +1 -1
- package/es/plus/pisellSaleSummaryDetail/index.js +1 -1
- package/es/plus/pisellSalesManagement/hooks/useBookingPerspective.js +2 -1
- package/es/plus/pisellSalesManagement/hooks/useOrderPerspective.js +3 -1
- package/es/plus/saleDetail/components/SummaryFinancialSections/index.js +1 -1
- package/es/plus/saleDetail/tmpl/B/components/Pay/index.js +1 -1
- package/es/plus/{saleDetail → salesSdk}/utils/paymentStatus.js +1 -1
- package/lib/components/pay/toC/serve.js +1 -1
- package/lib/plus/pisellSaleSummaryDetail/index.js +1 -1
- package/lib/plus/pisellSalesManagement/hooks/useBookingPerspective.js +2 -1
- package/lib/plus/pisellSalesManagement/hooks/useOrderPerspective.js +3 -1
- package/lib/plus/saleDetail/components/SummaryFinancialSections/index.js +1 -1
- package/lib/plus/saleDetail/tmpl/B/components/Pay/index.js +1 -1
- package/lib/plus/{saleDetail → salesSdk}/utils/paymentStatus.js +1 -1
- package/package.json +4 -4
|
@@ -29,7 +29,7 @@ import { isIOS, isSafari, isWx } from "@pisell/utils";
|
|
|
29
29
|
})();
|
|
30
30
|
const getPaymentsAndWalletPass = function() {
|
|
31
31
|
var _ref2 = _asyncToGenerator(function* (values) {
|
|
32
|
-
let { data } = yield request.getRequest().
|
|
32
|
+
let { data } = yield request.getRequest().post("/h5/pay/order/payments-and-walletpass", values);
|
|
33
33
|
const walletPass = (data.payment_list || []).find((d) => d.service === "pisell.wallet_pass");
|
|
34
34
|
return _objectSpread2(_objectSpread2({}, data), {}, { walletPass });
|
|
35
35
|
});
|
|
@@ -2,7 +2,7 @@ import { _objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.122.0/hel
|
|
|
2
2
|
import useEngineContext from "../../hooks/useEngineContext.js";
|
|
3
3
|
import useInitLocalesOnce from "../../hooks/useInitLocalesOnce.js";
|
|
4
4
|
import { resolvePaymentMethodName, usePaymentMethodNameMap } from "../pisellSalesManagement/hooks/usePaymentMethodNameMap.js";
|
|
5
|
-
import { isAppliedPaymentRecord } from "../
|
|
5
|
+
import { isAppliedPaymentRecord } from "../salesSdk/utils/paymentStatus.js";
|
|
6
6
|
import localeTexts from "./locales.js";
|
|
7
7
|
import React, { useCallback, useMemo, useState } from "react";
|
|
8
8
|
import { formatAmount, locales } from "@pisell/utils";
|
|
@@ -2,6 +2,7 @@ import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/
|
|
|
2
2
|
import useEngineContext from "../../../hooks/useEngineContext.js";
|
|
3
3
|
import { createNoteApis } from "../serve.js";
|
|
4
4
|
import { resolvePaymentMethodName, usePaymentMethodNameMap } from "./usePaymentMethodNameMap.js";
|
|
5
|
+
import { isAppliedPaymentRecord } from "../../salesSdk/utils/paymentStatus.js";
|
|
5
6
|
import ClientName from "../../clientName/index.js";
|
|
6
7
|
import { PAYMENT_STATUS_COLOR_MAP, getPaymentStatusMap } from "../config/order.js";
|
|
7
8
|
import { BOOKING_STATUS_COLOR_MAP, getBookingHeaderLabels, getBookingPlatformMap, getBookingStatusMap, getFilterButtonList, getSortList } from "../config/booking.js";
|
|
@@ -312,7 +313,7 @@ const useBookingPerspective = (params, options) => {
|
|
|
312
313
|
align: "center",
|
|
313
314
|
render: (_, record) => {
|
|
314
315
|
const order = (record === null || record === void 0 ? void 0 : record.order) || {};
|
|
315
|
-
const payments = Array.isArray(order === null || order === void 0 ? void 0 : order.payments) ? order.payments : [];
|
|
316
|
+
const payments = Array.isArray(order === null || order === void 0 ? void 0 : order.payments) ? order.payments.filter(isAppliedPaymentRecord) : [];
|
|
316
317
|
if (payments.length === 0) return "-";
|
|
317
318
|
return /* @__PURE__ */ React.createElement("div", { style: {
|
|
318
319
|
display: "flex",
|
|
@@ -2,6 +2,7 @@ import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/
|
|
|
2
2
|
import useEngineContext from "../../../hooks/useEngineContext.js";
|
|
3
3
|
import { createNoteApis } from "../serve.js";
|
|
4
4
|
import { resolvePaymentMethodName, usePaymentMethodNameMap } from "./usePaymentMethodNameMap.js";
|
|
5
|
+
import { isAppliedPaymentRecord } from "../../salesSdk/utils/paymentStatus.js";
|
|
5
6
|
import ClientName from "../../clientName/index.js";
|
|
6
7
|
import { DELIVERY_TYPE_COLOR_MAP, FULFILLMENT_STATUS_COLOR_MAP, ORDER_STATUS_COLOR_MAP, PAYMENT_STATUS_COLOR_MAP, SHOP_SERVICE_TYPE_COLOR_MAP, getDeliveryTypeMap, getFilterButtonList, getOrderHeaderLabels, getOrderStatusMap, getPaymentStatusMap, getPlatformMap, getShippingStatusMap, getShopServiceTypeMap, getSortList } from "../config/order.js";
|
|
7
8
|
import { BUSINESS_COLOR_MAP, getBusinessLabelMap } from "../config/index.js";
|
|
@@ -443,7 +444,8 @@ const useOrderPerspective = (options) => {
|
|
|
443
444
|
width: 180,
|
|
444
445
|
align: "center",
|
|
445
446
|
render: (_, record) => {
|
|
446
|
-
const
|
|
447
|
+
const rawPayments = (record === null || record === void 0 ? void 0 : record.payments) || (record === null || record === void 0 ? void 0 : record.payment);
|
|
448
|
+
const payments = Array.isArray(rawPayments) ? rawPayments.filter(isAppliedPaymentRecord) : [];
|
|
447
449
|
if (payments.length === 0) return "-";
|
|
448
450
|
return /* @__PURE__ */ React.createElement("div", { style: {
|
|
449
451
|
display: "flex",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import useEngineContext from "../../../../hooks/useEngineContext.js";
|
|
2
2
|
import { formatTempOrderSettlementAmount } from "../../../multiCurrencySettlement/index.js";
|
|
3
3
|
import { resolvePaymentMethodName, usePaymentMethodNameMap } from "../../../pisellSalesManagement/hooks/usePaymentMethodNameMap.js";
|
|
4
|
-
import { isAppliedPaymentRecord } from "
|
|
4
|
+
import { isAppliedPaymentRecord } from "../../../salesSdk/utils/paymentStatus.js";
|
|
5
5
|
import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
|
|
6
6
|
import { useSalesSdkCart } from "../../../salesSdk/hooks/useSalesSdkCart.js";
|
|
7
7
|
import { useSalesSdkSummary } from "../../../salesSdk/hooks/useSalesSdkSummary.js";
|
|
@@ -3,7 +3,7 @@ import { _asyncToGenerator } from "../../../../../../_virtual/_@oxc-project_runt
|
|
|
3
3
|
import useEngineContext from "../../../../../../hooks/useEngineContext.js";
|
|
4
4
|
import { formatTempOrderSettlementAmount } from "../../../../../multiCurrencySettlement/index.js";
|
|
5
5
|
import { resolvePaymentMethodName, usePaymentMethodNameMap } from "../../../../../pisellSalesManagement/hooks/usePaymentMethodNameMap.js";
|
|
6
|
-
import { isAppliedPaymentRecord } from "
|
|
6
|
+
import { isAppliedPaymentRecord } from "../../../../../salesSdk/utils/paymentStatus.js";
|
|
7
7
|
import { EftposProvider, PaymentMode } from "../../../../../piPaymentUI/eftpos/contracts/index.js";
|
|
8
8
|
import { PiPaymentType } from "../../../../../piPaymentUI/contracts/index.js";
|
|
9
9
|
import PiPayment from "../../../../../piPaymentUI/PiPayment.js";
|
|
@@ -30,7 +30,7 @@ let _pisell_utils = require("@pisell/utils");
|
|
|
30
30
|
})();
|
|
31
31
|
const getPaymentsAndWalletPass = function() {
|
|
32
32
|
var _ref2 = require_asyncToGenerator._asyncToGenerator(function* (values) {
|
|
33
|
-
let { data } = yield require_index.request.getRequest().
|
|
33
|
+
let { data } = yield require_index.request.getRequest().post("/h5/pay/order/payments-and-walletpass", values);
|
|
34
34
|
const walletPass = (data.payment_list || []).find((d) => d.service === "pisell.wallet_pass");
|
|
35
35
|
return require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, data), {}, { walletPass });
|
|
36
36
|
});
|
|
@@ -3,7 +3,7 @@ const require_objectSpread2 = require("../../_virtual/_@oxc-project_runtime@0.12
|
|
|
3
3
|
const require_useEngineContext = require("../../hooks/useEngineContext.js");
|
|
4
4
|
const require_useInitLocalesOnce = require("../../hooks/useInitLocalesOnce.js");
|
|
5
5
|
const require_usePaymentMethodNameMap = require("../pisellSalesManagement/hooks/usePaymentMethodNameMap.js");
|
|
6
|
-
const require_paymentStatus = require("../
|
|
6
|
+
const require_paymentStatus = require("../salesSdk/utils/paymentStatus.js");
|
|
7
7
|
const require_locales = require("./locales.js");
|
|
8
8
|
let react = require("react");
|
|
9
9
|
react = require_runtime.__toESM(react);
|
|
@@ -3,6 +3,7 @@ const require_objectSpread2 = require("../../../_virtual/_@oxc-project_runtime@0
|
|
|
3
3
|
const require_useEngineContext = require("../../../hooks/useEngineContext.js");
|
|
4
4
|
const require_serve = require("../serve.js");
|
|
5
5
|
const require_usePaymentMethodNameMap = require("./usePaymentMethodNameMap.js");
|
|
6
|
+
const require_paymentStatus = require("../../salesSdk/utils/paymentStatus.js");
|
|
6
7
|
const require_index = require("../../clientName/index.js");
|
|
7
8
|
const require_order = require("../config/order.js");
|
|
8
9
|
const require_booking = require("../config/booking.js");
|
|
@@ -314,7 +315,7 @@ const useBookingPerspective = (params, options) => {
|
|
|
314
315
|
align: "center",
|
|
315
316
|
render: (_, record) => {
|
|
316
317
|
const order = (record === null || record === void 0 ? void 0 : record.order) || {};
|
|
317
|
-
const payments = Array.isArray(order === null || order === void 0 ? void 0 : order.payments) ? order.payments : [];
|
|
318
|
+
const payments = Array.isArray(order === null || order === void 0 ? void 0 : order.payments) ? order.payments.filter(require_paymentStatus.isAppliedPaymentRecord) : [];
|
|
318
319
|
if (payments.length === 0) return "-";
|
|
319
320
|
return /* @__PURE__ */ react.default.createElement("div", { style: {
|
|
320
321
|
display: "flex",
|
|
@@ -3,6 +3,7 @@ const require_objectSpread2 = require("../../../_virtual/_@oxc-project_runtime@0
|
|
|
3
3
|
const require_useEngineContext = require("../../../hooks/useEngineContext.js");
|
|
4
4
|
const require_serve = require("../serve.js");
|
|
5
5
|
const require_usePaymentMethodNameMap = require("./usePaymentMethodNameMap.js");
|
|
6
|
+
const require_paymentStatus = require("../../salesSdk/utils/paymentStatus.js");
|
|
6
7
|
const require_index = require("../../clientName/index.js");
|
|
7
8
|
const require_order = require("../config/order.js");
|
|
8
9
|
const require_index$1 = require("../config/index.js");
|
|
@@ -445,7 +446,8 @@ const useOrderPerspective = (options) => {
|
|
|
445
446
|
width: 180,
|
|
446
447
|
align: "center",
|
|
447
448
|
render: (_, record) => {
|
|
448
|
-
const
|
|
449
|
+
const rawPayments = (record === null || record === void 0 ? void 0 : record.payments) || (record === null || record === void 0 ? void 0 : record.payment);
|
|
450
|
+
const payments = Array.isArray(rawPayments) ? rawPayments.filter(require_paymentStatus.isAppliedPaymentRecord) : [];
|
|
449
451
|
if (payments.length === 0) return "-";
|
|
450
452
|
return /* @__PURE__ */ react.default.createElement("div", { style: {
|
|
451
453
|
display: "flex",
|
|
@@ -2,7 +2,7 @@ const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
|
|
|
2
2
|
const require_useEngineContext = require("../../../../hooks/useEngineContext.js");
|
|
3
3
|
const require_index = require("../../../multiCurrencySettlement/index.js");
|
|
4
4
|
const require_usePaymentMethodNameMap = require("../../../pisellSalesManagement/hooks/usePaymentMethodNameMap.js");
|
|
5
|
-
const require_paymentStatus = require("
|
|
5
|
+
const require_paymentStatus = require("../../../salesSdk/utils/paymentStatus.js");
|
|
6
6
|
const require_useSalesSdk = require("../../../salesSdk/hooks/useSalesSdk.js");
|
|
7
7
|
const require_useSalesSdkCart = require("../../../salesSdk/hooks/useSalesSdkCart.js");
|
|
8
8
|
const require_useSalesSdkSummary = require("../../../salesSdk/hooks/useSalesSdkSummary.js");
|
|
@@ -4,7 +4,7 @@ const require_asyncToGenerator = require("../../../../../../_virtual/_@oxc-proje
|
|
|
4
4
|
const require_useEngineContext = require("../../../../../../hooks/useEngineContext.js");
|
|
5
5
|
const require_index = require("../../../../../multiCurrencySettlement/index.js");
|
|
6
6
|
const require_usePaymentMethodNameMap = require("../../../../../pisellSalesManagement/hooks/usePaymentMethodNameMap.js");
|
|
7
|
-
const require_paymentStatus = require("
|
|
7
|
+
const require_paymentStatus = require("../../../../../salesSdk/utils/paymentStatus.js");
|
|
8
8
|
const require_index$1 = require("../../../../../piPaymentUI/eftpos/contracts/index.js");
|
|
9
9
|
const require_index$2 = require("../../../../../piPaymentUI/contracts/index.js");
|
|
10
10
|
const require_PiPayment = require("../../../../../piPaymentUI/PiPayment.js");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "6.12.
|
|
3
|
+
"version": "6.12.203",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -70,10 +70,10 @@
|
|
|
70
70
|
"styled-components": "^6.0.0-rc.3",
|
|
71
71
|
"use-sync-external-store": "^1.6.0",
|
|
72
72
|
"@pisell/pi-payment-sdk": "0.0.3",
|
|
73
|
-
"@pisell/
|
|
73
|
+
"@pisell/materials": "6.12.58",
|
|
74
74
|
"@pisell/icon": "0.0.11",
|
|
75
|
-
"@pisell/
|
|
76
|
-
"@pisell/
|
|
75
|
+
"@pisell/date-picker": "3.0.10",
|
|
76
|
+
"@pisell/utils": "3.0.4"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"react": "^18.0.0",
|