ajout des nouveaux models

thierry
Tmadkaud 7 years ago
parent 552a779432
commit c4082dee79

@ -6,7 +6,7 @@ import * as firebase from 'firebase/app';
import { AngularFireAuth } from 'angularfire2/auth';
import { FormsModule } from '@angular/forms';
import { LoginService } from '../../services/login/login.service';
import { User } from '../../../User';
import { User } from '../../../models/User';
import {forEach} from "@angular/router/src/utils/collection";
import { AuthService } from '../../services/auth/auth.service';

@ -5,7 +5,7 @@
<div> ID: {{ (user | async)?.uid }} </div>
<div> Email: {{ (user | async)?.email }} </div>
<div> Salut {{localUser.firstname}} {{localUser.familyname}} {{localUser.uid}} surnommé {{localUser.username}} et bienvenue ! </div>
<div> tu es né le {{localUser.birthday.getDate()}}, ton email est {{localUser.email}}</div>
<div> tu es né le {{localUser.birthday}}, ton email est {{localUser.email}}</div>
<div *ngFor="let user of profileData | async">
User is {{user.firstname}}
</div>

@ -7,7 +7,7 @@ import * as firebase from 'firebase/app';
import { AngularFireAuth } from 'angularfire2/auth';
import { FormsModule } from '@angular/forms';
import { ProfilService } from '../../services/profil/profil.service';
import { User } from '../../../User';
import { User } from '../../../models/User';
import {forEach} from "@angular/router/src/utils/collection";
import { AuthService } from '../../services/auth/auth.service';

@ -26,7 +26,7 @@
<i class="fa fa-lock prefix grey-text"></i>
<input id="orangeForm-pass" type="password" [(ngModel)]="currentUser.password" placeholder="Your password">
</div>
<div class="md-form">
<input name="group2" type="radio" class="with-gap" id="client">
<label for="client">Client</label>

