Skip to content

Botche/java-web-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

java-web-project

The project is about employees in a few companies and their statuses in them. The users can do CRUD operations on the employees and the admins can view the the pie chart of all employees distributed by companies.

Default users for the application: (username: password)

  • user: user
  • admin: admin

The application gives the possibility to login, register functionality. To use the application the user needs to log in first. All forms have validation and notifications for errors or successful event.

Registration page register-page

Login page login-page

In the application there are two roles: user and admin. The user role can view the list with employees. Perform a create, edit and delete functionality. Also, can search by name for employees. Contact page with all employees contact-page

Contact page with "he" as search parameter search-functionality

Side bar with fields for adding contact save-functionality

When you click on someone on the list he is populated in the sidebar form where you can edit the information about him edit-functionality

Deleted contact with success message in the top left corner successfully-deleted-with-notification

The admin role has the same functionality as the user but in addition he has the rights to see the Dashboard page where he can check the pie chart of all employees. dashboard-page


Technical

Database

Every entity is AbstractEntity child AbstractEntity:

  • id: long, AutoGenerated starting from 1000
  • version: int

Users:

  • username: string
  • passwordSalt: string
  • passwordHash: string
  • roleId: int - enum (User, Admin)
  • isActive: boolean

Status:

  • name: string

Company:

  • name: string

Contact:

  • firstName: string
  • lastName: string
  • company: Company (foreign key to Company)
  • status: Status (foreign key to Status)
  • email: string

Repositories

  • CompanyRepository
  • ContactRepository
  • StatusRepostiry
  • UserRepository

The repositories are our way to access the data in the database. They are inheritating JpaRepository<T, D>.


Services

  • AuthService
  • CompaniesService
  • ContactsService
  • StatusesService

In the services we have the logic for getting the information, saving and deleting. Also, we have validation there.


Views

  • ListView
    • ContactForm - the form is like partial view of the ListView
  • DashboardView
  • LoginView
  • LogoutView
  • MainLayout
  • RegisterView

I have used Bean for the update functionality of contact. When you click any row of the table the Bean is reading the contact and populating him. After the save buttong is clicked the Bean is writing to the object and then we can save it.


Contants

  • ExceptionMessages
  • GlobalContants
  • Notifications
  • Queries

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages