@cbm-common/cbm-types 0.0.217 → 0.0.218
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/domain/models/company-branch.domain.model.d.ts +33 -0
- package/lib/domain/models/sales-pending-document.domain.model.d.ts +2 -1
- package/lib/domain/repositories/company-branch.domain.repository.d.ts +1 -0
- package/lib/domain/services/item/find-item-code.domain.service.d.ts +15 -0
- package/lib/infrastructure/repositories/compony-branch.infrastructure.repository.d.ts +3 -2
- package/lib/infrastructure/services/company-branch.infrastructure.service.d.ts +4 -3
- package/package.json +1 -1
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
export declare namespace CbmCompanyBranchModel {
|
|
2
|
+
interface ListParamsPaginated {
|
|
3
|
+
page: number;
|
|
4
|
+
size: number;
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
company_id: string;
|
|
7
|
+
}
|
|
8
|
+
interface ListResponsePaginated {
|
|
9
|
+
success: boolean;
|
|
10
|
+
pageNum: number;
|
|
11
|
+
pageSize: number;
|
|
12
|
+
pages: number;
|
|
13
|
+
total: number;
|
|
14
|
+
items: ListResponse.Items[];
|
|
15
|
+
}
|
|
2
16
|
interface ListResponse {
|
|
3
17
|
success: boolean;
|
|
4
18
|
data: ListResponse.Data[];
|
|
@@ -18,6 +32,25 @@ export declare namespace CbmCompanyBranchModel {
|
|
|
18
32
|
created_at?: number;
|
|
19
33
|
logo?: string;
|
|
20
34
|
}
|
|
35
|
+
interface Items {
|
|
36
|
+
_id?: string;
|
|
37
|
+
company_id?: string;
|
|
38
|
+
identification_number?: string;
|
|
39
|
+
trade_name?: string;
|
|
40
|
+
address?: string;
|
|
41
|
+
email?: string;
|
|
42
|
+
cellphone?: string;
|
|
43
|
+
phone?: string;
|
|
44
|
+
logo?: string;
|
|
45
|
+
enabled?: boolean;
|
|
46
|
+
created_at?: number;
|
|
47
|
+
created_user?: string;
|
|
48
|
+
reading?: boolean;
|
|
49
|
+
transaction?: boolean;
|
|
50
|
+
company_logo?: boolean;
|
|
51
|
+
updated_at?: number;
|
|
52
|
+
updated_user?: string;
|
|
53
|
+
}
|
|
21
54
|
}
|
|
22
55
|
interface GetOneResponse {
|
|
23
56
|
success: boolean;
|
|
@@ -24,8 +24,10 @@ export declare namespace CbmSalesPendingDocumentModel {
|
|
|
24
24
|
_id: string;
|
|
25
25
|
created_at: number;
|
|
26
26
|
document_nomenclature: string;
|
|
27
|
+
document_number: string;
|
|
27
28
|
document_emission_point_number: string;
|
|
28
29
|
document_sequence: string;
|
|
30
|
+
new_document_number: string;
|
|
29
31
|
balance: number;
|
|
30
32
|
client_id: string;
|
|
31
33
|
client_payment_deadline?: number;
|
|
@@ -73,7 +75,6 @@ export declare namespace CbmSalesPendingDocumentModel {
|
|
|
73
75
|
client_branch_contact_full_name?: string;
|
|
74
76
|
client_branch_contact_cellphone?: string;
|
|
75
77
|
client_branch_contact_email?: string[];
|
|
76
|
-
new_document_number: string;
|
|
77
78
|
date: number;
|
|
78
79
|
type: string;
|
|
79
80
|
checked?: boolean;
|
|
@@ -5,6 +5,7 @@ export declare class CbmCompanyBranchRepository implements ICbmCompanyBranchRepo
|
|
|
5
5
|
private service;
|
|
6
6
|
constructor(service: ICbmCompanyBranchRepository);
|
|
7
7
|
list(companyId: string): Observable<CbmCompanyBranchModel.ListResponse>;
|
|
8
|
+
listParameters(params: CbmCompanyBranchModel.ListParamsPaginated): Observable<CbmCompanyBranchModel.ListResponsePaginated>;
|
|
8
9
|
getOne(id: string): Observable<CbmCompanyBranchModel.GetOneResponse>;
|
|
9
10
|
save(data: CbmCompanyBranchModel.SaveBody): Observable<CbmCompanyBranchModel.ConfirmResponse>;
|
|
10
11
|
update(id: string, data: CbmCompanyBranchModel.UpdateBody): Observable<CbmCompanyBranchModel.ConfirmResponse>;
|
|
@@ -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 FindItemCodeService {
|
|
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
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Observable } from
|
|
2
|
-
import { CbmCompanyBranchModel } from
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { CbmCompanyBranchModel } from '../../domain/models/company-branch.domain.model';
|
|
3
3
|
export interface ICbmCompanyBranchRepository {
|
|
4
4
|
list(companyId: string): Observable<CbmCompanyBranchModel.ListResponse>;
|
|
5
|
+
listParameters(params: CbmCompanyBranchModel.ListParamsPaginated): Observable<CbmCompanyBranchModel.ListResponsePaginated>;
|
|
5
6
|
getOne(id: string): Observable<CbmCompanyBranchModel.GetOneResponse>;
|
|
6
7
|
save(data: CbmCompanyBranchModel.SaveBody): Observable<CbmCompanyBranchModel.ConfirmResponse>;
|
|
7
8
|
update(id: string, data: CbmCompanyBranchModel.UpdateBody): Observable<CbmCompanyBranchModel.ConfirmResponse>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { HttpClient } from
|
|
2
|
-
import { Observable } from
|
|
3
|
-
import { CbmCompanyBranchModel } from
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { CbmCompanyBranchModel } from '../../domain/models/company-branch.domain.model';
|
|
4
4
|
export declare class CbmCompanyBranchService {
|
|
5
5
|
private http;
|
|
6
6
|
constructor(http: HttpClient);
|
|
7
7
|
private readonly url;
|
|
8
8
|
list(companyId: string): Observable<CbmCompanyBranchModel.ListResponse>;
|
|
9
|
+
listParameters(params: CbmCompanyBranchModel.ListParamsPaginated): Observable<CbmCompanyBranchModel.ListResponsePaginated>;
|
|
9
10
|
getOne(id: string): Observable<CbmCompanyBranchModel.GetOneResponse>;
|
|
10
11
|
save(data: CbmCompanyBranchModel.SaveBody): Observable<CbmCompanyBranchModel.ConfirmResponse>;
|
|
11
12
|
update(id: string, data: CbmCompanyBranchModel.UpdateBody): Observable<CbmCompanyBranchModel.ConfirmResponse>;
|