|
|
|
@ -52,6 +52,8 @@ export class EnvoyerCarteComponent implements OnInit, OnDestroy {
|
|
|
|
|
parrainsTest: Parrain[];
|
|
|
|
|
filteredParrainsTest: any[];
|
|
|
|
|
subscription: Subscription;
|
|
|
|
|
|
|
|
|
|
validC: string;
|
|
|
|
|
//startAt = new Subject();
|
|
|
|
|
//endAt = new Subject();
|
|
|
|
|
/////
|
|
|
|
@ -63,7 +65,7 @@ export class EnvoyerCarteComponent implements OnInit, OnDestroy {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.radioParrain = '';
|
|
|
|
|
|
|
|
|
|
this.validC = '';
|
|
|
|
|
this.localUser = new User();
|
|
|
|
|
this.parrain = new Parrain();
|
|
|
|
|
this.commercant = new Commercant();
|
|
|
|
@ -280,9 +282,10 @@ export class EnvoyerCarteComponent implements OnInit, OnDestroy {
|
|
|
|
|
const opEnvRef = this.databaseRef.child('OperationCommercial').child(this.opComm.uid.toString()).child('nbEnvoie');
|
|
|
|
|
opEnvRef.set(this.opComm.nbEnvoie);
|
|
|
|
|
|
|
|
|
|
this.validC = 'ok';
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
sectionToImage(maCarteP: CarteParrainage) {
|
|
|
|
|
|
|
|
|
|
html2canvas(document.getElementById('subCard1'), {
|
|
|
|
|
// allowTaint: true,
|
|
|
|
|
useCORS: true,
|
|
|
|
@ -302,7 +305,7 @@ export class EnvoyerCarteComponent implements OnInit, OnDestroy {
|
|
|
|
|
canvas.crossOrigin = 'Anonymous';
|
|
|
|
|
|
|
|
|
|
canvas.id = 'canvas';
|
|
|
|
|
document.body.appendChild(canvas);
|
|
|
|
|
// document.body.appendChild(canvas);
|
|
|
|
|
|
|
|
|
|
canvas.toBlob(blob => {
|
|
|
|
|
var nouvelleImg = new Image();
|
|
|
|
@ -336,6 +339,7 @@ export class EnvoyerCarteComponent implements OnInit, OnDestroy {
|
|
|
|
|
//////
|
|
|
|
|
|
|
|
|
|
ngOnDestroy() {
|
|
|
|
|
this.validC = '';
|
|
|
|
|
this.subscription.unsubscribe();
|
|
|
|
|
this.radioParrain = '';
|
|
|
|
|
this.cartePar = {
|
|
|
|
|