@seniorsistemas/yms-integration 1.38.0 → 1.39.0-f91ecbab-02b2-4fa0-803c-5027c0257424
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 +92 -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 +64 -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 +68 -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 +88 -15
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +92 -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,43 @@
|
|
|
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
|
+
this.wmsService.getSystemIntegration()
|
|
3404
|
+
.subscribe(function (_a) {
|
|
3405
|
+
var system = _a.system;
|
|
3406
|
+
_this.wmsSystem = system;
|
|
3407
|
+
if (_this.isWmsSeniorConnect()) {
|
|
3408
|
+
_this.getYard();
|
|
3409
|
+
_this.getSchedule();
|
|
3410
|
+
}
|
|
3411
|
+
});
|
|
3412
|
+
};
|
|
3413
|
+
DocumentGridComponent.prototype.getYard = function () {
|
|
3414
|
+
var _this = this;
|
|
3415
|
+
this.documentService.getYard(this.agenda.planta.id)
|
|
3416
|
+
.pipe(operators.catchError(function (err) {
|
|
3417
|
+
return rxjs.throwError(err);
|
|
3418
|
+
}))
|
|
3419
|
+
.subscribe(function (content) {
|
|
3420
|
+
_this.yard = content;
|
|
3421
|
+
});
|
|
3422
|
+
};
|
|
3423
|
+
DocumentGridComponent.prototype.getSchedule = function () {
|
|
3424
|
+
var _this = this;
|
|
3425
|
+
if (this.agenda.externalTenant && this.agenda.externalTenant.cnpj) {
|
|
3426
|
+
this.schedule = this.agenda;
|
|
3427
|
+
return;
|
|
3428
|
+
}
|
|
3429
|
+
this.agendaService.get(this.agenda.id)
|
|
3430
|
+
.pipe(operators.catchError(function (err) {
|
|
3431
|
+
return rxjs.throwError(err);
|
|
3432
|
+
}))
|
|
3433
|
+
.subscribe(function (content) {
|
|
3434
|
+
_this.schedule = content;
|
|
3435
|
+
});
|
|
3398
3436
|
};
|
|
3399
3437
|
DocumentGridComponent.prototype.verifyClienteExterno = function () {
|
|
3400
3438
|
var _this = this;
|
|
@@ -3534,7 +3572,7 @@
|
|
|
3534
3572
|
accept: function () {
|
|
3535
3573
|
_this.removeDocumentIfIdUndfined();
|
|
3536
3574
|
if (_this.selection.length < 1) {
|
|
3537
|
-
return
|
|
3575
|
+
return null;
|
|
3538
3576
|
}
|
|
3539
3577
|
return rxjs.forkJoin(_this.selection.map(function (document) { return _this.documentService.delete(document.id); }))
|
|
3540
3578
|
.pipe(operators.takeUntil(_this.ngUnsubscribe))
|
|
@@ -3656,6 +3694,30 @@
|
|
|
3656
3694
|
DocumentGridComponent.prototype.sucessMessage = function () {
|
|
3657
3695
|
return this.utils.message("success", this.summary, "saved_message_content");
|
|
3658
3696
|
};
|
|
3697
|
+
DocumentGridComponent.prototype.validateDocument = function (document) {
|
|
3698
|
+
if (this.isWmsSeniorConnect()) {
|
|
3699
|
+
if (!this.yard.codigo) {
|
|
3700
|
+
this.buildMessage("yms.int.yard_code_not_found_warning_description");
|
|
3701
|
+
return false;
|
|
3702
|
+
}
|
|
3703
|
+
if (document.logistcUnitDocument !== this.yard.codigo) {
|
|
3704
|
+
this.buildMessage("yms.int.document_yard_mismatch_agenda_warning_description");
|
|
3705
|
+
return false;
|
|
3706
|
+
}
|
|
3707
|
+
if (!this.schedule.externalTenant) {
|
|
3708
|
+
this.buildMessage("yms.int.partner_not_informed_agenda_warning_description");
|
|
3709
|
+
return false;
|
|
3710
|
+
}
|
|
3711
|
+
if (document.partnerDocument !== this.schedule.externalTenant.cnpj) {
|
|
3712
|
+
this.buildMessage("yms.int.partner_differs_from_agenda_warning_description");
|
|
3713
|
+
return false;
|
|
3714
|
+
}
|
|
3715
|
+
}
|
|
3716
|
+
return true;
|
|
3717
|
+
};
|
|
3718
|
+
DocumentGridComponent.prototype.buildMessage = function (description) {
|
|
3719
|
+
this.utils.message("warn", "yms.int.documento_invalido_warning_header", description);
|
|
3720
|
+
};
|
|
3659
3721
|
__decorate([
|
|
3660
3722
|
core.Input(),
|
|
3661
3723
|
__metadata("design:type", Object)
|
|
@@ -3703,7 +3765,7 @@
|
|
|
3703
3765
|
DocumentGridComponent = __decorate([
|
|
3704
3766
|
core.Component({
|
|
3705
3767
|
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>",
|
|
3768
|
+
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
3769
|
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
3770
|
}),
|
|
3709
3771
|
__metadata("design:paramtypes", [core$1.TranslateService,
|
|
@@ -3711,7 +3773,8 @@
|
|
|
3711
3773
|
api.ConfirmationService,
|
|
3712
3774
|
IntegrationService,
|
|
3713
3775
|
AgendaService,
|
|
3714
|
-
UtilsMessageService
|
|
3776
|
+
UtilsMessageService,
|
|
3777
|
+
FormWmsService])
|
|
3715
3778
|
], DocumentGridComponent);
|
|
3716
3779
|
return DocumentGridComponent;
|
|
3717
3780
|
}());
|
|
@@ -3759,9 +3822,10 @@
|
|
|
3759
3822
|
}());
|
|
3760
3823
|
|
|
3761
3824
|
var RegisterDocumentComponent = /** @class */ (function () {
|
|
3762
|
-
function RegisterDocumentComponent(fb, translate) {
|
|
3825
|
+
function RegisterDocumentComponent(fb, translate, documentGridComponent) {
|
|
3763
3826
|
this.fb = fb;
|
|
3764
3827
|
this.translate = translate;
|
|
3828
|
+
this.documentGridComponent = documentGridComponent;
|
|
3765
3829
|
this.document = new core.EventEmitter();
|
|
3766
3830
|
this.visible = new core.EventEmitter();
|
|
3767
3831
|
this.visibleChange = new core.EventEmitter();
|
|
@@ -3826,6 +3890,9 @@
|
|
|
3826
3890
|
};
|
|
3827
3891
|
RegisterDocumentComponent.prototype.save = function () {
|
|
3828
3892
|
this.document.emit(Document.fromDto(this.formGroup.getRawValue()));
|
|
3893
|
+
if (!this.documentGridComponent.validateDocument(document)) {
|
|
3894
|
+
return;
|
|
3895
|
+
}
|
|
3829
3896
|
this.formGroup.reset();
|
|
3830
3897
|
};
|
|
3831
3898
|
RegisterDocumentComponent.prototype.isWmsWis = function () {
|
|
@@ -3882,7 +3949,8 @@
|
|
|
3882
3949
|
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
3950
|
}),
|
|
3884
3951
|
__metadata("design:paramtypes", [forms.FormBuilder,
|
|
3885
|
-
core$1.TranslateService
|
|
3952
|
+
core$1.TranslateService,
|
|
3953
|
+
DocumentGridComponent])
|
|
3886
3954
|
], RegisterDocumentComponent);
|
|
3887
3955
|
return RegisterDocumentComponent;
|
|
3888
3956
|
}());
|
|
@@ -3929,15 +3997,16 @@
|
|
|
3929
3997
|
}(EntityService));
|
|
3930
3998
|
|
|
3931
3999
|
var InsertKeyComponent = /** @class */ (function () {
|
|
3932
|
-
function InsertKeyComponent(formBuilder, documentService, utils, confirmationService, translate, externalTenantService) {
|
|
4000
|
+
function InsertKeyComponent(formBuilder, documentService, utils, confirmationService, translate, externalTenantService, documentGridComponent) {
|
|
3933
4001
|
this.formBuilder = formBuilder;
|
|
3934
4002
|
this.documentService = documentService;
|
|
3935
4003
|
this.utils = utils;
|
|
3936
4004
|
this.confirmationService = confirmationService;
|
|
3937
4005
|
this.translate = translate;
|
|
3938
4006
|
this.externalTenantService = externalTenantService;
|
|
3939
|
-
this.
|
|
4007
|
+
this.documentGridComponent = documentGridComponent;
|
|
3940
4008
|
this.visible = new core.EventEmitter();
|
|
4009
|
+
this.document = new core.EventEmitter();
|
|
3941
4010
|
this.visibleChange = new core.EventEmitter();
|
|
3942
4011
|
this.isLoading = false;
|
|
3943
4012
|
this.isPartnerloading = false;
|
|
@@ -3999,6 +4068,9 @@
|
|
|
3999
4068
|
return;
|
|
4000
4069
|
}
|
|
4001
4070
|
var document = content.contents[0];
|
|
4071
|
+
if (!_this.documentGridComponent.validateDocument(document)) {
|
|
4072
|
+
return;
|
|
4073
|
+
}
|
|
4002
4074
|
document.invoiceKey = _this.formGroup.get('key').value;
|
|
4003
4075
|
document.invoiceCondition = InvoiceCondition.AUTHORIZED;
|
|
4004
4076
|
_this.document.emit(document);
|
|
@@ -4088,18 +4160,22 @@
|
|
|
4088
4160
|
InsertKeyComponent.prototype.onDialogShow = function () {
|
|
4089
4161
|
this.formGroup.reset();
|
|
4090
4162
|
};
|
|
4091
|
-
__decorate([
|
|
4092
|
-
core.Output(),
|
|
4093
|
-
__metadata("design:type", core.EventEmitter)
|
|
4094
|
-
], InsertKeyComponent.prototype, "document", void 0);
|
|
4095
4163
|
__decorate([
|
|
4096
4164
|
core.Input(),
|
|
4097
|
-
__metadata("design:type",
|
|
4098
|
-
], InsertKeyComponent.prototype, "
|
|
4165
|
+
__metadata("design:type", Agenda)
|
|
4166
|
+
], InsertKeyComponent.prototype, "agenda", void 0);
|
|
4099
4167
|
__decorate([
|
|
4100
4168
|
core.Input(),
|
|
4101
4169
|
__metadata("design:type", String)
|
|
4102
4170
|
], InsertKeyComponent.prototype, "wmsSystem", void 0);
|
|
4171
|
+
__decorate([
|
|
4172
|
+
core.Input(),
|
|
4173
|
+
__metadata("design:type", core.EventEmitter)
|
|
4174
|
+
], InsertKeyComponent.prototype, "visible", void 0);
|
|
4175
|
+
__decorate([
|
|
4176
|
+
core.Output(),
|
|
4177
|
+
__metadata("design:type", core.EventEmitter)
|
|
4178
|
+
], InsertKeyComponent.prototype, "document", void 0);
|
|
4103
4179
|
__decorate([
|
|
4104
4180
|
core.Output(),
|
|
4105
4181
|
__metadata("design:type", Object)
|
|
@@ -4115,7 +4191,8 @@
|
|
|
4115
4191
|
UtilsMessageService,
|
|
4116
4192
|
api.ConfirmationService,
|
|
4117
4193
|
core$1.TranslateService,
|
|
4118
|
-
ExternalTenantService
|
|
4194
|
+
ExternalTenantService,
|
|
4195
|
+
DocumentGridComponent])
|
|
4119
4196
|
], InsertKeyComponent);
|
|
4120
4197
|
return InsertKeyComponent;
|
|
4121
4198
|
}());
|