|
|
|
@ -20,7 +20,8 @@ import { Commercant } from '../../../../models/Commercant';
|
|
|
|
|
export class DemandeOpCommercialComponent implements OnInit, OnDestroy {
|
|
|
|
|
opComm: OperationCommerciale;
|
|
|
|
|
user: Observable<firebase.User>;
|
|
|
|
|
opCommData: FirebaseListObservable<any[]>;
|
|
|
|
|
opCommDataEnCours: FirebaseListObservable<any[]>;
|
|
|
|
|
opCommDataBloquer: FirebaseListObservable<any[]>;
|
|
|
|
|
profileData: FirebaseListObservable<any[]>;
|
|
|
|
|
commercant: Commercant;
|
|
|
|
|
|
|
|
|
@ -34,12 +35,19 @@ export class DemandeOpCommercialComponent implements OnInit, OnDestroy {
|
|
|
|
|
(auth) => {
|
|
|
|
|
// console.log("afAuth.authState : " + auth.toJSON());
|
|
|
|
|
if (auth) {
|
|
|
|
|
this.opCommData = this.afDb.list('/OperationCommercial/',{
|
|
|
|
|
this.opCommDataEnCours = this.afDb.list('/OperationCommercial/',{
|
|
|
|
|
query: {
|
|
|
|
|
orderByChild: 'validationXJC',
|
|
|
|
|
equalTo: 'En Cours'
|
|
|
|
|
}
|
|
|
|
|
}).map((array) => array.reverse()) as FirebaseListObservable<any[]>;
|
|
|
|
|
|
|
|
|
|
this.opCommDataBloquer = this.afDb.list('/OperationCommercial/',{
|
|
|
|
|
query: {
|
|
|
|
|
orderByChild: 'validationXJC',
|
|
|
|
|
equalTo: 'Bloquer'
|
|
|
|
|
}
|
|
|
|
|
}).map((array) => array.reverse()) as FirebaseListObservable<any[]>;
|
|
|
|
|
}
|
|
|
|
|
console.log(auth.uid);
|
|
|
|
|
}
|
|
|
|
|