diff --git a/frontend/src/app/adminui/loginhistory/loginhistory.component.html b/frontend/src/app/adminui/loginhistory/loginhistory.component.html
new file mode 100644
index 0000000..9b0b263
--- /dev/null
+++ b/frontend/src/app/adminui/loginhistory/loginhistory.component.html
@@ -0,0 +1,26 @@
+
+Operations
+
+Login history
+
+
+
+
+
+
+ Login Time |
+ Login IP |
+
+
+
+
+
+
+ {{ entry.loginTime | date: 'dd. MMMM yyyy, HH:mm:ss' }} |
+ {{ entry.loginIp }} |
+
+
+
+
diff --git a/frontend/src/app/adminui/loginhistory/loginhistory.component.scss b/frontend/src/app/adminui/loginhistory/loginhistory.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/frontend/src/app/adminui/loginhistory/loginhistory.component.spec.ts b/frontend/src/app/adminui/loginhistory/loginhistory.component.spec.ts
new file mode 100644
index 0000000..4bd4b13
--- /dev/null
+++ b/frontend/src/app/adminui/loginhistory/loginhistory.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { LoginhistoryComponent } from './loginhistory.component';
+
+describe('LoginhistoryComponent', () => {
+ let component: LoginhistoryComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ imports: [LoginhistoryComponent]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(LoginhistoryComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/frontend/src/app/adminui/loginhistory/loginhistory.component.ts b/frontend/src/app/adminui/loginhistory/loginhistory.component.ts
new file mode 100644
index 0000000..7bf22ba
--- /dev/null
+++ b/frontend/src/app/adminui/loginhistory/loginhistory.component.ts
@@ -0,0 +1,59 @@
+import {Component, Input} from '@angular/core';
+import {DevelopmentStore} from "../../../store/DevelopmentStore";
+import {AuthStore} from "../../../store/authStore";
+import axios from "axios";
+import {firstValueFrom} from "rxjs";
+import {DatePipe, NgForOf} from "@angular/common";
+
+@Component({
+ selector: 'app-loginhistory',
+ standalone: true,
+ imports: [
+ NgForOf,
+ DatePipe
+ ],
+ templateUrl: './loginhistory.component.html',
+ styleUrl: './loginhistory.component.scss'
+})
+export class LoginhistoryComponent {
+ @Input() username: string = "";
+ loginHistory: any[] = [];
+
+ constructor(private developmentStore: DevelopmentStore, private authStore: AuthStore) {
+ this.fetchUserLoginHistory();
+ }
+
+ async fetchUserLoginHistory() {
+ try {
+ const response = await axios({
+ method: 'get',
+ url: this.developmentStore.getBaseUrl() + 'api/v1/secure/loginhistory',
+ headers: {
+ 'Content-Type': 'application/json',
+ 'Authorization': 'Bearer ' + await firstValueFrom(this.authStore.token$)
+ }
+ });
+ this.loginHistory = response.data;
+ console.log(this.loginHistory)
+ } catch (error) {
+ console.error(error);
+ }
+ }
+
+ async deleteLogins() {
+ try {
+ const response = await axios({
+ method: 'delete',
+ url: this.developmentStore.getBaseUrl() + 'api/v1/secure/loginhistory',
+ headers: {
+ 'Content-Type': 'application/json',
+ 'Authorization': 'Bearer ' + await firstValueFrom(this.authStore.token$)
+ }
+ });
+ console.log(response.data);
+ this.fetchUserLoginHistory();
+ } catch (error) {
+ console.error(error);
+ }
+ }
+}