Skip to content

Commit d46c4c3

Browse files
committed
Enhance example apps with help pages & dashboards
Add help pages, dashboards, demo data, and UI polish across example projects. Highlights: - CRM: add crm_help page, help nav item, app description and branding; minor navigation update. - Opportunity: add missing "Qualification" stage to the select options. - Kitchen-sink: rename app to "Showcase", add branding, new showcase_dashboard (metrics, charts, trend), showcase_help page, seeded demo records, and a daysFromNow helper. Add list_views to the KitchenSink object (all/active). - Todo: rename app to "Task Tracker", add branding, task_dashboard (metrics & charts), todo_help page, daysFromNow helper, expanded manifest seed data. Update TodoTask schema: rename label to "Task", add status/assignee/category/estimated_hours/description fields, adjust compactLayout, and add list_views (all, board, calendar, active). These changes improve the example apps' UX and provide richer sample data and views for demos.
1 parent d00842f commit d46c4c3

File tree

6 files changed

+489
-297
lines changed

6 files changed

+489
-297
lines changed

examples/crm/objectstack.config.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,45 @@ export default defineStack({
2121
EventObject
2222
],
2323
reports: [],
24+
pages: [
25+
{
26+
name: 'crm_help',
27+
label: 'Help & Resources',
28+
type: 'app',
29+
regions: [
30+
{
31+
name: 'main',
32+
components: [
33+
{
34+
type: 'container',
35+
properties: {
36+
className: 'prose max-w-3xl mx-auto p-8 text-foreground',
37+
children: [
38+
{ type: 'text', properties: { value: '# CRM Help Guide', className: 'text-3xl font-bold mb-6 block' } },
39+
{ type: 'text', properties: { value: 'Welcome to the CRM application. This guide covers the key features available in your sales workspace.', className: 'text-muted-foreground mb-6 block' } },
40+
{ type: 'text', properties: { value: '## Navigation', className: 'text-xl font-semibold mb-3 block' } },
41+
{ type: 'text', properties: { value: '- **Dashboard** — KPI metrics, revenue trends, pipeline charts\n- **Contacts** — Customer and lead management with map view\n- **Accounts** — Company records with geographic map\n- **Opportunities** — Sales pipeline with Kanban board\n- **Projects** — Task tracking with Gantt and Timeline views\n- **Calendar** — Events and meetings\n- **Orders & Products** — Sales catalog and order processing', className: 'whitespace-pre-line mb-6 block' } },
42+
{ type: 'text', properties: { value: '## View Types', className: 'text-xl font-semibold mb-3 block' } },
43+
{ type: 'text', properties: { value: 'Each object supports multiple view types. Use the view switcher in the toolbar to change between:\n- **Grid** — Tabular data with sorting and filtering\n- **Kanban** — Drag-and-drop board (Opportunities → Pipeline)\n- **Calendar** — Date-based event view (Events → Calendar)\n- **Gantt** — Project timeline (Projects → Gantt View)\n- **Map** — Geographic visualization (Accounts → Map View)\n- **Gallery** — Visual cards (Products → Product Gallery)', className: 'whitespace-pre-line mb-6 block' } },
44+
{ type: 'text', properties: { value: '## Keyboard Shortcuts', className: 'text-xl font-semibold mb-3 block' } },
45+
{ type: 'text', properties: { value: '- **⌘+K** — Open Command Palette for quick navigation\n- **⌘+N** — Create new record\n- Click any record row to open the detail panel', className: 'whitespace-pre-line block' } },
46+
]
47+
}
48+
}
49+
]
50+
}
51+
]
52+
}
53+
],
2454
apps: [
2555
App.create({
2656
name: 'crm_app',
2757
label: 'CRM',
2858
icon: 'briefcase',
59+
description: 'Sales pipeline, accounts, and customer management',
60+
branding: {
61+
primaryColor: '#3B82F6',
62+
},
2963
navigation: [
3064
{
3165
id: 'nav_dashboard',
@@ -90,6 +124,13 @@ export default defineStack({
90124
icon: 'package'
91125
}
92126
]
127+
},
128+
{
129+
id: 'nav_help',
130+
type: 'page',
131+
pageName: 'crm_help',
132+
label: 'Help',
133+
icon: 'help-circle'
93134
}
94135
]
95136
})

examples/crm/src/objects/opportunity.object.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const OpportunityObject = ObjectSchema.create({
77
fields: {
88
name: Field.text({ label: 'Opportunity Name', required: true, searchable: true }),
99
amount: Field.currency({ label: 'Amount' }),
10-
stage: Field.select(["Prospecting", "Proposal", "Negotiation", "Closed Won", "Closed Lost"], { label: 'Stage' }),
10+
stage: Field.select(["Prospecting", "Qualification", "Proposal", "Negotiation", "Closed Won", "Closed Lost"], { label: 'Stage' }),
1111
close_date: Field.date({ label: 'Close Date' }),
1212
account: Field.lookup('account', { label: 'Account' }),
1313
contacts: Field.lookup('contact', { label: 'Contacts', multiple: true }),

0 commit comments

Comments
 (0)