@seniorsistemas/yms-integration 1.10.1 → 1.10.3
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 +9 -2
- 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 +10 -3
- package/esm5/src/erp-senior/components/nota-form/nota-form.component.js +10 -3
- package/fesm2015/seniorsistemas-yms-integration.js +9 -2
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +9 -2
- 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 +1 -0
|
@@ -2492,6 +2492,7 @@
|
|
|
2492
2492
|
this.dialogRef = dialogRef;
|
|
2493
2493
|
this.verificaNotaFiscal = verificaNotaFiscal;
|
|
2494
2494
|
this.loading = false;
|
|
2495
|
+
this.botaoDesabilitado = false;
|
|
2495
2496
|
this.unsubscribe$ = new rxjs.Subject();
|
|
2496
2497
|
this.validateNotaFiscal = function (response) {
|
|
2497
2498
|
if (!response || !response.documentos[0]) {
|
|
@@ -2569,6 +2570,7 @@
|
|
|
2569
2570
|
var _this = this;
|
|
2570
2571
|
var chaveNotaFiscal = this.formGroup.get("chaveNotaFiscal").value;
|
|
2571
2572
|
if (this.verificaNotaFiscal.verificaSeNotaFiscalEstaDuplicada(chaveNotaFiscal, this.contratos, this.fornecedorNotasTokens)) {
|
|
2573
|
+
this.botaoDesabilitado = true;
|
|
2572
2574
|
return;
|
|
2573
2575
|
}
|
|
2574
2576
|
this.removeErrorChaveNota();
|
|
@@ -2578,7 +2580,12 @@
|
|
|
2578
2580
|
filialId: this.filialId
|
|
2579
2581
|
})
|
|
2580
2582
|
.pipe(operators.takeUntil(this.unsubscribe$), operators.finalize(function () { return _this.loading = false; }))
|
|
2581
|
-
.subscribe(
|
|
2583
|
+
.subscribe(function (response) { return _this.validateNotaFiscal(response); }, function (error) {
|
|
2584
|
+
if (!error.ok && error.status == '409') {
|
|
2585
|
+
_this.botaoDesabilitado = true;
|
|
2586
|
+
}
|
|
2587
|
+
});
|
|
2588
|
+
this.botaoDesabilitado = false;
|
|
2582
2589
|
};
|
|
2583
2590
|
NotaFormComponent.prototype.confirmAndAddNovoFornecedor = function (infoNota, fornecedor, origemMercadoria) {
|
|
2584
2591
|
var _this = this;
|
|
@@ -2625,7 +2632,7 @@
|
|
|
2625
2632
|
};
|
|
2626
2633
|
NotaFormComponent = __decorate([
|
|
2627
2634
|
core.Component({
|
|
2628
|
-
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 pInputText type=\"text\" formControlName=\"chaveNotaFiscal\" (blur)=\"onBlurNotaFiscal()\">\n <s-control-errors [control]=\"formGroup.controls.chaveNotaFiscal\" [errorMessages]=\"{ errorChaveNota: 'yms.erp.produto_nota_error_detail' | translate }\"></s-control-errors>\n </div>\n <div class=\"ui-g-12\">\n <label for=\"serieNotaFiscal\">{{'yms.erp.recebimento_serie_nota_fiscal' | translate}}</label>\n <input pInputText type=\"text\" formControlName=\"serieNotaFiscal\">\n </div>\n <div class=\"ui-g-12\">\n <label for=\"serieLegalNotaFiscal\">{{'yms.erp.recebimento_serie_legal_nota_fiscal' | translate}}</label>\n <input pInputText type=\"text\" formControlName=\"serieLegalNotaFiscal\">\n </div>\n <div class=\"ui-g-12\">\n <label for=\"numeroNotaFiscal\">{{'yms.erp.recebimento_numero_nota_fiscal' | translate}}</label>\n <input pInputText type=\"text\" formControlName=\"numeroNotaFiscal\">\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\" (onClick)=\"save()\"></s-button>\n</form>\n\n<p-confirmDialog appendTo=\"body\"></p-confirmDialog>",
|
|
2635
|
+
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 pInputText type=\"text\" formControlName=\"chaveNotaFiscal\" (blur)=\"onBlurNotaFiscal()\">\n <s-control-errors [control]=\"formGroup.controls.chaveNotaFiscal\" [errorMessages]=\"{ errorChaveNota: 'yms.erp.produto_nota_error_detail' | translate }\"></s-control-errors>\n </div>\n <div class=\"ui-g-12\">\n <label for=\"serieNotaFiscal\">{{'yms.erp.recebimento_serie_nota_fiscal' | translate}}</label>\n <input pInputText type=\"text\" formControlName=\"serieNotaFiscal\">\n </div>\n <div class=\"ui-g-12\">\n <label for=\"serieLegalNotaFiscal\">{{'yms.erp.recebimento_serie_legal_nota_fiscal' | translate}}</label>\n <input pInputText type=\"text\" formControlName=\"serieLegalNotaFiscal\">\n </div>\n <div class=\"ui-g-12\">\n <label for=\"numeroNotaFiscal\">{{'yms.erp.recebimento_numero_nota_fiscal' | translate}}</label>\n <input pInputText type=\"text\" formControlName=\"numeroNotaFiscal\">\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\" (onClick)=\"save()\"></s-button>\n</form>\n\n<p-confirmDialog appendTo=\"body\"></p-confirmDialog>",
|
|
2629
2636
|
providers: [api.ConfirmationService]
|
|
2630
2637
|
}),
|
|
2631
2638
|
__metadata("design:paramtypes", [forms.FormBuilder,
|