41 Commits

Author SHA1 Message Date
66cbf764ca refactor: remove unused styleUrl properties from components 2025-01-23 12:36:00 +01:00
0be39d98ec format code and improve readability across files (#47)
Reviewed-on: http://git.simonis.lol/angular/ems-frontend/pulls/47
Co-authored-by: Jan-Marlon Leibl <jleibl@proton.me>
Co-committed-by: Jan-Marlon Leibl <jleibl@proton.me>
2025-01-23 11:24:38 +00:00
26ba6b1054 add ESLint configuration and update scripts (#46)
Reviewed-on: http://git.simonis.lol/angular/ems-frontend/pulls/46
Co-authored-by: Jan-Marlon Leibl <jleibl@proton.me>
Co-committed-by: Jan-Marlon Leibl <jleibl@proton.me>
2025-01-23 10:59:15 +00:00
556ba08234 refactor api services (#44)
Reviewed-on: http://git.simonis.lol/angular/ems-frontend/pulls/44
Reviewed-by: Huy <ptran@noreply@simonis.lol>
Co-authored-by: Constantin Simonis <constantin@simonis.lol>
Co-committed-by: Constantin Simonis <constantin@simonis.lol>
2025-01-22 08:03:32 +00:00
Huy
d25fe3ff64 Extract snackbar error message implementation to service (#42)
Co-authored-by: Phan Huy Tran <p.tran@neusta.de>
Reviewed-on: http://git.simonis.lol/angular/ems-frontend/pulls/42
Reviewed-by: Constantin Simonis <constantin@simonis.lol>
2025-01-22 07:58:43 +00:00
44cf3de5a0 add search bar to employee list (#41)
Co-authored-by: Jan-Marlon Leibl <jleibl@proton.me>
Reviewed-on: http://git.simonis.lol/angular/ems-frontend/pulls/41
Co-authored-by: Constantin Simonis <constantin@simonis.lol>
Co-committed-by: Constantin Simonis <constantin@simonis.lol>
2025-01-15 13:15:33 +00:00
c41eceb51d task/update-error-message-styling (#40)
Reviewed-on: http://git.simonis.lol/angular/ems-frontend/pulls/40
Co-authored-by: Jan-Marlon Leibl <jleibl@proton.me>
Co-committed-by: Jan-Marlon Leibl <jleibl@proton.me>
2025-01-15 11:33:14 +00:00
3980408403 add errors to edit employee form (#38)
Reviewed-on: http://git.simonis.lol/angular/ems-frontend/pulls/38
Reviewed-by: Hop In, I Have Puppies AND WiFi <jleibl@noreply@simonis.lol>
Co-authored-by: Constantin Simonis <constantin@simonis.lol>
Co-committed-by: Constantin Simonis <constantin@simonis.lol>
2025-01-15 11:00:42 +00:00
95bf76f9c1 Enhance employee and qualification forms with hints and improved layouts (#37)
- Added hints to input fields in create and edit employee forms for better user guidance.
- Updated the layout of dialog actions in employee and qualification forms for improved usability.
- Enhanced delete confirmation dialogs for qualifications and employees with better styling and error handling.
- Improved the display of employee details and qualifications with better formatting and structure.

These changes aim to improve user experience and accessibility across the application.

Reviewed-on: http://git.simonis.lol/angular/ems-frontend/pulls/37
Co-authored-by: Jan-Marlon Leibl <jleibl@proton.me>
Co-committed-by: Jan-Marlon Leibl <jleibl@proton.me>
2025-01-15 10:34:10 +00:00
Huy
37b5c27a50 Add cancel button to create and edit qualification modals (#36)
Co-authored-by: Phan Huy Tran <p.tran@neusta.de>
Reviewed-on: http://git.simonis.lol/angular/ems-frontend/pulls/36
Co-authored-by: Huy <ptran@noreply@simonis.lol>
Co-committed-by: Huy <ptran@noreply@simonis.lol>
2025-01-15 09:05:48 +00:00
Huy
17912451d6 Display more accurate error message (#35)
Co-authored-by: Phan Huy Tran <p.tran@neusta.de>
Reviewed-on: http://git.simonis.lol/angular/ems-frontend/pulls/35
Reviewed-by: Constantin Simonis <constantin@simonis.lol>
2025-01-15 08:33:06 +00:00
Huy
d96bf3d475 Fix employee details opened from qualification details not showing any skills (#34)
Co-authored-by: Phan Huy Tran <p.tran@neusta.de>
Reviewed-on: http://git.simonis.lol/angular/ems-frontend/pulls/34
Reviewed-by: Constantin Simonis <constantin@simonis.lol>
2025-01-15 08:31:12 +00:00
8284e1634d add errors to employee creation form
Reviewed-on: http://git.simonis.lol/angular/ems-frontend/pulls/33
Reviewed-by: Huy <ptran@noreply@simonis.lol>
2025-01-15 08:27:46 +00:00
Huy
ee1e86f4e7 Remove minimum loading time for both tables (#32)
Co-authored-by: Phan Huy Tran <p.tran@neusta.de>
Reviewed-on: http://git.simonis.lol/angular/ems-frontend/pulls/32
Reviewed-by: Constantin Simonis <constantin@simonis.lol>
2025-01-15 07:48:40 +00:00
Huy
e55b3471cd Add more descriptive error message to skill deletion (#31)
Co-authored-by: Phan Huy Tran <p.tran@neusta.de>
Reviewed-on: http://git.simonis.lol/angular/ems-frontend/pulls/31
Reviewed-by: Constantin Simonis <constantin@simonis.lol>
2025-01-15 07:44:23 +00:00
423116ed34 Implement removing and adding qualifications while creating or editing employees (#29)
Co-authored-by: Phan Huy Tran <p.tran@neusta.de>
Reviewed-on: #29
Reviewed-by: Constantin Simonis <constantin@simonis.lol>
2025-01-09 12:58:48 +00:00
7653a109ee fix bug where tables reload on action cancel (#30)
Reviewed-on: #30
Reviewed-by: Hop In, I Have Puppies AND WiFi <jleibl@noreply@simonis.lol>
Co-authored-by: Constantin Simonis <constantin@simonis.lol>
Co-committed-by: Constantin Simonis <constantin@simonis.lol>
2025-01-09 12:54:02 +00:00
89bea09476 add animation to login
Reviewed-on: #28
Reviewed-by: Get in my car i have candy <huydw@proton.me>
2025-01-09 12:43:53 +00:00
f33082343c add employee details
Reviewed-on: #27
Reviewed-by: Get in my car i have candy <huydw@proton.me>
2025-01-09 12:14:55 +00:00
a2bc06aee0 Implement qualification details (#26)
Co-authored-by: Phan Huy Tran <p.tran@neusta.de>
Reviewed-on: #26
Reviewed-by: Constantin Simonis <constantin@simonis.lol>
2025-01-09 11:48:39 +00:00
176074fbdc add form to edit employee
Reviewed-on: #23
Reviewed-by: Get in my car i have candy <huydw@proton.me>
2025-01-09 11:10:51 +00:00
b0009229d1 stop page reload after employee deletion (#25)
Reviewed-on: #25
Reviewed-by: Get in my car i have candy <huydw@proton.me>
Co-authored-by: Constantin Simonis <constantin@simonis.lol>
Co-committed-by: Constantin Simonis <constantin@simonis.lol>
2025-01-09 11:06:30 +00:00
294191d24e Implement deleting qualifications (#24)
Co-authored-by: Phan Huy Tran <p.tran@neusta.de>
Reviewed-on: #24
Reviewed-by: Constantin Simonis <constantin@simonis.lol>
2025-01-09 11:01:21 +00:00
dc61810632 add form to create employee
Reviewed-on: #18
Reviewed-by: Get in my car i have candy <huydw@proton.me>
2025-01-09 09:59:01 +00:00
10ead075a7 [TASK] Fix small styling mistakes (#22)
Reviewed-on: #22
2025-01-09 09:55:16 +00:00
839f9f7752 change file structure
Reviewed-on: #21
Reviewed-by: Get in my car i have candy <huydw@proton.me>
2025-01-09 09:13:06 +00:00
ae7146d28f Implement editing qualifications (#20)
Co-authored-by: Phan Huy Tran <p.tran@neusta.de>
Reviewed-on: #20
Reviewed-by: Constantin Simonis <constantin@simonis.lol>
2025-01-08 11:25:32 +00:00
36d5a29b9e Implement error handling for the create qualification form (#19)
Co-authored-by: Phan Huy Tran <p.tran@neusta.de>
Reviewed-on: #19
Reviewed-by: Constantin Simonis <constantin@simonis.lol>
2025-01-08 10:31:38 +00:00
bd13dfe39e Implement creating qualifications (#17)
Co-authored-by: Phan Huy Tran <p.tran@neusta.de>
Reviewed-on: #17
Reviewed-by: Constantin Simonis <constantin@simonis.lol>
2025-01-08 09:12:10 +00:00
9779fdb3f5 refactor compose.yml
Reviewed-on: #16
2025-01-08 08:10:29 +00:00
4ab01752bf fix delete icon (#15)
Reviewed-on: #15
Co-authored-by: Constantin Simonis <constantin@simonis.lol>
Co-committed-by: Constantin Simonis <constantin@simonis.lol>
2025-01-08 07:55:35 +00:00
b85360fb65 Add white background, replace constant reload with page reload on employee deletion (#14)
Co-authored-by: Phan Huy Tran <p.tran@neusta.de>
Reviewed-on: #14
Reviewed-by: Constantin Simonis <constantin@simonis.lol>
2025-01-08 07:51:13 +00:00
e0101a5364 Convert qualifications to table (#13)
Co-authored-by: Phan Huy Tran <p.tran@neusta.de>
Reviewed-on: #13
2024-12-18 13:36:55 +00:00
290da0e2a2 add interval for refreshing users (#12)
Reviewed-on: #12
Reviewed-by: Hernd Beidemann <huydw@proton.me>
2024-12-18 13:09:24 +00:00
0eb4fe419b add functionality to delete employee button (#11)
Reviewed-on: #11
Reviewed-by: Hernd Beidemann <huydw@proton.me>
2024-12-18 13:02:46 +00:00
4f31bc1358 [FEATURE] Display qualifications list in homepage (#10)
Co-authored-by: Phan Huy Tran <p.tran@neusta.de>
Reviewed-on: #10
Reviewed-by: Constantin Simonis <constantin@simonis.lol>
2024-12-18 12:28:13 +00:00
53c0fde21f style employee list (#6)
Co-authored-by: Phan Huy Tran <p.tran@neusta.de>
Reviewed-on: #6
Co-authored-by: Jan-Marlon Leibl <jleibl@proton.me>
Co-committed-by: Jan-Marlon Leibl <jleibl@proton.me>
2024-12-18 12:00:26 +00:00
da378e7555 Replace hardcoded bearer token (#9)
Co-authored-by: Phan Huy Tran <p.tran@neusta.de>
Reviewed-on: #9
Reviewed-by: Constantin Simonis <constantin@simonis.lol>
2024-12-18 11:10:23 +00:00
e2864fa439 Fix keycloak auth (#5)
Co-authored-by: Phan Huy Tran <p.tran@neusta.de>
Reviewed-on: #5
Co-authored-by: ptran <huydw@proton.me>
Co-committed-by: ptran <huydw@proton.me>
2024-12-18 10:47:09 +00:00
934716fb3e Configure keycloak (#4)
Co-authored-by: Phan Huy Tran <p.tran@neusta.de>
Reviewed-on: #4
Co-authored-by: ptran <huydw@proton.me>
Co-committed-by: ptran <huydw@proton.me>
2024-12-18 10:02:18 +00:00
4e27c3fb2e Create login route and protect routes (#3)
Co-authored-by: Phan Huy Tran <p.tran@neusta.de>
Reviewed-on: #3
Co-authored-by: ptran <huydw@proton.me>
Co-committed-by: ptran <huydw@proton.me>
2024-12-18 09:27:44 +00:00
7 changed files with 20 additions and 78 deletions

View File

View File

@ -1,10 +1,4 @@
<main class="container mx-auto px-4 py-8 max-w-6xl"> <main class="container mx-auto px-4 py-8 max-w-6xl">
<div class="flex justify-between items-center mb-8"> <h1 class="text-3xl font-bold text-gray-900 mb-8">{{ title }}</h1>
<h1 class="text-3xl font-extrabold text-gray-900">{{ title }}</h1>
<button mat-flat-button class="!bg-red-600 !text-white" (click)="logout()">
<mat-icon>logout</mat-icon>
<span class="ml-1">Logout</span>
</button>
</div>
<router-outlet></router-outlet> <router-outlet></router-outlet>
</main> </main>

View File

@ -1,22 +1,14 @@
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { RouterOutlet } from '@angular/router'; import { RouterOutlet } from '@angular/router';
import { AuthService } from './services/auth.service';
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
imports: [CommonModule, RouterOutlet, MatButtonModule, MatIconModule], imports: [CommonModule, RouterOutlet],
templateUrl: './app.component.html', templateUrl: './app.component.html',
standalone: true, standalone: true,
styleUrl: './app.component.css',
}) })
export class AppComponent { export class AppComponent {
title = 'Employee Management System'; title = 'Employee Management System';
constructor(private authService: AuthService) {}
logout(): void {
this.authService.logout();
}
} }

View File

@ -40,34 +40,7 @@
</button> </button>
</div> </div>
@if (!employees || employees.length === 0) { @if (employees) {
<div class="!bg-gray-50 !rounded-lg !p-8">
<div class="!text-center !max-w-sm !mx-auto">
<div
class="!bg-blue-100 !rounded-full !w-16 !h-16 !flex !items-center !justify-center !mx-auto !mb-4"
>
<mat-icon class="!text-blue-600 !w-8 !h-8 !text-3xl"
>people</mat-icon
>
</div>
<h3 class="!text-gray-900 !font-medium !text-lg !mb-2">
No employees found
</h3>
<p class="!text-gray-600 !mb-6">
Get started by adding your first employee to the directory.
</p>
<button
mat-flat-button
color="primary"
class="!bg-blue-600 !text-white"
(click)="showCreateEmployeeModal()"
>
<mat-icon class="!mr-2">add</mat-icon>
Add Employee
</button>
</div>
</div>
} @else {
<div class="!overflow-x-auto !rounded-lg !bg-gray-50 !p-4"> <div class="!overflow-x-auto !rounded-lg !bg-gray-50 !p-4">
<table mat-table [dataSource]="employees" matSort class="!w-full"> <table mat-table [dataSource]="employees" matSort class="!w-full">
<ng-container matColumnDef="name"> <ng-container matColumnDef="name">
@ -139,6 +112,13 @@
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr> <tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
</table> </table>
</div> </div>
} @else {
<mat-card class="!text-center !py-8">
<mat-card-content>
<mat-icon class="!w-8 !h-8 !text-gray-400 !mb-4">people</mat-icon>
<p class="!text-gray-600">No employees found</p>
</mat-card-content>
</mat-card>
} }
</div> </div>
} }

View File

@ -40,34 +40,7 @@
</button> </button>
</div> </div>
@if (!qualifications || qualifications.length === 0) { @if (qualifications) {
<div class="!bg-gray-50 !rounded-lg !p-8">
<div class="!text-center !max-w-sm !mx-auto">
<div
class="!bg-blue-100 !rounded-full !w-16 !h-16 !flex !items-center !justify-center !mx-auto !mb-4"
>
<mat-icon class="!text-blue-600 !w-8 !h-8 !text-3xl"
>school</mat-icon
>
</div>
<h3 class="!text-gray-900 !font-medium !text-lg !mb-2">
No qualifications found
</h3>
<p class="!text-gray-600 !mb-6">
Get started by adding your first qualification to the directory.
</p>
<button
mat-flat-button
color="primary"
class="!bg-blue-600 !text-white"
(click)="openCreateModal()"
>
<mat-icon class="!mr-2">add</mat-icon>
Add Qualification
</button>
</div>
</div>
} @else {
<div class="!overflow-x-auto !rounded-lg !bg-gray-50 !p-4"> <div class="!overflow-x-auto !rounded-lg !bg-gray-50 !p-4">
<table <table
mat-table mat-table
@ -146,6 +119,13 @@
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr> <tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
</table> </table>
</div> </div>
} @else {
<mat-card class="!text-center !py-8">
<mat-card-content>
<mat-icon class="!w-8 !h-8 !text-gray-400 !mb-4">school</mat-icon>
<p class="!text-gray-600">No qualifications found</p>
</mat-card-content>
</mat-card>
} }
</div> </div>
} }

View File

@ -16,8 +16,4 @@ export class AuthService {
return false; return false;
} }
public logout(): void {
this.keycloakService.logout();
}
} }

View File

@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>Employee Management System</title> <title>Lf10StarterNew</title>
<base href="/" /> <base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" /> <link rel="icon" type="image/x-icon" href="favicon.ico" />