瀏覽代碼

Merge branch '3.x' into bump-dependencies

3.x
Andrew Wallo 2 月之前
父節點
當前提交
785ed017a3

+ 5
- 3
app/Filament/Company/Clusters/Settings/Pages/Localization.php 查看文件

215
             'time_format',
215
             'time_format',
216
         ];
216
         ];
217
 
217
 
218
-        if ($record->isDirty($keysToWatch)) {
218
+        $isDirty = $record->isDirty($keysToWatch);
219
+
220
+        $record->save();
221
+
222
+        if ($isDirty) {
219
             CompanySettingsService::invalidateSettings($record->company_id);
223
             CompanySettingsService::invalidateSettings($record->company_id);
220
             $this->dispatch('localizationUpdated');
224
             $this->dispatch('localizationUpdated');
221
         }
225
         }
222
 
226
 
223
-        $record->save();
224
-
225
         return $record;
227
         return $record;
226
     }
228
     }
227
 
229
 

+ 0
- 2
app/Listeners/ConfigureCompanyDefault.php 查看文件

27
 
27
 
28
         app()->setLocale($settings['default_language']);
28
         app()->setLocale($settings['default_language']);
29
         locale_set_default($settings['default_language']);
29
         locale_set_default($settings['default_language']);
30
-        config(['app.timezone' => $settings['default_timezone']]);
31
-        date_default_timezone_set($settings['default_timezone']);
32
 
30
 
33
         Filament::getPanel('company')
31
         Filament::getPanel('company')
34
             ->brandName($company->name);
32
             ->brandName($company->name);

Loading…
取消
儲存