This commit is contained in:
Benjamin Takats
2023-01-21 19:23:52 +01:00
parent c87318dacf
commit c01e17b629
2 changed files with 2 additions and 8 deletions

View File

@@ -75,12 +75,6 @@ class LibraryTable extends Component
fn($query) => $query fn($query) => $query
->where('libraries.name', $this->currentTab) ->where('libraries.name', $this->currentTab)
) )
->orWhereHas('libraries',
fn($query) => $query
->where('libraries.parent_id', $parentLibrary->id)
->when($term,
fn($query) => $query->where('name', 'ilike', '%'.$term.'%'))
)
) )
->when(count($this->filters) > 0, fn($query) => $query->whereHas('tags', ->when(count($this->filters) > 0, fn($query) => $query->whereHas('tags',
fn($query) => $query->whereIn('tags.id', $this->filters))) fn($query) => $query->whereIn('tags.id', $this->filters)))

View File

@@ -71,9 +71,9 @@ class Library extends Resource
ID::make() ID::make()
->sortable(), ->sortable(),
BelongsTo::make(__('Parent'), 'parent', __CLASS__) /*BelongsTo::make(__('Parent'), 'parent', __CLASS__)
->searchable() ->searchable()
->nullable(), ->nullable(),*/
Text::make('Name') Text::make('Name')
->rules('required', 'string'), ->rules('required', 'string'),