@seniorsistemas/yms-integration 1.35.0 → 1.36.0-26faa564-52c1-4bde-91a1-21198ccbb911
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
|
@@ -3356,6 +3356,17 @@
|
|
|
3356
3356
|
InvoiceCondition["REJECTED"] = "REJECTED";
|
|
3357
3357
|
})(InvoiceCondition || (InvoiceCondition = {}));
|
|
3358
3358
|
|
|
3359
|
+
function getInvoiceConditions(translate) {
|
|
3360
|
+
return [
|
|
3361
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_no_way"), value: null },
|
|
3362
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_authorized"), value: InvoiceCondition.AUTHORIZED },
|
|
3363
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_manual_authorized"), value: InvoiceCondition.MANUAL_AUTHORIZED },
|
|
3364
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
3365
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_devolution"), value: InvoiceCondition.DEVOLUTION },
|
|
3366
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_rejected"), value: InvoiceCondition.REJECTED },
|
|
3367
|
+
];
|
|
3368
|
+
}
|
|
3369
|
+
|
|
3359
3370
|
var DocumentGridComponent = /** @class */ (function () {
|
|
3360
3371
|
function DocumentGridComponent(translate, documentService, confirmationService, integrationService, agendaService, utils) {
|
|
3361
3372
|
this.translate = translate;
|
|
@@ -3367,16 +3378,9 @@
|
|
|
3367
3378
|
this.viewDocument = new core.EventEmitter();
|
|
3368
3379
|
this.gridData = [];
|
|
3369
3380
|
this.enableButtonIsClienteExterno = true;
|
|
3381
|
+
this.invoiceConditions = getInvoiceConditions(this.translate);
|
|
3370
3382
|
this.summary = "yms.int.wms_saved_document_message_title";
|
|
3371
3383
|
this.ngUnsubscribe = new rxjs.Subject();
|
|
3372
|
-
this.invoiceConditions = [
|
|
3373
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_no_way"), value: null },
|
|
3374
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_authorized"), value: InvoiceCondition.AUTHORIZED },
|
|
3375
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_manual_authorized"), value: InvoiceCondition.MANUAL_AUTHORIZED },
|
|
3376
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
3377
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_devolution"), value: InvoiceCondition.DEVOLUTION },
|
|
3378
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_rejected"), value: InvoiceCondition.REJECTED },
|
|
3379
|
-
];
|
|
3380
3384
|
this.selection = [];
|
|
3381
3385
|
}
|
|
3382
3386
|
DocumentGridComponent.prototype.getFilteredInvoiceConditions = function (invoiceConditions) {
|
|
@@ -3760,14 +3764,7 @@
|
|
|
3760
3764
|
this.visible = new core.EventEmitter();
|
|
3761
3765
|
this.visibleChange = new core.EventEmitter();
|
|
3762
3766
|
this.isSaveFormValid = false;
|
|
3763
|
-
this.invoiceCondition =
|
|
3764
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_no_way"), value: null },
|
|
3765
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_authorized"), value: InvoiceCondition.AUTHORIZED },
|
|
3766
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_manual_authorized"), value: InvoiceCondition.MANUAL_AUTHORIZED },
|
|
3767
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
3768
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_devolution"), value: InvoiceCondition.DEVOLUTION },
|
|
3769
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_rejected"), value: InvoiceCondition.REJECTED },
|
|
3770
|
-
];
|
|
3767
|
+
this.invoiceCondition = getInvoiceConditions(this.translate);
|
|
3771
3768
|
}
|
|
3772
3769
|
RegisterDocumentComponent.prototype.ngOnInit = function () {
|
|
3773
3770
|
this.getFormGroup();
|
|
@@ -3966,6 +3963,7 @@
|
|
|
3966
3963
|
var _this = this;
|
|
3967
3964
|
this.isLoading = true;
|
|
3968
3965
|
var key = {
|
|
3966
|
+
purchaseOrder: this.formGroup.get('purchaseOrder').value,
|
|
3969
3967
|
documentKeys: [this.formGroup.get('key').value],
|
|
3970
3968
|
invoices: [{
|
|
3971
3969
|
number: this.formGroup.get('invoiceNumber').value,
|
|
@@ -4230,15 +4228,27 @@
|
|
|
4230
4228
|
}());
|
|
4231
4229
|
var DocumentListComponent = /** @class */ (function (_super) {
|
|
4232
4230
|
__extends(DocumentListComponent, _super);
|
|
4233
|
-
function DocumentListComponent(documentService) {
|
|
4231
|
+
function DocumentListComponent(documentService, translate, utils) {
|
|
4234
4232
|
var _this = _super.call(this) || this;
|
|
4235
4233
|
_this.documentService = documentService;
|
|
4234
|
+
_this.translate = translate;
|
|
4235
|
+
_this.utils = utils;
|
|
4236
4236
|
_this.getColumns = [];
|
|
4237
4237
|
_this.documents = [];
|
|
4238
|
+
_this.amendedDocuments = [];
|
|
4238
4239
|
_this.labels = [];
|
|
4239
4240
|
_this.selected = [];
|
|
4240
4241
|
_this.gridLoading = true;
|
|
4241
4242
|
_this.ngUnsubscribe = new rxjs.Subject();
|
|
4243
|
+
_this.invoiceConditions = [
|
|
4244
|
+
{ label: _this.translate.instant("yms.int.wms_grid_document_invoice_no_way"), value: null },
|
|
4245
|
+
{ label: _this.translate.instant("yms.int.wms_grid_document_invoice_condition_authorized"), value: InvoiceCondition.AUTHORIZED },
|
|
4246
|
+
{ label: _this.translate.instant("yms.int.wms_grid_document_invoice_condition_manual_authorized"), value: InvoiceCondition.MANUAL_AUTHORIZED },
|
|
4247
|
+
{ label: _this.translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
4248
|
+
{ label: _this.translate.instant("yms.int.wms_grid_document_invoice_condition_devolution"), value: InvoiceCondition.DEVOLUTION },
|
|
4249
|
+
{ label: _this.translate.instant("yms.int.wms_grid_document_invoice_condition_rejected"), value: InvoiceCondition.REJECTED },
|
|
4250
|
+
];
|
|
4251
|
+
_this.isAuthorized = function (condition) { return (condition === InvoiceCondition.AUTHORIZED); };
|
|
4242
4252
|
return _this;
|
|
4243
4253
|
}
|
|
4244
4254
|
DocumentListComponent.prototype.getColumnLabels = function () {
|
|
@@ -4285,6 +4295,42 @@
|
|
|
4285
4295
|
_this.searchDocument(event);
|
|
4286
4296
|
});
|
|
4287
4297
|
};
|
|
4298
|
+
DocumentListComponent.prototype.getFilteredInvoiceConditions = function (invoiceConditions) {
|
|
4299
|
+
if (invoiceConditions === InvoiceCondition.AUTHORIZED) {
|
|
4300
|
+
return this.invoiceConditions.filter(function (cond) { return cond.value === InvoiceCondition.AUTHORIZED; });
|
|
4301
|
+
}
|
|
4302
|
+
else {
|
|
4303
|
+
return this.invoiceConditions.filter(function (cond) { return cond.value !== InvoiceCondition.AUTHORIZED; });
|
|
4304
|
+
}
|
|
4305
|
+
};
|
|
4306
|
+
DocumentListComponent.prototype.onInvoiceConditionChange = function (event, document) {
|
|
4307
|
+
var _this = this;
|
|
4308
|
+
this.disabled = true;
|
|
4309
|
+
document.invoiceCondition = event.value;
|
|
4310
|
+
if (this.amendedDocuments.length > 0) {
|
|
4311
|
+
this.amendedDocuments.forEach(function (doc) {
|
|
4312
|
+
if (doc.id === document.id) {
|
|
4313
|
+
doc.invoiceCondition = event.value;
|
|
4314
|
+
}
|
|
4315
|
+
else {
|
|
4316
|
+
_this.amendedDocuments.push(document);
|
|
4317
|
+
}
|
|
4318
|
+
});
|
|
4319
|
+
}
|
|
4320
|
+
else {
|
|
4321
|
+
this.amendedDocuments.push(document);
|
|
4322
|
+
}
|
|
4323
|
+
};
|
|
4324
|
+
DocumentListComponent.prototype.save = function () {
|
|
4325
|
+
var _this = this;
|
|
4326
|
+
this.amendedDocuments.forEach(function (document) {
|
|
4327
|
+
_this.documentService.update(document.id, document).subscribe(function () {
|
|
4328
|
+
_this.utils.message("success", "yms.int.wms_saved_document_message_title", "saved_message_content");
|
|
4329
|
+
_this.disabled = false;
|
|
4330
|
+
});
|
|
4331
|
+
});
|
|
4332
|
+
this.amendedDocuments = [];
|
|
4333
|
+
};
|
|
4288
4334
|
DocumentListComponent.prototype.searchDocument = function (event) {
|
|
4289
4335
|
var _this = this;
|
|
4290
4336
|
var size = event.rows;
|
|
@@ -4315,10 +4361,12 @@
|
|
|
4315
4361
|
], DocumentListComponent.prototype, "wmsSystem", void 0);
|
|
4316
4362
|
DocumentListComponent = __decorate([
|
|
4317
4363
|
core.Component({
|
|
4318
|
-
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
|
|
4319
|
-
styles: [".table-col-width{width:250px}"]
|
|
4364
|
+
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>",
|
|
4365
|
+
styles: [".table-col-width{width:250px}.button-save{margin:5px 0}"]
|
|
4320
4366
|
}),
|
|
4321
|
-
__metadata("design:paramtypes", [DocumentService
|
|
4367
|
+
__metadata("design:paramtypes", [DocumentService,
|
|
4368
|
+
core$1.TranslateService,
|
|
4369
|
+
UtilsMessageService])
|
|
4322
4370
|
], DocumentListComponent);
|
|
4323
4371
|
return DocumentListComponent;
|
|
4324
4372
|
}(DocumentListDescritor));
|
|
@@ -4334,7 +4382,10 @@
|
|
|
4334
4382
|
common.CommonModule,
|
|
4335
4383
|
core$1.TranslateModule,
|
|
4336
4384
|
angularComponents.LoadingStateModule,
|
|
4337
|
-
table.TableModule
|
|
4385
|
+
table.TableModule,
|
|
4386
|
+
primeng.DropdownModule,
|
|
4387
|
+
angularComponents.ButtonModule,
|
|
4388
|
+
forms.FormsModule
|
|
4338
4389
|
],
|
|
4339
4390
|
declarations: [DocumentListComponent],
|
|
4340
4391
|
entryComponents: [DocumentListComponent],
|