Category Tree Technical Guide

Index

1. High-level structure

The Category Tree provides an interactive view over Cash Categories, Cash Codes, and Expressions. It is optimized for Razor Pages with desktop and mobile layouts.

Category Tree desktop mode
Category Tree mobile mode

Node types you will see:

2. Enumerations and constants

Key enums and special keys used throughout the UI and server handlers:

Screenshot placeholders for annotated node types:

Category Tree anatomy

3. Permissions and roles

Most interactions are available read-only; mutations require admin privileges.

UI gating:

4. Navigation and selection mechanics

The page supports deep-linking and smart selection via query parameters, plus an embedded mode for desktop.

5. Create/Edit flows

Create and edit operations use Razor Pages. On desktop they load embedded into the right pane; on mobile they navigate to full pages. The UI adapts the available actions based on the selected node type and admin role.

Add a new Cash Code
Add a new Category Code
Cash expressions
Set Primary Totals

6. Reorder mechanics

Reordering is contextual. All reorders are admin-only and persist server-side through Razor Page handlers.

Order statements

7. Enable/Disable

Enable/Disable toggles availability without deleting items.

Enable/disable hierarchies

8. Expression details

Expressions compute derived values and are maintained in a flat list under __EXPRESSIONS__.

Cash Expression Details

9. Mobile specifics

Mobile uses a single-pane tree with an adaptive action bar; edit and view actions navigate to full pages.

Mobile action bar

10. Mutation / injection

Embedded desktop flows rely on marker-based selection and injection to avoid full-page reloads.

11. Disconnected subtree

The Disconnected subtree lists categories that are not currently mapped into the primary hierarchy or any parent category.

Disconnected categories

12. Root & primary hierarchy

The primary hierarchy models Profit and VAT structures and anchors user navigation.

Primary Roots

13. Error & fallback

The UI favours smooth in-place updates, but degrades gracefully when something goes wrong.

14. Styling & icons

Visual cues make the tree scannable and consistent.

Category Tree node type key

15. Security / antiforgery

Razor Pages security is enforced on both client and server sides.

16. Persistence

The tree remembers what you had open and which item was active.

17. Performance considerations

The UI is tuned to stay responsive with large hierarchies.

18. Glossary / quick reference