From 65a046c639dc85a151d0de5ab18696c9f470aafd Mon Sep 17 00:00:00 2001 From: Roman Nastyuk Date: Wed, 1 Oct 2025 11:50:10 +0300 Subject: [PATCH 1/3] fix(ang-842): fixed wiki delete button bug --- .../wiki/wiki-list/wiki-list.component.html | 39 ++++++++++++++----- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/src/app/shared/components/wiki/wiki-list/wiki-list.component.html b/src/app/shared/components/wiki/wiki-list/wiki-list.component.html index a5784ca7f..dd63ab679 100644 --- a/src/app/shared/components/wiki/wiki-list/wiki-list.component.html +++ b/src/app/shared/components/wiki/wiki-list/wiki-list.component.html @@ -71,20 +71,41 @@

{{ item.label | translate }}

} @else {
- +
@if (canEdit()) { - +
+ + @if (list().length) { + @if (!isHomeWikiSelected()) { + + } + } +
} } } From dbf273f596b53bba5083ac49929366e9f9ff9e98 Mon Sep 17 00:00:00 2001 From: Roman Nastyuk Date: Wed, 1 Oct 2025 12:11:16 +0300 Subject: [PATCH 2/3] fix(ang-842): fixed location bug in create component dialog --- .../add-component-dialog.component.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/features/project/overview/components/add-component-dialog/add-component-dialog.component.ts b/src/app/features/project/overview/components/add-component-dialog/add-component-dialog.component.ts index f852e410c..accbcd6a3 100644 --- a/src/app/features/project/overview/components/add-component-dialog/add-component-dialog.component.ts +++ b/src/app/features/project/overview/components/add-component-dialog/add-component-dialog.component.ts @@ -84,10 +84,13 @@ export class AddComponentDialogComponent implements OnInit { constructor() { effect(() => { const storageLocations = this.storageLocations(); - if (!storageLocations) return; + if (!storageLocations?.length) return; - const defaultRegion = this.currentUser()?.defaultRegionId || storageLocations[0].id; - this.componentForm.controls[ComponentFormControls.StorageLocation].setValue(defaultRegion); + const currentStorageLocation = this.componentForm.controls[ComponentFormControls.StorageLocation].value; + if (!currentStorageLocation) { + const defaultRegion = this.currentUser()?.defaultRegionId || storageLocations[0].id; + this.componentForm.controls[ComponentFormControls.StorageLocation].setValue(defaultRegion); + } }); } From c3dda2f03858b9119566f9e4b2cf2efe962d1e62 Mon Sep 17 00:00:00 2001 From: Roman Nastyuk Date: Wed, 1 Oct 2025 12:38:15 +0300 Subject: [PATCH 3/3] fix(ang-842): refactor --- .../add-component-dialog.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/features/project/overview/components/add-component-dialog/add-component-dialog.component.ts b/src/app/features/project/overview/components/add-component-dialog/add-component-dialog.component.ts index accbcd6a3..3c3c2b049 100644 --- a/src/app/features/project/overview/components/add-component-dialog/add-component-dialog.component.ts +++ b/src/app/features/project/overview/components/add-component-dialog/add-component-dialog.component.ts @@ -86,10 +86,10 @@ export class AddComponentDialogComponent implements OnInit { const storageLocations = this.storageLocations(); if (!storageLocations?.length) return; - const currentStorageLocation = this.componentForm.controls[ComponentFormControls.StorageLocation].value; - if (!currentStorageLocation) { - const defaultRegion = this.currentUser()?.defaultRegionId || storageLocations[0].id; - this.componentForm.controls[ComponentFormControls.StorageLocation].setValue(defaultRegion); + const storageLocationControl = this.componentForm.controls[ComponentFormControls.StorageLocation]; + if (!storageLocationControl.value) { + const defaultRegion = this.currentUser()?.defaultRegionId ?? storageLocations[0].id; + storageLocationControl.setValue(defaultRegion); } }); }