@cbm-common/cbm-types 0.0.218 → 0.0.219
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/general.domain.model.d.ts +3 -1
- package/lib/domain/services/item-selection.domain.service.d.ts +79 -0
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
- package/lib/components/accounting-seat/directives/drop-down-menu.directive.d.ts +0 -13
- package/lib/components/accounting-seat/directives/drop-down.directive.d.ts +0 -10
- package/lib/components/record-detail-metadata/components/options/options.d.ts +0 -13
- package/lib/components/record-detail-metadata/directives/drop-down-menu.directive.d.ts +0 -13
- package/lib/components/record-detail-metadata/directives/drop-down.directive.d.ts +0 -9
- package/lib/domain/models/sales-pending-document.domain.model.d.ts +0 -92
- package/lib/domain/repositories/sales-pending-document.domain.repository.d.ts +0 -8
- package/lib/domain/services/item/find-item-code.domain.service.d.ts +0 -15
- package/lib/infrastructure/repositories/blanket-agreement-category-service..infrastructure.repository.d.ts +0 -7
- package/lib/infrastructure/repositories/sales-pending-document.infrastructure.repository.d.ts +0 -5
- package/lib/infrastructure/services/sales-pending-document.infrastructure.service.d.ts +0 -9
|
@@ -20,8 +20,10 @@ export declare namespace IGeneral {
|
|
|
20
20
|
ELEMENTS_RELATED_TO_EDITING = "No es posible editar este registro, ya que est\u00E1 vinculado a otros datos. Editarlo podr\u00EDa generar inconsistencias en la informaci\u00F3n relacionada.",
|
|
21
21
|
ELEMENTS_RELATED_TO_CHANGE_STATUS = "No es posible cambiar estado a este registro, ya que est\u00E1 vinculado a otros datos. Cambiarlo podr\u00EDa generar inconsistencias en la informaci\u00F3n relacionada.",
|
|
22
22
|
INTERNAL_ERROR = "Se ha producido un error inesperado al ejecutar la operaci\u00F3n. Por favor, int\u00E9ntalo nuevamente o contacta al soporte t\u00E9cnico.",
|
|
23
|
-
NO_DATA_FOUND = "No se encontraron datos que coincidan con los criterios de b\u00FAsqueda proporcionados."
|
|
23
|
+
NO_DATA_FOUND = "No se encontraron datos que coincidan con los criterios de b\u00FAsqueda proporcionados.",
|
|
24
|
+
WED_SOCKET_STOCK = "El stock de algunos art\u00EDculos ha sido actualizado debido a movimientos recientes en el almac\u00E9n."
|
|
24
25
|
}
|
|
26
|
+
type Item_manage_by = 'none' | 'series' | 'batch';
|
|
25
27
|
}
|
|
26
28
|
export declare enum STATE {
|
|
27
29
|
INIT = "init",
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { ChangeDetectorRef, DestroyRef } from "@angular/core";
|
|
2
|
+
import { CbmItemDomainRepository } from "../repositories/item.domain.repository";
|
|
3
|
+
import { CbmNotificationService } from "./notification/notification.service";
|
|
4
|
+
import { CbmGroupDomainRepository } from "../repositories/group.domain.repository";
|
|
5
|
+
import { CbmManufacturerRepository } from "../repositories/manufacturer.domain.repository";
|
|
6
|
+
import { CbmProviderRepository } from "../repositories/provider.domain.repository";
|
|
7
|
+
import { CbmWarehouseDomainRepository } from "../repositories/warehouse.domain.repository";
|
|
8
|
+
import { TableConfigurationService } from "./table-configuration.service";
|
|
9
|
+
import { CbmAlternativeItemDomainRepository } from "../repositories/alternative-item.domain.repository";
|
|
10
|
+
import { CbmWebSocketService } from "./web-socket/web-socket.service";
|
|
11
|
+
import { FormControl, FormGroup } from "@angular/forms";
|
|
12
|
+
import { IGeneral } from "../models/general.domain.model";
|
|
13
|
+
import { CbmManufacturerModel } from "../models/manufacturer.domain.model";
|
|
14
|
+
import { CbmGroupModel } from "../models/group.domain.model";
|
|
15
|
+
import { CbmProviderModel } from "../models/provider.domain.model";
|
|
16
|
+
import { CbmWarehouseModel } from "../models/warehouse.domain.model";
|
|
17
|
+
import { CbmItemModel } from "../models/item.domain.model";
|
|
18
|
+
import { CbmAlternativeItemModel } from "../models/alternative-item.domain.model";
|
|
19
|
+
export declare const PAGE_SIZE = 20;
|
|
20
|
+
export interface IPagination {
|
|
21
|
+
page: number;
|
|
22
|
+
size: number;
|
|
23
|
+
totalPages: number | null;
|
|
24
|
+
totalRecords: number;
|
|
25
|
+
}
|
|
26
|
+
export interface IItemWithChecked extends CbmItemModel.AdvancedItemListResponse.Item {
|
|
27
|
+
checked: boolean;
|
|
28
|
+
}
|
|
29
|
+
export type TStatus = 'init' | 'loading' | 'success' | 'failed';
|
|
30
|
+
export declare class ItemSelectionDomainService {
|
|
31
|
+
private itemRepository;
|
|
32
|
+
private destroyRef;
|
|
33
|
+
private readonly notificationService;
|
|
34
|
+
private readonly groupRepository;
|
|
35
|
+
private readonly manufacturerRepository;
|
|
36
|
+
private readonly providerRepository;
|
|
37
|
+
private readonly warehouseRepository;
|
|
38
|
+
private tableConfigService;
|
|
39
|
+
private alternativeItemRepository;
|
|
40
|
+
private readonly webSocketService;
|
|
41
|
+
private readonly changeDetectorRef;
|
|
42
|
+
constructor(itemRepository: CbmItemDomainRepository, destroyRef: DestroyRef, notificationService: CbmNotificationService, groupRepository: CbmGroupDomainRepository, manufacturerRepository: CbmManufacturerRepository, providerRepository: CbmProviderRepository, warehouseRepository: CbmWarehouseDomainRepository, tableConfigService: TableConfigurationService, alternativeItemRepository: CbmAlternativeItemDomainRepository, webSocketService: CbmWebSocketService, changeDetectorRef: ChangeDetectorRef);
|
|
43
|
+
itemsPagination: import("@angular/core").WritableSignal<IPagination>;
|
|
44
|
+
statusOfFetchItems: import("@angular/core").WritableSignal<TStatus>;
|
|
45
|
+
statusOfFetchAlternativeItems: import("@angular/core").WritableSignal<TStatus>;
|
|
46
|
+
items: import("@angular/core").WritableSignal<IItemWithChecked[]>;
|
|
47
|
+
rememberedItems: import("@angular/core").WritableSignal<IItemWithChecked[]>;
|
|
48
|
+
itemsNormal: import("@angular/core").WritableSignal<CbmItemModel.ListResponse.Item | null>;
|
|
49
|
+
alternativeItems: import("@angular/core").WritableSignal<CbmAlternativeItemModel.ListChildrenResponse.Data[]>;
|
|
50
|
+
addedItemsIds: import("@angular/core").WritableSignal<string[]>;
|
|
51
|
+
private searchCache;
|
|
52
|
+
computedItems: import("@angular/core").Signal<IItemWithChecked[]>;
|
|
53
|
+
areAllItemsChecked: import("@angular/core").Signal<boolean>;
|
|
54
|
+
computedAlternativeItems: import("@angular/core").Signal<CbmAlternativeItemModel.ListChildrenResponse.Data[]>;
|
|
55
|
+
itemForm: FormGroup<{
|
|
56
|
+
providerItemCode: FormControl<string | null>;
|
|
57
|
+
nameCode: FormControl<string | null>;
|
|
58
|
+
location: FormControl<string | null>;
|
|
59
|
+
manage_by: FormControl<IGeneral.Item_manage_by | null>;
|
|
60
|
+
manufacturer: FormControl<CbmManufacturerModel.ListResponse.Item | null>;
|
|
61
|
+
category: FormControl<CbmGroupModel.ListAsTreeResponse.Category | null>;
|
|
62
|
+
provider: FormControl<CbmProviderModel.ListResponse.Item | null>;
|
|
63
|
+
warehouse: FormControl<CbmWarehouseModel.ListResponse.Data | null>;
|
|
64
|
+
code: FormControl<string | null>;
|
|
65
|
+
checked: FormControl<boolean | null>;
|
|
66
|
+
}>;
|
|
67
|
+
private subWarehouseChanges;
|
|
68
|
+
private getCacheKey;
|
|
69
|
+
searchItems(): void;
|
|
70
|
+
fetchItems(): void;
|
|
71
|
+
onGoToPage(page: number): void;
|
|
72
|
+
onNextPage(page: number): void;
|
|
73
|
+
onPreviousPage(page: number): void;
|
|
74
|
+
onPageSizeChange(size: number): void;
|
|
75
|
+
searchAlternativeItems(item: CbmItemModel.ListResponse.Item): void;
|
|
76
|
+
removeRememberedItem(item: IItemWithChecked): void;
|
|
77
|
+
_addItem(item: CbmItemModel.ListResponse.Item): void;
|
|
78
|
+
toggleCheckAll(): void;
|
|
79
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -530,3 +530,6 @@ export * from './lib/components/excel-import-view/excel-import-view';
|
|
|
530
530
|
|
|
531
531
|
//#region excel import list
|
|
532
532
|
export * from './lib/components/excel-import-list/excel-import-list';
|
|
533
|
+
|
|
534
|
+
//#region item selection domain service
|
|
535
|
+
export * from './lib/domain/services/item-selection.domain.service';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, OnChanges, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
|
-
export declare class DropdownMenuDirective implements OnChanges, AfterViewInit {
|
|
3
|
-
private element;
|
|
4
|
-
private renderer2;
|
|
5
|
-
hiddenMenu: import("@angular/core").InputSignal<boolean>;
|
|
6
|
-
hiddenMenuOp: import("@angular/core").WritableSignal<boolean>;
|
|
7
|
-
constructor(element: ElementRef, renderer2: Renderer2);
|
|
8
|
-
ngAfterViewInit(): void;
|
|
9
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
10
|
-
toggle(event: Event): void;
|
|
11
|
-
private toggleMenu;
|
|
12
|
-
initStyle(): void;
|
|
13
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, Renderer2 } from '@angular/core';
|
|
2
|
-
export declare class DropdownDirective implements AfterViewInit {
|
|
3
|
-
private elementRef;
|
|
4
|
-
private renderer;
|
|
5
|
-
private isOpen;
|
|
6
|
-
constructor(elementRef: ElementRef, renderer: Renderer2);
|
|
7
|
-
ngAfterViewInit(): void;
|
|
8
|
-
toggleDropdown(event: MouseEvent): void;
|
|
9
|
-
closeDropdown(event: MouseEvent): void;
|
|
10
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { WritableSignal } from '@angular/core';
|
|
2
|
-
import { Router, ActivatedRoute, Params } from '@angular/router';
|
|
3
|
-
import { CbmRecordDetailMetadataModel } from "../../types";
|
|
4
|
-
export declare class OptionsComponent {
|
|
5
|
-
private router;
|
|
6
|
-
private route;
|
|
7
|
-
constructor(router: Router, route: ActivatedRoute);
|
|
8
|
-
metadata: import("@angular/core").InputSignal<CbmRecordDetailMetadataModel.metadata | null>;
|
|
9
|
-
options: import("@angular/core").InputSignal<CbmRecordDetailMetadataModel.options[] | undefined>;
|
|
10
|
-
optionInSignals: WritableSignal<WritableSignal<CbmRecordDetailMetadataModel.options>[]>;
|
|
11
|
-
executeFunction(option: WritableSignal<CbmRecordDetailMetadataModel.options>): void;
|
|
12
|
-
navigate(routerLink?: string, queryParams?: Params): void;
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, OnChanges, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
|
-
export declare class DropdownMenuDirective implements OnChanges, AfterViewInit {
|
|
3
|
-
private element;
|
|
4
|
-
private renderer2;
|
|
5
|
-
hiddenMenu: import("@angular/core").InputSignal<boolean>;
|
|
6
|
-
hiddenMenuOp: import("@angular/core").WritableSignal<boolean>;
|
|
7
|
-
constructor(element: ElementRef, renderer2: Renderer2);
|
|
8
|
-
ngAfterViewInit(): void;
|
|
9
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
10
|
-
toggle(event: Event): void;
|
|
11
|
-
private toggleMenu;
|
|
12
|
-
initStyle(): void;
|
|
13
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ElementRef, Renderer2 } from '@angular/core';
|
|
2
|
-
export declare class DropdownDirective {
|
|
3
|
-
private elementRef;
|
|
4
|
-
private renderer;
|
|
5
|
-
private isOpen;
|
|
6
|
-
constructor(elementRef: ElementRef, renderer: Renderer2);
|
|
7
|
-
toggleDropdown(event: MouseEvent): void;
|
|
8
|
-
closeDropdown(event: MouseEvent): void;
|
|
9
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
export declare namespace CbmSalesPendingDocumentModel {
|
|
2
|
-
type TTypeEstablishment = 'matrix' | 'branch';
|
|
3
|
-
export interface ListParams {
|
|
4
|
-
page: number;
|
|
5
|
-
size: number;
|
|
6
|
-
document_number?: string;
|
|
7
|
-
date_end?: number;
|
|
8
|
-
date_begin?: number;
|
|
9
|
-
client_id?: string;
|
|
10
|
-
client_branch_id?: string;
|
|
11
|
-
type?: string;
|
|
12
|
-
}
|
|
13
|
-
export interface ListResponse {
|
|
14
|
-
success: boolean;
|
|
15
|
-
pageNum: number;
|
|
16
|
-
pageSize: number;
|
|
17
|
-
pages: number;
|
|
18
|
-
total: number;
|
|
19
|
-
totales: ListResponse.totales;
|
|
20
|
-
items: ListResponse.Item[];
|
|
21
|
-
}
|
|
22
|
-
export namespace ListResponse {
|
|
23
|
-
interface Item {
|
|
24
|
-
_id: string;
|
|
25
|
-
created_at: number;
|
|
26
|
-
document_nomenclature: string;
|
|
27
|
-
document_number: string;
|
|
28
|
-
document_emission_point_number: string;
|
|
29
|
-
document_sequence: string;
|
|
30
|
-
new_document_number: string;
|
|
31
|
-
balance: number;
|
|
32
|
-
client_id: string;
|
|
33
|
-
client_payment_deadline?: number;
|
|
34
|
-
client_credit_limit?: number;
|
|
35
|
-
client_business_name: string;
|
|
36
|
-
client_trade_name: string;
|
|
37
|
-
client_document_number: string;
|
|
38
|
-
client_credit_application: boolean;
|
|
39
|
-
client_price_list_id: string;
|
|
40
|
-
client_price_list_code: string;
|
|
41
|
-
client_price_list_name: string;
|
|
42
|
-
client_document_type_id: string;
|
|
43
|
-
client_document_type_name: string;
|
|
44
|
-
client_document_type_code: string;
|
|
45
|
-
client_category_id: string;
|
|
46
|
-
client_category_name: string;
|
|
47
|
-
client_branch_id: string;
|
|
48
|
-
client_branch_code: string;
|
|
49
|
-
client_branch_name: string;
|
|
50
|
-
client_branch_address: string;
|
|
51
|
-
client_branch_email: string[];
|
|
52
|
-
client_branch_phone_code?: string;
|
|
53
|
-
client_branch_phone?: string;
|
|
54
|
-
client_branch_cellphone?: string;
|
|
55
|
-
client_branch_type_establishment: `${TTypeEstablishment}`;
|
|
56
|
-
client_branch_province_id?: string;
|
|
57
|
-
client_branch_province_code?: string;
|
|
58
|
-
client_branch_province_name?: string;
|
|
59
|
-
client_branch_canton_id?: string;
|
|
60
|
-
client_branch_canton_code?: string;
|
|
61
|
-
client_branch_canton_name?: string;
|
|
62
|
-
client_branch_parish_id?: string;
|
|
63
|
-
client_branch_parish_code?: string;
|
|
64
|
-
client_branch_parish_name?: string;
|
|
65
|
-
client_branch_longitude?: number;
|
|
66
|
-
client_branch_latitude?: number;
|
|
67
|
-
client_branch_seller_id: string;
|
|
68
|
-
client_branch_seller_identification_number: string;
|
|
69
|
-
client_branch_seller_full_name: string;
|
|
70
|
-
client_branch_seller_address: string;
|
|
71
|
-
client_branch_seller_email: string[];
|
|
72
|
-
client_branch_seller_cellphone: string;
|
|
73
|
-
client_branch_contact_id?: string;
|
|
74
|
-
client_branch_contact_identification_number?: string;
|
|
75
|
-
client_branch_contact_full_name?: string;
|
|
76
|
-
client_branch_contact_cellphone?: string;
|
|
77
|
-
client_branch_contact_email?: string[];
|
|
78
|
-
date: number;
|
|
79
|
-
type: string;
|
|
80
|
-
checked?: boolean;
|
|
81
|
-
}
|
|
82
|
-
interface totales {
|
|
83
|
-
total_retention?: number;
|
|
84
|
-
total_down_payment?: number;
|
|
85
|
-
total_credit_note?: number;
|
|
86
|
-
total_initial_balance_retention?: number;
|
|
87
|
-
total_initial_balance_down_payment?: number;
|
|
88
|
-
total_initial_balance_credit_note?: number;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
export {};
|
|
92
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { CbmSalesPendingDocumentModel } from '../models/sales-pending-document.domain.model';
|
|
3
|
-
import { ICbmSalesPendingDocumentRepository } from '../../infrastructure/repositories/sales-pending-document.infrastructure.repository';
|
|
4
|
-
export declare class CbmSalesPendingDocumentRepository implements ICbmSalesPendingDocumentRepository {
|
|
5
|
-
private service;
|
|
6
|
-
constructor(service: ICbmSalesPendingDocumentRepository);
|
|
7
|
-
list(params: CbmSalesPendingDocumentModel.ListParams): Observable<CbmSalesPendingDocumentModel.ListResponse>;
|
|
8
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
1
|
-
import { Observable } from "rxjs";
|
|
2
|
-
import { CbmBlanketAgreementCategoryServiceModel } from "../../domain/models/blanket-agreement-category-service.domain.model";
|
|
3
|
-
export interface ICbmBlanketAgreementCategoryServiceRepository {
|
|
4
|
-
list(params: CbmBlanketAgreementCategoryServiceModel.ListParams): Observable<CbmBlanketAgreementCategoryServiceModel.ListResponse>;
|
|
5
|
-
save(data: CbmBlanketAgreementCategoryServiceModel.SaveBody): Observable<CbmBlanketAgreementCategoryServiceModel.ConfirmResponse>;
|
|
6
|
-
delete(id: string): Observable<CbmBlanketAgreementCategoryServiceModel.ConfirmResponse>;
|
|
7
|
-
}
|
package/lib/infrastructure/repositories/sales-pending-document.infrastructure.repository.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { CbmSalesPendingDocumentModel } from '../../domain/models/sales-pending-document.domain.model';
|
|
3
|
-
export interface ICbmSalesPendingDocumentRepository {
|
|
4
|
-
list(params: CbmSalesPendingDocumentModel.ListParams): Observable<CbmSalesPendingDocumentModel.ListResponse>;
|
|
5
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { CbmSalesPendingDocumentModel } from '../../domain/models/sales-pending-document.domain.model';
|
|
4
|
-
export declare class CbmSalesPendingDocumentService {
|
|
5
|
-
private http;
|
|
6
|
-
constructor(http: HttpClient);
|
|
7
|
-
private readonly url;
|
|
8
|
-
list(params: CbmSalesPendingDocumentModel.ListParams): Observable<CbmSalesPendingDocumentModel.ListResponse>;
|
|
9
|
-
}
|