screenshot ok

thierry
Tmadkaud 7 years ago
parent 077c3f51e7
commit 83c30dabdc

@ -0,0 +1,7 @@
[
{
"origin": ["*"],
"method": ["GET"],
"maxAgeSeconds": 3600
}
]

@ -3,6 +3,22 @@
"rules": "database.rules.json"
},
"hosting": {
"headers": [
{
"source": "**/**",
"headers": [{
"key":"Access-Control-Allow-Origin",
"value":"*"
}]
},
{
"source" : "**/*.@(jpg|jpeg|gif|png)",
"headers" : [ {
"key" : "Access-Control-Allow-Origin",
"value" : "*"
} ]
}
],
"public": "dist",
"ignore": [
"firebase.json",

@ -27,10 +27,11 @@
</div>
</div>-->
<div class="col-md-6 card subCard2">
<label>date Debut: {{crt.dateDebut}}</label>
<label>date Fin: {{crt.dateFin}}</label>
<label>date Debut: {{crt.dateDebut | date:'dd/MM/yyyy'}}</label>
<label>date Fin: {{crt.dateFin | date:'dd/MM/yyyy'}}</label>
<label>avantage Cumule: {{crt.avantageCumule}}</label>
<label>avantage Recuperer: {{crt.avantageRecuperer}}</label>
<label>ID de la carte: {{crt.uid}}</label>
</div>
</div>
</div>

@ -147,7 +147,6 @@
</div>
</div>
<!--<button class="btn btn-blue waves-light" (click)="sectionToImage()"> screen </button>-->
<img id="myImage">
</div>
</div>

@ -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 = {

Loading…
Cancel
Save