Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ngOnInit() {
- let response = this.getBoletoService.getHashBoleto(this.profissional).subscribe(
- (data:any) => {
- if(data['sucesso'] == false){
- return 'Boleto será enviado por e-mail'
- } else {
- this.resposta = data
- }
- err => {
- this.router.navigate(['erro'])
- }
- }
- )
- if(response){
- this.dataloaded = true;
- }
- }
- OnSubmit(f){
- this.profissional.endereco = f.value
- if(this.resposta){
- this.profissional['boletoGerado'] = true
- this.atualizaEndereco.atualizaEndereco(this.profissional).subscribe(
- data => {
- this.router.navigate(['sucesso'])
- window.open(`${this.url}/${this.resposta['hash']}`)
- },
- error => {
- window.open(`${this.url}/${this.resposta['hash']}`)
- this.novoEndereco = false
- }
- );
Add Comment
Please, Sign In to add comment