Skip to content

Shell behavior

Documented against app commit ed7d6935. The same text lives in docs/agent/shell.md in the app repo.

Login, the home page, and the chrome that sits on every authenticated page. None of this creates a bogføring.

PathViewWhat it is
GET /loginresources/views/pages/auth/login.blade.phpEmail and password. POST /login starts the session. GET /logout ends it.
GET /resources/views/pages/dashboard/index.blade.phpDashboard. Role id 1 also sees the conversions calendar.

The navbar (resources/views/partials/nav.blade.php) holds the module menus, the active year, and the active company. The header bar (resources/views/partials/header.blade.php) shows the configured total tiles. The gear opens resources/views/partials/headermodalform.blade.php.

Menu items are wrapped in session('access') checks. Role id 1 sees every item. Sammenligning is additionally limited to role id 1 inside the Saldobalance menu.

AuthController@login writes the user, role, and module slugs into the session. Later routes use auth.check and module:{slug}. A missing slug returns the user to a page they cannot open. The slugs are seeded in database/seeders/ModuleSeeder.php: kunder, bogforing, regnskab, leverandorer, company, kontoplan, roleaccess, user, rule, cleanup, fiapprover, momskode.

GET /config/year/{year} (AccountController@updateActiveAccountYear) stores the active year on the user config. GET /config/account/{account} (UserConfigController@updateActiveAccount) stores the active company. Almost every module route requires both through the account and year middleware. Changing them reloads the page against the new scope. They do not copy data between years.

DashboardController@index loads ConversionService::getLastTwoYears for the calendar. The calendar shows which dates already have a rate. It does not fetch rates. Rates are filled by the scheduled command currencyexchange:get-daily-conversion-rates.

POST /settings/headers (CustomHeaderController@save) replaces the user’s chosen header tiles. The gear script also calls GET /api/settings/update-lock-amount (Api\CustomHeaderController@updateLockAmount) to store a lock amount on one tile. A tile whose live total differs from the lock is rendered with text-danger. The totals themselves are computed from the active company, not stored as bogføringer.

CoreController builds the shared $data (years, company, kontoplan, headers) for every page that extends it. A new page that needs the year switcher should extend that controller rather than reading the session directly.