Skip to content

Commit

Permalink
globalFilterDialog - hide panel table && localize
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Alloza committed Apr 29, 2024
1 parent 532cfc6 commit 307b5f8
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@


<div class="row">
<div class="col-12">
<div *ngIf="!isEmpty(globalFilter.selectedTable) && !isEmpty(globalFilter.selectedColumn)" class="col-12">
<p-card *ngIf="formReady && !globalFilter.isdeleted" [header]="header2" id="anywhereClick">
<p-table [value]="allPanels">
<ng-template pTemplate="header">
Expand Down Expand Up @@ -97,7 +97,7 @@
</div>
</p-card>

<div *ngIf="isEmpty(globalFilter.selectedTable) || isEmpty(globalFilter.selectedColumn)" class="disabled-div"></div>
<!-- <div *ngIf="isEmpty(globalFilter.selectedTable) || isEmpty(globalFilter.selectedColumn)" class="disabled-div"></div> -->
</div>

</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,11 @@ export class GlobalFilterDialogComponent implements OnInit, OnDestroy {
const pathList = this.globalFilter.pathList;

if (this.globalFilter.selectedTable.table_name !== table_id.split('.')[0]) {
this.alertService.addWarning(`Invalid path for selected filter`);
pathList[panel.id].selectedTableNodes = undefined;
this.alertService.addWarning($localize`:@@invalidPathForm: Ruta incorrecta para el filtro seleccionado`);
setTimeout(() => {
pathList[panel.id].table_id = null;
pathList[panel.id].selectedTableNodes = undefined;
}, 100);
} else {
pathList[panel.id].table_id = table_id;
pathList[panel.id].path = node.joins || [];
Expand Down Expand Up @@ -300,7 +303,7 @@ export class GlobalFilterDialogComponent implements OnInit, OnDestroy {
}

public isEmpty(obj: any): boolean {
return !obj || Object.keys(obj).length === 0;
return Object.keys(obj||{}).length === 0;
}

private validateGlobalFilter(): boolean {
Expand Down
4 changes: 4 additions & 0 deletions eda/eda_app/src/locale/messages.ca.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -4270,6 +4270,10 @@
<target>No es pot eliminar la columna perquè hi ha vinculat un Filtre</target>
</trans-unit>

<trans-unit id="invalidPathForm">
<source>Ruta incorrecta para el filtro seleccionado</source>
<target>Ruta incorrecte per el filtre seleccionat</target>
</trans-unit>
</body>
</file>
</xliff>
4 changes: 4 additions & 0 deletions eda/eda_app/src/locale/messages.en.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -4244,6 +4244,10 @@
<target>Can not remove this column cause there is a GlobalFilter linked</target>
</trans-unit>

<trans-unit id="invalidPathForm">
<source>Ruta incorrecta para el filtro seleccionado</source>
<target>Invalid path for selected filter</target>
</trans-unit>
</body>
</file>
</xliff>
5 changes: 5 additions & 0 deletions eda/eda_app/src/locale/messages.es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -4269,6 +4269,11 @@
<source>No se puede eliminar la columna porque hay vinculado un Filtro</source>
<target>No se puede eliminar la columna porque hay vinculado un Filtro</target>
</trans-unit>

<trans-unit id="invalidPathForm">
<source>Ruta incorrecta para el filtro seleccionado</source>
<target>Ruta incorrecta para el filtro seleccionado</target>
</trans-unit>
</body>
</file>
</xliff>

0 comments on commit 307b5f8

Please sign in to comment.