mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-08-29 21:00:39 +08:00
Add panelCollapseMode signal to subpanel component
This commit is contained in:
parent
199bda9b4d
commit
547fbfc80c
3 changed files with 7 additions and 4 deletions
|
@ -26,15 +26,15 @@
|
|||
*/
|
||||
-->
|
||||
<ng-container>
|
||||
<scrm-panel [title]="store.getTitle()" mode="closable" [close]="closeButton" bodyPadding="0" [klass]="'subpanel-' + store?.metadata?.name ?? ''">
|
||||
<span class="subpanel-icon pl-1" panel-icon-area>
|
||||
<scrm-panel [title]="store.getTitle()" [mode]="store?.panelCollapseMode() ?? 'closable'" [close]="closeButton" bodyPadding="0" [klass]="'subpanel-' + store?.metadata?.name ?? ''">
|
||||
<span class="subpanel-icon pl-1" panel-icon-area *ngIf="store.getIcon()">
|
||||
<scrm-image [image]="store.getIcon()"></scrm-image>
|
||||
</span>
|
||||
<span panel-header-button>
|
||||
<scrm-action-group-menu [config]="actionsAdapter"
|
||||
[actionContext]="getActionContext()"
|
||||
[actionLimitConfig]="'subpanelview_actions_limits'"
|
||||
buttonClass="btn btn-sm btn-outline-light"
|
||||
[buttonClass]="panelHeaderButtonClass"
|
||||
></scrm-action-group-menu>
|
||||
</span>
|
||||
<div panel-body>
|
||||
|
|
|
@ -55,6 +55,7 @@ export class SubpanelComponent implements OnInit {
|
|||
@Input() maxColumns$: Observable<number>;
|
||||
@Input() onClose: Function;
|
||||
@Input() filterConfig: FilterConfig;
|
||||
@Input() panelHeaderButtonClass: string = 'btn btn-sm btn-outline-light';
|
||||
|
||||
closeButton: ButtonInterface;
|
||||
adapter: SubpanelTableAdapter;
|
||||
|
|
|
@ -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<ColumnDefinition[]>;
|
||||
metadata: SubPanelDefinition;
|
||||
loading$: Observable<boolean>;
|
||||
panelCollapseMode: WritableSignal<PanelCollapseMode> = signal('closable');
|
||||
|
||||
// Filter variables
|
||||
filterList: FilterListStore;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue