@cbm-common/cbm-types 0.0.358 → 0.0.360
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/accounting-seat/accounting-seat.d.ts +3 -1
- package/lib/components/add-client/add-client.d.ts +7 -1
- package/lib/components/add-client/constants.d.ts +1 -0
- package/lib/components/add-provider/add-provider.d.ts +8 -0
- package/lib/components/add-provider/constants.d.ts +1 -0
- package/lib/components/advanced-item-search-modal/advanced-item-search-modal.d.ts +3 -0
- package/lib/components/view-reports/view-reports.d.ts +6 -3
- package/lib/domain/models/provider.domain.model.d.ts +23 -3
- package/lib/domain/services/general.domain.service.d.ts +7 -2
- package/package.json +2 -2
|
@@ -2,6 +2,7 @@ import { DestroyRef, OnDestroy, OnInit } from '@angular/core';
|
|
|
2
2
|
import { CbmSeatModel } from '../../domain/models/seat.domain.model';
|
|
3
3
|
import { CbmReportFinancialsDomainRepository } from '../../domain/repositories/report-financials.domain.repository';
|
|
4
4
|
import { CbmSeatDomainRepository } from '../../domain/repositories/seat.domain.repository';
|
|
5
|
+
import { GeneralDomainService } from '../../domain/services/general.domain.service';
|
|
5
6
|
import { CbmNotificationService } from '../../domain/services/notification/notification.service';
|
|
6
7
|
import { TStatus } from './types';
|
|
7
8
|
export declare class CbmAccountingSeatComponent implements OnInit, OnDestroy {
|
|
@@ -9,6 +10,7 @@ export declare class CbmAccountingSeatComponent implements OnInit, OnDestroy {
|
|
|
9
10
|
private seatRepository;
|
|
10
11
|
private notificationService;
|
|
11
12
|
private destroyRef;
|
|
13
|
+
private generalService;
|
|
12
14
|
collectionOriginName: import("@angular/core").InputSignal<string>;
|
|
13
15
|
collectionOriginId: import("@angular/core").InputSignal<string>;
|
|
14
16
|
title: import("@angular/core").InputSignal<string | undefined>;
|
|
@@ -21,7 +23,7 @@ export declare class CbmAccountingSeatComponent implements OnInit, OnDestroy {
|
|
|
21
23
|
seatDetails: import("@angular/core").Signal<CbmSeatModel.FindByFilterResponse.Data.Detail[]>;
|
|
22
24
|
totalCredit: import("@angular/core").Signal<number>;
|
|
23
25
|
totalDebit: import("@angular/core").Signal<number>;
|
|
24
|
-
constructor(reportFinancesRepository: CbmReportFinancialsDomainRepository, seatRepository: CbmSeatDomainRepository, notificationService: CbmNotificationService, destroyRef: DestroyRef);
|
|
26
|
+
constructor(reportFinancesRepository: CbmReportFinancialsDomainRepository, seatRepository: CbmSeatDomainRepository, notificationService: CbmNotificationService, destroyRef: DestroyRef, generalService: GeneralDomainService);
|
|
25
27
|
ngOnInit(): void;
|
|
26
28
|
ngOnDestroy(): void;
|
|
27
29
|
makeInitialRequests(): void;
|
|
@@ -4,6 +4,7 @@ import { NgSelectComponent } from '@ng-select/ng-select';
|
|
|
4
4
|
import { Subject } from 'rxjs';
|
|
5
5
|
import { ListService, PaginatedListService } from '@cbm-common/data-access';
|
|
6
6
|
import { CbmClientCategoryModel } from '../../domain/models/client-category.domain.model';
|
|
7
|
+
import { CbmClientGroupModel } from '../../domain/models/client-group.domain.model';
|
|
7
8
|
import { CbmClientModel } from '../../domain/models/client.domain.model';
|
|
8
9
|
import { CbmDocumentTypeModel } from '../../domain/models/document-type.model';
|
|
9
10
|
import { CbmGeneralSettingsPartnersModel } from '../../domain/models/general-settings-partners.domain.model';
|
|
@@ -13,6 +14,7 @@ import { CbmSellerModel } from '../../domain/models/seller.domain.model';
|
|
|
13
14
|
import { CbmSettingsProfessionsModel } from '../../domain/models/settings-professions.domain.model';
|
|
14
15
|
import { CbmBillingDomainRepository } from '../../domain/repositories/billing.domain.repository';
|
|
15
16
|
import { CbmClientCategoryDomainRepository } from '../../domain/repositories/client-category.domain.repository';
|
|
17
|
+
import { CbmClientGroupRepository } from '../../domain/repositories/client-group.domain.repository';
|
|
16
18
|
import { CbmClientDomainRepository } from '../../domain/repositories/client.domain.repository';
|
|
17
19
|
import { CbmCountryCodeDomainRepository } from '../../domain/repositories/country-code.domain.repository';
|
|
18
20
|
import { CbmDocumentTypeDomainRepository } from '../../domain/repositories/document-type.domain.repository';
|
|
@@ -55,6 +57,7 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit, OnD
|
|
|
55
57
|
private sellerRepository;
|
|
56
58
|
private priceListRepository;
|
|
57
59
|
private clientCategoryRepository;
|
|
60
|
+
private clientGroupRepository;
|
|
58
61
|
private clientRepository;
|
|
59
62
|
private readonly generalSettingsPartnersRepository;
|
|
60
63
|
private rateRepository;
|
|
@@ -65,7 +68,7 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit, OnD
|
|
|
65
68
|
private readonly generalService;
|
|
66
69
|
private readonly territorialOrganizationRepository;
|
|
67
70
|
private readonly sourceIncomeRepository;
|
|
68
|
-
constructor(destroyRef: DestroyRef, documentTypeRepository: CbmDocumentTypeDomainRepository, notificationService: CbmNotificationService, billingRepository: CbmBillingDomainRepository, countryCodeRepository: CbmCountryCodeDomainRepository, sellerRepository: CbmSellerDomainRepository, priceListRepository: CbmPriceListDomainRepository, clientCategoryRepository: CbmClientCategoryDomainRepository, clientRepository: CbmClientDomainRepository, generalSettingsPartnersRepository: CbmGeneralSettingsPartnersDomainRepository, rateRepository: CbmRateDomainRepository, economicActivityRepository: CbmEconomicActivitiesDomainRepository, settingsProfessionsRepository: CbmSettingsProfessionsDomainRepository, personTypeUAFERepository: CbmPersonTypeUAFERepository, accountValidatorsDomainService: AccountValidatorsDomainService, generalService: GeneralDomainService, territorialOrganizationRepository: CbmTerritorialOrganizationRepository, sourceIncomeRepository: CbmSourceIncomeDomainRepository);
|
|
71
|
+
constructor(destroyRef: DestroyRef, documentTypeRepository: CbmDocumentTypeDomainRepository, notificationService: CbmNotificationService, billingRepository: CbmBillingDomainRepository, countryCodeRepository: CbmCountryCodeDomainRepository, sellerRepository: CbmSellerDomainRepository, priceListRepository: CbmPriceListDomainRepository, clientCategoryRepository: CbmClientCategoryDomainRepository, clientGroupRepository: CbmClientGroupRepository, clientRepository: CbmClientDomainRepository, generalSettingsPartnersRepository: CbmGeneralSettingsPartnersDomainRepository, rateRepository: CbmRateDomainRepository, economicActivityRepository: CbmEconomicActivitiesDomainRepository, settingsProfessionsRepository: CbmSettingsProfessionsDomainRepository, personTypeUAFERepository: CbmPersonTypeUAFERepository, accountValidatorsDomainService: AccountValidatorsDomainService, generalService: GeneralDomainService, territorialOrganizationRepository: CbmTerritorialOrganizationRepository, sourceIncomeRepository: CbmSourceIncomeDomainRepository);
|
|
69
72
|
ngOnDestroy(): void;
|
|
70
73
|
dropdownMenuRef: import("@angular/core").Signal<ElementRef<HTMLUListElement> | undefined>;
|
|
71
74
|
contactDetailsTableContainerRef: import("@angular/core").Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
@@ -87,6 +90,8 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit, OnD
|
|
|
87
90
|
allDocumentTypes: import("@angular/core").WritableSignal<CbmDocumentTypeModel.ListResponse.Data[]>;
|
|
88
91
|
documentTypes: import("@angular/core").WritableSignal<CbmDocumentTypeModel.ListResponse.Data[]>;
|
|
89
92
|
categories: import("@angular/core").WritableSignal<CbmClientCategoryModel.ListResponse.Data[]>;
|
|
93
|
+
clientGroups: import("@angular/core").WritableSignal<CbmClientGroupModel.ListResponse.Data[]>;
|
|
94
|
+
parentGroupNames: import("@angular/core").Signal<Map<string, string>>;
|
|
90
95
|
clientToUpdate: import("@angular/core").WritableSignal<CbmClientModel.GetOneResponse.Data | null>;
|
|
91
96
|
statusOfFetchDocumentTypes: import("@angular/core").WritableSignal<TStatus>;
|
|
92
97
|
statusOfExtractClientData: import("@angular/core").WritableSignal<TStatus>;
|
|
@@ -225,6 +230,7 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit, OnD
|
|
|
225
230
|
fetchDataByCedula(): void;
|
|
226
231
|
fetchDataByRuc(): void;
|
|
227
232
|
private checkRelatedDocument;
|
|
233
|
+
fetchClientGroups(): void;
|
|
228
234
|
fetchCategories(searchTerm?: string): void;
|
|
229
235
|
removeEmail(email: string): void;
|
|
230
236
|
private buildContactRow;
|
|
@@ -66,6 +66,7 @@ export declare class CbmAddProviderComponent implements OnInit, OnDestroy {
|
|
|
66
66
|
showIn: import("@angular/core").OutputEmitterRef<string>;
|
|
67
67
|
documentTypes: import("@angular/core").WritableSignal<CbmDocumentTypeModel.ListResponse.Data[]>;
|
|
68
68
|
categories: import("@angular/core").WritableSignal<CbmProviderGroupModel.ListAsTreeResponse.Category[]>;
|
|
69
|
+
parentGroupNames: import("@angular/core").WritableSignal<ReadonlyMap<string, string>>;
|
|
69
70
|
countryCodes: import("@angular/core").WritableSignal<CbmCountryCodeModel.ListResponse.Data[]>;
|
|
70
71
|
providerToUpdate: import("@angular/core").WritableSignal<CbmProviderModel.GetOneResponse.Data | null>;
|
|
71
72
|
isEmailInputFocused: import("@angular/core").WritableSignal<boolean>;
|
|
@@ -202,6 +203,12 @@ export declare class CbmAddProviderComponent implements OnInit, OnDestroy {
|
|
|
202
203
|
isDeadlineSelected(days: number | undefined): boolean;
|
|
203
204
|
toggleDeadline(days: number | undefined): void;
|
|
204
205
|
toggleAllDeadlines(): void;
|
|
206
|
+
/**
|
|
207
|
+
* Arma `deadline_data` para el backend a partir de los plazos marcados.
|
|
208
|
+
* Al registrar solo se envían los marcados; al editar se envían también los habilitados
|
|
209
|
+
* que se desmarcaron (`ind_enabled: false`) para que el backend pueda quitarlos.
|
|
210
|
+
*/
|
|
211
|
+
private buildDeadlineData;
|
|
205
212
|
formatDeadline(days: number | undefined): string;
|
|
206
213
|
compareWithId(a: {
|
|
207
214
|
_id: string;
|
|
@@ -227,6 +234,7 @@ export declare class CbmAddProviderComponent implements OnInit, OnDestroy {
|
|
|
227
234
|
fetchDataByRuc(): void;
|
|
228
235
|
fetchCountryCodes(): void;
|
|
229
236
|
private flattenCategories;
|
|
237
|
+
private collectParentGroupNames;
|
|
230
238
|
fetchCategories(searchTerm?: string): void;
|
|
231
239
|
addEmail(): void;
|
|
232
240
|
onEmailKeyDown(event: KeyboardEvent): void;
|
|
@@ -10,5 +10,6 @@ export declare const SUBJECT_CLASS_CODES: {
|
|
|
10
10
|
readonly PERSONA_NATURAL: "01";
|
|
11
11
|
readonly PERSONA_JURIDICA: "02";
|
|
12
12
|
};
|
|
13
|
+
export declare const ROOT_GROUP_LEVEL = 0;
|
|
13
14
|
export declare const SUBJECT_CLASSES: CbmAddProviderModel.SubjectClass[];
|
|
14
15
|
export declare const PERSONA_JURIDICA_DOCUMENT_TYPE_CODES: string[];
|
|
@@ -4,6 +4,7 @@ import { CbmAlternativeItemModel } from '../../domain/models/alternative-item.do
|
|
|
4
4
|
import { CbmItemModel } from '../../domain/models/item.domain.model';
|
|
5
5
|
import { CbmPriceListModel } from '../../domain/models/price-list.domain.model';
|
|
6
6
|
import { CbmItemDomainRepository } from '../../domain/repositories/item.domain.repository';
|
|
7
|
+
import { ItemListComponent } from './item-list/item-list';
|
|
7
8
|
import { CbmWarehouseModel } from '@cbm-common/cbm-types';
|
|
8
9
|
import { ITableColumn } from '../../domain/models/table-config.model';
|
|
9
10
|
export declare class CbmAdvancedItemSearchModal {
|
|
@@ -41,9 +42,11 @@ export declare class CbmAdvancedItemSearchModal {
|
|
|
41
42
|
close: import("@angular/core").OutputEmitterRef<void>;
|
|
42
43
|
addItem: import("@angular/core").OutputEmitterRef<CbmAlternativeItemModel.ListChildrenResponse.Data.Item | CbmItemModel.ListResponse.Item>;
|
|
43
44
|
addAllItems: import("@angular/core").OutputEmitterRef<CbmItemModel.ListResponse.Item[] | CbmAlternativeItemModel.ListChildrenResponse.Data.Item[]>;
|
|
45
|
+
itemListRef: import("@angular/core").Signal<ItemListComponent | undefined>;
|
|
44
46
|
isVisible: Subject<boolean>;
|
|
45
47
|
isVisible$: import("@angular/core").WritableSignal<boolean>;
|
|
46
48
|
selectedItem: import("@angular/core").WritableSignal<CbmItemModel.ListResponse.Item | null>;
|
|
49
|
+
selectedItemsCount: import("@angular/core").Signal<number>;
|
|
47
50
|
openModal(codeFilter?: string): void;
|
|
48
51
|
closeModal(): void;
|
|
49
52
|
sendItemInput(item: CbmItemModel.ListResponse.Item): void;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { HttpResponse } from '@angular/common/http';
|
|
1
2
|
import { DestroyRef } from '@angular/core';
|
|
2
3
|
import { CbmUploadDomainRepository } from '../../domain/repositories/upload.domain.repository';
|
|
4
|
+
import { GeneralDomainService } from '../../domain/services/general.domain.service';
|
|
3
5
|
import { CbmNotificationService } from '../../remotes/services.remote';
|
|
4
6
|
import { CbmViewReportModel } from './model';
|
|
5
7
|
import { Observable } from 'rxjs';
|
|
@@ -13,7 +15,8 @@ export declare class CbmViewReportComponent {
|
|
|
13
15
|
private readonly uploadRepository;
|
|
14
16
|
private readonly generalReportRepository;
|
|
15
17
|
private readonly notificationService;
|
|
16
|
-
|
|
18
|
+
private readonly generalService;
|
|
19
|
+
constructor(route: ActivatedRoute, destroyRef: DestroyRef, uploadRepository: CbmUploadDomainRepository, generalReportRepository: CbmGeneralReportRepository, notificationService: CbmNotificationService, generalService: GeneralDomainService);
|
|
17
20
|
reportId: import("@angular/core").InputSignal<string>;
|
|
18
21
|
othersFn: import("@angular/core").InputSignal<((request: any) => CbmViewReportModel.ReportData.Others[]) | undefined>;
|
|
19
22
|
collectionName: import("@angular/core").InputSignal<string>;
|
|
@@ -45,8 +48,8 @@ export declare class CbmViewReportComponent {
|
|
|
45
48
|
setMetadata(report: CbmViewReportModel.ReportData): void;
|
|
46
49
|
downloadReport(typeFile: 'excel' | 'pdf' | 'print'): Promise<CbmViewReportModel.Status>;
|
|
47
50
|
downloadExcel: (response: any) => void;
|
|
48
|
-
downloadPdf: (response:
|
|
49
|
-
printPdf: (response:
|
|
51
|
+
downloadPdf: (response: HttpResponse<Blob>) => void;
|
|
52
|
+
printPdf: (response: HttpResponse<Blob>) => void;
|
|
50
53
|
getReport(id: string): Promise<void>;
|
|
51
54
|
setRefresh(): void;
|
|
52
55
|
}
|
|
@@ -51,7 +51,10 @@ export declare namespace CbmProviderModel {
|
|
|
51
51
|
document_number_pay?: string;
|
|
52
52
|
document_type_pay_id?: string;
|
|
53
53
|
observation?: string;
|
|
54
|
+
/** Legado: el API actual no lo devuelve; los plazos de crédito vienen en `deadline_data`. */
|
|
54
55
|
payment_deadline?: number[];
|
|
56
|
+
/** Plazos de crédito configurados en el proveedor (solo vienen si el proveedor los tiene configurados). */
|
|
57
|
+
deadline_data?: DeadlineData[];
|
|
55
58
|
phone?: string;
|
|
56
59
|
disabled_reason?: string;
|
|
57
60
|
bank_code?: string;
|
|
@@ -79,6 +82,10 @@ export declare namespace CbmProviderModel {
|
|
|
79
82
|
is_related_party?: boolean;
|
|
80
83
|
subject_class_code?: string;
|
|
81
84
|
subject_class_description?: string;
|
|
85
|
+
employee_salary?: number;
|
|
86
|
+
economic_activity_id?: string;
|
|
87
|
+
economic_activity_code?: string;
|
|
88
|
+
rt_up?: boolean;
|
|
82
89
|
}
|
|
83
90
|
}
|
|
84
91
|
interface GetOneResponse {
|
|
@@ -110,7 +117,11 @@ export declare namespace CbmProviderModel {
|
|
|
110
117
|
user_inactive_at?: number;
|
|
111
118
|
disabled_reason?: string;
|
|
112
119
|
user_inactive_name?: string;
|
|
113
|
-
|
|
120
|
+
/** Legado: el API actual no lo devuelve; los plazos de crédito vienen en `deadline_data`. */
|
|
121
|
+
payment_deadline?: number[];
|
|
122
|
+
/** Plazos de crédito configurados en el proveedor (solo vienen si el proveedor los tiene configurados). */
|
|
123
|
+
deadline_data?: DeadlineData[];
|
|
124
|
+
bulk_load?: boolean;
|
|
114
125
|
bank_id?: string;
|
|
115
126
|
observation?: string;
|
|
116
127
|
phone?: string;
|
|
@@ -185,6 +196,7 @@ export declare namespace CbmProviderModel {
|
|
|
185
196
|
deleted?: boolean;
|
|
186
197
|
created_user?: string;
|
|
187
198
|
created_at?: number;
|
|
199
|
+
deleted_at?: number;
|
|
188
200
|
advance_account_id?: string;
|
|
189
201
|
receivable_account_id?: string;
|
|
190
202
|
updated_at?: number;
|
|
@@ -215,6 +227,14 @@ export declare namespace CbmProviderModel {
|
|
|
215
227
|
}
|
|
216
228
|
export {};
|
|
217
229
|
}
|
|
230
|
+
interface DeadlineData {
|
|
231
|
+
_id?: string;
|
|
232
|
+
deadline_id?: string;
|
|
233
|
+
deadlines: number;
|
|
234
|
+
quota_number?: number;
|
|
235
|
+
grace_days?: number;
|
|
236
|
+
ind_enabled: boolean;
|
|
237
|
+
}
|
|
218
238
|
interface SaveBody {
|
|
219
239
|
category_provider_id: string;
|
|
220
240
|
document_type_id: string;
|
|
@@ -234,7 +254,7 @@ export declare namespace CbmProviderModel {
|
|
|
234
254
|
economic_activity_id?: string;
|
|
235
255
|
economic_activity_code?: string;
|
|
236
256
|
is_related_party?: boolean;
|
|
237
|
-
|
|
257
|
+
deadline_data?: DeadlineData[];
|
|
238
258
|
subject_class_code: string;
|
|
239
259
|
subject_class_description: string;
|
|
240
260
|
}
|
|
@@ -256,7 +276,7 @@ export declare namespace CbmProviderModel {
|
|
|
256
276
|
employee_salary?: number;
|
|
257
277
|
economic_activity_id?: string;
|
|
258
278
|
economic_activity_code?: string;
|
|
259
|
-
|
|
279
|
+
deadline_data?: DeadlineData[];
|
|
260
280
|
subject_class_code?: string;
|
|
261
281
|
subject_class_description?: string;
|
|
262
282
|
}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
import { HttpResponse } from '@angular/common/http';
|
|
1
2
|
import { ValidatorFn } from '@angular/forms';
|
|
3
|
+
type BlobResponse = Pick<HttpResponse<Blob>, 'body' | 'headers'>;
|
|
2
4
|
export declare class GeneralDomainService {
|
|
3
5
|
modalShow(modalId: string): void;
|
|
4
6
|
modalHide(modalId: string): void;
|
|
5
7
|
isMobile(): boolean;
|
|
6
|
-
printPdf(response:
|
|
8
|
+
printPdf(response: BlobResponse): void;
|
|
7
9
|
closePrintPdf(): void;
|
|
8
|
-
downloadPdf(response:
|
|
10
|
+
downloadPdf(response: BlobResponse): void;
|
|
11
|
+
private getFileName;
|
|
12
|
+
private saveBlob;
|
|
9
13
|
getTimestampFromDate(localDate: string): number;
|
|
10
14
|
getDateStringFromTimestamp(timestamp: number): string;
|
|
11
15
|
findRoute(eventModule: string, collectionName: string): {
|
|
@@ -30,3 +34,4 @@ export declare function findRoute(eventModule: string, collectionName: string):
|
|
|
30
34
|
};
|
|
31
35
|
export declare function noWhitespaceValidator(): ValidatorFn;
|
|
32
36
|
export declare function amountValidator(): ValidatorFn;
|
|
37
|
+
export {};
|