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

Reference

Home widgets

Reference for the home screen widget registry, the module-declared widgets rendered by gated bundles, the assistant and approvals widgets, and the Mine or All scope.

A widget is a home screen item larger than an app tile that shows live content. The web app has two platform widgets, the widgets that modules declare in their metadata, and blank glass panels. This page lists them, their sizes, how they are rendered and saved, and the shared Mine or All scope. The home screen is on home screen, dock, and launcher.

Scope and source

  • Defined in: webapp/js/home.js (WIDGET_SIZES, BLANK_SIZES, WIDGETS, buildModuleWidgetDefs, openWidgetGallery, tileWidget), webapp/js/custom-widgets.js, webapp/js/widget-ai.js, webapp/js/widget-approvals.js, webapp/js/widget-scope.js
  • Count: 2 platform widgets (WIDGETS in webapp/js/home.js:289-320), 4 module widgets (every HomeWidgetMeta( in src/cluster_erp/modules), 6 footprints (WIDGET_SIZES), 4 blank panel sizes (BLANK_SIZES)

Footprints

Size Cells (columns by rows) Offered as blank panel Source
1x1 1 by 1 no webapp/js/home.js:86-93
2x1 2 by 1 no webapp/js/home.js:86-93
2x2 2 by 2 yes webapp/js/home.js:86-97
2x3 2 by 3 yes webapp/js/home.js:86-97
4x2 4 by 2 yes webapp/js/home.js:86-97
5x5 5 by 5 yes webapp/js/home.js:86-97

A footprint wider or taller than the device's board is clamped to the board (webapp/js/home.js:98-102). HomeWidgetMeta.size must match the pattern NxM (src/cluster_erp/core/metadata.py:710).

Platform widgets

Key Size Label key Behaviour Source
ai 2x3 widgets.ai The same conversation as the assistant app, chatted in the tile; starter chips come from assistant_starters of installed modules webapp/js/home.js:292-302, webapp/js/widget-ai.js:1-60
approvals 2x3 widgets.approvals The approver queue from GET /auth/approvals/inbox; a row opens the action sheet with approve, reject, defer, open record, or withdraw webapp/js/home.js:305-319, webapp/js/widget-approvals.js:1-9, webapp/js/widget-approvals.js:317

The approvals widget calls POST /auth/approvals/<id>/decide, POST and DELETE /auth/approvals/<id>/defer, and POST /auth/approvals/<id>/cancel (webapp/js/widget-approvals.js:126-268). Its header opens a full-screen queue (webapp/js/home.js:310-317). Approval logic is described on approvals and approval chains.

Module widgets

A module declares widgets in ModuleMeta.home_widgets. The platform knows the key, label, icon, size, and target section; the module's gated bundle renders the content (webapp/js/home.js:242-287).

Key Module Size English label Widget name in the bundle Opens section Source
projects projects 2x3 Project Board home_board board src/cluster_erp/modules/projects/module.py:267-274
projects-calendar projects 2x3 Project Calendar home_calendar calendar src/cluster_erp/modules/projects/module.py:275-282
sched production 2x3 Scheduling home_scheduling scheduling_board src/cluster_erp/modules/production/module.py:2517-2524
analytics analytics 2x3 Analytics home_model none src/cluster_erp/modules/analytics/module.py:80-86

buildModuleWidgetDefs() runs after metadata loads, before the first layout reconcile, so saved widgets are recognised (webapp/js/home.js:458-461). A tile render calls ensureModuleWidgets(module) and then the registered factory with {item, save, open, title} (webapp/js/home.js:255-283). If the module's app is not installed or licensed, the tile shows error.entitlement.module_not_installed (webapp/js/home.js:262-276). See gated app bundles.

tests/test_metadata_driven_rules.py:158 (test_home_widgets_are_module_metadata_rendered_by_module_bundles) checks that the four keys are declared, labelled in English and Turkish, sized NxM, registered in the module's bundle, and not named in home.js.

openWidgetGallery() offers the platform widgets, the module widgets of installed modules, and the four blank sizes (webapp/js/home.js:887-930). It opens on a right-click or long-press of empty home space (webapp/js/home.js:4407-4414). Adding a widget places it in the first free slot (webapp/js/home.js:865-877). A right-click on a widget asks to remove it (webapp/js/home.js:858-861, webapp/js/home.js:879-884).

A widget item is saved with the layout as {type: "widget", id, size, widget, cfg, col, row}. cfg holds per-tile settings such as the scope (webapp/js/home.js:660-673). A saved item that names a widget key no longer registered is dropped at reconcile (webapp/js/home.js:661-663).

Mine or All scope

widget-scope.js gives module widgets that summarise shared work a Mine and All segment (widgets.scope_mine, widgets.scope_all) (webapp/js/widget-scope.js:1-44).

Rule Value Source
Saved choice it.cfg.scope, stored with the layout in the user account webapp/js/widget-scope.js:21-24, webapp/js/widget-scope.js:44-60
Default Mine when the user is linked to an employee and lacks the planner permission the widget names; otherwise All webapp/js/widget-scope.js:21-27
Meaning of Mine Resolved by the server from the caller; the client sends no id webapp/js/widget-scope.js:11-12

Bundles receive resolveScope, scopeSegmentHtml, wireScope, and noEmployeeHtml through the platform context (webapp/js/custom-widgets.js:104-110).

Constraints and validation

  • Platform widgets carry an i18n key as label; module widgets carry a label dictionary resolved by resolveLabel (webapp/js/home.js:286-287).
  • The retired clock widget is dropped from saved layouts; time and date live on the status line (webapp/js/home.js:216-218).
  • Browser tests: web-client/_e2e_widgets_ai_sched.mjs, web-client/_e2e_approvals_widget.mjs, web-client/_e2e_widget_scope.mjs, web-client/_e2e_widget_projects.mjs, web-client/_e2e_analytics_widget.mjs, web-client/_e2e_widget_swap.mjs.

Terms introduced

Term Code identifier Definition Turkish term Source
home widget HomeWidgetMeta A module-declared home screen item rendered by the module's bundle. ana ekran bileşeni src/cluster_erp/core/metadata.py:698
widget footprint WIDGET_SIZES The cell size of a widget on the home grid. bileşen boyutu webapp/js/home.js:86
widget scope resolveScope The Mine or All choice that decides whose data a widget summarises. bileşen kapsamı webapp/js/widget-scope.js:21

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

Verified against commit 92f8051 · 2026-11-13