@pisell/private-materials 6.11.161 → 6.11.162

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.
@@ -34,6 +34,7 @@ import useEngineContext from "../../hooks/useEngineContext";
34
34
  import PassList from "./components/passList";
35
35
  import PassDetail from "./components/passDetail";
36
36
  import TempHolderSelector from "../../components/walletList/tempHolderSelector";
37
+ import { ticketBookingInitialState } from "../../components/ticketBooking";
37
38
  import "./index.less";
38
39
  var Title = Typography.Title;
39
40
  var KEYS = {
@@ -354,14 +355,31 @@ var WalletPassGallery = function WalletPassGallery(props) {
354
355
  };
355
356
  var handleAddClick = function handleAddClick() {
356
357
  if (isWebPos) {
357
- var createModeConfig = {
358
+ var _customer$id;
359
+ var shouldPrefillClient = customer && customer.id;
360
+ var createModeConfig = _objectSpread({
358
361
  bookingConfigParams: {
359
362
  item_type: 'appointment_booking',
360
363
  sub_type: 'food',
361
364
  source_type: 'pos'
362
365
  },
363
366
  productDisplayConfig: 'sku-list-a5'
364
- };
367
+ }, shouldPrefillClient ? {
368
+ initialModalState: {
369
+ client: _objectSpread(_objectSpread({}, ticketBookingInitialState.modalState.client), {}, {
370
+ value: _objectSpread(_objectSpread({}, customer), {}, {
371
+ name: String((customer === null || customer === void 0 ? void 0 : customer.display_name) || '').trim() || String((customer === null || customer === void 0 ? void 0 : customer.nickname) || '').trim() || String((customer === null || customer === void 0 ? void 0 : customer.name) || '').trim() || '',
372
+ display_name: (customer === null || customer === void 0 ? void 0 : customer.display_name) || (customer === null || customer === void 0 ? void 0 : customer.name) || '',
373
+ id: (_customer$id = customer === null || customer === void 0 ? void 0 : customer.id) !== null && _customer$id !== void 0 ? _customer$id : customer === null || customer === void 0 ? void 0 : customer.customer_id,
374
+ email: customer === null || customer === void 0 ? void 0 : customer.email,
375
+ phone: (customer === null || customer === void 0 ? void 0 : customer.phone) || '',
376
+ country_calling_code: (customer === null || customer === void 0 ? void 0 : customer.country_calling_code) || '',
377
+ cover: (customer === null || customer === void 0 ? void 0 : customer.cover) || ''
378
+ }),
379
+ edit: true
380
+ })
381
+ }
382
+ } : {});
365
383
  action === null || action === void 0 || action({
366
384
  type: 'pisell1.handleOpenEditBooking',
367
385
  data: {
@@ -45,6 +45,7 @@ var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
45
45
  var import_passList = __toESM(require("./components/passList"));
46
46
  var import_passDetail = __toESM(require("./components/passDetail"));
47
47
  var import_tempHolderSelector = __toESM(require("../../components/walletList/tempHolderSelector"));
48
+ var import_ticketBooking = require("../../components/ticketBooking");
48
49
  var import_index = require("./index.less");
49
50
  var { Title } = import_antd.Typography;
50
51
  var KEYS = {
@@ -301,13 +302,32 @@ var WalletPassGallery = (props) => {
301
302
  const handleAddClick = () => {
302
303
  var _a2, _b2;
303
304
  if (isWebPos) {
305
+ const shouldPrefillClient = customer && customer.id;
304
306
  const createModeConfig = {
305
307
  bookingConfigParams: {
306
308
  item_type: "appointment_booking",
307
309
  sub_type: "food",
308
310
  source_type: "pos"
309
311
  },
310
- productDisplayConfig: "sku-list-a5"
312
+ productDisplayConfig: "sku-list-a5",
313
+ ...shouldPrefillClient ? {
314
+ initialModalState: {
315
+ client: {
316
+ ...import_ticketBooking.ticketBookingInitialState.modalState.client,
317
+ value: {
318
+ ...customer,
319
+ name: String((customer == null ? void 0 : customer.display_name) || "").trim() || String((customer == null ? void 0 : customer.nickname) || "").trim() || String((customer == null ? void 0 : customer.name) || "").trim() || "",
320
+ display_name: (customer == null ? void 0 : customer.display_name) || (customer == null ? void 0 : customer.name) || "",
321
+ id: (customer == null ? void 0 : customer.id) ?? (customer == null ? void 0 : customer.customer_id),
322
+ email: customer == null ? void 0 : customer.email,
323
+ phone: (customer == null ? void 0 : customer.phone) || "",
324
+ country_calling_code: (customer == null ? void 0 : customer.country_calling_code) || "",
325
+ cover: (customer == null ? void 0 : customer.cover) || ""
326
+ },
327
+ edit: true
328
+ }
329
+ }
330
+ } : {}
311
331
  };
312
332
  action == null ? void 0 : action({
313
333
  type: "pisell1.handleOpenEditBooking",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.11.161",
3
+ "version": "6.11.162",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -1,11 +0,0 @@
1
- import type { RecordBoardResourceWallCardModel } from '@pisell/materials';
2
- import type { PisellReservationTableRow } from '../types';
3
- /**
4
- * 合并桌位行 → 大屏资源墙卡片(首版:与平面图/列表展示字段对齐,灯控等可后续接接口)。
5
- *
6
- * **整分钟边界**:状态切换按「日程写在 HH:mm 的整分」对齐——例如结束 9:00 时 9:00 整段仍非 overtime,
7
- * 从 9:01 起 expired;开始 8:00 时 8:00 整段仍 boardingSoon,从 8:01 起 late(见 floorRoomCardUtils 同名工具)。
8
- *
9
- * **大屏 Current / Next**:仅按预约起止时间与当前时刻划分,不用接口 `is_next` / `isNext`。
10
- */
11
- export declare function mapReservationRowsToVenueWallCards(rows: PisellReservationTableRow[]): RecordBoardResourceWallCardModel[];
@@ -1,11 +0,0 @@
1
- import type { RecordBoardResourceWallCardModel } from '@pisell/materials';
2
- import type { PisellReservationTableRow } from '../types';
3
- /**
4
- * 合并桌位行 → 大屏资源墙卡片(首版:与平面图/列表展示字段对齐,灯控等可后续接接口)。
5
- *
6
- * **整分钟边界**:状态切换按「日程写在 HH:mm 的整分」对齐——例如结束 9:00 时 9:00 整段仍非 overtime,
7
- * 从 9:01 起 expired;开始 8:00 时 8:00 整段仍 boardingSoon,从 8:01 起 late(见 floorRoomCardUtils 同名工具)。
8
- *
9
- * **大屏 Current / Next**:仅按预约起止时间与当前时刻划分,不用接口 `is_next` / `isNext`。
10
- */
11
- export declare function mapReservationRowsToVenueWallCards(rows: PisellReservationTableRow[]): RecordBoardResourceWallCardModel[];