# Changelog

All notable changes to this project will be documented in this file.

## [2026.04.11.1] - 2026-04-11

### Added
- People module workforce cockpit at `/people/dashboard` (`people.dashboard`): cached KPIs, Chart.js panels, role-gated UI, tasks/calendar sidebar.
- Blade components `kpi-card` and `panel-card` for the cockpit layout.
- `App\Http\Controllers\Web\DashboardController` with tenant-scoped aggregates and 5-minute cache.

### Changed
- `routes/web.php`: `people.dashboard` now uses `DashboardController@index` instead of a closure.

### Fixed
- Leave type distribution query: qualify `leaves.company_id` (and related `leaves.*` filters) when joining `leave_types` to avoid ambiguous `company_id` SQL errors.

## [2026.04.10.4] - 2026-04-10

### Added
- Added announcements attachments support with multi-file upload and storage:
  - New `AnnouncementAttachment` model
  - New `announcement_attachments` migration and relation wiring
- Added announcement edit/update flow with status selection (Active/Inactive).
- Added mixed dashboard feed partial combining announcements and job posts.

### Changed
- Updated announcements create/edit UI with advanced WYSIWYG editor toolbar and larger editor height.
- Updated announcements listing to render rich body HTML, attachment previews/links, status badges, and edit action.
- Updated dashboard and self-dashboard layouts to Keka-style split:
  - Left panel area for existing cards/charts
  - Right sticky feed column (`~33%`) for mixed posts
- Updated sidebar to include Announcements menu visibility using existing permission/module guards.

### Removed
- Removed announcement `start_date` and `end_date` from UI and controller validation flow.
- Removed announcement `start_date` and `end_date` from database via migration.

## [2026.04.10.3] - 2026-04-10

### Changed
- Updated employee revise salary flow to support CTC-only revision with salary group selection in the popup and backend validation handling.
- Updated revise salary popup calculations to use `salaryBreakup.ctc_annual` as the current CTC baseline, including percentage-based revision calculations.
- Updated popup submit behavior to enable `Save` only when revised CTC differs from current CTC.

## [2026.04.10.2] - 2026-04-10

### Added
- Added company-level statutory toggles in payroll advanced PF/ESI settings:
  - `pf_excluded_in_ctc`
  - `esi_excluded_in_ctc`

### Changed
- Updated payroll settings form and controllers to validate, persist, and preload the new PF/ESI CTC exclusion flags using `company_settings`.
- Kept payroll calculation behavior unchanged; this release only introduces settings capture and storage.

## [2026.04.10.1] - 2026-04-10

### Added
- Added schema compatibility migrations for legacy HR tables (`warnings`, `complaints`, `offboardings`, `assets`, `appreciations`).
- Added auto-fill behavior in promotions create form to set "From Designation" and "From Department" from selected employee.
- Added project `VERSION` file for release tracking.

### Changed
- Updated HR web controllers to persist `company_id` on create/update where company scope is applied (`warnings`, `complaints`, `offboardings`, `assets`, `promotions`, `resignations`, `terminations`, `appreciations`).
- Updated appreciation save flow to keep legacy `date` column in sync with `appreciation_date`.
- Updated appreciation model fillable/casts for legacy compatibility.

### Fixed
- Fixed multiple SQL errors caused by legacy table schemas missing new fields.
- Fixed list views not showing newly created records due to missing `company_id` values under tenant scope.
- Fixed appreciation create failure caused by required legacy `date` column.
