diff --git a/frontend/src/app/app.scss b/frontend/src/app/app.scss
index 8bd32c7..e69de29 100644
--- a/frontend/src/app/app.scss
+++ b/frontend/src/app/app.scss
@@ -1,3 +0,0 @@
-html{
- font-family: "Calibri", "Helvetica Neue", Helvetica, Arial, sans-serif;
-}
diff --git a/frontend/src/app/forms/edit-form/edit-form.html b/frontend/src/app/forms/edit-form/edit-form.html
index 021eb5f..db9d94a 100644
--- a/frontend/src/app/forms/edit-form/edit-form.html
+++ b/frontend/src/app/forms/edit-form/edit-form.html
@@ -94,20 +94,23 @@
@if (featureId()) {
}
+
@if (status().state !== 'idle') {
-
- @if (status().state === 'saving') {
-
{{status().message}}
- } @else if (status().state === 'saved') {
-
- } @else if (status().state === 'error') {
-
{{status().message}}
- }
+
+
+ @if (status().state === 'saving') {
+
{{status().message}}
+ } @else if (status().state === 'saved') {
+
+ } @else if (status().state === 'error') {
+
{{status().message}}
+ }
+
}
diff --git a/frontend/src/app/forms/edit-form/edit-form.ts b/frontend/src/app/forms/edit-form/edit-form.ts
index dec440d..0a6b4c9 100644
--- a/frontend/src/app/forms/edit-form/edit-form.ts
+++ b/frontend/src/app/forms/edit-form/edit-form.ts
@@ -220,10 +220,12 @@ export class EditForm implements OnChanges {
next: (res) => {
this.status.set({ state: 'saved', what: val.what, message: 'Évènement mis à jour' });
this.saved.emit(res);
+ setTimeout(() => this.status.set({ state: 'idle' }), 3000);
},
error: (err) => {
this.status.set({ state: 'error', what: val.what, message: 'Erreur lors de la mise à jour' });
console.error(err);
+ setTimeout(() => this.status.set({ state: 'idle' }), 3000);
}
});
} else {
@@ -231,10 +233,12 @@ export class EditForm implements OnChanges {
next: (res) => {
this.status.set({ state: 'saved', what: val.what, message: 'Évènement créé' });
this.created.emit(res);
+ setTimeout(() => this.status.set({ state: 'idle' }), 3000);
},
error: (err) => {
this.status.set({ state: 'error', what: val.what, message: 'Erreur lors de la création' });
console.error(err);
+ setTimeout(() => this.status.set({ state: 'idle' }), 3000);
}
});
}
@@ -254,14 +258,36 @@ export class EditForm implements OnChanges {
next: (res) => {
this.status.set({ state: 'saved', what: this.form.value.what, message: 'Évènement supprimé' });
this.deleted.emit(res);
+ setTimeout(() => this.status.set({ state: 'idle' }), 3000);
},
error: (err) => {
this.status.set({ state: 'error', what: this.form.value.what, message: 'Erreur lors de la suppression' });
console.error(err);
+ setTimeout(() => this.status.set({ state: 'idle' }), 3000);
}
});
}
+ onCancelEdit() {
+ this.selected = null;
+ this.featureId.set(null);
+ this.form.reset({
+ label: '',
+ description: '',
+ what: '',
+ where: '',
+ lat: '',
+ lon: '',
+ wikidata: '',
+ featureType: 'point',
+ type: 'unscheduled',
+ start: this.toLocalInputValue(new Date()),
+ stop: this.toLocalInputValue(new Date(new Date().getTime() + 24 * 3600 * 1000))
+ });
+ this.presetValues.set({});
+ this.status.set({ state: 'idle' });
+ }
+
private toLocalInputValue(d: string | Date): string {
const date = (typeof d === 'string') ? new Date(d) : d;
if (Number.isNaN(date.getTime())) return '';
diff --git a/frontend/src/app/forms/osm/osm.html b/frontend/src/app/forms/osm/osm.html
index 199c0f0..9fedcb8 100644
--- a/frontend/src/app/forms/osm/osm.html
+++ b/frontend/src/app/forms/osm/osm.html
@@ -1 +1,17 @@
-
osm works!
+
+ osm works!
+
+
+ @if(isLogginIn){
+
+ {{osmPseudo}}
+
+
+}
+@else{
+
+ pas connecté
+
+
+}
+
\ No newline at end of file
diff --git a/frontend/src/app/forms/osm/osm.ts b/frontend/src/app/forms/osm/osm.ts
index 9d27557..1a03de3 100644
--- a/frontend/src/app/forms/osm/osm.ts
+++ b/frontend/src/app/forms/osm/osm.ts
@@ -7,5 +7,14 @@ import { Component } from '@angular/core';
styleUrl: './osm.scss'
})
export class Osm {
+ osmPseudo: string='';
+ isLogginIn: any = false;
+ logout() {
+
+ }
+
+ login() {
+
+ }
}
diff --git a/frontend/src/app/maps/all-events/all-events.html b/frontend/src/app/maps/all-events/all-events.html
index fe2fb5b..c0f8348 100644
--- a/frontend/src/app/maps/all-events/all-events.html
+++ b/frontend/src/app/maps/all-events/all-events.html
@@ -4,4 +4,9 @@
+ @if (canRestoreOriginal) {
+