|
|
|
@ -301,18 +301,22 @@ export class EnvoyerCarteComponent implements OnInit, OnDestroy {
|
|
|
|
|
this.getIdParrain(elementParTemp.uid);
|
|
|
|
|
this.creerCartePar();
|
|
|
|
|
this.carteEnvoieOK = true;
|
|
|
|
|
this.toastrService.success('Envoie de la carte à ' + elementParTemp.familyname + ' ' + elementParTemp.firstname);
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.goToOpComm();
|
|
|
|
|
this.toastrService.success('Envoie de la carte à ' + elementParTemp.familyname
|
|
|
|
|
+ ' ' + elementParTemp.firstname);
|
|
|
|
|
},
|
|
|
|
|
3000);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
registerNewParrain() {
|
|
|
|
|
this.carteEnvoieOK = false;
|
|
|
|
|
this.parrain.status = 'Parrain';
|
|
|
|
|
//this.parrain.birthday = this.parrainDateTimeTest;
|
|
|
|
|
// this.parrain.birthday = this.parrainDateTimeTest;
|
|
|
|
|
this.parrain.secretCode = this.getRandomArbitrary(1111, 9999).toString();
|
|
|
|
|
this.parrain.password = this.getRandomArbitrary(111111, 999999).toString();
|
|
|
|
|
// this.authService.signUp(this.parrain);
|
|
|
|
@ -451,10 +455,15 @@ export class EnvoyerCarteComponent implements OnInit, OnDestroy {
|
|
|
|
|
console.log('cestBon !!');
|
|
|
|
|
this.creerCartePar();
|
|
|
|
|
this.carteEnvoieOK = true;
|
|
|
|
|
this.toastrService.success('Envoie de la carte à ' + this.cartePar.parrainCarte.familyname + ' ' + this.cartePar.parrainCarte.firstname);
|
|
|
|
|
}else{
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.goToOpComm();
|
|
|
|
|
this.toastrService.success('Envoie de la carte à ' + this.cartePar.parrainCarte.familyname
|
|
|
|
|
+ ' ' + this.cartePar.parrainCarte.firstname);
|
|
|
|
|
},
|
|
|
|
|
3000);
|
|
|
|
|
} else {
|
|
|
|
|
console.log('cest pas bon ');
|
|
|
|
|
//this.carteEnvoieOK = false;
|
|
|
|
|
// this.carteEnvoieOK = false;
|
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
this.applyFilters(this.filteredCartePars, this.cartePars);
|
|
|
|
|