admin opcom

thierry
Tmadkaud 7 years ago
parent 38ac8397ee
commit b784151cfa

@ -27,7 +27,19 @@ export class ListeOpCommercialComponent implements OnInit, OnDestroy {
constructor(public afAuth: AngularFireAuth, public afDb: AngularFireDatabase,
private router: Router, private authService: AuthService, private opComService: OpCommercialService) {
this.opComm = new OperationCommerciale();
this.user = afAuth.authState;
this.commercant = new Commercant();
this.user.subscribe(
(auth) => {
// console.log("afAuth.authState : " + auth.toJSON());
if (auth) {
this.opCommData = this.afDb.list('/OperationCommercial/');
}
console.log(auth.uid);
}
);
}
ngOnInit() {

@ -81,7 +81,7 @@ export class AuthService {
else if (user.displayName === 'Commercant') {
this.router.navigate(['/opCommercial']);
}
else if (user.email === 'xjc@gmail.com'){
else if (user.email === 'xjc@gmail.com') {
this.router.navigate(['/demandeOpCommercialAdmin']);
}
}/*else{

Loading…
Cancel
Save