Skip to content

Conversation

@Jessica-creat
Copy link
Contributor

Description

Implement comprehensive REST API for holiday management with full CRUD operations and status transitions.

Changes

  • api_holiday.class.php: New API class with REST endpoints for holiday management
  • holiday.class.php: Enhanced with additional methods and validations

Features Added

  • CRUD operations for holidays (GET, POST, PUT, DELETE)
  • Holiday status transitions (validate, approve, cancel, refuse)
  • Holiday types management endpoint
  • User balance calculation
  • Pagination and filtering support
  • Comprehensive error handling

API Endpoints

  • GET /holidays - List holidays with filters
  • POST /holidays - Create new holiday
  • GET /holidays/{id} - Get specific holiday
  • PUT /holidays/{id} - Update holiday
  • DELETE /holidays/{id} - Delete holiday
  • POST /holidays/{id}/validate - Validate holiday
  • POST /holidays/{id}/approve - Approve holiday
  • POST /holidays/{id}/cancel - Cancel holiday
  • POST /holidays/{id}/refuse - Refuse holiday
  • GET /holidays/types - Get holiday types
  • GET /holidays/balance - Get user balance

Testing

The implementation includes comprehensive error handling and can be tested using standard REST API clients.

@eldy eldy added the PR to fix - Conflict or CI error to solve The PHP unit tests return something wrong. Check details to know what to fix or solve the conflicts. label Nov 17, 2025
- Add complete REST API for holiday management
- Implement CRUD operations (GET, POST, PUT, DELETE)
- Add status transition endpoints (validate, approve, cancel, refuse)
- Include holiday types and balance management
- Enhance Holiday class with additional validations and methods
- Add pagination and filtering support
- Improve error handling and data validation
@Jessica-creat Jessica-creat force-pushed the feat/add-holidays-classes branch from eda4358 to 61a3769 Compare November 19, 2025 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR to fix - Conflict or CI error to solve The PHP unit tests return something wrong. Check details to know what to fix or solve the conflicts.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants