diff --git a/api/src/main/java/com/rossa/api/config/data.sql b/api/src/main/java/com/rossa/api/config/data.sql
index 34d6229..32f758c 100644
--- a/api/src/main/java/com/rossa/api/config/data.sql
+++ b/api/src/main/java/com/rossa/api/config/data.sql
@@ -1,5 +1,5 @@
INSERT INTO meters (name) VALUES ('1LOG');
-INSERT INTO meters (name) VALUES ('1HEM');
+INSERT INTO meters (name) VALUES ('1EHM');
INSERT INTO meters (name) VALUES ('WATER');
INSERT INTO meters (name) VALUES ('GARDEN');
diff --git a/rossa-tech-cli/src/app/app.component.css b/rossa-tech-cli/src/app/app.component.css
deleted file mode 100644
index e69de29..0000000
diff --git a/rossa-tech-cli/src/app/app.component.html b/rossa-tech-cli/src/app/app.component.html
index 09a2e25..8681a78 100644
--- a/rossa-tech-cli/src/app/app.component.html
+++ b/rossa-tech-cli/src/app/app.component.html
@@ -1,3 +1,9 @@
-
+
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/rossa-tech-cli/src/app/components/dashboard/dashboard.component.ts b/rossa-tech-cli/src/app/components/dashboard/dashboard.component.ts
index bfafefb..3f98ebc 100644
--- a/rossa-tech-cli/src/app/components/dashboard/dashboard.component.ts
+++ b/rossa-tech-cli/src/app/components/dashboard/dashboard.component.ts
@@ -16,6 +16,7 @@ import { MeterDataService } from 'src/app/core/services/meterData.service';
import { MeterDataAddDialogComponent } from 'src/app/dialogs/meter-data-add-dialog/meter-data-add-dialog.component';
import { MeterDataListComponent } from '../subcomponents/meter-data-list/meter-data-list.component';
import { ChartComponent } from '../subcomponents/chart/chart.component';
+import { MatButtonModule } from '@angular/material/button';
@Component({
selector: 'app-dashboard',
@@ -27,13 +28,14 @@ import { ChartComponent } from '../subcomponents/chart/chart.component';
MatGridListModule,
MeterDataListComponent,
ChartComponent,
+ MatButtonModule,
],
})
export class DashboardComponent {
usageTypes = UsageType;
preparedMeterData: PreparedMeterData[] = [];
meterDataEnergy: PreparedMeterData[] = [];
- // meterDataWater: MeterData[] = [];
+ meterDataWater: PreparedMeterData[] = [];
displayedColumns: string[] = ['date', 'amount', 'meter'];
// injects
@@ -61,6 +63,11 @@ export class DashboardComponent {
this.meterDataEnergy = data;
},
});
+ this.meterDataService.waterMeterData.subscribe({
+ next: (data: PreparedMeterData[]) => {
+ this.meterDataWater = data;
+ },
+ });
this.meterDataService.preparedMeterData.subscribe({
next: (data: PreparedMeterData[]) => {
this.preparedMeterData = data;
diff --git a/rossa-tech-cli/src/app/components/footer/footer.component.html b/rossa-tech-cli/src/app/components/footer/footer.component.html
new file mode 100644
index 0000000..d48fb98
--- /dev/null
+++ b/rossa-tech-cli/src/app/components/footer/footer.component.html
@@ -0,0 +1,8 @@
+
\ No newline at end of file
diff --git a/rossa-tech-cli/src/app/components/footer/footer.component.scss b/rossa-tech-cli/src/app/components/footer/footer.component.scss
new file mode 100644
index 0000000..2d55ffa
--- /dev/null
+++ b/rossa-tech-cli/src/app/components/footer/footer.component.scss
@@ -0,0 +1,8 @@
+div.footer-wrapper {
+ display: flex;
+ flex-direction: row;
+ height: 36px;
+ justify-content: flex-end;
+ padding-right: 16px;
+ align-items: center;
+}
diff --git a/rossa-tech-cli/src/app/components/footer/footer.component.ts b/rossa-tech-cli/src/app/components/footer/footer.component.ts
new file mode 100644
index 0000000..5e3beaa
--- /dev/null
+++ b/rossa-tech-cli/src/app/components/footer/footer.component.ts
@@ -0,0 +1,31 @@
+import { Component, OnInit, inject } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { HttpErrorResponse } from '@angular/common/http';
+import { LoaderService } from '../loader/loader.service';
+import { environment } from 'src/environments/environment';
+import { AuthService } from 'src/app/auth/auth.service';
+
+@Component({
+ selector: 'app-footer',
+ templateUrl: './footer.component.html',
+ styleUrls: ['./footer.component.scss'],
+ standalone: true,
+ imports: [CommonModule],
+})
+export class FooterComponent implements OnInit {
+ versionWeb: number | undefined = environment.version;
+ versionApi: number | undefined;
+ userLoggedIn: Boolean = false;
+
+ //injects
+ private authService: AuthService = inject(AuthService);
+ // private loaderService: LoaderService = inject(LoaderService);
+
+ constructor() {}
+
+ ngOnInit(): void {
+ this.authService.isLoggedIn.subscribe((res) => {
+ this.userLoggedIn = res;
+ });
+ }
+}
diff --git a/rossa-tech-cli/src/app/components/header/header.component.html b/rossa-tech-cli/src/app/components/header/header.component.html
index 2c5410c..0990740 100644
--- a/rossa-tech-cli/src/app/components/header/header.component.html
+++ b/rossa-tech-cli/src/app/components/header/header.component.html
@@ -1,16 +1,16 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/rossa-tech-cli/src/app/constants.ts b/rossa-tech-cli/src/app/constants.ts
index 4bdd695..fb70bf6 100644
--- a/rossa-tech-cli/src/app/constants.ts
+++ b/rossa-tech-cli/src/app/constants.ts
@@ -1 +1 @@
-export const METERS = ['1LOG', '1HEM', 'WATER', 'GARDEN'];
+export const METERS = ['1LOG', '1EHM', 'WATER', 'GARDEN'];
diff --git a/rossa-tech-cli/src/app/core/dataModels/Meter.ts b/rossa-tech-cli/src/app/core/dataModels/Meter.ts
deleted file mode 100644
index 3581f41..0000000
--- a/rossa-tech-cli/src/app/core/dataModels/Meter.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-export class Meter {
- id: number;
- name: '1LOG' | '1HEM' | 'WATER' | 'GARDEN';
- type?: 'ENERGY' | 'WATER';
-
- constructor(
- id: number,
- name?: '1LOG' | '1HEM' | 'WATER' | 'GARDEN',
- type?: 'ENERGY' | 'WATER'
- ) {
- this.id = id || 0;
- this.name = name || '1LOG';
- this.type = type || 'ENERGY';
- }
-}
-
-export enum Meters {
- '1LOG' = '1LOG',
- '1HEM' = '1HEM',
- 'WATER' = 'WATER',
- 'GARDEN' = 'GARDEN',
-}
diff --git a/rossa-tech-cli/src/app/core/dataModels/Meterdata.ts b/rossa-tech-cli/src/app/core/dataModels/Meterdata.ts
index 62dbfdb..b130d7f 100644
--- a/rossa-tech-cli/src/app/core/dataModels/Meterdata.ts
+++ b/rossa-tech-cli/src/app/core/dataModels/Meterdata.ts
@@ -1,11 +1,11 @@
export class Meter {
id: number;
- name: '1LOG' | '1HEM' | 'WATER' | 'GARDEN';
+ name: '1LOG' | '1EHM' | 'WATER' | 'GARDEN';
type?: 'ENERGY' | 'WATER';
constructor(
id: number,
- name?: '1LOG' | '1HEM' | 'WATER' | 'GARDEN',
+ name?: '1LOG' | '1EHM' | 'WATER' | 'GARDEN',
type?: 'ENERGY' | 'WATER'
) {
this.id = id || 0;
@@ -16,7 +16,7 @@ export class Meter {
export enum Meters {
'1LOG' = '1LOG',
- '1HEM' = '1HEM',
+ '1EHM' = '1EHM',
'WATER' = 'WATER',
'GARDEN' = 'GARDEN',
}
diff --git a/rossa-tech-cli/src/app/core/services/database.service.ts b/rossa-tech-cli/src/app/core/services/database.service.ts
index 66bf8b0..3b2d9c7 100644
--- a/rossa-tech-cli/src/app/core/services/database.service.ts
+++ b/rossa-tech-cli/src/app/core/services/database.service.ts
@@ -7,8 +7,7 @@ import {
import { Observable, throwError } from 'rxjs';
import { catchError } from 'rxjs/operators';
import { environment } from 'src/environments/environment';
-import { MeterData } from '../dataModels/Meterdata';
-import { Meter } from '../dataModels/Meter';
+import { Meter, MeterData } from '../dataModels/Meterdata';
@Injectable({
providedIn: 'root',
diff --git a/rossa-tech-cli/src/app/core/services/meterData.service.ts b/rossa-tech-cli/src/app/core/services/meterData.service.ts
index 7527b0e..f12b943 100644
--- a/rossa-tech-cli/src/app/core/services/meterData.service.ts
+++ b/rossa-tech-cli/src/app/core/services/meterData.service.ts
@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
import {
MeterData,
MeterDataForYear,
+ Meters,
PreparedMeterData,
} from '../dataModels/Meterdata';
import { UsageType } from '../dataModels/UsageType';
@@ -13,7 +14,6 @@ import { Observable, of } from 'rxjs';
export class MeterDataService {
public preparedMeterDataObject: PreparedMeterData[] = [];
private meterDataObject: MeterData[] = new Array();
- // public energyMeterDataObject: MeterData[] = [];
constructor() {}
@@ -21,18 +21,28 @@ export class MeterDataService {
this.meterDataObject = meterData;
}
- // get meterData(): Observable