vhobjects-user 1.0.4 → 1.0.5
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/fesm2015/vhobjects-user.js +1 -1
- package/fesm2015/vhobjects-user.js.map +1 -1
- package/lib/frames/frame-repeat/user/frame-repeat/frame-repeat.component.d.ts +2 -1
- package/lib/objects/form/button-send-contact/user/send-contact/send-contact.component.d.ts +13 -1
- package/lib/objects/hotel/booking-flow/user/add-ons/booking-flow-add-ons.component.d.ts +60 -0
- package/lib/objects/hotel/booking-flow/user/booking-flow-content.constants.d.ts +5 -0
- package/lib/objects/hotel/booking-flow/user/booking-flow-sample-data.d.ts +128 -0
- package/lib/objects/hotel/booking-flow/user/booking-flow.component.d.ts +162 -0
- package/lib/objects/hotel/booking-flow/user/booking-flow.models.d.ts +5 -0
- package/lib/objects/hotel/booking-flow/user/booking-flow.module.d.ts +16 -0
- package/lib/objects/hotel/booking-flow/user/booking-flow.service.d.ts +111 -0
- package/lib/objects/hotel/booking-flow/user/choose-room/booking-flow-choose-room.component.d.ts +87 -0
- package/lib/objects/hotel/booking-flow/user/payment/booking-flow-payment.component.d.ts +42 -0
- package/lib/objects/hotel/booking-flow/user/summary/booking-flow-summary.component.d.ts +76 -0
- package/lib/objects/hotel/booking-hotel-manage/user/booking-detail/booking-hotel-manage-booking-detail.component.d.ts +65 -0
- package/lib/objects/hotel/booking-hotel-manage/user/booking-hotel-manage.component.d.ts +66 -0
- package/lib/objects/hotel/booking-hotel-manage/user/booking-hotel-manage.module.d.ts +17 -0
- package/lib/objects/hotel/booking-hotel-manage/user/bookings/booking-hotel-manage-bookings.component.d.ts +39 -0
- package/lib/objects/hotel/booking-hotel-manage/user/personal/booking-hotel-manage-personal.component.d.ts +44 -0
- package/lib/objects/hotel/booking-hotel-manage/user/refund-detail/booking-hotel-manage-refund-detail.component.d.ts +16 -0
- package/lib/objects/hotel/booking-hotel-manage/user/refund-requests/booking-hotel-manage-refund-requests.component.d.ts +17 -0
- package/lib/objects/hotel/booking-selector/user/booking-selector.component.d.ts +80 -0
- package/lib/objects/hotel/btn-booking/user/btn-booking.component.d.ts +78 -0
- package/lib/objects/review/user/review/review.component.d.ts +55 -6
- package/lib/vhautoweb-objects.module.d.ts +32 -28
- package/package.json +1 -1
- package/public-api.d.ts +4 -0
- package/services/cart.service.d.ts +12 -1
|
@@ -91,7 +91,8 @@ export declare class AtwFrameRepeat implements OnInit {
|
|
|
91
91
|
showToolBarObject: (event: any) => void;
|
|
92
92
|
};
|
|
93
93
|
ngOnChange(): void;
|
|
94
|
-
getDetailObject(): void
|
|
94
|
+
getDetailObject(): Promise<void>;
|
|
95
|
+
private fetchDataList;
|
|
95
96
|
private setHeight;
|
|
96
97
|
private checkResizeOffset;
|
|
97
98
|
/** Hàm này trả về một chuỗi để chia layout cho grid
|
|
@@ -4,8 +4,10 @@ import { MatDialog } from '@angular/material/dialog';
|
|
|
4
4
|
import { LanguageService } from 'vhobjects-service/src/services';
|
|
5
5
|
import { FunctionService } from 'vhobjects-service/src/services';
|
|
6
6
|
import { Subscription } from 'rxjs';
|
|
7
|
+
import { HttpClient } from '@angular/common/http';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class AtwSendContact implements OnInit {
|
|
10
|
+
private http;
|
|
9
11
|
private vhQueryAutoWeb;
|
|
10
12
|
functionService: FunctionService;
|
|
11
13
|
private vhEventMediator;
|
|
@@ -31,7 +33,7 @@ export declare class AtwSendContact implements OnInit {
|
|
|
31
33
|
languageChangedSubscription: any;
|
|
32
34
|
observer: IntersectionObserver;
|
|
33
35
|
subscription: Subscription;
|
|
34
|
-
constructor(vhQueryAutoWeb: VhQueryAutoWeb, functionService: FunctionService, vhEventMediator: VhEventMediator, languageService: LanguageService, matDialog: MatDialog, element: ElementRef, // Dùng cho hàm setAnimationVisible trong functionService
|
|
36
|
+
constructor(http: HttpClient, vhQueryAutoWeb: VhQueryAutoWeb, functionService: FunctionService, vhEventMediator: VhEventMediator, languageService: LanguageService, matDialog: MatDialog, element: ElementRef, // Dùng cho hàm setAnimationVisible trong functionService
|
|
35
37
|
platformId: Object);
|
|
36
38
|
ngOnInit(): void;
|
|
37
39
|
ngAfterViewInit(): void;
|
|
@@ -50,6 +52,16 @@ export declare class AtwSendContact implements OnInit {
|
|
|
50
52
|
formatDate(date: string, type: string | 'dd/mm/yyyy' | 'mm/dd/yyyy' | 'yyyy/mm/dd'): string;
|
|
51
53
|
formatNumber(date: string): string;
|
|
52
54
|
handleClick(): void;
|
|
55
|
+
private checkParentIsFrameDetail;
|
|
56
|
+
/**
|
|
57
|
+
* Send new-contact notification to Zalo
|
|
58
|
+
*/
|
|
59
|
+
private sendZaloContactNotification;
|
|
60
|
+
private encryptToken;
|
|
61
|
+
/**
|
|
62
|
+
* Build message sent to Zalo
|
|
63
|
+
*/
|
|
64
|
+
private buildZaloContactMessage;
|
|
53
65
|
static ɵfac: i0.ɵɵFactoryDeclaration<AtwSendContact, never>;
|
|
54
66
|
static ɵcmp: i0.ɵɵComponentDeclaration<AtwSendContact, "atw-app-send-contact", never, { "product": "product"; "data": "data"; "type": "type"; "device": "device"; "id_subproject": "id_subproject"; }, { "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; }, never, never>;
|
|
55
67
|
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { BookingFlowStyleMap } from '../booking-flow.models';
|
|
3
|
+
import { FunctionService } from 'vhobjects-service/src/services';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class AtwBookingFlowAddOns implements OnChanges {
|
|
6
|
+
functionService: FunctionService;
|
|
7
|
+
selectedRooms: any[];
|
|
8
|
+
addOns: any[];
|
|
9
|
+
data: any;
|
|
10
|
+
device: any;
|
|
11
|
+
formatCurrency: (value: number) => string;
|
|
12
|
+
back: EventEmitter<void>;
|
|
13
|
+
selectedAddOnsByRoom: {
|
|
14
|
+
[roomIndex: number]: string[];
|
|
15
|
+
};
|
|
16
|
+
selectedAddOnOptionsByRoom: {
|
|
17
|
+
[roomIndex: number]: {
|
|
18
|
+
[addOnId: string]: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
activeRoomIndex: number;
|
|
22
|
+
addOnToggled: EventEmitter<{
|
|
23
|
+
roomIndex: number;
|
|
24
|
+
addOnId: string;
|
|
25
|
+
selectedOption?: string;
|
|
26
|
+
}>;
|
|
27
|
+
addOnOptionSelected: EventEmitter<{
|
|
28
|
+
roomIndex: number;
|
|
29
|
+
addOnId: string;
|
|
30
|
+
optionId: string;
|
|
31
|
+
}>;
|
|
32
|
+
roomChanged: EventEmitter<number>;
|
|
33
|
+
class: BookingFlowStyleMap;
|
|
34
|
+
expandedRooms: Set<number>;
|
|
35
|
+
staticdata: any;
|
|
36
|
+
constructor(functionService: FunctionService);
|
|
37
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
38
|
+
expandAllRooms(): void;
|
|
39
|
+
toggleRoom(index: number): void;
|
|
40
|
+
isExpanded(index: number): boolean;
|
|
41
|
+
getRoomLabel(index: number): string;
|
|
42
|
+
getRoomInfo(room: any): string;
|
|
43
|
+
getAddOnImage(addOn: any): string;
|
|
44
|
+
getAddOnPrice(addOn: any): number;
|
|
45
|
+
getSelectedAddOnPrice(addOn: any, roomIndex: number): number;
|
|
46
|
+
toggleAddOn(addOn: any, roomIndex: number): void;
|
|
47
|
+
isAddOnSelected(addOn: any, roomIndex: number): boolean;
|
|
48
|
+
getAddOnsForRoom(room: any): any[];
|
|
49
|
+
hasAdvancedOptions(addOn: any): boolean;
|
|
50
|
+
getSelectedOption(addOn: any, roomIndex: number): string | null;
|
|
51
|
+
selectOption(addOn: any, roomIndex: number, optionId: string): void;
|
|
52
|
+
goBack(): void;
|
|
53
|
+
getAddOnCardStyle(isSelected: boolean): import("../booking-flow.models").BookingFlowStyleBucket;
|
|
54
|
+
trackByAddOnId(_: number, addOn: any): any;
|
|
55
|
+
trackByRoom(_: number, room: any): any;
|
|
56
|
+
private loadStyles;
|
|
57
|
+
getLocalizedText(obj: any, field?: string): string;
|
|
58
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AtwBookingFlowAddOns, never>;
|
|
59
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AtwBookingFlowAddOns, "atw-booking-flow-add-ons", never, { "selectedRooms": "selectedRooms"; "addOns": "addOns"; "data": "data"; "device": "device"; "formatCurrency": "formatCurrency"; "selectedAddOnsByRoom": "selectedAddOnsByRoom"; "selectedAddOnOptionsByRoom": "selectedAddOnOptionsByRoom"; "activeRoomIndex": "activeRoomIndex"; }, { "back": "back"; "addOnToggled": "addOnToggled"; "addOnOptionSelected": "addOnOptionSelected"; "roomChanged": "roomChanged"; }, never, never>;
|
|
60
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Menu entries for the "expand config" side panel */
|
|
2
|
+
export declare const STYLES_FIELD: any[];
|
|
3
|
+
/** Translatable text fields for each step of the booking flow, grouped by section */
|
|
4
|
+
export declare const CONTENT_SECTIONS: any[];
|
|
5
|
+
export declare const BOOKING_FLOW_LINK_SLOTS: any[];
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
export declare const BOOKING_FLOW_SAMPLE_DATA: {
|
|
2
|
+
hotelId: string;
|
|
3
|
+
arrivalDate: string;
|
|
4
|
+
lengthOfStay: number;
|
|
5
|
+
roomOccupancy: {
|
|
6
|
+
adults: number;
|
|
7
|
+
children: number;
|
|
8
|
+
}[];
|
|
9
|
+
hotelName: string;
|
|
10
|
+
rooms: {
|
|
11
|
+
_id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
name_en: string;
|
|
14
|
+
hotelName: string;
|
|
15
|
+
description: string;
|
|
16
|
+
description_en: string;
|
|
17
|
+
webapp_description: string;
|
|
18
|
+
webapp_description_en: string;
|
|
19
|
+
imgs: string[];
|
|
20
|
+
max_guests: number;
|
|
21
|
+
area: string;
|
|
22
|
+
features: any[];
|
|
23
|
+
additional_facilities: string[];
|
|
24
|
+
service_rooms: {
|
|
25
|
+
service_id: string;
|
|
26
|
+
auto_add: boolean;
|
|
27
|
+
}[];
|
|
28
|
+
price: number;
|
|
29
|
+
price_tax_excl: number;
|
|
30
|
+
price_tax_incl: number;
|
|
31
|
+
room_unit_price: number;
|
|
32
|
+
room_total_tax_excl: number;
|
|
33
|
+
room_total_tax_incl: number;
|
|
34
|
+
room_total_tax: number;
|
|
35
|
+
total_convenience_fee: number;
|
|
36
|
+
total_convenience_fee_te: number;
|
|
37
|
+
total_convenience_fee_ti: number;
|
|
38
|
+
total_price: number;
|
|
39
|
+
total_price_tax_excl: number;
|
|
40
|
+
total_price_tax_incl: number;
|
|
41
|
+
total_price_tax: number;
|
|
42
|
+
availableCount: number;
|
|
43
|
+
availableRooms: {
|
|
44
|
+
_id: string;
|
|
45
|
+
room_number: string;
|
|
46
|
+
floor: number;
|
|
47
|
+
}[];
|
|
48
|
+
nightly_prices: {
|
|
49
|
+
room_total_tax_excl: number;
|
|
50
|
+
room_total_tax_incl: number;
|
|
51
|
+
total_tax_excl: number;
|
|
52
|
+
total_tax_incl: number;
|
|
53
|
+
applied_services: {
|
|
54
|
+
type: string;
|
|
55
|
+
service_id: string;
|
|
56
|
+
id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
name_en: string;
|
|
59
|
+
price_tax_excl: number;
|
|
60
|
+
price_tax_incl: number;
|
|
61
|
+
price_display: string;
|
|
62
|
+
}[];
|
|
63
|
+
}[];
|
|
64
|
+
pricing_breakdown: {
|
|
65
|
+
room_total_tax_excl: number;
|
|
66
|
+
room_total_tax_incl: number;
|
|
67
|
+
room_total_tax: number;
|
|
68
|
+
extra_service_total_tax_excl: number;
|
|
69
|
+
extra_service_total_tax_incl: number;
|
|
70
|
+
extra_service_total_tax: number;
|
|
71
|
+
services_total_tax_excl: number;
|
|
72
|
+
services_total_tax_incl: number;
|
|
73
|
+
convenience_fee_total_tax_excl: number;
|
|
74
|
+
convenience_fee_total_tax_incl: number;
|
|
75
|
+
total_tax_excl: number;
|
|
76
|
+
total_tax_incl: number;
|
|
77
|
+
total_tax: number;
|
|
78
|
+
};
|
|
79
|
+
room_pricing_total_tax_excl: number;
|
|
80
|
+
room_pricing_total_tax_incl: number;
|
|
81
|
+
}[];
|
|
82
|
+
addOns: ({
|
|
83
|
+
_id: string;
|
|
84
|
+
id: string;
|
|
85
|
+
type: string;
|
|
86
|
+
name: string;
|
|
87
|
+
name_en: string;
|
|
88
|
+
imgs: string[];
|
|
89
|
+
image: string;
|
|
90
|
+
price: number;
|
|
91
|
+
active_adv_option: boolean;
|
|
92
|
+
adv_option: {
|
|
93
|
+
id_option: string;
|
|
94
|
+
name: string;
|
|
95
|
+
name_en: string;
|
|
96
|
+
price: number;
|
|
97
|
+
}[];
|
|
98
|
+
img?: undefined;
|
|
99
|
+
auto_add?: undefined;
|
|
100
|
+
} | {
|
|
101
|
+
_id: string;
|
|
102
|
+
id: string;
|
|
103
|
+
type: string;
|
|
104
|
+
name: string;
|
|
105
|
+
name_en: string;
|
|
106
|
+
img: string;
|
|
107
|
+
image: string;
|
|
108
|
+
price: number;
|
|
109
|
+
imgs?: undefined;
|
|
110
|
+
active_adv_option?: undefined;
|
|
111
|
+
adv_option?: undefined;
|
|
112
|
+
auto_add?: undefined;
|
|
113
|
+
} | {
|
|
114
|
+
_id: string;
|
|
115
|
+
id: string;
|
|
116
|
+
type: string;
|
|
117
|
+
name: string;
|
|
118
|
+
name_en: string;
|
|
119
|
+
img: string;
|
|
120
|
+
image: string;
|
|
121
|
+
price: number;
|
|
122
|
+
auto_add: boolean;
|
|
123
|
+
imgs?: undefined;
|
|
124
|
+
active_adv_option?: undefined;
|
|
125
|
+
adv_option?: undefined;
|
|
126
|
+
})[];
|
|
127
|
+
};
|
|
128
|
+
export declare function getSampleDepartureDate(arrival: string, nights: number): string;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter } from '@angular/core';
|
|
2
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
+
import { BookingStep } from './booking-flow.models';
|
|
4
|
+
import { NzMessageService } from 'ng-zorro-antd/message';
|
|
5
|
+
import { LanguageService } from 'vhobjects-service';
|
|
6
|
+
import { FunctionService } from 'vhobjects-service/src/services';
|
|
7
|
+
import { NzModalService } from 'ng-zorro-antd/modal';
|
|
8
|
+
import { BookingFlowService } from './booking-flow.service';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
export declare const BOOKING_TYPE: {
|
|
11
|
+
readonly ALLOTMENT_AUTO: 1;
|
|
12
|
+
readonly ALLOTMENT_MANUAL: 2;
|
|
13
|
+
};
|
|
14
|
+
export declare class AtwBookingFlow {
|
|
15
|
+
private bookingFlowService;
|
|
16
|
+
private nzMessageService;
|
|
17
|
+
private route;
|
|
18
|
+
private functionService;
|
|
19
|
+
private nzModalService;
|
|
20
|
+
private languageService;
|
|
21
|
+
private router;
|
|
22
|
+
data: any;
|
|
23
|
+
type: any;
|
|
24
|
+
device: any;
|
|
25
|
+
id_subproject: string;
|
|
26
|
+
hanldleProcessResizeOffset: EventEmitter<any>;
|
|
27
|
+
isComponentExist: ElementRef<HTMLDivElement>;
|
|
28
|
+
class: any;
|
|
29
|
+
cutWebMan: boolean;
|
|
30
|
+
config: any;
|
|
31
|
+
staticdata: any;
|
|
32
|
+
currentStep: BookingStep;
|
|
33
|
+
private static previewStepState;
|
|
34
|
+
arrivalDate: string;
|
|
35
|
+
departureDate: string;
|
|
36
|
+
lengthOfStay: number;
|
|
37
|
+
hotelId: string;
|
|
38
|
+
roomOccupancy: Array<{
|
|
39
|
+
adults: number;
|
|
40
|
+
children: number;
|
|
41
|
+
}>;
|
|
42
|
+
numberOfRoomsNeeded: number;
|
|
43
|
+
tripInfo: any;
|
|
44
|
+
rooms: any[];
|
|
45
|
+
addOns: any[];
|
|
46
|
+
paymentMethods: any[];
|
|
47
|
+
hasWalletAvailable: boolean;
|
|
48
|
+
selectedRooms: any[];
|
|
49
|
+
addOnTotal: number;
|
|
50
|
+
grandTotal: number;
|
|
51
|
+
selectedRoomIds: string[];
|
|
52
|
+
selectedAddOnsMap: {
|
|
53
|
+
[roomIndex: number]: string[];
|
|
54
|
+
};
|
|
55
|
+
selectedAddOnOptionsMap: {
|
|
56
|
+
[roomIndex: number]: {
|
|
57
|
+
[addOnId: string]: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
selectedPaymentMethodId: string;
|
|
61
|
+
guestInfo: any;
|
|
62
|
+
userCurrent: any;
|
|
63
|
+
currentEditingRoomIndex: number | null;
|
|
64
|
+
private lastParamsKey;
|
|
65
|
+
prevHeight: number | undefined;
|
|
66
|
+
get isPreviewMode(): boolean;
|
|
67
|
+
get isResizeMode(): boolean;
|
|
68
|
+
get sampleDataMode(): 'has_data' | 'no_data';
|
|
69
|
+
creatingOrder: boolean;
|
|
70
|
+
private resizeObserver;
|
|
71
|
+
private lastObservedSize;
|
|
72
|
+
private linkSlotIsDetailProduct;
|
|
73
|
+
private cachedHotelLink;
|
|
74
|
+
discountAmount: number;
|
|
75
|
+
appliedVoucherCode: string | null;
|
|
76
|
+
voucherError: string | null;
|
|
77
|
+
applyingVoucher: boolean;
|
|
78
|
+
appliedVoucherId: string | null;
|
|
79
|
+
constructor(bookingFlowService: BookingFlowService, nzMessageService: NzMessageService, route: ActivatedRoute, functionService: FunctionService, nzModalService: NzModalService, languageService: LanguageService, router: Router);
|
|
80
|
+
ngOnInit(): void;
|
|
81
|
+
ngAfterViewInit(): void;
|
|
82
|
+
ngOnDestroy(): void;
|
|
83
|
+
private loadWalletAvailability;
|
|
84
|
+
private loadSampleData;
|
|
85
|
+
private preselectSampleRoom;
|
|
86
|
+
parseQueryParams(params: any): Promise<void>;
|
|
87
|
+
updateTripInfo(): Promise<void>;
|
|
88
|
+
private getActiveRoomIndex;
|
|
89
|
+
private getActiveOccupancy;
|
|
90
|
+
loadAvailableRooms(): Promise<void>;
|
|
91
|
+
loadAddOns(): Promise<void>;
|
|
92
|
+
loadUserInfo(): void;
|
|
93
|
+
getHotelName(hotelId: string): Promise<string>;
|
|
94
|
+
getDetailObject(): void;
|
|
95
|
+
setStep(step: BookingStep): void;
|
|
96
|
+
nextStep(): void;
|
|
97
|
+
previousStep(): void;
|
|
98
|
+
private hasServiceStep;
|
|
99
|
+
addSelectedRoom(roomTypeId: string): Promise<void>;
|
|
100
|
+
removeSelectedRoom(index: number): Promise<void>;
|
|
101
|
+
toggleAddOn(event: {
|
|
102
|
+
roomIndex: number;
|
|
103
|
+
addOnId: string;
|
|
104
|
+
selectedOption?: string;
|
|
105
|
+
}): Promise<void>;
|
|
106
|
+
selectAddOnOption(event: {
|
|
107
|
+
roomIndex: number;
|
|
108
|
+
addOnId: string;
|
|
109
|
+
optionId: string;
|
|
110
|
+
}): Promise<void>;
|
|
111
|
+
selectPaymentMethod(methodId: string): void;
|
|
112
|
+
formatCurrency(value: number): string;
|
|
113
|
+
normalizeDateInput(value: any): string;
|
|
114
|
+
recalculateTotals(): Promise<void>;
|
|
115
|
+
getRemainingRooms(): number;
|
|
116
|
+
isAllRoomsSelected(): boolean;
|
|
117
|
+
editSelectedRoom(index: number): void;
|
|
118
|
+
getSelectedAddOnsByRoom(): {
|
|
119
|
+
[roomIndex: number]: any[];
|
|
120
|
+
};
|
|
121
|
+
getAddOnsForRoom(room: any): any[];
|
|
122
|
+
getSelectedAddOnOption(roomIndex: number, addOnId: string): string | null;
|
|
123
|
+
createOrderFromBookingFlow(): void;
|
|
124
|
+
private createPaymentForOrder;
|
|
125
|
+
private openBankTransferQr;
|
|
126
|
+
private getFacilityDisplayPrice;
|
|
127
|
+
private calculateRoomExtraServices;
|
|
128
|
+
private getSelectedFacilitiesForRoom;
|
|
129
|
+
private getSelectedServicesForRoom;
|
|
130
|
+
private buildSpecialRequests;
|
|
131
|
+
private formatDateKey;
|
|
132
|
+
private sanitizeSelectedAddOnsForRoom;
|
|
133
|
+
private reindexRoomMap;
|
|
134
|
+
private reindexOptionsMap;
|
|
135
|
+
private reindexRoomMapAfterRemove;
|
|
136
|
+
private reindexOptionsMapAfterRemove;
|
|
137
|
+
private resetBookingFlow;
|
|
138
|
+
private formatDateLocal;
|
|
139
|
+
private resolveLinkUrl;
|
|
140
|
+
private buildResumeQueryParams;
|
|
141
|
+
private preloadNavigationLinkData;
|
|
142
|
+
private getHotelLink;
|
|
143
|
+
/**
|
|
144
|
+
* After an order is created successfully, try to navigate to the page
|
|
145
|
+
* configured in the `link_after_create_order` slot. If no link is
|
|
146
|
+
* configured, fall back to the original behavior (reset + reload).
|
|
147
|
+
*/
|
|
148
|
+
private handlePostOrderNavigation;
|
|
149
|
+
/**
|
|
150
|
+
* Resolves the `link_after_create_order` slot and navigates to it.
|
|
151
|
+
* Passes the new orderId as a query param when available.
|
|
152
|
+
* Returns false if no link is configured (so caller can fallback).
|
|
153
|
+
*/
|
|
154
|
+
private navigateAfterOrder;
|
|
155
|
+
private navigateViaLink;
|
|
156
|
+
onApplyVoucher(code: string): Promise<void>;
|
|
157
|
+
onRemoveVoucher(): void;
|
|
158
|
+
private setupResizeObserver;
|
|
159
|
+
private handleResize;
|
|
160
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AtwBookingFlow, never>;
|
|
161
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AtwBookingFlow, "atw-booking-flow", never, { "data": "data"; "type": "type"; "device": "device"; "id_subproject": "id_subproject"; }, { "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; }, never, never>;
|
|
162
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare type BookingStep = 'choose-room' | 'select-service-add-on' | 'payment';
|
|
2
|
+
export declare type BookingFlowStyleBucket = Record<string, string>;
|
|
3
|
+
export declare type BookingFlowStyleMap = Record<string, BookingFlowStyleBucket>;
|
|
4
|
+
export declare function getBookingFlowDeviceClass(data: any, device: string): BookingFlowStyleMap;
|
|
5
|
+
export declare function pickBookingFlowStyles(data: any, device: string, keys: string[]): BookingFlowStyleMap;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./booking-flow.component";
|
|
3
|
+
import * as i2 from "./choose-room/booking-flow-choose-room.component";
|
|
4
|
+
import * as i3 from "./add-ons/booking-flow-add-ons.component";
|
|
5
|
+
import * as i4 from "./payment/booking-flow-payment.component";
|
|
6
|
+
import * as i5 from "./summary/booking-flow-summary.component";
|
|
7
|
+
import * as i6 from "@angular/common";
|
|
8
|
+
import * as i7 from "vhobjects-service";
|
|
9
|
+
import * as i8 from "@angular/router";
|
|
10
|
+
import * as i9 from "@angular/forms";
|
|
11
|
+
import * as i10 from "@ngx-translate/core";
|
|
12
|
+
export declare class BookingFlowModule {
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BookingFlowModule, never>;
|
|
14
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<BookingFlowModule, [typeof i1.AtwBookingFlow, typeof i2.AtwBookingFlowChooseRoom, typeof i3.AtwBookingFlowAddOns, typeof i4.AtwBookingFlowPayment, typeof i5.AtwBookingFlowSummary], [typeof i6.CommonModule, typeof i7.MaterialModule, typeof i7.NgZorroAntModule, typeof i8.RouterModule, typeof i9.FormsModule, typeof i9.ReactiveFormsModule, typeof i10.TranslateModule, typeof i7.VhLanguagePipeModule], never>;
|
|
15
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<BookingFlowModule>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { VhQueryAutoWeb } from 'vhautowebdb';
|
|
3
|
+
import { FunctionService, LanguageService } from 'vhobjects-service/src/services';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class BookingFlowService {
|
|
6
|
+
private vhQueryAutoWeb;
|
|
7
|
+
private languageService;
|
|
8
|
+
private functionService;
|
|
9
|
+
private paymentMethods;
|
|
10
|
+
constructor(vhQueryAutoWeb: VhQueryAutoWeb, languageService: LanguageService, functionService: FunctionService);
|
|
11
|
+
admin_getWallets_byFields_byPages(fields?: any, options?: any, pages?: any): Promise<any>;
|
|
12
|
+
getlocalEndUser(): any;
|
|
13
|
+
getPage_byLink(url: string): Promise<any>;
|
|
14
|
+
updateBill(id: string, updates: any): Promise<any>;
|
|
15
|
+
localStorageGET(key: string): any;
|
|
16
|
+
getHotel(hotelId: string): Promise<any>;
|
|
17
|
+
formatDate(date: string | Date): string;
|
|
18
|
+
getAvailableRooms(hotelId: string, roomTypeId: string, dateFrom: string, dateTo: string, adults?: number, children?: number): Observable<any[]>;
|
|
19
|
+
createOrder(formData: any): Observable<any>;
|
|
20
|
+
private applyVoucherToOrderObject;
|
|
21
|
+
addOrderHistory(idBill: string, stateId: number, metadata?: {
|
|
22
|
+
title?: string;
|
|
23
|
+
description?: string;
|
|
24
|
+
}): Observable<any>;
|
|
25
|
+
getCartRuleByCode(code: string): Promise<any | null>;
|
|
26
|
+
calculateDiscountAmount(rule: any, baseAmount: number): number;
|
|
27
|
+
determineDiscountType(rule: Pick<any, 'rule_type' | 'discount_value'>): 'PERCENTAGE' | 'FIXED';
|
|
28
|
+
addPayment(idBill: string, paymentData: Partial<any>): Observable<any>;
|
|
29
|
+
getPaymentMethodLabel(paymentMethodId: string): string;
|
|
30
|
+
getRoomTypesArray(): Promise<any[]>;
|
|
31
|
+
getServiceRoomsArray(): Promise<any[]>;
|
|
32
|
+
getAdditionalFacilitiesArray(): Promise<any[]>;
|
|
33
|
+
calculateRoomPricing(roomType: any, dateFrom: string, dateTo: string, customerGroups?: string[], pricingContext?: any): Promise<any>;
|
|
34
|
+
calculateUnitPrice(pricing: any | null | undefined): number;
|
|
35
|
+
private createEmptyPricing;
|
|
36
|
+
getRoomsArray(): Promise<any[]>;
|
|
37
|
+
private getBookingDetailsArray;
|
|
38
|
+
private getBillDetailsByFields;
|
|
39
|
+
private isBookingRemovedFromOrderTotals;
|
|
40
|
+
private buildCartItems;
|
|
41
|
+
getRoomById(id: string): Promise<any | null>;
|
|
42
|
+
private calculateConvenienceFee;
|
|
43
|
+
getRoomTypeById(id: string): Promise<any | null>;
|
|
44
|
+
private buildBookingDetails;
|
|
45
|
+
private calculateCartItemTotal;
|
|
46
|
+
isRoomAvailable(roomId: string, dateFrom: string, dateTo: string, excludeBookingId?: string): Promise<boolean>;
|
|
47
|
+
private applyBookingSummary;
|
|
48
|
+
private getOrderBaseAmount;
|
|
49
|
+
getCartRuleById(ruleId: string): Promise<any | null>;
|
|
50
|
+
incrementUsage(ruleId: string): Promise<void>;
|
|
51
|
+
private addTax;
|
|
52
|
+
private removeTax;
|
|
53
|
+
private roundPrice;
|
|
54
|
+
private calculateSpecificPrice;
|
|
55
|
+
private findBestSpecificPrice;
|
|
56
|
+
private dateWeight;
|
|
57
|
+
private getSpecificScore;
|
|
58
|
+
private isLeaveBasePrice;
|
|
59
|
+
private isPercentageReduction;
|
|
60
|
+
private isPercentageImpact;
|
|
61
|
+
private applyFeatureImpact;
|
|
62
|
+
private normalizedPercentage;
|
|
63
|
+
private matchesDate;
|
|
64
|
+
private matchesScope;
|
|
65
|
+
private matchesScopedValue;
|
|
66
|
+
getBestFeatureRuleForDate(roomTypeId: string, date: Date, customerGroups?: string[], context?: {
|
|
67
|
+
id_cart?: string | number;
|
|
68
|
+
id_guest?: string | number;
|
|
69
|
+
id_room?: string | number;
|
|
70
|
+
}): Promise<any | null>;
|
|
71
|
+
private getActiveRulesByRoomType;
|
|
72
|
+
private getFeatureRuleKind;
|
|
73
|
+
private matchesFeatureRuleScope;
|
|
74
|
+
private matchesFeatureRuleGroups;
|
|
75
|
+
private matchesRuleField;
|
|
76
|
+
private isRuleApplicableForDate;
|
|
77
|
+
private isRestrictionApplicableForDate;
|
|
78
|
+
private getDayOfWeek;
|
|
79
|
+
calculateExtraServicesPricing(selectedFacilities: any[], selectedServices: any[], dateFrom: string, dateTo: string): Promise<any>;
|
|
80
|
+
calculateServiceRoomTotals(serviceLinks: any[], dateFrom: string, dateTo: string): Promise<{
|
|
81
|
+
room_service_total_tax_excl: number;
|
|
82
|
+
room_service_total_tax_incl: number;
|
|
83
|
+
convenience_fee_total_tax_excl: number;
|
|
84
|
+
convenience_fee_total_tax_incl: number;
|
|
85
|
+
applied_services: any[];
|
|
86
|
+
nightly_breakdown: Array<{
|
|
87
|
+
date: string;
|
|
88
|
+
room_service_tax_excl: number;
|
|
89
|
+
room_service_tax_incl: number;
|
|
90
|
+
convenience_fee_tax_excl: number;
|
|
91
|
+
convenience_fee_tax_incl: number;
|
|
92
|
+
applied_services: any[];
|
|
93
|
+
}>;
|
|
94
|
+
}>;
|
|
95
|
+
private findApplicableServiceSpecialPrice;
|
|
96
|
+
private applyServiceSpecialPrice;
|
|
97
|
+
getServiceById(id: string): Promise<any | null>;
|
|
98
|
+
calculateServicePrice(service: any, date: Date | string): {
|
|
99
|
+
price_excl: number;
|
|
100
|
+
tax: number;
|
|
101
|
+
price_incl: number;
|
|
102
|
+
applied_special?: any;
|
|
103
|
+
};
|
|
104
|
+
calculateNights(dateFrom: string | Date, dateTo: string | Date): number;
|
|
105
|
+
getLocalizedText(obj: any, field?: string): string;
|
|
106
|
+
getStayDates(dateFrom: string | Date, dateTo: string | Date): string[];
|
|
107
|
+
formatDateKey(date: Date): string;
|
|
108
|
+
toDateOnly(value: string | Date | undefined | null): string;
|
|
109
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BookingFlowService, never>;
|
|
110
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BookingFlowService>;
|
|
111
|
+
}
|
package/lib/objects/hotel/booking-flow/user/choose-room/booking-flow-choose-room.component.d.ts
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
|
+
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
3
|
+
import { BookingFlowStyleMap } from '../booking-flow.models';
|
|
4
|
+
import { FunctionService } from 'vhobjects-service/src/services';
|
|
5
|
+
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
6
|
+
import { VhQueryAutoWeb } from 'vhautowebdb';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class AtwBookingFlowChooseRoom implements OnChanges {
|
|
9
|
+
private matDialog;
|
|
10
|
+
private vhQueryAutoWeb;
|
|
11
|
+
functionService: FunctionService;
|
|
12
|
+
private sanitizer;
|
|
13
|
+
rooms: any[];
|
|
14
|
+
data: any;
|
|
15
|
+
device: any;
|
|
16
|
+
hotelId: any;
|
|
17
|
+
selectedRoomIds: string[];
|
|
18
|
+
selectedRooms: any[];
|
|
19
|
+
numberOfRoomsNeeded: number;
|
|
20
|
+
editingIndex: number | null;
|
|
21
|
+
roomOccupancy: Array<{
|
|
22
|
+
adults: number;
|
|
23
|
+
children: number;
|
|
24
|
+
}>;
|
|
25
|
+
formatCurrency: (value: number) => string;
|
|
26
|
+
roomPreviewTemplate: TemplateRef<any>;
|
|
27
|
+
roomAdded: EventEmitter<string>;
|
|
28
|
+
previewRoom: any | null;
|
|
29
|
+
previewImageIndex: number;
|
|
30
|
+
matDialogRef: MatDialogRef<any> | null;
|
|
31
|
+
class: BookingFlowStyleMap;
|
|
32
|
+
staticdata: any;
|
|
33
|
+
constructor(matDialog: MatDialog, vhQueryAutoWeb: VhQueryAutoWeb, functionService: FunctionService, sanitizer: DomSanitizer);
|
|
34
|
+
ngOnInit(): Promise<void>;
|
|
35
|
+
ngOnChanges(_: SimpleChanges): void;
|
|
36
|
+
trackByRoomId(index: number, room: any): string;
|
|
37
|
+
trackByAmenity(index: number, amenity: {
|
|
38
|
+
label: string;
|
|
39
|
+
}): string;
|
|
40
|
+
trackBySelectedRoom(index: number, room: any): string;
|
|
41
|
+
getRoomDisplayPrice(room: any): number;
|
|
42
|
+
/**
|
|
43
|
+
* Get remaining rooms to select
|
|
44
|
+
*/
|
|
45
|
+
getRemainingRooms(): number;
|
|
46
|
+
/**
|
|
47
|
+
* Check if can add more rooms
|
|
48
|
+
*/
|
|
49
|
+
canAddRoom(): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Select a room to add to array
|
|
52
|
+
*/
|
|
53
|
+
selectRoom(roomTypeId: string): void;
|
|
54
|
+
/**
|
|
55
|
+
* Get images from room using original 'img' field
|
|
56
|
+
*/
|
|
57
|
+
getImages(room: any): string[];
|
|
58
|
+
currentIndexMap: {
|
|
59
|
+
[roomId: string]: number;
|
|
60
|
+
};
|
|
61
|
+
getIndex(roomId: string): number;
|
|
62
|
+
next(roomId: string, total: number): void;
|
|
63
|
+
prev(roomId: string, total: number): void;
|
|
64
|
+
trackByImg(index: number, item: string): string;
|
|
65
|
+
openRoomPreview(room: any): Promise<void>;
|
|
66
|
+
closeRoomPreview(): void;
|
|
67
|
+
currentIndexPreview: number;
|
|
68
|
+
showNextPreviewImage(track: HTMLElement): void;
|
|
69
|
+
showPreviousPreviewImage(track: HTMLElement): void;
|
|
70
|
+
getPreviewImage(): string;
|
|
71
|
+
isRoomSelected(roomTypeId: string): boolean;
|
|
72
|
+
getRoomCardStyle(roomTypeId: string): import("../booking-flow.models").BookingFlowStyleBucket;
|
|
73
|
+
getSelectButtonStyle(roomTypeId: string): import("../booking-flow.models").BookingFlowStyleBucket;
|
|
74
|
+
getCurrentRoomStep(): number;
|
|
75
|
+
getNavStyle(type: 'prev' | 'next'): {
|
|
76
|
+
[x: string]: string;
|
|
77
|
+
};
|
|
78
|
+
getPreviewNavStyle(type: 'prev' | 'next'): {
|
|
79
|
+
[x: string]: string;
|
|
80
|
+
};
|
|
81
|
+
private loadStyles;
|
|
82
|
+
getSafeHtml(obj: any, field?: string): SafeHtml;
|
|
83
|
+
getLocalizedText(obj: any, field?: string): string;
|
|
84
|
+
private getFeature;
|
|
85
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AtwBookingFlowChooseRoom, never>;
|
|
86
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AtwBookingFlowChooseRoom, "atw-booking-flow-choose-room", never, { "rooms": "rooms"; "data": "data"; "device": "device"; "hotelId": "hotelId"; "selectedRoomIds": "selectedRoomIds"; "selectedRooms": "selectedRooms"; "numberOfRoomsNeeded": "numberOfRoomsNeeded"; "editingIndex": "editingIndex"; "roomOccupancy": "roomOccupancy"; "formatCurrency": "formatCurrency"; }, { "roomAdded": "roomAdded"; }, never, never>;
|
|
87
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { BookingFlowStyleMap } from '../booking-flow.models';
|
|
3
|
+
import { FunctionService } from 'vhobjects-service/src/services';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class AtwBookingFlowPayment implements OnChanges {
|
|
6
|
+
functionService: FunctionService;
|
|
7
|
+
guestInfo: any;
|
|
8
|
+
paymentMethods: any[];
|
|
9
|
+
data: any;
|
|
10
|
+
device: any;
|
|
11
|
+
selectedPaymentMethodId: string;
|
|
12
|
+
back: EventEmitter<void>;
|
|
13
|
+
paymentMethodSelected: EventEmitter<string>;
|
|
14
|
+
submitPayment: EventEmitter<void>;
|
|
15
|
+
class: BookingFlowStyleMap;
|
|
16
|
+
staticdata: any;
|
|
17
|
+
constructor(functionService: FunctionService);
|
|
18
|
+
ngOnInit(): void;
|
|
19
|
+
ngOnChanges(_: SimpleChanges): void;
|
|
20
|
+
trackByPaymentMethodId(index: number, paymentMethod: any): string;
|
|
21
|
+
getMethodStyle(isSelected: boolean, index: number): {
|
|
22
|
+
[x: string]: string;
|
|
23
|
+
};
|
|
24
|
+
getPanelStyle(variantKey: string): {
|
|
25
|
+
[x: string]: string;
|
|
26
|
+
};
|
|
27
|
+
getFieldStyle(fieldKey: string): {
|
|
28
|
+
[x: string]: string;
|
|
29
|
+
};
|
|
30
|
+
getSelectStyle(variantKey?: string): {
|
|
31
|
+
[x: string]: string;
|
|
32
|
+
};
|
|
33
|
+
getInputStyle(variantKey?: string): {
|
|
34
|
+
[x: string]: string;
|
|
35
|
+
};
|
|
36
|
+
private loadStyles;
|
|
37
|
+
getCheckboxStyle(variantKey?: string): {
|
|
38
|
+
[x: string]: string;
|
|
39
|
+
};
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AtwBookingFlowPayment, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AtwBookingFlowPayment, "atw-booking-flow-payment", never, { "guestInfo": "guestInfo"; "paymentMethods": "paymentMethods"; "data": "data"; "device": "device"; "selectedPaymentMethodId": "selectedPaymentMethodId"; }, { "back": "back"; "paymentMethodSelected": "paymentMethodSelected"; "submitPayment": "submitPayment"; }, never, never>;
|
|
42
|
+
}
|