diff --git a/src/app/modals/contribuer/contribuer.component.html b/src/app/modals/contribuer/contribuer.component.html index ebd60ad58e16baf08ff83f71355c9f6171312720..41383e5c199f7d18d6b09746749a391a88f01861 100644 --- a/src/app/modals/contribuer/contribuer.component.html +++ b/src/app/modals/contribuer/contribuer.component.html @@ -19,4 +19,4 @@ <input class="form__button" type="submit" value="Donner" /> </form> </section> -</ng-container> \ No newline at end of file +</ng-container> diff --git a/src/app/modals/contribuer/contribuer.component.ts b/src/app/modals/contribuer/contribuer.component.ts index 2e9ed26081358248d0311bbd9b5ed9ee4c5181c4..7a8d36edc5375f34c8e00dd30cfbe33c62f78bc8 100644 --- a/src/app/modals/contribuer/contribuer.component.ts +++ b/src/app/modals/contribuer/contribuer.component.ts @@ -17,11 +17,14 @@ import { environment } from 'src/environments/environment'; }) export class ContribuerComponent implements OnInit { + @ViewChild(StripeCardComponent) card!: StripeCardComponent; + + // Liste des montants à proposer montants = montants; + + // Etat de la modale display$?: Observable<'open' | 'close'>; - @ViewChild(StripeCardComponent) card!: StripeCardComponent; - payementStatus: any; submitted: any; loading: any; @@ -101,4 +104,4 @@ export class ContribuerComponent implements OnInit { console.log('outside'); } -} \ No newline at end of file +} diff --git a/src/app/pages/bateau/bateau.component.ts b/src/app/pages/bateau/bateau.component.ts index 86f8c992c678da96ab568f484cab846139fbf46d..617d0805b5740ff5f98eefc44853167050e3b4e3 100644 --- a/src/app/pages/bateau/bateau.component.ts +++ b/src/app/pages/bateau/bateau.component.ts @@ -1,5 +1,4 @@ -import { Component, OnInit, Renderer2, Inject, ViewChild, ElementRef, AfterViewInit } from '@angular/core'; -import { DOCUMENT } from '@angular/common'; +import { Component, OnInit, ViewChild, ElementRef, AfterViewInit } from '@angular/core'; import { Chiffre } from "../../modeles/chiffre"; import { getUrlImage } from "../../utils/directusUtils"; import { Bateau } from './../../modeles/bateau'; @@ -15,6 +14,8 @@ import Globe from 'globe.gl'; }) export class BateauComponent implements OnInit, AfterViewInit { + @ViewChild('globeGL') el?: ElementRef<HTMLElement>; + chiffre: Chiffre[] = [ { nom: 'Expéditions', valeur: 2 }, { nom: "Membres d'équipage", valeur: 34 }, @@ -25,38 +26,19 @@ export class BateauComponent implements OnInit, AfterViewInit { bateau?: Bateau; expeditionsBateau?: ExpeditionBateau[]; - url = environment.directusUrl; - @ViewChild('globeGL') el?: ElementRef<HTMLElement>; - constructor( - private _renderer2: Renderer2, - @Inject(DOCUMENT) private _document: Document, private _bateauService: BateauService, ) { } ngOnInit(): void { - // const script = this._renderer2.createElement('script'); - // script.type = `text/javascript`; - // script.text = ` - // const myGlobe = Globe(); - // myGlobe(document.getElementById('globeGL')) - // .globeImageUrl("/assets/img/terre.jpg") - // .bumpImageUrl("https://unpkg.com/three-globe@2.21.3/example/img/earth-topology.png") - // .backgroundColor("rgba(0, 0, 0, 0)") - // .showAtmosphere(false) - // .height(600); - // const t = myGlobe.controls(); - // t.enableZoom = false; - // t.autoRotate = true; - // `; - this._getBateau(); this._getExpeditionsBateau(); } ngAfterViewInit() { + // Afficher le globe après avoir initialisé la vue const myGlobe = Globe(); if (this.el) { myGlobe(this.el.nativeElement) @@ -85,4 +67,5 @@ export class BateauComponent implements OnInit, AfterViewInit { getImageMission(nom: string): string { return getUrlImage(nom, "moyenne"); } + } diff --git a/src/app/pages/contact/contact.component.ts b/src/app/pages/contact/contact.component.ts index cd7e9975f4b17b3d10edbda551addbbb99bb2a4f..1b5ef4527f4430160c9dfcb0c4d1c202743391cf 100644 --- a/src/app/pages/contact/contact.component.ts +++ b/src/app/pages/contact/contact.component.ts @@ -15,12 +15,14 @@ import {AssociationService} from "../../services/association/association.service }) export class ContactComponent implements OnInit { + // Icons faEnvelope = faEnvelope; faYoutube = faYoutube; faInstagram = faInstagram; faLinkedin = faLinkedin; faFacebook = faFacebook; + // Formulaire de contact contactForm: FormGroup = this._fb.group({ name: ['', [Validators.required]], email: ['', [Validators.required]], @@ -31,12 +33,14 @@ export class ContactComponent implements OnInit { message: ['', [Validators.required]] }); + // Formulaire de newsletters newsletterForm: FormGroup = this._fb.group({ email: ['', [Validators.required]], }); isSelect: string = ''; + // TODO a revoir pour le typage email: string | undefined = ''; youtube: string | undefined = ''; instagram: string | undefined = ''; @@ -55,6 +59,16 @@ export class ContactComponent implements OnInit { this._getSocials(); } + private _getSocials(): void { + this._associationService.getAssociation().then(association => { + this.email = association?.mail; + this.youtube = association?.youtube; + this.instagram = association?.instagram; + this.linkedin = association?.linkedin; + this.facebook = association?.facebook; + }); + } + checkOption(e: any) { this.isSelect = e.target.value; } @@ -81,14 +95,4 @@ export class ContactComponent implements OnInit { this._modalService.openContribuer(); } - private _getSocials(): void { - this._associationService.getAssociation().then(data => { - this.email = data?.mail; - this.youtube = data?.youtube; - this.instagram = data?.instagram; - this.linkedin = data?.linkedin; - this.facebook = data?.facebook; - }); - } - } diff --git a/src/app/pages/expedition/expedition.component.ts b/src/app/pages/expedition/expedition.component.ts index 672b3af19c77f843f310ac662d8cf966bf4af08d..f086a25c4526f9cff15e63d2bfd57d6c82c3da0b 100644 --- a/src/app/pages/expedition/expedition.component.ts +++ b/src/app/pages/expedition/expedition.component.ts @@ -27,7 +27,7 @@ export class ExpeditionComponent implements OnInit { photos: Photo[] = []; videos: Video[] = []; podcasts: Podcast[] = []; - temoignages: Temoignage[] | undefined = []; + temoignages: Temoignage[] = []; customOptions: OwlOptions = { loop: true, @@ -85,21 +85,6 @@ export class ExpeditionComponent implements OnInit { this._membreService.getFonctions().then(fonctions => this.fonctions = fonctions); } - getFonctionsWithId(fonctionId: number): string { - return this.fonctions.find(e => e.id === fonctionId)?.nom ?? ''; - } - - getDisplayMembres(): Membre[] { - if (this.expedition) { - return this.membres.filter(e => this.expedition!.membresId.includes(e.id)) - } - return []; - } - - getImages(img: string): string { - return getUrlImage(img, 'moyenne'); - } - private _getPhotos(id: number): void { this._mediathequeService.getPhotosByExpeditionId(id).then(photos => this.photos = photos); } @@ -116,6 +101,21 @@ export class ExpeditionComponent implements OnInit { this._mediathequeService.getPodcastsByExpeditionId(id).then(podcasts => this.podcasts = podcasts); } + getFonctionsWithId(fonctionId: number): string { + return this.fonctions.find(e => e.id === fonctionId)?.nom ?? ''; + } + + getDisplayMembres(): Membre[] { + if (this.expedition) { + return this.membres.filter(e => this.expedition!.membresId.includes(e.id)) + } + return []; + } + + getImages(img: string): string { + return getUrlImage(img, 'moyenne'); + } + getMemberById(id: number): Membre | undefined { return this.membres.find(membre => membre.id == id); } diff --git a/src/app/pages/mediatheque/mediatheque.component.html b/src/app/pages/mediatheque/mediatheque.component.html index aedebdcafdcb0597e4b6f3552cc149782585d3f4..53bc56eaf57e3c353b8605cdb1f16db5833b8388 100644 --- a/src/app/pages/mediatheque/mediatheque.component.html +++ b/src/app/pages/mediatheque/mediatheque.component.html @@ -24,7 +24,7 @@ </section> <section class="section" *ngIf="photos.length > 0"> <h2 class="section__title">Nos photos</h2> - <owl-carousel-o class="swiper cards" [options]="customOptions" #carouselPhoto> + <owl-carousel-o class="swiper cards" [options]="customImageOptions" #carouselPhoto> <ng-template carouselSlide *ngFor="let photo of photos"> <figure class="card" (click)="makeBigger(getLink(photo.photo))"> <div class="card__imgContainer"> diff --git a/src/app/pages/mediatheque/mediatheque.component.ts b/src/app/pages/mediatheque/mediatheque.component.ts index 5e426040ea5d4cb2dce4972408009d3ef9b6d402..d1e163e6bfae78580b96d5c9b2fd278fa38231b1 100644 --- a/src/app/pages/mediatheque/mediatheque.component.ts +++ b/src/app/pages/mediatheque/mediatheque.component.ts @@ -19,8 +19,7 @@ import { Film } from "../../modeles/film"; }) export class MediathequeComponent implements OnInit { - imgSrc: string = ""; - + imgSrc: string = ''; isShow: boolean = false; expeditions: Expedition[] = []; @@ -31,8 +30,7 @@ export class MediathequeComponent implements OnInit { podcasts: Podcast[] = []; films: Film[] = []; - - customOptions: OwlOptions = { + customImageOptions: OwlOptions = { dots: false, responsive: { 0: { @@ -112,7 +110,7 @@ export class MediathequeComponent implements OnInit { return getUrlImage(link, "moyenne"); } - makeBigger(img: string) { + makeBigger(img: string): void { this.imgSrc = img; this.isShow = true; } diff --git a/src/app/services/association/association.service.ts b/src/app/services/association/association.service.ts index dd1db7d8f5e78ef943189862c2c41fb64d020d72..927791b718a030c8e4b6b7ddd02fd16f6ba7bc80 100644 --- a/src/app/services/association/association.service.ts +++ b/src/app/services/association/association.service.ts @@ -14,6 +14,7 @@ export class AssociationService { private association?: Association; private missions: Mission[] = []; private chiffres: Chiffre[] = []; + // TODO il faut récuperer les chiffres private _chiffre?: Chiffre; constructor(private traductionService: TraductionService) { } diff --git a/src/app/services/bateau/bateau.service.ts b/src/app/services/bateau/bateau.service.ts index 3800334921f426edcfba19254a6af7748366587b..a232517eee1f1556b2b69196e613255fbc800519 100644 --- a/src/app/services/bateau/bateau.service.ts +++ b/src/app/services/bateau/bateau.service.ts @@ -11,7 +11,6 @@ import { TraductionService } from '../traduction/traduction.service'; }) export class BateauService { - // variables private directus: Directus<any> = directus; private bateau?: Bateau; private expeditionsBateau: ExpeditionBateau[] = []; diff --git a/src/app/services/expedition/expedition.service.ts b/src/app/services/expedition/expedition.service.ts index 065304c04d445c4772ccec15589218271dbad5bd..3609a788e77c3768ed4b0784cd6481b9d90260d5 100644 --- a/src/app/services/expedition/expedition.service.ts +++ b/src/app/services/expedition/expedition.service.ts @@ -3,7 +3,6 @@ import { directus } from 'src/constantes'; import { TraductionService } from '../traduction/traduction.service'; import { Expedition } from './../../modeles/expedition'; import { Temoignage } from './../../modeles/temoignage'; -import {Photo} from "../../modeles/photo"; @Injectable({ providedIn: 'root' diff --git a/src/app/services/mediatheque/mediatheque.service.ts b/src/app/services/mediatheque/mediatheque.service.ts index 4caac15807284bcfa1575830bdab6c53399c5e37..25d9df840e6f8c22b8a8da674fae1be683ffa396 100644 --- a/src/app/services/mediatheque/mediatheque.service.ts +++ b/src/app/services/mediatheque/mediatheque.service.ts @@ -13,7 +13,6 @@ import { TraductionService } from '../traduction/traduction.service'; }) export class MediathequeService { - // variables private directus: Directus<any> = directus; private photos: Photo[] = []; private videos: Video[] = []; diff --git a/src/app/services/membre/membre.service.ts b/src/app/services/membre/membre.service.ts index f6e90dac015c409cd1247b8f046a073f2c675805..7719453f6d647c305582ef05e735aa36aaab2461 100644 --- a/src/app/services/membre/membre.service.ts +++ b/src/app/services/membre/membre.service.ts @@ -10,7 +10,6 @@ import { TraductionService } from '../traduction/traduction.service'; }) export class MembreService { - // variables private membres: Membre[] = []; private equipes: Equipe[] = []; private fonctions: Fonction[] = []; diff --git a/src/app/services/newsletter/newsletter.service.ts b/src/app/services/newsletter/newsletter.service.ts index 00041f7154de97a332f76a5b2270550245545233..e63bccc3de9c1c6ad23eb731a881655f452d1032 100644 --- a/src/app/services/newsletter/newsletter.service.ts +++ b/src/app/services/newsletter/newsletter.service.ts @@ -7,6 +7,7 @@ import {Directus} from "@directus/sdk"; }) export class NewsletterService { + // TODO probleme ici quel directus est utilisé ? private directus: Directus<any> = directus; constructor() { } diff --git a/src/app/services/pedagogie/pedagogie.service.ts b/src/app/services/pedagogie/pedagogie.service.ts index 85c06a45e80a8d725859d5f0f62fdbb5aa7d9f73..8e94a42ddddf88c04c2e4e1deb5f56a97afc5b28 100644 --- a/src/app/services/pedagogie/pedagogie.service.ts +++ b/src/app/services/pedagogie/pedagogie.service.ts @@ -11,7 +11,7 @@ import {Niveau} from "../../modeles/niveau"; }) export class PedagogieService { - // variables + // TODO obligé de déclarer directus comme ca ? on ne peut pas directement l'exploiter comme on est pas dans la vue ? private directus: Directus<any> = directus; private fiches: Fiche[] = []; private fichesVideo: FicheVideo[] = []; diff --git a/src/app/services/sponsor/sponsor.service.ts b/src/app/services/sponsor/sponsor.service.ts index 3196922575ccdb1e5379ef6970967e4f82bc3917..7173f2e74647f6f11ae46a3fb448f7b57b7d4e1f 100644 --- a/src/app/services/sponsor/sponsor.service.ts +++ b/src/app/services/sponsor/sponsor.service.ts @@ -10,7 +10,6 @@ import { TraductionService } from '../traduction/traduction.service'; }) export class SponsorService { - // variables private directus: Directus<any> = directus; private sponsors: Sponsor[] = []; private categories: CategorieSponsors[] = []; diff --git a/src/app/shared/footer/footer.component.ts b/src/app/shared/footer/footer.component.ts index 7c490951d986e8c82adae9f695c42088f411724f..8e1f059ae6c7017a4ee653388be860fe248b2dcd 100644 --- a/src/app/shared/footer/footer.component.ts +++ b/src/app/shared/footer/footer.component.ts @@ -13,6 +13,12 @@ import { NewsletterService } from 'src/app/services/newsletter/newsletter.servic }) export class FooterComponent implements OnInit { + faYoutube = faYoutube; + faInstagram = faInstagram; + faLinkedin = faLinkedin; + faFacebook = faFacebook; + faEnvelope= faEnvelope; + newsletterForm: FormGroup = this._fb.group({ email: ['', [Validators.required]], }); @@ -24,12 +30,6 @@ export class FooterComponent implements OnInit { private _modalService: ModalService, ) { } - faYoutube = faYoutube; - faInstagram = faInstagram; - faLinkedin = faLinkedin; - faFacebook = faFacebook; - faEnvelope= faEnvelope; - ngOnInit(): void { } diff --git a/src/app/shared/header/header.component.ts b/src/app/shared/header/header.component.ts index 0d1e8d96dbaa942698015c36214e77377eac28f0..3a5a6d1fe32a1b1ffebc6484c11578a2c1af4d5b 100644 --- a/src/app/shared/header/header.component.ts +++ b/src/app/shared/header/header.component.ts @@ -17,6 +17,7 @@ export class HeaderComponent implements OnInit { } scroll(): void { + // Scroller vers le bas de 100vh window.scrollBy(0, window.innerHeight); } diff --git a/src/app/shared/numbers/numbers.component.ts b/src/app/shared/numbers/numbers.component.ts index e1d242c67846306c45597e43e73700afe5696421..099f1fc9aca0c041a157420e2005295009a8a261 100644 --- a/src/app/shared/numbers/numbers.component.ts +++ b/src/app/shared/numbers/numbers.component.ts @@ -9,6 +9,8 @@ import { CountUpOptions } from 'countup.js'; }) export class NumbersComponent implements OnInit { + @Input() numbers: Chiffre[] = []; + options: CountUpOptions = { useGrouping: false, duration: 9, @@ -16,13 +18,7 @@ export class NumbersComponent implements OnInit { constructor() { } - @Input() numbers: Chiffre[] = []; - ngOnInit(): void { } - test() { - console.log('coucou'); - } - } diff --git a/src/app/shared/vignette-membre/vignette-membre.component.ts b/src/app/shared/vignette-membre/vignette-membre.component.ts index 65fd61306c9e1eec8c9fd7136e5486b48b32804e..563c4188a7b59866e289741eb1aeab7de6a755b3 100644 --- a/src/app/shared/vignette-membre/vignette-membre.component.ts +++ b/src/app/shared/vignette-membre/vignette-membre.component.ts @@ -11,16 +11,16 @@ import { faInstagram, faFacebook } from '@fortawesome/free-brands-svg-icons'; }) export class VignetteMembreComponent implements OnInit { - faInstagram = faInstagram; - faFacebook = faFacebook; - faGlobe = faGlobe; - @Input() membre?: Membre; @Input() fonction?: string; @Input() showInfos: boolean = true; @Input() summary: boolean = false; @Input() numberVolunteer?: number; + faInstagram = faInstagram; + faFacebook = faFacebook; + faGlobe = faGlobe; + constructor() { } ngOnInit(): void {