Merge branch 'thierry' of ssh://git.marbelium.com:10023/Viiciouss/XJC into anis

thierry
Viiciouss 7 years ago
commit 379d797970

@ -2,56 +2,71 @@
<div class="container">
<h4 class="mb-5 mt-1 font-bold wow fadeInDown text-center" style="padding-top: 5%;">Historique des cartes envoyées ({{(carteParData | async)?.length}})</h4>
<!--<button class="btn btn-primary btn-rounded waves-light" (click)="goToOpCom()">Retour aux Opérations commerciales</button>-->
<div *ngIf="(opCommData | async)?.length != 0" class="float-right">
<div class="dropdown" dropdown>
<button dropdownToggle type="button" class="btn btn-info btn-rounded dropdown-toggle waves-light" mdbRippleRadius>
Filtres
</button>
<div class="dropdown-menu">
<a class="dropdown-item" id="opActive" (click)="activeCarte('Active')">Actives</a>
<a class="dropdown-item" id="opToutes" (click)="activeCarte('Toutes')">Toutes</a>
<a class="dropdown-item" id="opInactive" (click)="activeCarte('Inactive')">Inactives</a>
</div>
</div>
</div>
<div class="list-group wow fadeInUpBig">
<div *ngFor="let crt of (carteParData | async); let i = index;">
<div class="card mainCard">
<div class="row no-margin" id="testt">
<img class="col-md-6 card-image mb-1 subCard1" id="image1" alt="Responsive image" src={{crt.carteTemplate.downloadURL}}>
<!--<div class="col-md-6 mb-1 subCard1" id="subCard1">
<img src="{{crt.carteTemplate.downloadURL}}" id="image1" class="mx-auto d-block flex-center card-img-overlay" alt="Responsive image">
</div>-->
<div class="col-md-6 card subCard2">
<div class="card-block row no-margin">
<div class="col-md-8" id="subCard2Part1">
<div id="opTitle">
<label>Operation Commerciale: {{crt.operationCommercialCarte.name}}</label>
<label>Parrain: {{crt.parrainCarte.familyname}} {{crt.parrainCarte.firstname}}</label>
<label>ID: {{crt.uid}}</label>
<div *ngIf="(crt.status == statutAffiche) || (statutAffiche == 'Toutes')">
<div class="card mainCard">
<div class="row no-margin" id="testt">
<img class="col-md-6 card-image mb-1 subCard1" id="image1" alt="Responsive image" src={{crt.carteTemplate.downloadURL}}>
<!--<div class="col-md-6 mb-1 subCard1" id="subCard1">
<img src="{{crt.carteTemplate.downloadURL}}" id="image1" class="mx-auto d-block flex-center card-img-overlay" alt="Responsive image">
</div>-->
<div class="col-md-6 card subCard2">
<div class="card-block row no-margin">
<div class="col-md-8" id="subCard2Part1">
<div id="opTitle">
<label>Operation Commerciale: {{crt.operationCommercialCarte.name}}</label>
<label>Parrain: {{crt.parrainCarte.familyname}} {{crt.parrainCarte.firstname}}</label>
<label>ID: {{crt.uid}}</label>
</div>
<div id="opAvantages">
<label>Avantage cummulé: {{crt.avantageCumule=== ''? '0' : crt.avantageCumule}} €</label>
<label>Avantage récupérer: {{crt.avantageRecuperer=== ''? '0' : crt.avantageRecuperer}} €</label>
</div>
</div>
<div id="opAvantages">
<label>Avantage cummulé: {{crt.avantageCumule=== ''? '0' : crt.avantageCumule}} €</label>
<label>Avantage récupérer: {{crt.avantageRecuperer=== ''? '0' : crt.avantageRecuperer}} €</label>
<div class="col-md-2" id="subCard2Part2">
<button class="btn btn-outline-primary btn-rounded" (click)="hideme[i] = !hideme[i]">{{show ? 'Cacher Détails' : 'Détails'}}</button>
<!--<button class="btn btn-outline-info btn-rounded" (click)="sectionToImage(op.carteTemplate.downloadURL, commercant.image.downloadURL)">screenShot</button>-->
</div>
</div>
<div class="col-md-2" id="subCard2Part2">
<button class="btn btn-outline-primary btn-rounded" (click)="hideme[i] = !hideme[i]">{{show ? 'Cacher Détails' : 'Détails'}}</button>
<!--<button class="btn btn-outline-info btn-rounded" (click)="sectionToImage(op.carteTemplate.downloadURL, commercant.image.downloadURL)">screenShot</button>-->
</div>
</div>
</div>
<!-- Card footer -->
<div class="card-data" id="footerCard">
<ul>
<li class="float-right"><i class="fa fa-info-circle" aria-hidden="true"></i>Statut:
<label class="font-bold" *ngIf="crt.status == 'Active'" style="color:#00C851; margin-bottom: 0">{{crt.status}}</label>
<label class="font-bold" *ngIf="crt.status == 'Inactive'" style="color:#ffbb33; margin-bottom: 0">{{crt.status}}</label>
<label class="font-bold" *ngIf="crt.status == 'Bloqué'" style="color:#ff4444; margin-bottom: 0">{{crt.status}}</label>
</li>
<li class="float-left"><i class="fa fa-clock-o"></i>Valable du {{crt.dateDebut | date:'dd/MM/yyyy'}} au {{crt.dateFin | date:'dd/MM/yyyy'}}</li>
</ul>
</div>
<!-- Card footer -->
</div>
<!-- Card footer -->
<div class="card-data" id="footerCard">
<ul>
<li class="float-right"><i class="fa fa-info-circle" aria-hidden="true"></i>Statut:
<label class="font-bold" *ngIf="crt.status == 'Active'" style="color:#00C851; margin-bottom: 0">{{crt.status}}</label>
<label class="font-bold" *ngIf="crt.status == 'Inactive'" style="color:#ffbb33; margin-bottom: 0">{{crt.status}}</label>
<label class="font-bold" *ngIf="crt.status == 'Bloqué'" style="color:#ff4444; margin-bottom: 0">{{crt.status}}</label>
</li>
<li class="float-left"><i class="fa fa-clock-o"></i>Valable du {{crt.dateDebut | date:'dd/MM/yyyy'}} au {{crt.dateFin | date:'dd/MM/yyyy'}}</li>
</ul>
</div>
<!-- Card footer -->
</div>
<div class="card" [hidden]="!hideme[i]" style="height:20rem; overflow-y: auto;">
<div class="card-body">
<ul class="list-group wow fadeInDown">
<p class="font-weight-normal" style="padding-top: 2%" *ngIf="crt.historique === undefined">Aucune opération n'a été effectuée sur cette carte !</p>
<div class="card" [hidden]="!hideme[i]" style="height:20rem; overflow-y: auto;">
<div class="card-body">
<ul class="list-group wow fadeInDown">
<p class="font-weight-normal" style="padding-top: 2%" *ngIf="crt.historique === undefined">Aucune opération n'a été effectuée sur cette carte !</p>
<li class="list-group-item justify-content-between align-items-center" *ngFor="let hst of crt.historique">
<p class="font-weight-normal" style="padding-top: 2%">{{hst}}</p>
</li>
</ul>
<li class="list-group-item justify-content-between align-items-center" *ngFor="let hst of crt.historique">
<p class="font-weight-normal" style="padding-top: 2%">{{hst}}</p>
</li>
</ul>
</div>
</div>
</div>
</div>

