# XWUISuperCRM

Super-tier shell for the CRM domain that ships ahead of its industry components: with `industry/crm/` still empty, its static `menuTree()` and `pages()` lock the public menu-key contract - a single `crm` group (icon `users`) of seven leaves: Dashboard, Contacts, Companies, Deals, Pipeline, Activities and Reports. The `crm-dashboard` leaf renders a real four-tile KPI strip via `power/XWUIDashboard` (Active Deals, Pipeline Value SAR, Won This Month, Lost This Month) so a stakeholder demo has no "coming soon" hole, while every other leaf mounts a `basic/XWUIEmpty` placeholder until the real page-classes land and get wired into this registry. The Dashboard leaf is flagged `meta.default: true`, making it the cold-start landing when no `data.activeKey` is set. Hosts adjust `conf_comp.title` (default `CRM`) / `sidebarWidth` / `sidebarCollapsed`, set the sidebar-footer identity via `data.user`, and fold it next to sibling Super apps through `extraTree` / `extraPages` or `XWUISuperApp.merge()`.

## Basic Usage

Mounts the CRM shell standalone with a Sales Manager identity on the synthesised KPI dashboard, with every other leaf opening a placeholder.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: Stands XWUISuperCRM up on its own with activeKey crm-dashboard, landing on the four-KPI strip while the six placeholder leaves stay reachable from the sidebar.
```

## Merged With Sales

Folds CRM with an inline `AppSalesDemo` (stand-in for the upcoming `XWUISuperSales`) via `XWUISuperApp.merge()`, mounting the combined descriptor on a host `XWUISuperApp`.

```example
file: examples/MergedWithSales.ts
html: examples/MergedWithSales.html
title: Merged With Sales
description: Union-merges XWUISuperCRM with a placeholder Sales Super app into one host XWUISuperApp via extraTree/extraPages, opening on crm-dashboard with the Sales group beneath the CRM group.
```

## Arabic RTL - Pipeline leaf

The CRM shell localized for an Arabic sales team, landing on the Pipeline board with a branded logo and a new-leads badge.

```example
file: examples/PipelineArabicRtl.ts
html: examples/PipelineArabicRtl.html
title: Arabic RTL - Pipeline leaf
description: locale 'ar' mirrors the shell and lands on crm-pipeline with an Arabic manager name, rounded logo and notifications badge.
```

## Embedded Deals panel

The CRM shell embedded as a Deals panel with route-sync disabled, the sidebar collapsed, and mobile auto-hide off.

```example
file: examples/EmbeddedDealsPanel.ts
html: examples/EmbeddedDealsPanel.html
title: Embedded Deals panel
description: activeKey crm-deals with autoSyncRoute off, sidebarCollapsed and mobileAutoHide off for embedding in a host.
```

```api
```
