Exclude items with zero occupancy from ical rendering
This commit is contained in:
@@ -128,7 +128,7 @@ class IcalService implements SingletonInterface
|
||||
|
||||
foreach ($events as $event) {
|
||||
/** @var Contingent $event */
|
||||
if (null === $item && Contingent::STATUS_BLOCKED === $event->getStatus()) {
|
||||
if (null === $item && (Contingent::STATUS_BLOCKED === $event->getStatus() || Contingent::STATUS_ONREQUEST === $event->getStatus())) {
|
||||
$item = [
|
||||
'from' => $event->getBegin(),
|
||||
];
|
||||
@@ -162,6 +162,10 @@ class IcalService implements SingletonInterface
|
||||
*/
|
||||
protected function addOccupancyItem( array $item): void
|
||||
{
|
||||
if (0 === $item['occupancy']) {
|
||||
return;
|
||||
}
|
||||
|
||||
$summary = sprintf('Part-occupied:%d', $item['occupancy']);
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user