@cbm-common/cbm-types 0.0.125 → 0.0.126
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/lib/components/item-details/item-details.d.ts +10 -2
- package/lib/components/item-details/item-details.types.d.ts +3 -3
- package/lib/components/pms-add-charge/pms-add-charge.d.ts +20 -2
- package/lib/components/price-type-summary/price-type-summary.component.d.ts +4 -0
- package/lib/components/service-details/service-details.d.ts +56 -0
- package/lib/components/service-details/service-details.types.d.ts +27 -0
- package/lib/components/subtotal-details/subtotal-details.d.ts +19 -0
- package/lib/components/summary-details/summary-details.d.ts +14 -0
- package/lib/domain/models/sales-account.domain.model.d.ts +9 -4
- package/lib/domain/services/find-price-type.domain.service.d.ts +12 -0
- package/lib/domain/services/item/find-item-by-code.domain.service.d.ts +15 -0
- package/lib/domain/services/service/find-service-code.domain.service.d.ts +15 -0
- package/lib/domain/services/taxes/irbpnr.domain.service.d.ts +11 -0
- package/lib/domain/services/web-socket/web-socket.service.d.ts +9 -1
- package/lib/remotes/services/auth.service.d.ts +3 -0
- package/lib/remotes/services/web-socket.service.d.ts +4 -0
- package/lib/remotes/services.remote.d.ts +3 -0
- package/lib/types/price-type.fn.d.ts +3 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DestroyRef, OnInit } from '@angular/core';
|
|
2
2
|
import { FormArray, FormGroup } from '@angular/forms';
|
|
3
|
-
import { CbmClientModel, CbmCostCenterModel } from '@cbm-common/cbm-types';
|
|
3
|
+
import { CbmClientModel, CbmCostCenterModel, CbmTaxesModal } from '@cbm-common/cbm-types';
|
|
4
4
|
import { CbmSalePriceModel } from '@cbm-common/cbm-types/lib/domain/models/sale-price.domain.model';
|
|
5
5
|
import { ListService, PaginatedListService } from '@cbm-common/data-access';
|
|
6
6
|
import { Subject } from 'rxjs';
|
|
@@ -12,16 +12,23 @@ import { CbmSalePriceDomainRepository } from '../../domain/repositories/sale-pri
|
|
|
12
12
|
import { CbmNotificationService } from '../../remotes/services.remote';
|
|
13
13
|
import { cbmStockWarehouseModalModel } from '../stock-by-warehouse/type';
|
|
14
14
|
import { IItemDetails } from './item-details.types';
|
|
15
|
+
import { CbmIrbpnrDomainService } from '../../domain/services/taxes/irbpnr.domain.service';
|
|
15
16
|
export declare class ItemDetails implements OnInit {
|
|
16
17
|
private readonly destroyRef;
|
|
17
18
|
private readonly itemRepository;
|
|
18
19
|
private readonly notificationService;
|
|
19
20
|
private readonly priceTypeRepository;
|
|
20
21
|
private readonly costCenterRepository;
|
|
21
|
-
|
|
22
|
+
private readonly irbpnrService;
|
|
23
|
+
constructor(destroyRef: DestroyRef, itemRepository: CbmItemDomainRepository, notificationService: CbmNotificationService, priceTypeRepository: CbmSalePriceDomainRepository, costCenterRepository: CbmCostCenterRepository, irbpnrService: CbmIrbpnrDomainService);
|
|
22
24
|
'price-list': import("@angular/core").InputSignal<Partial<CbmPriceListModel.ListResponse.Data>>;
|
|
23
25
|
'client-data': import("@angular/core").InputSignal<Partial<CbmClientModel.GetOneResponse.Data>>;
|
|
24
26
|
'cost-center': import("@angular/core").InputSignal<Partial<CbmCostCenterModel.ListResponse.Data>>;
|
|
27
|
+
'on-total-amount': import("@angular/core").OutputEmitterRef<number>;
|
|
28
|
+
'on-total-subtotal': import("@angular/core").OutputEmitterRef<number>;
|
|
29
|
+
'on-total-discount': import("@angular/core").OutputEmitterRef<number>;
|
|
30
|
+
'on-total-tax': import("@angular/core").OutputEmitterRef<number>;
|
|
31
|
+
'on-details-tax': import("@angular/core").OutputEmitterRef<CbmTaxesModal.Data>;
|
|
25
32
|
loadItems$: Subject<void>;
|
|
26
33
|
loadCostCenter$: Subject<void>;
|
|
27
34
|
itemDetailsFormArray: FormArray<FormGroup<IItemDetails.FormGroupDetail>>;
|
|
@@ -43,4 +50,5 @@ export declare class ItemDetails implements OnInit {
|
|
|
43
50
|
resetItem(formGroup: FormGroup<IItemDetails.FormGroupDetail>): void;
|
|
44
51
|
getAllTaxes(): IItemDetails.Taxes[];
|
|
45
52
|
getRowTaxes(formGroup: FormGroup<IItemDetails.FormGroupDetail>): IItemDetails.Taxes[];
|
|
53
|
+
calculateTotals(): void;
|
|
46
54
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FormControl } from "@angular/forms";
|
|
2
2
|
import { CbmCostCenterModel, CbmItemModel } from "@cbm-common/cbm-types";
|
|
3
3
|
import { CbmSalePriceModel } from "@cbm-common/cbm-types/lib/domain/models/sale-price.domain.model";
|
|
4
|
-
import {
|
|
4
|
+
import { FindItemByCodeService } from "../../domain/services/item/find-item-by-code.domain.service";
|
|
5
5
|
import { CbmUnitMeasureModel } from "../../domain/models/unit-measure.domain.model";
|
|
6
6
|
export declare namespace IItemDetails {
|
|
7
7
|
interface FormGroupDetail {
|
|
@@ -15,11 +15,11 @@ export declare namespace IItemDetails {
|
|
|
15
15
|
price_type: FormControl<Partial<CbmSalePriceModel.GetResponse.Data> | null>;
|
|
16
16
|
unit_measure: FormControl<Partial<CbmUnitMeasureModel.ListResponse.DataWithFactor> | null>;
|
|
17
17
|
cost_center: FormControl<Partial<CbmCostCenterModel.ListResponse.Data> | null>;
|
|
18
|
-
findItemByCode$: FormControl<
|
|
18
|
+
findItemByCode$: FormControl<FindItemByCodeService | null>;
|
|
19
19
|
}
|
|
20
20
|
interface Taxes {
|
|
21
21
|
type: string;
|
|
22
|
-
|
|
22
|
+
tax_description: string;
|
|
23
23
|
tax_code: string;
|
|
24
24
|
tax_rate: number;
|
|
25
25
|
tax_base: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DestroyRef, OnInit } from '@angular/core';
|
|
2
2
|
import { FormControl, FormGroup } from '@angular/forms';
|
|
3
|
-
import { CbmClientModel, CbmPriceListModel } from '@cbm-common/cbm-types';
|
|
3
|
+
import { CbmClientModel, CbmContactModel, CbmPriceListModel } from '@cbm-common/cbm-types';
|
|
4
4
|
import { ListService, PaginatedListService } from '@cbm-common/data-access';
|
|
5
5
|
import { Subject } from 'rxjs';
|
|
6
6
|
import { CbmCostCenterModel } from '../../domain/models/cost-center.domain.model';
|
|
@@ -16,6 +16,8 @@ import { CbmNotificationService } from '../../remotes/services.remote';
|
|
|
16
16
|
import { ItemDetails } from '../item-details/item-details';
|
|
17
17
|
import { CbmModalConfirmComponent } from '../modal-confirm/modal-confirm';
|
|
18
18
|
import { FoliosModal } from './folios-modal/folios-modal';
|
|
19
|
+
import { CbmTaxesModal } from '../taxes-modal/taxes-modal.model';
|
|
20
|
+
import { CbmIrbpnrDomainService } from '../../domain/services/taxes/irbpnr.domain.service';
|
|
19
21
|
export declare class CbmPmsAddCharge implements OnInit {
|
|
20
22
|
private readonly destroyRef;
|
|
21
23
|
private readonly roomRepository;
|
|
@@ -24,7 +26,8 @@ export declare class CbmPmsAddCharge implements OnInit {
|
|
|
24
26
|
private readonly authService;
|
|
25
27
|
private readonly salesAccountRepository;
|
|
26
28
|
private readonly costCenterRepository;
|
|
27
|
-
|
|
29
|
+
private readonly irbpnrService;
|
|
30
|
+
constructor(destroyRef: DestroyRef, roomRepository: CbmRoomRepository, chargeRepository: CbmChargeRepository, notificationService: CbmNotificationService, authService: CbmAuthService, salesAccountRepository: CbmSalesAccountRepository, costCenterRepository: CbmCostCenterRepository, irbpnrService: CbmIrbpnrDomainService);
|
|
28
31
|
disableGuard: boolean;
|
|
29
32
|
formDirty: () => boolean;
|
|
30
33
|
chargeFormGroup: FormGroup<{
|
|
@@ -42,9 +45,23 @@ export declare class CbmPmsAddCharge implements OnInit {
|
|
|
42
45
|
protected selectedFolio: import("@angular/core").WritableSignal<CbmSalesAccountModel.GetOneResponse.Data<CbmSalesAccountModel.SalesAccountRelatedDocuments> | null>;
|
|
43
46
|
protected priceList: import("@angular/core").Signal<Partial<CbmPriceListModel.ListResponse.Data>>;
|
|
44
47
|
protected client: import("@angular/core").Signal<Partial<CbmClientModel.GetOneResponse.Data>>;
|
|
48
|
+
contact: import("@angular/core").Signal<Partial<CbmContactModel.ListResponse.Data> | null>;
|
|
45
49
|
clientBranch: import("@angular/core").Signal<Partial<CbmClientModel.GetOneResponse.Data.Contact>>;
|
|
46
50
|
protected costCenter: import("@angular/core").Signal<Partial<CbmCostCenterModel.ListResponse.Data>>;
|
|
47
51
|
protected relatedDocument: import("@angular/core").Signal<CbmSalesAccountModel.SalesAccountRelatedDocuments | null>;
|
|
52
|
+
protected totals: import("@angular/core").WritableSignal<{
|
|
53
|
+
itemAmount: number;
|
|
54
|
+
itemSubtotal: number;
|
|
55
|
+
itemDiscount: number;
|
|
56
|
+
itemTax: number;
|
|
57
|
+
serviceAmount: number;
|
|
58
|
+
serviceSubtotal: number;
|
|
59
|
+
serviceDiscount: number;
|
|
60
|
+
serviceTax: number;
|
|
61
|
+
}>;
|
|
62
|
+
private typeTotals;
|
|
63
|
+
protected itemDetailsTax: import("@angular/core").WritableSignal<CbmTaxesModal.Data>;
|
|
64
|
+
protected serviceDetailsTax: import("@angular/core").WritableSignal<CbmTaxesModal.Data>;
|
|
48
65
|
protected foliosModalRef: import("@angular/core").Signal<FoliosModal>;
|
|
49
66
|
protected itemDetailsComp: import("@angular/core").Signal<ItemDetails>;
|
|
50
67
|
modalConfirm: import("@angular/core").Signal<CbmModalConfirmComponent>;
|
|
@@ -58,4 +75,5 @@ export declare class CbmPmsAddCharge implements OnInit {
|
|
|
58
75
|
protected subObservers(): void;
|
|
59
76
|
saveCharge(): Promise<void>;
|
|
60
77
|
protected getFolio(folio: CbmSalesAccountModel.ListResponse.Item): Promise<void>;
|
|
78
|
+
protected updateTotals(field: keyof typeof this.typeTotals, value: number): void;
|
|
61
79
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { DestroyRef } from '@angular/core';
|
|
2
|
+
import { FormArray, FormGroup } from '@angular/forms';
|
|
3
|
+
import { PaginatedListService, ListService } from '@cbm-common/data-access';
|
|
4
|
+
import { Subject } from 'rxjs';
|
|
5
|
+
import { CbmSalePriceModel } from '../../domain/models/sale-price.domain.model';
|
|
6
|
+
import { CbmSalePriceDomainRepository } from '../../domain/repositories/sale-price.domain.repository';
|
|
7
|
+
import { CbmIrbpnrDomainService } from '../../domain/services/taxes/irbpnr.domain.service';
|
|
8
|
+
import { IServiceDetails } from './service-details.types';
|
|
9
|
+
import { CbmNotificationService } from '../../domain/services/notification/notification.service';
|
|
10
|
+
import { CbmCostCenterRepository } from '../../domain/repositories/cost-center.domain.repository';
|
|
11
|
+
import { CbmPriceListModel } from '../../domain/models/price-list.domain.model';
|
|
12
|
+
import { CbmClientModel } from '../../domain/models/client.domain.model';
|
|
13
|
+
import { CbmCostCenterModel } from '../../domain/models/cost-center.domain.model';
|
|
14
|
+
import { CbmTaxesModal } from '../taxes-modal/taxes-modal.model';
|
|
15
|
+
import { CbmUnitMeasureModel } from '../../domain/models/unit-measure.domain.model';
|
|
16
|
+
import { cbmStockWarehouseModalModel } from '../stock-by-warehouse/type';
|
|
17
|
+
import { CbmServiceModel } from '../../domain/models/service.domain.model';
|
|
18
|
+
import { CbmServiceDomainRepository } from '../../domain/repositories/service.domain.repository';
|
|
19
|
+
export declare class CbmServiceDetails {
|
|
20
|
+
private readonly destroyRef;
|
|
21
|
+
private readonly serviceRepository;
|
|
22
|
+
private readonly notificationService;
|
|
23
|
+
private readonly priceTypeRepository;
|
|
24
|
+
private readonly costCenterRepository;
|
|
25
|
+
private readonly irbpnrService;
|
|
26
|
+
constructor(destroyRef: DestroyRef, serviceRepository: CbmServiceDomainRepository, notificationService: CbmNotificationService, priceTypeRepository: CbmSalePriceDomainRepository, costCenterRepository: CbmCostCenterRepository, irbpnrService: CbmIrbpnrDomainService);
|
|
27
|
+
'price-list': import("@angular/core").InputSignal<Partial<CbmPriceListModel.ListResponse.Data>>;
|
|
28
|
+
'client-data': import("@angular/core").InputSignal<Partial<CbmClientModel.GetOneResponse.Data>>;
|
|
29
|
+
'cost-center': import("@angular/core").InputSignal<Partial<CbmCostCenterModel.ListResponse.Data>>;
|
|
30
|
+
'on-total-amount': import("@angular/core").OutputEmitterRef<number>;
|
|
31
|
+
'on-total-subtotal': import("@angular/core").OutputEmitterRef<number>;
|
|
32
|
+
'on-total-discount': import("@angular/core").OutputEmitterRef<number>;
|
|
33
|
+
'on-total-tax': import("@angular/core").OutputEmitterRef<number>;
|
|
34
|
+
'on-details-tax': import("@angular/core").OutputEmitterRef<CbmTaxesModal.Data>;
|
|
35
|
+
loadServices$: Subject<void>;
|
|
36
|
+
loadCostCenter$: Subject<void>;
|
|
37
|
+
serviceDetailsFormArray: FormArray<FormGroup<IServiceDetails.FormGroupDetail>>;
|
|
38
|
+
services$: PaginatedListService<CbmServiceModel.ListResponse, CbmServiceModel.ListParams, CbmServiceModel.ListResponse.Item[]>;
|
|
39
|
+
priceTypes$: ListService<CbmSalePriceModel.GetResponse, CbmSalePriceModel.GetParams, CbmSalePriceModel.GetResponse.Data[]>;
|
|
40
|
+
costCenters$: ListService<CbmCostCenterModel.ListResponse, CbmCostCenterModel.ListParams, CbmCostCenterModel.ListResponse.Data[]>;
|
|
41
|
+
priceList: import("@angular/core").Signal<Partial<CbmPriceListModel.ListResponse.Data>>;
|
|
42
|
+
clientData: import("@angular/core").Signal<Partial<CbmClientModel.GetOneResponse.Data>>;
|
|
43
|
+
costCenterData: import("@angular/core").Signal<Partial<CbmCostCenterModel.ListResponse.Data>>;
|
|
44
|
+
priceTypeOp: Map<string, CbmSalePriceModel.GetResponse.Data[]>;
|
|
45
|
+
unitMeasureOp: Map<string, Partial<CbmUnitMeasureModel.ListResponse.DataWithFactor>[]>;
|
|
46
|
+
itemConsulted: import("@angular/core").WritableSignal<cbmStockWarehouseModalModel.item | null>;
|
|
47
|
+
ngOnInit(): void;
|
|
48
|
+
getPriceType(params: CbmSalePriceModel.GetParams, control?: IServiceDetails.FormGroupDetail['price_type']): Promise<void>;
|
|
49
|
+
subObservers(): void;
|
|
50
|
+
addNewRow(): void;
|
|
51
|
+
removeRow(index: number): void;
|
|
52
|
+
resetItem(formGroup: FormGroup<IServiceDetails.FormGroupDetail>): void;
|
|
53
|
+
getAllTaxes(): IServiceDetails.Taxes[];
|
|
54
|
+
getRowTaxes(formGroup: FormGroup<IServiceDetails.FormGroupDetail>): IServiceDetails.Taxes[];
|
|
55
|
+
calculateTotals(): void;
|
|
56
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FormControl } from "@angular/forms";
|
|
2
|
+
import { CbmCostCenterModel } from "@cbm-common/cbm-types";
|
|
3
|
+
import { CbmSalePriceModel } from "@cbm-common/cbm-types/lib/domain/models/sale-price.domain.model";
|
|
4
|
+
import { CbmServiceModel } from "../../domain/models/service.domain.model";
|
|
5
|
+
import { FindServiceCodeService } from "../../domain/services/service/find-service-code.domain.service";
|
|
6
|
+
export declare namespace IServiceDetails {
|
|
7
|
+
interface FormGroupDetail {
|
|
8
|
+
code: FormControl<string>;
|
|
9
|
+
service: FormControl<Partial<CbmServiceModel.ListResponse.Item> | null>;
|
|
10
|
+
amount: FormControl<string>;
|
|
11
|
+
price: FormControl<string>;
|
|
12
|
+
discount_percentage: FormControl<string>;
|
|
13
|
+
discount: FormControl<string>;
|
|
14
|
+
subtotal: FormControl<number>;
|
|
15
|
+
price_type: FormControl<Partial<CbmSalePriceModel.GetResponse.Data> | null>;
|
|
16
|
+
cost_center: FormControl<Partial<CbmCostCenterModel.ListResponse.Data> | null>;
|
|
17
|
+
findServiceByCode$: FormControl<FindServiceCodeService | null>;
|
|
18
|
+
}
|
|
19
|
+
interface Taxes {
|
|
20
|
+
type: string;
|
|
21
|
+
tax_description: string;
|
|
22
|
+
tax_code: string;
|
|
23
|
+
tax_rate: number;
|
|
24
|
+
tax_base: number;
|
|
25
|
+
tax_value: number;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CbmTaxesModal } from '../taxes-modal/taxes-modal.model';
|
|
2
|
+
import { FormControl } from '@angular/forms';
|
|
3
|
+
export declare class CbmSubtotalDetails {
|
|
4
|
+
'item-subtotal': import("@angular/core").InputSignal<number>;
|
|
5
|
+
'item-discount': import("@angular/core").InputSignal<number>;
|
|
6
|
+
'item-tax': import("@angular/core").InputSignal<number>;
|
|
7
|
+
'item-details-tax': import("@angular/core").InputSignal<CbmTaxesModal.Data>;
|
|
8
|
+
'service-subtotal': import("@angular/core").InputSignal<number>;
|
|
9
|
+
'service-discount': import("@angular/core").InputSignal<number>;
|
|
10
|
+
'service-tax': import("@angular/core").InputSignal<number>;
|
|
11
|
+
'service-details-tax': import("@angular/core").InputSignal<CbmTaxesModal.Data>;
|
|
12
|
+
subtotal: import("@angular/core").Signal<number>;
|
|
13
|
+
discount: import("@angular/core").Signal<number>;
|
|
14
|
+
tax: import("@angular/core").Signal<number>;
|
|
15
|
+
total: import("@angular/core").Signal<number>;
|
|
16
|
+
detailsTax: import("@angular/core").Signal<CbmTaxesModal.Data>;
|
|
17
|
+
serviceControl: FormControl<string>;
|
|
18
|
+
hasTaxes(): boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class CbmSummaryDetails {
|
|
2
|
+
'item-amount': import("@angular/core").InputSignal<number>;
|
|
3
|
+
'item-subtotal': import("@angular/core").InputSignal<number>;
|
|
4
|
+
'kit-amount': import("@angular/core").InputSignal<number>;
|
|
5
|
+
'kit-subtotal': import("@angular/core").InputSignal<number>;
|
|
6
|
+
'service-amount': import("@angular/core").InputSignal<number>;
|
|
7
|
+
'service-subtotal': import("@angular/core").InputSignal<number>;
|
|
8
|
+
itemAmount: import("@angular/core").Signal<number>;
|
|
9
|
+
itemSubtotal: import("@angular/core").Signal<number>;
|
|
10
|
+
kitAmount: import("@angular/core").Signal<number>;
|
|
11
|
+
kitSubtotal: import("@angular/core").Signal<number>;
|
|
12
|
+
serviceAmount: import("@angular/core").Signal<number>;
|
|
13
|
+
serviceSubtotal: import("@angular/core").Signal<number>;
|
|
14
|
+
}
|
|
@@ -213,15 +213,17 @@ export declare namespace CbmSalesAccountModel {
|
|
|
213
213
|
client_branch_seller_address: string;
|
|
214
214
|
client_branch_seller_email: any[];
|
|
215
215
|
client_branch_seller_cellphone: string;
|
|
216
|
-
|
|
216
|
+
client_branch_contact_id?: string;
|
|
217
|
+
client_branch_contact_identification_number?: string;
|
|
218
|
+
client_branch_contact_full_name?: string;
|
|
219
|
+
client_branch_contact_cellphone?: string;
|
|
220
|
+
client_branch_contact_email?: string[];
|
|
217
221
|
default_cost_center_id: string;
|
|
218
222
|
default_cost_center_code: string;
|
|
219
223
|
default_cost_center_name: string;
|
|
220
|
-
default_discount_rate: number;
|
|
221
224
|
document_nomenclature: string;
|
|
222
225
|
document_number: string;
|
|
223
226
|
document_date: number;
|
|
224
|
-
document_type: string;
|
|
225
227
|
generation_type: string;
|
|
226
228
|
state: string;
|
|
227
229
|
tax_base: number;
|
|
@@ -235,7 +237,6 @@ export declare namespace CbmSalesAccountModel {
|
|
|
235
237
|
rate_iva: number;
|
|
236
238
|
tax_base_ice: number;
|
|
237
239
|
tax_iva: number;
|
|
238
|
-
code_iva: string;
|
|
239
240
|
tax_irbpnr: number;
|
|
240
241
|
tax_ice: number;
|
|
241
242
|
total: number;
|
|
@@ -359,10 +360,14 @@ export declare namespace CbmSalesAccountModel {
|
|
|
359
360
|
collection_origin_id: string;
|
|
360
361
|
collection_origin_name: string;
|
|
361
362
|
collection_origin_document_nomenclature_number: string;
|
|
363
|
+
collection_origin_created_at: number;
|
|
364
|
+
collection_origin_created_user: string;
|
|
362
365
|
event_module_origin: string;
|
|
363
366
|
sales_account_id: string;
|
|
367
|
+
document_type: string;
|
|
364
368
|
room_id: string;
|
|
365
369
|
room_name: string;
|
|
370
|
+
comment_check_in: string;
|
|
366
371
|
guest_id: string;
|
|
367
372
|
guest_document_type_id: string;
|
|
368
373
|
guest_document_type_code: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DestroyRef } from "@angular/core";
|
|
2
|
+
import { FormControl } from "@angular/forms";
|
|
3
|
+
import { IGetPriceTypeParams, IPriceTypeExec } from "../../types/price-type.fn";
|
|
4
|
+
import { CbmSalePriceModel } from "../models/sale-price.domain.model";
|
|
5
|
+
export declare class FindPriceTypeService {
|
|
6
|
+
private readonly destroyRef;
|
|
7
|
+
private readonly controlPriceType;
|
|
8
|
+
private readonly controls;
|
|
9
|
+
private readonly params;
|
|
10
|
+
constructor(destroyRef: DestroyRef, controlPriceType: FormControl<Partial<CbmSalePriceModel.GetResponse.Data> | null>, controls: Omit<IPriceTypeExec, 'controlPriceType'>, params: IGetPriceTypeParams);
|
|
11
|
+
subObserver(): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DestroyRef } from "@angular/core";
|
|
2
|
+
import { FormControl } from "@angular/forms";
|
|
3
|
+
import { CbmItemModel } from "@cbm-common/cbm-types";
|
|
4
|
+
import { CbmItemDomainRepository } from "../../repositories/item.domain.repository";
|
|
5
|
+
import { CbmNotificationService } from "../notification/notification.service";
|
|
6
|
+
export declare class FindItemByCodeService {
|
|
7
|
+
private readonly destroyRef;
|
|
8
|
+
private readonly itemRepository;
|
|
9
|
+
private readonly notificationService;
|
|
10
|
+
private readonly codeControl;
|
|
11
|
+
private readonly itemControl;
|
|
12
|
+
constructor(destroyRef: DestroyRef, itemRepository: CbmItemDomainRepository, notificationService: CbmNotificationService, codeControl: FormControl<string>, itemControl: FormControl<Partial<CbmItemModel.ListResponse.Item> | null>);
|
|
13
|
+
loading: import("@angular/core").WritableSignal<boolean>;
|
|
14
|
+
findCode(code?: string): Promise<void>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DestroyRef } from "@angular/core";
|
|
2
|
+
import { FormControl } from "@angular/forms";
|
|
3
|
+
import { CbmServiceModel } from "../../models/service.domain.model";
|
|
4
|
+
import { CbmServiceDomainRepository } from "../../repositories/service.domain.repository";
|
|
5
|
+
import { CbmNotificationService } from "../notification/notification.service";
|
|
6
|
+
export declare class FindServiceCodeService {
|
|
7
|
+
private readonly destroyRef;
|
|
8
|
+
private readonly itemRepository;
|
|
9
|
+
private readonly notificationService;
|
|
10
|
+
private readonly codeControl;
|
|
11
|
+
private readonly serviceControl;
|
|
12
|
+
constructor(destroyRef: DestroyRef, itemRepository: CbmServiceDomainRepository, notificationService: CbmNotificationService, codeControl: FormControl<string>, serviceControl: FormControl<Partial<CbmServiceModel.ListResponse.Item> | null>);
|
|
13
|
+
loading: import("@angular/core").WritableSignal<boolean>;
|
|
14
|
+
findCode(code?: string): Promise<void>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DestroyRef } from "@angular/core";
|
|
2
|
+
import { CbmTaxIrbpnrModel } from "../../models/tax-irbpnr.domain.model";
|
|
3
|
+
import { CbmTaxIrbpnrDomainRepository } from "../../repositories/tax-irbpnr.domain.repository";
|
|
4
|
+
export declare class CbmIrbpnrDomainService {
|
|
5
|
+
private readonly destroyRef;
|
|
6
|
+
private readonly irbpnrRepository;
|
|
7
|
+
constructor(destroyRef: DestroyRef, irbpnrRepository: CbmTaxIrbpnrDomainRepository);
|
|
8
|
+
private irbpnrData;
|
|
9
|
+
get irbpnr(): CbmTaxIrbpnrModel.ListResponse.Data;
|
|
10
|
+
private getIrbpnr;
|
|
11
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { CbmAuthService } from
|
|
1
|
+
import { CbmAuthService } from '../auth/auth.service';
|
|
2
2
|
import { Socket } from 'ngx-socket-io';
|
|
3
3
|
import { Observable, Subject } from 'rxjs';
|
|
4
4
|
import { CbmWebSocketModel } from './web-socket.model';
|
|
5
5
|
export declare class CbmWebSocketService {
|
|
6
6
|
private socket;
|
|
7
7
|
private authService;
|
|
8
|
+
private pingIntervalId;
|
|
8
9
|
constructor(socket: Socket, authService: CbmAuthService);
|
|
9
10
|
socketOn(observer: Subject<string>): void;
|
|
10
11
|
refreshStock(): Observable<CbmWebSocketModel.RefreshStock>;
|
|
@@ -15,4 +16,11 @@ export declare class CbmWebSocketService {
|
|
|
15
16
|
joinImportExcel(): void;
|
|
16
17
|
logoutAuth<T = CbmWebSocketModel.LogoutAuth>(): Observable<T>;
|
|
17
18
|
joinLogoutAuth(): void;
|
|
19
|
+
startPing(intervalMs?: number): void;
|
|
20
|
+
stopPing(): void;
|
|
21
|
+
onPong<T = {
|
|
22
|
+
timestamp: number;
|
|
23
|
+
}>(): Observable<T>;
|
|
24
|
+
onConnectError<T = string>(): Observable<T>;
|
|
25
|
+
initPingPong(intervalMs?: number): void;
|
|
18
26
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ApplicationRef } from "@angular/core";
|
|
2
|
+
import { Router } from "@angular/router";
|
|
3
|
+
import { CbmWebSocketService } from "../../domain/services/web-socket/web-socket.service";
|
|
4
|
+
export declare function webSocketFactory(appRef: ApplicationRef, router: Router): CbmWebSocketService;
|
|
@@ -29,8 +29,8 @@ export declare enum PRICE_TYPE {
|
|
|
29
29
|
}
|
|
30
30
|
export interface IPriceTypeExec {
|
|
31
31
|
controlPriceType: FormControl<Partial<CbmSalePriceModel.GetResponse.Data> | null>;
|
|
32
|
-
controlItem
|
|
33
|
-
controlUnitMeasure
|
|
32
|
+
controlItem?: FormControl<Partial<CbmItemModel.ListResponse.Item> | null>;
|
|
33
|
+
controlUnitMeasure?: FormControl<Partial<CbmUnitMeasureModel.ListResponse.DataWithFactor> | null>;
|
|
34
34
|
controlPrice?: FormControl<string>;
|
|
35
35
|
controlDiscountPercentage?: FormControl<string>;
|
|
36
36
|
controlDiscount?: FormControl<string>;
|
|
@@ -45,3 +45,4 @@ export interface IGetPriceTypeParams {
|
|
|
45
45
|
price_list: Partial<CbmPriceListModel.ListResponse.Data>;
|
|
46
46
|
}
|
|
47
47
|
export declare function getPriceTypeExec(controls: IPriceTypeExec, params: IGetPriceTypeParams): void;
|
|
48
|
+
export declare function unlock(controls: IPriceTypeExec): void;
|