UI: User Login, Mitarbeiterübersichts Page

This commit is contained in:
mehdiboudjoudi 2024-12-18 11:06:39 +01:00 committed by Jan Klattenhoff
parent 621599e138
commit 88d3bb8cc4
Signed by: jank
GPG key ID: B267751B8AE29EFE
13 changed files with 300 additions and 3 deletions

View file

@ -24,7 +24,8 @@
{
"glob": "**/*",
"input": "public"
}
},
"src/assets"
],
"styles": [
"src/styles.css"

BIN
public/img.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

3
public/user.svg Normal file
View file

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="163.839" height="163.839" fill-rule="evenodd" clip-rule="evenodd" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" viewBox="0 0 4335 4335" id="user">
<path fill="#CCC" d="M2140 103h18c517 0 936 419 936 936s-419 936-936 936h-18c-517 0-936-419-936-936s419-936 936-936zm2001 3922v-617s-722-804-1897-804c-31 0-63 1-94 2-31-1-62-2-94-2-1176 0-1897 804-1897 804v681h3982v-64z" style="fill:#ccc"></path>
</svg>

After

Width:  |  Height:  |  Size: 532 B

View file

@ -1 +1 @@
<app-employee-detail></app-employee-detail>
<app-mitarbeiterverwaltung-view></app-mitarbeiterverwaltung-view>

View file

@ -1,12 +1,17 @@
import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import {LoginViewComponent} from "./components/login-view/login-view.component";
import {
MitarbeiterverwaltungViewComponent
} from "./components/mitarbeiterverwaltung-view/mitarbeiterverwaltung-view.component";
import { NavigationBarComponent } from './components/navigation-bar/navigation-bar.component';
import { EmployeeDetailComponent } from './components/employee-detail/employee-detail.component';
@Component({
selector: 'app-root',
standalone: true,
imports: [RouterOutlet, NavigationBarComponent, EmployeeDetailComponent],
imports: [RouterOutlet, NavigationBarComponent, EmployeeDetailComponent, LoginViewComponent, MitarbeiterverwaltungViewComponent],
templateUrl: './app.component.html',
styleUrl: './app.component.css'
})

View file

@ -0,0 +1,56 @@
body {
font-family: 'Roboto', sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh; /* Use height instead of min-height */
background-color: #f0f0f0;
}
.container {
text-align: center;
padding: 20px;
border: 1px solid #ccc;
border-radius: 5px;
background-color: #fff;
width: 300px; /* Set a maximum width for the container */
}
h1 {
font-size: 2rem;
font-weight: 300;
margin-bottom: 15px;
}
label {
display: block;
margin-bottom: 5px;
color: #aaa;
text-align: center; /* Center labels horizontally */
}
input[type="text"],
input[type="password"] {
width: 250px;
padding: 12px;
margin-bottom: 15px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 1rem;
color: #333;
}
button {
background-color: transparent;
color: #9c88ff;
border: 1px solid #9c88ff;
padding: 12px 20px;
border-radius: 4px;
cursor: pointer;
font-size: 1rem;
}
.logo-image {
width: 25%; /* Reduce width to 25% of its original size */
height: auto; /* Maintain aspect ratio */
}

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hi-Tec GmbH Login</title>
<link rel="stylesheet" href="login-view.component.css">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400&display=swap" rel="stylesheet">
</head>
<body>
<div class="container">
<h1>Hi-Tec GmbH</h1>
<img src="img.png" alt="Logout Icon" class="logo-image">
<form>
<label for="username">Username</label>
<input type="text" id="username" name="username"><br>
<label for="password">Password</label>
<input type="password" id="password" name="password"><br><br>
<button type="submit">Anmelden</button>
</form>
</div>
</body>
</html>

View file

@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { LoginViewComponent } from './login-view.component';
describe('BrowserLoginViewComponent', () => {
let component: LoginViewComponent;
let fixture: ComponentFixture<LoginViewComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [LoginViewComponent]
})
.compileComponents();
fixture = TestBed.createComponent(LoginViewComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View file

@ -0,0 +1,12 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-login-view',
standalone: true,
imports: [],
templateUrl: './login-view.component.html',
styleUrl: './login-view.component.css'
})
export class LoginViewComponent {
}

View file

@ -0,0 +1,93 @@
body {
font-family: sans-serif;
margin: 0;
padding: 20px;
background-color: #f0f0f0;
}
.container {
width: 80%;
max-width: 960px;
margin: 0 auto;
background-color: #fff;
border-radius: 5px;
padding: 20px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
h1 {
font-size: 2rem;
margin-bottom: 20px;
}
.search-bar {
display: flex;
margin-bottom: 20px;
align-items: center;
}
.search-bar input[type="text"] {
padding: 8px;
border: 1px solid #ccc;
border-radius: 3px;
flex-grow: 1;
margin-right: 10px;
}
.search-bar button {
padding: 10px 15px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 3px;
cursor: pointer;
}
.add-button {
background-color: #07af16;
color: #fff;
padding: 10px 15px;
border: none;
border-radius: 3px;
cursor: pointer;
float: left;
margin-bottom: 10px;
}
.employee-table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
.employee-table th,
.employee-table td {
padding: 12px 15px;
border: 1px solid #ddd;
text-align: left;
}
.employee-table th {
background-color: #f0f0f0;
font-weight: bold;
}
.sortable {
cursor: pointer;
}
.logout-button {
background-color: transparent;
border: none;
cursor: pointer;
border-radius: 50%;
width: 30px;
height: 30px;
display: flex;
float: right;
}
.logout-button img {
width: 20px;
height: 20px;
}

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<link rel="stylesheet" href="mitarbeiterverwaltung-view.component.css">
</head>
<body>
<div class="container">
<div class="header">
<button class="logout-button">
<img src="user.svg" alt="User Icon">
</button>
<h1>Employees</h1>
</div>
<div class="header-actions">
<div class="search-bar">
<input type="text" placeholder="Search employee">
<button>Search</button>
</div>
<button class="add-button">Add employee</button>
</div>
<table class="employee-table">
<thead>
<tr>
<th><span class="sortable">First Name</span></th>
<th><span class="sortable">Last Name</span></th>
<th>Street</th>
<th>Postcode</th>
<th>City</th>
<th>Phone</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</body>
</html>

View file

@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MitarbeiterverwaltungViewComponent } from './mitarbeiterverwaltung-view.component';
describe('MitarbeiterverwaltungViewComponent', () => {
let component: MitarbeiterverwaltungViewComponent;
let fixture: ComponentFixture<MitarbeiterverwaltungViewComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [MitarbeiterverwaltungViewComponent]
})
.compileComponents();
fixture = TestBed.createComponent(MitarbeiterverwaltungViewComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View file

@ -0,0 +1,12 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-mitarbeiterverwaltung-view',
standalone: true,
imports: [],
templateUrl: './mitarbeiterverwaltung-view.component.html',
styleUrl: './mitarbeiterverwaltung-view.component.css'
})
export class MitarbeiterverwaltungViewComponent {
}