Commit 63d44ef1 by Ooh-Ao

Revert "persis หน้าวิว"

This reverts commit 74e722aa.
parent 74e722aa
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div *ngIf="dashboardData" class="dashboard-viewer-container p-4"> <div *ngIf="dashboardData" class="dashboard-viewer-container p-4">
<h1 class="text-2xl font-bold mb-4 text-gray-800">{{ dashboardData.thName }}</h1> <h1 class="text-2xl font-bold mb-4 text-gray-800">{{ dashboardData.thName }}</h1>
<div class="control-section"> <div class="control-section">
<ejs-dashboardlayout id='dashboard_viewer' #viewerLayout [cellSpacing]="cellSpacing" [columns]="6" [allowResizing]="false" [allowDragging]="false" [enablePersistence]="true"> <ejs-dashboardlayout id='dashboard_viewer' #viewerLayout [cellSpacing]="cellSpacing" [columns]="6" [allowResizing]="false" [allowDragging]="false">
<e-panels> <e-panels>
<e-panel *ngFor="let panel of panels" [row]="panel.row" [col]="panel.col" [sizeX]="panel.sizeX" [sizeY]="panel.sizeY" [id]="panel.id"> <e-panel *ngFor="let panel of panels" [row]="panel.row" [col]="panel.col" [sizeX]="panel.sizeX" [sizeY]="panel.sizeY" [id]="panel.id">
<ng-template #header> <ng-template #header>
......
import { Component, OnInit, Type, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core'; import { Component, OnInit, Type, ChangeDetectorRef } 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';
...@@ -55,7 +55,6 @@ export interface DashboardPanel extends PanelModel { ...@@ -55,7 +55,6 @@ 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'],
changeDetection: ChangeDetectionStrategy.OnPush
}) })
export class DashboardViewerComponent implements OnInit { export class DashboardViewerComponent implements OnInit {
...@@ -100,7 +99,6 @@ export class DashboardViewerComponent implements OnInit { ...@@ -100,7 +99,6 @@ export class DashboardViewerComponent implements OnInit {
private route: ActivatedRoute, private route: ActivatedRoute,
private dashboardDataService: DashboardDataService, private dashboardDataService: DashboardDataService,
private dashboardStateService: DashboardStateService, private dashboardStateService: DashboardStateService,
private cdr: ChangeDetectorRef
) { } ) { }
ngOnInit(): void { ngOnInit(): void {
...@@ -137,7 +135,6 @@ export class DashboardViewerComponent implements OnInit { ...@@ -137,7 +135,6 @@ export class DashboardViewerComponent implements OnInit {
if (dashboard.datasetId) { if (dashboard.datasetId) {
this.dashboardStateService.selectDataset(dashboard.datasetId); this.dashboardStateService.selectDataset(dashboard.datasetId);
} }
this.cdr.markForCheck(); // Manually trigger change detection
} else { } else {
this.errorMessage = 'Could not load the dashboard.'; this.errorMessage = 'Could not load the dashboard.';
} }
......
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