@cbm-common/cbm-types 0.0.123 → 0.0.125
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.
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { DestroyRef, OnInit } from '@angular/core';
|
|
2
2
|
import { FormControl, FormGroup } from '@angular/forms';
|
|
3
3
|
import { CbmClientModel, CbmPriceListModel } from '@cbm-common/cbm-types';
|
|
4
|
-
import { PaginatedListService } from '@cbm-common/data-access';
|
|
4
|
+
import { ListService, PaginatedListService } from '@cbm-common/data-access';
|
|
5
|
+
import { Subject } from 'rxjs';
|
|
5
6
|
import { CbmCostCenterModel } from '../../domain/models/cost-center.domain.model';
|
|
6
7
|
import { STATE } from '../../domain/models/general.domain.model';
|
|
7
8
|
import { CbmRoomModel } from '../../domain/models/room.domain.model';
|
|
8
9
|
import { CbmSalesAccountModel } from '../../domain/models/sales-account.domain.model';
|
|
9
10
|
import { CbmChargeRepository } from '../../domain/repositories/charge.domain.repository';
|
|
11
|
+
import { CbmCostCenterRepository } from '../../domain/repositories/cost-center.domain.repository';
|
|
10
12
|
import { CbmRoomRepository } from '../../domain/repositories/room.domain.repository';
|
|
11
13
|
import { CbmSalesAccountRepository } from '../../domain/repositories/sales-account.domain.repository';
|
|
12
14
|
import { CbmAuthService } from '../../domain/services/auth/auth.service';
|
|
13
15
|
import { CbmNotificationService } from '../../remotes/services.remote';
|
|
14
16
|
import { ItemDetails } from '../item-details/item-details';
|
|
17
|
+
import { CbmModalConfirmComponent } from '../modal-confirm/modal-confirm';
|
|
15
18
|
import { FoliosModal } from './folios-modal/folios-modal';
|
|
16
19
|
export declare class CbmPmsAddCharge implements OnInit {
|
|
17
20
|
private readonly destroyRef;
|
|
@@ -20,29 +23,38 @@ export declare class CbmPmsAddCharge implements OnInit {
|
|
|
20
23
|
private readonly notificationService;
|
|
21
24
|
private readonly authService;
|
|
22
25
|
private readonly salesAccountRepository;
|
|
23
|
-
|
|
26
|
+
private readonly costCenterRepository;
|
|
27
|
+
constructor(destroyRef: DestroyRef, roomRepository: CbmRoomRepository, chargeRepository: CbmChargeRepository, notificationService: CbmNotificationService, authService: CbmAuthService, salesAccountRepository: CbmSalesAccountRepository, costCenterRepository: CbmCostCenterRepository);
|
|
28
|
+
disableGuard: boolean;
|
|
29
|
+
formDirty: () => boolean;
|
|
24
30
|
chargeFormGroup: FormGroup<{
|
|
25
31
|
service_type: FormControl<number | null>;
|
|
26
32
|
charge_type: FormControl<number | null>;
|
|
27
33
|
room: FormControl<Partial<CbmRoomModel.RoomStateResponse.Items> | null>;
|
|
34
|
+
cost_center: FormControl<Partial<CbmCostCenterModel.ListResponse.Data> | null>;
|
|
28
35
|
order: FormControl<string>;
|
|
29
36
|
tiket: FormControl<string>;
|
|
30
37
|
}>;
|
|
31
38
|
protected rooms$: PaginatedListService<CbmRoomModel.RoomStateResponse, CbmRoomModel.RoomStateParams, CbmRoomModel.RoomStateResponse.Items[]>;
|
|
39
|
+
protected costCenter$: ListService<CbmCostCenterModel.ListResponse, CbmCostCenterModel.ListParams, CbmCostCenterModel.ListResponse.Data[]>;
|
|
40
|
+
firstCostCenter$: Subject<void>;
|
|
32
41
|
protected foliosRoomId: import("@angular/core").WritableSignal<string | null>;
|
|
33
42
|
protected selectedFolio: import("@angular/core").WritableSignal<CbmSalesAccountModel.GetOneResponse.Data<CbmSalesAccountModel.SalesAccountRelatedDocuments> | null>;
|
|
34
43
|
protected priceList: import("@angular/core").Signal<Partial<CbmPriceListModel.ListResponse.Data>>;
|
|
35
44
|
protected client: import("@angular/core").Signal<Partial<CbmClientModel.GetOneResponse.Data>>;
|
|
45
|
+
clientBranch: import("@angular/core").Signal<Partial<CbmClientModel.GetOneResponse.Data.Contact>>;
|
|
36
46
|
protected costCenter: import("@angular/core").Signal<Partial<CbmCostCenterModel.ListResponse.Data>>;
|
|
37
47
|
protected relatedDocument: import("@angular/core").Signal<CbmSalesAccountModel.SalesAccountRelatedDocuments | null>;
|
|
38
48
|
protected foliosModalRef: import("@angular/core").Signal<FoliosModal>;
|
|
39
49
|
protected itemDetailsComp: import("@angular/core").Signal<ItemDetails>;
|
|
50
|
+
modalConfirm: import("@angular/core").Signal<CbmModalConfirmComponent>;
|
|
40
51
|
'on-charge-saved': import("@angular/core").OutputEmitterRef<void>;
|
|
41
52
|
'on-cancel': import("@angular/core").OutputEmitterRef<void>;
|
|
42
53
|
protected STATE: typeof STATE;
|
|
43
54
|
protected stOfSaveCharge: import("@angular/core").WritableSignal<STATE>;
|
|
44
55
|
ngOnInit(): void;
|
|
45
56
|
private initRooms;
|
|
57
|
+
private initCostCenter;
|
|
46
58
|
protected subObservers(): void;
|
|
47
59
|
saveCharge(): Promise<void>;
|
|
48
60
|
protected getFolio(folio: CbmSalesAccountModel.ListResponse.Item): Promise<void>;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
export declare namespace CbmRoomModel {
|
|
2
|
+
enum StateRoom {
|
|
3
|
+
AVAILABLE = "available",
|
|
4
|
+
BUSY = "busy",
|
|
5
|
+
IN_MAINTENANCE = "in_maintenance",
|
|
6
|
+
CLEANING = "cleaning",
|
|
7
|
+
RESERVED = "reserved"
|
|
8
|
+
}
|
|
2
9
|
interface RoomStateParams {
|
|
3
10
|
page: number;
|
|
4
11
|
size: number;
|
|
5
12
|
date_consultation?: number;
|
|
6
13
|
room_name?: string;
|
|
14
|
+
state_room?: StateRoom;
|
|
7
15
|
}
|
|
8
16
|
interface RoomStateResponse {
|
|
9
17
|
success: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare namespace CbmSalesAccountModel {
|
|
2
2
|
type DetailType = 'item' | 'service' | 'kit' | 'outsourcing_service';
|
|
3
|
+
const transactionTypes: Record<string, string>;
|
|
3
4
|
interface ListParams {
|
|
4
5
|
page: number;
|
|
5
6
|
size: number;
|
|
@@ -128,6 +129,33 @@ export declare namespace CbmSalesAccountModel {
|
|
|
128
129
|
client_branch_contact_full_name?: string;
|
|
129
130
|
client_branch_contact_cellphone?: string;
|
|
130
131
|
client_branch_contact_email?: string[];
|
|
132
|
+
sales_account_related_documents: Item.SalesAccountRelatedDocuments[];
|
|
133
|
+
}
|
|
134
|
+
namespace Item {
|
|
135
|
+
interface SalesAccountRelatedDocuments {
|
|
136
|
+
_id: string;
|
|
137
|
+
company_id: string;
|
|
138
|
+
country_id: string;
|
|
139
|
+
collection_origin_id: string;
|
|
140
|
+
collection_origin_name: string;
|
|
141
|
+
collection_origin_document_nomenclature_number: string;
|
|
142
|
+
event_module_origin: string;
|
|
143
|
+
comment_check_in: string;
|
|
144
|
+
sales_account_id: string;
|
|
145
|
+
document_type: string;
|
|
146
|
+
room_id: string;
|
|
147
|
+
room_name: string;
|
|
148
|
+
guest_id: string;
|
|
149
|
+
guest_document_type_id: string;
|
|
150
|
+
guest_document_type_code: string;
|
|
151
|
+
guest_document_type_name: string;
|
|
152
|
+
guest_name: string;
|
|
153
|
+
guest_last_name: string;
|
|
154
|
+
enabled: boolean;
|
|
155
|
+
user_id: string;
|
|
156
|
+
created_at: number;
|
|
157
|
+
created_user: string;
|
|
158
|
+
}
|
|
131
159
|
}
|
|
132
160
|
}
|
|
133
161
|
interface GetOneResponse<T> {
|