Commit 0824e147 by Ooh-Ao

css

parent 573ac80d
<div class="min-h-screen dashboard-background">
<!-- Enhanced Dashboard Header -->
<div class="dashboard-header-container">
<div class="header-content">
<div class="header-flex">
<div class="header-left">
<!-- Dashboard Title with Icon -->
<div class="header-title-section">
<!-- <div class="title-icon">
<i class="bi bi-grid-3x3-gap"></i>
</div> -->
<div class="title-content">
<h1>{{dashboardData?.thName}}</h1>
<!-- <p>Create and manage your dashboards</p> -->
</div>
</div>
<!-- Error Message -->
<div *ngIf="errorMessage" class="error-message">
<div class="error-message-content">
<i class="bi bi-exclamation-triangle-fill error-icon"></i>
<span class="error-text">Error:</span>
<span class="error-description">{{ errorMessage }}</span>
</div> </div>
</div> </div>
</div>
<!-- Dashboard Viewer Container - Clean Layout --> <!-- Enhanced Dashboard Content Area -->
<div *ngIf="dashboardData" class="viewer-container-clean"> <div class="dashboard-content-area">
<!-- Dashboard Content Only -->
<div class="viewer-content-clean"> <!-- Dashboard Content -->
<div class="dashboard-content-card">
<div *ngIf="!panels || panels.length === 0" class="empty-state">
<div class="empty-state-icon">
<i class="bi bi-grid-3x3-gap"></i>
</div>
<h3 class="empty-state-title">Empty Dashboard</h3>
<p class="empty-state-description">
To get started, select a dashboard from the dropdown above or create
a new one. Then, click on a widget from the sidebar on the left to
add it to this canvas.
</p>
</div>
<!-- Dashboard Layout -->
<div *ngIf="panels.length > 0" class="dashboard-layout-container">
<ejs-dashboardlayout <ejs-dashboardlayout
id='dashboard_viewer' id="dashboard_default"
#viewerLayout
[cellSpacing]="cellSpacing"
[columns]="columns" [columns]="columns"
[allowResizing]="false" [cellSpacing]="cellSpacing"
[allowDragging]="false" [panels]="panels"
[allowFloating]="false" #editLayout
[showGridLines]="false" [allowResizing]="true"
class="dashboard-viewer-layout-clean" [allowDragging]="true"
class="dashboard-layout"
> >
<e-panels> <e-panels>
<e-panel <e-panel
*ngFor="let panel of panels" *ngFor="let panel of panels"
[row]="panel.row" [id]="panel.id + '-' + panel.row + '-' + panel.col"
[col]="panel.col"
[sizeX]="panel.sizeX" [sizeX]="panel.sizeX"
[sizeY]="panel.sizeY" [sizeY]="panel.sizeY"
[id]="panel.id" [row]="panel.row"
class="widget-panel-clean" [col]="panel.col"
[zIndex]="999"
> >
<ng-template #header> <ng-template #header>
<!-- No header -->
</ng-template> </ng-template>
<ng-template #content> <ng-template #content>
<div class="widget-content-clean"> <ng-container
<ng-container [ngComponentOutlet]="panel.componentType" [ngComponentOutletInputs]="panel.componentInputs"></ng-container> [ngComponentOutlet]="panel.componentType"
</div> [ngComponentOutletInputs]="panel.componentInputs"
></ng-container>
</ng-template> </ng-template>
</e-panel> </e-panel>
</e-panels> </e-panels>
</ejs-dashboardlayout> </ejs-dashboardlayout>
</div> </div>
</div>
</div>
</div>
</div> </div>
import { Component, OnInit, Type, ChangeDetectorRef } from '@angular/core'; import { Component, OnInit, Type, ChangeDetectorRef, ViewEncapsulation } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { ActivatedRoute, RouterModule } from '@angular/router'; import { ActivatedRoute, RouterModule } from '@angular/router';
import { DashboardLayoutModule, PanelModel } from '@syncfusion/ej2-angular-layouts'; import { DashboardLayoutModule, PanelModel } from '@syncfusion/ej2-angular-layouts';
...@@ -60,6 +60,7 @@ export interface DashboardPanel extends PanelModel { ...@@ -60,6 +60,7 @@ export interface DashboardPanel extends PanelModel {
], ],
templateUrl: './dashboard-viewer.component.html', templateUrl: './dashboard-viewer.component.html',
styleUrls: ['./dashboard-viewer.component.scss'], styleUrls: ['./dashboard-viewer.component.scss'],
encapsulation: ViewEncapsulation.None
}) })
export class DashboardViewerComponent implements OnInit { export class DashboardViewerComponent implements OnInit {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment