fixed management page
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
<input type="text" id="name" name="name" [(ngModel)]="newUser.name">
|
||||
</div>
|
||||
<div>
|
||||
<label for="username">Email:</label>
|
||||
<label for="username">Username:</label>
|
||||
<input type="text" id="username" name="username" [(ngModel)]="newUser.username">
|
||||
</div>
|
||||
<div>
|
||||
@@ -135,32 +135,32 @@
|
||||
<form (submit)="addWaypoint(newWaypoint.name, newWaypoint.lat, newWaypoint.lon, newWaypoint.description, newWaypoint.image, newWaypoint.locationName)">
|
||||
<div>
|
||||
<label for="waypointName">Waypoint:</label>
|
||||
<input type="text" id="waypointName" name="waypointName" [(ngModel)]="newLocation.location">
|
||||
<input type="text" id="waypointName" name="waypointName" [(ngModel)]="newWaypoint.name">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="waypointLat">Latitude:</label>
|
||||
<input type="text" id="waypointLat" name="waypointLat" [(ngModel)]="newLocation.location">
|
||||
<input type="text" id="waypointLat" name="waypointLat" [(ngModel)]="newWaypoint.lat">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="waypointLon">Longitude:</label>
|
||||
<input type="text" id="waypointLon" name="waypointLon" [(ngModel)]="newLocation.location">
|
||||
<input type="text" id="waypointLon" name="waypointLon" [(ngModel)]="newWaypoint.lon">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="description">Description:</label>
|
||||
<input type="text" id="description" name="description" [(ngModel)]="newLocation.location">
|
||||
<input type="text" id="description" name="description" [(ngModel)]="newWaypoint.description">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="image">Image (Base64):</label>
|
||||
<input type="text" id="image" name="image" [(ngModel)]="newLocation.location">
|
||||
<input type="text" id="image" name="image" [(ngModel)]="newWaypoint.image">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="locationName">Location Name:</label>
|
||||
<select [(ngModel)]="newWaypoint.locationName" id="locationName">
|
||||
<select [(ngModel)]="newWaypoint.locationName" id="locationName" name="locationName">
|
||||
<option *ngFor="let location of locationList" [value]="location.location">{{ location.location }}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -79,18 +79,24 @@ export class ManagementComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
const newUser: User = {id, name, username: username, password: password};
|
||||
this.userList.push(newUser);
|
||||
this.showUserForm = false;
|
||||
this.newUser = {id: 0, name: '', username: '', password: ''};
|
||||
}
|
||||
|
||||
addLocation(name: string, region: string, lat: string, lon: string) {
|
||||
const id = this.locationList.length + 1;
|
||||
const newLocation: Location = {id, location: name, region: region, lat: lat, lon: lon};
|
||||
this.locationList.push(newLocation);
|
||||
this.showLocationForm = false;
|
||||
this.newLocation = {id: 0, location: '', region: '', lat: '', lon: ''};
|
||||
}
|
||||
|
||||
addWaypoint(name: string, lat: string, lon: string, description: string, image: string, locationName: string) {
|
||||
console.log(locationName)
|
||||
const id = this.waypointList.length + 1;
|
||||
const newWaypoint: Waypoint = {id, name, lat: lat, lon: lon, description: description, image: image, locationName: locationName};
|
||||
this.waypointList.push(newWaypoint);
|
||||
this.showWaypointForm = false;
|
||||
this.newWaypoint = {id: 0, name: '', lat: '', lon: '', description: '', image: '', locationName: ''};
|
||||
}
|
||||
|
||||
openUserForm() {
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
@tailwind utilities;
|
||||
|
||||
body{
|
||||
overflow-y: hidden;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user