@seniorsistemas/yms-integration 1.38.0 → 1.39.0-b18a63fd-cce0-4144-98f4-dfcd1d6f5b8d
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 +94 -15
- 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 +66 -7
- package/esm2015/src/wms/components/document-grid/insert-key/insert-key.component.js +21 -10
- package/esm2015/src/wms/components/document-grid/register-document/register-document.component.js +9 -3
- package/esm2015/src/wms/entities/document/document.service.js +4 -1
- package/esm5/src/wms/components/document-grid/document-grid.component.js +70 -7
- package/esm5/src/wms/components/document-grid/insert-key/insert-key.component.js +21 -10
- package/esm5/src/wms/components/document-grid/register-document/register-document.component.js +9 -3
- package/esm5/src/wms/entities/document/document.service.js +4 -1
- package/fesm2015/seniorsistemas-yms-integration.js +90 -15
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +94 -15
- 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 +9 -1
- package/src/wms/components/document-grid/insert-key/insert-key.component.d.ts +7 -3
- package/src/wms/components/document-grid/register-document/register-document.component.d.ts +3 -1
- package/src/wms/entities/document/document.service.d.ts +1 -0
|
@@ -3316,6 +3316,9 @@
|
|
|
3316
3316
|
DocumentService.prototype.getSystemIntegration = function () {
|
|
3317
3317
|
return this.http.get('yms_int/wms/queries/getSystemIntegration');
|
|
3318
3318
|
};
|
|
3319
|
+
DocumentService.prototype.getYard = function (yardId) {
|
|
3320
|
+
return this.http.get('yms/patio/entities/planta/' + yardId);
|
|
3321
|
+
};
|
|
3319
3322
|
DocumentService = __decorate([
|
|
3320
3323
|
core.Injectable(),
|
|
3321
3324
|
__metadata("design:paramtypes", [http.HttpClient, api.MessageService])
|
|
@@ -3368,13 +3371,14 @@
|
|
|
3368
3371
|
}
|
|
3369
3372
|
|
|
3370
3373
|
var DocumentGridComponent = /** @class */ (function () {
|
|
3371
|
-
function DocumentGridComponent(translate, documentService, confirmationService, integrationService, agendaService, utils) {
|
|
3374
|
+
function DocumentGridComponent(translate, documentService, confirmationService, integrationService, agendaService, utils, wmsService) {
|
|
3372
3375
|
this.translate = translate;
|
|
3373
3376
|
this.documentService = documentService;
|
|
3374
3377
|
this.confirmationService = confirmationService;
|
|
3375
3378
|
this.integrationService = integrationService;
|
|
3376
3379
|
this.agendaService = agendaService;
|
|
3377
3380
|
this.utils = utils;
|
|
3381
|
+
this.wmsService = wmsService;
|
|
3378
3382
|
this.viewDocument = new core.EventEmitter();
|
|
3379
3383
|
this.gridData = [];
|
|
3380
3384
|
this.enableButtonIsClienteExterno = true;
|
|
@@ -3392,9 +3396,45 @@
|
|
|
3392
3396
|
}
|
|
3393
3397
|
};
|
|
3394
3398
|
DocumentGridComponent.prototype.ngOnInit = function () {
|
|
3399
|
+
var _this = this;
|
|
3395
3400
|
this.verifyClienteExterno();
|
|
3396
3401
|
this.getProcessTypeByScheduling();
|
|
3397
3402
|
this.listDocuments(false);
|
|
3403
|
+
if (!this.wmsSystem) {
|
|
3404
|
+
this.wmsService.getSystemIntegration()
|
|
3405
|
+
.subscribe(function (_a) {
|
|
3406
|
+
var system = _a.system;
|
|
3407
|
+
_this.wmsSystem = system;
|
|
3408
|
+
if (_this.isWmsSeniorConnect()) {
|
|
3409
|
+
_this.getYard();
|
|
3410
|
+
_this.getSchedule();
|
|
3411
|
+
}
|
|
3412
|
+
});
|
|
3413
|
+
}
|
|
3414
|
+
};
|
|
3415
|
+
DocumentGridComponent.prototype.getYard = function () {
|
|
3416
|
+
var _this = this;
|
|
3417
|
+
this.documentService.getYard(this.agenda.planta.id)
|
|
3418
|
+
.pipe(operators.catchError(function (err) {
|
|
3419
|
+
return rxjs.throwError(err);
|
|
3420
|
+
}))
|
|
3421
|
+
.subscribe(function (content) {
|
|
3422
|
+
_this.yard = content;
|
|
3423
|
+
});
|
|
3424
|
+
};
|
|
3425
|
+
DocumentGridComponent.prototype.getSchedule = function () {
|
|
3426
|
+
var _this = this;
|
|
3427
|
+
if (this.agenda.externalTenant && this.agenda.externalTenant.cnpj) {
|
|
3428
|
+
this.schedule = this.agenda;
|
|
3429
|
+
return;
|
|
3430
|
+
}
|
|
3431
|
+
this.agendaService.get(this.agenda.id)
|
|
3432
|
+
.pipe(operators.catchError(function (err) {
|
|
3433
|
+
return rxjs.throwError(err);
|
|
3434
|
+
}))
|
|
3435
|
+
.subscribe(function (content) {
|
|
3436
|
+
_this.schedule = content;
|
|
3437
|
+
});
|
|
3398
3438
|
};
|
|
3399
3439
|
DocumentGridComponent.prototype.verifyClienteExterno = function () {
|
|
3400
3440
|
var _this = this;
|
|
@@ -3534,7 +3574,7 @@
|
|
|
3534
3574
|
accept: function () {
|
|
3535
3575
|
_this.removeDocumentIfIdUndfined();
|
|
3536
3576
|
if (_this.selection.length < 1) {
|
|
3537
|
-
return
|
|
3577
|
+
return null;
|
|
3538
3578
|
}
|
|
3539
3579
|
return rxjs.forkJoin(_this.selection.map(function (document) { return _this.documentService.delete(document.id); }))
|
|
3540
3580
|
.pipe(operators.takeUntil(_this.ngUnsubscribe))
|
|
@@ -3656,6 +3696,30 @@
|
|
|
3656
3696
|
DocumentGridComponent.prototype.sucessMessage = function () {
|
|
3657
3697
|
return this.utils.message("success", this.summary, "saved_message_content");
|
|
3658
3698
|
};
|
|
3699
|
+
DocumentGridComponent.prototype.validateDocument = function (document) {
|
|
3700
|
+
if (this.isWmsSeniorConnect()) {
|
|
3701
|
+
if (!this.yard.codigo) {
|
|
3702
|
+
this.buildMessage("yms.int.yard_code_not_found_warning_description");
|
|
3703
|
+
return false;
|
|
3704
|
+
}
|
|
3705
|
+
if (document.logistcUnitDocument !== this.yard.codigo) {
|
|
3706
|
+
this.buildMessage("yms.int.document_yard_mismatch_agenda_warning_description");
|
|
3707
|
+
return false;
|
|
3708
|
+
}
|
|
3709
|
+
if (!this.schedule.externalTenant) {
|
|
3710
|
+
this.buildMessage("yms.int.partner_not_informed_agenda_warning_description");
|
|
3711
|
+
return false;
|
|
3712
|
+
}
|
|
3713
|
+
if (document.partnerDocument !== this.schedule.externalTenant.cnpj) {
|
|
3714
|
+
this.buildMessage("yms.int.partner_differs_from_agenda_warning_description");
|
|
3715
|
+
return false;
|
|
3716
|
+
}
|
|
3717
|
+
}
|
|
3718
|
+
return true;
|
|
3719
|
+
};
|
|
3720
|
+
DocumentGridComponent.prototype.buildMessage = function (description) {
|
|
3721
|
+
this.utils.message("warn", "yms.int.documento_invalido_warning_header", description);
|
|
3722
|
+
};
|
|
3659
3723
|
__decorate([
|
|
3660
3724
|
core.Input(),
|
|
3661
3725
|
__metadata("design:type", Object)
|
|
@@ -3703,7 +3767,7 @@
|
|
|
3703
3767
|
DocumentGridComponent = __decorate([
|
|
3704
3768
|
core.Component({
|
|
3705
3769
|
selector: 'document-grid',
|
|
3706
|
-
template: "<div *ngIf=\"this.processType === 'RECEBIMENTO_WMS'; else processNotConfigured\">\n <p-panel>\n <p-header>\n <div class=\"buttons\">\n <div>\n <s-button\n label=\"{{'yms.int.wms_add_document' | translate}}\"\n priority=\"primary\"\n [model]=\"getActions()\"\n [auxiliary]=\"false\"\n [disabled]=\"!enableButtonIsClienteExterno\">\n </s-button>\n <s-button\n label=\"{{'yms.wms_view_button' | translate}}\"\n priority=\"secondary\"\n [auxiliary]=\"false\"\n [disabled]=\"!selection || selection.length !== 1\"\n (onClick)=\"view()\">\n </s-button>\n <s-button\n label=\"{{'yms.wms_delete_button' | translate}}\"\n priority=\"secondary\"\n [disabled]=\"!selection || !selection.length || !enableButtonIsClienteExterno\"\n (click)=\"onDelete()\">\n </s-button>\n </div>\n <s-button\n id=\"refresh-button\"\n priority=\"default\"\n iconClass=\"fa fa-refresh\"\n (onClick)=\"listDocuments(false)\"\n [disabled]=\"notSavedDocuments()\"\n >\n </s-button>\n </div>\n </p-header>\n <div class=\"ui-g\">\n <div class=\"ui-g-12\" *ngIf=\"gridData && gridData.length; else emptyList\">\n <p-table #documentTable [value]=\"gridData\"\n [columns]=\"gridColumns\" dataKey=\"key\" [scrollable]=\"true\" [resizableColumns]=\"true\"\n [paginator]=\"true\" [totalRecords]=\"documentTotalRecords\" rows=\"10\"\n [rowsPerPageOptions]=\"[10, 20, 50, 100]\" [(selection)]=\"selection\"\n [loading]=\"loading\">\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngFor=\"let col of columns\" [style.width]=\"col.width\"/>\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th id=\"checkbox\" class=\"table-checkbox\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <th id=\"col\" *ngFor=\"let col of columns\" pResizableColumn>\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.header }}</span>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-columns let-expanded=\"expanded\">\n <tr [pSelectableRow]=\"rowData\">\n <td class=\"table-checkbox\">\n <p-tableCheckbox [value]=\"rowData\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"isWmsSeniorConnect()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"key\"]}}</span>\n </td>\n <td *ngIf=\"isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"invoiceKey\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"invoiceNumber\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"invoiceSerialNumber\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSeniorConnect() || isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"partnerName\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSeniorConnect() || isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"partnerDocument\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSilt() || isWmsSeniorConnect()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"logistcUnitName\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSilt() || isWmsSeniorConnect()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"logistcUnitDocument\"]}}</span>\n </td>\n <td *ngIf=\"isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"ownerName\"]}}</span>\n </td>\n <td *ngIf=\"isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"ownerDocument\"]}}</span>\n </td>\n <td *ngIf=\"!isClienteExterno && isWmsWIS()\" (click)=\"selection = [rowData]\">\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 (onChange)=\"disabled = false\">\n </p-dropdown>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span [translate]=\"'yms.main.total_records'\" \n [translateParams]=\"{ value: documentTotalRecords }\">\n </span>\n </ng-template>\n </p-table> \n </div>\n </div>\n <register-document\n [wmsSystem]=\"wmsSystem\"\n [edit]=\"edit\"\n [viewDocument]=\"selection\"\n (document)=\"onChangeDocument($event)\"\n [(visible)]=\"visibleDocumentRegister\"\n [agenda]=\"agenda\"\n [isClienteExterno]=\"isClienteExterno\">\n </register-document> \n <insert-key\n [wmsSystem]=\"wmsSystem\" \n (document)=\"onChangeDocument($event)\"\n [(visible)]=\"visibleInvoiceKey\">\n </insert-key>\n </p-panel>\n</div>\n <div class=\"button-save\">\n <s-button \n priority=\"primary\" [label]=\"'save' | translate\"\n [disabled]=\"disabled || !this.gridData || !enableButtonIsClienteExterno\"\n (click)=\"save()\">\n </s-button>\n </div>\n\n<ng-template #emptyList>\n <div class=\"center\">\n <s-empty-state\n iconClass=\"fa fa-exclamation-triangle\" [title]=\"'detail_empty_state_title' | translate\"\n [description]=\"'detail_empty_state_description' | translate\">\n </s-empty-state>\n </div>\n</ng-template>\n\n<ng-template #processNotConfigured>\n <div class=\"center\">\n <s-empty-state\n iconClass=\"fa fa-exclamation-triangle\"\n [title]=\"'yms.int.wms_there_no_process_type_configured_for_this_type_scheduling' | translate\">\n </s-empty-state>\n </div>\n</ng-template>",
|
|
3770
|
+
template: "<div *ngIf=\"this.processType === 'RECEBIMENTO_WMS'; else processNotConfigured\">\n <p-panel>\n <p-header>\n <div class=\"buttons\">\n <div>\n <s-button\n label=\"{{'yms.int.wms_add_document' | translate}}\"\n priority=\"primary\"\n [model]=\"getActions()\"\n [auxiliary]=\"false\"\n [disabled]=\"!enableButtonIsClienteExterno\">\n </s-button>\n <s-button\n label=\"{{'yms.wms_view_button' | translate}}\"\n priority=\"secondary\"\n [auxiliary]=\"false\"\n [disabled]=\"!selection || selection.length !== 1\"\n (onClick)=\"view()\">\n </s-button>\n <s-button\n label=\"{{'yms.wms_delete_button' | translate}}\"\n priority=\"secondary\"\n [disabled]=\"!selection || !selection.length || !enableButtonIsClienteExterno\"\n (click)=\"onDelete()\">\n </s-button>\n </div>\n <s-button\n id=\"refresh-button\"\n priority=\"default\"\n iconClass=\"fa fa-refresh\"\n (onClick)=\"listDocuments(false)\"\n [disabled]=\"notSavedDocuments()\"\n >\n </s-button>\n </div>\n </p-header>\n <div class=\"ui-g\">\n <div class=\"ui-g-12\" *ngIf=\"gridData && gridData.length; else emptyList\">\n <p-table #documentTable [value]=\"gridData\"\n [columns]=\"gridColumns\" dataKey=\"key\" [scrollable]=\"true\" [resizableColumns]=\"true\"\n [paginator]=\"true\" [totalRecords]=\"documentTotalRecords\" rows=\"10\"\n [rowsPerPageOptions]=\"[10, 20, 50, 100]\" [(selection)]=\"selection\"\n [loading]=\"loading\">\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngFor=\"let col of columns\" [style.width]=\"col.width\"/>\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th id=\"checkbox\" class=\"table-checkbox\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <th id=\"col\" *ngFor=\"let col of columns\" pResizableColumn>\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.header }}</span>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-columns let-expanded=\"expanded\">\n <tr [pSelectableRow]=\"rowData\">\n <td class=\"table-checkbox\">\n <p-tableCheckbox [value]=\"rowData\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"isWmsSeniorConnect()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"key\"]}}</span>\n </td>\n <td *ngIf=\"isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"invoiceKey\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"invoiceNumber\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"invoiceSerialNumber\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSeniorConnect() || isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"partnerName\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSeniorConnect() || isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"partnerDocument\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSilt() || isWmsSeniorConnect()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"logistcUnitName\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSilt() || isWmsSeniorConnect()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"logistcUnitDocument\"]}}</span>\n </td>\n <td *ngIf=\"isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"ownerName\"]}}</span>\n </td>\n <td *ngIf=\"isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"ownerDocument\"]}}</span>\n </td>\n <td *ngIf=\"!isClienteExterno && isWmsWIS()\" (click)=\"selection = [rowData]\">\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 (onChange)=\"disabled = false\">\n </p-dropdown>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span [translate]=\"'yms.main.total_records'\" \n [translateParams]=\"{ value: documentTotalRecords }\">\n </span>\n </ng-template>\n </p-table> \n </div>\n </div>\n <register-document\n [wmsSystem]=\"wmsSystem\"\n [edit]=\"edit\"\n [viewDocument]=\"selection\"\n (document)=\"onChangeDocument($event)\"\n [(visible)]=\"visibleDocumentRegister\"\n [agenda]=\"agenda\"\n [isClienteExterno]=\"isClienteExterno\">\n </register-document> \n <insert-key\n [wmsSystem]=\"wmsSystem\" \n (document)=\"onChangeDocument($event)\"\n [agenda]=\"agenda\"\n [(visible)]=\"visibleInvoiceKey\">\n </insert-key>\n </p-panel>\n</div>\n <div class=\"button-save\">\n <s-button \n priority=\"primary\" [label]=\"'save' | translate\"\n [disabled]=\"disabled || !this.gridData || !enableButtonIsClienteExterno\"\n (click)=\"save()\">\n </s-button>\n </div>\n\n<ng-template #emptyList>\n <div class=\"center\">\n <s-empty-state\n iconClass=\"fa fa-exclamation-triangle\" [title]=\"'detail_empty_state_title' | translate\"\n [description]=\"'detail_empty_state_description' | translate\">\n </s-empty-state>\n </div>\n</ng-template>\n\n<ng-template #processNotConfigured>\n <div class=\"center\">\n <s-empty-state\n iconClass=\"fa fa-exclamation-triangle\"\n [title]=\"'yms.int.wms_there_no_process_type_configured_for_this_type_scheduling' | translate\">\n </s-empty-state>\n </div>\n</ng-template>",
|
|
3707
3771
|
styles: [".buttons{display:flex;justify-content:space-between}.center{flex-direction:column;text-align:center}.ui-g{display:block}.button-save{margin:5px 0}#refresh-button{color:#fff}.table-checkbox{width:50px}.invoice-condition .p-dropdown{position:relative;z-index:1000}"]
|
|
3708
3772
|
}),
|
|
3709
3773
|
__metadata("design:paramtypes", [core$1.TranslateService,
|
|
@@ -3711,7 +3775,8 @@
|
|
|
3711
3775
|
api.ConfirmationService,
|
|
3712
3776
|
IntegrationService,
|
|
3713
3777
|
AgendaService,
|
|
3714
|
-
UtilsMessageService
|
|
3778
|
+
UtilsMessageService,
|
|
3779
|
+
FormWmsService])
|
|
3715
3780
|
], DocumentGridComponent);
|
|
3716
3781
|
return DocumentGridComponent;
|
|
3717
3782
|
}());
|
|
@@ -3759,9 +3824,10 @@
|
|
|
3759
3824
|
}());
|
|
3760
3825
|
|
|
3761
3826
|
var RegisterDocumentComponent = /** @class */ (function () {
|
|
3762
|
-
function RegisterDocumentComponent(fb, translate) {
|
|
3827
|
+
function RegisterDocumentComponent(fb, translate, documentGridComponent) {
|
|
3763
3828
|
this.fb = fb;
|
|
3764
3829
|
this.translate = translate;
|
|
3830
|
+
this.documentGridComponent = documentGridComponent;
|
|
3765
3831
|
this.document = new core.EventEmitter();
|
|
3766
3832
|
this.visible = new core.EventEmitter();
|
|
3767
3833
|
this.visibleChange = new core.EventEmitter();
|
|
@@ -3826,6 +3892,9 @@
|
|
|
3826
3892
|
};
|
|
3827
3893
|
RegisterDocumentComponent.prototype.save = function () {
|
|
3828
3894
|
this.document.emit(Document.fromDto(this.formGroup.getRawValue()));
|
|
3895
|
+
if (!this.documentGridComponent.validateDocument(document)) {
|
|
3896
|
+
return;
|
|
3897
|
+
}
|
|
3829
3898
|
this.formGroup.reset();
|
|
3830
3899
|
};
|
|
3831
3900
|
RegisterDocumentComponent.prototype.isWmsWis = function () {
|
|
@@ -3882,7 +3951,8 @@
|
|
|
3882
3951
|
template: "<s-sidebar\n [visible]=\"visible\"\n header=\"{{ 'yms.int.wms_register_document_add_document' | translate }} {{ wmsSystem }}\"\n (visibleChange)=\"close()\"\n (onclose)=\"close()\">\n <form [formGroup]=\"formGroup\">\n <div class=\"ui-g ui-fluid\">\n <div class=\"ui-g-6\" *ngIf=\"isWmsSeniorConnect()\">\n <label for=\"key\">{{'yms.int.wms_purchaseOrder' | translate}}</label>\n <input id=\"key\" pInputText type=\"text\" formControlName=\"key\">\n </div>\n <div class=\"ui-g-6\" *ngIf=\"!isWmsSeniorConnect() && !isWmsWis()\">\n <label for=\"invoiceKey\">{{'yms.int.wms_register_document_invoice_key' | translate}}</label>\n <input id=\"invoiceKey\" pInputText type=\"text\" formControlName=\"invoiceKey\">\n </div>\n <div class=\"ui-g-6\" *ngIf=\"!isWmsSeniorConnect()\">\n <label for=\"invoiceNumber\">{{'yms.int.wms_register_document_invoice_number' | translate}}</label>\n <input id=\"invoiceNumber\" pInputText type=\"text\" formControlName=\"invoiceNumber\">\n </div>\n <div class=\"ui-g-6\" *ngIf=\"!isWmsSeniorConnect()\">\n <label for=\"invoiceSerialNumber\">\n {{'yms.int.wms_register_document_invoice_serial_number' | translate}}\n </label>\n <input id=\"invoiceSerialNumber\" pInputText type=\"text\" formControlName=\"invoiceSerialNumber\">\n </div>\n <div class=\"ui-g-8\">\n <label for=\"logistcUnitName\">{{'yms.int.wms_register_document_logistc_unit_name' | translate}}</label>\n <input id=\"logistcUnitName\" pInputText type=\"text\" formControlName=\"logistcUnitName\">\n </div>\n <div class=\"ui-g-4\">\n <label for=\"logistcUnitDocument\">\n {{'yms.int.wms_register_document_logistc_unit_document' | translate}}\n </label>\n <input id=\"logistcUnitDocument\" pInputText type=\"text\" formControlName=\"logistcUnitDocument\">\n </div>\n <div class=\"ui-g-8\" *ngIf=\"!isWmsSeniorConnect() && !isWmsWis()\">\n <label for=\"documentOwnerName\">{{'yms.int.wms_register_document_owner_name' | translate}}</label>\n <input id=\"documentOwnerName\" pInputText type=\"text\" formControlName=\"ownerName\">\n </div>\n <div class=\"ui-g-4\" *ngIf=\"!isWmsSeniorConnect() && !isWmsWis()\">\n <label for=\"ownerDocument\">{{'yms.int.wms_register_document_owner_document' | translate}}</label>\n <input id=\"ownerDocument\" pInputText type=\"text\" formControlName=\"ownerDocument\">\n </div>\n <div class=\"ui-g-8\">\n <label for=\"partnerName\">{{'yms.int.wms_register_document_partner_name' | translate}}</label>\n <input id=\"partnerName\" pInputText type=\"text\" formControlName=\"partnerName\">\n </div>\n <div class=\"ui-g-4\">\n <label for=\"partnerDocument\">{{'yms.int.wms_register_document_partner_document' | translate}}</label>\n <input id=\"partnerDocument\" pInputText type=\"text\" formControlName=\"partnerDocument\">\n </div>\n <div class=\"ui-g-12\">\n <label for=\"notes\" id=\"notes\">{{'yms.int.wms_register_document_notes' | translate}}</label>\n <textarea id=\"notes\" rows=\"4\" pInputTextarea autoResize=\"autoResize\" formControlName=\"notes\"></textarea>\n </div>\n <div class=\"ui-g-4\" *ngIf=\"isWmsSenior() || isWmsWis()\">\n <label for=\"code\">\n {{'yms.int.wms_register_document_order_receiving_code' | translate}}\n </label>\n <input id=\"code\" pInputText type=\"text\" formControlName=\"code\">\n </div>\n <div class=\"ui-g-4\" *ngIf=\"!isClienteExterno && isWmsWis()\">\n <label for=\"invoiceCondition\" id=\"invoiceCondition\">\n {{'yms.int.wms_grid_document_invoice_condition' | translate}}\n </label>\n <p-dropdown\n inputId=\"invoiceCondition\"\n name=\"invoiceCondition\"\n [autoWidth]=\"false\"\n [options]=\"invoiceCondition\"\n formControlName=\"invoiceCondition\"\n ></p-dropdown>\n </div>\n </div>\n </form>\n <div class=\"space-between\">\n <button\n pButton label=\"{{'save' | translate}}\"\n (click)=\"save()\"\n [attr.data-hidden]=\"hideSaveButton\"\n [disabled]=\"!isSaveFormValid\">\n </button>\n <button\n type=\"button\" class=\"ui-button-link\" pButton label=\"{{'cancel' | translate}}\" (click)=\"close()\">\n </button>\n </div>\n</s-sidebar>"
|
|
3883
3952
|
}),
|
|
3884
3953
|
__metadata("design:paramtypes", [forms.FormBuilder,
|
|
3885
|
-
core$1.TranslateService
|
|
3954
|
+
core$1.TranslateService,
|
|
3955
|
+
DocumentGridComponent])
|
|
3886
3956
|
], RegisterDocumentComponent);
|
|
3887
3957
|
return RegisterDocumentComponent;
|
|
3888
3958
|
}());
|
|
@@ -3929,15 +3999,16 @@
|
|
|
3929
3999
|
}(EntityService));
|
|
3930
4000
|
|
|
3931
4001
|
var InsertKeyComponent = /** @class */ (function () {
|
|
3932
|
-
function InsertKeyComponent(formBuilder, documentService, utils, confirmationService, translate, externalTenantService) {
|
|
4002
|
+
function InsertKeyComponent(formBuilder, documentService, utils, confirmationService, translate, externalTenantService, documentGridComponent) {
|
|
3933
4003
|
this.formBuilder = formBuilder;
|
|
3934
4004
|
this.documentService = documentService;
|
|
3935
4005
|
this.utils = utils;
|
|
3936
4006
|
this.confirmationService = confirmationService;
|
|
3937
4007
|
this.translate = translate;
|
|
3938
4008
|
this.externalTenantService = externalTenantService;
|
|
3939
|
-
this.
|
|
4009
|
+
this.documentGridComponent = documentGridComponent;
|
|
3940
4010
|
this.visible = new core.EventEmitter();
|
|
4011
|
+
this.document = new core.EventEmitter();
|
|
3941
4012
|
this.visibleChange = new core.EventEmitter();
|
|
3942
4013
|
this.isLoading = false;
|
|
3943
4014
|
this.isPartnerloading = false;
|
|
@@ -3999,6 +4070,9 @@
|
|
|
3999
4070
|
return;
|
|
4000
4071
|
}
|
|
4001
4072
|
var document = content.contents[0];
|
|
4073
|
+
if (!_this.documentGridComponent.validateDocument(document)) {
|
|
4074
|
+
return;
|
|
4075
|
+
}
|
|
4002
4076
|
document.invoiceKey = _this.formGroup.get('key').value;
|
|
4003
4077
|
document.invoiceCondition = InvoiceCondition.AUTHORIZED;
|
|
4004
4078
|
_this.document.emit(document);
|
|
@@ -4088,18 +4162,22 @@
|
|
|
4088
4162
|
InsertKeyComponent.prototype.onDialogShow = function () {
|
|
4089
4163
|
this.formGroup.reset();
|
|
4090
4164
|
};
|
|
4091
|
-
__decorate([
|
|
4092
|
-
core.Output(),
|
|
4093
|
-
__metadata("design:type", core.EventEmitter)
|
|
4094
|
-
], InsertKeyComponent.prototype, "document", void 0);
|
|
4095
4165
|
__decorate([
|
|
4096
4166
|
core.Input(),
|
|
4097
|
-
__metadata("design:type",
|
|
4098
|
-
], InsertKeyComponent.prototype, "
|
|
4167
|
+
__metadata("design:type", Agenda)
|
|
4168
|
+
], InsertKeyComponent.prototype, "agenda", void 0);
|
|
4099
4169
|
__decorate([
|
|
4100
4170
|
core.Input(),
|
|
4101
4171
|
__metadata("design:type", String)
|
|
4102
4172
|
], InsertKeyComponent.prototype, "wmsSystem", void 0);
|
|
4173
|
+
__decorate([
|
|
4174
|
+
core.Input(),
|
|
4175
|
+
__metadata("design:type", core.EventEmitter)
|
|
4176
|
+
], InsertKeyComponent.prototype, "visible", void 0);
|
|
4177
|
+
__decorate([
|
|
4178
|
+
core.Output(),
|
|
4179
|
+
__metadata("design:type", core.EventEmitter)
|
|
4180
|
+
], InsertKeyComponent.prototype, "document", void 0);
|
|
4103
4181
|
__decorate([
|
|
4104
4182
|
core.Output(),
|
|
4105
4183
|
__metadata("design:type", Object)
|
|
@@ -4115,7 +4193,8 @@
|
|
|
4115
4193
|
UtilsMessageService,
|
|
4116
4194
|
api.ConfirmationService,
|
|
4117
4195
|
core$1.TranslateService,
|
|
4118
|
-
ExternalTenantService
|
|
4196
|
+
ExternalTenantService,
|
|
4197
|
+
DocumentGridComponent])
|
|
4119
4198
|
], InsertKeyComponent);
|
|
4120
4199
|
return InsertKeyComponent;
|
|
4121
4200
|
}());
|