@seniorsistemas/yms-integration 1.31.0 → 1.31.1
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 +126 -105
- 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/seniorsistemas-yms-integration.js +44 -43
- package/esm2015/src/utils/utils-message.js +35 -0
- package/esm2015/src/wms/components/document-grid/document-grid.component.js +35 -23
- package/esm2015/src/wms/components/document-grid/insert-key/insert-key.component.js +8 -24
- package/esm2015/src/wms/components/document-grid/register-document/register-document.component.js +17 -23
- package/esm5/seniorsistemas-yms-integration.js +44 -43
- package/esm5/src/utils/utils-message.js +36 -0
- package/esm5/src/wms/components/document-grid/document-grid.component.js +35 -23
- package/esm5/src/wms/components/document-grid/insert-key/insert-key.component.js +8 -24
- package/esm5/src/wms/components/document-grid/register-document/register-document.component.js +18 -23
- package/fesm2015/seniorsistemas-yms-integration.js +81 -63
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +83 -63
- package/fesm5/seniorsistemas-yms-integration.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-yms-integration.d.ts +43 -42
- package/seniorsistemas-yms-integration.metadata.json +1 -1
- package/src/utils/utils-message.d.ts +9 -0
- package/src/wms/components/document-grid/document-grid.component.d.ts +6 -4
- package/src/wms/components/document-grid/insert-key/insert-key.component.d.ts +3 -6
- package/src/wms/components/document-grid/register-document/register-document.component.d.ts +5 -5
|
@@ -3152,6 +3152,34 @@
|
|
|
3152
3152
|
return FormWmsComponent;
|
|
3153
3153
|
}(FormWmsDescritor));
|
|
3154
3154
|
|
|
3155
|
+
var UtilsMessageService = /** @class */ (function () {
|
|
3156
|
+
function UtilsMessageService(messageService, translate) {
|
|
3157
|
+
this.messageService = messageService;
|
|
3158
|
+
this.translate = translate;
|
|
3159
|
+
}
|
|
3160
|
+
UtilsMessageService.prototype.message = function (severity, summary, detail) {
|
|
3161
|
+
summary = this.translate.instant(summary);
|
|
3162
|
+
detail = this.translate.instant(detail);
|
|
3163
|
+
this.translateMessage(severity, summary, detail);
|
|
3164
|
+
};
|
|
3165
|
+
UtilsMessageService.prototype.translateMessage = function (severity, summary, detail) {
|
|
3166
|
+
this.messageService.add({
|
|
3167
|
+
severity: severity,
|
|
3168
|
+
summary: summary,
|
|
3169
|
+
detail: detail
|
|
3170
|
+
});
|
|
3171
|
+
};
|
|
3172
|
+
UtilsMessageService.ngInjectableDef = core.defineInjectable({ factory: function UtilsMessageService_Factory() { return new UtilsMessageService(core.inject(messageservice.MessageService), core.inject(core$1.TranslateService)); }, token: UtilsMessageService, providedIn: "root" });
|
|
3173
|
+
UtilsMessageService = __decorate([
|
|
3174
|
+
core.Injectable({
|
|
3175
|
+
providedIn: 'root'
|
|
3176
|
+
}),
|
|
3177
|
+
__metadata("design:paramtypes", [api.MessageService,
|
|
3178
|
+
core$1.TranslateService])
|
|
3179
|
+
], UtilsMessageService);
|
|
3180
|
+
return UtilsMessageService;
|
|
3181
|
+
}());
|
|
3182
|
+
|
|
3155
3183
|
var EntityService$1 = /** @class */ (function () {
|
|
3156
3184
|
function EntityService(http, messageService, entityUrl, actionsUrl) {
|
|
3157
3185
|
this.http = http;
|
|
@@ -3320,13 +3348,13 @@
|
|
|
3320
3348
|
})(ProcessType || (ProcessType = {}));
|
|
3321
3349
|
|
|
3322
3350
|
var DocumentGridComponent = /** @class */ (function () {
|
|
3323
|
-
function DocumentGridComponent(translate, documentService,
|
|
3351
|
+
function DocumentGridComponent(translate, documentService, confirmationService, integrationService, agendaService, utils) {
|
|
3324
3352
|
this.translate = translate;
|
|
3325
3353
|
this.documentService = documentService;
|
|
3326
|
-
this.messageService = messageService;
|
|
3327
3354
|
this.confirmationService = confirmationService;
|
|
3328
3355
|
this.integrationService = integrationService;
|
|
3329
3356
|
this.agendaService = agendaService;
|
|
3357
|
+
this.utils = utils;
|
|
3330
3358
|
this.viewDocument = new core.EventEmitter();
|
|
3331
3359
|
this.gridData = [];
|
|
3332
3360
|
this.enableButtonIsClienteExterno = true;
|
|
@@ -3355,17 +3383,38 @@
|
|
|
3355
3383
|
.subscribe(function (result) { return _this.processType = result.processType; });
|
|
3356
3384
|
};
|
|
3357
3385
|
DocumentGridComponent.prototype.onChangeDocument = function (document) {
|
|
3386
|
+
if (!this.hasFilledValues(document)) {
|
|
3387
|
+
this.utils.message("error", "yms.int.wms_save_error_register_document_message_title", "yms.int.wms_save_error_register_document_message_description");
|
|
3388
|
+
return;
|
|
3389
|
+
}
|
|
3390
|
+
this.assignKeys(document);
|
|
3358
3391
|
var duplicateDocument = this.gridData.find(function (gridData) { return gridData.key === document.key; });
|
|
3359
3392
|
if (duplicateDocument) {
|
|
3360
|
-
this.message("error", "yms.int.wms_error_register_document_message_title", "yms.int.wms_error_register_document_message_description");
|
|
3361
|
-
this.selection[0] = document;
|
|
3362
|
-
this.visibleDocumentRegister = true;
|
|
3393
|
+
this.utils.message("error", "yms.int.wms_error_register_document_message_title", "yms.int.wms_error_register_document_message_description");
|
|
3363
3394
|
return;
|
|
3364
3395
|
}
|
|
3365
3396
|
this.gridData.push(document);
|
|
3366
3397
|
this.disabled = false;
|
|
3367
|
-
this.message("success", "yms.int.wms_saved_document_message_title", "yms.int.wms_success_message_description");
|
|
3398
|
+
this.utils.message("success", "yms.int.wms_saved_document_message_title", "yms.int.wms_success_message_description");
|
|
3368
3399
|
this.visibleDocumentRegister = false;
|
|
3400
|
+
this.visibleInvoiceKey = false;
|
|
3401
|
+
};
|
|
3402
|
+
DocumentGridComponent.prototype.assignKeys = function (document) {
|
|
3403
|
+
if (document.id === undefined) {
|
|
3404
|
+
if (this.agenda.id !== undefined) {
|
|
3405
|
+
document.schedulingId = this.agenda.id;
|
|
3406
|
+
}
|
|
3407
|
+
if (document.key === undefined || document.key === null) {
|
|
3408
|
+
document.key = document.invoiceKey;
|
|
3409
|
+
if (this.isWmsWIS()) {
|
|
3410
|
+
document.key = document.invoiceNumber + ":" + document.invoiceSerialNumber + ":" + document.partnerDocument;
|
|
3411
|
+
}
|
|
3412
|
+
}
|
|
3413
|
+
}
|
|
3414
|
+
};
|
|
3415
|
+
DocumentGridComponent.prototype.hasFilledValues = function (document) {
|
|
3416
|
+
var formValues = Object.values(document);
|
|
3417
|
+
return formValues.some(function (value) { return value !== null && value !== ''; });
|
|
3369
3418
|
};
|
|
3370
3419
|
DocumentGridComponent.prototype.cantEditStatus = function () {
|
|
3371
3420
|
var cantEditStatus = [
|
|
@@ -3426,7 +3475,7 @@
|
|
|
3426
3475
|
}
|
|
3427
3476
|
data.key = _this.updateKeyByWms(data);
|
|
3428
3477
|
_this.documentService.insert(data).subscribe(function () {
|
|
3429
|
-
_this.message("success", "yms.int.wms_saved_document_message_title", "saved_message_content");
|
|
3478
|
+
_this.utils.message("success", "yms.int.wms_saved_document_message_title", "saved_message_content");
|
|
3430
3479
|
});
|
|
3431
3480
|
_this.disabled = true;
|
|
3432
3481
|
_this.listDocuments(false);
|
|
@@ -3456,11 +3505,7 @@
|
|
|
3456
3505
|
return rxjs.forkJoin(_this.selection.map(function (document) { return _this.documentService.delete(document.id); }))
|
|
3457
3506
|
.pipe(operators.takeUntil(_this.ngUnsubscribe))
|
|
3458
3507
|
.subscribe(function () {
|
|
3459
|
-
_this.
|
|
3460
|
-
severity: "success",
|
|
3461
|
-
summary: _this.translate.instant("deleted_message_title"),
|
|
3462
|
-
detail: _this.translate.instant("deleted_message_content"),
|
|
3463
|
-
});
|
|
3508
|
+
_this.utils.message("success", "deleted_message_title", "deleted_message_content");
|
|
3464
3509
|
_this.listDocuments(true);
|
|
3465
3510
|
});
|
|
3466
3511
|
}
|
|
@@ -3494,6 +3539,7 @@
|
|
|
3494
3539
|
var hasElementWithoutId = _this.gridData.some(function (item) { return !item.id; });
|
|
3495
3540
|
_this.disabled = !hasElementWithoutId;
|
|
3496
3541
|
_this.loading = false;
|
|
3542
|
+
_this.selection = [];
|
|
3497
3543
|
});
|
|
3498
3544
|
};
|
|
3499
3545
|
DocumentGridComponent.prototype.getGridColumns = function () {
|
|
@@ -3533,13 +3579,6 @@
|
|
|
3533
3579
|
DocumentGridComponent.prototype.isWmsWIS = function () {
|
|
3534
3580
|
return this.wmsSystem === WmsSystem.WIS;
|
|
3535
3581
|
};
|
|
3536
|
-
DocumentGridComponent.prototype.message = function (severity, summary, detail) {
|
|
3537
|
-
this.messageService.add({
|
|
3538
|
-
severity: severity,
|
|
3539
|
-
summary: this.translate.instant(summary),
|
|
3540
|
-
detail: this.translate.instant(detail),
|
|
3541
|
-
});
|
|
3542
|
-
};
|
|
3543
3582
|
__decorate([
|
|
3544
3583
|
core.Input(),
|
|
3545
3584
|
__metadata("design:type", Object)
|
|
@@ -3592,10 +3631,10 @@
|
|
|
3592
3631
|
}),
|
|
3593
3632
|
__metadata("design:paramtypes", [core$1.TranslateService,
|
|
3594
3633
|
DocumentService,
|
|
3595
|
-
api.MessageService,
|
|
3596
3634
|
api.ConfirmationService,
|
|
3597
3635
|
IntegrationService,
|
|
3598
|
-
AgendaService
|
|
3636
|
+
AgendaService,
|
|
3637
|
+
UtilsMessageService])
|
|
3599
3638
|
], DocumentGridComponent);
|
|
3600
3639
|
return DocumentGridComponent;
|
|
3601
3640
|
}());
|
|
@@ -3642,16 +3681,17 @@
|
|
|
3642
3681
|
}());
|
|
3643
3682
|
|
|
3644
3683
|
var RegisterDocumentComponent = /** @class */ (function () {
|
|
3645
|
-
function RegisterDocumentComponent(fb,
|
|
3684
|
+
function RegisterDocumentComponent(fb, utils) {
|
|
3646
3685
|
this.fb = fb;
|
|
3647
|
-
this.
|
|
3648
|
-
this.translateService = translateService;
|
|
3686
|
+
this.utils = utils;
|
|
3649
3687
|
this.document = new core.EventEmitter();
|
|
3650
3688
|
this.visible = new core.EventEmitter();
|
|
3651
3689
|
this.visibleChange = new core.EventEmitter();
|
|
3690
|
+
this.isSaveFormValid = false;
|
|
3652
3691
|
}
|
|
3653
3692
|
RegisterDocumentComponent.prototype.ngOnInit = function () {
|
|
3654
3693
|
this.getFormGroup();
|
|
3694
|
+
this.watchFormChanges();
|
|
3655
3695
|
};
|
|
3656
3696
|
RegisterDocumentComponent.prototype.ngOnChanges = function () {
|
|
3657
3697
|
this.visibilityConfig();
|
|
@@ -3669,6 +3709,7 @@
|
|
|
3669
3709
|
}
|
|
3670
3710
|
};
|
|
3671
3711
|
RegisterDocumentComponent.prototype.close = function () {
|
|
3712
|
+
this.formGroup.reset();
|
|
3672
3713
|
this.visibleChange.emit(false);
|
|
3673
3714
|
};
|
|
3674
3715
|
RegisterDocumentComponent.prototype.setValuesFormGroup = function (document) {
|
|
@@ -3703,20 +3744,8 @@
|
|
|
3703
3744
|
});
|
|
3704
3745
|
};
|
|
3705
3746
|
RegisterDocumentComponent.prototype.save = function () {
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
if (this.agenda.id !== undefined) {
|
|
3709
|
-
value.schedulingId = this.agenda.id;
|
|
3710
|
-
}
|
|
3711
|
-
if (value.key === undefined || value.key === null) {
|
|
3712
|
-
value.key = value.invoiceKey;
|
|
3713
|
-
if (this.isWmsWis()) {
|
|
3714
|
-
value.key = value.invoiceNumber + ":" + value.invoiceSerialNumber + ":" + value.partnerDocument;
|
|
3715
|
-
}
|
|
3716
|
-
}
|
|
3717
|
-
this.formGroup.reset();
|
|
3718
|
-
this.document.emit(Document.fromDto(value));
|
|
3719
|
-
}
|
|
3747
|
+
this.document.emit(Document.fromDto(this.formGroup.getRawValue()));
|
|
3748
|
+
this.formGroup.reset();
|
|
3720
3749
|
};
|
|
3721
3750
|
RegisterDocumentComponent.prototype.isWmsWis = function () {
|
|
3722
3751
|
return this.wmsSystem === WmsSystem.WIS;
|
|
@@ -3724,6 +3753,13 @@
|
|
|
3724
3753
|
RegisterDocumentComponent.prototype.isWmsSeniorConnect = function () {
|
|
3725
3754
|
return this.wmsSystem === WmsSystem.SENIOR_CONNECT;
|
|
3726
3755
|
};
|
|
3756
|
+
RegisterDocumentComponent.prototype.watchFormChanges = function () {
|
|
3757
|
+
var _this = this;
|
|
3758
|
+
this.formGroup.valueChanges.subscribe(function () {
|
|
3759
|
+
var formValues = Object.values(_this.formGroup.value);
|
|
3760
|
+
_this.isSaveFormValid = formValues.some(function (value) { return value !== null && value !== ''; });
|
|
3761
|
+
});
|
|
3762
|
+
};
|
|
3727
3763
|
__decorate([
|
|
3728
3764
|
core.Input(),
|
|
3729
3765
|
__metadata("design:type", Array)
|
|
@@ -3755,11 +3791,10 @@
|
|
|
3755
3791
|
RegisterDocumentComponent = __decorate([
|
|
3756
3792
|
core.Component({
|
|
3757
3793
|
selector: "register-document",
|
|
3758
|
-
template: "<s-sidebar\n [visible]=\"visible\"\n header=\"{{ 'yms.int.wms_register_document_add_document' | translate }} {{ wmsSystem }}\"\n (visibleChange)=\"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\">\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>\n </form>\n <div class=\"space-between\">\n <button\n pButton label=\"{{'save' | translate}}\"
|
|
3794
|
+
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\">\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>\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>"
|
|
3759
3795
|
}),
|
|
3760
3796
|
__metadata("design:paramtypes", [forms.FormBuilder,
|
|
3761
|
-
|
|
3762
|
-
core$1.TranslateService])
|
|
3797
|
+
UtilsMessageService])
|
|
3763
3798
|
], RegisterDocumentComponent);
|
|
3764
3799
|
return RegisterDocumentComponent;
|
|
3765
3800
|
}());
|
|
@@ -3790,11 +3825,10 @@
|
|
|
3790
3825
|
}());
|
|
3791
3826
|
|
|
3792
3827
|
var InsertKeyComponent = /** @class */ (function () {
|
|
3793
|
-
function InsertKeyComponent(formBuilder, documentService,
|
|
3828
|
+
function InsertKeyComponent(formBuilder, documentService, utils) {
|
|
3794
3829
|
this.formBuilder = formBuilder;
|
|
3795
3830
|
this.documentService = documentService;
|
|
3796
|
-
this.
|
|
3797
|
-
this.translate = translate;
|
|
3831
|
+
this.utils = utils;
|
|
3798
3832
|
this.document = new core.EventEmitter();
|
|
3799
3833
|
this.visible = new core.EventEmitter();
|
|
3800
3834
|
this.visibleChange = new core.EventEmitter();
|
|
@@ -3835,37 +3869,24 @@
|
|
|
3835
3869
|
this.documentService.findDocuments(key)
|
|
3836
3870
|
.pipe(operators.catchError(function (err) {
|
|
3837
3871
|
if (err.error && err.error.message.includes("404")) {
|
|
3838
|
-
_this.message("error", "yms.int.wms_error_search_document_message_header", "yms.int.wms_error_search_document_not_found_message_content");
|
|
3872
|
+
_this.utils.message("error", "yms.int.wms_error_search_document_message_header", "yms.int.wms_error_search_document_not_found_message_content");
|
|
3839
3873
|
}
|
|
3840
3874
|
else {
|
|
3841
|
-
_this.
|
|
3842
|
-
severity: "error",
|
|
3843
|
-
summary: _this.translate.instant("yms.int.wms_error_search_document_message_header"),
|
|
3844
|
-
detail: _this.translate.instant("yms.int.wms_error_unknown_search_document_message_content") + err.error.message,
|
|
3845
|
-
});
|
|
3875
|
+
_this.utils.translateMessage("error", "yms.int.wms_error_search_document_message_header", "yms.int.wms_error_unknown_search_document_message_content" + err.error.message);
|
|
3846
3876
|
}
|
|
3847
3877
|
return rxjs.throwError(err);
|
|
3848
3878
|
}), operators.finalize(function () {
|
|
3849
3879
|
_this.isLoading = false;
|
|
3850
3880
|
}))
|
|
3851
3881
|
.subscribe(function (content) {
|
|
3852
|
-
_this.visibleChange.emit(false);
|
|
3853
3882
|
if (!content || content.totalElements < 1) {
|
|
3854
|
-
_this.message("warn", "yms.int.wms_insert_key_warning_message_header", "yms.int.wms_insert_key_warning_message_description");
|
|
3883
|
+
_this.utils.message("warn", "yms.int.wms_insert_key_warning_message_header", "yms.int.wms_insert_key_warning_message_description");
|
|
3855
3884
|
return;
|
|
3856
3885
|
}
|
|
3857
3886
|
_this.document.emit(content.contents[0]);
|
|
3858
|
-
_this.message("success", "yms.int.wms_insert_key_success_message_header", "yms.int.wms_success_message_description");
|
|
3859
3887
|
_this.formGroup.reset();
|
|
3860
3888
|
});
|
|
3861
3889
|
};
|
|
3862
|
-
InsertKeyComponent.prototype.message = function (success, header, description) {
|
|
3863
|
-
this.messageService.add({
|
|
3864
|
-
severity: success,
|
|
3865
|
-
summary: this.translate.instant(header),
|
|
3866
|
-
detail: this.translate.instant(description),
|
|
3867
|
-
});
|
|
3868
|
-
};
|
|
3869
3890
|
InsertKeyComponent.prototype.cancel = function () {
|
|
3870
3891
|
this.visibleChange.emit(false);
|
|
3871
3892
|
};
|
|
@@ -3896,8 +3917,7 @@
|
|
|
3896
3917
|
}),
|
|
3897
3918
|
__metadata("design:paramtypes", [forms.FormBuilder,
|
|
3898
3919
|
DocumentService,
|
|
3899
|
-
|
|
3900
|
-
core$1.TranslateService])
|
|
3920
|
+
UtilsMessageService])
|
|
3901
3921
|
], InsertKeyComponent);
|
|
3902
3922
|
return InsertKeyComponent;
|
|
3903
3923
|
}());
|
|
@@ -14310,50 +14330,51 @@
|
|
|
14310
14330
|
exports.ɵb = CustomStompConfig;
|
|
14311
14331
|
exports.ɵba = EntityService$2;
|
|
14312
14332
|
exports.ɵbb = EntityService$1;
|
|
14313
|
-
exports.ɵbc =
|
|
14314
|
-
exports.ɵbd =
|
|
14315
|
-
exports.ɵbe =
|
|
14316
|
-
exports.ɵbf =
|
|
14317
|
-
exports.ɵbg =
|
|
14318
|
-
exports.ɵbh =
|
|
14319
|
-
exports.ɵbi =
|
|
14320
|
-
exports.ɵbj =
|
|
14321
|
-
exports.ɵbk =
|
|
14322
|
-
exports.ɵbl =
|
|
14323
|
-
exports.ɵbm =
|
|
14324
|
-
exports.ɵbn =
|
|
14325
|
-
exports.ɵbo =
|
|
14326
|
-
exports.ɵbp =
|
|
14327
|
-
exports.ɵbq =
|
|
14328
|
-
exports.ɵbr =
|
|
14329
|
-
exports.ɵbs =
|
|
14330
|
-
exports.ɵbt =
|
|
14331
|
-
exports.ɵbu =
|
|
14332
|
-
exports.ɵbv =
|
|
14333
|
-
exports.ɵbw =
|
|
14334
|
-
exports.ɵbx =
|
|
14335
|
-
exports.ɵby =
|
|
14336
|
-
exports.ɵbz =
|
|
14333
|
+
exports.ɵbc = UtilsMessageService;
|
|
14334
|
+
exports.ɵbd = RegisterDocumentModule;
|
|
14335
|
+
exports.ɵbe = RegisterDocumentComponent;
|
|
14336
|
+
exports.ɵbf = InsertKeyModule;
|
|
14337
|
+
exports.ɵbg = InsertKeyComponent;
|
|
14338
|
+
exports.ɵbh = IntegrationService$1;
|
|
14339
|
+
exports.ɵbi = RecebimentoFormComponent;
|
|
14340
|
+
exports.ɵbj = DerivacaoService;
|
|
14341
|
+
exports.ɵbk = NotaValidatorService;
|
|
14342
|
+
exports.ɵbl = TransgeniaService;
|
|
14343
|
+
exports.ɵbm = VerificaNotafiscal;
|
|
14344
|
+
exports.ɵbn = BuildFormField;
|
|
14345
|
+
exports.ɵbo = ExpedicaoFormComponent;
|
|
14346
|
+
exports.ɵbp = ExpedicaoInfoComponent;
|
|
14347
|
+
exports.ɵbq = RecebimentoInfoComponent;
|
|
14348
|
+
exports.ɵbr = DevolucaoFormComponent;
|
|
14349
|
+
exports.ɵbs = DevolucaoService;
|
|
14350
|
+
exports.ɵbt = DevolucaoChegadaVeiculoOverride;
|
|
14351
|
+
exports.ɵbu = RecebimentoOrdemCompraFormComponent;
|
|
14352
|
+
exports.ɵbv = OrdemCompraService;
|
|
14353
|
+
exports.ɵbw = RecebimentoOrdemCompraService;
|
|
14354
|
+
exports.ɵbx = RecebimentoOrdemCompraChegadaVeiculoOverride;
|
|
14355
|
+
exports.ɵby = RecebimentoOrdemCompraInfoComponent;
|
|
14356
|
+
exports.ɵbz = DevolucaoInfoComponent;
|
|
14337
14357
|
exports.ɵc = ViewImageComponent;
|
|
14338
|
-
exports.ɵca =
|
|
14339
|
-
exports.ɵcb =
|
|
14340
|
-
exports.ɵcc =
|
|
14341
|
-
exports.ɵcd =
|
|
14342
|
-
exports.ɵce =
|
|
14343
|
-
exports.ɵcf =
|
|
14344
|
-
exports.ɵcg =
|
|
14345
|
-
exports.ɵch =
|
|
14346
|
-
exports.ɵci =
|
|
14347
|
-
exports.ɵcj =
|
|
14348
|
-
exports.ɵck =
|
|
14349
|
-
exports.ɵcl =
|
|
14350
|
-
exports.ɵcm =
|
|
14351
|
-
exports.ɵcn =
|
|
14352
|
-
exports.ɵco =
|
|
14353
|
-
exports.ɵcp =
|
|
14354
|
-
exports.ɵcq =
|
|
14355
|
-
exports.ɵcr =
|
|
14356
|
-
exports.ɵcs =
|
|
14358
|
+
exports.ɵca = ContratoFormComponent;
|
|
14359
|
+
exports.ɵcb = OrdemCompraFormComponent;
|
|
14360
|
+
exports.ɵcc = ProcessoAvulsoFormComponent;
|
|
14361
|
+
exports.ɵcd = ProcessoAvulsoService;
|
|
14362
|
+
exports.ɵce = ProcessoAvulsoChegadaVeiculoOverride;
|
|
14363
|
+
exports.ɵcf = ProcessoAvulsoInfoComponent;
|
|
14364
|
+
exports.ɵcg = LogIntegracaoDescritor;
|
|
14365
|
+
exports.ɵch = LogIntegracaoComponent;
|
|
14366
|
+
exports.ɵci = LogIntegracaoService;
|
|
14367
|
+
exports.ɵcj = DerivacaoModule;
|
|
14368
|
+
exports.ɵck = DevolucaoModule;
|
|
14369
|
+
exports.ɵcl = OrdemCompraModule;
|
|
14370
|
+
exports.ɵcm = RecebimentoOrdemCompraModule;
|
|
14371
|
+
exports.ɵcn = TransgeniaModule;
|
|
14372
|
+
exports.ɵco = ProcessoAvulsoModule;
|
|
14373
|
+
exports.ɵcp = LogIntegracaoModule;
|
|
14374
|
+
exports.ɵcq = NotaFormModule;
|
|
14375
|
+
exports.ɵcr = DirectivesModule;
|
|
14376
|
+
exports.ɵcs = TrimDirective;
|
|
14377
|
+
exports.ɵct = NotaFormComponent;
|
|
14357
14378
|
exports.ɵd = LogDescritor;
|
|
14358
14379
|
exports.ɵe = LogsComponent;
|
|
14359
14380
|
exports.ɵf = PortariasService;
|