43 Commits

Author SHA1 Message Date
807a8cff3f add logout button and update title in header (#50)
Reviewed-on: http://git.simonis.lol/angular/ems-frontend/pulls/50
Co-authored-by: Jan-Marlon Leibl <jleibl@proton.me>
Co-committed-by: Jan-Marlon Leibl <jleibl@proton.me>
2025-01-23 12:00:50 +00:00
ae2478a577 add no data found messages (#49)
Reviewed-on: http://git.simonis.lol/angular/ems-frontend/pulls/49
Reviewed-by: Constantin Simonis <constantin@simonis.lol>
Co-authored-by: Jan-Marlon Leibl <jleibl@proton.me>
Co-committed-by: Jan-Marlon Leibl <jleibl@proton.me>
2025-01-23 11:46:45 +00:00
d0a1248519 remove unused css files and styleUrl properties from components (#48)
Reviewed-on: http://git.simonis.lol/angular/ems-frontend/pulls/48
Co-authored-by: Jan-Marlon Leibl <jleibl@proton.me>
Co-committed-by: Jan-Marlon Leibl <jleibl@proton.me>
2025-01-23 11:39:26 +00:00
545c6194e4 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
88d9a1a534 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
9d22662cf1 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
905ddcdf2a 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
c48d68b87c 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
ed1696c21d 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
90896a2527 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
9bfbf28b98 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
876c386944 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
7ea79c64ef 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
417acde6ac 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
9d7744476f 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
ebdb2eeedf 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
c06e5a8a2e 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
Huy
d00aec70a0 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
14cd210a05 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
dc4c02e0d7 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
9104dfa541 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
Huy
1e52741155 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
cd36904d45 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
5829876444 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
Huy
0782095970 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
9ceb0b803e 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
0caefccc70 [TASK] Fix small styling mistakes (#22)
Reviewed-on: #22
2025-01-09 09:55:16 +00:00
10f1e09ccd 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
Huy
c938ef8465 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
Huy
fc6ea3b907 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
Huy
b7aa0471ad 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
1eca1906cc refactor compose.yml
Reviewed-on: #16
2025-01-08 08:10:29 +00:00
f7131a6b8d 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
Huy
5ba4db66af 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
Huy
90cccf4fdb 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
611a158d2d add interval for refreshing users (#12)
Reviewed-on: #12
Reviewed-by: Hernd Beidemann <huydw@proton.me>
2024-12-18 13:09:24 +00:00
c39229dc94 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
Huy
e0b3d7267f [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
e4f811bdae 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
Huy
725fbff5e5 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
Huy
ca2cddad94 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
Huy
779a4799c6 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
Huy
f1f58b73c9 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 78 additions and 20 deletions

View File

@ -1,4 +1,10 @@
<main class="container mx-auto px-4 py-8 max-w-6xl">
<h1 class="text-3xl font-bold text-gray-900 mb-8">{{ title }}</h1>
<div class="flex justify-between items-center mb-8">
<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>
</main>

View File

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

View File

@ -40,7 +40,34 @@
</button>
</div>
@if (employees) {
@if (!employees || employees.length === 0) {
<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">
<table mat-table [dataSource]="employees" matSort class="!w-full">
<ng-container matColumnDef="name">
@ -112,13 +139,6 @@
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
</table>
</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>
}

View File

@ -40,7 +40,34 @@
</button>
</div>
@if (qualifications) {
@if (!qualifications || qualifications.length === 0) {
<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">
<table
mat-table
@ -119,13 +146,6 @@
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
</table>
</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>
}

View File

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

View File

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