Added user management for groups. Improved user experience slightly. Added some error checks for request acks.
This commit is contained in:
@@ -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()">
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user