fix(settings): push trading-hours changes to live user prices immediately
Recompute home price display on save, broadcast settings over SSE, and keep last-price status in sync without a user refresh. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Setting;
|
||||
use App\Services\ConfigService;
|
||||
use App\Services\PriceChannelBroadcastService;
|
||||
use App\Services\SuperAdminProgramSettingsOverlay;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -167,6 +168,14 @@ class SettingsController extends Controller
|
||||
})->afterResponse();
|
||||
}
|
||||
|
||||
if (app(ConfigService::class)->isTradingHoursSettingKey($key)) {
|
||||
try {
|
||||
app(ConfigService::class)->notifyTradingHoursChanged();
|
||||
} catch (\Throwable $e) {
|
||||
report($e);
|
||||
}
|
||||
}
|
||||
|
||||
if ($isNew) {
|
||||
$projectName = Setting::where('key', 'name_fa')->value('value') ?: 'پروژه';
|
||||
$settingTitle = trim($request->title_fa ?? '') ?: $request->key;
|
||||
|
||||
Reference in New Issue
Block a user