backend bonus log exclude seeding default

This commit is contained in:
xiaomlove
2025-09-17 04:05:36 +07:00
parent 74d722b301
commit 4009337133
16 changed files with 136 additions and 31 deletions
+3 -7
View File
@@ -242,13 +242,9 @@ class SearchBoxRepository extends BaseRepository
return Category::query()->whereIn('id', $idArr)->delete();
}
public function listSections($withCategoryAndTags = true)
public function listSections($id, $withCategoryAndTags = true)
{
$modeIds = [SearchBox::getBrowseMode()];
if (SearchBox::isSpecialEnabled() && Permission::canUploadToSpecialSection()) {
$modeIds[] = SearchBox::getSpecialMode();
}
$searchBoxList = SearchBox::query()->with($withCategoryAndTags ? ['categories'] : [])->find($modeIds);
$searchBoxList = SearchBox::query()->with($withCategoryAndTags ? ['categories'] : [])->find($id);
if ($withCategoryAndTags) {
foreach ($searchBoxList as $searchBox) {
if ($searchBox->showsubcat) {
@@ -260,7 +256,7 @@ class SearchBoxRepository extends BaseRepository
return $searchBoxList;
}
public function buildSearchBoxFormSchema(SearchBox $searchBox, string $namePrefix = ""): Forms\Components\Section
public function buildSearchBoxFormSchema(SearchBox $searchBox, string $namePrefix): Forms\Components\Section
{
$lang = get_langfolder_cookie();
$heading = $searchBox->section_name[$lang] ?? nexus_trans('searchbox.sections.browse');