Skip to content

Commit

Permalink
Fix: update slots when switching table type & hide undo/redo
Browse files Browse the repository at this point in the history
  • Loading branch information
karelcallens committed Sep 6, 2024
1 parent 6d2db56 commit 103f637
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
9 changes: 0 additions & 9 deletions report-builder/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<div class="px-4 py-2 flex align-center">
<button mat-stroked-button class="mr-3" [disabled]="chartIsEmpty()" (click)="undo()">
<!-- button mat-stroked-button class="mr-3" [disabled]="chartIsEmpty()" (click)="undo()">
<mat-icon fontSet="material-symbols-outlined">undo</mat-icon>
Undo
</button>
<button mat-stroked-button class="mr-3" [disabled]="chartIsEmpty()" (click)="redo()">
<mat-icon fontSet="material-symbols-outlined">redo</mat-icon>
Redo
</button>
</button-->
<div class="grow"></div>
<button mat-stroked-button class="mr-3" [disabled]="chartIsEmpty()" (click)="export()">
<mat-icon fontSet="material-symbols-outlined">download</mat-icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { computed, Injectable } from '@angular/core';
import { patchState, signalState } from '@ngrx/signals';
import { CHARTS } from '../constants/charts.constant';
import { Chart, Slot } from '../models/models';
import { Subject } from "rxjs";
import { FilterSlot, Value } from "../../chart-panel/filters-panel/filters-panel.component";

type ChartState = {
Expand Down Expand Up @@ -81,6 +80,7 @@ export class ChartService {

setTableType(tableType: 'regular-table' | 'pivot-table'): void {
patchState(this.state, { tableType });
this.updateSlots([...this.slots()]);
}

private transformSlotsToTableSlots() {
Expand Down

0 comments on commit 103f637

Please sign in to comment.