diff --git a/src/app/admin/adList/page-ad-list-admin/page-ad-list-admin.component.html b/src/app/admin/adList/page-ad-list-admin/page-ad-list-admin.component.html index 41e464d..264088f 100644 --- a/src/app/admin/adList/page-ad-list-admin/page-ad-list-admin.component.html +++ b/src/app/admin/adList/page-ad-list-admin/page-ad-list-admin.component.html @@ -21,7 +21,7 @@ - +
@@ -30,18 +30,18 @@ non visible
- +
- Tags - + Sujets + - {{formControlTags.value ? formControlTags.value[0] : ''}} - - (+{{formControlTags.value.length - 1}} {{formControlTags.value?.length === 2 ? 'autre' : 'autres'}}) + {{formControlInterests.value ? formControlInterests.value[0] : ''}} + + (+{{formControlInterests.value.length - 1}} {{formControlInterests.value?.length === 2 ? 'autre' : 'autres'}}) - {{topping}} + {{topping}}
-info +
+ info +
diff --git a/src/app/advertiser/adList/drag-and-drop/drag-and-drop.component.ts b/src/app/advertiser/adList/drag-and-drop/drag-and-drop.component.ts index 6fe4a6d..40b9626 100644 --- a/src/app/advertiser/adList/drag-and-drop/drag-and-drop.component.ts +++ b/src/app/advertiser/adList/drag-and-drop/drag-and-drop.component.ts @@ -9,7 +9,7 @@ export class DragAndDropComponent { @ViewChild("fileDropRef", { static: false }) fileDropEl: ElementRef; files: any[] = []; - info_image = "Vos annonces seront affichées dans un rectangle de rapport 1/5 avec: \n • 1 la largeur durectangle \n • 5 la hauteur du rectangle" ; + info_image = "Vos annonces seront affichées dans un rectangle de rapport 1/5 avec: \n • 1 la largeur du rectangle \n • 5 la hauteur du rectangle" ; /** diff --git a/src/app/advertiser/adList/input-tags/input-tags.component.html b/src/app/advertiser/adList/input-interests-ad/input-interests-ad.component.html similarity index 92% rename from src/app/advertiser/adList/input-tags/input-tags.component.html rename to src/app/advertiser/adList/input-interests-ad/input-interests-ad.component.html index f8da61e..8df4522 100644 --- a/src/app/advertiser/adList/input-tags/input-tags.component.html +++ b/src/app/advertiser/adList/input-interests-ad/input-interests-ad.component.html @@ -2,7 +2,7 @@ - Tags + Sujets @@ -20,7 +20,7 @@ { - let component: InputTagsComponent; - let fixture: ComponentFixture; + let component: InputInterestsAdComponent; + let fixture: ComponentFixture; beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ InputTagsComponent ] + declarations: [ InputInterestsAdComponent ] }) .compileComponents(); }); beforeEach(() => { - fixture = TestBed.createComponent(InputTagsComponent); + fixture = TestBed.createComponent(InputInterestsAdComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/src/app/advertiser/adList/input-tags/input-tags.component.ts b/src/app/advertiser/adList/input-interests-ad/input-interests-ad.component.ts similarity index 92% rename from src/app/advertiser/adList/input-tags/input-tags.component.ts rename to src/app/advertiser/adList/input-interests-ad/input-interests-ad.component.ts index 6c54a07..dfc794b 100644 --- a/src/app/advertiser/adList/input-tags/input-tags.component.ts +++ b/src/app/advertiser/adList/input-interests-ad/input-interests-ad.component.ts @@ -11,11 +11,11 @@ import {FictitiousUtilsService} from "../../../utils/services/fictitiousDatas/fi @Component({ - selector: 'app-input-tags', - templateUrl: './input-tags.component.html', - styleUrls: ['./input-tags.component.scss'] + selector: 'app-input-interests-ad', + templateUrl: './input-interests-ad.component.html', + styleUrls: ['./input-interests-ad.component.scss'] }) -export class InputTagsComponent implements OnInit +export class InputInterestsAdComponent implements OnInit { selectable = true; removable = true; diff --git a/src/app/advertiser/adList/page-ad-list-advertiser/page-ad-list-advertiser.component.html b/src/app/advertiser/adList/page-ad-list-advertiser/page-ad-list-advertiser.component.html index 49ae0d2..6b4a16e 100644 --- a/src/app/advertiser/adList/page-ad-list-advertiser/page-ad-list-advertiser.component.html +++ b/src/app/advertiser/adList/page-ad-list-advertiser/page-ad-list-advertiser.component.html @@ -2,26 +2,113 @@
+

- -
- + + + + +
+ + +
+
+ + +
+ Filtre +
+ + + + +
+ +
+ + +
+ + + +
+ visible
+ non visible +
+ + + +
+ + Sujets + + + {{formControlInterests.value ? formControlInterests.value[0] : ''}} + + (+{{formControlInterests.value.length - 1}} {{formControlInterests.value?.length === 2 ? 'autre' : 'autres'}}) + + + {{topping}} + + + +
+ + + +
+ Période de création:   + + Date de début + + +   -   + + Date de fin + + +
+ +
+ +
+
+ + +
+ +
+
-
- - -
- + + + + + + + @@ -30,13 +117,13 @@ - - - + + + @@ -65,15 +152,6 @@ - - - - - - @@ -82,10 +160,7 @@ insert_photo - + + + + + + + + +
+ +
- + +
+ diff --git a/src/app/advertiser/adList/popup-add-or-update-ad/popup-add-or-update-ad.component.scss b/src/app/advertiser/adList/popup-add-or-update-ad/popup-add-or-update-ad.component.scss index 7fb592c..b299124 100644 --- a/src/app/advertiser/adList/popup-add-or-update-ad/popup-add-or-update-ad.component.scss +++ b/src/app/advertiser/adList/popup-add-or-update-ad/popup-add-or-update-ad.component.scss @@ -8,7 +8,10 @@ h1 { text-align: center; font-size: large; - padding-bottom: 10px; +} + +.col-6, .col-8 { + border-left: solid 1px #a4a4a4; } diff --git a/src/app/advertiser/adList/popup-add-or-update-ad/popup-add-or-update-ad.component.ts b/src/app/advertiser/adList/popup-add-or-update-ad/popup-add-or-update-ad.component.ts index a4af930..5c41b0e 100644 --- a/src/app/advertiser/adList/popup-add-or-update-ad/popup-add-or-update-ad.component.ts +++ b/src/app/advertiser/adList/popup-add-or-update-ad/popup-add-or-update-ad.component.ts @@ -11,7 +11,7 @@ const ADVERT_VIDE: Advert = { title: "", advertiser: "", images: [], - tags: [], + interests: [], comment: "", views: 0, isVisible: true, @@ -47,14 +47,14 @@ export class PopupAddOrUpdateAdComponent implements OnInit if(this.data.action === "add") { this.advert = Object.assign({}, ADVERT_VIDE); - this.advert.tags = []; + this.advert.interests = []; this.urlBackend = "advertiser/add/ad" ; this.title = "Ajouter annonce" ; } else { this.advert = Object.assign({}, this.data.advert); - this.advert.tags = this.data.advert.tags.slice(); + this.advert.interests = this.data.advert.interests.slice(); this.urlBackend = "advertiser/update/ad" ; this.title = "Modifier annonce" ; } @@ -86,32 +86,15 @@ export class PopupAddOrUpdateAdComponent implements OnInit onEventInputTags(myTags: string[]): void { - this.advert.tags = myTags; + this.advert.interests = myTags; } - // Lorsque l'annonceur selectionne des fichiers - onSelectFile(event) + onRemoveImgAlreadyPresent(image) { - const nbFileSelected = event.target.files.length ; - for(let i=0 ; i file); - this.tabSelectedFile.splice(index, 1); + const index = this.advert.images.indexOf(image); + console.log("idx: " + index); + this.advert.images.slice(index, 1); } } diff --git a/src/app/advertiser/adList/popup-visualize-ad-advertiser/popup-visualize-ad-advertiser.component.html b/src/app/advertiser/adList/popup-visualize-ad-advertiser/popup-visualize-ad-advertiser.component.html index 4263967..0efdb23 100644 --- a/src/app/advertiser/adList/popup-visualize-ad-advertiser/popup-visualize-ad-advertiser.component.html +++ b/src/app/advertiser/adList/popup-visualize-ad-advertiser/popup-visualize-ad-advertiser.component.html @@ -19,7 +19,7 @@
Tags:
-
• {{tag}}
+
• {{tag}}
diff --git a/src/app/advertiser/navbar-advertiser/navbar-advertiser.component.html b/src/app/advertiser/navbar-advertiser/navbar-advertiser.component.html index 8c6d946..e87170e 100644 --- a/src/app/advertiser/navbar-advertiser/navbar-advertiser.component.html +++ b/src/app/advertiser/navbar-advertiser/navbar-advertiser.component.html @@ -15,6 +15,9 @@ + diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 1a5fb3f..aa484b5 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -36,7 +36,7 @@ import { PageAdListAdvertiserComponent } from './advertiser/adList/page-ad-list- import { PopupDeleteAdAdvertiserComponent } from './advertiser/adList/popup-delete-ad-advertiser/popup-delete-ad-advertiser.component'; import { PopupAddOrUpdateAdComponent } from './advertiser/adList/popup-add-or-update-ad/popup-add-or-update-ad.component'; import { PopupVisualizeAdAdvertiserComponent } from './advertiser/adList/popup-visualize-ad-advertiser/popup-visualize-ad-advertiser.component'; -import { InputTagsComponent } from './advertiser/adList/input-tags/input-tags.component'; +import { InputInterestsAdComponent } from './advertiser/adList/input-interests-ad/input-interests-ad.component'; import {MatChipsModule} from "@angular/material/chips"; import {MatAutocompleteModule} from "@angular/material/autocomplete"; import {MatSelectModule} from "@angular/material/select"; @@ -93,7 +93,7 @@ import {MatDatepickerModule} from "@angular/material/datepicker"; PopupDeleteAdAdvertiserComponent, PopupAddOrUpdateAdComponent, PopupVisualizeAdAdvertiserComponent, - InputTagsComponent, + InputInterestsAdComponent, PopupVisualizeImagesAdvertiserComponent, DragAndDropComponent, DragAndDropDirective, diff --git a/src/app/utils/interfaces/advert.ts b/src/app/utils/interfaces/advert.ts index d9d1cb6..e31d6a5 100644 --- a/src/app/utils/interfaces/advert.ts +++ b/src/app/utils/interfaces/advert.ts @@ -8,7 +8,7 @@ export interface Advert url: string, description: string, }[], - tags: string[], + interests: string[], comment: string, views: number, isVisible: boolean, diff --git a/src/app/utils/services/fictitiousDatas/fictitiousAdverts/fictitious-adverts.service.ts b/src/app/utils/services/fictitiousDatas/fictitiousAdverts/fictitious-adverts.service.ts index 1506cf0..aca666f 100644 --- a/src/app/utils/services/fictitiousDatas/fictitiousAdverts/fictitious-adverts.service.ts +++ b/src/app/utils/services/fictitiousDatas/fictitiousAdverts/fictitious-adverts.service.ts @@ -15,7 +15,7 @@ const TAB_ADVERT: Advert[] = [ { url: "nutella_v_2.png", description: "image nutella 2" }, { url: "nutella_v_3.jpg", description: "image nutella 3" } ], - tags: [ "rock", "basket" ], + interests: [ "rock", "basket" ], comment: "pub pour vacances de noêl", views: 5, isVisible: true, @@ -32,7 +32,7 @@ const TAB_ADVERT: Advert[] = [ { url: "rolex_v_1.jpg", description: "rolex 1" }, { url: "rolex_v_2.png", description: "rolex 2" }, ], - tags: [ "rock", "rap" ], + interests: [ "rock", "rap" ], comment: "pub pour cette année", views: 2, isVisible: true, @@ -58,7 +58,7 @@ export class FictitiousAdvertsService const idx = Math.floor(Math.random() * TAB_ADVERT.length); let advert = Object.assign({}, TAB_ADVERT[idx]); advert._id = advert._id + this.fictitiousUtilsService.makeid(5); - advert.tags = advert.tags.slice(); + advert.interests = advert.interests.slice(); advert.isVisible = (Math.random() < 0.5); return advert; }
+ power_settings_new + + + Titre Tags Sujets - - {{tag}}, - {{tag}} + + {{interest}}, + {{interest}} Visible - check - - Actions