diff --git a/src/app/admin/navbar-admin/navbar-admin.component.html b/src/app/admin/navbar-admin/navbar-admin.component.html new file mode 100644 index 0000000..563792a --- /dev/null +++ b/src/app/admin/navbar-admin/navbar-admin.component.html @@ -0,0 +1,32 @@ + diff --git a/src/app/utils/components/nav-bar/nav-bar.component.scss b/src/app/admin/navbar-admin/navbar-admin.component.scss similarity index 100% rename from src/app/utils/components/nav-bar/nav-bar.component.scss rename to src/app/admin/navbar-admin/navbar-admin.component.scss diff --git a/src/app/admin/navbar-admin/navbar-admin.component.spec.ts b/src/app/admin/navbar-admin/navbar-admin.component.spec.ts new file mode 100644 index 0000000..44f2cf6 --- /dev/null +++ b/src/app/admin/navbar-admin/navbar-admin.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NavbarAdminComponent } from './navbar-admin.component'; + +describe('NavbarAdminComponent', () => { + let component: NavbarAdminComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ NavbarAdminComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(NavbarAdminComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/admin/navbar-admin/navbar-admin.component.ts b/src/app/admin/navbar-admin/navbar-admin.component.ts new file mode 100644 index 0000000..20ca54c --- /dev/null +++ b/src/app/admin/navbar-admin/navbar-admin.component.ts @@ -0,0 +1,18 @@ +import { Component, OnInit } from '@angular/core'; +import {ThemeService} from "../../utils/services/theme/theme.service"; + +@Component({ + selector: 'app-navbar-admin', + templateUrl: './navbar-admin.component.html', + styleUrls: ['./navbar-admin.component.scss'] +}) +export class NavbarAdminComponent +{ + urlImage: string = "" ; + + constructor( public themeService: ThemeService ) { } + + onDeconnexion(): void { + + } +} diff --git a/src/app/advertiser/drag-and-drop/drag-and-drop.component.html b/src/app/advertiser/manageAds/drag-and-drop/drag-and-drop.component.html similarity index 87% rename from src/app/advertiser/drag-and-drop/drag-and-drop.component.html rename to src/app/advertiser/manageAds/drag-and-drop/drag-and-drop.component.html index f173baa..1a08593 100644 --- a/src/app/advertiser/drag-and-drop/drag-and-drop.component.html +++ b/src/app/advertiser/manageAds/drag-and-drop/drag-and-drop.component.html @@ -1,15 +1,17 @@

Images

- +
Glisser déposer
ou
Cliquer pour selectionner
+ info +
- file + file

{{ file?.name }} diff --git a/src/app/advertiser/drag-and-drop/drag-and-drop.component.scss b/src/app/advertiser/manageAds/drag-and-drop/drag-and-drop.component.scss similarity index 100% rename from src/app/advertiser/drag-and-drop/drag-and-drop.component.scss rename to src/app/advertiser/manageAds/drag-and-drop/drag-and-drop.component.scss diff --git a/src/app/advertiser/drag-and-drop/drag-and-drop.component.spec.ts b/src/app/advertiser/manageAds/drag-and-drop/drag-and-drop.component.spec.ts similarity index 100% rename from src/app/advertiser/drag-and-drop/drag-and-drop.component.spec.ts rename to src/app/advertiser/manageAds/drag-and-drop/drag-and-drop.component.spec.ts diff --git a/src/app/advertiser/drag-and-drop/drag-and-drop.component.ts b/src/app/advertiser/manageAds/drag-and-drop/drag-and-drop.component.ts similarity index 100% rename from src/app/advertiser/drag-and-drop/drag-and-drop.component.ts rename to src/app/advertiser/manageAds/drag-and-drop/drag-and-drop.component.ts diff --git a/src/app/advertiser/bar-tags/bar-tags.component.html b/src/app/advertiser/manageAds/input-tags/input-tags.component.html similarity index 100% rename from src/app/advertiser/bar-tags/bar-tags.component.html rename to src/app/advertiser/manageAds/input-tags/input-tags.component.html diff --git a/src/app/advertiser/bar-tags/bar-tags.component.scss b/src/app/advertiser/manageAds/input-tags/input-tags.component.scss similarity index 100% rename from src/app/advertiser/bar-tags/bar-tags.component.scss rename to src/app/advertiser/manageAds/input-tags/input-tags.component.scss diff --git a/src/app/advertiser/bar-tags/bar-tags.component.spec.ts b/src/app/advertiser/manageAds/input-tags/input-tags.component.spec.ts similarity index 60% rename from src/app/advertiser/bar-tags/bar-tags.component.spec.ts rename to src/app/advertiser/manageAds/input-tags/input-tags.component.spec.ts index 410f668..4156fd7 100644 --- a/src/app/advertiser/bar-tags/bar-tags.component.spec.ts +++ b/src/app/advertiser/manageAds/input-tags/input-tags.component.spec.ts @@ -1,20 +1,20 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { BarTagsComponent } from './bar-tags.component'; +import { InputTagsComponent } from './input-tags.component'; describe('BarTagsComponent', () => { - let component: BarTagsComponent; - let fixture: ComponentFixture; + let component: InputTagsComponent; + let fixture: ComponentFixture; beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ BarTagsComponent ] + declarations: [ InputTagsComponent ] }) .compileComponents(); }); beforeEach(() => { - fixture = TestBed.createComponent(BarTagsComponent); + fixture = TestBed.createComponent(InputTagsComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/src/app/advertiser/bar-tags/bar-tags.component.ts b/src/app/advertiser/manageAds/input-tags/input-tags.component.ts similarity index 68% rename from src/app/advertiser/bar-tags/bar-tags.component.ts rename to src/app/advertiser/manageAds/input-tags/input-tags.component.ts index c76b9ba..71c0cd5 100644 --- a/src/app/advertiser/bar-tags/bar-tags.component.ts +++ b/src/app/advertiser/manageAds/input-tags/input-tags.component.ts @@ -5,17 +5,17 @@ import {Observable} from "rxjs"; import {map, startWith} from "rxjs/operators"; import {MatChipInputEvent} from "@angular/material/chips"; import {MatAutocompleteSelectedEvent} from "@angular/material/autocomplete"; -import {FictitiousDatasService} from "../../utils/services/fictitiousDatas/fictitious-datas.service"; -import {MessageService} from "../../utils/services/message/message.service"; +import {FictitiousDatasService} from "../../../utils/services/fictitiousDatas/fictitious-datas.service"; +import {MessageService} from "../../../utils/services/message/message.service"; @Component({ - selector: 'app-bar-tags', - templateUrl: './bar-tags.component.html', - styleUrls: ['./bar-tags.component.scss'] + selector: 'app-input-tags', + templateUrl: './input-tags.component.html', + styleUrls: ['./input-tags.component.scss'] }) -export class BarTagsComponent implements OnInit +export class InputTagsComponent implements OnInit { selectable = true; removable = true; @@ -41,30 +41,19 @@ export class BarTagsComponent implements OnInit // --- FAUX CODE --- this.allTags = this.fictitiousDatasService.getTags(); this.allTags.sort(); - - // --- VRAI CODE --- - /* - this.messageService - .sendMessage("advertiser/get/tags", null) - .subscribe( retour => { - - if(retour.status === "error") console.log(retour); - else { - this.allTags = retour.data.tags; - this.allTags.sort(); - } - }); - */ } add(event: MatChipInputEvent): void { const value = (event.value || '').trim(); - if (value) this.myTags.push(value); // Add our fruit - event.chipInput!.clear(); // Clear the input value - this.formControl.setValue(null); - this.eventEmitter.emit(this.myTags); + if (value && (this.allTags.indexOf(value) !== -1)) + { + this.myTags.push(value); + event.chipInput!.clear(); + this.formControl.setValue(null); + this.eventEmitter.emit(this.myTags); + } } diff --git a/src/app/advertiser/page-advertiser/page-advertiser.component.html b/src/app/advertiser/manageAds/page-advertiser/page-advertiser.component.html similarity index 98% rename from src/app/advertiser/page-advertiser/page-advertiser.component.html rename to src/app/advertiser/manageAds/page-advertiser/page-advertiser.component.html index 58794ce..2603219 100644 --- a/src/app/advertiser/page-advertiser/page-advertiser.component.html +++ b/src/app/advertiser/manageAds/page-advertiser/page-advertiser.component.html @@ -2,7 +2,7 @@
-

+

diff --git a/src/app/advertiser/page-advertiser/page-advertiser.component.scss b/src/app/advertiser/manageAds/page-advertiser/page-advertiser.component.scss similarity index 100% rename from src/app/advertiser/page-advertiser/page-advertiser.component.scss rename to src/app/advertiser/manageAds/page-advertiser/page-advertiser.component.scss diff --git a/src/app/advertiser/page-advertiser/page-advertiser.component.spec.ts b/src/app/advertiser/manageAds/page-advertiser/page-advertiser.component.spec.ts similarity index 100% rename from src/app/advertiser/page-advertiser/page-advertiser.component.spec.ts rename to src/app/advertiser/manageAds/page-advertiser/page-advertiser.component.spec.ts diff --git a/src/app/advertiser/page-advertiser/page-advertiser.component.ts b/src/app/advertiser/manageAds/page-advertiser/page-advertiser.component.ts similarity index 95% rename from src/app/advertiser/page-advertiser/page-advertiser.component.ts rename to src/app/advertiser/manageAds/page-advertiser/page-advertiser.component.ts index 939ff63..429f3eb 100644 --- a/src/app/advertiser/page-advertiser/page-advertiser.component.ts +++ b/src/app/advertiser/manageAds/page-advertiser/page-advertiser.component.ts @@ -1,9 +1,9 @@ import {Component, OnInit, ViewChild} from '@angular/core'; import {MatSort} from "@angular/material/sort"; -import {ThemeService} from "../../utils/services/theme/theme.service"; -import {FictitiousDatasService} from "../../utils/services/fictitiousDatas/fictitious-datas.service"; +import {ThemeService} from "../../../utils/services/theme/theme.service"; +import {FictitiousDatasService} from "../../../utils/services/fictitiousDatas/fictitious-datas.service"; import {MatTableDataSource} from "@angular/material/table"; -import {Advert} from "../../utils/interfaces/advert"; +import {Advert} from "../../../utils/interfaces/advert"; import {MatDialog} from "@angular/material/dialog"; import {PopupAddOrUpdateAdComponent} from "../popup-add-or-update-ad/popup-add-or-update-ad.component"; import {MatSnackBar} from "@angular/material/snack-bar"; diff --git a/src/app/advertiser/popup-add-or-update-ad/popup-add-or-update-ad.component.html b/src/app/advertiser/manageAds/popup-add-or-update-ad/popup-add-or-update-ad.component.html similarity index 92% rename from src/app/advertiser/popup-add-or-update-ad/popup-add-or-update-ad.component.html rename to src/app/advertiser/manageAds/popup-add-or-update-ad/popup-add-or-update-ad.component.html index 86f8a65..e54d441 100644 --- a/src/app/advertiser/popup-add-or-update-ad/popup-add-or-update-ad.component.html +++ b/src/app/advertiser/manageAds/popup-add-or-update-ad/popup-add-or-update-ad.component.html @@ -18,7 +18,7 @@ - + diff --git a/src/app/advertiser/popup-add-or-update-ad/popup-add-or-update-ad.component.scss b/src/app/advertiser/manageAds/popup-add-or-update-ad/popup-add-or-update-ad.component.scss similarity index 100% rename from src/app/advertiser/popup-add-or-update-ad/popup-add-or-update-ad.component.scss rename to src/app/advertiser/manageAds/popup-add-or-update-ad/popup-add-or-update-ad.component.scss diff --git a/src/app/advertiser/popup-add-or-update-ad/popup-add-or-update-ad.component.spec.ts b/src/app/advertiser/manageAds/popup-add-or-update-ad/popup-add-or-update-ad.component.spec.ts similarity index 100% rename from src/app/advertiser/popup-add-or-update-ad/popup-add-or-update-ad.component.spec.ts rename to src/app/advertiser/manageAds/popup-add-or-update-ad/popup-add-or-update-ad.component.spec.ts diff --git a/src/app/advertiser/popup-add-or-update-ad/popup-add-or-update-ad.component.ts b/src/app/advertiser/manageAds/popup-add-or-update-ad/popup-add-or-update-ad.component.ts similarity index 92% rename from src/app/advertiser/popup-add-or-update-ad/popup-add-or-update-ad.component.ts rename to src/app/advertiser/manageAds/popup-add-or-update-ad/popup-add-or-update-ad.component.ts index d109b04..9344241 100644 --- a/src/app/advertiser/popup-add-or-update-ad/popup-add-or-update-ad.component.ts +++ b/src/app/advertiser/manageAds/popup-add-or-update-ad/popup-add-or-update-ad.component.ts @@ -1,8 +1,8 @@ import {Component, Inject, OnInit} from '@angular/core'; -import {Advert} from "../../utils/interfaces/advert"; +import {Advert} from "../../../utils/interfaces/advert"; import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog"; -import {MessageService} from "../../utils/services/message/message.service"; -import {ThemeService} from "../../utils/services/theme/theme.service"; +import {MessageService} from "../../../utils/services/message/message.service"; +import {ThemeService} from "../../../utils/services/theme/theme.service"; const ADVERT_VIDE = { @@ -82,7 +82,7 @@ export class PopupAddOrUpdateAdComponent implements OnInit } - onEventBarTags(myTags: string[]): void + onEventInputTags(myTags: string[]): void { this.advert.tags = myTags; } diff --git a/src/app/advertiser/popup-delete-ad/popup-delete-ad.component.html b/src/app/advertiser/manageAds/popup-delete-ad/popup-delete-ad.component.html similarity index 100% rename from src/app/advertiser/popup-delete-ad/popup-delete-ad.component.html rename to src/app/advertiser/manageAds/popup-delete-ad/popup-delete-ad.component.html diff --git a/src/app/advertiser/popup-delete-ad/popup-delete-ad.component.scss b/src/app/advertiser/manageAds/popup-delete-ad/popup-delete-ad.component.scss similarity index 100% rename from src/app/advertiser/popup-delete-ad/popup-delete-ad.component.scss rename to src/app/advertiser/manageAds/popup-delete-ad/popup-delete-ad.component.scss diff --git a/src/app/advertiser/popup-delete-ad/popup-delete-ad.component.spec.ts b/src/app/advertiser/manageAds/popup-delete-ad/popup-delete-ad.component.spec.ts similarity index 100% rename from src/app/advertiser/popup-delete-ad/popup-delete-ad.component.spec.ts rename to src/app/advertiser/manageAds/popup-delete-ad/popup-delete-ad.component.spec.ts diff --git a/src/app/advertiser/popup-delete-ad/popup-delete-ad.component.ts b/src/app/advertiser/manageAds/popup-delete-ad/popup-delete-ad.component.ts similarity index 89% rename from src/app/advertiser/popup-delete-ad/popup-delete-ad.component.ts rename to src/app/advertiser/manageAds/popup-delete-ad/popup-delete-ad.component.ts index 0dca352..2c5acc4 100644 --- a/src/app/advertiser/popup-delete-ad/popup-delete-ad.component.ts +++ b/src/app/advertiser/manageAds/popup-delete-ad/popup-delete-ad.component.ts @@ -1,7 +1,7 @@ import {Component, Inject, OnInit} from '@angular/core'; import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog"; -import {MessageService} from "../../utils/services/message/message.service"; -import {Advert} from "../../utils/interfaces/advert"; +import {MessageService} from "../../../utils/services/message/message.service"; +import {Advert} from "../../../utils/interfaces/advert"; diff --git a/src/app/advertiser/popup-visualize-ad/popup-visualize-ad.component.html b/src/app/advertiser/manageAds/popup-visualize-ad/popup-visualize-ad.component.html similarity index 100% rename from src/app/advertiser/popup-visualize-ad/popup-visualize-ad.component.html rename to src/app/advertiser/manageAds/popup-visualize-ad/popup-visualize-ad.component.html diff --git a/src/app/advertiser/popup-visualize-ad/popup-visualize-ad.component.scss b/src/app/advertiser/manageAds/popup-visualize-ad/popup-visualize-ad.component.scss similarity index 100% rename from src/app/advertiser/popup-visualize-ad/popup-visualize-ad.component.scss rename to src/app/advertiser/manageAds/popup-visualize-ad/popup-visualize-ad.component.scss diff --git a/src/app/advertiser/popup-visualize-ad/popup-visualize-ad.component.spec.ts b/src/app/advertiser/manageAds/popup-visualize-ad/popup-visualize-ad.component.spec.ts similarity index 100% rename from src/app/advertiser/popup-visualize-ad/popup-visualize-ad.component.spec.ts rename to src/app/advertiser/manageAds/popup-visualize-ad/popup-visualize-ad.component.spec.ts diff --git a/src/app/advertiser/popup-visualize-ad/popup-visualize-ad.component.ts b/src/app/advertiser/manageAds/popup-visualize-ad/popup-visualize-ad.component.ts similarity index 90% rename from src/app/advertiser/popup-visualize-ad/popup-visualize-ad.component.ts rename to src/app/advertiser/manageAds/popup-visualize-ad/popup-visualize-ad.component.ts index fb2183d..28cce22 100644 --- a/src/app/advertiser/popup-visualize-ad/popup-visualize-ad.component.ts +++ b/src/app/advertiser/manageAds/popup-visualize-ad/popup-visualize-ad.component.ts @@ -1,7 +1,7 @@ import {Component, Inject, OnInit} from '@angular/core'; -import {ThemeService} from "../../utils/services/theme/theme.service"; +import {ThemeService} from "../../../utils/services/theme/theme.service"; import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from "@angular/material/dialog"; -import {Advert} from "../../utils/interfaces/advert"; +import {Advert} from "../../../utils/interfaces/advert"; import {PopupVisualizeImagesComponent} from "../popup-visualize-images/popup-visualize-images.component"; @Component({ diff --git a/src/app/advertiser/popup-visualize-images/popup-visualize-images.component.html b/src/app/advertiser/manageAds/popup-visualize-images/popup-visualize-images.component.html similarity index 100% rename from src/app/advertiser/popup-visualize-images/popup-visualize-images.component.html rename to src/app/advertiser/manageAds/popup-visualize-images/popup-visualize-images.component.html diff --git a/src/app/advertiser/popup-visualize-images/popup-visualize-images.component.scss b/src/app/advertiser/manageAds/popup-visualize-images/popup-visualize-images.component.scss similarity index 100% rename from src/app/advertiser/popup-visualize-images/popup-visualize-images.component.scss rename to src/app/advertiser/manageAds/popup-visualize-images/popup-visualize-images.component.scss diff --git a/src/app/advertiser/popup-visualize-images/popup-visualize-images.component.spec.ts b/src/app/advertiser/manageAds/popup-visualize-images/popup-visualize-images.component.spec.ts similarity index 100% rename from src/app/advertiser/popup-visualize-images/popup-visualize-images.component.spec.ts rename to src/app/advertiser/manageAds/popup-visualize-images/popup-visualize-images.component.spec.ts diff --git a/src/app/advertiser/popup-visualize-images/popup-visualize-images.component.ts b/src/app/advertiser/manageAds/popup-visualize-images/popup-visualize-images.component.ts similarity index 92% rename from src/app/advertiser/popup-visualize-images/popup-visualize-images.component.ts rename to src/app/advertiser/manageAds/popup-visualize-images/popup-visualize-images.component.ts index a019371..e746c57 100644 --- a/src/app/advertiser/popup-visualize-images/popup-visualize-images.component.ts +++ b/src/app/advertiser/manageAds/popup-visualize-images/popup-visualize-images.component.ts @@ -1,6 +1,6 @@ import {Component, Inject, OnInit} from '@angular/core'; import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from "@angular/material/dialog"; -import {ThemeService} from "../../utils/services/theme/theme.service"; +import {ThemeService} from "../../../utils/services/theme/theme.service"; @Component({ selector: 'app-popup-visualize-images', diff --git a/src/app/advertiser/myProfil/page-profil-advertiser/page-profil-advertiser.component.html b/src/app/advertiser/myProfil/page-profil-advertiser/page-profil-advertiser.component.html new file mode 100644 index 0000000..725e8d4 --- /dev/null +++ b/src/app/advertiser/myProfil/page-profil-advertiser/page-profil-advertiser.component.html @@ -0,0 +1 @@ +

page-profil-advertiser works!

diff --git a/src/app/pourLes3Roles/register/popup-confirmation/popup-confirmation.component.scss b/src/app/advertiser/myProfil/page-profil-advertiser/page-profil-advertiser.component.scss similarity index 100% rename from src/app/pourLes3Roles/register/popup-confirmation/popup-confirmation.component.scss rename to src/app/advertiser/myProfil/page-profil-advertiser/page-profil-advertiser.component.scss diff --git a/src/app/advertiser/myProfil/page-profil-advertiser/page-profil-advertiser.component.spec.ts b/src/app/advertiser/myProfil/page-profil-advertiser/page-profil-advertiser.component.spec.ts new file mode 100644 index 0000000..ebb9617 --- /dev/null +++ b/src/app/advertiser/myProfil/page-profil-advertiser/page-profil-advertiser.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PageProfilAdvertiserComponent } from './page-profil-advertiser.component'; + +describe('PageProfilAdvertiserComponent', () => { + let component: PageProfilAdvertiserComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ PageProfilAdvertiserComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(PageProfilAdvertiserComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/advertiser/myProfil/page-profil-advertiser/page-profil-advertiser.component.ts b/src/app/advertiser/myProfil/page-profil-advertiser/page-profil-advertiser.component.ts new file mode 100644 index 0000000..60db8d3 --- /dev/null +++ b/src/app/advertiser/myProfil/page-profil-advertiser/page-profil-advertiser.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-page-profil-advertiser', + templateUrl: './page-profil-advertiser.component.html', + styleUrls: ['./page-profil-advertiser.component.scss'] +}) +export class PageProfilAdvertiserComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/advertiser/myProfil/popup-update-advertiser/popup-update-advertiser.component.html b/src/app/advertiser/myProfil/popup-update-advertiser/popup-update-advertiser.component.html new file mode 100644 index 0000000..3c79c22 --- /dev/null +++ b/src/app/advertiser/myProfil/popup-update-advertiser/popup-update-advertiser.component.html @@ -0,0 +1 @@ +

popup-update-advertiser works!

diff --git a/src/app/advertiser/myProfil/popup-update-advertiser/popup-update-advertiser.component.scss b/src/app/advertiser/myProfil/popup-update-advertiser/popup-update-advertiser.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/advertiser/myProfil/popup-update-advertiser/popup-update-advertiser.component.spec.ts b/src/app/advertiser/myProfil/popup-update-advertiser/popup-update-advertiser.component.spec.ts new file mode 100644 index 0000000..dde7ef9 --- /dev/null +++ b/src/app/advertiser/myProfil/popup-update-advertiser/popup-update-advertiser.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PopupUpdateAdvertiserComponent } from './popup-update-advertiser.component'; + +describe('PopupUpdateAdvertiserComponent', () => { + let component: PopupUpdateAdvertiserComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ PopupUpdateAdvertiserComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(PopupUpdateAdvertiserComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/advertiser/myProfil/popup-update-advertiser/popup-update-advertiser.component.ts b/src/app/advertiser/myProfil/popup-update-advertiser/popup-update-advertiser.component.ts new file mode 100644 index 0000000..375a3f5 --- /dev/null +++ b/src/app/advertiser/myProfil/popup-update-advertiser/popup-update-advertiser.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-popup-update-advertiser', + templateUrl: './popup-update-advertiser.component.html', + styleUrls: ['./popup-update-advertiser.component.scss'] +}) +export class PopupUpdateAdvertiserComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/advertiser/navbar-advertiser/navbar-advertiser.component.html b/src/app/advertiser/navbar-advertiser/navbar-advertiser.component.html new file mode 100644 index 0000000..03965d4 --- /dev/null +++ b/src/app/advertiser/navbar-advertiser/navbar-advertiser.component.html @@ -0,0 +1,23 @@ + diff --git a/src/app/advertiser/navbar-advertiser/navbar-advertiser.component.scss b/src/app/advertiser/navbar-advertiser/navbar-advertiser.component.scss new file mode 100644 index 0000000..cd9cc96 --- /dev/null +++ b/src/app/advertiser/navbar-advertiser/navbar-advertiser.component.scss @@ -0,0 +1,80 @@ +.navbar { + background-color: black; + height: 75px; + font-size: x-large; + color: white; +} + + +.navbar-expand-lg { + border-bottom: solid; + border-color: white; + border-bottom-width: 2px; +} + + +// PolyNotFound +.navbar-brand { + font-family: cursive; + font-weight: bold; + //font-style: oblique 90deg; + font-size: xxx-large; + margin-left: 30px; + color: white; +} + + +// Recherche, Mes Playlists, Historique +.nav-link { + color: white; +} +.nav-link:hover { + color: grey; +} + + +// Bonton deconnexion +.btnDeconnexion { + font-size: x-large; + margin: 0px 10px 0px 10px +} +.btnDeconnexion:hover { + color: grey; +} + + +.monLi { + margin: 0px 10px 0px 10px; +} + + +img { + border: solid 2px white; + border-radius: 50px; + margin: 0px 10px 0px 15px; + width: 50px; + height: 50px; +} +img:hover { + cursor: pointer; +} + + +// -------------------------------------------------------------------- + + +::ng-deep .mat-slide-toggle-thumb { + background-color: #c8c8c8; +} + +::ng-deep .mat-slide-toggle-bar { + background-color: #ffffff; +} + +::ng-deep .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-thumb { + background-color: #ffffff; +} + +::ng-deep .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar { + background-color: #646464; +} diff --git a/src/app/advertiser/navbar-advertiser/navbar-advertiser.component.spec.ts b/src/app/advertiser/navbar-advertiser/navbar-advertiser.component.spec.ts new file mode 100644 index 0000000..fb00a09 --- /dev/null +++ b/src/app/advertiser/navbar-advertiser/navbar-advertiser.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NavbarAdvertiserComponent } from './navbar-advertiser.component'; + +describe('NavbarAdvertiserComponent', () => { + let component: NavbarAdvertiserComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ NavbarAdvertiserComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(NavbarAdvertiserComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/advertiser/navbar-advertiser/navbar-advertiser.component.ts b/src/app/advertiser/navbar-advertiser/navbar-advertiser.component.ts new file mode 100644 index 0000000..b7d1b1f --- /dev/null +++ b/src/app/advertiser/navbar-advertiser/navbar-advertiser.component.ts @@ -0,0 +1,17 @@ +import { Component } from '@angular/core'; +import {ThemeService} from "../../utils/services/theme/theme.service"; + +@Component({ + selector: 'app-navbar-advertiser', + templateUrl: './navbar-advertiser.component.html', + styleUrls: ['./navbar-advertiser.component.scss'] +}) +export class NavbarAdvertiserComponent +{ + urlImage: string = "" ; + + constructor( public themeService: ThemeService ) { } + + onDeconnexion(): void {} + +} diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 23ea54c..cf69d56 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,33 +1,34 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; -import {PageConnexionComponent} from './pourLes3Roles/page-connexion/page-connexion.component'; -import {PageRegisterComponent} from './pourLes3Roles/register/page-register/page-register.component'; +import {PageLoginComponent} from './beforeConnexion/login/page-login/page-login.component'; +import {PageRegisterComponent} from "./beforeConnexion/register/page-register/page-register.component"; import {PageSearchComponent} from "./user/search/page-search/page-search.component"; import {PageMyPlaylistsComponent} from "./user/myPlaylists/page-my-playlists/page-my-playlists.component"; import {PageHistoryUserComponent} from "./user/history/page-history-user/page-history-user.component"; -import {PageMyProfilComponent} from "./utils/components/myProfil/page-my-profil/page-my-profil.component"; -import {PageAdvertiserComponent} from "./advertiser/page-advertiser/page-advertiser.component"; +import {PageAdvertiserComponent} from "./advertiser/manageAds/page-advertiser/page-advertiser.component"; +import {PageProfilUserComponent} from "./user/myProfil/page-profil-user/page-profil-user.component"; +import {PageProfilAdvertiserComponent} from "./advertiser/myProfil/page-profil-advertiser/page-profil-advertiser.component"; const routes: Routes = [ - { path: '', component: PageConnexionComponent }, - { path: 'login', component: PageConnexionComponent }, + { path: '', component: PageLoginComponent }, + { path: 'login', component: PageLoginComponent }, { path: 'register', component: PageRegisterComponent }, { path: 'user', component: PageSearchComponent }, { path: 'user/search', component: PageSearchComponent }, { path: 'user/myPlaylists', component: PageMyPlaylistsComponent }, { path: 'user/history', component: PageHistoryUserComponent }, - { path: 'user/myProfil', component: PageMyProfilComponent }, + { path: 'user/myProfil', component: PageProfilUserComponent }, { path: 'advertiser', component: PageAdvertiserComponent }, - { path: 'advertiser/myProfil', component: PageMyProfilComponent }, + { path: 'advertiser/myProfil', component: PageProfilAdvertiserComponent }, /* - { path: 'admin/userList', component: PageConnexionComponent }, - { path: 'admin/addUser', component: PageConnexionComponent }, - { path: 'admin/adList', component: PageConnexionComponent }, - { path: 'admin/myProfil', component: PageMyProfilComponent } + { path: 'admin/userList', component: PageLoginComponent }, + { path: 'admin/addUser', component: PageLoginComponent }, + { path: 'admin/adList', component: PageLoginComponent }, + { path: 'admin/myProfil', component: PageProfilAdminComponent } */ ]; diff --git a/src/app/app.module.ts b/src/app/app.module.ts index b8dc48d..7d318f6 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -3,15 +3,14 @@ import { BrowserModule } from '@angular/platform-browser'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; -import { PageConnexionComponent } from './pourLes3Roles/page-connexion/page-connexion.component'; -import { PageRegisterComponent } from './pourLes3Roles/register/page-register/page-register.component'; -import { NavBarComponent } from './utils/components/nav-bar/nav-bar.component'; +import { PageLoginComponent } from './beforeConnexion/login/page-login/page-login.component'; +import { PageRegisterComponent } from './beforeConnexion/register/page-register/page-register.component'; import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; import {MatSlideToggleModule} from '@angular/material/slide-toggle'; import {FormsModule, ReactiveFormsModule} from "@angular/forms"; import { PageSearchComponent } from './user/search/page-search/page-search.component'; import {HttpClientModule} from "@angular/common/http"; -import { PopupConfirmationComponent } from './pourLes3Roles/register/popup-confirmation/popup-confirmation.component'; +import { PopupConfirmationComponent } from './beforeConnexion/register/popup-confirmation/popup-confirmation.component'; import {MatDialogModule} from '@angular/material/dialog'; import {MatButtonModule} from "@angular/material/button"; import { AdvertComponent } from './utils/components/advert/advert.component'; @@ -36,26 +35,35 @@ import { PageMyProfilComponent } from './utils/components/myProfil/page-my-profi import { PopupPictureProfilUrlComponent } from './utils/components/myProfil/popup-picture-profil-url/popup-picture-profil-url.component'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import {MatSortModule} from "@angular/material/sort"; -import { PageAdvertiserComponent } from './advertiser/page-advertiser/page-advertiser.component'; -import { PopupDeleteAdComponent } from './advertiser/popup-delete-ad/popup-delete-ad.component'; -import { PopupAddOrUpdateAdComponent } from './advertiser/popup-add-or-update-ad/popup-add-or-update-ad.component'; -import { PopupVisualizeAdComponent } from './advertiser/popup-visualize-ad/popup-visualize-ad.component'; -import { BarTagsComponent } from './advertiser/bar-tags/bar-tags.component'; +import { PageAdvertiserComponent } from './advertiser/manageAds/page-advertiser/page-advertiser.component'; +import { PopupDeleteAdComponent } from './advertiser/manageAds/popup-delete-ad/popup-delete-ad.component'; +import { PopupAddOrUpdateAdComponent } from './advertiser/manageAds/popup-add-or-update-ad/popup-add-or-update-ad.component'; +import { PopupVisualizeAdComponent } from './advertiser/manageAds/popup-visualize-ad/popup-visualize-ad.component'; +import { InputTagsComponent } from './advertiser/manageAds/input-tags/input-tags.component'; import {MatChipsModule} from "@angular/material/chips"; import {MatAutocompleteModule} from "@angular/material/autocomplete"; import {MatSelectModule} from "@angular/material/select"; -import { PopupVisualizeImagesComponent } from './advertiser/popup-visualize-images/popup-visualize-images.component'; +import { PopupVisualizeImagesComponent } from './advertiser/manageAds/popup-visualize-images/popup-visualize-images.component'; import {IvyCarouselModule} from "angular-responsive-carousel"; -import { DragAndDropComponent } from './advertiser/drag-and-drop/drag-and-drop.component'; +import { DragAndDropComponent } from './advertiser/manageAds/drag-and-drop/drag-and-drop.component'; import { DragAndDropDirective } from './utils/directives/dragAndDrop/drag-and-drop.directive'; +import { PageProfilUserComponent } from './user/myProfil/page-profil-user/page-profil-user.component'; +import { NavbarUserComponent } from './user/navbar-user/navbar-user.component'; +import { NavbarAdvertiserComponent } from './advertiser/navbar-advertiser/navbar-advertiser.component'; +import { NavbarAdminComponent } from './admin/navbar-admin/navbar-admin.component'; +import { PageProfilAdvertiserComponent } from './advertiser/myProfil/page-profil-advertiser/page-profil-advertiser.component'; +import { PopupUpdateAdvertiserComponent } from './advertiser/myProfil/popup-update-advertiser/popup-update-advertiser.component'; +import { PopupUpdateUserComponent } from './user/myProfil/popup-update-user/popup-update-user.component'; +import { NavbarBeforeConnexionComponent } from './beforeConnexion/navbar-before-connexion/navbar-before-connexion.component'; +import {MatRadioModule} from "@angular/material/radio"; +import { InputInterestsComponent } from './user/myProfil/input-interests/input-interests.component'; @NgModule({ declarations: [ AppComponent, - PageConnexionComponent, + PageLoginComponent, PageRegisterComponent, - NavBarComponent, PageSearchComponent, PopupConfirmationComponent, AdvertComponent, @@ -75,10 +83,19 @@ import { DragAndDropDirective } from './utils/directives/dragAndDrop/drag-and-dr PopupDeleteAdComponent, PopupAddOrUpdateAdComponent, PopupVisualizeAdComponent, - BarTagsComponent, + InputTagsComponent, PopupVisualizeImagesComponent, DragAndDropComponent, DragAndDropDirective, + PageProfilUserComponent, + NavbarUserComponent, + NavbarAdvertiserComponent, + NavbarAdminComponent, + PageProfilAdvertiserComponent, + PopupUpdateAdvertiserComponent, + PopupUpdateUserComponent, + NavbarBeforeConnexionComponent, + InputInterestsComponent, ], imports: [ BrowserModule, @@ -103,7 +120,8 @@ import { DragAndDropDirective } from './utils/directives/dragAndDrop/drag-and-dr ReactiveFormsModule, MatAutocompleteModule, MatSelectModule, - IvyCarouselModule + IvyCarouselModule, + MatRadioModule ], providers: [], bootstrap: [AppComponent] diff --git a/src/app/pourLes3Roles/page-connexion/page-connexion.component.html b/src/app/beforeConnexion/login/page-login/page-login.component.html similarity index 88% rename from src/app/pourLes3Roles/page-connexion/page-connexion.component.html rename to src/app/beforeConnexion/login/page-login/page-login.component.html index f37c342..bdbdfb1 100644 --- a/src/app/pourLes3Roles/page-connexion/page-connexion.component.html +++ b/src/app/beforeConnexion/login/page-login/page-login.component.html @@ -3,7 +3,7 @@
- +
@@ -12,7 +12,7 @@

StreamNotFound

- User Icon + User Icon
diff --git a/src/app/pourLes3Roles/page-connexion/page-connexion.component.scss b/src/app/beforeConnexion/login/page-login/page-login.component.scss similarity index 100% rename from src/app/pourLes3Roles/page-connexion/page-connexion.component.scss rename to src/app/beforeConnexion/login/page-login/page-login.component.scss diff --git a/src/app/pourLes3Roles/page-connexion/page-connexion.component.spec.ts b/src/app/beforeConnexion/login/page-login/page-login.component.spec.ts similarity index 59% rename from src/app/pourLes3Roles/page-connexion/page-connexion.component.spec.ts rename to src/app/beforeConnexion/login/page-login/page-login.component.spec.ts index 28d80c7..5cb4241 100644 --- a/src/app/pourLes3Roles/page-connexion/page-connexion.component.spec.ts +++ b/src/app/beforeConnexion/login/page-login/page-login.component.spec.ts @@ -1,20 +1,20 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { PageConnexionComponent } from './page-connexion.component'; +import { PageLoginComponent } from './page-login.component'; describe('PageConnexionComponent', () => { - let component: PageConnexionComponent; - let fixture: ComponentFixture; + let component: PageLoginComponent; + let fixture: ComponentFixture; beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ PageConnexionComponent ] + declarations: [ PageLoginComponent ] }) .compileComponents(); }); beforeEach(() => { - fixture = TestBed.createComponent(PageConnexionComponent); + fixture = TestBed.createComponent(PageLoginComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/src/app/pourLes3Roles/page-connexion/page-connexion.component.ts b/src/app/beforeConnexion/login/page-login/page-login.component.ts similarity index 81% rename from src/app/pourLes3Roles/page-connexion/page-connexion.component.ts rename to src/app/beforeConnexion/login/page-login/page-login.component.ts index e9bae9e..9ea0e7f 100644 --- a/src/app/pourLes3Roles/page-connexion/page-connexion.component.ts +++ b/src/app/beforeConnexion/login/page-login/page-login.component.ts @@ -1,16 +1,16 @@ import {Component, OnInit} from '@angular/core'; -import {MessageService} from "../../utils/services/message/message.service"; +import {MessageService} from "../../../utils/services/message/message.service"; import {Router} from "@angular/router"; -import {ThemeService} from "../../utils/services/theme/theme.service"; +import {ThemeService} from "../../../utils/services/theme/theme.service"; @Component({ - selector: 'app-page-connexion', - templateUrl: './page-connexion.component.html', - styleUrls: ['./page-connexion.component.scss'] + selector: 'app-page-login', + templateUrl: './page-login.component.html', + styleUrls: ['./page-login.component.scss'] }) -export class PageConnexionComponent implements OnInit +export class PageLoginComponent implements OnInit { pseudo: string = "" ; password: string = "" ; diff --git a/src/app/beforeConnexion/navbar-before-connexion/navbar-before-connexion.component.html b/src/app/beforeConnexion/navbar-before-connexion/navbar-before-connexion.component.html new file mode 100644 index 0000000..d4ad9f5 --- /dev/null +++ b/src/app/beforeConnexion/navbar-before-connexion/navbar-before-connexion.component.html @@ -0,0 +1,40 @@ + +
+ +
+ + + + + + +
+ +
diff --git a/src/app/beforeConnexion/navbar-before-connexion/navbar-before-connexion.component.scss b/src/app/beforeConnexion/navbar-before-connexion/navbar-before-connexion.component.scss new file mode 100644 index 0000000..cd9cc96 --- /dev/null +++ b/src/app/beforeConnexion/navbar-before-connexion/navbar-before-connexion.component.scss @@ -0,0 +1,80 @@ +.navbar { + background-color: black; + height: 75px; + font-size: x-large; + color: white; +} + + +.navbar-expand-lg { + border-bottom: solid; + border-color: white; + border-bottom-width: 2px; +} + + +// PolyNotFound +.navbar-brand { + font-family: cursive; + font-weight: bold; + //font-style: oblique 90deg; + font-size: xxx-large; + margin-left: 30px; + color: white; +} + + +// Recherche, Mes Playlists, Historique +.nav-link { + color: white; +} +.nav-link:hover { + color: grey; +} + + +// Bonton deconnexion +.btnDeconnexion { + font-size: x-large; + margin: 0px 10px 0px 10px +} +.btnDeconnexion:hover { + color: grey; +} + + +.monLi { + margin: 0px 10px 0px 10px; +} + + +img { + border: solid 2px white; + border-radius: 50px; + margin: 0px 10px 0px 15px; + width: 50px; + height: 50px; +} +img:hover { + cursor: pointer; +} + + +// -------------------------------------------------------------------- + + +::ng-deep .mat-slide-toggle-thumb { + background-color: #c8c8c8; +} + +::ng-deep .mat-slide-toggle-bar { + background-color: #ffffff; +} + +::ng-deep .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-thumb { + background-color: #ffffff; +} + +::ng-deep .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar { + background-color: #646464; +} diff --git a/src/app/beforeConnexion/navbar-before-connexion/navbar-before-connexion.component.spec.ts b/src/app/beforeConnexion/navbar-before-connexion/navbar-before-connexion.component.spec.ts new file mode 100644 index 0000000..f3f7f27 --- /dev/null +++ b/src/app/beforeConnexion/navbar-before-connexion/navbar-before-connexion.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NavbarBeforeConnexionComponent } from './navbar-before-connexion.component'; + +describe('NavbarBeforeConnexionComponent', () => { + let component: NavbarBeforeConnexionComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ NavbarBeforeConnexionComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(NavbarBeforeConnexionComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/beforeConnexion/navbar-before-connexion/navbar-before-connexion.component.ts b/src/app/beforeConnexion/navbar-before-connexion/navbar-before-connexion.component.ts new file mode 100644 index 0000000..3085e5c --- /dev/null +++ b/src/app/beforeConnexion/navbar-before-connexion/navbar-before-connexion.component.ts @@ -0,0 +1,12 @@ +import {Component, Input} from '@angular/core'; + + +@Component({ + selector: 'app-navbar-before-connexion', + templateUrl: './navbar-before-connexion.component.html', + styleUrls: ['./navbar-before-connexion.component.scss'] +}) +export class NavbarBeforeConnexionComponent +{ + @Input() pour = "login"; +} diff --git a/src/app/pourLes3Roles/register/page-register/page-register.component.html b/src/app/beforeConnexion/register/page-register/page-register.component.html similarity index 94% rename from src/app/pourLes3Roles/register/page-register/page-register.component.html rename to src/app/beforeConnexion/register/page-register/page-register.component.html index 4059743..f895077 100644 --- a/src/app/pourLes3Roles/register/page-register/page-register.component.html +++ b/src/app/beforeConnexion/register/page-register/page-register.component.html @@ -3,7 +3,6 @@
-
@@ -11,7 +10,7 @@
- User Icon + User Icon
diff --git a/src/app/pourLes3Roles/register/page-register/page-register.component.scss b/src/app/beforeConnexion/register/page-register/page-register.component.scss similarity index 100% rename from src/app/pourLes3Roles/register/page-register/page-register.component.scss rename to src/app/beforeConnexion/register/page-register/page-register.component.scss diff --git a/src/app/pourLes3Roles/register/page-register/page-register.component.spec.ts b/src/app/beforeConnexion/register/page-register/page-register.component.spec.ts similarity index 100% rename from src/app/pourLes3Roles/register/page-register/page-register.component.spec.ts rename to src/app/beforeConnexion/register/page-register/page-register.component.spec.ts diff --git a/src/app/pourLes3Roles/register/page-register/page-register.component.ts b/src/app/beforeConnexion/register/page-register/page-register.component.ts similarity index 100% rename from src/app/pourLes3Roles/register/page-register/page-register.component.ts rename to src/app/beforeConnexion/register/page-register/page-register.component.ts diff --git a/src/app/pourLes3Roles/register/popup-confirmation/popup-confirmation.component.html b/src/app/beforeConnexion/register/popup-confirmation/popup-confirmation.component.html similarity index 100% rename from src/app/pourLes3Roles/register/popup-confirmation/popup-confirmation.component.html rename to src/app/beforeConnexion/register/popup-confirmation/popup-confirmation.component.html diff --git a/src/app/beforeConnexion/register/popup-confirmation/popup-confirmation.component.scss b/src/app/beforeConnexion/register/popup-confirmation/popup-confirmation.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/pourLes3Roles/register/popup-confirmation/popup-confirmation.component.spec.ts b/src/app/beforeConnexion/register/popup-confirmation/popup-confirmation.component.spec.ts similarity index 100% rename from src/app/pourLes3Roles/register/popup-confirmation/popup-confirmation.component.spec.ts rename to src/app/beforeConnexion/register/popup-confirmation/popup-confirmation.component.spec.ts diff --git a/src/app/pourLes3Roles/register/popup-confirmation/popup-confirmation.component.ts b/src/app/beforeConnexion/register/popup-confirmation/popup-confirmation.component.ts similarity index 100% rename from src/app/pourLes3Roles/register/popup-confirmation/popup-confirmation.component.ts rename to src/app/beforeConnexion/register/popup-confirmation/popup-confirmation.component.ts diff --git a/src/app/user/history/page-history-user/page-history-user.component.html b/src/app/user/history/page-history-user/page-history-user.component.html index 9ff1471..34b223c 100644 --- a/src/app/user/history/page-history-user/page-history-user.component.html +++ b/src/app/user/history/page-history-user/page-history-user.component.html @@ -2,7 +2,7 @@
-

+

diff --git a/src/app/user/myPlaylists/page-my-playlists/page-my-playlists.component.html b/src/app/user/myPlaylists/page-my-playlists/page-my-playlists.component.html index 3239d47..fd0adce 100644 --- a/src/app/user/myPlaylists/page-my-playlists/page-my-playlists.component.html +++ b/src/app/user/myPlaylists/page-my-playlists/page-my-playlists.component.html @@ -3,7 +3,7 @@
- +
diff --git a/src/app/user/myProfil/input-interests/input-interests.component.html b/src/app/user/myProfil/input-interests/input-interests.component.html new file mode 100644 index 0000000..847d672 --- /dev/null +++ b/src/app/user/myProfil/input-interests/input-interests.component.html @@ -0,0 +1,43 @@ + + + + + Tags + + + + + + + {{interest}} + + + + + + + + + + + + {{interest}} + + + + + + diff --git a/src/app/user/myProfil/input-interests/input-interests.component.scss b/src/app/user/myProfil/input-interests/input-interests.component.scss new file mode 100644 index 0000000..c7acb4b --- /dev/null +++ b/src/app/user/myProfil/input-interests/input-interests.component.scss @@ -0,0 +1,3 @@ +mat-form-field { + width: 100%; +} diff --git a/src/app/user/myProfil/input-interests/input-interests.component.spec.ts b/src/app/user/myProfil/input-interests/input-interests.component.spec.ts new file mode 100644 index 0000000..ca6a4fa --- /dev/null +++ b/src/app/user/myProfil/input-interests/input-interests.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { InputInterestsComponent } from './input-interests.component'; + +describe('InputInterestsComponent', () => { + let component: InputInterestsComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ InputInterestsComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(InputInterestsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/user/myProfil/input-interests/input-interests.component.ts b/src/app/user/myProfil/input-interests/input-interests.component.ts new file mode 100644 index 0000000..663b95f --- /dev/null +++ b/src/app/user/myProfil/input-interests/input-interests.component.ts @@ -0,0 +1,82 @@ +import {Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core'; +import {COMMA, ENTER} from "@angular/cdk/keycodes"; +import {FormControl} from "@angular/forms"; +import {Observable} from "rxjs"; +import {FictitiousDatasService} from "../../../utils/services/fictitiousDatas/fictitious-datas.service"; +import {MessageService} from "../../../utils/services/message/message.service"; +import {map, startWith} from "rxjs/operators"; +import {MatChipInputEvent} from "@angular/material/chips"; +import {MatAutocompleteSelectedEvent} from "@angular/material/autocomplete"; + + +@Component({ + selector: 'app-input-interests', + templateUrl: './input-interests.component.html', + styleUrls: ['./input-interests.component.scss'] +}) +export class InputInterestsComponent implements OnInit +{ + selectable = true; + removable = true; + separatorKeysCodes: number[] = [ENTER, COMMA]; + formControl = new FormControl(); + filteredInterests: Observable; + @Input() myInterests: string[] = []; + allInterests: string[] = []; + @Output() eventEmitter = new EventEmitter(); + @ViewChild('tagInput') tagInput: ElementRef; + + + constructor( private fictitiousDatasService: FictitiousDatasService, + private messageService: MessageService ) {} + + + ngOnInit(): void + { + this.filteredInterests = this.formControl.valueChanges.pipe( + startWith(null), + map((fruit: string | null) => fruit ? this._filter(fruit) : this.allInterests.slice())); + + // --- FAUX CODE --- + this.allInterests = this.fictitiousDatasService.getTags(); + this.allInterests.sort(); + } + + + add(event: MatChipInputEvent): void + { + const value = (event.value || '').trim(); + if (value && (this.allInterests.indexOf(value) !== -1)) + { + this.myInterests.push(value); + event.chipInput!.clear(); + this.formControl.setValue(null); + this.eventEmitter.emit(this.myInterests); + } + } + + + remove(tag: string): void + { + const index = this.myInterests.indexOf(tag); + if (index >= 0) this.myInterests.splice(index, 1); + this.eventEmitter.emit(this.myInterests); + } + + + selected(event: MatAutocompleteSelectedEvent): void + { + this.myInterests.push(event.option.viewValue); + this.tagInput.nativeElement.value = ''; + this.formControl.setValue(null); + this.eventEmitter.emit(this.myInterests); + } + + + private _filter(value: string): string[] + { + const filterValue = value.toLowerCase(); + return this.allInterests.filter(fruit => fruit.toLowerCase().includes(filterValue)); + } + +} diff --git a/src/app/user/myProfil/page-profil-user/page-profil-user.component.html b/src/app/user/myProfil/page-profil-user/page-profil-user.component.html new file mode 100644 index 0000000..01c95f0 --- /dev/null +++ b/src/app/user/myProfil/page-profil-user/page-profil-user.component.html @@ -0,0 +1,70 @@ +
+
+ + + + + +
+ + +
+ +
+ + +
+
Login:
+
{{user.login}}
+
+ + +
+
Mail:
+
{{user.mail}}
+
+ + +
+
Date de naissance:
+
+ {{ user.dateOfBirth | date:'dd/LL/YYYY' }} +
+
+ + +
+
Sexe:
+
+ Homme + Femme +
+
+ + +
+
Centres d'intérêt:
+
+
• {{interest}}
+
+
+ + +
+
Date de création:
+
+ {{ user.createdAt | date:'dd/LL/YYYY à HH:mm:ss' }} +
+
+ + +
+ +
+ +
+ + +
+
diff --git a/src/app/user/myProfil/page-profil-user/page-profil-user.component.scss b/src/app/user/myProfil/page-profil-user/page-profil-user.component.scss new file mode 100644 index 0000000..966c9a2 --- /dev/null +++ b/src/app/user/myProfil/page-profil-user/page-profil-user.component.scss @@ -0,0 +1,61 @@ +.myContainer { + max-width: 100vw; + height: 100vh; + overflow-x: hidden; +} + + +.boite { + margin-left: auto; + margin-right: auto; + width: 25%; + margin-top: 10vh; + border: solid 3px; + border-radius: 10px; + padding: 20px 40px 20px 40px; + background-color: #ffffff; + text-align: center; + box-shadow: 10px 5px 5px black; +} +.lightTheme .boite { + border-color: black; +} +.darkTheme .boite { + border-color: white; +} + + +img { + margin: 0px 0px 10px 0px; + width: 5vw; + height: 5vw; + border: solid 2px black; + border-radius: 50%; + font-size: xxx-large; +} + + +.myRow { + margin: 15px 0px 15px 0px; +} +.myLabel { + text-align: right; + padding: 0px 5px 0px 0px; + margin: 0px; + font-weight: bold; +} +.myValue { + text-align: left; + padding: 0px 0px 0px 5px; + margin: 0px; +} + + +.btnContainer { + text-align: center; + margin-top: 40px; +} +.myBtn { + border: solid 1px black; + background-color: white; +} diff --git a/src/app/user/myProfil/page-profil-user/page-profil-user.component.spec.ts b/src/app/user/myProfil/page-profil-user/page-profil-user.component.spec.ts new file mode 100644 index 0000000..e8722af --- /dev/null +++ b/src/app/user/myProfil/page-profil-user/page-profil-user.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PageProfilUserComponent } from './page-profil-user.component'; + +describe('PageProfilUserComponent', () => { + let component: PageProfilUserComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ PageProfilUserComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(PageProfilUserComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/user/myProfil/page-profil-user/page-profil-user.component.ts b/src/app/user/myProfil/page-profil-user/page-profil-user.component.ts new file mode 100644 index 0000000..88adcbb --- /dev/null +++ b/src/app/user/myProfil/page-profil-user/page-profil-user.component.ts @@ -0,0 +1,53 @@ +import { Component, OnInit } from '@angular/core'; +import {ThemeService} from "../../../utils/services/theme/theme.service"; +import {FictitiousDatasService} from "../../../utils/services/fictitiousDatas/fictitious-datas.service"; +import {User} from "../../../utils/interfaces/user"; +import {MatDialog} from "@angular/material/dialog"; +import {PopupUpdateUserComponent} from "../popup-update-user/popup-update-user.component"; +import {MatSnackBar} from "@angular/material/snack-bar"; + +@Component({ + selector: 'app-page-profil-user', + templateUrl: './page-profil-user.component.html', + styleUrls: ['./page-profil-user.component.scss'] +}) +export class PageProfilUserComponent implements OnInit +{ + user: User; + + + constructor( public themeService: ThemeService, + private fictitiousDatasService: FictitiousDatasService, + public dialog: MatDialog, + private snackBar: MatSnackBar ) { } + + + ngOnInit(): void + { + this.user = this.fictitiousDatasService.getUser(); + } + + + onModifier() + { + const config = { + width: '25%', + data: { user: this.user } + }; + this.dialog + .open(PopupUpdateUserComponent, config) + .afterClosed() + .subscribe(retour => { + + if((retour === null) || (retour === undefined)) + { + const config = { duration: 1000, panelClass: "custom-class" }; + this.snackBar.open( "Opération annulé", "", config); + } + else + { + this.user = retour; + } + }); + } +} diff --git a/src/app/user/myProfil/popup-update-user/popup-update-user.component.html b/src/app/user/myProfil/popup-update-user/popup-update-user.component.html new file mode 100644 index 0000000..413dda3 --- /dev/null +++ b/src/app/user/myProfil/popup-update-user/popup-update-user.component.html @@ -0,0 +1,81 @@ +
+ + +
+ + + + +
+ +
+ +
+
+ + + + Pseudo + + +
+ + + + Email + + +
+ + + + Date de naissance + + +
+ + + + Homme + Femme + + + + + + + + + Modifier mot de passe: + +
+ + +
+ + + Nouveau mot de passe + + +
+ + + Confirmation nouveau mot de passe + + +
+
+ + +
+ +
+ + +
+ {{errorMessage}} +
+ +
+
diff --git a/src/app/user/myProfil/popup-update-user/popup-update-user.component.scss b/src/app/user/myProfil/popup-update-user/popup-update-user.component.scss new file mode 100644 index 0000000..8d72179 --- /dev/null +++ b/src/app/user/myProfil/popup-update-user/popup-update-user.component.scss @@ -0,0 +1,8 @@ +img { + margin: 0px 0px 10px 0px; + width: 5vw; + height: 5vw; + border: solid 2px black; + border-radius: 50%; + font-size: xxx-large; +} diff --git a/src/app/user/myProfil/popup-update-user/popup-update-user.component.spec.ts b/src/app/user/myProfil/popup-update-user/popup-update-user.component.spec.ts new file mode 100644 index 0000000..a5126ad --- /dev/null +++ b/src/app/user/myProfil/popup-update-user/popup-update-user.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PopupUpdateUserComponent } from './popup-update-user.component'; + +describe('PopupUpdateUserComponent', () => { + let component: PopupUpdateUserComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ PopupUpdateUserComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(PopupUpdateUserComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/user/myProfil/popup-update-user/popup-update-user.component.ts b/src/app/user/myProfil/popup-update-user/popup-update-user.component.ts new file mode 100644 index 0000000..07c1fc1 --- /dev/null +++ b/src/app/user/myProfil/popup-update-user/popup-update-user.component.ts @@ -0,0 +1,106 @@ +import {Component, Inject, OnInit} from '@angular/core'; +import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog"; +import {User} from "../../../utils/interfaces/user"; + + + +@Component({ + selector: 'app-popup-update-user', + templateUrl: './popup-update-user.component.html', + styleUrls: ['./popup-update-user.component.scss'] +}) +export class PopupUpdateUserComponent implements OnInit +{ + userCopy: User; + newPassword: string; + confirmNewPassword: string = "" ; + changePassword: boolean = false ; + hasError: boolean = false; + errorMessage: string = "" ; + + + constructor( public dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data) { } + + + ngOnInit(): void + { + const user0 = this.data.user; + this.userCopy = { + _id: user0._id, + login: user0.login, + hashPass: user0.hashPass, + mail: user0.mail, + role: { + name: user0.role.name, + permission: user0.role.permission, + }, + profilePictureUrl: user0.profilePictureUrl, + dateOfBirth: user0.dateOfBirth, + gender: user0.gender, + interests: [], + isActive: user0.isActive, + createdAt: user0.createdAt, + updatedAt: user0.updatedAt, + }; + for(let interest of user0.interests) this.userCopy.interests.push(interest); + } + + + onValider() + { + this.checkField(); + if(!this.hasError) + { + const retour = { + user: this.userCopy, + newPassword: this.newPassword + }; + this.dialogRef.close(retour); + } + } + + + checkField() + { + if(this.userCopy.login.length === 0) { + this.errorMessage = "Veuillez remplir le champ 'login'" ; + this.hasError = true; + } + else if(this.userCopy.mail.length === 0) { + this.errorMessage = "Veuillez remplir le champ 'email'" ; + this.hasError = true; + } + else if(!this.isValidEmail(this.userCopy.mail)) { + this.errorMessage = "Email invalide" ; + this.hasError = true; + } + else if(this.changePassword) { + if (this.newPassword.length === 0) { + this.errorMessage = "Veuillez remplir le champ 'mot de passe'" ; + this.hasError = true; + } else if (this.newPassword !== this.confirmNewPassword) { + this.errorMessage = "Le mot de passe est différent de sa confirmation" ; + this.hasError = true; + } + } + else { + this.errorMessage = "" ; + this.hasError = false; + } + } + + + isValidEmail(email) + { + let re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + return re.test(email); + } + + + onEventInputInterests(myInterets: string[]) + { + this.userCopy.interests = myInterets; + } + +} diff --git a/src/app/user/navbar-user/navbar-user.component.html b/src/app/user/navbar-user/navbar-user.component.html new file mode 100644 index 0000000..57153fb --- /dev/null +++ b/src/app/user/navbar-user/navbar-user.component.html @@ -0,0 +1,35 @@ + diff --git a/src/app/user/navbar-user/navbar-user.component.scss b/src/app/user/navbar-user/navbar-user.component.scss new file mode 100644 index 0000000..cd9cc96 --- /dev/null +++ b/src/app/user/navbar-user/navbar-user.component.scss @@ -0,0 +1,80 @@ +.navbar { + background-color: black; + height: 75px; + font-size: x-large; + color: white; +} + + +.navbar-expand-lg { + border-bottom: solid; + border-color: white; + border-bottom-width: 2px; +} + + +// PolyNotFound +.navbar-brand { + font-family: cursive; + font-weight: bold; + //font-style: oblique 90deg; + font-size: xxx-large; + margin-left: 30px; + color: white; +} + + +// Recherche, Mes Playlists, Historique +.nav-link { + color: white; +} +.nav-link:hover { + color: grey; +} + + +// Bonton deconnexion +.btnDeconnexion { + font-size: x-large; + margin: 0px 10px 0px 10px +} +.btnDeconnexion:hover { + color: grey; +} + + +.monLi { + margin: 0px 10px 0px 10px; +} + + +img { + border: solid 2px white; + border-radius: 50px; + margin: 0px 10px 0px 15px; + width: 50px; + height: 50px; +} +img:hover { + cursor: pointer; +} + + +// -------------------------------------------------------------------- + + +::ng-deep .mat-slide-toggle-thumb { + background-color: #c8c8c8; +} + +::ng-deep .mat-slide-toggle-bar { + background-color: #ffffff; +} + +::ng-deep .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-thumb { + background-color: #ffffff; +} + +::ng-deep .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar { + background-color: #646464; +} diff --git a/src/app/utils/components/nav-bar/nav-bar.component.spec.ts b/src/app/user/navbar-user/navbar-user.component.spec.ts similarity index 54% rename from src/app/utils/components/nav-bar/nav-bar.component.spec.ts rename to src/app/user/navbar-user/navbar-user.component.spec.ts index 94e5b30..5d03960 100644 --- a/src/app/utils/components/nav-bar/nav-bar.component.spec.ts +++ b/src/app/user/navbar-user/navbar-user.component.spec.ts @@ -1,20 +1,20 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { NavBarComponent } from './nav-bar.component'; +import { NavbarUserComponent } from './navbar-user.component'; -describe('NavBarComponent', () => { - let component: NavBarComponent; - let fixture: ComponentFixture; +describe('NavbarUserComponent', () => { + let component: NavbarUserComponent; + let fixture: ComponentFixture; beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ NavBarComponent ] + declarations: [ NavbarUserComponent ] }) .compileComponents(); }); beforeEach(() => { - fixture = TestBed.createComponent(NavBarComponent); + fixture = TestBed.createComponent(NavbarUserComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/src/app/user/navbar-user/navbar-user.component.ts b/src/app/user/navbar-user/navbar-user.component.ts new file mode 100644 index 0000000..a209394 --- /dev/null +++ b/src/app/user/navbar-user/navbar-user.component.ts @@ -0,0 +1,35 @@ +import {Component, OnInit} from '@angular/core'; +import {ThemeService} from "../../utils/services/theme/theme.service"; +import {Router} from "@angular/router"; + +@Component({ + selector: 'app-navbar-user', + templateUrl: './navbar-user.component.html', + styleUrls: ['./navbar-user.component.scss'] +}) +export class NavbarUserComponent implements OnInit +{ + urlImage: string = "" ; + + constructor( public themeService: ThemeService, + private router: Router) { } + + + ngOnInit(): void + { + if(this.router.url.startsWith("/user")) { + this.urlImage = "https://www.figurines-goodies.com/1185-thickbox_default/huey-duck-tales-disney-funko-pop.jpg"; + } + else if(this.router.url.startsWith("/advertiser")) { + this.urlImage = "https://www.figurines-goodies.com/1188-large_default/dewey-duck-tales-disney-funko-pop.jpg" ; + } + else if(this.router.url.startsWith("/admin")) { + this.urlImage = "https://www.reference-gaming.com/assets/media/product/41195/figurine-pop-duck-tales-n-309-loulou.jpg?format=product-cover-large&k=1519639530" ; + } + } + + onDeconnexion(): void { + + } + +} diff --git a/src/app/user/search/page-search/page-search.component.html b/src/app/user/search/page-search/page-search.component.html index 992eca8..5caaee0 100644 --- a/src/app/user/search/page-search/page-search.component.html +++ b/src/app/user/search/page-search/page-search.component.html @@ -3,7 +3,7 @@
- +
diff --git a/src/app/utils/components/myProfil/page-my-profil/page-my-profil.component.html b/src/app/utils/components/myProfil/page-my-profil/page-my-profil.component.html index 40160e5..5d0bd58 100644 --- a/src/app/utils/components/myProfil/page-my-profil/page-my-profil.component.html +++ b/src/app/utils/components/myProfil/page-my-profil/page-my-profil.component.html @@ -1,7 +1,6 @@
-

diff --git a/src/app/utils/components/nav-bar/nav-bar.component.html b/src/app/utils/components/nav-bar/nav-bar.component.html deleted file mode 100644 index b058b15..0000000 --- a/src/app/utils/components/nav-bar/nav-bar.component.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - -
- -
- - - - - - -
- -
- - - - - - -
- -
- - - - - - -
- -
- - - - - - -
- -
- - - diff --git a/src/app/utils/components/nav-bar/nav-bar.component.ts b/src/app/utils/components/nav-bar/nav-bar.component.ts deleted file mode 100644 index 4ed716e..0000000 --- a/src/app/utils/components/nav-bar/nav-bar.component.ts +++ /dev/null @@ -1,49 +0,0 @@ -import {Component, Input, OnInit} from '@angular/core'; -import {ThemeService} from "../../services/theme/theme.service"; - - - -@Component({ - selector: 'app-nav-bar', - templateUrl: './nav-bar.component.html', - styleUrls: ['./nav-bar.component.scss'] -}) -export class NavBarComponent implements OnInit -{ - @Input() pour = "login"; - urlImage: string = "" ; - - - constructor( public themeService: ThemeService ) { } - - - ngOnInit(): void - { - // --- FAUX CODE --- - switch (this.pour) - { - case "user": - this.urlImage = "https://www.figurines-goodies.com/1185-thickbox_default/huey-duck-tales-disney-funko-pop.jpg" ; - break; - case "advertiser": - this.urlImage = "https://www.figurines-goodies.com/1188-large_default/dewey-duck-tales-disney-funko-pop.jpg" ; - break; - case "admin": - this.urlImage = "https://www.reference-gaming.com/assets/media/product/41195/figurine-pop-duck-tales-n-309-loulou.jpg" ; - break; - } - } - - - onClick(): void - { - this.themeService.isLightTheme = !this.themeService.isLightTheme; - } - - - onDeconnexion(): void - { - - } - -} diff --git a/src/app/utils/interfaces/user.ts b/src/app/utils/interfaces/user.ts index 34ea01d..8471280 100644 --- a/src/app/utils/interfaces/user.ts +++ b/src/app/utils/interfaces/user.ts @@ -1,9 +1,18 @@ export interface User { _id: string, - login: string - hashPass: string - mail: string - role: any, - profilePictureUrl: string + login: string, + hashPass: string, + mail: string, + role: { + name: string, + permission: number, + }, + profilePictureUrl: string, + dateOfBirth: Date, + gender: string, + interests: string[], + isActive: boolean, + createdAt: Date, + updatedAt: Date, } diff --git a/src/app/utils/services/fictitiousDatas/fictitious-datas.service.ts b/src/app/utils/services/fictitiousDatas/fictitious-datas.service.ts index b650894..ac4f92b 100644 --- a/src/app/utils/services/fictitiousDatas/fictitious-datas.service.ts +++ b/src/app/utils/services/fictitiousDatas/fictitious-datas.service.ts @@ -226,8 +226,17 @@ export class FictitiousDatasService login: "Riri", hashPass: "agourgroou", mail: "riri@gmail.com", - role: "user", - profilePictureUrl: "https://www.figurines-goodies.com/1185-thickbox_default/huey-duck-tales-disney-funko-pop.jpg" + role: { + name: "user", + permission: 0, + }, + profilePictureUrl: "https://www.figurines-goodies.com/1185-thickbox_default/huey-duck-tales-disney-funko-pop.jpg", + dateOfBirth: new Date(), + gender: "man", + interests: ["foot", "jeux-vidéo"], + isActive: true, + createdAt: new Date(), + updatedAt: new Date(), } } @@ -238,8 +247,17 @@ export class FictitiousDatasService login: "Fifi", hashPass: "agourgroou", mail: "fifi@gmail.com", - role: "advertiser", - profilePictureUrl: "https://www.figurines-goodies.com/1188-large_default/dewey-duck-tales-disney-funko-pop.jpg" + role: { + name: "advertiser", + permission: 5, + }, + profilePictureUrl: "https://www.figurines-goodies.com/1188-large_default/dewey-duck-tales-disney-funko-pop.jpg", + dateOfBirth: new Date(), + gender: "man", + interests: ["cuisine", "jeux-vidéo"], + isActive: true, + createdAt: new Date(), + updatedAt: new Date(), } } @@ -250,8 +268,17 @@ export class FictitiousDatasService login: "Loulou", hashPass: "agourgroou", mail: "loulou@gmail.com", - role: "advertiser", - profilePictureUrl: "https://www.reference-gaming.com/assets/media/product/41195/figurine-pop-duck-tales-n-309-loulou.jpg?format=product-cover-large&k=1519639530" + role: { + name: "admin", + permission: 5, + }, + profilePictureUrl: "https://www.reference-gaming.com/assets/media/product/41195/figurine-pop-duck-tales-n-309-loulou.jpg?format=product-cover-large&k=1519639530", + dateOfBirth: new Date(), + gender: "man", + interests: ["musique", "jeux-vidéo"], + isActive: true, + createdAt: new Date(), + updatedAt: new Date(), } }