add whereNull (#680)

Add where null to not include allocations already assigned to a server.
This commit is contained in:
Charles 2024-10-27 18:01:09 -04:00 committed by GitHub
parent 288cbee32f
commit fdd1b3798c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -149,7 +149,7 @@ class AllocationsRelationManager extends RelationManager
->multiple() ->multiple()
->associateAnother(false) ->associateAnother(false)
->preloadRecordSelect() ->preloadRecordSelect()
->recordSelectOptionsQuery(fn ($query) => $query->whereBelongsTo($this->getOwnerRecord()->node)) ->recordSelectOptionsQuery(fn ($query) => $query->whereBelongsTo($this->getOwnerRecord()->node)->whereNull('server_id'))
->label('Add Allocation'), ->label('Add Allocation'),
]) ])
->bulkActions([ ->bulkActions([