From 55d307162357c243503cc9c19d7c716ba0ff0d86 Mon Sep 17 00:00:00 2001 From: James-jamames Date: Wed, 3 Apr 2024 15:14:51 -0300 Subject: [PATCH] + Empty warning --- .../right-side-bar.component.html | 33 +++++++++++-------- .../right-side-bar.component.scss | 14 ++++++++ .../right-side-bar.component.ts | 11 +++++-- src/client/src/assets/locales/en.json | 1 + src/client/src/assets/locales/pt.json | 1 + 5 files changed, 43 insertions(+), 17 deletions(-) diff --git a/src/client/src/app/components/right-side-bar/right-side-bar.component.html b/src/client/src/app/components/right-side-bar/right-side-bar.component.html index 41c4e90..ba367f5 100755 --- a/src/client/src/app/components/right-side-bar/right-side-bar.component.html +++ b/src/client/src/app/components/right-side-bar/right-side-bar.component.html @@ -91,22 +91,27 @@
{{selectRegion.text}}
- + +
+ {{ 'right_sidebar.pastureGraph_card.empty' | translate }} +
+ +
-
- -
- -

{{chart.text}}

-
- - -
+
+ +
+ +

{{chart.text}}

+
+ + +
- +
@@ -255,7 +260,7 @@

{{chart.text}}

+ [header]="objectFullScreenChart.title" [(visible)]="objectFullScreenChart.fullScreen" [style]="{width: '50vw'}">

{{ objectFullScreenChart.text }}

diff --git a/src/client/src/app/components/right-side-bar/right-side-bar.component.scss b/src/client/src/app/components/right-side-bar/right-side-bar.component.scss index 7421905..a7d5110 100755 --- a/src/client/src/app/components/right-side-bar/right-side-bar.component.scss +++ b/src/client/src/app/components/right-side-bar/right-side-bar.component.scss @@ -527,3 +527,17 @@ } } } + +.time-series-card-margin { + margin-bottom: 1%; +} + +.ghost-text { + color: #999; /* Cor do texto fantasma */ + font-family: Arial, sans-serif; /* Fonte do texto */ + font-size: 16px; /* Tamanho do texto */ + text-align: center; /* Centralizar o texto horizontalmente */ + opacity: 0.6; /* Opacidade do texto fantasma */ + margin-top: 20px; + margin-bottom: 20px; +} diff --git a/src/client/src/app/components/right-side-bar/right-side-bar.component.ts b/src/client/src/app/components/right-side-bar/right-side-bar.component.ts index 8accc84..ce7131c 100755 --- a/src/client/src/app/components/right-side-bar/right-side-bar.component.ts +++ b/src/client/src/app/components/right-side-bar/right-side-bar.component.ts @@ -353,7 +353,6 @@ export class RightSideBarComponent implements OnInit { let textParam = params.join('&'); this.chartService.getPastureGraph(textParam).subscribe(tempPastureGraphCharts => { - console.log(tempPastureGraphCharts) this.pastureGraphCharts = tempPastureGraphCharts; }, error => { console.error(error) @@ -440,7 +439,7 @@ export class RightSideBarComponent implements OnInit { if (layer) { this.layersForStatistics[key].switch = true - + if (this.layersForStatistics[key].year !== layer.filterSelected) { this.layersForStatistics[key].year = layer.filterSelected this.updateStatistics(this.selectRegion); @@ -453,7 +452,7 @@ export class RightSideBarComponent implements OnInit { console.log(this.layersForStatistics); } - updateStatus(name) {} + updateStatus(name) { } exportCSV(table) { const options = { @@ -499,4 +498,10 @@ export class RightSideBarComponent implements OnInit { doc.save(table.title + '.pdf'); } + + shouldShowGraph(): boolean { + return !this.layersForStatistics['carbono'].switch + && !this.layersForStatistics['pasture'].switch + && !this.layersForStatistics['pasture_quality'].switch; + } } diff --git a/src/client/src/assets/locales/en.json b/src/client/src/assets/locales/en.json index 77b8d95..177fa3c 100755 --- a/src/client/src/assets/locales/en.json +++ b/src/client/src/assets/locales/en.json @@ -403,6 +403,7 @@ } }, "pastureGraph_card": { + "empty": "No layers selected...", "pastureAndLotacaoBovina": { "title": "Pasture", "text": "According to LAPIG, the Pasture area (in hectares) and the Bovine Stocking (in UA) in the #typeRegionTranslate# #textRegionTranslate# was:", diff --git a/src/client/src/assets/locales/pt.json b/src/client/src/assets/locales/pt.json index 66f7955..9d6ff58 100755 --- a/src/client/src/assets/locales/pt.json +++ b/src/client/src/assets/locales/pt.json @@ -404,6 +404,7 @@ } }, "pastureGraph_card": { + "empty": "Nenhuma camada selecionada...", "pastureAndLotacaoBovina": { "title": "Pastagem", "text": "De acordo com o LAPIG, a área de Pastagem (em hectares) e o Rebanho Bovino (em UA) no #typeRegionTranslate# #textRegionTranslate# foi de:",