Lots of work around importing plans from urls, also keeping track of the url to allow updating the plan later on if there's been a change.
parent
21333908ec
commit
48d1dda124
@ -0,0 +1,7 @@
|
||||
<label>Plan name</label><input matInput type="text" [(ngModel)]="data2.name"><br>
|
||||
<label>Url</label><input matInput type="text" [(ngModel)]="data2.url">
|
||||
|
||||
<div mat-dialog-actions>
|
||||
<button mat-button (click)="cancel()">Cancel</button>
|
||||
<button mat-button [mat-dialog-close]="data2" cdkFocusInitial>Save</button>
|
||||
</div>
|
@ -0,0 +1,31 @@
|
||||
import { Component, Inject } from "@angular/core";
|
||||
import { FormsModule } from "@angular/forms";
|
||||
import { MatButtonModule } from "@angular/material/button";
|
||||
import { MatDialogModule, MatDialogRef, MAT_DIALOG_DATA } from "@angular/material/dialog";
|
||||
import { MatFormFieldModule } from "@angular/material/form-field";
|
||||
import { MatInputModule } from "@angular/material/input";
|
||||
|
||||
interface UrlData {
|
||||
url: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'url-dialog',
|
||||
templateUrl: 'url-dialog.component.html',
|
||||
standalone: true,
|
||||
imports: [MatDialogModule, MatFormFieldModule, MatInputModule, FormsModule, MatButtonModule],
|
||||
})
|
||||
export class UrlDialog {
|
||||
public data2: UrlData;
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<UrlDialog>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: UrlData,
|
||||
) {
|
||||
this.data2 = data;
|
||||
}
|
||||
|
||||
cancel() {
|
||||
this.dialogRef.close();
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 457 B |
Loading…
Reference in new issue