added edit fonction

This commit is contained in:
2025-11-27 17:15:35 +01:00
parent 8d95127a46
commit 40b1c2620a
8 changed files with 77 additions and 15 deletions

View File

@@ -1,4 +1,4 @@
import {Component, Input, input} from '@angular/core';
import {Component, Input, input, output} from '@angular/core';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzModalModule } from 'ng-zorro-antd/modal';
import {NzIconDirective} from "ng-zorro-antd/icon";
@@ -10,9 +10,10 @@ import {NzIconDirective} from "ng-zorro-antd/icon";
styleUrls: ['./modal-nav.css'],
})
export class ModalNav {
@Input() nameIcon: string = '';
@Input() name: string = '';
nameIcon = input.required<string>()
name = input.required<string>()
ok = output<void>();
cancel = output<void>();
isVisible = false;
isOkLoading = false;
@@ -23,12 +24,14 @@ export class ModalNav {
handleOk(): void {
this.isOkLoading = true;
setTimeout(() => {
this.isVisible = false;
this.ok.emit();
this.isOkLoading = false;
}, 1000);
}
handleCancel(): void {
this.isVisible = false;
this.cancel.emit();
}
}