Employees and employee records
The roster and detail require view:employees; create, edit and delete use create:employees, edit:employees and delete:employees. HR module access is separate. Search before creating. The roster supports debounced search, status and employment-type filters, pagination and export where enabled. Statuses are Active, On leave, Suspended and Terminated; employment types are Full time, Part time, Contract, Intern and Freelance. Filters only change the displayed set.
Create or edit a profile
New employee requires create:employees; employee details require edit:employees to switch into edit mode. First name, last name and hire date are required. The form sections collect contact details (work/personal email, phone), birth date, gender, nationality, fiscal/national ID, address, department, position, manager, employment type, work schedule, weekly hours, notes, emergency contact and bank name/IBAN/BIC.
Department, position and manager selectors use existing records; “none” clears a relationship. The country defaults to IT. Select employment type and schedule deliberately; enter sensitive identity/bank data only when HR policy requires it.
Save submits the form; success returns to or refreshes the employee record. If it fails, correct the validation issue and resubmit only after confirming no employee was already created. Edit is unavailable for terminated staff; Terminate is a separate action requiring a date and offering an optional reason, then confirmation. It changes employment status and also marks active contracts terminated; it does not delete the employee. Deletion from the roster has its own confirmation and is a soft delete (the service sets deletedAt). Inspect the refreshed roster before retrying.
Employee detail tabs
Overview shows the profile. Contracts lists employment agreements; create:contracts exposes New contract and edit:contracts opens a contract when selected. The form covers type, position, dates, salary and terms. The timeline also offers a PDF link. Leave shows balances. Documents lets the user enter name, type (free text), optional expiry and one file, then upload; check the list after upload. Payslips are read-only here and can show forbidden; absence does not prove payroll data is missing. Treat salary and identity data as confidential. Verify current status before a second write.