mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
[SM-611] Fix edit dialog & overview secrets refresh (#4951)
* Fix edit dialog * Have secrets list refresh during project deletion * Fix input required for init edit * Fixing delete prompt for edit dialog
This commit is contained in:
@@ -78,7 +78,7 @@ export class SecretDialogComponent implements OnInit {
|
||||
name: secret.name,
|
||||
value: secret.value,
|
||||
notes: secret.note,
|
||||
project: secret.projects[0]?.id,
|
||||
project: secret.projects[0]?.id ?? "",
|
||||
});
|
||||
this.loading = false;
|
||||
}
|
||||
@@ -154,12 +154,18 @@ export class SecretDialogComponent implements OnInit {
|
||||
private getSecretListView() {
|
||||
const secretListViews: SecretListView[] = [];
|
||||
const emptyProjects: SecretProjectView[] = [];
|
||||
const selectedProject = [this.projects.find((p) => p.id == this.formGroup.value.project)];
|
||||
|
||||
const secretListView = new SecretListView();
|
||||
|
||||
if (this.formGroup.value.project) {
|
||||
secretListView.projects = [this.projects.find((p) => p.id == this.formGroup.value.project)];
|
||||
} else {
|
||||
secretListView.projects = emptyProjects;
|
||||
}
|
||||
|
||||
secretListView.organizationId = this.data.organizationId;
|
||||
secretListView.id = this.data.secretId;
|
||||
secretListView.name = this.formGroup.value.name;
|
||||
secretListView.projects = selectedProject ? selectedProject : emptyProjects;
|
||||
secretListViews.push(secretListView);
|
||||
return secretListViews;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user