Skip to content

Commit

Permalink
use base64 for queries
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Jun 6, 2024
1 parent 86bceff commit cd3fe54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,13 +302,14 @@ export class ItemSocialServiceGovUnitComponent implements OnInit, AfterViewInit
}

prepareChartQuery(query: string, where: string) {
return this.replaceAll(
const q = this.replaceAll(
query,
[
{from: ':where', to: where},
{from: ':org-field', to: `coalesce("${this.groupByLvl}", 'אחר')`},
]
);
return btoa(encodeURIComponent(q).replace(/%([0-9A-F]{2})/g, (match, p1) => String.fromCharCode(parseInt(p1, 16))));
}

refreshChart(ct: any, where: string) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AfterViewInit, Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';
import { Component, Input } from '@angular/core';
import { BudgetKeyItemService } from '../../../budgetkey-item.service';

@Component({
Expand All @@ -14,9 +14,6 @@ export class ItemSoprocChartComponent {

download(title: string) {
const filename = `${this.filename} / מידע על ${title}`;
if (!this.chart.downloadHeaders) {
console.log('CCCCC', this.chart);
}
const url = this.api.getDownloadUrlPost('xlsx', this.chart.downloadHeaders, filename);
return url;
}
Expand Down

0 comments on commit cd3fe54

Please sign in to comment.