From 547fbfc80c235ba01a9ae2931de593f528a487a7 Mon Sep 17 00:00:00 2001 From: Clemente Raposo Date: Wed, 6 Nov 2024 13:03:13 +0000 Subject: [PATCH] Add panelCollapseMode signal to subpanel component --- .../subpanel/components/subpanel/subpanel.component.html | 6 +++--- .../subpanel/components/subpanel/subpanel.component.ts | 1 + .../containers/subpanel/store/subpanel/subpanel.store.ts | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/core/app/core/src/lib/containers/subpanel/components/subpanel/subpanel.component.html b/core/app/core/src/lib/containers/subpanel/components/subpanel/subpanel.component.html index b29436165..2853d0503 100644 --- a/core/app/core/src/lib/containers/subpanel/components/subpanel/subpanel.component.html +++ b/core/app/core/src/lib/containers/subpanel/components/subpanel/subpanel.component.html @@ -26,15 +26,15 @@ */ --> - - + +
diff --git a/core/app/core/src/lib/containers/subpanel/components/subpanel/subpanel.component.ts b/core/app/core/src/lib/containers/subpanel/components/subpanel/subpanel.component.ts index 555c63f4d..51e90442f 100644 --- a/core/app/core/src/lib/containers/subpanel/components/subpanel/subpanel.component.ts +++ b/core/app/core/src/lib/containers/subpanel/components/subpanel/subpanel.component.ts @@ -55,6 +55,7 @@ export class SubpanelComponent implements OnInit { @Input() maxColumns$: Observable; @Input() onClose: Function; @Input() filterConfig: FilterConfig; + @Input() panelHeaderButtonClass: string = 'btn btn-sm btn-outline-light'; closeButton: ButtonInterface; adapter: SubpanelTableAdapter; diff --git a/core/app/core/src/lib/containers/subpanel/store/subpanel/subpanel.store.ts b/core/app/core/src/lib/containers/subpanel/store/subpanel/subpanel.store.ts index 77486870d..3c4d10981 100644 --- a/core/app/core/src/lib/containers/subpanel/store/subpanel/subpanel.store.ts +++ b/core/app/core/src/lib/containers/subpanel/store/subpanel/subpanel.store.ts @@ -24,7 +24,7 @@ * the words "Supercharged by SuiteCRM". */ -import {Injectable} from '@angular/core'; +import {Injectable, signal, WritableSignal} from '@angular/core'; import {StateStore} from '../../../../store/state'; import {RecordList, RecordListStore} from '../../../../store/record-list/record-list.store'; import {BehaviorSubject, forkJoin, Observable, Subscription} from 'rxjs'; @@ -47,6 +47,7 @@ import {map, take, tap} from "rxjs/operators"; import {MetadataStore} from "../../../../store/metadata/metadata.store.service"; import {SavedFilter, SavedFilterMap} from "../../../../store/saved-filters/saved-filter.model"; import {UserPreferenceStore} from "../../../../store/user-preference/user-preference.store"; +import {PanelCollapseMode} from "../../../../components/panel/panel.component"; export interface SubpanelStoreMap { [key: string]: SubpanelStore; @@ -71,6 +72,7 @@ export class SubpanelStore implements StateStore { columns$: Observable; metadata: SubPanelDefinition; loading$: Observable; + panelCollapseMode: WritableSignal = signal('closable'); // Filter variables filterList: FilterListStore;