Enhance department report handling with date support
Added date parameter support for department daily reports, including validation, new functions, and route updates. Improved functionality allows fetching or creating reports for specific dates and prevents duplicate entries for the same date. Introduced a standardized date format within the API.
This commit is contained in:
@@ -39,6 +39,16 @@ trait route_t
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* The default date format (Y-m-d) Example: 2023-01-01
|
||||
* @note This is used to format dates in the API
|
||||
* @return string
|
||||
*/
|
||||
public function FORMAT_DATE(): string
|
||||
{
|
||||
return 'Y-m-d';
|
||||
}
|
||||
|
||||
public function requireDateFormat(string $date, string $format): void
|
||||
{
|
||||
global $response;
|
||||
|
||||
Reference in New Issue
Block a user