puh, fixes
This commit is contained in:
@@ -3,26 +3,29 @@
|
||||
namespace App\Http\Livewire\Project\Service;
|
||||
|
||||
use App\Models\ServiceApplication;
|
||||
use Illuminate\Support\Collection;
|
||||
use Livewire\Component;
|
||||
|
||||
class Application extends Component
|
||||
{
|
||||
public ServiceApplication $application;
|
||||
public $parameters;
|
||||
public $fileStorages = null;
|
||||
public $fileStorages;
|
||||
protected $listeners = ["refreshFileStorages"];
|
||||
protected $rules = [
|
||||
'application.human_name' => 'nullable',
|
||||
'application.description' => 'nullable',
|
||||
'application.fqdn' => 'nullable',
|
||||
'application.image_tag' => 'required',
|
||||
'application.ignore_from_status' => 'required|boolean',
|
||||
'application.image' => 'required',
|
||||
'application.exclude_from_status' => 'required|boolean',
|
||||
'application.required_fqdn' => 'required|boolean',
|
||||
];
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.project.service.application');
|
||||
}
|
||||
public function instantSave() {
|
||||
public function instantSave()
|
||||
{
|
||||
$this->submit();
|
||||
}
|
||||
public function refreshFileStorages()
|
||||
@@ -42,6 +45,7 @@ class Application extends Component
|
||||
public function mount()
|
||||
{
|
||||
$this->parameters = get_route_parameters();
|
||||
$this->fileStorages = collect();
|
||||
$this->refreshFileStorages();
|
||||
}
|
||||
public function submit()
|
||||
@@ -49,6 +53,7 @@ class Application extends Component
|
||||
try {
|
||||
$this->validate();
|
||||
$this->application->save();
|
||||
switchImage($this->application);
|
||||
$this->emit('success', 'Application saved successfully.');
|
||||
} catch (\Throwable $e) {
|
||||
ray($e);
|
||||
|
||||
Reference in New Issue
Block a user