@seniorsistemas/yms-integration 1.42.1 → 1.44.0
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/seniorsistemas-yms-integration.umd.js +876 -388
- package/bundles/seniorsistemas-yms-integration.umd.js.map +1 -1
- package/bundles/seniorsistemas-yms-integration.umd.min.js +1 -1
- package/bundles/seniorsistemas-yms-integration.umd.min.js.map +1 -1
- package/esm2015/seniorsistemas-yms-integration.js +53 -51
- package/esm2015/src/sam-senior/core/entity-service.js +27 -12
- package/esm2015/src/wms/components/document-grid/document-grid.component.js +42 -358
- package/esm2015/src/wms/components/document-grid/document-grid.facade.js +380 -0
- package/esm2015/src/wms/components/document-grid/document-grid.module.js +19 -10
- package/esm2015/src/wms/components/document-grid/insert-key/insert-key.component.js +45 -44
- package/esm2015/src/wms/components/document-grid/register-document/register-document.component.js +28 -24
- package/esm2015/src/wms/components/document-grid/strategies/partner.strategy.js +48 -0
- package/esm2015/src/wms/components/document-grid/strategies/senior-connect.strategy.js +72 -0
- package/esm2015/src/wms/components/document-grid/strategies/senior-erp.strategy.js +56 -0
- package/esm2015/src/wms/components/document-grid/strategies/silt.strategy.js +80 -0
- package/esm2015/src/wms/components/document-grid/strategies/wis.strategy.js +68 -0
- package/esm2015/src/wms/components/document-grid/strategies/wms-integration-strategy.factory.js +31 -0
- package/esm2015/src/wms/components/document-grid/strategies/wms-integration-strategy.interface.js +7 -0
- package/esm2015/src/wms/components/utils/invoice-conditions.js +30 -9
- package/esm2015/src/wms/entities/document/document.service.js +11 -10
- package/esm2015/src/wms/entities/invoice-condition/invoice-condition.js +1 -1
- package/esm2015/src/wms/entities/wms-system/wms-system.js +2 -1
- package/esm5/seniorsistemas-yms-integration.js +53 -51
- package/esm5/src/sam-senior/core/entity-service.js +23 -8
- package/esm5/src/wms/components/document-grid/document-grid.component.js +47 -363
- package/esm5/src/wms/components/document-grid/document-grid.facade.js +397 -0
- package/esm5/src/wms/components/document-grid/document-grid.module.js +19 -10
- package/esm5/src/wms/components/document-grid/insert-key/insert-key.component.js +44 -43
- package/esm5/src/wms/components/document-grid/register-document/register-document.component.js +28 -24
- package/esm5/src/wms/components/document-grid/strategies/partner.strategy.js +52 -0
- package/esm5/src/wms/components/document-grid/strategies/senior-connect.strategy.js +76 -0
- package/esm5/src/wms/components/document-grid/strategies/senior-erp.strategy.js +60 -0
- package/esm5/src/wms/components/document-grid/strategies/silt.strategy.js +84 -0
- package/esm5/src/wms/components/document-grid/strategies/wis.strategy.js +72 -0
- package/esm5/src/wms/components/document-grid/strategies/wms-integration-strategy.factory.js +32 -0
- package/esm5/src/wms/components/document-grid/strategies/wms-integration-strategy.interface.js +7 -0
- package/esm5/src/wms/components/utils/invoice-conditions.js +30 -9
- package/esm5/src/wms/entities/document/document.service.js +11 -10
- package/esm5/src/wms/entities/invoice-condition/invoice-condition.js +1 -1
- package/esm5/src/wms/entities/wms-system/wms-system.js +2 -1
- package/fesm2015/seniorsistemas-yms-integration.js +783 -330
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +824 -338
- package/fesm5/seniorsistemas-yms-integration.js.map +1 -1
- package/package.json +4 -3
- package/seniorsistemas-yms-integration.d.ts +52 -50
- package/seniorsistemas-yms-integration.metadata.json +1 -1
- package/src/sam-senior/core/entity-service.d.ts +5 -0
- package/src/wms/components/document-grid/document-grid.component.d.ts +28 -77
- package/src/wms/components/document-grid/document-grid.facade.d.ts +96 -0
- package/src/wms/components/document-grid/insert-key/insert-key.component.d.ts +6 -8
- package/src/wms/components/document-grid/register-document/register-document.component.d.ts +5 -5
- package/src/wms/components/document-grid/strategies/partner.strategy.d.ts +17 -0
- package/src/wms/components/document-grid/strategies/senior-connect.strategy.d.ts +17 -0
- package/src/wms/components/document-grid/strategies/senior-erp.strategy.d.ts +17 -0
- package/src/wms/components/document-grid/strategies/silt.strategy.d.ts +17 -0
- package/src/wms/components/document-grid/strategies/wis.strategy.d.ts +17 -0
- package/src/wms/components/document-grid/strategies/wms-integration-strategy.factory.d.ts +8 -0
- package/src/wms/components/document-grid/strategies/wms-integration-strategy.interface.d.ts +53 -0
- package/src/wms/components/utils/invoice-conditions.d.ts +2 -2
- package/src/wms/entities/document/document.service.d.ts +9 -6
- package/src/wms/entities/wms-system/wms-system.d.ts +1 -0
|
@@ -1,92 +1,43 @@
|
|
|
1
|
-
import { EventEmitter, OnInit, TemplateRef } from "@angular/core";
|
|
2
|
-
import { TranslateService } from "@ngx-translate/core";
|
|
3
|
-
import { ConfirmationService, MenuItem } from "primeng/api";
|
|
1
|
+
import { EventEmitter, OnDestroy, OnInit, TemplateRef } from "@angular/core";
|
|
4
2
|
import { Table } from "primeng/table";
|
|
5
|
-
import {
|
|
6
|
-
import { AgendaService } from '../../entities/agenda/agenda.service';
|
|
3
|
+
import { Observable } from "rxjs";
|
|
7
4
|
import { Document } from "../../entities/document/document";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
export declare class DocumentGridComponent implements OnInit {
|
|
14
|
-
|
|
15
|
-
private
|
|
16
|
-
private
|
|
17
|
-
private readonly integrationService;
|
|
18
|
-
private readonly agendaService;
|
|
19
|
-
private readonly utils;
|
|
20
|
-
private readonly wmsService;
|
|
5
|
+
import { WmsSystem } from "../../entities/wms-system/wms-system";
|
|
6
|
+
import { DocumentGridFacade, DocumentGridState } from "./document-grid.facade";
|
|
7
|
+
import { InvoiceCondition } from "../../entities/invoice-condition/invoice-condition";
|
|
8
|
+
import { ConfirmationService } from "primeng/api";
|
|
9
|
+
import { TranslateService } from "@ngx-translate/core";
|
|
10
|
+
export declare class DocumentGridComponent implements OnInit, OnDestroy {
|
|
11
|
+
readonly facade: DocumentGridFacade;
|
|
12
|
+
private confirmationService;
|
|
13
|
+
private translate;
|
|
21
14
|
agenda: any;
|
|
22
15
|
wmsSystem: WmsSystem;
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
showInvoiceSearchModal: boolean;
|
|
17
|
+
showAddInvoiceModal: boolean;
|
|
25
18
|
viewDocument: EventEmitter<Document>;
|
|
26
|
-
documentTotalRecords: number;
|
|
27
|
-
gridColumns: any;
|
|
28
|
-
gridData: Document[];
|
|
29
|
-
selection: Document[];
|
|
30
|
-
disabled: boolean;
|
|
31
|
-
loading: boolean;
|
|
32
|
-
document: Document;
|
|
33
|
-
edit: boolean;
|
|
34
|
-
processType: ProcessType;
|
|
35
|
-
isClienteExterno: boolean;
|
|
36
|
-
enableButtonIsClienteExterno: boolean;
|
|
37
|
-
invoiceConditions: {
|
|
38
|
-
label: string;
|
|
39
|
-
value: InvoiceCondition;
|
|
40
|
-
}[];
|
|
41
|
-
private readonly summary;
|
|
42
|
-
private readonly ngUnsubscribe;
|
|
43
|
-
private yard;
|
|
44
|
-
private schedule;
|
|
45
19
|
table: Table;
|
|
46
20
|
customTemplate: TemplateRef<any>;
|
|
47
21
|
customFilterFields: TemplateRef<any>;
|
|
48
22
|
customGridColgroup: TemplateRef<any>;
|
|
49
23
|
customGridHeader: TemplateRef<any>;
|
|
50
24
|
customGridBody: TemplateRef<any>;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
value: InvoiceCondition | null;
|
|
54
|
-
}[];
|
|
55
|
-
constructor(translate: TranslateService, documentService: DocumentService, confirmationService: ConfirmationService, integrationService: IntegrationService, agendaService: AgendaService, utils: UtilsMessageService, wmsService: FormWmsService);
|
|
25
|
+
state$: Observable<DocumentGridState>;
|
|
26
|
+
constructor(facade: DocumentGridFacade, confirmationService: ConfirmationService, translate: TranslateService);
|
|
56
27
|
ngOnInit(): void;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
private getProcessTypeByScheduling;
|
|
61
|
-
onChangeDocument(document: Document): void;
|
|
62
|
-
private assignKeys;
|
|
63
|
-
private hasFilledValues;
|
|
64
|
-
private cantEditStatus;
|
|
65
|
-
getActions(): MenuItem[];
|
|
66
|
-
checkWmsSystemInvalid(): boolean;
|
|
67
|
-
getProp(obj: any, path: any): any;
|
|
68
|
-
view(): void;
|
|
69
|
-
save(): void;
|
|
70
|
-
private updateKeyByWms;
|
|
28
|
+
ngOnDestroy(): void;
|
|
29
|
+
onView(): void;
|
|
30
|
+
onSave(): void;
|
|
71
31
|
onDelete(): void;
|
|
72
|
-
|
|
32
|
+
onRefresh(): void;
|
|
33
|
+
onRowSelect(rowData: Document): void;
|
|
34
|
+
onInvoiceConditionChange(): void;
|
|
35
|
+
readonly invoiceConditions: InvoiceConditionOutput[];
|
|
36
|
+
getActions(): import("primeng/components/common/menuitem").MenuItem[];
|
|
37
|
+
getFilteredInvoiceConditions(invoiceCondition: any): InvoiceConditionOutput[];
|
|
73
38
|
notSavedDocuments(): boolean;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
private wmsWisIntegration;
|
|
79
|
-
private wmsSiltIntegration;
|
|
80
|
-
private getColumninvoiceCondition;
|
|
81
|
-
private getColumnInvoiceAndlogistcUnit;
|
|
82
|
-
private getColumnPartner;
|
|
83
|
-
private getColumnlogistcUnit;
|
|
84
|
-
private addInvoiceSituationIfNotClienteExterno;
|
|
85
|
-
isWmsSeniorConnect(): boolean;
|
|
86
|
-
isWmsWIS(): boolean;
|
|
87
|
-
isWmsSilt(): boolean;
|
|
88
|
-
isWmsPartner(): boolean;
|
|
89
|
-
private sucessMessage;
|
|
90
|
-
validateDocument(document: any): boolean;
|
|
91
|
-
private buildMessage;
|
|
39
|
+
}
|
|
40
|
+
export interface InvoiceConditionOutput {
|
|
41
|
+
label: string;
|
|
42
|
+
value: InvoiceCondition;
|
|
92
43
|
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { TranslateService } from "@ngx-translate/core";
|
|
2
|
+
import { MenuItem } from "primeng/api";
|
|
3
|
+
import { Observable } from "rxjs";
|
|
4
|
+
import { UtilsMessageService } from "../../../utils/utils-message";
|
|
5
|
+
import { AgendaService } from "../../entities/agenda/agenda.service";
|
|
6
|
+
import { Document } from "../../entities/document/document";
|
|
7
|
+
import { DocumentService } from "../../entities/document/document.service";
|
|
8
|
+
import { InvoiceCondition } from "../../entities/invoice-condition/invoice-condition";
|
|
9
|
+
import { WmsSystem } from "../../entities/wms-system/wms-system";
|
|
10
|
+
import { FormWmsService } from "../../form/form-wms.service";
|
|
11
|
+
import { IntegrationService, ProcessType } from "../../entities/integration/integration.service";
|
|
12
|
+
import { WmsIntegrationStrategyFactory } from "./strategies/wms-integration-strategy.factory";
|
|
13
|
+
export interface DocumentGridState {
|
|
14
|
+
gridData: Document[];
|
|
15
|
+
selection: Document[];
|
|
16
|
+
gridColumns: any[];
|
|
17
|
+
documentTotalRecords: number;
|
|
18
|
+
loading: boolean;
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
showInvoiceSearchModal: boolean;
|
|
21
|
+
showAddInvoiceModal: boolean;
|
|
22
|
+
edit: boolean;
|
|
23
|
+
processType: ProcessType;
|
|
24
|
+
wmsSystem: WmsSystem;
|
|
25
|
+
isClienteExterno: boolean;
|
|
26
|
+
enableButtonIsClienteExterno: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare class DocumentGridFacade {
|
|
29
|
+
private readonly translate;
|
|
30
|
+
private readonly documentService;
|
|
31
|
+
private readonly integrationService;
|
|
32
|
+
private readonly agendaService;
|
|
33
|
+
private readonly utils;
|
|
34
|
+
private readonly wmsService;
|
|
35
|
+
private readonly strategyFactory;
|
|
36
|
+
private readonly ngUnsubscribe;
|
|
37
|
+
private readonly summary;
|
|
38
|
+
private yard;
|
|
39
|
+
private schedule;
|
|
40
|
+
private currentStrategy;
|
|
41
|
+
private readonly stateSubject;
|
|
42
|
+
readonly state$: Observable<DocumentGridState>;
|
|
43
|
+
readonly invoiceConditions: {
|
|
44
|
+
label: string;
|
|
45
|
+
value: InvoiceCondition;
|
|
46
|
+
}[];
|
|
47
|
+
private agenda;
|
|
48
|
+
readonly state: DocumentGridState;
|
|
49
|
+
constructor(translate: TranslateService, documentService: DocumentService, integrationService: IntegrationService, agendaService: AgendaService, utils: UtilsMessageService, wmsService: FormWmsService, strategyFactory: WmsIntegrationStrategyFactory);
|
|
50
|
+
init(agenda: any, wmsSystem: WmsSystem): void;
|
|
51
|
+
private loadSystemIntegration;
|
|
52
|
+
private updateStrategy;
|
|
53
|
+
private getYard;
|
|
54
|
+
private getSchedule;
|
|
55
|
+
private verifyClienteExterno;
|
|
56
|
+
private getProcessTypeByScheduling;
|
|
57
|
+
private cantEditStatus;
|
|
58
|
+
openInvoiceKeyModal(): void;
|
|
59
|
+
openDocumentRegisterModal(): void;
|
|
60
|
+
closeInvoiceSearchModal(): void;
|
|
61
|
+
closeAddInvoiceModal(): void;
|
|
62
|
+
viewDocument(): Document;
|
|
63
|
+
setSelection(selection: Document[]): void;
|
|
64
|
+
addToSelection(document: Document): void;
|
|
65
|
+
setDisabled(disabled: boolean): void;
|
|
66
|
+
setShowInvoiceSearchModal(visible: boolean): void;
|
|
67
|
+
setShowAddInvoiceModal(visible: boolean): void;
|
|
68
|
+
onChangeDocument(document: Document): void;
|
|
69
|
+
private assignKeys;
|
|
70
|
+
private hasFilledValues;
|
|
71
|
+
save(): void;
|
|
72
|
+
private updateKeyByWms;
|
|
73
|
+
deleteSelectedDocuments(): void;
|
|
74
|
+
private removeDocumentIfIdUndefined;
|
|
75
|
+
notSavedDocuments(): boolean;
|
|
76
|
+
listDocuments(isDelete: boolean): void;
|
|
77
|
+
getActions(): MenuItem[];
|
|
78
|
+
checkWmsSystemInvalid(): boolean;
|
|
79
|
+
private updateGridColumns;
|
|
80
|
+
private getGridColumns;
|
|
81
|
+
isWmsSeniorConnect(): boolean;
|
|
82
|
+
isWmsWIS(): boolean;
|
|
83
|
+
isWmsSilt(): boolean;
|
|
84
|
+
isWmsPartner(): boolean;
|
|
85
|
+
validateDocument(document: any): boolean;
|
|
86
|
+
getFilteredInvoiceConditions(invoiceCondition: any): {
|
|
87
|
+
label: string;
|
|
88
|
+
value: InvoiceCondition | null;
|
|
89
|
+
}[];
|
|
90
|
+
supportsInvoiceCondition(): boolean;
|
|
91
|
+
getProp(obj: any, path: string): any;
|
|
92
|
+
private sucessMessage;
|
|
93
|
+
private buildMessage;
|
|
94
|
+
private updateState;
|
|
95
|
+
destroy(): void;
|
|
96
|
+
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { EventEmitter, OnInit } from "@angular/core";
|
|
2
2
|
import { FormBuilder, FormGroup } from "@angular/forms";
|
|
3
3
|
import { UtilsMessageService } from "../../../../utils/utils-message";
|
|
4
|
-
import { WmsSystem } from
|
|
5
|
-
import { DocumentService } from
|
|
4
|
+
import { WmsSystem } from "../../../entities/wms-system/wms-system";
|
|
5
|
+
import { DocumentService } from "./../../../entities/document/document.service";
|
|
6
6
|
import { ConfirmationService } from "primeng/api";
|
|
7
7
|
import { TranslateService } from "@ngx-translate/core";
|
|
8
8
|
import { ExternalTenantService } from "./../../../entities/external-tenant/external-tenant.service";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { DocumentGridComponent } from "../document-grid.component";
|
|
9
|
+
import { Agenda } from "../../../../erp-senior/core/entities/agenda/agenda";
|
|
10
|
+
import { DocumentGridFacade } from "../document-grid.facade";
|
|
12
11
|
export declare class InsertKeyComponent implements OnInit {
|
|
13
12
|
private readonly formBuilder;
|
|
14
13
|
private readonly documentService;
|
|
@@ -16,11 +15,10 @@ export declare class InsertKeyComponent implements OnInit {
|
|
|
16
15
|
private readonly confirmationService;
|
|
17
16
|
private readonly translate;
|
|
18
17
|
private readonly externalTenantService;
|
|
19
|
-
private readonly
|
|
18
|
+
private readonly facade;
|
|
20
19
|
agenda: Agenda;
|
|
21
20
|
wmsSystem: WmsSystem;
|
|
22
21
|
visible: EventEmitter<boolean>;
|
|
23
|
-
document: EventEmitter<Document>;
|
|
24
22
|
visibleChange: EventEmitter<{}>;
|
|
25
23
|
key: string;
|
|
26
24
|
keyErrorMessage: string;
|
|
@@ -28,7 +26,7 @@ export declare class InsertKeyComponent implements OnInit {
|
|
|
28
26
|
isLoading: boolean;
|
|
29
27
|
isPartnerloading: boolean;
|
|
30
28
|
private readonly ngUnsubscribe;
|
|
31
|
-
constructor(formBuilder: FormBuilder, documentService: DocumentService, utils: UtilsMessageService, confirmationService: ConfirmationService, translate: TranslateService, externalTenantService: ExternalTenantService,
|
|
29
|
+
constructor(formBuilder: FormBuilder, documentService: DocumentService, utils: UtilsMessageService, confirmationService: ConfirmationService, translate: TranslateService, externalTenantService: ExternalTenantService, facade: DocumentGridFacade);
|
|
32
30
|
ngOnInit(): void;
|
|
33
31
|
isWmsWis(): boolean;
|
|
34
32
|
isWmsSeniorConnect(): boolean;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { EventEmitter, OnChanges, OnInit } from "@angular/core";
|
|
2
2
|
import { FormBuilder, FormGroup } from "@angular/forms";
|
|
3
|
-
import { Agenda } from
|
|
4
|
-
import { Document } from
|
|
3
|
+
import { Agenda } from "../../../../erp-senior/core/entities/agenda/agenda";
|
|
4
|
+
import { Document } from "../../../entities/document/document";
|
|
5
5
|
import { WmsSystem } from "../../../entities/wms-system/wms-system";
|
|
6
6
|
import { InvoiceCondition } from "../../../entities/invoice-condition/invoice-condition";
|
|
7
7
|
import { TranslateService } from "@ngx-translate/core";
|
|
8
|
-
import {
|
|
8
|
+
import { DocumentGridFacade } from "../document-grid.facade";
|
|
9
9
|
export declare class RegisterDocumentComponent implements OnInit, OnChanges {
|
|
10
10
|
private readonly fb;
|
|
11
11
|
private readonly translate;
|
|
12
|
-
private readonly
|
|
12
|
+
private readonly facade;
|
|
13
13
|
viewDocument: Document[];
|
|
14
14
|
edit: boolean;
|
|
15
15
|
agenda: Agenda;
|
|
@@ -25,7 +25,7 @@ export declare class RegisterDocumentComponent implements OnInit, OnChanges {
|
|
|
25
25
|
label: string;
|
|
26
26
|
value: InvoiceCondition;
|
|
27
27
|
}[];
|
|
28
|
-
constructor(fb: FormBuilder, translate: TranslateService,
|
|
28
|
+
constructor(fb: FormBuilder, translate: TranslateService, facade: DocumentGridFacade);
|
|
29
29
|
ngOnInit(): void;
|
|
30
30
|
ngOnChanges(): void;
|
|
31
31
|
visibilityConfig(): EventEmitter<boolean>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TranslateService } from "@ngx-translate/core";
|
|
2
|
+
import { Document } from "../../../entities/document/document";
|
|
3
|
+
import { InvoiceCondition } from "../../../entities/invoice-condition/invoice-condition";
|
|
4
|
+
import { GridColumn, ValidationContext, ValidationResult, WmsIntegrationStrategy } from "./wms-integration-strategy.interface";
|
|
5
|
+
export declare class PartnerStrategy implements WmsIntegrationStrategy {
|
|
6
|
+
getGridColumns(translate: TranslateService, isClienteExterno: boolean): GridColumn[];
|
|
7
|
+
updateDocumentKey(document: Document): string;
|
|
8
|
+
validateDocument(document: Document, context: ValidationContext): ValidationResult;
|
|
9
|
+
getFilteredInvoiceConditions(invoiceCondition: InvoiceCondition, allConditions: {
|
|
10
|
+
label: string;
|
|
11
|
+
value: InvoiceCondition | null;
|
|
12
|
+
}[]): {
|
|
13
|
+
label: string;
|
|
14
|
+
value: InvoiceCondition | null;
|
|
15
|
+
}[];
|
|
16
|
+
supportsInvoiceCondition(): boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TranslateService } from "@ngx-translate/core";
|
|
2
|
+
import { Document } from "../../../entities/document/document";
|
|
3
|
+
import { InvoiceCondition } from "../../../entities/invoice-condition/invoice-condition";
|
|
4
|
+
import { GridColumn, ValidationContext, ValidationResult, WmsIntegrationStrategy } from "./wms-integration-strategy.interface";
|
|
5
|
+
export declare class SeniorConnectStrategy implements WmsIntegrationStrategy {
|
|
6
|
+
getGridColumns(translate: TranslateService, isClienteExterno: boolean): GridColumn[];
|
|
7
|
+
updateDocumentKey(document: Document): string;
|
|
8
|
+
validateDocument(document: Document, context: ValidationContext): ValidationResult;
|
|
9
|
+
getFilteredInvoiceConditions(invoiceCondition: InvoiceCondition, allConditions: {
|
|
10
|
+
label: string;
|
|
11
|
+
value: InvoiceCondition | null;
|
|
12
|
+
}[]): {
|
|
13
|
+
label: string;
|
|
14
|
+
value: InvoiceCondition | null;
|
|
15
|
+
}[];
|
|
16
|
+
supportsInvoiceCondition(): boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TranslateService } from "@ngx-translate/core";
|
|
2
|
+
import { GridColumn, ValidationContext, ValidationResult, WmsIntegrationStrategy } from "./wms-integration-strategy.interface";
|
|
3
|
+
import { Document } from "../../../entities/document/document";
|
|
4
|
+
import { InvoiceCondition } from "../../../entities/invoice-condition/invoice-condition";
|
|
5
|
+
export declare class SeniorERPStrategy implements WmsIntegrationStrategy {
|
|
6
|
+
getGridColumns(translate: TranslateService, isClienteExterno: boolean): GridColumn[];
|
|
7
|
+
updateDocumentKey(document: Document): string;
|
|
8
|
+
validateDocument(document: Document, context: ValidationContext): ValidationResult;
|
|
9
|
+
getFilteredInvoiceConditions(invoiceCondition: InvoiceCondition, allConditions: {
|
|
10
|
+
label: string;
|
|
11
|
+
value: InvoiceCondition | null;
|
|
12
|
+
}[]): {
|
|
13
|
+
label: string;
|
|
14
|
+
value: InvoiceCondition | null;
|
|
15
|
+
}[];
|
|
16
|
+
supportsInvoiceCondition(): boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TranslateService } from "@ngx-translate/core";
|
|
2
|
+
import { Document } from "../../../entities/document/document";
|
|
3
|
+
import { InvoiceCondition } from "../../../entities/invoice-condition/invoice-condition";
|
|
4
|
+
import { GridColumn, ValidationContext, ValidationResult, WmsIntegrationStrategy } from "./wms-integration-strategy.interface";
|
|
5
|
+
export declare class SiltStrategy implements WmsIntegrationStrategy {
|
|
6
|
+
getGridColumns(translate: TranslateService, isClienteExterno: boolean): GridColumn[];
|
|
7
|
+
updateDocumentKey(document: Document): string;
|
|
8
|
+
validateDocument(document: Document, context: ValidationContext): ValidationResult;
|
|
9
|
+
getFilteredInvoiceConditions(invoiceCondition: InvoiceCondition, allConditions: {
|
|
10
|
+
label: string;
|
|
11
|
+
value: InvoiceCondition | null;
|
|
12
|
+
}[]): {
|
|
13
|
+
label: string;
|
|
14
|
+
value: InvoiceCondition | null;
|
|
15
|
+
}[];
|
|
16
|
+
supportsInvoiceCondition(): boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TranslateService } from "@ngx-translate/core";
|
|
2
|
+
import { Document } from "../../../entities/document/document";
|
|
3
|
+
import { InvoiceCondition } from "../../../entities/invoice-condition/invoice-condition";
|
|
4
|
+
import { GridColumn, ValidationContext, ValidationResult, WmsIntegrationStrategy } from "./wms-integration-strategy.interface";
|
|
5
|
+
export declare class WisStrategy implements WmsIntegrationStrategy {
|
|
6
|
+
getGridColumns(translate: TranslateService, isClienteExterno: boolean): GridColumn[];
|
|
7
|
+
updateDocumentKey(document: Document): string;
|
|
8
|
+
validateDocument(document: Document, context: ValidationContext): ValidationResult;
|
|
9
|
+
getFilteredInvoiceConditions(invoiceCondition: InvoiceCondition, allConditions: {
|
|
10
|
+
label: string;
|
|
11
|
+
value: InvoiceCondition | null;
|
|
12
|
+
}[]): {
|
|
13
|
+
label: string;
|
|
14
|
+
value: InvoiceCondition | null;
|
|
15
|
+
}[];
|
|
16
|
+
supportsInvoiceCondition(): boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WmsSystem } from "../../../entities/wms-system/wms-system";
|
|
2
|
+
import { WmsIntegrationStrategy } from "./wms-integration-strategy.interface";
|
|
3
|
+
export declare class WmsIntegrationStrategyFactory {
|
|
4
|
+
private readonly strategies;
|
|
5
|
+
constructor();
|
|
6
|
+
getStrategy(wmsSystem: WmsSystem): WmsIntegrationStrategy | null;
|
|
7
|
+
hasStrategy(wmsSystem: WmsSystem): boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { TranslateService } from "@ngx-translate/core";
|
|
2
|
+
import { Document } from "../../../entities/document/document";
|
|
3
|
+
import { InvoiceCondition } from "../../../entities/invoice-condition/invoice-condition";
|
|
4
|
+
export declare enum ColumnType {
|
|
5
|
+
TEXT = "text",
|
|
6
|
+
DROPDOWN = "dropdown",
|
|
7
|
+
FORMATTED = "formatted"
|
|
8
|
+
}
|
|
9
|
+
export interface GridColumn {
|
|
10
|
+
field: string;
|
|
11
|
+
header: string;
|
|
12
|
+
width?: string;
|
|
13
|
+
type?: ColumnType;
|
|
14
|
+
pipe?: string;
|
|
15
|
+
editable?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface WmsIntegrationStrategy {
|
|
18
|
+
/**
|
|
19
|
+
* Retorna as colunas do grid específicas para este tipo de integração
|
|
20
|
+
*/
|
|
21
|
+
getGridColumns(translate: TranslateService, isClienteExterno: boolean): GridColumn[];
|
|
22
|
+
/**
|
|
23
|
+
* Atualiza a key do documento conforme o formato do WMS
|
|
24
|
+
*/
|
|
25
|
+
updateDocumentKey(document: Document): string;
|
|
26
|
+
/**
|
|
27
|
+
* Valida o documento conforme as regras do WMS
|
|
28
|
+
*/
|
|
29
|
+
validateDocument(document: Document, context: ValidationContext): ValidationResult;
|
|
30
|
+
/**
|
|
31
|
+
* Retorna as condições de invoice filtradas para este WMS
|
|
32
|
+
*/
|
|
33
|
+
getFilteredInvoiceConditions(invoiceCondition: InvoiceCondition, allConditions: {
|
|
34
|
+
label: string;
|
|
35
|
+
value: InvoiceCondition | null;
|
|
36
|
+
}[]): {
|
|
37
|
+
label: string;
|
|
38
|
+
value: InvoiceCondition | null;
|
|
39
|
+
}[];
|
|
40
|
+
/**
|
|
41
|
+
* Indica se este WMS suporta invoice condition no grid
|
|
42
|
+
*/
|
|
43
|
+
supportsInvoiceCondition(): boolean;
|
|
44
|
+
}
|
|
45
|
+
export interface ValidationContext {
|
|
46
|
+
yard?: any;
|
|
47
|
+
schedule?: any;
|
|
48
|
+
agenda?: any;
|
|
49
|
+
}
|
|
50
|
+
export interface ValidationResult {
|
|
51
|
+
isValid: boolean;
|
|
52
|
+
errorMessageKey?: string;
|
|
53
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TranslateService } from
|
|
2
|
-
import { InvoiceCondition } from "
|
|
1
|
+
import { TranslateService } from "@ngx-translate/core";
|
|
2
|
+
import { InvoiceCondition } from "../../entities/invoice-condition/invoice-condition";
|
|
3
3
|
export declare function getInvoiceConditions(translate: TranslateService): {
|
|
4
4
|
label: string;
|
|
5
5
|
value: InvoiceCondition;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { EntityService } from
|
|
2
|
-
import { DocumentDto } from
|
|
3
|
-
import { HttpClient } from
|
|
4
|
-
import { MessageService } from
|
|
5
|
-
import { FindDocumentsInput } from
|
|
1
|
+
import { EntityService, PagedResults } from "./../../../sam-senior/core/entity-service";
|
|
2
|
+
import { DocumentDto } from "./document-dto";
|
|
3
|
+
import { HttpClient } from "@angular/common/http";
|
|
4
|
+
import { MessageService } from "primeng/api";
|
|
5
|
+
import { FindDocumentsInput } from "./find-documents-input";
|
|
6
|
+
import { Document } from "./document";
|
|
6
7
|
export declare class DocumentService extends EntityService<DocumentDto> {
|
|
7
8
|
protected http: HttpClient;
|
|
8
9
|
protected messageService: MessageService;
|
|
9
10
|
constructor(http: HttpClient, messageService: MessageService);
|
|
10
|
-
findDocuments(input: FindDocumentsInput): import("rxjs/internal/Observable").Observable<
|
|
11
|
+
findDocuments(input: FindDocumentsInput): import("rxjs/internal/Observable").Observable<FindDocumentsOutput>;
|
|
11
12
|
getSystemIntegration(): import("rxjs/internal/Observable").Observable<Object>;
|
|
12
13
|
getYard(yardId: string): import("rxjs/internal/Observable").Observable<Object>;
|
|
13
14
|
}
|
|
15
|
+
export interface FindDocumentsOutput extends PagedResults<Document> {
|
|
16
|
+
}
|