-
+
{{title}}
-
-
+
-
-
- Titre annonce
-
-
-
-
-
+
+
-
-
+
+
-
-
+
+
+ Titre annonce
+
+
-
-
Visible
+
+
+
+
+
+
+
+
Visible
+
+
+
+
+ Images déjà associées:
+
+
+
+
+ {{image.description}}
+
+
+
+
+
+
+
+
+
+
-
+
+
+
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 @@
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 @@
Popularité des annonces
+
+ Popularité des domaines
+
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;
}