🤖 Auto commit for release 'develop' on 2026-02-06

This commit is contained in:
JC5
2026-02-06 13:55:17 +01:00
parent b4d01d464d
commit 2de9926db8
324 changed files with 14224 additions and 14136 deletions

View File

@@ -51,17 +51,6 @@ class ObjectGroupRepository implements ObjectGroupRepositoryInterface, UserGroup
}
}
public function get(): Collection
{
return $this->user
->objectGroups()
->with(['piggyBanks', 'bills'])
->orderBy('order', 'ASC')
->orderBy('title', 'ASC')
->get()
;
}
public function deleteEmpty(): void
{
$all = $this->get();
@@ -87,6 +76,17 @@ class ObjectGroupRepository implements ObjectGroupRepositoryInterface, UserGroup
$objectGroup->delete();
}
public function get(): Collection
{
return $this->user
->objectGroups()
->with(['piggyBanks', 'bills'])
->orderBy('order', 'ASC')
->orderBy('title', 'ASC')
->get()
;
}
public function getBills(ObjectGroup $objectGroup): Collection
{
return $objectGroup->bills;
@@ -139,21 +139,6 @@ class ObjectGroupRepository implements ObjectGroupRepositoryInterface, UserGroup
return $dbQuery->take($limit)->get(['object_groups.*']);
}
public function update(ObjectGroup $objectGroup, array $data): ObjectGroup
{
if (array_key_exists('title', $data)) {
$objectGroup->title = $data['title'];
}
if (array_key_exists('order', $data)) {
$this->setOrder($objectGroup, (int) $data['order']);
}
$objectGroup->save();
return $objectGroup;
}
public function setOrder(ObjectGroup $objectGroup, int $newOrder): ObjectGroup
{
$oldOrder = $objectGroup->order;
@@ -187,4 +172,19 @@ class ObjectGroupRepository implements ObjectGroupRepositoryInterface, UserGroup
return $objectGroup;
}
public function update(ObjectGroup $objectGroup, array $data): ObjectGroup
{
if (array_key_exists('title', $data)) {
$objectGroup->title = $data['title'];
}
if (array_key_exists('order', $data)) {
$this->setOrder($objectGroup, (int) $data['order']);
}
$objectGroup->save();
return $objectGroup;
}
}