wip livewire migration

This commit is contained in:
Andras Bacsai
2023-12-07 22:56:55 +01:00
parent 718603e37e
commit f934dfef33
64 changed files with 164 additions and 155 deletions

View File

@@ -41,7 +41,7 @@ class Change extends Component
$github_app_uuid = request()->github_app_uuid;
$this->github_app = GithubApp::where('uuid', $github_app_uuid)->first();
if (!$this->github_app) {
return redirect()->route('source.all');
return $this->redirectRoute('source.all', navigate: true);
}
$settings = InstanceSettings::get();
$this->github_app->makeVisible('client_secret')->makeVisible('webhook_secret');
@@ -67,7 +67,7 @@ class Change extends Component
$type = data_get($parameters, 'type');
$destination = data_get($parameters, 'destination');
session()->forget('from');
return redirect()->route($back, [
return $this->redirectRoute($back, [
'environment_name' => $environment_name,
'project_uuid' => $project_uuid,
'type' => $type,
@@ -105,7 +105,7 @@ class Change extends Component
{
try {
$this->github_app->delete();
redirect()->route('source.all');
return $this->redirectRoute('source.all', navigate: true);
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@@ -48,7 +48,7 @@ class Create extends Component
if (session('from')) {
session(['from' => session('from') + ['source_id' => $github_app->id]]);
}
redirect()->route('source.github.show', ['github_app_uuid' => $github_app->uuid]);
return $this->redirectRoute('source.github.show', ['github_app_uuid' => $github_app->uuid], navigate: true);
} catch (\Throwable $e) {
return handleError($e, $this);
}