@ -28,10 +28,11 @@ export class CarteEnvoyerComponent implements OnInit {
i: number;
hideme = {};
databaseRef: any;
statutAffiche: string;
constructor(public afAuth: AngularFireAuth, public afDb: AngularFireDatabase,
private router: Router, private authService: AuthService, private opComService: OpCommercialService) {
this.hideme = {}; // init is required
this.statutAffiche = 'Toutes';
this.databaseRef = firebase.database().ref();
this.user = afAuth.authState;
this.commercant = new Commercant();
@ -72,6 +73,9 @@ export class CarteEnvoyerComponent implements OnInit {
);
}
activeCarte(afficheStatus: string){
this.statutAffiche = afficheStatus;
}
goToOpCom(){
this.router.navigate(['/opCommercial']);

@ -15,41 +15,43 @@
</div>
<div class="list-group wow fadeInUpBig">
<div class="card mainCard" *ngFor="let crt of carteParrData | async">
<div class="row no-margin">
<img class="col-md-6 card-image mb-1 subCard1" src={{crt.carteTemplate.downloadURL}}>
<!--<div class="col-md-6 card-image mb-1 subCard1" [ngStyle]="{ 'background-image': 'url(' + crt.carteTemplate.downloadURL + ')'}">
<div *ngIf="(crt.status == statutAffiche) || (statutAffiche == 'Toutes')">
<div class="row no-margin">
<img class="col-md-6 card-image mb-1 subCard1" src={{crt.carteTemplate.downloadURL}}>
<!--<div class="col-md-6 card-image mb-1 subCard1" [ngStyle]="{ 'background-image': 'url(' + crt.carteTemplate.downloadURL + ')'}">
<div class="view">
<div class="row firstRow">
<div *ngIf="commercant !== undefined" >
<div class="col-md-6 flex-center card-block cardPart1"></div>
<div class="col-md-6 flex-center card-block card-image mb-1 cardPart2">
<p></p>
<div class="view">
<div class="row firstRow">
<div *ngIf="commercant !== undefined" >
<div class="col-md-6 flex-center card-block cardPart1"></div>
<div class="col-md-6 flex-center card-block card-image mb-1 cardPart2">
<p></p>
</div>
</div>
</div>
<div class="row secondRow">
<div class="col-md-6 flex-center cardPart3"><p></p></div>
<div class="col-md-6 flex-center cardPart4"><p></p></div>
</div>
</div>
<div class="row secondRow">
<div class="col-md-6 flex-center cardPart3"><p></p></div>
<div class="col-md-6 flex-center cardPart4"><p></p></div>
</div>
</div>-->
<div class="col-md-6 card subCard2">
<label>ID de la carte: {{crt.uid}}</label>
<label>Avantage cumule: {{crt.avantageCumule === ''? '0' : crt.avantageCumule}} €</label>
<label>Avantage recuperer: {{crt.avantageRecuperer === ''? '0' : crt.avantageRecuperer}} €</label>
</div>
</div>-->
<div class="col-md-6 card subCard2">
<label>ID de la carte: {{crt.uid}}</label>
<label>Avantage cumule: {{crt.avantageCumule === ''? '0' : crt.avantageCumule}} €</label>
<label>Avantage recuperer: {{crt.avantageRecuperer === ''? '0' : crt.avantageRecuperer}} €</label>
</div>
</div>
<!-- Card footer -->
<div class="card-data" id="footerCard">
<ul>
<li class="float-right"><i class="fa fa-info-circle" aria-hidden="true"></i>Statut:
<label class="font-bold" *ngIf="crt.status == 'Active'" style="color:#00C851; margin-bottom: 0">{{crt.status}}</label>
<label class="font-bold" *ngIf="crt.status == 'Inactive'" style="color:#ffbb33; margin-bottom: 0">{{crt.status}}</label>
<label class="font-bold" *ngIf="crt.status == 'Bloqué'" style="color:#ff4444; margin-bottom: 0">{{crt.status}}</label>
</li>
<li class="float-left"><i class="fa fa-clock-o"></i>Valable du {{crt.dateDebut | date:'dd/MM/yyyy'}} au {{crt.dateFin | date:'dd/MM/yyyy'}}</li>
</ul>
<!-- Card footer -->
<div class="card-data" id="footerCard">
<ul>
<li class="float-right"><i class="fa fa-info-circle" aria-hidden="true"></i>Statut:
<label class="font-bold" *ngIf="crt.status == 'Active'" style="color:#00C851; margin-bottom: 0">{{crt.status}}</label>
<label class="font-bold" *ngIf="crt.status == 'Inactive'" style="color:#ffbb33; margin-bottom: 0">{{crt.status}}</label>
<label class="font-bold" *ngIf="crt.status == 'Bloqué'" style="color:#ff4444; margin-bottom: 0">{{crt.status}}</label>
</li>
<li class="float-left"><i class="fa fa-clock-o"></i>Valable du {{crt.dateDebut | date:'dd/MM/yyyy'}} au {{crt.dateFin | date:'dd/MM/yyyy'}}</li>
</ul>
</div>
</div>
<!-- Card footer -->
</div>

@ -33,12 +33,14 @@ export class CarteParrainageComponent implements OnInit, OnDestroy {
profileData: FirebaseListObservable<any[]>;
commList: FirebaseListObservable<any[]>;
databaseRef: any;
statutAffiche: string;
constructor(public afAuth: AngularFireAuth, public afDb: AngularFireDatabase,
private router: Router, private opComService: OpCommercialService) {
this.carteParr = new CarteParrainage();
this.databaseRef = firebase.database().ref();
this.user = afAuth.authState;
this.statutAffiche = 'Toutes';
this.parrain = new Parrain();
this.user.subscribe(
@ -93,6 +95,10 @@ export class CarteParrainageComponent implements OnInit, OnDestroy {
);
}
activeCarte(afficheStatus: string){
this.statutAffiche = afficheStatus;
}
updateCarteStatus(maCarte: CarteParrainage){
var todayTemp = new Date(Date.now());
var debutTemp = new Date(maCarte.dateDebut);

Loading…
Cancel
Save