ajout image de fond Home

thierry
Tmadkaud 7 years ago
parent a18353e04f
commit b3298755b5

@ -40,5 +40,4 @@ export const AppRoutes = [
{path: 'ListScanEffecterAdmin/:idOp', component: ListScanEffecterComponent, canActivate: [AuthGuard]},
{path: 'ResetPassword', component: ResetPasswordComponent},
{path: 'Cgu', component: CguComponent}
];

@ -23,7 +23,7 @@
<ul>
<li> Reçoit tes cartes de parrainage ici</li>
<li> Partage-les à tes amis via Facebook, Whatsapp, ect.</li>
<li> Gagne de l'argent chaque fois qu'un de tes amis présente ta carte lors de ses achats</li>
<li> Gagne des avantages chaque fois qu'un de tes amis présente ta carte lors de ses achats</li>
</ul>
<p>N'attends plus, et rends toi vite chez un des commerçcant affiliés de ton choix pour obtenir ta </p>
<p>carte de parrainage !</p>

@ -3,7 +3,7 @@
<header class="full-height">
<!-- Intro Section -->
<div class="col-md-12 col-sm-12 mb-3 view hm-white-light jarallax" id="intro" data-jarallax='{"speed": 0.2}' style="background-image: url(https://mdbootstrap.com/img/Photos/Others/img%20%2844%29.jpg); background-attachment: fixed;">
<div class="col-md-12 col-sm-12 mb-3 view hm-white-light jarallax" id="intro" data-jarallax='{"speed": 0.2}' style="background-image: url(https://firebasestorage.googleapis.com/v0/b/webappparrain.appspot.com/o/ImgApp%2Fbackground%20image.jpg?alt=media&token=69e1f850-8467-4213-89ac-d6606f209d23); background-attachment: fixed;">
<div class="full-bg-img">
<div class="container flex-center">
<div class="row pt-5 mt-3">

@ -20,7 +20,7 @@ export class HomeComponent implements OnInit {
try{
opComService.updateCarteEtOpCom();
this.commList = this.opComService.getCommercants();
this.commList.subscribe(tabCommercant => console.log(tabCommercant));
this.commList.subscribe(tabCommercant => console.log(''));
}catch (e){
console.log(e);
}

@ -356,6 +356,7 @@ export class EnvoyerCarteComponent implements OnInit, OnDestroy {
orderByChild: 'operationCommercialCarte/uid',
equalTo: this.opComm.uid
}}).subscribe(cartes => {
this.cartePars = cartes;
for (let i = 0; i < cartes.length; i++){
if (cartes[i].parrainCarte.uid === parUid){

@ -70,8 +70,86 @@ export class OpCommercialService {
);
}
updateOpCommStatus() {
const opComAll = this.getOpComs();
getScansOP(opCommUid): FirebaseListObservable<any> {
return this.afDb.list('/Scan/', {
query: {
orderByChild: 'operationCommercial/uid',
equalTo: opCommUid
}
}
);
}
updateNbCarteOpCom(opCommUid, nbCartesOpCom) {
nbCartesOpCom.subscribe(tabNbCartesOpCom => {
if (tabNbCartesOpCom.length > 0) {
console.log('');
// const upCartOpRef = firebase.database().ref().child('OperationCommercial').child('-KwlMJtE2d3WfrD5n94s').child('nbEnvoie');
// upCartOpRef.set(tabNbCartesOpCom.length);
// console.log('tabNbCartesOpCom.length: ' + tabNbCartesOpCom.length);
// const upCartOpRef = firebase.database().ref().child('OperationCommercial').child(opCommUid).child('nbEnvoie');
// upCartOpRef.set(tabNbCartesOpCom.length);
}else{
// console.log('tous mettre a 0');
console.log('');
// const upCartOpRef = firebase.database().ref().child('OperationCommercial').child('-KwlMJtE2d3WfrD5n94s').child('nbEnvoie');
// upCartOpRef.set('');
// const upCartOpRef = firebase.database().ref().child('OperationCommercial').child(opCommUid).child('nbEnvoie');
// upCartOpRef.set('');
}
});
}
updateNbScanOpCom(opCommUid, scansOpCom) {
scansOpCom.subscribe(tabScansOpCom => {
if (tabScansOpCom.length > 0) {
// const uptabcanOpComOpRef = firebase.database().ref().child('OperationCommercial').child(opCommUid).child('nbEnvoie');
// upCartOpRef.set(tabCartesOpCom.length);
for (let i = 0; i < tabScansOpCom.length; ++i) {
//console.log('tabcansOpCom.length: ' + tabScansOpCom.length + ' ' + tabScansOpCom[i].name);
console.log('');
}
}else{
console.log('');
// const upCartOpRef = firebase.database().ref().child('OperationCommercial').child(opCommUid).child('nbEnvoie');
// upCartOpRef.set('');
}
});
}
updateOpCommEnvScanDebi(opComAll) {
opComAll.subscribe(tabOpComs => {
if (tabOpComs.length > 0) {
for (let i = 0; i < tabOpComs.length; ++i) {
if (tabOpComs[i].name !== '') {
let monOpCom = tabOpComs[i];
if (monOpCom !== undefined) {
let nbCartesOpCom = this.getCartesOP(tabOpComs[i].uid);
let scansOpCom = this.getScansOP(tabOpComs[i].uid);
nbCartesOpCom.subscribe(tab => {
const upCartOpRef = firebase.database().ref().child('OperationCommercial').child(tabOpComs[i].uid).child('nbEnvoie');
let testEnv = (tab.length === 0 ? '' : tab.length.toString());
upCartOpRef.set(testEnv);
});
scansOpCom.subscribe(tabS => {
const upScanOpRef = firebase.database().ref().child('OperationCommercial').child(tabOpComs[i].uid).child('nbScan');
let testScan = (tabS.length === 0 ? '' : tabS.length.toString());
upScanOpRef.set(testScan);
});
// this.updateNbCarteOpCom(tabOpComs[i].uid, nbCartesOpCom);
// this.updateNbScanOpCom(tabOpComs[i].uid, scansOpCom);
}
}
}
}
});
}
updateOpCommStatus(opComAll) {
opComAll.subscribe(tabOpComs => {
if (tabOpComs.length > 0) {
for (let i = 0; i < tabOpComs.length ; ++i){
@ -106,22 +184,19 @@ export class OpCommercialService {
}
}
});
opComAll.forEach(utilisateur => {
utilisateur.forEach(monOpCom => {
});
});
}
updateCarteEtOpCom() {
this.updateOpCommStatus();
this.updateCarteStatus();
}
updateCarteStatus(){
const opComAll = this.getOpComs();
const carteAll = this.getCartes();
this.updateOpCommStatus(opComAll);
this.updateCarteStatus(carteAll);
this.updateOpCommEnvScanDebi(opComAll);
}
updateCarteStatus(carteAll){
carteAll.subscribe(tabCarte => {
if (tabCarte.length > 0) {
for (let i = 0; i < tabCarte.length ; ++i){
@ -154,11 +229,6 @@ export class OpCommercialService {
}
}
});
carteAll.forEach(utilisateur => {
utilisateur.forEach(maCarte => {
});
});
}
saveOpComm(user: firebase.User, infoOpCom: OperationCommerciale) {

Loading…
Cancel
Save