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:
Jepp9350
2025-03-06 14:37:32 +01:00
parent 9e7984b93a
commit 2038547d1c
3 changed files with 120 additions and 8 deletions
+10
View File
@@ -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;