• Mahmoud Aglan's avatar
    fix(branches): stop the branch switcher 500ing on an unbuilt executive view · fc7060b9
    Mahmoud Aglan authored
    config/branch_lock.php names executive.dashboard as the lock's destination,
    but that route was never built. route() throws on an undefined name, so
    switching to "كل الفروع" crashed in production after the session had already
    been written — the user landed in all-branches mode via an error page.
    
    isLocked() already refused to lock without the route, and that was believed
    to make the whole feature dormant. It only made the *gating* dormant: the
    guard sits on the decision, while the crash is at the dereference. Four other
    sites turned the same name into a URL, and BranchSwitcher's was outside the
    gate entirely. Auth/Login reached it only through the config key, so it does
    not even contain the string "executive".
    
    Route every caller through BranchContext::redirectRouteName(), which returns
    the configured route when it exists and degrades to the dashboard when it
    does not. The dashboard is the right fallback while the view is unbuilt: the
    lock is dormant, so it is already unfiltered and showing the every-branch
    numbers the user asked for.
    
    The test pins the resolver in both directions and fails if any Livewire
    component or middleware reads branch_lock.redirect_route directly again.
    Co-Authored-By: 's avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
    fc7060b9
Name
Last commit
Last update
Screenshots Loading commit data...
app Loading commit data...
bootstrap Loading commit data...
config Loading commit data...
database Loading commit data...
docker Loading commit data...
docs Loading commit data...
docs-site Loading commit data...
gap-filling-plans Loading commit data...
marketing-site Loading commit data...
plans Loading commit data...
public Loading commit data...
reference/oc-sport Loading commit data...
resources Loading commit data...
routes Loading commit data...
scripts Loading commit data...
storage Loading commit data...
tests Loading commit data...
.dockerignore Loading commit data...
.editorconfig Loading commit data...
.env.example Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.npmrc Loading commit data...
Beanding Guide.txt Loading commit data...
CLAUDE.md Loading commit data...
Dockerfile Loading commit data...
README.md Loading commit data...
artisan Loading commit data...
captain-definition Loading commit data...
composer.json Loading commit data...
composer.lock Loading commit data...
deploy.sh Loading commit data...
elcaptain-sportsonly-db.md Loading commit data...
one-click-app.yml Loading commit data...
package-lock.json Loading commit data...
package.json Loading commit data...
phpunit.xml Loading commit data...
system info.txt Loading commit data...
vite.config.js Loading commit data...
نادى الشيخ زايد كشف بيانات اللاعبين (2).html Loading commit data...