@seniorsistemas/yms-integration 1.30.1 → 1.30.2
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 +17 -12
- 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/erp-senior/components/nota-form/nota-form.component.js +21 -18
- package/esm5/src/erp-senior/components/nota-form/nota-form.component.js +21 -18
- package/fesm2015/seniorsistemas-yms-integration.js +17 -12
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +17 -12
- package/fesm5/seniorsistemas-yms-integration.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-yms-integration.metadata.json +1 -1
- package/src/erp-senior/components/nota-form/nota-form.component.d.ts +3 -6
|
@@ -5053,19 +5053,23 @@
|
|
|
5053
5053
|
}());
|
|
5054
5054
|
|
|
5055
5055
|
var NotaFormComponent = /** @class */ (function () {
|
|
5056
|
-
function NotaFormComponent(fb, notaValidatorService, dialogConfig, confirmationService, dialogRef, verificaNotaFiscal
|
|
5056
|
+
function NotaFormComponent(fb, notaValidatorService, dialogConfig, confirmationService, dialogRef, verificaNotaFiscal) {
|
|
5057
5057
|
var _this = this;
|
|
5058
5058
|
this.notaValidatorService = notaValidatorService;
|
|
5059
5059
|
this.dialogConfig = dialogConfig;
|
|
5060
5060
|
this.confirmationService = confirmationService;
|
|
5061
5061
|
this.dialogRef = dialogRef;
|
|
5062
5062
|
this.verificaNotaFiscal = verificaNotaFiscal;
|
|
5063
|
-
this.messageService = messageService;
|
|
5064
|
-
this.translate = translate;
|
|
5065
5063
|
this.loading = false;
|
|
5066
5064
|
this.botaoDesabilitado = false;
|
|
5065
|
+
this.disabled = true;
|
|
5067
5066
|
this.unsubscribe$ = new rxjs.Subject();
|
|
5068
5067
|
this.validateNotaFiscal = function (response) {
|
|
5068
|
+
var chaveNotaFiscal = _this.formGroup.get("chaveNotaFiscal").value;
|
|
5069
|
+
if (chaveNotaFiscal.length === 0) {
|
|
5070
|
+
return;
|
|
5071
|
+
}
|
|
5072
|
+
_this.disabled = false;
|
|
5069
5073
|
if (!response || !response.documentos[0]) {
|
|
5070
5074
|
return;
|
|
5071
5075
|
}
|
|
@@ -5099,10 +5103,10 @@
|
|
|
5099
5103
|
return !!chave || !!serie || !!numero ? null : { erroMultiplosCampos: true };
|
|
5100
5104
|
};
|
|
5101
5105
|
this.formGroup = fb.group({
|
|
5102
|
-
chaveNotaFiscal: [undefined],
|
|
5103
|
-
serieNotaFiscal: [undefined],
|
|
5104
|
-
serieLegalNotaFiscal: [undefined],
|
|
5105
|
-
numeroNotaFiscal: [undefined],
|
|
5106
|
+
chaveNotaFiscal: [undefined, forms.Validators.required],
|
|
5107
|
+
serieNotaFiscal: [undefined, forms.Validators.required],
|
|
5108
|
+
serieLegalNotaFiscal: [undefined, forms.Validators.required],
|
|
5109
|
+
numeroNotaFiscal: [undefined, forms.Validators.required],
|
|
5106
5110
|
}, { validators: this.camposPreenchidosValidation });
|
|
5107
5111
|
}
|
|
5108
5112
|
NotaFormComponent.prototype.ngOnInit = function () {
|
|
@@ -5146,7 +5150,10 @@
|
|
|
5146
5150
|
chaveDocumento: (chaveNotaFiscal || "").replace(/\s/g, ""),
|
|
5147
5151
|
filialId: this.filialId
|
|
5148
5152
|
})
|
|
5149
|
-
.pipe(operators.takeUntil(this.unsubscribe$), operators.
|
|
5153
|
+
.pipe(operators.takeUntil(this.unsubscribe$), operators.catchError(function () {
|
|
5154
|
+
_this.disabled = false;
|
|
5155
|
+
return rxjs.of(null);
|
|
5156
|
+
}), operators.finalize(function () { return _this.loading = false; }))
|
|
5150
5157
|
.subscribe(this.validateNotaFiscal);
|
|
5151
5158
|
this.botaoDesabilitado = false;
|
|
5152
5159
|
};
|
|
@@ -5205,7 +5212,7 @@
|
|
|
5205
5212
|
};
|
|
5206
5213
|
NotaFormComponent = __decorate([
|
|
5207
5214
|
core.Component({
|
|
5208
|
-
template: "<form [formGroup]=\"formGroup\">\n <div class=\"ui-g ui-fluid\" *sLoadingState=\"loading\">\n <div class=\"ui-g-12\">\n <label for=\"chaveNotaFiscal\">{{'yms.erp.recebimento_chave_nota_fiscal' | translate}}</label>\n <input\n id=\"chaveNotaFiscal\"\n trim\n pInputText\n type=\"text\"\n formControlName=\"chaveNotaFiscal\"\n (blur)=\"onBlurNotaFiscal()\"\n >\n <s-control-errors
|
|
5215
|
+
template: "<form [formGroup]=\"formGroup\">\n <div class=\"ui-g ui-fluid\" *sLoadingState=\"loading\">\n <div class=\"ui-g-12 required\">\n <label for=\"chaveNotaFiscal\">{{'yms.erp.recebimento_chave_nota_fiscal' | translate}}</label>\n <input\n id=\"chaveNotaFiscal\"\n trim\n pInputText\n type=\"text\"\n formControlName=\"chaveNotaFiscal\"\n (blur)=\"onBlurNotaFiscal()\"\n >\n <s-control-errors\n [control]=\"formGroup.controls.chaveNotaFiscal\"\n [errorMessages]=\"{ errorChaveNota: 'yms.erp.produto_nota_error_detail' | translate }\">\n </s-control-errors>\n </div>\n <div class=\"ui-g-12 required\" [attr.data-hidden]=\"disabled\">\n <label for=\"serieNotaFiscal\">{{'yms.erp.recebimento_serie_nota_fiscal' | translate}}</label>\n <input pInputText type=\"text\" formControlName=\"serieNotaFiscal\">\n <s-control-errors\n [control]=\"formGroup.controls['serieNotaFiscal']\"\n [errorMessages]=\"{ required: 'yms.erp.error_required' | translate }\">\n </s-control-errors>\n </div>\n <div class=\"ui-g-12 required\" [attr.data-hidden]=\"disabled\">\n <label for=\"serieLegalNotaFiscal\">{{'yms.erp.recebimento_serie_legal_nota_fiscal' | translate}}</label>\n <input pInputText type=\"text\" formControlName=\"serieLegalNotaFiscal\">\n <s-control-errors\n [control]=\"formGroup.controls['serieLegalNotaFiscal']\"\n [errorMessages]=\"{ required: 'yms.erp.error_required' | translate }\">\n </s-control-errors>\n </div>\n <div class=\"ui-g-12 required\" [attr.data-hidden]=\"disabled\">\n <label for=\"numeroNotaFiscal\">{{'yms.erp.recebimento_numero_nota_fiscal' | translate}}</label>\n <input pInputText type=\"text\" formControlName=\"numeroNotaFiscal\">\n <s-control-errors\n [control]=\"formGroup.controls['numeroNotaFiscal']\"\n [errorMessages]=\"{ required: 'yms.erp.error_required' | translate }\">\n </s-control-errors>\n </div>\n </div>\n\n <s-control-errors [control]=\"formGroup\" [errorMessages]=\"{ erroMultiplosCampos: 'yms.erp.nota_fiscal_no_value' | translate }\"></s-control-errors>\n\n <s-button label=\"Cancelar\" (onClick)=\"close()\" priority=\"link\"></s-button>\n <s-button label=\"Salvar\" [disabled]=\"botaoDesabilitado || disabled\" (onClick)=\"save()\"></s-button>\n</form>\n\n<p-confirmDialog appendTo=\"body\"></p-confirmDialog>",
|
|
5209
5216
|
providers: [api.ConfirmationService]
|
|
5210
5217
|
}),
|
|
5211
5218
|
__metadata("design:paramtypes", [forms.FormBuilder,
|
|
@@ -5213,9 +5220,7 @@
|
|
|
5213
5220
|
api.DynamicDialogConfig,
|
|
5214
5221
|
api.ConfirmationService,
|
|
5215
5222
|
api.DynamicDialogRef,
|
|
5216
|
-
VerificaNotafiscal
|
|
5217
|
-
messageservice.MessageService,
|
|
5218
|
-
core$1.TranslateService])
|
|
5223
|
+
VerificaNotafiscal])
|
|
5219
5224
|
], NotaFormComponent);
|
|
5220
5225
|
return NotaFormComponent;
|
|
5221
5226
|
}());
|