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
|
||||
if (! $errorOccurred) {
|
||||
// Only show success message if changes were actually made and no errors occurred
|
||||
if ($changesMade && ! $errorOccurred) {
|
||||
$this->dispatch('success', 'Environment variables updated.');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,8 +166,8 @@
|
|||
'resource' => $this->application,
|
||||
'type' => 'application',
|
||||
])
|
||||
->set('variablesInput', $bulkContent)
|
||||
->call('saveVariables');
|
||||
->set('variables', $bulkContent)
|
||||
->call('submit');
|
||||
|
||||
// Refresh the environment variable
|
||||
$env->refresh();
|
||||
|
|
@ -196,8 +196,8 @@
|
|||
'resource' => $this->application,
|
||||
'type' => 'application',
|
||||
])
|
||||
->set('variablesInput', $bulkContent)
|
||||
->call('saveVariables');
|
||||
->set('variables', $bulkContent)
|
||||
->call('submit');
|
||||
|
||||
// Refresh the environment variable
|
||||
$env->refresh();
|
||||
|
|
@ -234,8 +234,8 @@
|
|||
'resource' => $this->application,
|
||||
'type' => 'application',
|
||||
])
|
||||
->set('variablesInput', $bulkContent)
|
||||
->call('saveVariables');
|
||||
->set('variables', $bulkContent)
|
||||
->call('submit');
|
||||
|
||||
// Refresh both variables
|
||||
$env1->refresh();
|
||||
|
|
@ -258,8 +258,8 @@
|
|||
'resource' => $this->application,
|
||||
'type' => 'application',
|
||||
])
|
||||
->set('variablesInput', $bulkContent)
|
||||
->call('saveVariables');
|
||||
->set('variables', $bulkContent)
|
||||
->call('submit');
|
||||
|
||||
// Check that variables were created with correct comments
|
||||
$var1 = EnvironmentVariable::where('key', 'NEW_VAR1')
|
||||
|
|
|
|||
Loading…
Reference in a new issue