robobyte-front-builder 1.0.25 → 1.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/INTEGRATION.md +94 -10
- package/LICENSE +65 -0
- package/README.md +149 -21
- package/docs/ReportViewer.md +581 -0
- package/docs/fetchReportData.md +379 -0
- package/docs/printLayout.md +405 -0
- package/package.json +29 -1
- package/src/lib/agGridTheme.js +58 -0
- package/src/lib/agGridThemeContext.jsx +42 -0
- package/src/lib/index.js +7 -0
- package/src/lib/providers/RoboByteFrontBuilderProvider.jsx +14 -0
- package/src/views/builder/viewer/renderers/DataGridRenderer.jsx +4 -4
- package/src/views/genericTable/SGrid.js +5 -5
- package/src/views/genericTable/TAGGrid.js +3 -5
- package/src/views/rolePermissions/UpdateReportPermissionDialog.js +4 -0
- package/training/00-index.md +168 -0
- package/training/01-input.md +144 -0
- package/training/02-checkbox.md +107 -0
- package/training/03-dropdown.md +135 -0
- package/training/04-datepicker.md +139 -0
- package/training/05-radio.md +123 -0
- package/training/06-number.md +133 -0
- package/training/07-textarea.md +114 -0
- package/training/08-richtext.md +112 -0
- package/training/09-tag.md +110 -0
- package/training/10-time.md +107 -0
- package/training/11-toggle.md +108 -0
- package/training/12-signature.md +107 -0
- package/training/13-autocomplete.md +134 -0
- package/training/14-button.md +168 -0
- package/training/15-label.md +138 -0
- package/training/16-header.md +128 -0
- package/training/17-divider.md +96 -0
- package/training/18-image.md +105 -0
- package/training/19-link.md +108 -0
- package/training/20-banner.md +122 -0
- package/training/21-progress-circle.md +101 -0
- package/training/22-progress-line.md +93 -0
- package/training/23-menu.md +139 -0
- package/training/24-popover.md +114 -0
- package/training/25-layout.md +116 -0
- package/training/26-layout-cell.md +143 -0
- package/training/27-card.md +87 -0
- package/training/28-wizard.md +126 -0
- package/training/29-wizard-step.md +92 -0
- package/training/30-repeater.md +123 -0
- package/training/31-dialog.md +131 -0
- package/training/32-breadcrumb.md +121 -0
- package/training/33-dataGrid.md +129 -0
- package/training/34-dataTableViewer.md +115 -0
- package/training/35-reportViewer.md +673 -0
- package/training/36-viewRenderer.md +110 -0
- package/training/37-treeView.md +170 -0
- package/training/38-kpi-metric.md +148 -0
- package/training/39-kpi-trend.md +105 -0
- package/training/40-kpi-badge.md +112 -0
- package/training/41-kpi-statusDot.md +118 -0
- package/training/42-kpi-iconBox.md +114 -0
- package/training/43-kpi-gauge.md +143 -0
- package/training/44-kpi-bulletChart.md +126 -0
- package/training/45-kpi-colorScale.md +143 -0
- package/training/46-kpi-rating.md +125 -0
- package/training/47-kpi-countdown.md +151 -0
- package/training/48-fetchReportData.md +276 -0
- package/training/49-printLayout.md +215 -0
- package/training/examples/01-login-form.json +176 -0
- package/training/examples/02-contact-form.json +141 -0
- package/training/examples/03-kpi-cards-row.json +123 -0
- package/training/examples/04-settings-toggles.json +153 -0
- package/training/examples/05-user-profile-card.json +136 -0
- package/training/examples/06-date-range-filter.json +108 -0
- package/training/examples/07-search-bar-results.json +130 -0
- package/training/examples/08-notification-settings.json +131 -0
- package/training/examples/09-employee-profile-form.json +259 -0
- package/training/examples/10-invoice-form.json +241 -0
- package/training/examples/11-dashboard-overview.json +251 -0
- package/training/examples/12-registration-wizard.json +154 -0
- package/training/examples/13-product-catalog.json +168 -0
- package/training/examples/14-data-table-with-filters.json +180 -0
- package/training/examples/15-tabbed-profile.json +92 -0
- package/training/examples/16-kpi-full-row.json +203 -0
- package/training/examples/17-tree-detail-view.json +139 -0
- package/training/examples/18-employee-management.json +233 -0
- package/training/examples/19-sales-dashboard.json +272 -0
- package/training/examples/20-checkout-wizard.json +225 -0
- package/training/examples/21-analytics-page.json +222 -0
- package/training/examples/22-hr-onboarding.json +222 -0
- package/training/examples/23-document-browser.json +241 -0
- package/training/examples/24-order-management.json +290 -0
- package/training/examples/25-crm-contact-page.json +272 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Employee management page with search/filter bar, editable data grid, add/edit dialogs, and status banner",
|
|
3
|
+
"components_used": ["layout", "layout-cell", "header", "label", "input", "dropdown", "button", "dataGrid", "dialog", "banner", "kpi-metric", "kpi-statusDot"],
|
|
4
|
+
"root": {
|
|
5
|
+
"type": "layout",
|
|
6
|
+
"props": { "cols": 1, "rowGap": 20 },
|
|
7
|
+
"children": [
|
|
8
|
+
{
|
|
9
|
+
"type": "layout-cell",
|
|
10
|
+
"props": {},
|
|
11
|
+
"style": { "justifyContent": "space-between", "alignItems": "center" },
|
|
12
|
+
"children": [
|
|
13
|
+
{
|
|
14
|
+
"type": "layout",
|
|
15
|
+
"props": { "cols": 1, "rowGap": 2 },
|
|
16
|
+
"children": [
|
|
17
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
18
|
+
{ "type": "header", "props": { "text": "Employee Management", "variant": "h4", "component": "h1", "color": "textPrimary" } }
|
|
19
|
+
]},
|
|
20
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
21
|
+
{ "type": "label", "props": { "text": "Manage your workforce — add, edit, and track employees", "variant": "body2", "color": "textSecondary" } }
|
|
22
|
+
]}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "button",
|
|
27
|
+
"props": { "label": "Add Employee", "variant": "contained", "color": "primary", "prefix": "PersonAddOutlined", "size": "medium" },
|
|
28
|
+
"actions": { "onClick": { "type": "custom", "code": "openDialog('addEmployeeDialog')" } }
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "layout-cell",
|
|
34
|
+
"props": {},
|
|
35
|
+
"style": {},
|
|
36
|
+
"children": [
|
|
37
|
+
{
|
|
38
|
+
"type": "banner",
|
|
39
|
+
"props": { "key": "actionBanner", "message": "data.bannerMessage", "severity": "data.bannerSeverity", "open": "data.showBanner", "dismissible": true, "icon": true },
|
|
40
|
+
"actions": { "onClose": { "type": "custom", "code": "setData({ showBanner: false })" } }
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"type": "layout-cell",
|
|
46
|
+
"props": {},
|
|
47
|
+
"style": {},
|
|
48
|
+
"children": [
|
|
49
|
+
{
|
|
50
|
+
"type": "layout",
|
|
51
|
+
"props": { "cols": 4, "gap": 16 },
|
|
52
|
+
"children": [
|
|
53
|
+
{
|
|
54
|
+
"type": "layout-cell",
|
|
55
|
+
"props": {},
|
|
56
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "8px", "boxShadow": "0 1px 4px rgba(0,0,0,0.06)", "padding": "16px" },
|
|
57
|
+
"children": [
|
|
58
|
+
{ "type": "kpi-metric", "props": { "valueKey": "data.stats.total", "label": "Total Employees", "format": "number", "fontSize": "24px", "fontWeight": "700", "align": "left", "labelPosition": "above", "labelFontSize": "11px", "labelColor": "text.secondary" } }
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "layout-cell",
|
|
63
|
+
"props": {},
|
|
64
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "8px", "boxShadow": "0 1px 4px rgba(0,0,0,0.06)", "padding": "16px" },
|
|
65
|
+
"children": [
|
|
66
|
+
{ "type": "kpi-metric", "props": { "valueKey": "data.stats.active", "label": "Active", "format": "number", "fontSize": "24px", "fontWeight": "700", "color": "success.main", "align": "left", "labelPosition": "above", "labelFontSize": "11px", "labelColor": "text.secondary" } }
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "layout-cell",
|
|
71
|
+
"props": {},
|
|
72
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "8px", "boxShadow": "0 1px 4px rgba(0,0,0,0.06)", "padding": "16px" },
|
|
73
|
+
"children": [
|
|
74
|
+
{ "type": "kpi-metric", "props": { "valueKey": "data.stats.onLeave", "label": "On Leave", "format": "number", "fontSize": "24px", "fontWeight": "700", "color": "warning.main", "align": "left", "labelPosition": "above", "labelFontSize": "11px", "labelColor": "text.secondary" } }
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"type": "layout-cell",
|
|
79
|
+
"props": {},
|
|
80
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "8px", "boxShadow": "0 1px 4px rgba(0,0,0,0.06)", "padding": "16px" },
|
|
81
|
+
"children": [
|
|
82
|
+
{ "type": "kpi-metric", "props": { "valueKey": "data.stats.newThisMonth", "label": "New This Month", "format": "number", "fontSize": "24px", "fontWeight": "700", "color": "info.main", "align": "left", "labelPosition": "above", "labelFontSize": "11px", "labelColor": "text.secondary" } }
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"type": "layout-cell",
|
|
91
|
+
"props": {},
|
|
92
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "12px", "boxShadow": "0 2px 8px rgba(0,0,0,0.08)" },
|
|
93
|
+
"children": [
|
|
94
|
+
{
|
|
95
|
+
"type": "layout",
|
|
96
|
+
"props": { "cols": 1, "rowGap": 0 },
|
|
97
|
+
"children": [
|
|
98
|
+
{
|
|
99
|
+
"type": "layout-cell",
|
|
100
|
+
"props": {},
|
|
101
|
+
"style": { "padding": "16px 20px", "borderBottom": "1px solid #e8e8e8", "gap": "12px" },
|
|
102
|
+
"children": [
|
|
103
|
+
{ "type": "input", "props": { "key": "search", "label": "Search employees...", "prefix": "SearchOutlined", "size": "small" }, "style": { "width": "280px" } },
|
|
104
|
+
{
|
|
105
|
+
"type": "dropdown",
|
|
106
|
+
"props": {
|
|
107
|
+
"key": "deptFilter",
|
|
108
|
+
"label": "Department",
|
|
109
|
+
"size": "small",
|
|
110
|
+
"options": [
|
|
111
|
+
{ "label": "All", "value": "" },
|
|
112
|
+
{ "label": "Engineering", "value": "eng" },
|
|
113
|
+
{ "label": "Sales", "value": "sales" },
|
|
114
|
+
{ "label": "HR", "value": "hr" },
|
|
115
|
+
{ "label": "Finance", "value": "finance" }
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"type": "dropdown",
|
|
121
|
+
"props": {
|
|
122
|
+
"key": "statusFilter",
|
|
123
|
+
"label": "Status",
|
|
124
|
+
"size": "small",
|
|
125
|
+
"options": [
|
|
126
|
+
{ "label": "All", "value": "" },
|
|
127
|
+
{ "label": "Active", "value": "active" },
|
|
128
|
+
{ "label": "On Leave", "value": "leave" },
|
|
129
|
+
{ "label": "Inactive", "value": "inactive" }
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"type": "button",
|
|
135
|
+
"props": { "label": "Filter", "variant": "outlined", "color": "primary", "size": "small" },
|
|
136
|
+
"actions": { "onClick": { "type": "custom", "code": "filterEmployees({ search: form.search, dept: form.deptFilter, status: form.statusFilter })" } }
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"type": "layout-cell",
|
|
142
|
+
"props": {},
|
|
143
|
+
"style": {},
|
|
144
|
+
"children": [
|
|
145
|
+
{
|
|
146
|
+
"type": "dataGrid",
|
|
147
|
+
"props": {
|
|
148
|
+
"key": "employeeGrid",
|
|
149
|
+
"dataKey": "data.employees",
|
|
150
|
+
"height": "480px",
|
|
151
|
+
"readOnly": false,
|
|
152
|
+
"showAddBtn": false,
|
|
153
|
+
"showDeleteCol": true,
|
|
154
|
+
"columns": "data.employeeColumns",
|
|
155
|
+
"rowSelection": "single"
|
|
156
|
+
},
|
|
157
|
+
"actions": {
|
|
158
|
+
"onRowClick": { "type": "custom", "code": "setData({ selectedEmployee: clickedRow }); openDialog('editEmployeeDialog')" }
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
"dialogs": [
|
|
170
|
+
{
|
|
171
|
+
"key": "addEmployeeDialog",
|
|
172
|
+
"title": "Add New Employee",
|
|
173
|
+
"width": "600px",
|
|
174
|
+
"children": [
|
|
175
|
+
{
|
|
176
|
+
"type": "layout",
|
|
177
|
+
"props": { "cols": 2, "gap": 16, "rowGap": 16 },
|
|
178
|
+
"children": [
|
|
179
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
180
|
+
{ "type": "input", "props": { "key": "newFirstName", "label": "First Name", "required": true }, "style": { "width": "100%" } }
|
|
181
|
+
]},
|
|
182
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
183
|
+
{ "type": "input", "props": { "key": "newLastName", "label": "Last Name", "required": true }, "style": { "width": "100%" } }
|
|
184
|
+
]},
|
|
185
|
+
{ "type": "layout-cell", "props": { "colSpan": 2 }, "style": {}, "children": [
|
|
186
|
+
{ "type": "input", "props": { "key": "newEmail", "label": "Work Email", "required": true, "prefix": "EmailOutlined" }, "style": { "width": "100%" } }
|
|
187
|
+
]},
|
|
188
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
189
|
+
{ "type": "dropdown", "props": { "key": "newDept", "label": "Department", "required": true, "fullWidth": true, "optionsKey": "data.departments", "labelField": "name", "valueField": "id" } }
|
|
190
|
+
]},
|
|
191
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
192
|
+
{ "type": "dropdown", "props": { "key": "newRole", "label": "Role", "required": true, "fullWidth": true, "optionsKey": "data.roles", "labelField": "name", "valueField": "id" } }
|
|
193
|
+
]}
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
"actions": {
|
|
198
|
+
"onConfirm": { "type": "custom", "code": "createEmployee({ firstName: form.newFirstName, lastName: form.newLastName, email: form.newEmail, dept: form.newDept, role: form.newRole }); setData({ showBanner: true, bannerMessage: 'Employee added successfully', bannerSeverity: 'success' })" },
|
|
199
|
+
"confirmLabel": "Add Employee",
|
|
200
|
+
"cancelLabel": "Cancel"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"key": "editEmployeeDialog",
|
|
205
|
+
"title": "Edit Employee",
|
|
206
|
+
"width": "600px",
|
|
207
|
+
"children": [
|
|
208
|
+
{
|
|
209
|
+
"type": "layout",
|
|
210
|
+
"props": { "cols": 2, "gap": 16, "rowGap": 16 },
|
|
211
|
+
"children": [
|
|
212
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
213
|
+
{ "type": "input", "props": { "key": "editFirstName", "label": "First Name", "required": true, "value": "data.selectedEmployee.firstName" }, "style": { "width": "100%" } }
|
|
214
|
+
]},
|
|
215
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
216
|
+
{ "type": "input", "props": { "key": "editLastName", "label": "Last Name", "required": true, "value": "data.selectedEmployee.lastName" }, "style": { "width": "100%" } }
|
|
217
|
+
]},
|
|
218
|
+
{ "type": "layout-cell", "props": { "colSpan": 2 }, "style": {}, "children": [
|
|
219
|
+
{ "type": "kpi-statusDot", "props": { "valueKey": "data.selectedEmployee.status", "size": "8", "pulse": false, "showLabel": true, "thresholds": [{ "operator": "==", "value": "active", "color": "success.main", "label": "Active" }, { "operator": "==", "value": "leave", "color": "warning.main", "label": "On Leave" }] } }
|
|
220
|
+
]}
|
|
221
|
+
]
|
|
222
|
+
}
|
|
223
|
+
],
|
|
224
|
+
"actions": {
|
|
225
|
+
"onConfirm": { "type": "custom", "code": "updateEmployee(data.selectedEmployee.id, { firstName: form.editFirstName, lastName: form.editLastName }); setData({ showBanner: true, bannerMessage: 'Employee updated', bannerSeverity: 'success' })" },
|
|
226
|
+
"confirmLabel": "Save Changes",
|
|
227
|
+
"cancelLabel": "Cancel"
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
"actions": [],
|
|
232
|
+
"timers": []
|
|
233
|
+
}
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Full sales dashboard: KPI cards, gauge, bullet charts, rep leaderboard, and pipeline report",
|
|
3
|
+
"components_used": ["layout", "layout-cell", "header", "label", "dropdown", "button", "kpi-metric", "kpi-trend", "kpi-badge", "kpi-gauge", "kpi-bulletChart", "kpi-rating", "reportViewer", "divider", "kpi-statusDot"],
|
|
4
|
+
"root": {
|
|
5
|
+
"type": "layout",
|
|
6
|
+
"props": { "cols": 1, "rowGap": 24 },
|
|
7
|
+
"children": [
|
|
8
|
+
{
|
|
9
|
+
"type": "layout-cell",
|
|
10
|
+
"props": {},
|
|
11
|
+
"style": { "justifyContent": "space-between", "alignItems": "center" },
|
|
12
|
+
"children": [
|
|
13
|
+
{
|
|
14
|
+
"type": "layout",
|
|
15
|
+
"props": { "cols": 1, "rowGap": 4 },
|
|
16
|
+
"children": [
|
|
17
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
18
|
+
{ "type": "header", "props": { "text": "Sales Dashboard", "variant": "h4", "component": "h1", "color": "textPrimary" } }
|
|
19
|
+
]},
|
|
20
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
21
|
+
{ "type": "label", "props": { "text": "data.periodLabel", "variant": "body2", "color": "textSecondary" } }
|
|
22
|
+
]}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "layout",
|
|
27
|
+
"props": { "cols": 1, "rowGap": 0 },
|
|
28
|
+
"children": [
|
|
29
|
+
{ "type": "layout-cell", "props": {}, "style": { "gap": "12px", "alignItems": "center" }, "children": [
|
|
30
|
+
{
|
|
31
|
+
"type": "dropdown",
|
|
32
|
+
"props": {
|
|
33
|
+
"key": "period",
|
|
34
|
+
"label": "Period",
|
|
35
|
+
"size": "small",
|
|
36
|
+
"options": [
|
|
37
|
+
{ "label": "This Month", "value": "month" },
|
|
38
|
+
{ "label": "This Quarter", "value": "quarter" },
|
|
39
|
+
{ "label": "YTD", "value": "ytd" },
|
|
40
|
+
{ "label": "Last Year", "value": "lastyear" }
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"actions": { "onChange": { "type": "custom", "code": "loadSalesDashboard(form.period)" } }
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "dropdown",
|
|
47
|
+
"props": {
|
|
48
|
+
"key": "region",
|
|
49
|
+
"label": "Region",
|
|
50
|
+
"size": "small",
|
|
51
|
+
"options": [
|
|
52
|
+
{ "label": "All Regions", "value": "" },
|
|
53
|
+
{ "label": "North America", "value": "na" },
|
|
54
|
+
{ "label": "Europe", "value": "eu" },
|
|
55
|
+
{ "label": "Asia Pacific", "value": "apac" }
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{ "type": "button", "props": { "label": "Refresh", "variant": "outlined", "color": "inherit", "size": "small", "prefix": "RefreshOutlined" }, "actions": { "onClick": { "type": "custom", "code": "loadSalesDashboard(form.period, form.region)" } } }
|
|
60
|
+
]}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"type": "layout-cell",
|
|
67
|
+
"props": {},
|
|
68
|
+
"style": {},
|
|
69
|
+
"children": [
|
|
70
|
+
{
|
|
71
|
+
"type": "layout",
|
|
72
|
+
"props": { "cols": 4, "gap": 16 },
|
|
73
|
+
"children": [
|
|
74
|
+
{
|
|
75
|
+
"type": "layout-cell",
|
|
76
|
+
"props": {},
|
|
77
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "12px", "boxShadow": "0 2px 8px rgba(0,0,0,0.08)", "padding": "20px" },
|
|
78
|
+
"children": [
|
|
79
|
+
{
|
|
80
|
+
"type": "layout",
|
|
81
|
+
"props": { "cols": 1, "rowGap": 8 },
|
|
82
|
+
"children": [
|
|
83
|
+
{ "type": "layout-cell", "props": {}, "style": { "justifyContent": "space-between" }, "children": [
|
|
84
|
+
{ "type": "label", "props": { "text": "Total Revenue", "variant": "overline", "color": "textSecondary" } },
|
|
85
|
+
{ "type": "kpi-statusDot", "props": { "valueKey": "data.revenueStatus", "size": "8", "pulse": true, "showLabel": false, "thresholds": [{ "operator": "==", "value": "on-track", "color": "success.main" }, { "operator": "==", "value": "at-risk", "color": "warning.main" }] } }
|
|
86
|
+
]},
|
|
87
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
88
|
+
{ "type": "kpi-metric", "props": { "valueKey": "data.totalRevenue", "format": "currency", "currency": "USD", "decimals": 0, "fontSize": "28px", "fontWeight": "700", "align": "left", "labelPosition": "none" } }
|
|
89
|
+
]},
|
|
90
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
91
|
+
{ "type": "kpi-trend", "props": { "valueKey": "data.revenueGrowth", "label": "vs prior period", "isPercent": true, "decimals": 1, "variant": "chip", "size": "small", "showIcon": true } }
|
|
92
|
+
]}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"type": "layout-cell",
|
|
99
|
+
"props": {},
|
|
100
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "12px", "boxShadow": "0 2px 8px rgba(0,0,0,0.08)", "padding": "20px" },
|
|
101
|
+
"children": [
|
|
102
|
+
{
|
|
103
|
+
"type": "layout",
|
|
104
|
+
"props": { "cols": 1, "rowGap": 8 },
|
|
105
|
+
"children": [
|
|
106
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
107
|
+
{ "type": "label", "props": { "text": "Deals Closed", "variant": "overline", "color": "textSecondary" } }
|
|
108
|
+
]},
|
|
109
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
110
|
+
{ "type": "kpi-metric", "props": { "valueKey": "data.dealsClosed", "format": "number", "fontSize": "28px", "fontWeight": "700", "align": "left", "labelPosition": "none" } }
|
|
111
|
+
]},
|
|
112
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
113
|
+
{ "type": "kpi-trend", "props": { "valueKey": "data.dealsGrowth", "label": "vs prior period", "isPercent": true, "decimals": 0, "variant": "chip", "size": "small", "showIcon": true } }
|
|
114
|
+
]}
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"type": "layout-cell",
|
|
121
|
+
"props": {},
|
|
122
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "12px", "boxShadow": "0 2px 8px rgba(0,0,0,0.08)", "padding": "20px" },
|
|
123
|
+
"children": [
|
|
124
|
+
{
|
|
125
|
+
"type": "layout",
|
|
126
|
+
"props": { "cols": 1, "rowGap": 8 },
|
|
127
|
+
"children": [
|
|
128
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
129
|
+
{ "type": "label", "props": { "text": "Win Rate", "variant": "overline", "color": "textSecondary" } }
|
|
130
|
+
]},
|
|
131
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
132
|
+
{ "type": "kpi-metric", "props": { "valueKey": "data.winRate", "format": "percent", "decimals": 1, "fontSize": "28px", "fontWeight": "700", "align": "left", "labelPosition": "none" } }
|
|
133
|
+
]},
|
|
134
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
135
|
+
{ "type": "kpi-badge", "props": { "valueKey": "data.winRateStatus", "variant": "soft", "size": "small", "thresholds": [{ "operator": "==", "value": "above", "color": "success.main", "label": "Above Target" }, { "operator": "==", "value": "below", "color": "error.main", "label": "Below Target" }] } }
|
|
136
|
+
]}
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"type": "layout-cell",
|
|
143
|
+
"props": {},
|
|
144
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "12px", "boxShadow": "0 2px 8px rgba(0,0,0,0.08)", "padding": "20px" },
|
|
145
|
+
"children": [
|
|
146
|
+
{
|
|
147
|
+
"type": "layout",
|
|
148
|
+
"props": { "cols": 1, "rowGap": 8 },
|
|
149
|
+
"children": [
|
|
150
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
151
|
+
{ "type": "label", "props": { "text": "Avg Deal Size", "variant": "overline", "color": "textSecondary" } }
|
|
152
|
+
]},
|
|
153
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
154
|
+
{ "type": "kpi-metric", "props": { "valueKey": "data.avgDealSize", "format": "currency", "currency": "USD", "decimals": 0, "fontSize": "28px", "fontWeight": "700", "align": "left", "labelPosition": "none" } }
|
|
155
|
+
]},
|
|
156
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
157
|
+
{ "type": "kpi-trend", "props": { "valueKey": "data.avgDealDelta", "label": "vs prior period", "isPercent": true, "decimals": 1, "variant": "chip", "size": "small", "showIcon": true } }
|
|
158
|
+
]}
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"type": "layout-cell",
|
|
169
|
+
"props": {},
|
|
170
|
+
"style": {},
|
|
171
|
+
"children": [
|
|
172
|
+
{
|
|
173
|
+
"type": "layout",
|
|
174
|
+
"props": { "cols": 3, "gap": 16 },
|
|
175
|
+
"children": [
|
|
176
|
+
{
|
|
177
|
+
"type": "layout-cell",
|
|
178
|
+
"props": {},
|
|
179
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "12px", "boxShadow": "0 2px 8px rgba(0,0,0,0.08)", "padding": "24px", "alignItems": "center" },
|
|
180
|
+
"children": [
|
|
181
|
+
{ "type": "header", "props": { "text": "Quota Attainment", "variant": "h6", "color": "textPrimary", "align": "center" } },
|
|
182
|
+
{ "type": "kpi-gauge", "props": { "valueKey": "data.quotaAttainment", "min": 0, "max": 150, "size": 200, "thickness": 18, "label": "% of Quota", "format": "percent", "decimals": 0, "showNeedle": true, "colors": [{ "from": 0, "to": 60, "color": "#f44336" }, { "from": 60, "to": 100, "color": "#ff9800" }, { "from": 100, "to": 150, "color": "#4caf50" }] } }
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"type": "layout-cell",
|
|
187
|
+
"props": { "colSpan": 2 },
|
|
188
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "12px", "boxShadow": "0 2px 8px rgba(0,0,0,0.08)", "padding": "24px" },
|
|
189
|
+
"children": [
|
|
190
|
+
{
|
|
191
|
+
"type": "layout",
|
|
192
|
+
"props": { "cols": 1, "rowGap": 16 },
|
|
193
|
+
"children": [
|
|
194
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
195
|
+
{ "type": "header", "props": { "text": "Revenue by Product Line", "variant": "h6", "color": "textPrimary" } }
|
|
196
|
+
]},
|
|
197
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
198
|
+
{ "type": "kpi-bulletChart", "props": { "valueKey": "data.enterpriseActual", "targetKey": "data.enterpriseTarget", "min": 0, "max": 5000000, "label": "Enterprise", "format": "currency", "currency": "USD", "height": "32px", "showTarget": true, "showValue": true, "color": "#1976d2" } }
|
|
199
|
+
]},
|
|
200
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
201
|
+
{ "type": "kpi-bulletChart", "props": { "valueKey": "data.midmarketActual", "targetKey": "data.midmarketTarget", "min": 0, "max": 2000000, "label": "Mid-Market", "format": "currency", "currency": "USD", "height": "32px", "showTarget": true, "showValue": true, "color": "#388e3c" } }
|
|
202
|
+
]},
|
|
203
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
204
|
+
{ "type": "kpi-bulletChart", "props": { "valueKey": "data.smbActual", "targetKey": "data.smbTarget", "min": 0, "max": 800000, "label": "SMB", "format": "currency", "currency": "USD", "height": "32px", "showTarget": true, "showValue": true, "color": "#f57c00" } }
|
|
205
|
+
]}
|
|
206
|
+
]
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"type": "layout-cell",
|
|
216
|
+
"props": {},
|
|
217
|
+
"style": {},
|
|
218
|
+
"children": [
|
|
219
|
+
{
|
|
220
|
+
"type": "layout",
|
|
221
|
+
"props": { "cols": 2, "gap": 16 },
|
|
222
|
+
"children": [
|
|
223
|
+
{
|
|
224
|
+
"type": "layout-cell",
|
|
225
|
+
"props": {},
|
|
226
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "12px", "boxShadow": "0 2px 8px rgba(0,0,0,0.08)", "padding": "24px" },
|
|
227
|
+
"children": [
|
|
228
|
+
{
|
|
229
|
+
"type": "layout",
|
|
230
|
+
"props": { "cols": 1, "rowGap": 12 },
|
|
231
|
+
"children": [
|
|
232
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
233
|
+
{ "type": "header", "props": { "text": "Top Performers", "variant": "h6", "color": "textPrimary" } }
|
|
234
|
+
]},
|
|
235
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
236
|
+
{ "type": "reportViewer", "props": { "key": "leaderboard", "id": "sales-leaderboard", "pageId": "sales-dashboard", "height": "300px", "noHeader": true } }
|
|
237
|
+
]}
|
|
238
|
+
]
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"type": "layout-cell",
|
|
244
|
+
"props": {},
|
|
245
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "12px", "boxShadow": "0 2px 8px rgba(0,0,0,0.08)", "padding": "24px" },
|
|
246
|
+
"children": [
|
|
247
|
+
{
|
|
248
|
+
"type": "layout",
|
|
249
|
+
"props": { "cols": 1, "rowGap": 12 },
|
|
250
|
+
"children": [
|
|
251
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
252
|
+
{ "type": "header", "props": { "text": "Pipeline by Stage", "variant": "h6", "color": "textPrimary" } }
|
|
253
|
+
]},
|
|
254
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
255
|
+
{ "type": "reportViewer", "props": { "key": "pipeline", "id": "pipeline-by-stage", "pageId": "sales-dashboard", "height": "300px", "noHeader": true, "filter": { "period": "form.period" } } }
|
|
256
|
+
]}
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
]
|
|
260
|
+
}
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
]
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
},
|
|
267
|
+
"dialogs": [],
|
|
268
|
+
"actions": [],
|
|
269
|
+
"timers": [
|
|
270
|
+
{ "key": "salesRefresh", "interval": 300000, "action": { "type": "custom", "code": "loadSalesDashboard(form.period, form.region)" } }
|
|
271
|
+
]
|
|
272
|
+
}
|