@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
|
@@ -3257,6 +3257,9 @@ var DocumentService = /** @class */ (function (_super) {
|
|
|
3257
3257
|
DocumentService.prototype.getSystemIntegration = function () {
|
|
3258
3258
|
return this.http.get('yms_int/wms/queries/getSystemIntegration');
|
|
3259
3259
|
};
|
|
3260
|
+
DocumentService.prototype.getYard = function (yardId) {
|
|
3261
|
+
return this.http.get('yms/patio/entities/planta/' + yardId);
|
|
3262
|
+
};
|
|
3260
3263
|
DocumentService = __decorate([
|
|
3261
3264
|
Injectable(),
|
|
3262
3265
|
__metadata("design:paramtypes", [HttpClient, MessageService])
|
|
@@ -3309,13 +3312,14 @@ function getInvoiceConditions(translate) {
|
|
|
3309
3312
|
}
|
|
3310
3313
|
|
|
3311
3314
|
var DocumentGridComponent = /** @class */ (function () {
|
|
3312
|
-
function DocumentGridComponent(translate, documentService, confirmationService, integrationService, agendaService, utils) {
|
|
3315
|
+
function DocumentGridComponent(translate, documentService, confirmationService, integrationService, agendaService, utils, wmsService) {
|
|
3313
3316
|
this.translate = translate;
|
|
3314
3317
|
this.documentService = documentService;
|
|
3315
3318
|
this.confirmationService = confirmationService;
|
|
3316
3319
|
this.integrationService = integrationService;
|
|
3317
3320
|
this.agendaService = agendaService;
|
|
3318
3321
|
this.utils = utils;
|
|
3322
|
+
this.wmsService = wmsService;
|
|
3319
3323
|
this.viewDocument = new EventEmitter();
|
|
3320
3324
|
this.gridData = [];
|
|
3321
3325
|
this.enableButtonIsClienteExterno = true;
|
|
@@ -3333,9 +3337,45 @@ var DocumentGridComponent = /** @class */ (function () {
|
|
|
3333
3337
|
}
|
|
3334
3338
|
};
|
|
3335
3339
|
DocumentGridComponent.prototype.ngOnInit = function () {
|
|
3340
|
+
var _this = this;
|
|
3336
3341
|
this.verifyClienteExterno();
|
|
3337
3342
|
this.getProcessTypeByScheduling();
|
|
3338
3343
|
this.listDocuments(false);
|
|
3344
|
+
if (!this.wmsSystem) {
|
|
3345
|
+
this.wmsService.getSystemIntegration()
|
|
3346
|
+
.subscribe(function (_a) {
|
|
3347
|
+
var system = _a.system;
|
|
3348
|
+
_this.wmsSystem = system;
|
|
3349
|
+
if (_this.isWmsSeniorConnect()) {
|
|
3350
|
+
_this.getYard();
|
|
3351
|
+
_this.getSchedule();
|
|
3352
|
+
}
|
|
3353
|
+
});
|
|
3354
|
+
}
|
|
3355
|
+
};
|
|
3356
|
+
DocumentGridComponent.prototype.getYard = function () {
|
|
3357
|
+
var _this = this;
|
|
3358
|
+
this.documentService.getYard(this.agenda.planta.id)
|
|
3359
|
+
.pipe(catchError(function (err) {
|
|
3360
|
+
return throwError(err);
|
|
3361
|
+
}))
|
|
3362
|
+
.subscribe(function (content) {
|
|
3363
|
+
_this.yard = content;
|
|
3364
|
+
});
|
|
3365
|
+
};
|
|
3366
|
+
DocumentGridComponent.prototype.getSchedule = function () {
|
|
3367
|
+
var _this = this;
|
|
3368
|
+
if (this.agenda.externalTenant && this.agenda.externalTenant.cnpj) {
|
|
3369
|
+
this.schedule = this.agenda;
|
|
3370
|
+
return;
|
|
3371
|
+
}
|
|
3372
|
+
this.agendaService.get(this.agenda.id)
|
|
3373
|
+
.pipe(catchError(function (err) {
|
|
3374
|
+
return throwError(err);
|
|
3375
|
+
}))
|
|
3376
|
+
.subscribe(function (content) {
|
|
3377
|
+
_this.schedule = content;
|
|
3378
|
+
});
|
|
3339
3379
|
};
|
|
3340
3380
|
DocumentGridComponent.prototype.verifyClienteExterno = function () {
|
|
3341
3381
|
var _this = this;
|
|
@@ -3475,7 +3515,7 @@ var DocumentGridComponent = /** @class */ (function () {
|
|
|
3475
3515
|
accept: function () {
|
|
3476
3516
|
_this.removeDocumentIfIdUndfined();
|
|
3477
3517
|
if (_this.selection.length < 1) {
|
|
3478
|
-
return
|
|
3518
|
+
return null;
|
|
3479
3519
|
}
|
|
3480
3520
|
return forkJoin(_this.selection.map(function (document) { return _this.documentService.delete(document.id); }))
|
|
3481
3521
|
.pipe(takeUntil(_this.ngUnsubscribe))
|
|
@@ -3597,6 +3637,30 @@ var DocumentGridComponent = /** @class */ (function () {
|
|
|
3597
3637
|
DocumentGridComponent.prototype.sucessMessage = function () {
|
|
3598
3638
|
return this.utils.message("success", this.summary, "saved_message_content");
|
|
3599
3639
|
};
|
|
3640
|
+
DocumentGridComponent.prototype.validateDocument = function (document) {
|
|
3641
|
+
if (this.isWmsSeniorConnect()) {
|
|
3642
|
+
if (!this.yard.codigo) {
|
|
3643
|
+
this.buildMessage("yms.int.yard_code_not_found_warning_description");
|
|
3644
|
+
return false;
|
|
3645
|
+
}
|
|
3646
|
+
if (document.logistcUnitDocument !== this.yard.codigo) {
|
|
3647
|
+
this.buildMessage("yms.int.document_yard_mismatch_agenda_warning_description");
|
|
3648
|
+
return false;
|
|
3649
|
+
}
|
|
3650
|
+
if (!this.schedule.externalTenant) {
|
|
3651
|
+
this.buildMessage("yms.int.partner_not_informed_agenda_warning_description");
|
|
3652
|
+
return false;
|
|
3653
|
+
}
|
|
3654
|
+
if (document.partnerDocument !== this.schedule.externalTenant.cnpj) {
|
|
3655
|
+
this.buildMessage("yms.int.partner_differs_from_agenda_warning_description");
|
|
3656
|
+
return false;
|
|
3657
|
+
}
|
|
3658
|
+
}
|
|
3659
|
+
return true;
|
|
3660
|
+
};
|
|
3661
|
+
DocumentGridComponent.prototype.buildMessage = function (description) {
|
|
3662
|
+
this.utils.message("warn", "yms.int.documento_invalido_warning_header", description);
|
|
3663
|
+
};
|
|
3600
3664
|
__decorate([
|
|
3601
3665
|
Input(),
|
|
3602
3666
|
__metadata("design:type", Object)
|
|
@@ -3644,7 +3708,7 @@ var DocumentGridComponent = /** @class */ (function () {
|
|
|
3644
3708
|
DocumentGridComponent = __decorate([
|
|
3645
3709
|
Component({
|
|
3646
3710
|
selector: 'document-grid',
|
|
3647
|
-
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>",
|
|
3711
|
+
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>",
|
|
3648
3712
|
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}"]
|
|
3649
3713
|
}),
|
|
3650
3714
|
__metadata("design:paramtypes", [TranslateService,
|
|
@@ -3652,7 +3716,8 @@ var DocumentGridComponent = /** @class */ (function () {
|
|
|
3652
3716
|
ConfirmationService,
|
|
3653
3717
|
IntegrationService,
|
|
3654
3718
|
AgendaService,
|
|
3655
|
-
UtilsMessageService
|
|
3719
|
+
UtilsMessageService,
|
|
3720
|
+
FormWmsService])
|
|
3656
3721
|
], DocumentGridComponent);
|
|
3657
3722
|
return DocumentGridComponent;
|
|
3658
3723
|
}());
|
|
@@ -3700,9 +3765,10 @@ var Document = /** @class */ (function () {
|
|
|
3700
3765
|
}());
|
|
3701
3766
|
|
|
3702
3767
|
var RegisterDocumentComponent = /** @class */ (function () {
|
|
3703
|
-
function RegisterDocumentComponent(fb, translate) {
|
|
3768
|
+
function RegisterDocumentComponent(fb, translate, documentGridComponent) {
|
|
3704
3769
|
this.fb = fb;
|
|
3705
3770
|
this.translate = translate;
|
|
3771
|
+
this.documentGridComponent = documentGridComponent;
|
|
3706
3772
|
this.document = new EventEmitter();
|
|
3707
3773
|
this.visible = new EventEmitter();
|
|
3708
3774
|
this.visibleChange = new EventEmitter();
|
|
@@ -3767,6 +3833,9 @@ var RegisterDocumentComponent = /** @class */ (function () {
|
|
|
3767
3833
|
};
|
|
3768
3834
|
RegisterDocumentComponent.prototype.save = function () {
|
|
3769
3835
|
this.document.emit(Document.fromDto(this.formGroup.getRawValue()));
|
|
3836
|
+
if (!this.documentGridComponent.validateDocument(document)) {
|
|
3837
|
+
return;
|
|
3838
|
+
}
|
|
3770
3839
|
this.formGroup.reset();
|
|
3771
3840
|
};
|
|
3772
3841
|
RegisterDocumentComponent.prototype.isWmsWis = function () {
|
|
@@ -3823,7 +3892,8 @@ var RegisterDocumentComponent = /** @class */ (function () {
|
|
|
3823
3892
|
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>"
|
|
3824
3893
|
}),
|
|
3825
3894
|
__metadata("design:paramtypes", [FormBuilder,
|
|
3826
|
-
TranslateService
|
|
3895
|
+
TranslateService,
|
|
3896
|
+
DocumentGridComponent])
|
|
3827
3897
|
], RegisterDocumentComponent);
|
|
3828
3898
|
return RegisterDocumentComponent;
|
|
3829
3899
|
}());
|
|
@@ -3870,15 +3940,16 @@ var ExternalTenantService = /** @class */ (function (_super) {
|
|
|
3870
3940
|
}(EntityService));
|
|
3871
3941
|
|
|
3872
3942
|
var InsertKeyComponent = /** @class */ (function () {
|
|
3873
|
-
function InsertKeyComponent(formBuilder, documentService, utils, confirmationService, translate, externalTenantService) {
|
|
3943
|
+
function InsertKeyComponent(formBuilder, documentService, utils, confirmationService, translate, externalTenantService, documentGridComponent) {
|
|
3874
3944
|
this.formBuilder = formBuilder;
|
|
3875
3945
|
this.documentService = documentService;
|
|
3876
3946
|
this.utils = utils;
|
|
3877
3947
|
this.confirmationService = confirmationService;
|
|
3878
3948
|
this.translate = translate;
|
|
3879
3949
|
this.externalTenantService = externalTenantService;
|
|
3880
|
-
this.
|
|
3950
|
+
this.documentGridComponent = documentGridComponent;
|
|
3881
3951
|
this.visible = new EventEmitter();
|
|
3952
|
+
this.document = new EventEmitter();
|
|
3882
3953
|
this.visibleChange = new EventEmitter();
|
|
3883
3954
|
this.isLoading = false;
|
|
3884
3955
|
this.isPartnerloading = false;
|
|
@@ -3940,6 +4011,9 @@ var InsertKeyComponent = /** @class */ (function () {
|
|
|
3940
4011
|
return;
|
|
3941
4012
|
}
|
|
3942
4013
|
var document = content.contents[0];
|
|
4014
|
+
if (!_this.documentGridComponent.validateDocument(document)) {
|
|
4015
|
+
return;
|
|
4016
|
+
}
|
|
3943
4017
|
document.invoiceKey = _this.formGroup.get('key').value;
|
|
3944
4018
|
document.invoiceCondition = InvoiceCondition.AUTHORIZED;
|
|
3945
4019
|
_this.document.emit(document);
|
|
@@ -4029,18 +4103,22 @@ var InsertKeyComponent = /** @class */ (function () {
|
|
|
4029
4103
|
InsertKeyComponent.prototype.onDialogShow = function () {
|
|
4030
4104
|
this.formGroup.reset();
|
|
4031
4105
|
};
|
|
4032
|
-
__decorate([
|
|
4033
|
-
Output(),
|
|
4034
|
-
__metadata("design:type", EventEmitter)
|
|
4035
|
-
], InsertKeyComponent.prototype, "document", void 0);
|
|
4036
4106
|
__decorate([
|
|
4037
4107
|
Input(),
|
|
4038
|
-
__metadata("design:type",
|
|
4039
|
-
], InsertKeyComponent.prototype, "
|
|
4108
|
+
__metadata("design:type", Agenda)
|
|
4109
|
+
], InsertKeyComponent.prototype, "agenda", void 0);
|
|
4040
4110
|
__decorate([
|
|
4041
4111
|
Input(),
|
|
4042
4112
|
__metadata("design:type", String)
|
|
4043
4113
|
], InsertKeyComponent.prototype, "wmsSystem", void 0);
|
|
4114
|
+
__decorate([
|
|
4115
|
+
Input(),
|
|
4116
|
+
__metadata("design:type", EventEmitter)
|
|
4117
|
+
], InsertKeyComponent.prototype, "visible", void 0);
|
|
4118
|
+
__decorate([
|
|
4119
|
+
Output(),
|
|
4120
|
+
__metadata("design:type", EventEmitter)
|
|
4121
|
+
], InsertKeyComponent.prototype, "document", void 0);
|
|
4044
4122
|
__decorate([
|
|
4045
4123
|
Output(),
|
|
4046
4124
|
__metadata("design:type", Object)
|
|
@@ -4056,7 +4134,8 @@ var InsertKeyComponent = /** @class */ (function () {
|
|
|
4056
4134
|
UtilsMessageService,
|
|
4057
4135
|
ConfirmationService,
|
|
4058
4136
|
TranslateService,
|
|
4059
|
-
ExternalTenantService
|
|
4137
|
+
ExternalTenantService,
|
|
4138
|
+
DocumentGridComponent])
|
|
4060
4139
|
], InsertKeyComponent);
|
|
4061
4140
|
return InsertKeyComponent;
|
|
4062
4141
|
}());
|