@pisell/private-materials 6.3.226 → 6.3.227

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.
@@ -43,7 +43,7 @@ const KEYS = {
43
43
  const ARow = antd.Row;
44
44
  const ACol = antd.Col;
45
45
  const WalletPassGallery = (props) => {
46
- var _context$appHelper, _context$appHelper2, _context$engine, _utils$translation, _getWalletDetail$data, _utils$isApp, _interaction$utils3, _interaction$utils3$i, _utils$translation2, _getWalletDetail$data2;
46
+ var _context$appHelper, _context$appHelper2, _utils$businessUtils, _utils$businessUtils$, _context$engine, _utils$translation, _getWalletDetail$data, _utils$isApp, _interaction$utils3, _interaction$utils3$i, _utils$translation2, _getWalletDetail$data2;
47
47
  const { hideAddButton, hideTitle, customer, platform: platformProp } = props;
48
48
  const [activeKey, setActiveKey] = (0, react.useState)("available");
49
49
  const [currentItemId, setCurrentItemId] = (0, react.useState)(void 0);
@@ -54,6 +54,7 @@ const WalletPassGallery = (props) => {
54
54
  const context = require_useEngineContext.default();
55
55
  const utils = (context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {};
56
56
  const { apiPrefix } = ((_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.constants) || { apiPrefix: "/h5" };
57
+ const includeFranchiseePasses = Boolean((_utils$businessUtils = utils.businessUtils) === null || _utils$businessUtils === void 0 || (_utils$businessUtils$ = _utils$businessUtils.getAppByModal) === null || _utils$businessUtils$ === void 0 ? void 0 : _utils$businessUtils$.call(_utils$businessUtils, "franchisor"));
57
58
  const { isTerminal, isApp, interaction } = utils;
58
59
  const isTerminalEnv = (typeof isTerminal === "function" ? isTerminal() : !!isTerminal) || (isApp === null || isApp === void 0 ? void 0 : isApp());
59
60
  const platform = (0, react.useMemo)(() => {
@@ -79,7 +80,8 @@ const WalletPassGallery = (props) => {
79
80
  filter_holder_id: holderId || void 0,
80
81
  with: ["customScheduleSnapshot", "holder.detail"],
81
82
  customer_id: customer === null || customer === void 0 ? void 0 : customer.id,
82
- limit_status: "enable"
83
+ limit_status: "enable",
84
+ include_franchisee_passes: includeFranchiseePasses ? 1 : void 0
83
85
  }, { apiPrefix });
84
86
  return {
85
87
  list: (res === null || res === void 0 ? void 0 : res.list) || [],
@@ -112,7 +114,8 @@ const WalletPassGallery = (props) => {
112
114
  filter_holder_id: holderId || void 0,
113
115
  with: ["customScheduleSnapshot", "holder.detail"],
114
116
  customer_id: customer === null || customer === void 0 ? void 0 : customer.id,
115
- limit_status: "enable"
117
+ limit_status: "enable",
118
+ include_franchisee_passes: includeFranchiseePasses ? 1 : void 0
116
119
  }, { apiPrefix });
117
120
  return {
118
121
  list: (res === null || res === void 0 ? void 0 : res.list) || [],
@@ -192,7 +195,11 @@ const WalletPassGallery = (props) => {
192
195
  }
193
196
  }
194
197
  });
195
- }, [customer]);
198
+ }, [
199
+ customer,
200
+ apiPrefix,
201
+ includeFranchiseePasses
202
+ ]);
196
203
  (0, react.useEffect)(() => {
197
204
  var _interaction$utils, _interaction$utils$mo;
198
205
  interaction === null || interaction === void 0 || (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 || (_interaction$utils$mo = _interaction$utils.mountFunction) === null || _interaction$utils$mo === void 0 || _interaction$utils$mo.call(_interaction$utils, "customer", "new", () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.3.226",
3
+ "version": "6.3.227",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -82,8 +82,8 @@
82
82
  "react-zoom-pan-pinch": "^3.7.0",
83
83
  "styled-components": "^6.0.0-rc.3",
84
84
  "@pisell/utils": "3.0.5",
85
- "@pisell/icon": "0.0.11",
86
85
  "@pisell/materials": "6.3.52",
86
+ "@pisell/icon": "0.0.11",
87
87
  "@pisell/date-picker": "3.0.8"
88
88
  },
89
89
  "peerDependencies": {