{{ trans('admin/settings/general.scope_locations_fmcs_support_help_text') }} {{ ($is_tested && count($mismatched) > 0) ? trans('admin/settings/general.scope_locations_fmcs_support_disabled_text', ['count' => count($mismatched)]) : '' }} @if(!$is_tested) {{ trans('admin/settings/general.scope_locations_fmcs_test_needed') }} @endif
{{-- wire:loading + wire:target render a spinner icon only while the check_locations action is in progress, and we disable the button so a second click during the request can't queue a duplicate walk. --}} {{-- Download-full-report link. Shown only after the enable-check has run AND found mismatches. The endpoint runs the full walk of Helper::test_locations_fmcs and streams a CSV, so expect it to take longer than the enable-check on large datasets since it doesn't early-bail. --}} @if ($is_tested && count($mismatched) > 0) {{-- Use fetch() to know exactly when the response arrives (a hard- coded timeout would either fire too early on huge datasets or leave the button disabled longer than needed on small ones). The response is then handed to the browser via a synthetic anchor + revoked object URL, matching the `download` behavior a normal would have produced. On any fetch error we fall back to a straight navigation so the user still gets their file even if the JS path fails (network hiccup, blob memory limit, etc.). --}}