Allow mounts to be added to servers

This commit is contained in:
Lance Pioch 2024-06-02 00:34:35 -04:00
parent 110cc1248b
commit a1067fd4aa

View File

@ -516,6 +516,13 @@ class EditServer extends EditRecord
->keyLabel('Label Name')
->valueLabel('Label Description')
->columnSpanFull(),
Forms\Components\CheckboxList::make('mounts')
->relationship('mounts')
->options(fn (Server $server) => $server->node->mounts->mapWithKeys(fn ($mount) => [$mount->id => $mount->name]))
->descriptions(fn (Server $server) => $server->node->mounts->mapWithKeys(fn ($mount) => [$mount->id => "$mount->source -> $mount->target"]))
->label('Mounts')
->columnSpanFull(),
]),
]),
]);