@senior-agronegocio/angular-components 0.0.9861 → 0.0.9863
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/bundles/senior-agronegocio-angular-components.umd.js +3023 -3484
- package/bundles/senior-agronegocio-angular-components.umd.js.map +1 -1
- package/bundles/senior-agronegocio-angular-components.umd.min.js +2 -2
- package/bundles/senior-agronegocio-angular-components.umd.min.js.map +1 -1
- package/common/agro-number-utils.class.d.ts +0 -6
- package/common/agro-object-utils.class.d.ts +10 -0
- package/common/agro-regex.constant.d.ts +0 -3
- package/common/agro-string-utils.class.d.ts +0 -3
- package/components/event-control-board/event-control-board.component.d.ts +17 -25
- package/components/event-control-board/index.d.ts +3 -1
- package/components/event-control-board/service/entity-service.d.ts +3 -3
- package/components/event-control-board/service/event-control-board.service.d.ts +13 -0
- package/components/event-control-board/service/origination/origination-dto.d.ts +1 -1
- package/{services → components/event-control-board/service}/producer-invoice/producer-invoice-dto.d.ts +4 -4
- package/components/event-control-board/service/producer-invoice/producer-invoice.module.d.ts +2 -0
- package/components/event-control-board/service/producer-invoice/producer-invoice.service.d.ts +11 -0
- package/components/financial-title-table/financial-title-table-options.interface.d.ts +10 -0
- package/components/financial-title-table/financial-title-table.component.d.ts +64 -0
- package/components/financial-title-table/financial-title-table.module.d.ts +2 -0
- package/components/financial-title-table/index.d.ts +4 -0
- package/components/financial-title-table/services/financial/agro-financial.service.d.ts +23 -0
- package/components/financial-title-table/services/financial/enums.d.ts +27 -0
- package/components/financial-title-table/services/financial/index.d.ts +1 -0
- package/components/financial-title-table/services/financial/intefaces.d.ts +107 -0
- package/components/index.d.ts +1 -1
- package/esm2015/common/agro-number-utils.class.js +1 -18
- package/esm2015/common/agro-object-utils.class.js +29 -1
- package/esm2015/common/agro-platform-utils.class.js +7 -8
- package/esm2015/common/agro-regex.constant.js +2 -5
- package/esm2015/common/agro-string-utils.class.js +11 -27
- package/esm2015/components/cancel-event-dialog/cancel-event-dialog-config.js +1 -1
- package/esm2015/components/event-control-board/event-control-board.component.js +90 -110
- package/esm2015/components/event-control-board/event-control-board.module.js +5 -2
- package/esm2015/components/event-control-board/index.js +4 -2
- package/esm2015/components/event-control-board/service/entity-service.js +27 -25
- package/esm2015/components/event-control-board/service/event-control-board.service.js +37 -0
- package/esm2015/components/event-control-board/service/origination/origination-dto.js +1 -1
- package/esm2015/components/event-control-board/service/producer-invoice/producer-invoice-dto.js +1 -0
- package/esm2015/components/event-control-board/service/producer-invoice/producer-invoice.module.js +26 -0
- package/esm2015/components/event-control-board/service/producer-invoice/producer-invoice.service.js +24 -0
- package/esm2015/components/financial-title-table/financial-title-table-options.interface.js +1 -0
- package/esm2015/components/financial-title-table/financial-title-table.component.js +300 -0
- package/esm2015/components/financial-title-table/financial-title-table.module.js +43 -0
- package/esm2015/components/financial-title-table/index.js +4 -0
- package/esm2015/components/financial-title-table/services/financial/agro-financial.service.js +64 -0
- package/esm2015/components/financial-title-table/services/financial/enums.js +33 -0
- package/esm2015/components/financial-title-table/services/financial/index.js +2 -0
- package/esm2015/components/financial-title-table/services/financial/intefaces.js +1 -0
- package/esm2015/components/index.js +2 -2
- package/esm2015/lib-translation.module.js +1 -3
- package/esm2015/pipe/index.js +1 -5
- package/esm2015/public-api.js +6 -6
- package/esm2015/senior-agronegocio-angular-components.js +2 -3
- package/esm2015/services/entity-service.js +12 -14
- package/esm2015/services/i18n/en-US.js +30 -9
- package/esm2015/services/i18n/es-CO.js +31 -10
- package/esm2015/services/i18n/pt-BR.js +290 -272
- package/esm2015/services/index.js +1 -1
- package/esm2015/services/lib-translation.service.js +3 -3
- package/esm5/common/agro-number-utils.class.js +1 -19
- package/esm5/common/agro-object-utils.class.js +29 -1
- package/esm5/common/agro-platform-utils.class.js +7 -8
- package/esm5/common/agro-regex.constant.js +2 -5
- package/esm5/common/agro-string-utils.class.js +11 -27
- package/esm5/components/cancel-event-dialog/cancel-event-dialog-config.js +1 -1
- package/esm5/components/event-control-board/event-control-board.component.js +91 -113
- package/esm5/components/event-control-board/event-control-board.module.js +5 -2
- package/esm5/components/event-control-board/index.js +4 -2
- package/esm5/components/event-control-board/service/entity-service.js +26 -24
- package/esm5/components/event-control-board/service/event-control-board.service.js +38 -0
- package/esm5/components/event-control-board/service/origination/origination-dto.js +1 -1
- package/esm5/components/event-control-board/service/producer-invoice/producer-invoice-dto.js +1 -0
- package/esm5/components/event-control-board/service/producer-invoice/producer-invoice.module.js +29 -0
- package/esm5/components/event-control-board/service/producer-invoice/producer-invoice.service.js +27 -0
- package/esm5/components/financial-title-table/financial-title-table-options.interface.js +1 -0
- package/esm5/components/financial-title-table/financial-title-table.component.js +320 -0
- package/esm5/components/financial-title-table/financial-title-table.module.js +46 -0
- package/esm5/components/financial-title-table/index.js +4 -0
- package/esm5/components/financial-title-table/services/financial/agro-financial.service.js +71 -0
- package/esm5/components/financial-title-table/services/financial/enums.js +33 -0
- package/esm5/components/financial-title-table/services/financial/index.js +2 -0
- package/esm5/components/financial-title-table/services/financial/intefaces.js +1 -0
- package/esm5/components/index.js +2 -2
- package/esm5/lib-translation.module.js +1 -3
- package/esm5/pipe/index.js +1 -5
- package/esm5/public-api.js +6 -6
- package/esm5/senior-agronegocio-angular-components.js +2 -3
- package/esm5/services/entity-service.js +11 -13
- package/esm5/services/i18n/en-US.js +30 -9
- package/esm5/services/i18n/es-CO.js +31 -10
- package/esm5/services/i18n/pt-BR.js +290 -272
- package/esm5/services/index.js +1 -1
- package/esm5/services/lib-translation.service.js +3 -3
- package/fesm2015/senior-agronegocio-angular-components.js +2831 -3199
- package/fesm2015/senior-agronegocio-angular-components.js.map +1 -1
- package/fesm5/senior-agronegocio-angular-components.js +3028 -3475
- package/fesm5/senior-agronegocio-angular-components.js.map +1 -1
- package/package.json +55 -7
- package/pipe/index.d.ts +0 -4
- package/public-api.d.ts +5 -5
- package/senior-agronegocio-angular-components.d.ts +1 -2
- package/senior-agronegocio-angular-components.metadata.json +1 -1
- package/services/entity-service.d.ts +1 -2
- package/services/i18n/en-US.d.ts +29 -8
- package/services/i18n/es-CO.d.ts +29 -8
- package/services/i18n/pt-BR.d.ts +288 -270
- package/common/agro-object-stringifier.class.d.ts +0 -16
- package/components/modal-invoice-pj/for-fixation/modal-fixation-options.interface.d.ts +0 -5
- package/components/modal-invoice-pj/for-fixation/modal-invoice-pj-for-fixation.component.d.ts +0 -35
- package/components/modal-invoice-pj/for-fixation/modal-invoice-pj-for-fixation.module.d.ts +0 -2
- package/components/modal-invoice-pj/for-origination/modal-invoice-pj-for-origination.component.d.ts +0 -26
- package/components/modal-invoice-pj/for-origination/modal-invoice-pj-for-origination.module.d.ts +0 -2
- package/components/modal-invoice-pj/for-transfer/modal-invoice-pj-for-transfer.component.d.ts +0 -26
- package/components/modal-invoice-pj/for-transfer/modal-invoice-pj-for-transfer.module.d.ts +0 -2
- package/components/modal-invoice-pj/index.d.ts +0 -9
- package/components/modal-invoice-pj/modal-invoice-pj-base.class.d.ts +0 -53
- package/components/modal-invoice-pj/modal-invoice-pj-options.interface.d.ts +0 -10
- package/components/modal-invoice-pj/modal-shared-imports.d.ts +0 -8
- package/components/modal-invoice-pj/services/agro-invoice/agro-invoice.module.d.ts +0 -2
- package/components/modal-invoice-pj/services/agro-invoice/agro-invoice.service.d.ts +0 -16
- package/components/modal-invoice-pj/services/agro-invoice/index.d.ts +0 -2
- package/components/modal-invoice-pj/services/agro-invoice/interfaces.d.ts +0 -75
- package/esm2015/common/agro-object-stringifier.class.js +0 -31
- package/esm2015/components/modal-invoice-pj/for-fixation/modal-fixation-options.interface.js +0 -1
- package/esm2015/components/modal-invoice-pj/for-fixation/modal-invoice-pj-for-fixation.component.js +0 -189
- package/esm2015/components/modal-invoice-pj/for-fixation/modal-invoice-pj-for-fixation.module.js +0 -16
- package/esm2015/components/modal-invoice-pj/for-origination/modal-invoice-pj-for-origination.component.js +0 -60
- package/esm2015/components/modal-invoice-pj/for-origination/modal-invoice-pj-for-origination.module.js +0 -16
- package/esm2015/components/modal-invoice-pj/for-transfer/modal-invoice-pj-for-transfer.component.js +0 -60
- package/esm2015/components/modal-invoice-pj/for-transfer/modal-invoice-pj-for-transfer.module.js +0 -16
- package/esm2015/components/modal-invoice-pj/index.js +0 -8
- package/esm2015/components/modal-invoice-pj/modal-invoice-pj-base.class.js +0 -193
- package/esm2015/components/modal-invoice-pj/modal-invoice-pj-options.interface.js +0 -1
- package/esm2015/components/modal-invoice-pj/modal-shared-imports.js +0 -32
- package/esm2015/components/modal-invoice-pj/services/agro-invoice/agro-invoice.module.js +0 -28
- package/esm2015/components/modal-invoice-pj/services/agro-invoice/agro-invoice.service.js +0 -49
- package/esm2015/components/modal-invoice-pj/services/agro-invoice/index.js +0 -3
- package/esm2015/components/modal-invoice-pj/services/agro-invoice/interfaces.js +0 -13
- package/esm2015/pipe/cnpj-cpf/cnpj-cpf.pipe.js +0 -28
- package/esm2015/pipe/cnpj-cpf/cnpj-cpf.pipe.module.js +0 -15
- package/esm2015/pipe/cnpj-cpf/index.js +0 -3
- package/esm2015/pipe/kilogram/index.js +0 -3
- package/esm2015/pipe/kilogram/kilogram.module.js +0 -17
- package/esm2015/pipe/kilogram/kilogram.pipe.js +0 -38
- package/esm2015/pipe/stringifier/index.js +0 -3
- package/esm2015/pipe/stringifier/stringifier.pipe.js +0 -13
- package/esm2015/pipe/stringifier/stringifier.pipe.module.js +0 -15
- package/esm2015/pipe/telephone/index.js +0 -3
- package/esm2015/pipe/telephone/telephone.pipe.js +0 -91
- package/esm2015/pipe/telephone/telephone.pipe.module.js +0 -15
- package/esm2015/services/producer-invoice/producer-invoice-dto.js +0 -1
- package/esm2015/services/producer-invoice/producer-invoice.service.js +0 -64
- package/esm5/common/agro-object-stringifier.class.js +0 -35
- package/esm5/components/modal-invoice-pj/for-fixation/modal-fixation-options.interface.js +0 -1
- package/esm5/components/modal-invoice-pj/for-fixation/modal-invoice-pj-for-fixation.component.js +0 -221
- package/esm5/components/modal-invoice-pj/for-fixation/modal-invoice-pj-for-fixation.module.js +0 -19
- package/esm5/components/modal-invoice-pj/for-origination/modal-invoice-pj-for-origination.component.js +0 -63
- package/esm5/components/modal-invoice-pj/for-origination/modal-invoice-pj-for-origination.module.js +0 -19
- package/esm5/components/modal-invoice-pj/for-transfer/modal-invoice-pj-for-transfer.component.js +0 -63
- package/esm5/components/modal-invoice-pj/for-transfer/modal-invoice-pj-for-transfer.module.js +0 -19
- package/esm5/components/modal-invoice-pj/index.js +0 -8
- package/esm5/components/modal-invoice-pj/modal-invoice-pj-base.class.js +0 -210
- package/esm5/components/modal-invoice-pj/modal-invoice-pj-options.interface.js +0 -1
- package/esm5/components/modal-invoice-pj/modal-shared-imports.js +0 -32
- package/esm5/components/modal-invoice-pj/services/agro-invoice/agro-invoice.module.js +0 -31
- package/esm5/components/modal-invoice-pj/services/agro-invoice/agro-invoice.service.js +0 -56
- package/esm5/components/modal-invoice-pj/services/agro-invoice/index.js +0 -3
- package/esm5/components/modal-invoice-pj/services/agro-invoice/interfaces.js +0 -13
- package/esm5/pipe/cnpj-cpf/cnpj-cpf.pipe.js +0 -35
- package/esm5/pipe/cnpj-cpf/cnpj-cpf.pipe.module.js +0 -18
- package/esm5/pipe/cnpj-cpf/index.js +0 -3
- package/esm5/pipe/kilogram/index.js +0 -3
- package/esm5/pipe/kilogram/kilogram.module.js +0 -20
- package/esm5/pipe/kilogram/kilogram.pipe.js +0 -41
- package/esm5/pipe/stringifier/index.js +0 -3
- package/esm5/pipe/stringifier/stringifier.pipe.js +0 -16
- package/esm5/pipe/stringifier/stringifier.pipe.module.js +0 -18
- package/esm5/pipe/telephone/index.js +0 -3
- package/esm5/pipe/telephone/telephone.pipe.js +0 -95
- package/esm5/pipe/telephone/telephone.pipe.module.js +0 -18
- package/esm5/services/producer-invoice/producer-invoice-dto.js +0 -1
- package/esm5/services/producer-invoice/producer-invoice.service.js +0 -72
- package/pipe/cnpj-cpf/cnpj-cpf.pipe.d.ts +0 -4
- package/pipe/cnpj-cpf/cnpj-cpf.pipe.module.d.ts +0 -2
- package/pipe/cnpj-cpf/index.d.ts +0 -2
- package/pipe/kilogram/index.d.ts +0 -2
- package/pipe/kilogram/kilogram.module.d.ts +0 -2
- package/pipe/kilogram/kilogram.pipe.d.ts +0 -8
- package/pipe/stringifier/index.d.ts +0 -2
- package/pipe/stringifier/stringifier.pipe.d.ts +0 -9
- package/pipe/stringifier/stringifier.pipe.module.d.ts +0 -2
- package/pipe/telephone/index.d.ts +0 -2
- package/pipe/telephone/telephone.pipe.d.ts +0 -21
- package/pipe/telephone/telephone.pipe.module.d.ts +0 -2
- package/services/producer-invoice/producer-invoice.service.d.ts +0 -18
|
@@ -68,10 +68,4 @@ export declare class AgroNumberUtils {
|
|
|
68
68
|
* @returns O número arredondado.
|
|
69
69
|
*/
|
|
70
70
|
static roundTo(value: number, decimals?: number): number;
|
|
71
|
-
/**
|
|
72
|
-
* Pega apenas números, convertendo strings para números e retornarndo apenas o maior inteiro encontrado.
|
|
73
|
-
* @param value - O valor a ser processado.
|
|
74
|
-
* @returns O maior número inteiro encontrado ou 0 se nenhum número for encontrado.
|
|
75
|
-
*/
|
|
76
|
-
static getNearInteger(value: any): number;
|
|
77
71
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FieldType } from "@seniorsistemas/angular-components";
|
|
1
2
|
export { AgroObjectUtils as AOU, AgroObjectUtils as ObjectUtils };
|
|
2
3
|
/**
|
|
3
4
|
* Classe utilitária para operações de objeto.
|
|
@@ -158,4 +159,13 @@ export declare class AgroObjectUtils {
|
|
|
158
159
|
* @param value
|
|
159
160
|
*/
|
|
160
161
|
static fromString(value: string): any;
|
|
162
|
+
/**
|
|
163
|
+
* Retorna o valor de uma propriedade de um objeto, formatado conforme o tipo especificado.
|
|
164
|
+
*
|
|
165
|
+
* @param obj - O objeto do qual a propriedade será extraída.
|
|
166
|
+
* @param path - O caminho da propriedade no objeto (pode ser um caminho aninhado).
|
|
167
|
+
* @param type - O tipo de formatação a ser aplicada (String, Date, Money).
|
|
168
|
+
* @returns O valor formatado da propriedade.
|
|
169
|
+
*/
|
|
170
|
+
static getPropAndFormatValue(obj: any, path: any, type: FieldType): any;
|
|
161
171
|
}
|
|
@@ -91,7 +91,4 @@ export declare class AgroStringUtils {
|
|
|
91
91
|
static applyMask(value: string, mask: AgroStringMasks | string): string;
|
|
92
92
|
static isValid(str: NullableString): boolean;
|
|
93
93
|
static isInvalid(str: NullableString): boolean;
|
|
94
|
-
static isISODate(value: string): boolean;
|
|
95
|
-
static isISOTime(value: string): boolean;
|
|
96
|
-
static isISODatetime(value: string): boolean;
|
|
97
94
|
}
|
|
@@ -1,33 +1,25 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from
|
|
2
|
-
import { FormBuilder, FormGroup } from
|
|
3
|
-
import { BadgeColors, ButtonPriority, FormField, Step } from
|
|
4
|
-
import { DialogService, MessageService } from
|
|
5
|
-
import { AGRO_NUMBERS } from
|
|
6
|
-
import { LibTranslationService } from
|
|
7
|
-
import { WebsocketService } from
|
|
8
|
-
import { CancelEventDialogConfig } from
|
|
9
|
-
import { EventOrigin } from
|
|
10
|
-
import { EventStatus } from
|
|
11
|
-
import { E070Emp } from
|
|
12
|
-
import { E070Fil } from
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { PaginatorStorageService } from './service/paginator-storage.service';
|
|
16
|
-
import { TransferService } from './service/transfer/transfer.service';
|
|
17
|
-
import { FixationService } from './service/fixation-entity/fixation.service';
|
|
18
|
-
import { ProducerInvoiceService } from '../../services/producer-invoice/producer-invoice.service';
|
|
1
|
+
import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from "@angular/core";
|
|
2
|
+
import { FormBuilder, FormGroup } from "@angular/forms";
|
|
3
|
+
import { BadgeColors, ButtonPriority, FormField, Step } from "@seniorsistemas/angular-components";
|
|
4
|
+
import { DialogService, MessageService } from "primeng";
|
|
5
|
+
import { AGRO_NUMBERS } from "../../enums/agro-numbers.enum";
|
|
6
|
+
import { LibTranslationService } from "../../services/lib-translation.service";
|
|
7
|
+
import { WebsocketService } from "../../services/websocket";
|
|
8
|
+
import { CancelEventDialogConfig } from "../cancel-event-dialog/cancel-event-dialog-config";
|
|
9
|
+
import { EventOrigin } from "./common/event-origin";
|
|
10
|
+
import { EventStatus } from "./common/event-status";
|
|
11
|
+
import { E070Emp } from "./service/e070emp/e070emp";
|
|
12
|
+
import { E070Fil } from "./service/e070fil/e070fil";
|
|
13
|
+
import { EventControlBoardService } from "./service/event-control-board.service";
|
|
14
|
+
import { PaginatorStorageService } from "./service/paginator-storage.service";
|
|
19
15
|
export declare class EventControlBoardComponent implements OnInit, OnDestroy, OnChanges {
|
|
20
16
|
private readonly translate;
|
|
21
17
|
private readonly formBuilder;
|
|
22
18
|
private readonly websocketService;
|
|
19
|
+
private readonly eventControlBoardService;
|
|
23
20
|
private readonly paginatorStorageService;
|
|
24
21
|
private readonly messageService;
|
|
25
22
|
private readonly dialogService;
|
|
26
|
-
eventControlService: EventControlService;
|
|
27
|
-
eventControlItemService: EventControlItemService;
|
|
28
|
-
transferService: TransferService;
|
|
29
|
-
producerInvoiceService: ProducerInvoiceService;
|
|
30
|
-
fixationService: FixationService;
|
|
31
23
|
company: E070Emp;
|
|
32
24
|
branch: E070Fil;
|
|
33
25
|
controlCode: string[];
|
|
@@ -42,7 +34,7 @@ export declare class EventControlBoardComponent implements OnInit, OnDestroy, On
|
|
|
42
34
|
producerInvoice: any;
|
|
43
35
|
steps: Step[];
|
|
44
36
|
selectedStep: any;
|
|
45
|
-
eventId:
|
|
37
|
+
eventId: "";
|
|
46
38
|
showSidebar: boolean;
|
|
47
39
|
showReprocessButton: boolean;
|
|
48
40
|
sidebarTitle: string;
|
|
@@ -64,7 +56,7 @@ export declare class EventControlBoardComponent implements OnInit, OnDestroy, On
|
|
|
64
56
|
private readonly eventItem;
|
|
65
57
|
private readonly inputFieldsPath;
|
|
66
58
|
private readonly invoiceTypeTranslate;
|
|
67
|
-
constructor(translate: LibTranslationService, formBuilder: FormBuilder, websocketService: WebsocketService, paginatorStorageService: PaginatorStorageService, messageService: MessageService, dialogService: DialogService
|
|
59
|
+
constructor(translate: LibTranslationService, formBuilder: FormBuilder, websocketService: WebsocketService, eventControlBoardService: EventControlBoardService, paginatorStorageService: PaginatorStorageService, messageService: MessageService, dialogService: DialogService);
|
|
68
60
|
ngOnInit(): Promise<void>;
|
|
69
61
|
ngOnChanges(changes: SimpleChanges): void;
|
|
70
62
|
private updateCompanyAndBranchFormFields;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
export { EventControlBoardComponent } from "./event-control-board.component";
|
|
2
|
+
export { EventControlBoardService } from "./service/event-control-board.service";
|
|
1
3
|
export { SharedModule } from "./shared.module";
|
|
2
4
|
export { EventControlBoardModule } from "./event-control-board.module";
|
|
3
|
-
export { EventControlBoardComponent } from "./event-control-board.component";
|
|
4
5
|
export { EventStepsModule } from "../event-steps/index";
|
|
5
6
|
export { FixationModule } from "./service/fixation-entity/fixation.module";
|
|
6
7
|
export { E001pesModule } from "./service/e001pes/e001pes.module";
|
|
@@ -14,6 +15,7 @@ export { EventControlItemModule } from "./service/event-control-item/event-contr
|
|
|
14
15
|
export { ExternalInvoiceModule } from "./service/external-invoice/external-invoice.module";
|
|
15
16
|
export { InvoiceModule } from "./service/invoice/invoice.module";
|
|
16
17
|
export { OriginationModule } from "./service/origination/origination.module";
|
|
18
|
+
export { ProducerInvoiceModule } from "./service/producer-invoice/producer-invoice.module";
|
|
17
19
|
export { RuralEstateModule } from "./service/rural-estate/rural-estate.module";
|
|
18
20
|
export { TicketModule } from "./service/ticket/ticket.module";
|
|
19
21
|
export { PaginatorStorageService } from "./service/paginator-storage.service";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HttpParams, HttpClient } from
|
|
2
|
-
import { MessageService, SortMeta } from
|
|
3
|
-
import { LibTranslationService } from
|
|
1
|
+
import { HttpParams, HttpClient } from "@angular/common/http";
|
|
2
|
+
import { MessageService, SortMeta } from "primeng";
|
|
3
|
+
import { LibTranslationService } from "../../../services/lib-translation.service";
|
|
4
4
|
export declare class EntityService<T> {
|
|
5
5
|
protected http: HttpClient;
|
|
6
6
|
protected messageService: MessageService;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EventControlItemService } from "./event-control-item/event-control-item.service";
|
|
2
|
+
import { EventControlService } from "./event-control/event-control.service";
|
|
3
|
+
import { ProducerInvoiceService } from "./producer-invoice/producer-invoice.service";
|
|
4
|
+
import { TransferService } from "./transfer/transfer.service";
|
|
5
|
+
import { FixationService } from "./fixation-entity/fixation.service";
|
|
6
|
+
export declare class EventControlBoardService {
|
|
7
|
+
eventControlService: EventControlService;
|
|
8
|
+
eventControlItemService: EventControlItemService;
|
|
9
|
+
transferService: TransferService;
|
|
10
|
+
producerInvoiceService: ProducerInvoiceService;
|
|
11
|
+
fixationService: FixationService;
|
|
12
|
+
constructor(eventControlService: EventControlService, eventControlItemService: EventControlItemService, transferService: TransferService, producerInvoiceService: ProducerInvoiceService, fixationService: FixationService);
|
|
13
|
+
}
|
|
@@ -11,7 +11,7 @@ import { DocumentsToIssue } from "../../common/documentsToIssue";
|
|
|
11
11
|
import { RuralEstateDto } from "../rural-estate/rural-estate-dto";
|
|
12
12
|
import { TicketDto } from "../ticket/ticket-dto";
|
|
13
13
|
import { ExternalInvoiceDto } from "../external-invoice/external-invoice-dto";
|
|
14
|
-
import { ProducerInvoiceDto } from "
|
|
14
|
+
import { ProducerInvoiceDto } from "../producer-invoice/producer-invoice-dto";
|
|
15
15
|
import { ControlStatus } from "../../common/control-status";
|
|
16
16
|
export interface OriginationDto {
|
|
17
17
|
id?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { E001pesDto } from "
|
|
2
|
-
import { ExternalInvoiceDto } from "
|
|
3
|
-
import { OriginationDto } from "
|
|
4
|
-
import { RuralEstateDto } from "
|
|
1
|
+
import { E001pesDto } from "../e001pes/e001pes-dto";
|
|
2
|
+
import { ExternalInvoiceDto } from "../external-invoice/external-invoice-dto";
|
|
3
|
+
import { OriginationDto } from "../origination/origination-dto";
|
|
4
|
+
import { RuralEstateDto } from "../rural-estate/rural-estate-dto";
|
|
5
5
|
export interface ProducerInvoiceDto {
|
|
6
6
|
id?: string;
|
|
7
7
|
balanceEntryControl?: OriginationDto;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { MessageService } from 'primeng/api';
|
|
3
|
+
import { LibTranslationService as TranslateService } from "../../../../services/lib-translation.service";
|
|
4
|
+
import { ProducerInvoiceDto } from '../producer-invoice/producer-invoice-dto';
|
|
5
|
+
import { EntityService } from '../entity-service';
|
|
6
|
+
export declare class ProducerInvoiceService extends EntityService<ProducerInvoiceDto> {
|
|
7
|
+
protected http: HttpClient;
|
|
8
|
+
protected messageService: MessageService;
|
|
9
|
+
protected translate: TranslateService;
|
|
10
|
+
constructor(http: HttpClient, messageService: MessageService, translate: TranslateService);
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StatusType, TypeAccount } from "./services/financial/enums";
|
|
2
|
+
export interface FinancialTitleOptions {
|
|
3
|
+
typeAccount: TypeAccount;
|
|
4
|
+
companyId?: string;
|
|
5
|
+
branchId?: string;
|
|
6
|
+
producerId?: string;
|
|
7
|
+
status?: StatusType;
|
|
8
|
+
titleId?: string;
|
|
9
|
+
numberTitle?: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { AfterViewInit, EventEmitter, OnDestroy, OnInit } from "@angular/core";
|
|
2
|
+
import { FormArray, FormGroup } from "@angular/forms";
|
|
3
|
+
import { BadgeColors, ButtonPriority, ButtonSize, FieldType } from "@seniorsistemas/angular-components";
|
|
4
|
+
import { LazyLoadEvent, MessageService, Table } from "primeng";
|
|
5
|
+
import { LibTranslationService } from "../../services/lib-translation.service";
|
|
6
|
+
import { FinancialTitleOptions } from "./financial-title-table-options.interface";
|
|
7
|
+
import { AgroFinancialService } from "./services/financial/agro-financial.service";
|
|
8
|
+
import { FinancialTitleListDto, RecordTitleDto } from "./services/financial/intefaces";
|
|
9
|
+
interface ColumnConfig {
|
|
10
|
+
field: string;
|
|
11
|
+
header: string;
|
|
12
|
+
path: string[];
|
|
13
|
+
type: FieldType;
|
|
14
|
+
}
|
|
15
|
+
export declare class FinancialTitleTableComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
16
|
+
private readonly translate;
|
|
17
|
+
private readonly financialService;
|
|
18
|
+
private readonly messageService;
|
|
19
|
+
table: Table;
|
|
20
|
+
options: FinancialTitleOptions;
|
|
21
|
+
selected: FinancialTitleListDto[];
|
|
22
|
+
selectionChange: EventEmitter<any[]>;
|
|
23
|
+
gridData: FinancialTitleListDto[];
|
|
24
|
+
gridTotalRecords: number;
|
|
25
|
+
errorMessage: any;
|
|
26
|
+
tableInitialized: boolean;
|
|
27
|
+
showSidebar: boolean;
|
|
28
|
+
selectedRow: RecordTitleDto;
|
|
29
|
+
gridColumns: ColumnConfig[];
|
|
30
|
+
sidebarFields: any[];
|
|
31
|
+
componentLoading: boolean;
|
|
32
|
+
buttonSize: typeof ButtonSize;
|
|
33
|
+
buttonPriority: typeof ButtonPriority;
|
|
34
|
+
badgeColors: typeof BadgeColors;
|
|
35
|
+
form: FormGroup;
|
|
36
|
+
private ngUnsubscribe;
|
|
37
|
+
private currentListParams;
|
|
38
|
+
get titlesForm(): FormArray;
|
|
39
|
+
constructor(translate: LibTranslationService, financialService: AgroFinancialService, messageService: MessageService);
|
|
40
|
+
ngOnInit(): void;
|
|
41
|
+
ngAfterViewInit(): void;
|
|
42
|
+
ngOnDestroy(): void;
|
|
43
|
+
getPageSize(): any;
|
|
44
|
+
getRowIndex(): number;
|
|
45
|
+
getSortField(): any;
|
|
46
|
+
getSortOrder(): any;
|
|
47
|
+
updateGrid(event: LazyLoadEvent): void;
|
|
48
|
+
onSelectionChange(event: any): void;
|
|
49
|
+
onUnselect(event: any): void;
|
|
50
|
+
showDetails(rowData: any): void;
|
|
51
|
+
closeDetails(): void;
|
|
52
|
+
isLastColumn(index: number, columns: any[]): boolean;
|
|
53
|
+
getStyleColumns(field: string): any;
|
|
54
|
+
getProp(obj: any, col: any): any;
|
|
55
|
+
private subscribeToValuePaidChanges;
|
|
56
|
+
private initRowEdit;
|
|
57
|
+
private applyValidationToRowEdit;
|
|
58
|
+
private getValidatorsForRowEdit;
|
|
59
|
+
private cancelRowEdit;
|
|
60
|
+
private synchronizeCheckboxAndEditableFieldState;
|
|
61
|
+
private getFields;
|
|
62
|
+
private addMessage;
|
|
63
|
+
}
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { FinancialTitleTableComponent } from "./financial-title-table.component";
|
|
2
|
+
export { FinancialTitleTableModule } from "./financial-title-table.module";
|
|
3
|
+
export { FinancialTitleOptions } from "./financial-title-table-options.interface";
|
|
4
|
+
export { AgroFinancialService } from "./services/financial/index";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { HttpClient } from "@angular/common/http";
|
|
2
|
+
import { MessageService } from "primeng/api";
|
|
3
|
+
import { Observable } from "rxjs";
|
|
4
|
+
import { AgroEntityService } from "../../../../services/entity-service";
|
|
5
|
+
import { LibTranslationService } from "../../../../services/lib-translation.service";
|
|
6
|
+
import { FinancialQueryDataResponse, RequestListTitlesInput, TitleDto } from "./intefaces";
|
|
7
|
+
export declare class AgroFinancialService extends AgroEntityService<TitleDto> {
|
|
8
|
+
protected http: HttpClient;
|
|
9
|
+
protected messageService: MessageService;
|
|
10
|
+
protected translate: LibTranslationService;
|
|
11
|
+
private readonly pooling;
|
|
12
|
+
constructor(http: HttpClient, messageService: MessageService, translate: LibTranslationService);
|
|
13
|
+
listTitles(input: RequestListTitlesInput): Observable<FinancialQueryDataResponse>;
|
|
14
|
+
private requestListTitles;
|
|
15
|
+
private getListTitlesResponse;
|
|
16
|
+
/**
|
|
17
|
+
* Realiza o polling para obter o resultado da listagem de títulos financeiros
|
|
18
|
+
*
|
|
19
|
+
* @param requestId Id da requisição utlizada na busca pelo resultado
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
22
|
+
private pollListTitlesResult;
|
|
23
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare enum TypeAccount {
|
|
2
|
+
PAYABLE = "PAYABLE",
|
|
3
|
+
RECEIVABLE = "RECEIVABLE"
|
|
4
|
+
}
|
|
5
|
+
export declare enum StatusType {
|
|
6
|
+
OPEN = "OPEN",
|
|
7
|
+
PAID = "PAID",
|
|
8
|
+
CANCELLED = "CANCELLED"
|
|
9
|
+
}
|
|
10
|
+
export declare enum TitleFieldsOrderBy {
|
|
11
|
+
NUMBER_TITLE = "NUMBER_TITLE",
|
|
12
|
+
ISSUE_DATE = "ISSUE_DATE",
|
|
13
|
+
DUE_DATE = "DUE_DATE",
|
|
14
|
+
ORIGINAL_VALUE = "ORIGINAL_VALUE",
|
|
15
|
+
OPEN_VALUE = "OPEN_VALUE",
|
|
16
|
+
NET_VALUE = "NET_VALUE",
|
|
17
|
+
STATUS = "STATUS"
|
|
18
|
+
}
|
|
19
|
+
export declare enum OrderByType {
|
|
20
|
+
ASC = "ASC",
|
|
21
|
+
DESC = "DESC"
|
|
22
|
+
}
|
|
23
|
+
export declare enum QueryStatus {
|
|
24
|
+
PENDING = "PENDING",
|
|
25
|
+
FINISHED = "FINISHED",
|
|
26
|
+
FAILED = "FAILED"
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AgroFinancialService } from "./agro-financial.service";
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { OrderByType, QueryStatus, StatusType, TitleFieldsOrderBy, TypeAccount } from "./enums";
|
|
2
|
+
export interface FinancialTitleListDto extends RecordTitleDto {
|
|
3
|
+
valuePaid?: number;
|
|
4
|
+
hasError?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface RecordTitleDto {
|
|
7
|
+
id?: string;
|
|
8
|
+
company: RecGenericDto;
|
|
9
|
+
branch: RecGenericDto;
|
|
10
|
+
producer: RecGenericDto;
|
|
11
|
+
numberTitle: string;
|
|
12
|
+
titleType?: RecGenericDto;
|
|
13
|
+
typeAccount: TypeAccount;
|
|
14
|
+
values: RecTitleValuesDto;
|
|
15
|
+
issueDate?: string;
|
|
16
|
+
dueDate?: string;
|
|
17
|
+
status: StatusType;
|
|
18
|
+
}
|
|
19
|
+
export interface RecGenericDto {
|
|
20
|
+
id?: string;
|
|
21
|
+
cod?: string;
|
|
22
|
+
desc?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface RecTitleValuesDto {
|
|
25
|
+
originalValue: number;
|
|
26
|
+
openValue: number;
|
|
27
|
+
discountValue: number;
|
|
28
|
+
otherDiscountValue: number;
|
|
29
|
+
interestValue: number;
|
|
30
|
+
fineValue: number;
|
|
31
|
+
otherAdditionValue: number;
|
|
32
|
+
chargeValue: number;
|
|
33
|
+
monetaryCorrectionValue: number;
|
|
34
|
+
netValue: number;
|
|
35
|
+
withheldTaxValue?: number;
|
|
36
|
+
}
|
|
37
|
+
export interface RequestListTitlesInput {
|
|
38
|
+
pageRequest: RecPageRequest;
|
|
39
|
+
filter: FilterTitle;
|
|
40
|
+
}
|
|
41
|
+
export interface RequestListTitlesOutput {
|
|
42
|
+
requestId: string;
|
|
43
|
+
}
|
|
44
|
+
export interface GetListTitlesResponseInput {
|
|
45
|
+
requestId: string;
|
|
46
|
+
}
|
|
47
|
+
export interface GetListTitlesResponseOutput {
|
|
48
|
+
result: FinancialQueryDataResponse;
|
|
49
|
+
status: QueryStatus;
|
|
50
|
+
message?: string;
|
|
51
|
+
}
|
|
52
|
+
export interface FinancialQueryDataResponse {
|
|
53
|
+
titles: RecordTitleDto[];
|
|
54
|
+
totalElements: number;
|
|
55
|
+
message?: string;
|
|
56
|
+
status: QueryStatus;
|
|
57
|
+
queryId?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface RecPageRequest {
|
|
60
|
+
offset?: number;
|
|
61
|
+
size?: number;
|
|
62
|
+
orderBy?: RecOrderBy;
|
|
63
|
+
}
|
|
64
|
+
export interface RecOrderBy {
|
|
65
|
+
field: TitleFieldsOrderBy;
|
|
66
|
+
order: OrderByType;
|
|
67
|
+
}
|
|
68
|
+
export interface FilterTitle {
|
|
69
|
+
typeAccount: TypeAccount;
|
|
70
|
+
companyId?: string;
|
|
71
|
+
branchId?: string;
|
|
72
|
+
producerId?: string;
|
|
73
|
+
status?: StatusType;
|
|
74
|
+
titleId?: string;
|
|
75
|
+
numberTitle?: string;
|
|
76
|
+
}
|
|
77
|
+
export interface TitleDto {
|
|
78
|
+
id?: string;
|
|
79
|
+
seq: number;
|
|
80
|
+
company: any;
|
|
81
|
+
branch: any;
|
|
82
|
+
producer: any;
|
|
83
|
+
numberTitle: string;
|
|
84
|
+
origin: any;
|
|
85
|
+
application: any;
|
|
86
|
+
typeAccount: any;
|
|
87
|
+
integrationStatus?: any;
|
|
88
|
+
integrationType?: any;
|
|
89
|
+
status: any;
|
|
90
|
+
issueDate?: string;
|
|
91
|
+
dueDate?: string;
|
|
92
|
+
originalValue: number;
|
|
93
|
+
openValue: number;
|
|
94
|
+
observation: string;
|
|
95
|
+
typeId: string;
|
|
96
|
+
groupId: string;
|
|
97
|
+
transactionId: string;
|
|
98
|
+
externalId: string;
|
|
99
|
+
integrationMessage?: string;
|
|
100
|
+
eventControlItemId?: string;
|
|
101
|
+
integrationBatchId?: string;
|
|
102
|
+
createdBy?: string;
|
|
103
|
+
createdDate?: Date;
|
|
104
|
+
lastModifiedBy?: string;
|
|
105
|
+
lastModifiedDate?: Date;
|
|
106
|
+
custom?: any;
|
|
107
|
+
}
|
package/components/index.d.ts
CHANGED
|
@@ -108,22 +108,5 @@ export class AgroNumberUtils {
|
|
|
108
108
|
const factor = Math.pow(AGRO_NUMBERS.TEN, decimals);
|
|
109
109
|
return Math.round(value * factor) / factor;
|
|
110
110
|
}
|
|
111
|
-
/**
|
|
112
|
-
* Pega apenas números, convertendo strings para números e retornarndo apenas o maior inteiro encontrado.
|
|
113
|
-
* @param value - O valor a ser processado.
|
|
114
|
-
* @returns O maior número inteiro encontrado ou 0 se nenhum número for encontrado.
|
|
115
|
-
*/
|
|
116
|
-
static getNearInteger(value) {
|
|
117
|
-
if (typeof value === "number") {
|
|
118
|
-
return Math.floor(value);
|
|
119
|
-
}
|
|
120
|
-
if (typeof value === "string") {
|
|
121
|
-
const numbers = value.match(/\d+/g);
|
|
122
|
-
if (numbers && numbers.length > 0) {
|
|
123
|
-
return Math.max(...numbers.map(Number));
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
return 0;
|
|
127
|
-
}
|
|
128
111
|
}
|
|
129
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
112
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWdyby1udW1iZXItdXRpbHMuY2xhc3MuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Ac2VuaW9yLWFncm9uZWdvY2lvL2FuZ3VsYXItY29tcG9uZW50cy8iLCJzb3VyY2VzIjpbImNvbW1vbi9hZ3JvLW51bWJlci11dGlscy5jbGFzcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxVQUFVLENBQUM7QUFFeEMsTUFBTSxPQUFPLGVBQWU7SUFDeEI7Ozs7T0FJRztJQUNILE1BQU0sQ0FBQyxpQkFBaUIsQ0FBQyxHQUFRO1FBQzdCLE9BQU8sR0FBRyxLQUFLLElBQUksSUFBSSxHQUFHLEtBQUssU0FBUyxDQUFDO0lBQzdDLENBQUM7SUFFRDs7OztPQUlHO0lBQ0gsTUFBTSxDQUFDLG9CQUFvQixDQUFDLEdBQVE7UUFDaEMsT0FBTyxDQUFDLGVBQWUsQ0FBQyxpQkFBaUIsQ0FBQyxHQUFHLENBQUMsQ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