[U] huddle: navigate to dashboard on delete
This commit is contained in:
parent
5397a34353
commit
42640f113c
2 changed files with 6 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { Component, OnDestroy, OnInit, ViewChild } from "@angular/core";
|
||||
import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { NgbModal, NgbModalRef } from "@ng-bootstrap/ng-bootstrap";
|
||||
import { SupabaseAuthUser } from '@supabase/supabase-js';
|
||||
import { Subject } from 'rxjs';
|
||||
|
|
@ -32,6 +32,7 @@ export class HuddleComponent implements OnInit, OnDestroy {
|
|||
private route: ActivatedRoute,
|
||||
private sanitizer: DomSanitizer,
|
||||
private userService: UserService,
|
||||
private router: Router,
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
|
@ -129,6 +130,7 @@ export class HuddleComponent implements OnInit, OnDestroy {
|
|||
this.standupService.deleteOne(this.standup).pipe(take(1)).subscribe(
|
||||
data => {
|
||||
console.log('Success', data);
|
||||
this.router.navigateByUrl('/dashboard')
|
||||
},
|
||||
error => {
|
||||
console.error('Failed', error);
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
<form>
|
||||
<div class="row mt-3 justify-content-md-center">
|
||||
<div class="form-group col-12 col-sm-4">
|
||||
<div class="form-group col-12 col-md-4">
|
||||
<label for="email">Email</label>
|
||||
<input #email class="form-control" type="email">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="form-group col-12 col-sm-4">
|
||||
<div class="form-group col-12 col-md-4">
|
||||
<label for="password">Password</label>
|
||||
<input #password class="form-control" type="password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col-12 col-sm-4">
|
||||
<div class="col-12 col-md-4">
|
||||
<button class="btn btn-primary text-uppercase" type="submit" (click)="login(email.value, password.value)">
|
||||
Log in
|
||||
</button> or
|
||||
|
|
|
|||
Loading…
Reference in a new issue