@ -9,7 +9,7 @@ import { FormsModule } from '@angular/forms';
import { RegisterService } from '../../services/register/register.service';
import { AuthService } from '../../services/auth/auth.service';
import { User } from '../../../User';
import { User } from '../../../models/User';
@Component({
selector: 'app-register',

@ -10,7 +10,7 @@ import * as firebase from 'firebase/app';
import { AngularFireAuth } from 'angularfire2/auth';
import { AngularFireDatabase, FirebaseListObservable } from 'angularfire2/database';
import { User } from '../../../User';
import { User } from '../../../models/User';
@ -33,7 +33,7 @@ export class AuthService {
userRef.set(userInfo);
this.router.navigate(['/login']);
// this.router.navigate(['/login']);
}
signIn(email: string, password: string) {

@ -2,33 +2,26 @@
export class CarteParrainage
{
uid: string;
avantageParrain: string;
avantageFilleul: string;
parrainID: string;
operationCommercialID: string;
dateDebut: Date;
dateFin: Date;
avantageCumule: string;
avantageRecuperer: string;
avantageXJC: string;
commercantID: string;
parrainID: string;
carteTemplate: string;
carteId: string;
status: string;
dateDebut: Date;
dateFin: Date;
constructor() {
this.uid = '';
this.avantageParrain = '';
this.avantageFilleul = '';
this.parrainID = '';
this.operationCommercialID = '';
this.dateDebut = new Date();
this.dateFin = new Date();
this.avantageCumule = '';
this.avantageRecuperer = '';
this.avantageXJC = '';
this.commercantID = '';
this.parrainID = '';
this.carteTemplate = '';
this.carteId = '';
this.status = '';
this.dateDebut = new Date();
this.dateFin = new Date();
}
/*
addParrain(addStatus, addEmail, addFamilyname, addFirstname) {

@ -0,0 +1,42 @@
export class Commercant
{
uid: string;
raisonSociale: string;
commercialName: string;
siret: string;
email: string;
emailVerified: boolean;
password:string;
dateInscription: Date;
status: string;
constructor() {
this.uid = '';
this.raisonSociale = '';
this.commercialName = '';
this.siret = '';
this.email = '';
this.emailVerified = false;
this.password = '';
this.dateInscription = new Date();
this.status = '';
}
/*
addParrain(addStatus, addEmail, addFamilyname, addFirstname) {
this.uid = '';
this.email = addEmail;
this.emailVerified = false;
this.password = '';
this.familyname = addFamilyname;
this.firstname = addFirstname;
this.username = '';
this.birthday = new Date();
this.idCard = '';
this.secretCode = '';
this.status = addStatus;
}
welcome() {
console.log('Hi, ' + this.firstname + '!');
}
*/
}

@ -0,0 +1,50 @@
export class OperationCommerciale
{
uid: string;
name: string;
idCommercant: string;
dateDebut: Date;
dateFin: Date;
carteTemplate: string;
avantageParrain: string;
deviseAvantageParrain: string;
tarifXJCParrain: string;
avantageFilleul: string;
deviseAvantageFilleul: string;
tarifXJCFilleul: string;
status: string;
constructor() {
this.uid = '';
this.name = '';
this.idCommercant = '';
this.dateDebut = new Date();
this.dateFin = new Date();
this.carteTemplate = '';
this.avantageParrain = '';
this.deviseAvantageParrain = '';
this.tarifXJCParrain = '';
this.avantageFilleul = '';
this.deviseAvantageFilleul = '';
this.tarifXJCFilleul = '';
this.status = '';
}
/*
addParrain(addStatus, addEmail, addFamilyname, addFirstname) {
this.uid = '';
this.email = addEmail;
this.emailVerified = false;
this.password = '';
this.familyname = addFamilyname;
this.firstname = addFirstname;
this.username = '';
this.birthday = new Date();
this.idCard = '';
this.secretCode = '';
this.status = addStatus;
}
welcome() {
console.log('Hi, ' + this.firstname + '!');
}
*/
}

@ -0,0 +1,48 @@
export class Parrain
{
uid: string;
familyname: string;
firstname: string;
sexe: string;
birthday: Date;
email: string;
emailVerified: boolean;
password:string;
telephone: string;
idCard: string;
secretCode: string;
status: string;
constructor() {
this.uid = '';
this.familyname = '';
this.firstname = '';
this.sexe = '';
this.birthday = new Date();
this.email = '';
this.emailVerified = false;
this.password = '';
this.telephone = '';
this.idCard = '';
this.secretCode = '';
this.status = '';
}
/*
addParrain(addStatus, addEmail, addFamilyname, addFirstname) {
this.uid = '';
this.email = addEmail;
this.emailVerified = false;
this.password = '';
this.familyname = addFamilyname;
this.firstname = addFirstname;
this.username = '';
this.birthday = new Date();
this.idCard = '';
this.secretCode = '';
this.status = addStatus;
}
welcome() {
console.log('Hi, ' + this.firstname + '!');
}
*/
}

@ -0,0 +1,40 @@
//nouvelle operation commercial / nouvelle carte
export class Scan
{
uid: string;
carteParrainID: string;
carteFilleulID: string;
dateCreation: Date;
valeurParrain: string;
valeurFilleul: string;
type: string;
constructor() {
this.uid = '';
this.carteParrainID = '';
this.carteFilleulID = '';
this.dateCreation = new Date();
this.valeurParrain = '';
this.valeurFilleul = '';
this.type = '';
}
/*
addParrain(addStatus, addEmail, addFamilyname, addFirstname) {
this.uid = '';
this.email = addEmail;
this.emailVerified = false;
this.password = '';
this.familyname = addFamilyname;
this.firstname = addFirstname;
this.username = '';
this.birthday = new Date();
this.idCard = '';
this.secretCode = '';
this.status = addStatus;
}
welcome() {
console.log('Hi, ' + this.firstname + '!');
}
*/
}

@ -1,45 +1,46 @@
export class User
{
uid: string;
email: string;
emailVerified: boolean;
password:string;
familyname: string;
firstname: string;
username: string;
birthday: Date;
idCard: string;
secretCode: string;
status: string;
constructor() {
this.uid = '';
this.email = '';
this.emailVerified = false;
this.password = '';
this.familyname = '';
this.firstname = '';
this.username = '';
this.birthday = new Date();
this.idCard = '';
this.secretCode = '';
this.status = '';
}
/*
addParrain(addStatus, addEmail, addFamilyname, addFirstname) {
this.uid = '';
this.email = addEmail;
this.emailVerified = false;
this.password = '';
this.familyname = addFamilyname;
this.firstname = addFirstname;
this.username = '';
this.birthday = new Date();
this.idCard = '';
this.secretCode = '';
this.status = addStatus;
}
welcome() {
console.log('Hi, ' + this.firstname + '!');
}
*/
}
export class User
{
uid: string;
email: string;
emailVerified: boolean;
password:string;
familyname: string;
firstname: string;
username: string;
birthday: Date;
idCard: string;
secretCode: string;
status: string;
constructor() {
this.uid = '';
this.email = '';
this.emailVerified = false;
this.password = '';
this.familyname = '';
this.firstname = '';
this.username = '';
this.birthday = new Date();
this.idCard = '';
this.secretCode = '';
this.status = '';
}
/*
addParrain(addStatus, addEmail, addFamilyname, addFirstname) {
this.uid = '';
this.email = addEmail;
this.emailVerified = false;
this.password = '';
this.familyname = addFamilyname;
this.firstname = addFirstname;
this.username = '';
this.birthday = new Date();
this.idCard = '';
this.secretCode = '';
this.status = addStatus;
}
welcome() {
console.log('Hi, ' + this.firstname + '!');
}
*/
}
Loading…
Cancel
Save