ソースを参照

Merge pull request #194 from andrewdwallo/development-3.x

Don't set timezone globally for company
3.x
Andrew Wallo 4ヶ月前
コミット
dcab9cedbf
コミッターのメールアドレスに関連付けられたアカウントが存在しません

+ 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);

読み込み中…
キャンセル
保存