@pisell/pisellos 2.3.49 → 2.3.51
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/dist/modules/Discount/index.d.ts +1 -0
- package/dist/modules/Discount/index.js +40 -11
- package/dist/modules/Discount/types.d.ts +1 -0
- package/dist/modules/Holder/index.d.ts +48 -0
- package/dist/modules/Holder/index.js +640 -0
- package/dist/modules/Holder/types.d.ts +123 -0
- package/dist/modules/Holder/types.js +1 -0
- package/dist/modules/Holder/utils.d.ts +13 -0
- package/dist/modules/Holder/utils.js +34 -0
- package/dist/modules/OpenData/index.js +2 -2
- package/dist/modules/Order/index.d.ts +4 -2
- package/dist/modules/Order/index.js +54 -25
- package/dist/modules/Order/types.d.ts +9 -0
- package/dist/modules/Order/utils.d.ts +10 -0
- package/dist/modules/Order/utils.js +35 -3
- package/dist/modules/Product/types.d.ts +1 -0
- package/dist/modules/ProductList/index.js +33 -14
- package/dist/modules/Quotation/index.d.ts +1 -1
- package/dist/modules/Quotation/index.js +2 -2
- package/dist/modules/ResourcePlanner/index.d.ts +24 -0
- package/dist/modules/ResourcePlanner/index.js +181 -0
- package/dist/modules/ResourcePlanner/planner.d.ts +14 -0
- package/dist/modules/ResourcePlanner/planner.js +1069 -0
- package/dist/modules/ResourcePlanner/types.d.ts +227 -0
- package/dist/modules/ResourcePlanner/types.js +1 -0
- package/dist/modules/Rules/index.js +47 -13
- package/dist/modules/SalesSummary/index.js +12 -13
- package/dist/modules/ScanOrderLogger/index.d.ts +2 -0
- package/dist/modules/ScanOrderLogger/index.js +15 -2
- package/dist/modules/ScanOrderLogger/providers/feishu.js +45 -27
- package/dist/modules/ScanOrderLogger/types.d.ts +1 -0
- package/dist/modules/Schedule/index.d.ts +3 -1
- package/dist/modules/Schedule/index.js +21 -16
- package/dist/modules/Summary/utils.js +38 -13
- package/dist/modules/index.d.ts +2 -0
- package/dist/modules/index.js +3 -1
- package/dist/plugins/window.d.ts +1 -0
- package/dist/server/index.d.ts +14 -0
- package/dist/server/index.js +907 -793
- package/dist/solution/BaseSales/index.d.ts +7 -0
- package/dist/solution/BaseSales/index.js +64 -42
- package/dist/solution/BookingByStep/index.d.ts +17 -2
- package/dist/solution/BookingByStep/index.js +294 -215
- package/dist/solution/BookingByStep/types.d.ts +2 -1
- package/dist/solution/BookingByStep/types.js +3 -1
- package/dist/solution/BookingByStep/utils/capacity.js +17 -1
- package/dist/solution/BookingByStep/utils/timeslots.d.ts +3 -1
- package/dist/solution/BookingByStep/utils/timeslots.js +19 -12
- package/dist/solution/BookingTicket/index.js +2 -2
- package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts +3 -1
- package/dist/solution/BookingTicket/utils/scan/handleScan.js +10 -2
- package/dist/solution/ScanOrder/index.d.ts +26 -14
- package/dist/solution/ScanOrder/index.js +1142 -739
- package/dist/solution/ScanOrder/types.d.ts +21 -1
- package/dist/solution/ScanOrder/utils.d.ts +8 -0
- package/dist/solution/ScanOrder/utils.js +66 -25
- package/dist/solution/ShopDiscount/index.d.ts +1 -0
- package/dist/solution/ShopDiscount/index.js +125 -87
- package/dist/solution/UnifiedBookingSales/index.d.ts +183 -0
- package/dist/solution/UnifiedBookingSales/index.js +1891 -0
- package/dist/solution/UnifiedBookingSales/types.d.ts +143 -0
- package/dist/solution/UnifiedBookingSales/types.js +11 -0
- package/dist/solution/VenueBooking/index.d.ts +39 -11
- package/dist/solution/VenueBooking/index.js +1167 -841
- package/dist/solution/VenueBooking/types.d.ts +3 -0
- package/dist/solution/VenueBooking/utils/resource.js +1 -0
- package/dist/solution/VenueBooking/utils/slotMerge.d.ts +4 -4
- package/dist/solution/VenueBooking/utils/slotMerge.js +10 -5
- package/dist/solution/index.d.ts +1 -0
- package/dist/solution/index.js +2 -1
- package/dist/types/index.d.ts +1 -0
- package/lib/model/strategy/adapter/promotion/index.js +51 -0
- package/lib/modules/Discount/index.d.ts +1 -0
- package/lib/modules/Discount/index.js +9 -0
- package/lib/modules/Discount/types.d.ts +1 -0
- package/lib/modules/Holder/index.d.ts +48 -0
- package/lib/modules/Holder/index.js +402 -0
- package/lib/modules/Holder/types.d.ts +123 -0
- package/lib/modules/Holder/types.js +17 -0
- package/lib/modules/Holder/utils.d.ts +13 -0
- package/lib/modules/Holder/utils.js +71 -0
- package/lib/modules/OpenData/index.js +1 -1
- package/lib/modules/Order/index.d.ts +4 -2
- package/lib/modules/Order/index.js +26 -10
- package/lib/modules/Order/types.d.ts +9 -0
- package/lib/modules/Order/utils.d.ts +10 -0
- package/lib/modules/Order/utils.js +36 -5
- package/lib/modules/Product/types.d.ts +1 -0
- package/lib/modules/ProductList/index.js +40 -31
- package/lib/modules/Quotation/index.d.ts +1 -1
- package/lib/modules/Quotation/index.js +2 -2
- package/lib/modules/ResourcePlanner/index.d.ts +24 -0
- package/lib/modules/ResourcePlanner/index.js +148 -0
- package/lib/modules/ResourcePlanner/planner.d.ts +14 -0
- package/lib/modules/ResourcePlanner/planner.js +933 -0
- package/lib/modules/ResourcePlanner/types.d.ts +227 -0
- package/lib/modules/ResourcePlanner/types.js +17 -0
- package/lib/modules/Rules/index.js +33 -16
- package/lib/modules/SalesSummary/index.js +6 -7
- package/lib/modules/ScanOrderLogger/index.d.ts +2 -0
- package/lib/modules/ScanOrderLogger/index.js +13 -1
- package/lib/modules/ScanOrderLogger/providers/feishu.js +15 -6
- package/lib/modules/ScanOrderLogger/types.d.ts +1 -0
- package/lib/modules/Schedule/index.d.ts +3 -1
- package/lib/modules/Schedule/index.js +10 -8
- package/lib/modules/Summary/utils.js +21 -1
- package/lib/modules/index.d.ts +2 -0
- package/lib/modules/index.js +5 -1
- package/lib/plugins/window.d.ts +1 -0
- package/lib/server/index.d.ts +14 -0
- package/lib/server/index.js +72 -15
- package/lib/solution/BaseSales/index.d.ts +7 -0
- package/lib/solution/BaseSales/index.js +24 -8
- package/lib/solution/BookingByStep/index.d.ts +17 -2
- package/lib/solution/BookingByStep/index.js +60 -18
- package/lib/solution/BookingByStep/types.d.ts +2 -1
- package/lib/solution/BookingByStep/types.js +5 -0
- package/lib/solution/BookingByStep/utils/capacity.js +20 -1
- package/lib/solution/BookingByStep/utils/timeslots.d.ts +3 -1
- package/lib/solution/BookingByStep/utils/timeslots.js +19 -11
- package/lib/solution/BookingTicket/index.js +10 -2
- package/lib/solution/BookingTicket/utils/scan/handleScan.d.ts +3 -1
- package/lib/solution/BookingTicket/utils/scan/handleScan.js +2 -2
- package/lib/solution/ScanOrder/index.d.ts +26 -14
- package/lib/solution/ScanOrder/index.js +449 -182
- package/lib/solution/ScanOrder/types.d.ts +21 -1
- package/lib/solution/ScanOrder/utils.d.ts +8 -0
- package/lib/solution/ScanOrder/utils.js +31 -0
- package/lib/solution/ShopDiscount/index.d.ts +1 -0
- package/lib/solution/ShopDiscount/index.js +14 -0
- package/lib/solution/UnifiedBookingSales/index.d.ts +183 -0
- package/lib/solution/UnifiedBookingSales/index.js +1084 -0
- package/lib/solution/UnifiedBookingSales/types.d.ts +143 -0
- package/lib/solution/UnifiedBookingSales/types.js +33 -0
- package/lib/solution/VenueBooking/index.d.ts +39 -11
- package/lib/solution/VenueBooking/index.js +322 -110
- package/lib/solution/VenueBooking/types.d.ts +3 -0
- package/lib/solution/VenueBooking/utils/resource.js +1 -0
- package/lib/solution/VenueBooking/utils/slotMerge.d.ts +4 -4
- package/lib/solution/VenueBooking/utils/slotMerge.js +6 -4
- package/lib/solution/index.d.ts +1 -0
- package/lib/solution/index.js +3 -1
- package/lib/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import type { ResourcePlannerModule } from '../../modules';
|
|
2
|
+
import type { OpenDataConfig } from '../../modules/OpenData';
|
|
3
|
+
import type { ResourcePlannerAssignment, ResourcePlannerAssignableSlotResult, ResourcePlannerContextInput, ResourcePlannerProjection, ResourcePlannerQuery, ResourcePlannerSelectionPatch, ResourcePlannerSnapshot, ResourcePlannerValidationResult } from '../../modules/ResourcePlanner';
|
|
4
|
+
import type { ProductListLoadProductsParams } from '../../modules/ProductList';
|
|
5
|
+
import type { LoadScheduleAvailableDateParams } from '../../modules/Schedule/types';
|
|
6
|
+
import type { BookingTicketState } from '../BookingTicket/types';
|
|
7
|
+
export declare enum UnifiedBookingSalesHooks {
|
|
8
|
+
onPlannerContextLoaded = "unifiedBookingSales:onPlannerContextLoaded",
|
|
9
|
+
onPlannerCommitted = "unifiedBookingSales:onPlannerCommitted"
|
|
10
|
+
}
|
|
11
|
+
export interface UnifiedBookingSalesState extends BookingTicketState {
|
|
12
|
+
resourcePlanner: ResourcePlannerModule;
|
|
13
|
+
}
|
|
14
|
+
/** Explicit OpenData target used by page-level UnifiedBookingSales skins. */
|
|
15
|
+
export interface UnifiedBookingSalesLoadOpenDataParams {
|
|
16
|
+
businessCode: string;
|
|
17
|
+
channel: string;
|
|
18
|
+
/** Bypasses the target-scoped in-memory cache. */
|
|
19
|
+
force?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface UnifiedBookingSalesLoadPlannerContextParams extends ResourcePlannerQuery {
|
|
22
|
+
/** ProductList request options used only when products are not supplied as raw/context data. */
|
|
23
|
+
productLoadParams?: ProductListLoadProductsParams;
|
|
24
|
+
/** Escape hatch for tests or callers that already own raw ProductList records. */
|
|
25
|
+
rawProducts?: Record<string, any>[];
|
|
26
|
+
/** Escape hatch for tests or callers that already own raw resource records. */
|
|
27
|
+
rawResources?: Record<string, any>[];
|
|
28
|
+
/** Fully normalized Planner context; takes precedence over API loading for supplied fields. */
|
|
29
|
+
context?: ResourcePlannerContextInput;
|
|
30
|
+
/** Enables the v2 resource API + schedule materialization path. */
|
|
31
|
+
useResourceDateApi?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface UnifiedBookingSalesCommitPlannerSelectionParams {
|
|
34
|
+
/** Optional selection patch applied before validation and order mutation. */
|
|
35
|
+
selection?: ResourcePlannerSelectionPatch;
|
|
36
|
+
/** Directly supplies selected resource/time facts, usually from resolveAssignableSlots(). */
|
|
37
|
+
assignments?: ResourcePlannerAssignment[];
|
|
38
|
+
/** Defaults to false. True performs the real BaseSales / OrderModule submit after tempOrder is written. */
|
|
39
|
+
submitAfterCommit?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface UnifiedBookingSalesLoadProductsByScheduleDateParams extends Omit<ProductListLoadProductsParams, 'schedule_date' | 'product_ids'> {
|
|
42
|
+
/** The chosen calendar date, used for both availability lookup and ProductList schedule_date. */
|
|
43
|
+
date: string;
|
|
44
|
+
/** Optional caller-side filter applied after the availability result produces its product pool. */
|
|
45
|
+
product_ids?: number[];
|
|
46
|
+
/** Required by the availability API; this is not the low-code page id. */
|
|
47
|
+
custom_page_id?: number;
|
|
48
|
+
/** Availability API channel, commonly pc. ProductList keeps its own sales application channel. */
|
|
49
|
+
channel?: string;
|
|
50
|
+
}
|
|
51
|
+
export interface UnifiedBookingSalesStagePlannerProductsParams {
|
|
52
|
+
/** Products the customer selected before a time/resource booking exists. */
|
|
53
|
+
productIds: Array<number | string>;
|
|
54
|
+
productLoadParams?: ProductListLoadProductsParams;
|
|
55
|
+
rawProducts?: Record<string, any>[];
|
|
56
|
+
}
|
|
57
|
+
/** Ordinary retail product staging. No resource, time, or booking facts are required. */
|
|
58
|
+
export type UnifiedBookingSalesStageRetailProductsParams = UnifiedBookingSalesStagePlannerProductsParams;
|
|
59
|
+
/** Adds one ordinary retail product without replacing other retail lines already in the cart. */
|
|
60
|
+
export interface UnifiedBookingSalesAddRetailProductParams {
|
|
61
|
+
/** Prefer a supplied catalog record when the UI has already loaded it. */
|
|
62
|
+
product?: Record<string, any>;
|
|
63
|
+
/** Used to resolve a product from the current catalog or load it on demand. */
|
|
64
|
+
productId?: number | string;
|
|
65
|
+
/** Defaults to one. */
|
|
66
|
+
quantity?: number;
|
|
67
|
+
/** Only used when the product is not already present in the solution catalog. */
|
|
68
|
+
productLoadParams?: ProductListLoadProductsParams;
|
|
69
|
+
}
|
|
70
|
+
export interface UnifiedBookingSalesCommitResult {
|
|
71
|
+
tempOrder: Record<string, any> | null;
|
|
72
|
+
assignments: ResourcePlannerAssignment[];
|
|
73
|
+
validation: ResourcePlannerValidationResult;
|
|
74
|
+
submitResult?: unknown;
|
|
75
|
+
}
|
|
76
|
+
export interface UnifiedBookingSalesApplyPlannerDiscountsParams {
|
|
77
|
+
/** Customer whose cards/coupons should be loaded. Defaults to tempOrder.customer_id. */
|
|
78
|
+
customerId?: number | string;
|
|
79
|
+
/** Optional explicit card/coupon id. When provided, Rules applies this card instead of auto-picking another card. */
|
|
80
|
+
preferredDiscountId?: number | string;
|
|
81
|
+
/** Defaults to true: after loading eligible cards, let Rules choose the best valid combination. */
|
|
82
|
+
applyBestDiscount?: boolean;
|
|
83
|
+
}
|
|
84
|
+
export interface UnifiedBookingSalesDiscountItem {
|
|
85
|
+
id: number | string;
|
|
86
|
+
name?: string;
|
|
87
|
+
type?: string;
|
|
88
|
+
available: boolean;
|
|
89
|
+
selected: boolean;
|
|
90
|
+
savedAmount?: number;
|
|
91
|
+
unavailableReason?: string;
|
|
92
|
+
}
|
|
93
|
+
export interface UnifiedBookingSalesDiscountApplication {
|
|
94
|
+
discountId?: number | string;
|
|
95
|
+
discountName?: string;
|
|
96
|
+
discountType?: string;
|
|
97
|
+
productId?: number | string;
|
|
98
|
+
productTitle?: string;
|
|
99
|
+
productUid?: string;
|
|
100
|
+
amount: number;
|
|
101
|
+
}
|
|
102
|
+
export interface UnifiedBookingSalesDiscountResult {
|
|
103
|
+
status: 'applied' | 'loaded' | 'no_customer';
|
|
104
|
+
customerId: number | null;
|
|
105
|
+
preferredDiscountFound?: boolean;
|
|
106
|
+
/** True only when the requested card is both selected and written into a planner product line. */
|
|
107
|
+
preferredDiscountApplied?: boolean;
|
|
108
|
+
availableDiscounts: UnifiedBookingSalesDiscountItem[];
|
|
109
|
+
selectedDiscounts: UnifiedBookingSalesDiscountItem[];
|
|
110
|
+
applications: UnifiedBookingSalesDiscountApplication[];
|
|
111
|
+
summaryBefore?: unknown;
|
|
112
|
+
summaryAfter?: unknown;
|
|
113
|
+
}
|
|
114
|
+
export interface UnifiedBookingSalesApi {
|
|
115
|
+
/** Loads board OpenData for a concrete business + channel target. */
|
|
116
|
+
loadOpenData: (params: UnifiedBookingSalesLoadOpenDataParams) => Promise<OpenDataConfig>;
|
|
117
|
+
/** Returns the latest OpenData payload cached by this solution instance. */
|
|
118
|
+
getOpenData: () => OpenDataConfig | null;
|
|
119
|
+
/** Date-first calendar availability backed by ScheduleModule. */
|
|
120
|
+
loadScheduleAvailableDate: (params: LoadScheduleAvailableDateParams) => Promise<unknown>;
|
|
121
|
+
/** Date-first product pool derived from schedule date ids and globally sellable products. */
|
|
122
|
+
loadProductsByScheduleDate: (params: UnifiedBookingSalesLoadProductsByScheduleDateParams) => Promise<unknown[]>;
|
|
123
|
+
/** Adds product lines only; booking creation is intentionally deferred. */
|
|
124
|
+
stagePlannerProducts: (params: UnifiedBookingSalesStagePlannerProductsParams) => Promise<Record<string, any> | null>;
|
|
125
|
+
/** Adds ordinary product lines only. It never creates bookings or invokes ResourcePlanner. */
|
|
126
|
+
stageRetailProducts: (params: UnifiedBookingSalesStageRetailProductsParams) => Promise<Record<string, any> | null>;
|
|
127
|
+
/** Adds one ordinary retail line while preserving all existing cart lines. */
|
|
128
|
+
addRetailProduct: (params: UnifiedBookingSalesAddRetailProductParams) => Promise<Record<string, any>[]>;
|
|
129
|
+
/** Loads and normalizes all IO data needed for the pure ResourcePlanner. */
|
|
130
|
+
loadPlannerContext: (params?: UnifiedBookingSalesLoadPlannerContextParams) => Promise<ResourcePlannerSnapshot>;
|
|
131
|
+
/** Reads continuous availability cells and UI-oriented aggregates. */
|
|
132
|
+
queryPlannerAvailability: (query?: ResourcePlannerQuery) => Promise<ResourcePlannerProjection>;
|
|
133
|
+
/** Produces selectable slots and the assignments required to commit them. */
|
|
134
|
+
resolveAssignableSlots: (query?: ResourcePlannerQuery) => ResourcePlannerAssignableSlotResult;
|
|
135
|
+
setPlannerSelection: (patch: ResourcePlannerSelectionPatch) => ResourcePlannerSnapshot;
|
|
136
|
+
autoAssignPlanner: (query?: ResourcePlannerQuery) => Promise<ResourcePlannerSnapshot>;
|
|
137
|
+
validatePlannerSelection: () => ResourcePlannerValidationResult;
|
|
138
|
+
/** Validates, writes to tempOrder, and only optionally makes a real submit request. */
|
|
139
|
+
commitPlannerSelection: (params?: UnifiedBookingSalesCommitPlannerSelectionParams) => Promise<UnifiedBookingSalesCommitResult>;
|
|
140
|
+
/** Loads the current customer's cards/coupons, optionally applies the best one, and reports line applications. */
|
|
141
|
+
applyPlannerDiscounts: (params?: UnifiedBookingSalesApplyPlannerDiscountsParams) => Promise<UnifiedBookingSalesDiscountResult>;
|
|
142
|
+
getPlannerSnapshot: () => ResourcePlannerSnapshot;
|
|
143
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export var UnifiedBookingSalesHooks = /*#__PURE__*/function (UnifiedBookingSalesHooks) {
|
|
2
|
+
UnifiedBookingSalesHooks["onPlannerContextLoaded"] = "unifiedBookingSales:onPlannerContextLoaded";
|
|
3
|
+
UnifiedBookingSalesHooks["onPlannerCommitted"] = "unifiedBookingSales:onPlannerCommitted";
|
|
4
|
+
return UnifiedBookingSalesHooks;
|
|
5
|
+
}({});
|
|
6
|
+
|
|
7
|
+
/** Explicit OpenData target used by page-level UnifiedBookingSales skins. */
|
|
8
|
+
|
|
9
|
+
/** Ordinary retail product staging. No resource, time, or booking facts are required. */
|
|
10
|
+
|
|
11
|
+
/** Adds one ordinary retail product without replacing other retail lines already in the cart. */
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { Module, ModuleOptions, PisellCore } from '../../types';
|
|
2
|
-
import {
|
|
3
|
-
import { VenueBookingAddLogParams, VenueBookingSlotConfig, VenueDateSummaryItem, VenueSlotSelection, VenueTimeSlotGrid } from './types';
|
|
2
|
+
import { BaseSalesImpl } from '../BaseSales';
|
|
3
|
+
import { VenueBookingAddLogParams, VenueBookingSlotConfig, VenueBookingState, VenueDateSummaryItem, VenueSlotSelection, VenueTimeSlotGrid } from './types';
|
|
4
4
|
import type { ScanOrderOrderProduct, ScanOrderOrderProductIdentity } from '../ScanOrder/types';
|
|
5
5
|
import type { UpdateOrderProductParams } from '../../modules/Order/types';
|
|
6
6
|
import type { OpenDataAvailabilityResult } from '../../modules/OpenData';
|
|
7
|
+
import { RequestPlugin, WindowPlugin } from '../../plugins';
|
|
7
8
|
import type { ProductData } from '../../modules/Product/types';
|
|
8
9
|
import { type CartItemSummary, type PaxInfo, type QuantityCheckResult, type QuantityLimitResult } from '../../model/strategy/adapter/itemRule';
|
|
9
10
|
import type { StrategyConfig } from '../../model/strategy/type';
|
|
11
|
+
import type { IAppendFormRecordParams, IRefreshAllFormRecordsParams } from '../../modules/Holder/types';
|
|
10
12
|
export * from './types';
|
|
11
13
|
interface VenueBookingItemRuleRuntimeConfig {
|
|
12
14
|
strategyConfigs?: StrategyConfig[];
|
|
@@ -16,16 +18,16 @@ interface VenueBookingItemRuleRuntimeConfig {
|
|
|
16
18
|
submissionIndex?: number;
|
|
17
19
|
custom?: Record<string, any>;
|
|
18
20
|
}
|
|
19
|
-
export declare class VenueBookingImpl extends
|
|
21
|
+
export declare class VenueBookingImpl extends BaseSalesImpl implements Module {
|
|
20
22
|
protected defaultName: string;
|
|
21
23
|
protected defaultVersion: string;
|
|
22
24
|
isSolution: boolean;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
protected initializeOptions: ModuleOptions;
|
|
26
|
+
protected store: VenueBookingState;
|
|
27
|
+
protected otherParams: Record<string, any>;
|
|
28
|
+
protected cacheId: string | undefined;
|
|
29
|
+
window: WindowPlugin;
|
|
30
|
+
request: RequestPlugin;
|
|
29
31
|
private baseSlotConfig;
|
|
30
32
|
private itemRuleEvaluator;
|
|
31
33
|
private itemRuleConfigs;
|
|
@@ -50,8 +52,19 @@ export declare class VenueBookingImpl extends BaseModule implements Module {
|
|
|
50
52
|
private logMethodError;
|
|
51
53
|
addLog(params: VenueBookingAddLogParams): Promise<void>;
|
|
52
54
|
constructor(name?: string, version?: string);
|
|
55
|
+
protected getRegisteredModuleNames(): readonly string[];
|
|
56
|
+
protected createSubModule(moduleName: string): Module | null;
|
|
57
|
+
private attachProductOriginToTempOrder;
|
|
58
|
+
private readProductOriginFromTempOrder;
|
|
59
|
+
private normalizeVenueProductTitle;
|
|
53
60
|
private normalizeCustomerId;
|
|
54
61
|
private resolveCustomerIdFromLoginPayload;
|
|
62
|
+
private resolveHolderCustomerId;
|
|
63
|
+
/**
|
|
64
|
+
* 按商品 holder_config 预加载表单数据到 holderMap。
|
|
65
|
+
* appointment_booking 在加购时触发;venueBooking 在商品加载后预加载,避免 getHolderFormMap 为空。
|
|
66
|
+
*/
|
|
67
|
+
private preloadHolderForms;
|
|
55
68
|
private clearLoginEffectListeners;
|
|
56
69
|
private registerLoginEffect;
|
|
57
70
|
private registerCustomerLoginListeners;
|
|
@@ -144,8 +157,10 @@ export declare class VenueBookingImpl extends BaseModule implements Module {
|
|
|
144
157
|
getScheduleListByIds(ids: number[]): import("../../server").ScheduleItem[];
|
|
145
158
|
getTempOrder(): import("../../modules/Order/types").OrderTempOrder | null;
|
|
146
159
|
updateTempOrderNote(note: string): string;
|
|
160
|
+
updateTempOrderNote(note: string, sync: true): Promise<string>;
|
|
161
|
+
updateTempOrderNote(note: string, sync: boolean): string | Promise<string>;
|
|
147
162
|
updateTempOrderContactsInfo(contactsInfo: any[]): Record<string, any> | null;
|
|
148
|
-
private
|
|
163
|
+
private ensureVenueTempOrder;
|
|
149
164
|
onCustomerLogin(params: {
|
|
150
165
|
customerId: number;
|
|
151
166
|
}): Promise<void>;
|
|
@@ -165,7 +180,7 @@ export declare class VenueBookingImpl extends BaseModule implements Module {
|
|
|
165
180
|
setDiscountSelected(params: {
|
|
166
181
|
discountId: number;
|
|
167
182
|
isSelected: boolean;
|
|
168
|
-
}): Promise<
|
|
183
|
+
}): Promise<any>;
|
|
169
184
|
addNewOrder(): Promise<import("../../modules/Order/types").OrderTempOrder>;
|
|
170
185
|
getOrderProducts(): import("../../modules/Order/types").OrderProduct[];
|
|
171
186
|
getSummary(): Promise<import("../../modules/Order/types").OrderSummary>;
|
|
@@ -195,6 +210,19 @@ export declare class VenueBookingImpl extends BaseModule implements Module {
|
|
|
195
210
|
setUIState(key: string, value: any): void;
|
|
196
211
|
getUIState<T = any>(key: string): T | undefined;
|
|
197
212
|
deleteUIState(key: string): void;
|
|
213
|
+
setBookingHolder(bookingUid: string, holder: any): void;
|
|
214
|
+
/**
|
|
215
|
+
* 获取 holder 表单 map
|
|
216
|
+
*/
|
|
217
|
+
getHolderFormMap(): import("../../modules/Holder").HolderFormMap;
|
|
218
|
+
/**
|
|
219
|
+
* UI 层触发:按当前 holderMap 批量刷新所有表单的 records
|
|
220
|
+
*/
|
|
221
|
+
refreshAllHolderFormRecords(params?: Pick<IRefreshAllFormRecordsParams, 'customer_id' | 'useCache' | 'recordsUrl' | 'num' | 'skip'>): Promise<import("../../modules/Holder").HolderFormMap>;
|
|
222
|
+
/**
|
|
223
|
+
* 添加表单记录
|
|
224
|
+
*/
|
|
225
|
+
appendFormRecord(params: IAppendFormRecordParams): import("../../modules/Holder").IFormRecord;
|
|
198
226
|
checkOpenDataAvailability(): Promise<OpenDataAvailabilityResult>;
|
|
199
227
|
setOtherParams(params: Record<string, any>, { cover }?: {
|
|
200
228
|
cover?: boolean;
|