Factorizer/Cluster ERP WikiCluster ERP Türkçe
Home / Web app

Reference

Generic tree and settings screens

Reference for gen-tree.js, gen-settings.js, general.js, retention.js, and changed.js, covering tree, module settings, and Settings screens.

This page covers the remaining generic screens of the web app: the hierarchy screen built from TreeViewMeta, the module settings screen built from a settings section's tabs, and three screens of the Settings app (general preferences, record retention, and changed records). Lists and cards are on generic list and generic detail.

Scope and source

  • Defined in: webapp/js/gen-tree.js (makeGenTree), webapp/js/gen-settings.js (makeGenSettings, requestSettingsTab), webapp/js/general.js (renderGeneral), webapp/js/retention.js (renderRetentionSettings), webapp/js/changed.js (makeChangedRecords)
  • Count: 1 tree section and 9 settings sections in module metadata (counted with grep -rn 'view_type="tree"' and grep -rn 'view_type="settings"' over src/cluster_erp/modules)

Tree screen

makeGenTree(moduleName, entityKey) renders a view_type: "tree" section (webapp/js/gen-tree.js:21, webapp/js/module-app.js:117-118).

Metadata field Use Default Source
tree_view.display_key Node label name webapp/js/gen-tree.js:31
tree_view.parent_id_key Field that holds the parent id parent_id webapp/js/gen-tree.js:32
tree_view.max_depth_warning Depth at which a warning is shown 0 (none) webapp/js/gen-tree.js:33

The tree loads the entity's list once with limit: 500 and nests it in the browser. Roots whose parent no longer exists are still shown at depth 0 (webapp/js/gen-tree.js:41-82). A node tap opens the read-only record card; the parent is a normal form field, so moving a node is an edit (webapp/js/gen-tree.js:98-118). Adding under a node pre-fills the parent field (webapp/js/gen-tree.js:84-96). Create, update, and delete depend on <entity_type>.create, .update, and .delete (webapp/js/gen-tree.js:34-36).

Module settings screen

makeGenSettings(moduleName, tabKeys) renders a view_type: "settings" section. Each key in tabs is an entity key of the module (webapp/js/gen-settings.js:27-74).

Behaviour Rule Source
Entry list One row per entity, labelled with label_plural webapp/js/gen-settings.js:51-74
Scoped entity An entity with scoped_by gets a scope picker; the chosen scope is kept while the screen lives webapp/js/gen-settings.js:28, webapp/js/gen-settings.js:89-150
Rows The list is loaded with limit: 200, filtered by the scope webapp/js/gen-settings.js:124
Actions single_record actions on selected rows, other actions as global entries webapp/js/gen-settings.js:165-177, webapp/js/gen-settings.js:225
Search jump requestSettingsTab(module, tab) opens a given tab once, after the screen paints webapp/js/gen-settings.js:20-25, webapp/js/gen-settings.js:42-47

Settings of system apps that have no app of their own appear under Settings › System Apps (settings.system_apps) through SYSTEM_APP_SETTINGS (webapp/js/home.js:3446-3461, webapp/js/home.js:3717).

Settings app rows

The Settings app is built by settingsRows(), which is also the source of settings search targets (webapp/js/home.js:3475-3527).

Row (English label) i18n key Opens Source
General settings.general renderGeneral webapp/js/home.js:3481
Accessibility settings.accessibility renderAccessibility webapp/js/home.js:3482
Home Screen settings.home_screen renderHomeScreenSettings webapp/js/home.js:3483
Assistant row settings.ai nothing; the row has no open handler webapp/js/home.js:3484
Language common.language renderLanguage webapp/js/home.js:3485
Notifications settings.notifications notification rules list webapp/js/home.js:3486
Error Log settings.error_log makeErrorLog webapp/js/home.js:3487
Activity Log settings.activity_log makeActivityLog webapp/js/home.js:3488
Changed Records settings.changed_records makeChangedRecords webapp/js/home.js:3489
Record Retention settings.retention renderRetentionSettings webapp/js/home.js:3490
Mail settings.mail renderMailSettings webapp/js/home.js:3491
System Apps settings.system_apps renderSystemApps webapp/js/home.js:3492
Admin Settings settings.admin renderAdmin and the admin entity lists webapp/js/home.js:3493-3511
License settings.license renderLicense webapp/js/home.js:3512

The log screens and the mail screens are on mail and profile screens. The licence screen is described on app store, licensing, and entitlements.

General preferences

renderGeneral(c) shows the theme (light or dark), the row density (three tiers), and the time zone. The common time zones come first, then every zone the browser supports (webapp/js/general.js:13-63, webapp/js/prefs.js:11-36). Theme and time zone are stored in the browser; density is also stored in the user account. See themes, tokens, and accessibility and user UI state.

Record retention

renderRetentionSettings(c) reads GET /records/retention/ and shows the retention period in years with the minimum and maximum the server returns (webapp/js/retention.js:19-33). Save checks the range in the browser and sends PUT /records/retention/ with retention_years (webapp/js/retention.js:35-50). The server's upper bound is RETENTION_MAX_YEARS = 250 (src/cluster_erp/modules/records/retention/models.py:15). Retention and purge are described on records module.

Changed records

makeChangedRecords(pushView) is the read-only window on the change history (webapp/js/changed.js:1-7, webapp/js/changed.js:127). It calls GET /logs/change-history/tables once and GET /logs/change-history/ with limit, offset, search, table_name, action, date_from, and date_to. The date range starts at the first day of the current month (webapp/js/changed.js:127-160). The history itself is described on change history.

Constraints and validation

  • A tree with more than 500 nodes is cut at 500, because the screen requests one page of that size (webapp/js/gen-tree.js:46).
  • A settings tab key that is not an entity of the module is skipped (webapp/js/gen-settings.js:34-41).
  • Browser tests: web-client/_e2e_settings_full.mjs, web-client/_e2e_density.mjs.

Terms introduced

Term Code identifier Definition Turkish term Source
settings section makeGenSettings A module screen that lists the module's reference entities as rows. ayar bölümü webapp/js/gen-settings.js:27
scope picker scoped_by The selector that limits a settings list to one parent record. kapsam seçici webapp/js/gen-settings.js:89
changed records makeChangedRecords The read-only screen over the change history. Değiştirilen Kayıtlar webapp/js/changed.js:127

Verified against commit 92f8051 on 2026-11-13.

Verified against commit 92f8051 · 2026-11-13