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:
2026-08-25 02:29:00 +03:30
co-authored by Cursor
parent 4562d00bd3
commit 8984899042
10 changed files with 300 additions and 44 deletions
@@ -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;