Move record top-widgets to sidebar

This commit is contained in:
Clemente Raposo 2024-12-05 00:45:41 +00:00 committed by Jack Anderson
parent 8a7dfaddf8
commit efd3551a06

View file

@ -28,32 +28,12 @@
<!-- Start Record View Container Section -->
<div *ngIf="(vm$ | async) as vm"
class="record-view-container view-container container-fluid pt-3 pb-3 small-font">
class="record-view-container view-container container-fluid pt-0 pb-3 small-font">
<div class="row">
<ng-container *ngIf="!swapWidgets || (swapWidgets && !displayWidgets)">
<div class="col-lg-9" [ngClass]="{ 'col-lg-12': !sidebarWidgetConfig.show }">
<div class="container-fluid pl-0 pr-0">
<div *ngIf="loading" class="row no-gutters">
<div class="col pb-3">
<div class="d-flex justify-content-center widget-bar rounded pb-1 pt-3 box-loading">
<div class="d-flex justify-content-center align-items-baseline widget-bar-entry p-2">
</div>
</div>
</div>
</div>
<ng-container *ngIf="!loading">
<div *ngIf="vm.topWidgetConfig.show && hasTopWidgetMetadata(vm.topWidgetConfig.widget)"
class="row no-gutters">
<div class="col pb-3">
<scrm-top-widget [config]="vm.topWidgetConfig.widget"
[context]="getViewContext()"
[type]="vm.topWidgetConfig.widget.type">
</scrm-top-widget>
</div>
</div>
</ng-container>
<div class="row no-gutters">
<div class="col">
@ -70,8 +50,8 @@
</div>
</div>
<div *ngIf="vm.bottomWidgetConfig.show && vm.bottomWidgetConfig.widgets"
class="row no-gutters mt-4">
<div *ngIf="vm.bottomWidgetConfig.show && vm.bottomWidgetConfig.widgets && vm.bottomWidgetConfig.widgets.length"
class="row no-gutters mt-2">
<div class="col">
<div *ngFor="let widget of vm.bottomWidgetConfig.widgets" class="mb-3">
<scrm-sidebar-widget [config]="widget"
@ -84,7 +64,7 @@
</div>
<div *ngIf="vm.showSubpanels"
class="row no-gutters pt-1 pb-4">
class="row no-gutters pt-3 pb-4">
<div class="col">
<scrm-subpanel-container [config]="getSubpanelsConfig()"></scrm-subpanel-container>
</div>
@ -97,6 +77,25 @@
<div class="col-lg-3 record-widget-container pl-0"
[class.mt-0]="swapWidgets"
*ngIf="displayWidgets">
<div *ngIf="loading" class="row no-gutters">
<div class="col pb-3">
<div class="d-flex justify-content-center widget-bar rounded pb-1 pt-3 box-loading">
<div class="d-flex justify-content-center align-items-baseline widget-bar-entry p-2">
</div>
</div>
</div>
</div>
<ng-container *ngIf="!loading">
<div *ngIf="vm.topWidgetConfig.show && hasTopWidgetMetadata(vm.topWidgetConfig.widget)"
class="mb-3">
<div class="">
<scrm-top-widget [config]="vm.topWidgetConfig.widget"
[context]="getViewContext()"
[type]="vm.topWidgetConfig.widget.type">
</scrm-top-widget>
</div>
</div>
</ng-container>
<div class="mb-3" *ngFor="let widget of sidebarWidgetConfig.widgets">
<scrm-sidebar-widget [type]="widget.type"
[context]="getViewContext()"