Release 1.18.3 (#3204)

* fix truncated comments for customer, project and activity
* fix export button label for non-translated renderer
* fixed avatar size if image or SVG is used
* filter timesheets by billable state in API
This commit is contained in:
Kevin Papst
2022-03-18 23:45:41 +01:00
committed by GitHub
parent 5c925f0ca5
commit a8ac6b2eda
17 changed files with 53 additions and 109 deletions

View File

@@ -123,6 +123,7 @@ class TimesheetController extends BaseApiController
* @Rest\QueryParam(name="end", requirements=@Constraints\DateTime(format="Y-m-d\TH:i:s"), strict=true, nullable=true, description="Only records before this date will be included (format: HTML5)")
* @Rest\QueryParam(name="exported", requirements="0|1", strict=true, nullable=true, description="Use this flag if you want to filter for export state. Allowed values: 0=not exported, 1=exported (default: all)")
* @Rest\QueryParam(name="active", requirements="0|1", strict=true, nullable=true, description="Filter for running/active records. Allowed values: 0=stopped, 1=active (default: all)")
* @Rest\QueryParam(name="billable", requirements="0|1", strict=true, nullable=true, description="Filter for non-/billable records. Allowed values: 0=non-billable, 1=billable (default: all)")
* @Rest\QueryParam(name="full", requirements="true", strict=true, nullable=true, description="Allows to fetch fully serialized objects including subresources. Allowed values: true (default: false)")
* @Rest\QueryParam(name="term", description="Free search term")
* @Rest\QueryParam(name="modified_after", requirements=@Constraints\DateTime(format="Y-m-d\TH:i:s"), strict=true, nullable=true, description="Only records changed after this date will be included (format: HTML5). Available since Kimai 1.10 and works only for records that were created/updated since then.")
@@ -219,6 +220,15 @@ class TimesheetController extends BaseApiController
}
}
if (null !== ($billable = $paramFetcher->get('billable'))) {
$billable = (int) $billable;
if ($billable === 1) {
$query->setBillable(true);
} elseif ($billable === 0) {
$query->setBillable(false);
}
}
if (null !== ($exported = $paramFetcher->get('exported'))) {
$exported = (int) $exported;
if ($exported === 1) {