add frontend ng
This commit is contained in:
parent
80d52ff819
commit
83ef7bab6c
18 changed files with 188 additions and 4 deletions
1
frontend/src/app/forms/edit-form/edit-form.html
Normal file
1
frontend/src/app/forms/edit-form/edit-form.html
Normal file
|
@ -0,0 +1 @@
|
|||
<p>edit-form works!</p>
|
0
frontend/src/app/forms/edit-form/edit-form.scss
Normal file
0
frontend/src/app/forms/edit-form/edit-form.scss
Normal file
23
frontend/src/app/forms/edit-form/edit-form.spec.ts
Normal file
23
frontend/src/app/forms/edit-form/edit-form.spec.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { EditForm } from './edit-form';
|
||||
|
||||
describe('EditForm', () => {
|
||||
let component: EditForm;
|
||||
let fixture: ComponentFixture<EditForm>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [EditForm]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(EditForm);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
11
frontend/src/app/forms/edit-form/edit-form.ts
Normal file
11
frontend/src/app/forms/edit-form/edit-form.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-edit-form',
|
||||
imports: [],
|
||||
templateUrl: './edit-form.html',
|
||||
styleUrl: './edit-form.scss'
|
||||
})
|
||||
export class EditForm {
|
||||
|
||||
}
|
1
frontend/src/app/forms/osm/osm.html
Normal file
1
frontend/src/app/forms/osm/osm.html
Normal file
|
@ -0,0 +1 @@
|
|||
<p>osm works!</p>
|
0
frontend/src/app/forms/osm/osm.scss
Normal file
0
frontend/src/app/forms/osm/osm.scss
Normal file
23
frontend/src/app/forms/osm/osm.spec.ts
Normal file
23
frontend/src/app/forms/osm/osm.spec.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { Osm } from './osm';
|
||||
|
||||
describe('Osm', () => {
|
||||
let component: Osm;
|
||||
let fixture: ComponentFixture<Osm>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [Osm]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(Osm);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
11
frontend/src/app/forms/osm/osm.ts
Normal file
11
frontend/src/app/forms/osm/osm.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-osm',
|
||||
imports: [],
|
||||
templateUrl: './osm.html',
|
||||
styleUrl: './osm.scss'
|
||||
})
|
||||
export class Osm {
|
||||
|
||||
}
|
1
frontend/src/app/maps/all-events/all-events.html
Normal file
1
frontend/src/app/maps/all-events/all-events.html
Normal file
|
@ -0,0 +1 @@
|
|||
<p>all-events works!</p>
|
0
frontend/src/app/maps/all-events/all-events.scss
Normal file
0
frontend/src/app/maps/all-events/all-events.scss
Normal file
23
frontend/src/app/maps/all-events/all-events.spec.ts
Normal file
23
frontend/src/app/maps/all-events/all-events.spec.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AllEvents } from './all-events';
|
||||
|
||||
describe('AllEvents', () => {
|
||||
let component: AllEvents;
|
||||
let fixture: ComponentFixture<AllEvents>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [AllEvents]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(AllEvents);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
11
frontend/src/app/maps/all-events/all-events.ts
Normal file
11
frontend/src/app/maps/all-events/all-events.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-all-events',
|
||||
imports: [],
|
||||
templateUrl: './all-events.html',
|
||||
styleUrl: './all-events.scss'
|
||||
})
|
||||
export class AllEvents {
|
||||
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
import { Component } from '@angular/core';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import {Menu} from './menu/menu';
|
||||
import { OedbApi } from '../../services/oedb-api';
|
||||
|
||||
@Component({
|
||||
selector: 'app-home',
|
||||
|
@ -10,4 +11,12 @@ import {Menu} from './menu/menu';
|
|||
styleUrl: './home.scss'
|
||||
})
|
||||
export class Home {
|
||||
|
||||
OedbApi = inject(OedbApi);
|
||||
|
||||
constructor() {
|
||||
this.OedbApi.getEvents({}).subscribe((events) => {
|
||||
console.log(events);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
<input type="text" value="" placeholder="Rechercher une catégorie d'évènement">
|
||||
</div>
|
||||
<div id="what_categories">
|
||||
|
||||
|
||||
@for (oedbc of oedb_what_categories; track $index) {
|
||||
<div class="category">
|
||||
<div class="emoji">
|
||||
|
@ -63,8 +61,24 @@
|
|||
<ul>
|
||||
<li></li>
|
||||
</ul>
|
||||
(bouton pour exporter)
|
||||
</div>
|
||||
<div id="actions">
|
||||
|
||||
(actions)
|
||||
<button class="button">exporter</button>
|
||||
<button class="button">envoyer</button>
|
||||
<button class="button">créer</button>
|
||||
<button class="button">supprimer</button>
|
||||
<button class="button">oui, toujours là</button>
|
||||
<button class="button">non plus là</button>
|
||||
<button class="button">pouet pouet!</button>
|
||||
</div>
|
||||
<div id="user_infos">
|
||||
login OSM:
|
||||
<a href="https://www.openstreetmap.org/user/tykayn">tykayn</a>
|
||||
<br>
|
||||
points de l'utilisateur:
|
||||
12 points.
|
||||
</div>
|
||||
|
||||
</menu>
|
||||
|
|
16
frontend/src/app/services/oedb-api.spec.ts
Normal file
16
frontend/src/app/services/oedb-api.spec.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { OedbApi } from './oedb-api';
|
||||
|
||||
describe('OedbApi', () => {
|
||||
let service: OedbApi;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(OedbApi);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
16
frontend/src/app/services/oedb-api.ts
Normal file
16
frontend/src/app/services/oedb-api.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class OedbApi {
|
||||
private baseUrl = 'https://api.openeventdatabase.org';
|
||||
|
||||
constructor(private http: HttpClient) {
|
||||
}
|
||||
|
||||
getEvents(params: any) {
|
||||
return this.http.get(`${this.baseUrl}/event`, { params });
|
||||
}
|
||||
}
|
16
frontend/src/app/services/osm-auth.spec.ts
Normal file
16
frontend/src/app/services/osm-auth.spec.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { OsmAuth } from '../osm-auth';
|
||||
|
||||
describe('OsmAuth', () => {
|
||||
let service: OsmAuth;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(OsmAuth);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
8
frontend/src/app/services/osm-auth.ts
Normal file
8
frontend/src/app/services/osm-auth.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class OsmAuth {
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue