Added user management for groups. Improved user experience slightly. Added some error checks for request acks.

This commit is contained in:
Tom
2025-03-20 12:33:27 +00:00
parent 2f2215b041
commit 1acda7978e
40 changed files with 623 additions and 52 deletions

View File

@@ -51,7 +51,7 @@
}
</mat-form-field>
</mat-card-content>
<mat-card-actions>
<mat-card-actions align="end">
@if (isNew) {
<button mat-button
(click)="save()">

View File

@@ -89,7 +89,13 @@ export class PolicyItemEditComponent implements OnInit, AfterViewInit {
if (this.isNew) {
this.client.first((d: any) => d.op == 4 && d.d.request.type == 'create_policy' && d.d.data.group_id == group_id && d.d.data.path == path && d.d.data.usage == usage && d.d.data.span == span)
.subscribe({
next: (d) => this.dialogRef.close(d.d.data),
next: (d) => {
if (d.d.error) {
// TODO: update & show response error message.
} else {
this.dialogRef.close(d.d.data);
}
},
error: () => this.waitForResponse = false,
complete: () => this.waitForResponse = false,
});
@@ -97,7 +103,13 @@ export class PolicyItemEditComponent implements OnInit, AfterViewInit {
} else {
this.client.first((d: any) => d.op == 4 && d.d.request.type == 'update_policy' && d.d.data.id == this.data.policy_id && d.d.data.group_id == group_id && d.d.data.path == path && d.d.data.usage == usage && d.d.data.span == span)
.subscribe({
next: (d) => this.dialogRef.close(d.d.data),
next: (d) => {
if (d.d.error) {
// TODO: update & show response error message.
} else {
this.dialogRef.close(d.d.data);
}
},
error: () => this.waitForResponse = false,
complete: () => this.waitForResponse = false,
});