Store in GIT

This commit is contained in:
2026-06-17 16:11:25 +02:00
parent 9998fbd104
commit 2418284092
115 changed files with 3466 additions and 0 deletions
@@ -0,0 +1,42 @@
import {Component, Input, OnInit} from '@angular/core';
import {User} from "../../../classes/user.class";
import {DataService} from './../../../services/data.service';
import {NgForm} from '@angular/forms';
@Component({
selector: 'edit-user-form',
templateUrl: './edit-user-form.component.html'
})
export class EditUserFormComponent implements OnInit {
@Input()model:User;
user:User;
constructor(private data: DataService) {
}
temp: string;
roles = ['Pilot', 'Student', 'Instructor'];
submitted = false;
ngOnInit()
{
this.user = new User(this.model.id, this.model.name, this.model.card, this.model.role);
}
onSubmit() {
this.model.name = this.user.name;
this.model.role = this.user.role;
this.submitted = true;
this.data.load().then(() => {
this.data.editUser(this.model).subscribe(b => this.temp = JSON.stringify(b));
console.log(this.temp);
})
}
}