fix: update success message logic to only show when changes are made
This commit is contained in:
parent
61dcf8b4ac
commit
e4cc5c1178
2 changed files with 10 additions and 10 deletions
|
|
@ -193,8 +193,8 @@ private function handleBulkSubmit()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Always show success message unless an error occurred
|
// Only show success message if changes were actually made and no errors occurred
|
||||||
if (! $errorOccurred) {
|
if ($changesMade && ! $errorOccurred) {
|
||||||
$this->dispatch('success', 'Environment variables updated.');
|
$this->dispatch('success', 'Environment variables updated.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -166,8 +166,8 @@
|
||||||
'resource' => $this->application,
|
'resource' => $this->application,
|
||||||
'type' => 'application',
|
'type' => 'application',
|
||||||
])
|
])
|
||||||
->set('variablesInput', $bulkContent)
|
->set('variables', $bulkContent)
|
||||||
->call('saveVariables');
|
->call('submit');
|
||||||
|
|
||||||
// Refresh the environment variable
|
// Refresh the environment variable
|
||||||
$env->refresh();
|
$env->refresh();
|
||||||
|
|
@ -196,8 +196,8 @@
|
||||||
'resource' => $this->application,
|
'resource' => $this->application,
|
||||||
'type' => 'application',
|
'type' => 'application',
|
||||||
])
|
])
|
||||||
->set('variablesInput', $bulkContent)
|
->set('variables', $bulkContent)
|
||||||
->call('saveVariables');
|
->call('submit');
|
||||||
|
|
||||||
// Refresh the environment variable
|
// Refresh the environment variable
|
||||||
$env->refresh();
|
$env->refresh();
|
||||||
|
|
@ -234,8 +234,8 @@
|
||||||
'resource' => $this->application,
|
'resource' => $this->application,
|
||||||
'type' => 'application',
|
'type' => 'application',
|
||||||
])
|
])
|
||||||
->set('variablesInput', $bulkContent)
|
->set('variables', $bulkContent)
|
||||||
->call('saveVariables');
|
->call('submit');
|
||||||
|
|
||||||
// Refresh both variables
|
// Refresh both variables
|
||||||
$env1->refresh();
|
$env1->refresh();
|
||||||
|
|
@ -258,8 +258,8 @@
|
||||||
'resource' => $this->application,
|
'resource' => $this->application,
|
||||||
'type' => 'application',
|
'type' => 'application',
|
||||||
])
|
])
|
||||||
->set('variablesInput', $bulkContent)
|
->set('variables', $bulkContent)
|
||||||
->call('saveVariables');
|
->call('submit');
|
||||||
|
|
||||||
// Check that variables were created with correct comments
|
// Check that variables were created with correct comments
|
||||||
$var1 = EnvironmentVariable::where('key', 'NEW_VAR1')
|
$var1 = EnvironmentVariable::where('key', 'NEW_VAR1')
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue