|
|
|
@ -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() {
|
|
|
|
|