@seniorsistemas/yms-integration 1.35.0 → 1.36.0-15117912-25b1-4e30-9f5f-7a7f4d9cc22e
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 +72 -21
- 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/src/wms/components/document-grid/document-grid.component.js +3 -9
- package/esm2015/src/wms/components/document-grid/insert-key/insert-key.component.js +2 -1
- package/esm2015/src/wms/components/document-grid/register-document/register-document.component.js +3 -10
- package/esm2015/src/wms/components/document-list/document-list.component.js +56 -5
- package/esm2015/src/wms/components/document-list/document-list.module.js +8 -3
- package/esm2015/src/wms/components/utils/invoice-conditions.js +12 -0
- package/esm2015/src/wms/entities/document/find-documents-input.js +1 -1
- package/esm5/src/wms/components/document-grid/document-grid.component.js +3 -9
- package/esm5/src/wms/components/document-grid/insert-key/insert-key.component.js +2 -1
- package/esm5/src/wms/components/document-grid/register-document/register-document.component.js +3 -10
- package/esm5/src/wms/components/document-list/document-list.component.js +58 -5
- package/esm5/src/wms/components/document-list/document-list.module.js +8 -3
- package/esm5/src/wms/components/utils/invoice-conditions.js +12 -0
- package/esm5/src/wms/entities/document/find-documents-input.js +1 -1
- package/fesm2015/seniorsistemas-yms-integration.js +70 -21
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +72 -21
- package/fesm5/seniorsistemas-yms-integration.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-yms-integration.metadata.json +1 -1
- package/src/wms/components/document-grid/document-grid.component.d.ts +4 -4
- package/src/wms/components/document-grid/register-document/register-document.component.d.ts +1 -1
- package/src/wms/components/document-list/document-list.component.d.ts +19 -1
- package/src/wms/components/utils/invoice-conditions.d.ts +6 -0
- package/src/wms/entities/document/find-documents-input.d.ts +1 -0
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import * as tslib_1 from "tslib";
|
|
2
2
|
import { NgModule } from "@angular/core";
|
|
3
3
|
import { CommonModule } from "@angular/common";
|
|
4
|
-
import { LoadingStateModule } from "@seniorsistemas/angular-components";
|
|
4
|
+
import { ButtonModule, LoadingStateModule } from "@seniorsistemas/angular-components";
|
|
5
5
|
import { IntegrationDispatcher } from "@seniorsistemas/yms-routines";
|
|
6
6
|
import { TranslateModule } from "@ngx-translate/core";
|
|
7
7
|
import { DocumentListComponent } from "./document-list.component";
|
|
8
8
|
import { TableModule } from "primeng/table";
|
|
9
9
|
import { DocumentService } from "../../entities/document/document.service";
|
|
10
|
+
import { DropdownModule } from "primeng/primeng";
|
|
11
|
+
import { FormsModule } from "@angular/forms";
|
|
10
12
|
var DocumentListModule = /** @class */ (function () {
|
|
11
13
|
function DocumentListModule(dispatcher) {
|
|
12
14
|
this.dispatcher = dispatcher;
|
|
@@ -18,7 +20,10 @@ var DocumentListModule = /** @class */ (function () {
|
|
|
18
20
|
CommonModule,
|
|
19
21
|
TranslateModule,
|
|
20
22
|
LoadingStateModule,
|
|
21
|
-
TableModule
|
|
23
|
+
TableModule,
|
|
24
|
+
DropdownModule,
|
|
25
|
+
ButtonModule,
|
|
26
|
+
FormsModule
|
|
22
27
|
],
|
|
23
28
|
declarations: [DocumentListComponent],
|
|
24
29
|
entryComponents: [DocumentListComponent],
|
|
@@ -30,4 +35,4 @@ var DocumentListModule = /** @class */ (function () {
|
|
|
30
35
|
return DocumentListModule;
|
|
31
36
|
}());
|
|
32
37
|
export { DocumentListModule };
|
|
33
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
38
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG9jdW1lbnQtbGlzdC5tb2R1bGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Ac2VuaW9yc2lzdGVtYXMveW1zLW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InByaW1lbmcvcHJpbWVuZ1wiO1xuaW1wb3J0IHsgRm9ybXNNb2R1bGUgfSBmcm9tIFwiQGFuZ3VsYXIvZm9ybXNcIjtcblxuQE5nTW9kdWxlKHtcbiAgICBpbXBvcnRzOiBbXG4gICAgICAgIENvbW1vbk1vZHVsZSxcbiAgICAgICAgVHJhbnNsYXRlTW9kdWxlLFxuICAgICAgICBMb2FkaW5nU3RhdGVNb2R1bGUsXG4gICAgICAgIFRhYmxlTW9kdWxlLFxuICAgICAgICBEcm9wZG93bk1vZHVsZSxcbiAgICAgICAgQnV0dG9uTW9kdWxlLFxuICAgICAgICBGb3Jtc01vZHVsZVxuICAgIF0sXG4gICAgZGVjbGFyYXRpb25zOiBbRG9jdW1lbnRMaXN0Q29tcG9uZW50XSxcbiAgICBlbnRyeUNvbXBvbmVudHM6IFtEb2N1bWVudExpc3RDb21wb25lbnRdLFxuICAgIGV4cG9ydHM6IFtEb2N1bWVudExpc3RDb21wb25lbnRdLFxuICAgIHByb3ZpZGVyczogW0RvY3VtZW50U2VydmljZV1cbn0pXG5leHBvcnQgY2xhc3MgRG9jdW1lbnRMaXN0TW9kdWxlIHtcbiAgICBjb25zdHJ1Y3Rvcihwcml2YXRlIHJlYWRvbmx5IGRpc3BhdGNoZXI6IEludGVncmF0aW9uRGlzcGF0Y2hlcikge1xuICAgICAgICB0aGlzLmRpc3BhdGNoZXIuZGlzcGF0Y2goRG9jdW1lbnRMaXN0Q29tcG9uZW50KTtcbiAgICB9XG59XG4iXX0=
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InvoiceCondition } from "../../../wms/entities/invoice-condition/invoice-condition";
|
|
2
|
+
export function getInvoiceConditions(translate) {
|
|
3
|
+
return [
|
|
4
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_no_way"), value: null },
|
|
5
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_authorized"), value: InvoiceCondition.AUTHORIZED },
|
|
6
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_manual_authorized"), value: InvoiceCondition.MANUAL_AUTHORIZED },
|
|
7
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
8
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_devolution"), value: InvoiceCondition.DEVOLUTION },
|
|
9
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_rejected"), value: InvoiceCondition.REJECTED },
|
|
10
|
+
];
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW52b2ljZS1jb25kaXRpb25zLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQHNlbmlvcnNpc3RlbWFzL3ltcy1pbnRlZ3JhdGlvbi8iLCJzb3VyY2VzIjpbInNyYy93bXMvY29tcG9uZW50cy91dGlscy9pbnZvaWNlLWNvbmRpdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sMkRBQTJELENBQUM7QUFFN0YsTUFBTSxVQUFVLG9CQUFvQixDQUFDLFNBQTJCO0lBQzVELE9BQU87UUFDSCxFQUFFLEtBQUssRUFBRSxTQUFTLENBQUMsT0FBTyxDQUFDLDBDQUEwQyxDQUFDLEVBQUUsS0FBSyxFQUFFLElBQUksRUFBRTtRQUNyRixFQUFFLEtBQUssRUFBRSxTQUFTLENBQUMsT0FBTyxDQUFDLHdEQUF3RCxDQUFDLEVBQUUsS0FBSyxFQUFFLGdCQUFnQixDQUFDLFVBQVUsRUFBRTtRQUMxSCxFQUFFLEtBQUssRUFBRSxTQUFTLENBQUMsT0FBTyxDQUFDLCtEQUErRCxDQUFDLEVBQUUsS0FBSyxFQUFFLGdCQUFnQixDQUFDLGlCQUFpQixFQUFFO1FBQ3hJLEVBQUUsS0FBSyxFQUFFLFNBQVMsQ0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PUklaRUQgfSxcbiAgICAgICAgeyBsYWJlbDogdHJhbnNsYXRlLmluc3RhbnQoXCJ5bXMuaW50Lndtc19ncmlkX2RvY3VtZW50X2ludm9pY2VfY29uZGl0aW9uX21hbnVhbF9hdXRob3JpemVkXCIpLCB2YWx1ZTogSW52b2ljZUNvbmRpdGlvbi5NQU5VQUxfQVVUSE9SSVpFRCB9LFxuICAgICAgICB7IGxhYmVsOiB0cmFuc2xhdGUuaW5zdGFudChcInltcy5pbnQud21zX2dyaWRfZG9jdW1lbnRfaW52b2ljZV9jb25kaXRpb25fcGFydGlhbF9hdXRob3JpemVkXCIpLCB2YWx1ZTogSW52b2ljZUNvbmRpdGlvbi5QQVJUSUFMX0FVVEhPUklaRUQgfSxcbiAgICAgICAgeyBsYWJlbDogdHJhbnNsYXRlLmluc3RhbnQoXCJ5bXMuaW50Lndtc19ncmlkX2RvY3VtZW50X2ludm9pY2VfY29uZGl0aW9uX2Rldm9sdXRpb25cIiksIHZhbHVlOiBJbnZvaWNlQ29uZGl0aW9uLkRFVk9MVVRJT04gfSxcbiAgICAgICAgeyBsYWJlbDogdHJhbnNsYXRlLmluc3RhbnQoXCJ5bXMuaW50Lndtc19ncmlkX2RvY3VtZW50X2ludm9pY2VfY29uZGl0aW9uX3JlamVjdGVkXCIpLCB2YWx1ZTogSW52b2ljZUNvbmRpdGlvbi5SRUpFQ1RFRCB9LFxuICAgIF07XG59XG4iXX0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmluZC1kb2N1bWVudHMtaW5wdXQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Ac2VuaW9yc2lzdGVtYXMveW1zLWludGVncmF0aW9uLyIsInNvdXJjZXMiOlsic3JjL3dtcy9lbnRpdGllcy9kb2N1bWVudC9maW5kLWRvY3VtZW50cy1pbnB1dC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBGaW5kRG9jdW1lbnRzSW5wdXQge1xuICAgIGRvY3VtZW50S2V5czogc3RyaW5nW107XG4gICAgaW52b2ljZXM6IGFueTtcbiAgICBsb2dpc3RjVW5pdE5hbWU6IHN0cmluZztcbiAgICBzaXplOiBudW1iZXI7XG4gICAgb2Zmc2V0OiBudW1iZXI7XG4gICAgcHVyY2hhc2VPcmRlcjogc3RyaW5nO1xufVxuIl19
|
|
@@ -3075,6 +3075,17 @@ var InvoiceCondition;
|
|
|
3075
3075
|
InvoiceCondition["REJECTED"] = "REJECTED";
|
|
3076
3076
|
})(InvoiceCondition || (InvoiceCondition = {}));
|
|
3077
3077
|
|
|
3078
|
+
function getInvoiceConditions(translate) {
|
|
3079
|
+
return [
|
|
3080
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_no_way"), value: null },
|
|
3081
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_authorized"), value: InvoiceCondition.AUTHORIZED },
|
|
3082
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_manual_authorized"), value: InvoiceCondition.MANUAL_AUTHORIZED },
|
|
3083
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
3084
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_devolution"), value: InvoiceCondition.DEVOLUTION },
|
|
3085
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_rejected"), value: InvoiceCondition.REJECTED },
|
|
3086
|
+
];
|
|
3087
|
+
}
|
|
3088
|
+
|
|
3078
3089
|
let DocumentGridComponent = class DocumentGridComponent {
|
|
3079
3090
|
constructor(translate, documentService, confirmationService, integrationService, agendaService, utils) {
|
|
3080
3091
|
this.translate = translate;
|
|
@@ -3086,16 +3097,9 @@ let DocumentGridComponent = class DocumentGridComponent {
|
|
|
3086
3097
|
this.viewDocument = new EventEmitter();
|
|
3087
3098
|
this.gridData = [];
|
|
3088
3099
|
this.enableButtonIsClienteExterno = true;
|
|
3100
|
+
this.invoiceConditions = getInvoiceConditions(this.translate);
|
|
3089
3101
|
this.summary = "yms.int.wms_saved_document_message_title";
|
|
3090
3102
|
this.ngUnsubscribe = new Subject();
|
|
3091
|
-
this.invoiceConditions = [
|
|
3092
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_no_way"), value: null },
|
|
3093
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_authorized"), value: InvoiceCondition.AUTHORIZED },
|
|
3094
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_manual_authorized"), value: InvoiceCondition.MANUAL_AUTHORIZED },
|
|
3095
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
3096
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_devolution"), value: InvoiceCondition.DEVOLUTION },
|
|
3097
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_rejected"), value: InvoiceCondition.REJECTED },
|
|
3098
|
-
];
|
|
3099
3103
|
this.selection = [];
|
|
3100
3104
|
}
|
|
3101
3105
|
getFilteredInvoiceConditions(invoiceConditions) {
|
|
@@ -3470,14 +3474,7 @@ let RegisterDocumentComponent = class RegisterDocumentComponent {
|
|
|
3470
3474
|
this.visible = new EventEmitter();
|
|
3471
3475
|
this.visibleChange = new EventEmitter();
|
|
3472
3476
|
this.isSaveFormValid = false;
|
|
3473
|
-
this.invoiceCondition =
|
|
3474
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_no_way"), value: null },
|
|
3475
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_authorized"), value: InvoiceCondition.AUTHORIZED },
|
|
3476
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_manual_authorized"), value: InvoiceCondition.MANUAL_AUTHORIZED },
|
|
3477
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
3478
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_devolution"), value: InvoiceCondition.DEVOLUTION },
|
|
3479
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_rejected"), value: InvoiceCondition.REJECTED },
|
|
3480
|
-
];
|
|
3477
|
+
this.invoiceCondition = getInvoiceConditions(this.translate);
|
|
3481
3478
|
}
|
|
3482
3479
|
ngOnInit() {
|
|
3483
3480
|
this.getFormGroup();
|
|
@@ -3666,6 +3663,7 @@ let InsertKeyComponent = class InsertKeyComponent {
|
|
|
3666
3663
|
searchKey() {
|
|
3667
3664
|
this.isLoading = true;
|
|
3668
3665
|
const key = {
|
|
3666
|
+
purchaseOrder: this.formGroup.get('purchaseOrder').value,
|
|
3669
3667
|
documentKeys: [this.formGroup.get('key').value],
|
|
3670
3668
|
invoices: [{
|
|
3671
3669
|
number: this.formGroup.get('invoiceNumber').value,
|
|
@@ -3916,15 +3914,27 @@ DocumentListDescritor = __decorate([
|
|
|
3916
3914
|
})
|
|
3917
3915
|
], DocumentListDescritor);
|
|
3918
3916
|
let DocumentListComponent = class DocumentListComponent extends DocumentListDescritor {
|
|
3919
|
-
constructor(documentService) {
|
|
3917
|
+
constructor(documentService, translate, utils) {
|
|
3920
3918
|
super();
|
|
3921
3919
|
this.documentService = documentService;
|
|
3920
|
+
this.translate = translate;
|
|
3921
|
+
this.utils = utils;
|
|
3922
3922
|
this.getColumns = [];
|
|
3923
3923
|
this.documents = [];
|
|
3924
|
+
this.amendedDocuments = [];
|
|
3924
3925
|
this.labels = [];
|
|
3925
3926
|
this.selected = [];
|
|
3926
3927
|
this.gridLoading = true;
|
|
3927
3928
|
this.ngUnsubscribe = new Subject();
|
|
3929
|
+
this.invoiceConditions = [
|
|
3930
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_no_way"), value: null },
|
|
3931
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_authorized"), value: InvoiceCondition.AUTHORIZED },
|
|
3932
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_manual_authorized"), value: InvoiceCondition.MANUAL_AUTHORIZED },
|
|
3933
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
3934
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_devolution"), value: InvoiceCondition.DEVOLUTION },
|
|
3935
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_rejected"), value: InvoiceCondition.REJECTED },
|
|
3936
|
+
];
|
|
3937
|
+
this.isAuthorized = (condition) => (condition === InvoiceCondition.AUTHORIZED);
|
|
3928
3938
|
}
|
|
3929
3939
|
getColumnLabels() {
|
|
3930
3940
|
if (this.isWmsWIS()) {
|
|
@@ -3971,6 +3981,40 @@ let DocumentListComponent = class DocumentListComponent extends DocumentListDesc
|
|
|
3971
3981
|
this.searchDocument(event);
|
|
3972
3982
|
});
|
|
3973
3983
|
}
|
|
3984
|
+
getFilteredInvoiceConditions(invoiceConditions) {
|
|
3985
|
+
if (invoiceConditions === InvoiceCondition.AUTHORIZED) {
|
|
3986
|
+
return this.invoiceConditions.filter(cond => cond.value === InvoiceCondition.AUTHORIZED);
|
|
3987
|
+
}
|
|
3988
|
+
else {
|
|
3989
|
+
return this.invoiceConditions.filter(cond => cond.value !== InvoiceCondition.AUTHORIZED);
|
|
3990
|
+
}
|
|
3991
|
+
}
|
|
3992
|
+
onInvoiceConditionChange(event, document) {
|
|
3993
|
+
this.disabled = true;
|
|
3994
|
+
document.invoiceCondition = event.value;
|
|
3995
|
+
if (this.amendedDocuments.length > 0) {
|
|
3996
|
+
this.amendedDocuments.forEach((doc) => {
|
|
3997
|
+
if (doc.id === document.id) {
|
|
3998
|
+
doc.invoiceCondition = event.value;
|
|
3999
|
+
}
|
|
4000
|
+
else {
|
|
4001
|
+
this.amendedDocuments.push(document);
|
|
4002
|
+
}
|
|
4003
|
+
});
|
|
4004
|
+
}
|
|
4005
|
+
else {
|
|
4006
|
+
this.amendedDocuments.push(document);
|
|
4007
|
+
}
|
|
4008
|
+
}
|
|
4009
|
+
save() {
|
|
4010
|
+
this.amendedDocuments.forEach((document) => {
|
|
4011
|
+
this.documentService.update(document.id, document).subscribe(() => {
|
|
4012
|
+
this.utils.message("success", "yms.int.wms_saved_document_message_title", "saved_message_content");
|
|
4013
|
+
this.disabled = false;
|
|
4014
|
+
});
|
|
4015
|
+
});
|
|
4016
|
+
this.amendedDocuments = [];
|
|
4017
|
+
}
|
|
3974
4018
|
searchDocument(event) {
|
|
3975
4019
|
const size = event.rows;
|
|
3976
4020
|
const page = event.first / size;
|
|
@@ -4001,10 +4045,12 @@ __decorate([
|
|
|
4001
4045
|
], DocumentListComponent.prototype, "wmsSystem", void 0);
|
|
4002
4046
|
DocumentListComponent = __decorate([
|
|
4003
4047
|
Component({
|
|
4004
|
-
template: "<div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <p-table\n selectionMode=\"single\"\n [(selection)]=\"selected\"\n [value]=\"documents\"\n [columns]=\"getColumns\"\n dataKey=\"id\"\n rows=\"10\"\n [paginator]=\"true\"\n [totalRecords]=\"gridTotalRecords\"\n [lazy]=\"true\"\n [resizableColumns]=\"true\"\n (onLazyLoad)=\"updateGridData($event)\"\n *sLoadingState=\"gridLoading\"\n sortMode=\"multiple\"\n styleClass=\"sds-table-scrollable\"\n [rowsPerPageOptions]=\"[10, 20, 50, 100, 200]\"\n paginatorDropdownScrollHeight=\"250px\"\n [scrollable]=\"true\"\n >\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngFor=\"let col of columns\" class=\"table-col-width\">\n </colgroup>\n </ng-template>\n\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngFor=\"let col of columns\" pResizableColumn [pSortableColumn]=\"col.field\" scope=\"col\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.label | translate }}</span>\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\n <tr *ngIf=\"isWmsWIS()\">\n <td>{{ rowData?.invoiceNumber || 'N/A' }}</td>\n <td>{{ rowData?.invoiceSerialNumber || 'N/A' }}</td>\n <td>{{ rowData?.invoiceKey || 'N/A' }}</td>\n <td>{{ rowData?.partnerName || 'N/A' }}</td>\n <td>{{ rowData?.partnerDocument || 'N/A' }}</td>\n <td>{{ rowData?.code || 'N/A' }}</td>\n <td>\n
|
|
4005
|
-
styles: [".table-col-width{width:250px}"]
|
|
4048
|
+
template: "<div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <p-table\n selectionMode=\"single\"\n [(selection)]=\"selected\"\n [value]=\"documents\"\n [columns]=\"getColumns\"\n dataKey=\"id\"\n rows=\"10\"\n [paginator]=\"true\"\n [totalRecords]=\"gridTotalRecords\"\n [lazy]=\"true\"\n [resizableColumns]=\"true\"\n (onLazyLoad)=\"updateGridData($event)\"\n *sLoadingState=\"gridLoading\"\n sortMode=\"multiple\"\n styleClass=\"sds-table-scrollable\"\n [rowsPerPageOptions]=\"[10, 20, 50, 100, 200]\"\n paginatorDropdownScrollHeight=\"250px\"\n [scrollable]=\"true\"\n >\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngFor=\"let col of columns\" class=\"table-col-width\">\n </colgroup>\n </ng-template>\n\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngFor=\"let col of columns\" pResizableColumn [pSortableColumn]=\"col.field\" scope=\"col\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.label | translate }}</span>\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\n <tr *ngIf=\"isWmsWIS()\">\n <td>{{ rowData?.invoiceNumber || 'N/A' }}</td>\n <td>{{ rowData?.invoiceSerialNumber || 'N/A' }}</td>\n <td>{{ rowData?.invoiceKey || 'N/A' }}</td>\n <td>{{ rowData?.partnerName || 'N/A' }}</td>\n <td>{{ rowData?.partnerDocument || 'N/A' }}</td>\n <td>{{ rowData?.code || 'N/A' }}</td>\n <td>\n <p-dropdown\n inputId=\"invoiceCondition\"\n name=\"invoiceCondition\"\n [autoWidth]=\"false\"\n [options]=\"getFilteredInvoiceConditions(rowData?.invoiceCondition)\"\n appendTo=\"body\"\n [(ngModel)]=\"rowData.invoiceCondition\"\n [disabled]=\"isAuthorized(rowData.invoiceCondition)\"\n (onChange)=\"onInvoiceConditionChange($event, rowData)\">\n </p-dropdown>\n </td>\n <td>{{ rowData?.notes || 'N/A' }}</td>\n </tr>\n <tr *ngIf=\"isWmsSeniorConnect()\">\n <td>{{rowData?.key}}</td>\n <td>{{rowData?.partnerName}}</td>\n <td>{{rowData?.partnerDocument}}</td>\n </tr>\n <tr *ngIf=\"!isWmsWIS() && !isWmsSeniorConnect()\">\n <td>{{rowData?.invoiceKey}}</td>\n <td>{{rowData?.invoiceNumber}}</td>\n <td>{{rowData?.invoiceSerialNumber}}</td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"paginatorright\">\n <span>\n {{ gridTotalRecords + \" \" + \n ('yms.int.wms_register_document_total_elements' | translate:{value: gridTotalRecords}) }}\n </span>\n </ng-template>\n </p-table>\n <div class=\"button-save\">\n <s-button priority=\"primary\" [label]=\"'save' | translate\"\n [disabled]=\"!disabled || !this.documents\"\n (click)=\"save()\">\n </s-button>\n </div>\n </div>\n</div>",
|
|
4049
|
+
styles: [".table-col-width{width:250px}.button-save{margin:5px 0}"]
|
|
4006
4050
|
}),
|
|
4007
|
-
__metadata("design:paramtypes", [DocumentService
|
|
4051
|
+
__metadata("design:paramtypes", [DocumentService,
|
|
4052
|
+
TranslateService,
|
|
4053
|
+
UtilsMessageService])
|
|
4008
4054
|
], DocumentListComponent);
|
|
4009
4055
|
|
|
4010
4056
|
let DocumentListModule = class DocumentListModule {
|
|
@@ -4019,7 +4065,10 @@ DocumentListModule = __decorate([
|
|
|
4019
4065
|
CommonModule,
|
|
4020
4066
|
TranslateModule,
|
|
4021
4067
|
LoadingStateModule,
|
|
4022
|
-
TableModule
|
|
4068
|
+
TableModule,
|
|
4069
|
+
DropdownModule,
|
|
4070
|
+
ButtonModule,
|
|
4071
|
+
FormsModule
|
|
4023
4072
|
],
|
|
4024
4073
|
declarations: [DocumentListComponent],
|
|
4025
4074
|
entryComponents: [DocumentListComponent],
|