robobyte-front-builder 1.0.26 → 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/LICENSE +65 -0
- package/README.md +57 -0
- package/docs/ReportViewer.md +581 -0
- package/docs/fetchReportData.md +379 -0
- package/docs/printLayout.md +405 -0
- package/package.json +29 -1
- 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,290 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Order management page: autocomplete customer search, filters, editable order grid, status banner, and edit dialog",
|
|
3
|
+
"components_used": ["layout", "layout-cell", "header", "label", "autocomplete", "datepicker", "dropdown", "button", "dataGrid", "kpi-metric", "kpi-trend", "kpi-badge", "banner", "dialog", "input", "number"],
|
|
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": 4 },
|
|
16
|
+
"children": [
|
|
17
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
18
|
+
{ "type": "header", "props": { "text": "Order Management", "variant": "h4", "component": "h1", "color": "textPrimary" } }
|
|
19
|
+
]},
|
|
20
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
21
|
+
{ "type": "label", "props": { "text": "data.lastRefreshed", "variant": "caption", "color": "textSecondary", "prefix": "AccessTimeOutlined", "prefixSize": "14px", "iconGap": "4px" } }
|
|
22
|
+
]}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "layout",
|
|
27
|
+
"props": { "cols": 1, "rowGap": 0 },
|
|
28
|
+
"children": [
|
|
29
|
+
{ "type": "layout-cell", "props": {}, "style": { "gap": "10px" }, "children": [
|
|
30
|
+
{ "type": "button", "props": { "label": "New Order", "variant": "contained", "color": "primary", "prefix": "AddOutlined", "size": "medium" }, "actions": { "onClick": { "type": "custom", "code": "openDialog('newOrderDialog')" } } },
|
|
31
|
+
{ "type": "button", "props": { "label": "Export", "variant": "outlined", "color": "inherit", "prefix": "DownloadOutlined", "size": "medium" }, "actions": { "onClick": { "type": "custom", "code": "exportOrders(form)" } } }
|
|
32
|
+
]}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "layout-cell",
|
|
39
|
+
"props": {},
|
|
40
|
+
"style": {},
|
|
41
|
+
"children": [
|
|
42
|
+
{
|
|
43
|
+
"type": "banner",
|
|
44
|
+
"props": { "key": "orderBanner", "message": "data.bannerMessage", "severity": "data.bannerSeverity", "open": "data.showBanner", "dismissible": true, "icon": true },
|
|
45
|
+
"actions": { "onClose": { "type": "custom", "code": "setData({ showBanner: false })" } }
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"type": "layout-cell",
|
|
51
|
+
"props": {},
|
|
52
|
+
"style": {},
|
|
53
|
+
"children": [
|
|
54
|
+
{
|
|
55
|
+
"type": "layout",
|
|
56
|
+
"props": { "cols": 4, "gap": 16 },
|
|
57
|
+
"children": [
|
|
58
|
+
{
|
|
59
|
+
"type": "layout-cell",
|
|
60
|
+
"props": {},
|
|
61
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "10px", "boxShadow": "0 1px 4px rgba(0,0,0,0.08)", "padding": "16px" },
|
|
62
|
+
"children": [
|
|
63
|
+
{ "type": "kpi-metric", "props": { "valueKey": "data.stats.totalOrders", "label": "Total Orders", "format": "number", "fontSize": "22px", "fontWeight": "700", "align": "left", "labelPosition": "above", "labelFontSize": "11px" } },
|
|
64
|
+
{ "type": "kpi-trend", "props": { "valueKey": "data.stats.ordersGrowth", "label": "vs last month", "isPercent": true, "decimals": 0, "variant": "text", "size": "small", "showIcon": true } }
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"type": "layout-cell",
|
|
69
|
+
"props": {},
|
|
70
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "10px", "boxShadow": "0 1px 4px rgba(0,0,0,0.08)", "padding": "16px" },
|
|
71
|
+
"children": [
|
|
72
|
+
{ "type": "kpi-metric", "props": { "valueKey": "data.stats.revenue", "label": "Revenue", "format": "currency", "currency": "USD", "decimals": 0, "fontSize": "22px", "fontWeight": "700", "align": "left", "labelPosition": "above", "labelFontSize": "11px" } },
|
|
73
|
+
{ "type": "kpi-trend", "props": { "valueKey": "data.stats.revenueGrowth", "label": "vs last month", "isPercent": true, "decimals": 1, "variant": "text", "size": "small", "showIcon": true } }
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"type": "layout-cell",
|
|
78
|
+
"props": {},
|
|
79
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "10px", "boxShadow": "0 1px 4px rgba(0,0,0,0.08)", "padding": "16px" },
|
|
80
|
+
"children": [
|
|
81
|
+
{ "type": "label", "props": { "text": "Pending Orders", "variant": "caption", "color": "textSecondary" } },
|
|
82
|
+
{ "type": "kpi-metric", "props": { "valueKey": "data.stats.pendingOrders", "format": "number", "fontSize": "22px", "fontWeight": "700", "color": "warning.main", "align": "left", "labelPosition": "none" } },
|
|
83
|
+
{ "type": "kpi-badge", "props": { "valueKey": "data.stats.pendingRisk", "variant": "soft", "size": "small", "thresholds": [{ "operator": "==", "value": "high", "color": "error.main", "label": "High Volume" }, { "operator": "==", "value": "normal", "color": "success.main", "label": "Normal" }] } }
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"type": "layout-cell",
|
|
88
|
+
"props": {},
|
|
89
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "10px", "boxShadow": "0 1px 4px rgba(0,0,0,0.08)", "padding": "16px" },
|
|
90
|
+
"children": [
|
|
91
|
+
{ "type": "label", "props": { "text": "Avg Fulfillment Time", "variant": "caption", "color": "textSecondary" } },
|
|
92
|
+
{ "type": "kpi-metric", "props": { "valueKey": "data.stats.avgFulfillmentHours", "format": "number", "decimals": 1, "suffix": " hrs", "fontSize": "22px", "fontWeight": "700", "align": "left", "labelPosition": "none" } },
|
|
93
|
+
{ "type": "kpi-trend", "props": { "valueKey": "data.stats.fulfillmentDelta", "label": "vs target", "isPercent": true, "decimals": 0, "variant": "text", "size": "small", "showIcon": true, "invertColors": true } }
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"type": "layout-cell",
|
|
102
|
+
"props": {},
|
|
103
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "12px", "boxShadow": "0 2px 8px rgba(0,0,0,0.08)" },
|
|
104
|
+
"children": [
|
|
105
|
+
{
|
|
106
|
+
"type": "layout",
|
|
107
|
+
"props": { "cols": 1, "rowGap": 0 },
|
|
108
|
+
"children": [
|
|
109
|
+
{
|
|
110
|
+
"type": "layout-cell",
|
|
111
|
+
"props": {},
|
|
112
|
+
"style": { "padding": "16px 20px", "borderBottom": "1px solid #e8e8e8", "flexWrap": "wrap", "gap": "10px" },
|
|
113
|
+
"children": [
|
|
114
|
+
{
|
|
115
|
+
"type": "autocomplete",
|
|
116
|
+
"props": {
|
|
117
|
+
"key": "customerFilter",
|
|
118
|
+
"label": "Customer",
|
|
119
|
+
"size": "small",
|
|
120
|
+
"optionsKey": "data.customerSuggestions",
|
|
121
|
+
"labelField": "name",
|
|
122
|
+
"valueField": "id",
|
|
123
|
+
"freeSolo": false,
|
|
124
|
+
"clearable": true,
|
|
125
|
+
"placeholder": "Search customer..."
|
|
126
|
+
},
|
|
127
|
+
"style": { "width": "240px" },
|
|
128
|
+
"actions": { "onChange": { "type": "custom", "code": "fetchCustomerSuggestions(form.customerFilter)" } }
|
|
129
|
+
},
|
|
130
|
+
{ "type": "datepicker", "props": { "key": "orderDateFrom", "label": "From", "size": "small", "format": "MM/DD/YYYY", "clearable": true }, "style": { "width": "160px" } },
|
|
131
|
+
{ "type": "datepicker", "props": { "key": "orderDateTo", "label": "To", "size": "small", "format": "MM/DD/YYYY", "clearable": true }, "style": { "width": "160px" } },
|
|
132
|
+
{
|
|
133
|
+
"type": "dropdown",
|
|
134
|
+
"props": {
|
|
135
|
+
"key": "orderStatus",
|
|
136
|
+
"label": "Status",
|
|
137
|
+
"size": "small",
|
|
138
|
+
"options": [
|
|
139
|
+
{ "label": "All", "value": "" },
|
|
140
|
+
{ "label": "Pending", "value": "pending" },
|
|
141
|
+
{ "label": "Processing", "value": "processing" },
|
|
142
|
+
{ "label": "Shipped", "value": "shipped" },
|
|
143
|
+
{ "label": "Delivered", "value": "delivered" },
|
|
144
|
+
{ "label": "Cancelled", "value": "cancelled" },
|
|
145
|
+
{ "label": "Refunded", "value": "refunded" }
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
{ "type": "button", "props": { "label": "Filter", "variant": "contained", "color": "primary", "size": "small" }, "actions": { "onClick": { "type": "custom", "code": "loadOrders({ customer: form.customerFilter, from: form.orderDateFrom, to: form.orderDateTo, status: form.orderStatus })" } } },
|
|
150
|
+
{ "type": "button", "props": { "label": "Reset", "variant": "text", "color": "inherit", "size": "small" }, "actions": { "onClick": { "type": "reset" } } }
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"type": "layout-cell",
|
|
155
|
+
"props": {},
|
|
156
|
+
"style": {},
|
|
157
|
+
"children": [
|
|
158
|
+
{
|
|
159
|
+
"type": "dataGrid",
|
|
160
|
+
"props": {
|
|
161
|
+
"key": "ordersGrid",
|
|
162
|
+
"dataKey": "data.orders",
|
|
163
|
+
"height": "480px",
|
|
164
|
+
"readOnly": false,
|
|
165
|
+
"showAddBtn": false,
|
|
166
|
+
"showDeleteCol": false,
|
|
167
|
+
"rowSelection": "single",
|
|
168
|
+
"columns": "data.orderColumns"
|
|
169
|
+
},
|
|
170
|
+
"actions": {
|
|
171
|
+
"onRowClick": { "type": "custom", "code": "setData({ editingOrder: clickedRow }); openDialog('editOrderDialog')" }
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
]
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
"dialogs": [
|
|
183
|
+
{
|
|
184
|
+
"key": "newOrderDialog",
|
|
185
|
+
"title": "Create New Order",
|
|
186
|
+
"width": "560px",
|
|
187
|
+
"children": [
|
|
188
|
+
{
|
|
189
|
+
"type": "layout",
|
|
190
|
+
"props": { "cols": 2, "gap": 16, "rowGap": 16 },
|
|
191
|
+
"children": [
|
|
192
|
+
{ "type": "layout-cell", "props": { "colSpan": 2 }, "style": {}, "children": [
|
|
193
|
+
{
|
|
194
|
+
"type": "autocomplete",
|
|
195
|
+
"props": {
|
|
196
|
+
"key": "newOrderCustomer",
|
|
197
|
+
"label": "Customer",
|
|
198
|
+
"required": true,
|
|
199
|
+
"fullWidth": true,
|
|
200
|
+
"optionsKey": "data.allCustomers",
|
|
201
|
+
"labelField": "name",
|
|
202
|
+
"valueField": "id",
|
|
203
|
+
"placeholder": "Search and select customer..."
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
]},
|
|
207
|
+
{ "type": "layout-cell", "props": { "colSpan": 2 }, "style": {}, "children": [
|
|
208
|
+
{
|
|
209
|
+
"type": "dropdown",
|
|
210
|
+
"props": {
|
|
211
|
+
"key": "newOrderProduct",
|
|
212
|
+
"label": "Product",
|
|
213
|
+
"required": true,
|
|
214
|
+
"fullWidth": true,
|
|
215
|
+
"optionsKey": "data.products",
|
|
216
|
+
"labelField": "name",
|
|
217
|
+
"valueField": "id"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
]},
|
|
221
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
222
|
+
{ "type": "number", "props": { "key": "newOrderQty", "label": "Quantity", "required": true, "min": 1, "max": 9999 }, "style": { "width": "100%" } }
|
|
223
|
+
]},
|
|
224
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
225
|
+
{ "type": "datepicker", "props": { "key": "newOrderDelivery", "label": "Requested Delivery", "fullWidth": true, "format": "MM/DD/YYYY" } }
|
|
226
|
+
]},
|
|
227
|
+
{ "type": "layout-cell", "props": { "colSpan": 2 }, "style": {}, "children": [
|
|
228
|
+
{ "type": "input", "props": { "key": "newOrderNotes", "label": "Notes (optional)", "placeholder": "Any special instructions..." }, "style": { "width": "100%" } }
|
|
229
|
+
]}
|
|
230
|
+
]
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
"actions": {
|
|
234
|
+
"onConfirm": { "type": "custom", "code": "createOrder({ customerId: form.newOrderCustomer, productId: form.newOrderProduct, qty: form.newOrderQty, delivery: form.newOrderDelivery, notes: form.newOrderNotes }); setData({ showBanner: true, bannerMessage: 'Order created successfully', bannerSeverity: 'success' })" },
|
|
235
|
+
"confirmLabel": "Create Order",
|
|
236
|
+
"cancelLabel": "Cancel"
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"key": "editOrderDialog",
|
|
241
|
+
"title": "Edit Order — data.editingOrder.orderNumber",
|
|
242
|
+
"width": "480px",
|
|
243
|
+
"children": [
|
|
244
|
+
{
|
|
245
|
+
"type": "layout",
|
|
246
|
+
"props": { "cols": 2, "gap": 16, "rowGap": 16 },
|
|
247
|
+
"children": [
|
|
248
|
+
{ "type": "layout-cell", "props": { "colSpan": 2 }, "style": {}, "children": [
|
|
249
|
+
{
|
|
250
|
+
"type": "dropdown",
|
|
251
|
+
"props": {
|
|
252
|
+
"key": "editStatus",
|
|
253
|
+
"label": "Order Status",
|
|
254
|
+
"required": true,
|
|
255
|
+
"fullWidth": true,
|
|
256
|
+
"value": "data.editingOrder.status",
|
|
257
|
+
"options": [
|
|
258
|
+
{ "label": "Pending", "value": "pending" },
|
|
259
|
+
{ "label": "Processing", "value": "processing" },
|
|
260
|
+
{ "label": "Shipped", "value": "shipped" },
|
|
261
|
+
{ "label": "Delivered", "value": "delivered" },
|
|
262
|
+
{ "label": "Cancelled", "value": "cancelled" }
|
|
263
|
+
]
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
]},
|
|
267
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
268
|
+
{ "type": "number", "props": { "key": "editQty", "label": "Quantity", "required": true, "min": 1, "value": "data.editingOrder.quantity" }, "style": { "width": "100%" } }
|
|
269
|
+
]},
|
|
270
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
271
|
+
{ "type": "datepicker", "props": { "key": "editDelivery", "label": "Delivery Date", "fullWidth": true, "value": "data.editingOrder.requestedDelivery", "format": "MM/DD/YYYY" } }
|
|
272
|
+
]},
|
|
273
|
+
{ "type": "layout-cell", "props": { "colSpan": 2 }, "style": {}, "children": [
|
|
274
|
+
{ "type": "input", "props": { "key": "editNotes", "label": "Internal Notes", "value": "data.editingOrder.notes" }, "style": { "width": "100%" } }
|
|
275
|
+
]}
|
|
276
|
+
]
|
|
277
|
+
}
|
|
278
|
+
],
|
|
279
|
+
"actions": {
|
|
280
|
+
"onConfirm": { "type": "custom", "code": "updateOrder(data.editingOrder.id, { status: form.editStatus, quantity: form.editQty, delivery: form.editDelivery, notes: form.editNotes }); setData({ showBanner: true, bannerMessage: 'Order updated', bannerSeverity: 'success' })" },
|
|
281
|
+
"confirmLabel": "Update Order",
|
|
282
|
+
"cancelLabel": "Cancel"
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
],
|
|
286
|
+
"actions": [],
|
|
287
|
+
"timers": [
|
|
288
|
+
{ "key": "orderRefresh", "interval": 120000, "action": { "type": "custom", "code": "loadOrders()" } }
|
|
289
|
+
]
|
|
290
|
+
}
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "CRM contact detail page with menu-driven tabs: info fields, activity report, deals grid, notes richtext, and KPI sidebar",
|
|
3
|
+
"components_used": ["layout", "layout-cell", "header", "label", "menu", "input", "dropdown", "datepicker", "button", "reportViewer", "dataGrid", "richtext", "kpi-metric", "kpi-trend", "kpi-badge", "kpi-statusDot", "kpi-rating", "image", "divider", "banner"],
|
|
4
|
+
"root": {
|
|
5
|
+
"type": "layout",
|
|
6
|
+
"props": { "cols": 1, "rowGap": 0 },
|
|
7
|
+
"children": [
|
|
8
|
+
{
|
|
9
|
+
"type": "layout-cell",
|
|
10
|
+
"props": {},
|
|
11
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "12px", "boxShadow": "0 2px 8px rgba(0,0,0,0.08)", "padding": "28px" },
|
|
12
|
+
"children": [
|
|
13
|
+
{
|
|
14
|
+
"type": "layout",
|
|
15
|
+
"props": { "cols": 4, "gap": 24 },
|
|
16
|
+
"children": [
|
|
17
|
+
{
|
|
18
|
+
"type": "layout-cell",
|
|
19
|
+
"props": {},
|
|
20
|
+
"style": { "alignItems": "center", "gap": "16px" },
|
|
21
|
+
"children": [
|
|
22
|
+
{ "type": "image", "props": { "src": "data.contact.avatarUrl", "alt": "Contact Photo", "width": "72px", "height": "72px", "borderRadius": "50%", "objectFit": "cover" } },
|
|
23
|
+
{
|
|
24
|
+
"type": "layout",
|
|
25
|
+
"props": { "cols": 1, "rowGap": 4 },
|
|
26
|
+
"children": [
|
|
27
|
+
{ "type": "layout-cell", "props": {}, "style": { "gap": "8px", "alignItems": "center" }, "children": [
|
|
28
|
+
{ "type": "header", "props": { "text": "data.contact.fullName", "variant": "h5", "component": "h1", "color": "textPrimary" } },
|
|
29
|
+
{ "type": "kpi-statusDot", "props": { "valueKey": "data.contact.leadStatus", "size": "8", "pulse": true, "showLabel": true, "thresholds": [{ "operator": "==", "value": "hot", "color": "error.main", "label": "Hot" }, { "operator": "==", "value": "warm", "color": "warning.main", "label": "Warm" }, { "operator": "==", "value": "cold", "color": "info.main", "label": "Cold" }] } }
|
|
30
|
+
]},
|
|
31
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
32
|
+
{ "type": "label", "props": { "text": "data.contact.title", "variant": "body2", "color": "textSecondary" } }
|
|
33
|
+
]},
|
|
34
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
35
|
+
{ "type": "label", "props": { "text": "data.contact.company", "variant": "body1", "color": "primary", "fontWeight": "500", "prefix": "BusinessOutlined", "prefixSize": "16px", "prefixColor": "primary.main", "iconGap": "6px" } }
|
|
36
|
+
]}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "layout-cell",
|
|
43
|
+
"props": {},
|
|
44
|
+
"style": { "gap": "8px" },
|
|
45
|
+
"children": [
|
|
46
|
+
{ "type": "label", "props": { "text": "data.contact.email", "variant": "body2", "color": "textPrimary", "prefix": "EmailOutlined", "prefixColor": "primary.main", "prefixSize": "16px", "iconGap": "8px" } },
|
|
47
|
+
{ "type": "label", "props": { "text": "data.contact.phone", "variant": "body2", "color": "textPrimary", "prefix": "PhoneOutlined", "prefixColor": "primary.main", "prefixSize": "16px", "iconGap": "8px" } },
|
|
48
|
+
{ "type": "label", "props": { "text": "data.contact.location", "variant": "body2", "color": "textPrimary", "prefix": "LocationOnOutlined", "prefixColor": "primary.main", "prefixSize": "16px", "iconGap": "8px" } }
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "layout-cell",
|
|
53
|
+
"props": {},
|
|
54
|
+
"style": { "gap": "8px" },
|
|
55
|
+
"children": [
|
|
56
|
+
{ "type": "label", "props": { "text": "Relationship Score", "variant": "caption", "color": "textSecondary" } },
|
|
57
|
+
{ "type": "kpi-rating", "props": { "valueKey": "data.contact.relationshipScore", "maxRating": 5, "precision": 1, "size": "medium", "readOnly": true, "showValue": true } },
|
|
58
|
+
{ "type": "kpi-badge", "props": { "valueKey": "data.contact.segment", "variant": "soft", "size": "medium", "thresholds": [{ "operator": "==", "value": "vip", "color": "warning.main", "label": "VIP" }, { "operator": "==", "value": "strategic", "color": "primary.main", "label": "Strategic" }, { "operator": "==", "value": "standard", "color": "text.secondary", "label": "Standard" }] } }
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "layout-cell",
|
|
63
|
+
"props": {},
|
|
64
|
+
"style": { "gap": "10px", "justifyContent": "flex-end", "alignItems": "flex-start" },
|
|
65
|
+
"children": [
|
|
66
|
+
{ "type": "button", "props": { "label": "Log Activity", "variant": "outlined", "color": "primary", "size": "small", "prefix": "AddTaskOutlined" } },
|
|
67
|
+
{ "type": "button", "props": { "label": "Send Email", "variant": "contained", "color": "primary", "size": "small", "prefix": "EmailOutlined" } }
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"type": "layout-cell",
|
|
76
|
+
"props": {},
|
|
77
|
+
"style": { "marginTop": "16px" },
|
|
78
|
+
"children": [
|
|
79
|
+
{
|
|
80
|
+
"type": "layout",
|
|
81
|
+
"props": { "cols": 4, "gap": 16 },
|
|
82
|
+
"children": [
|
|
83
|
+
{
|
|
84
|
+
"type": "layout-cell",
|
|
85
|
+
"props": { "colSpan": 3 },
|
|
86
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "12px", "boxShadow": "0 2px 8px rgba(0,0,0,0.08)", "overflow": "hidden" },
|
|
87
|
+
"children": [
|
|
88
|
+
{
|
|
89
|
+
"type": "layout",
|
|
90
|
+
"props": { "cols": 1, "rowGap": 0 },
|
|
91
|
+
"children": [
|
|
92
|
+
{
|
|
93
|
+
"type": "layout-cell",
|
|
94
|
+
"props": {},
|
|
95
|
+
"style": { "borderBottom": "1px solid #e8e8e8" },
|
|
96
|
+
"children": [
|
|
97
|
+
{
|
|
98
|
+
"type": "menu",
|
|
99
|
+
"props": {
|
|
100
|
+
"key": "contactTab",
|
|
101
|
+
"variant": "tabs",
|
|
102
|
+
"orientation": "horizontal",
|
|
103
|
+
"indicatorColor": "primary",
|
|
104
|
+
"textColor": "inherit",
|
|
105
|
+
"items": [
|
|
106
|
+
{ "label": "Contact Info", "value": "info" },
|
|
107
|
+
{ "label": "Activity", "value": "activity" },
|
|
108
|
+
{ "label": "Deals", "value": "deals" },
|
|
109
|
+
{ "label": "Notes", "value": "notes" }
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"type": "layout-cell",
|
|
117
|
+
"props": {},
|
|
118
|
+
"style": { "padding": "24px", "display": "form.contactTab === 'info' ? 'flex' : 'none'" },
|
|
119
|
+
"children": [
|
|
120
|
+
{
|
|
121
|
+
"type": "layout",
|
|
122
|
+
"props": { "cols": 2, "gap": 20, "rowGap": 20 },
|
|
123
|
+
"children": [
|
|
124
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
125
|
+
{ "type": "input", "props": { "key": "editFirstName", "label": "First Name", "value": "data.contact.firstName" }, "style": { "width": "100%" } }
|
|
126
|
+
]},
|
|
127
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
128
|
+
{ "type": "input", "props": { "key": "editLastName", "label": "Last Name", "value": "data.contact.lastName" }, "style": { "width": "100%" } }
|
|
129
|
+
]},
|
|
130
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
131
|
+
{ "type": "input", "props": { "key": "editEmail", "label": "Email", "value": "data.contact.email", "prefix": "EmailOutlined" }, "style": { "width": "100%" } }
|
|
132
|
+
]},
|
|
133
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
134
|
+
{ "type": "input", "props": { "key": "editPhone", "label": "Phone", "value": "data.contact.phone", "prefix": "PhoneOutlined" }, "style": { "width": "100%" } }
|
|
135
|
+
]},
|
|
136
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
137
|
+
{ "type": "input", "props": { "key": "editTitle", "label": "Job Title", "value": "data.contact.title" }, "style": { "width": "100%" } }
|
|
138
|
+
]},
|
|
139
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
140
|
+
{ "type": "dropdown", "props": { "key": "editLeadStatus", "label": "Lead Status", "fullWidth": true, "value": "data.contact.leadStatus", "options": [{ "label": "Hot", "value": "hot" }, { "label": "Warm", "value": "warm" }, { "label": "Cold", "value": "cold" }, { "label": "Closed Won", "value": "won" }, { "label": "Closed Lost", "value": "lost" }] } }
|
|
141
|
+
]},
|
|
142
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
143
|
+
{ "type": "dropdown", "props": { "key": "editSource", "label": "Lead Source", "fullWidth": true, "value": "data.contact.source", "options": [{ "label": "Website", "value": "website" }, { "label": "Referral", "value": "referral" }, { "label": "Cold Outreach", "value": "cold" }, { "label": "Event", "value": "event" }, { "label": "Partner", "value": "partner" }] } }
|
|
144
|
+
]},
|
|
145
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
146
|
+
{ "type": "datepicker", "props": { "key": "editNextFollowup", "label": "Next Follow-up", "fullWidth": true, "format": "MM/DD/YYYY", "value": "data.contact.nextFollowup" } }
|
|
147
|
+
]},
|
|
148
|
+
{ "type": "layout-cell", "props": { "colSpan": 2 }, "style": { "justifyContent": "flex-end" }, "children": [
|
|
149
|
+
{ "type": "button", "props": { "label": "Save Changes", "variant": "contained", "color": "primary", "prefix": "SaveOutlined" }, "actions": { "onClick": { "type": "custom", "code": "updateContact(data.contact.id, form)" } } }
|
|
150
|
+
]}
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"type": "layout-cell",
|
|
157
|
+
"props": {},
|
|
158
|
+
"style": { "padding": "24px", "display": "form.contactTab === 'activity' ? 'flex' : 'none'" },
|
|
159
|
+
"children": [
|
|
160
|
+
{ "type": "reportViewer", "props": { "key": "activityLog", "id": "contact-activity", "pageId": "crm", "height": "400px", "noHeader": true, "filter": { "contactId": "data.contact.id" } } }
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"type": "layout-cell",
|
|
165
|
+
"props": {},
|
|
166
|
+
"style": { "padding": "24px", "display": "form.contactTab === 'deals' ? 'flex' : 'none'" },
|
|
167
|
+
"children": [
|
|
168
|
+
{
|
|
169
|
+
"type": "dataGrid",
|
|
170
|
+
"props": {
|
|
171
|
+
"key": "dealsGrid",
|
|
172
|
+
"dataKey": "data.contact.deals",
|
|
173
|
+
"height": "380px",
|
|
174
|
+
"readOnly": false,
|
|
175
|
+
"showAddBtn": true,
|
|
176
|
+
"addLabel": "Add Deal",
|
|
177
|
+
"showDeleteCol": true,
|
|
178
|
+
"columns": "data.dealColumns"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"type": "layout-cell",
|
|
185
|
+
"props": {},
|
|
186
|
+
"style": { "padding": "24px", "display": "form.contactTab === 'notes' ? 'flex' : 'none'" },
|
|
187
|
+
"children": [
|
|
188
|
+
{
|
|
189
|
+
"type": "layout",
|
|
190
|
+
"props": { "cols": 1, "rowGap": 16 },
|
|
191
|
+
"children": [
|
|
192
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
193
|
+
{ "type": "richtext", "props": { "key": "contactNotes", "label": "Notes", "value": "data.contact.notes", "minHeight": "300px", "toolbar": true } }
|
|
194
|
+
]},
|
|
195
|
+
{ "type": "layout-cell", "props": {}, "style": { "justifyContent": "flex-end" }, "children": [
|
|
196
|
+
{ "type": "button", "props": { "label": "Save Notes", "variant": "contained", "color": "primary" }, "actions": { "onClick": { "type": "custom", "code": "saveContactNotes(data.contact.id, form.contactNotes)" } } }
|
|
197
|
+
]}
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
]
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
]
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"type": "layout-cell",
|
|
208
|
+
"props": {},
|
|
209
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "12px", "boxShadow": "0 2px 8px rgba(0,0,0,0.08)", "padding": "24px" },
|
|
210
|
+
"children": [
|
|
211
|
+
{
|
|
212
|
+
"type": "layout",
|
|
213
|
+
"props": { "cols": 1, "rowGap": 16 },
|
|
214
|
+
"children": [
|
|
215
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
216
|
+
{ "type": "header", "props": { "text": "Summary", "variant": "h6", "color": "textPrimary" } }
|
|
217
|
+
]},
|
|
218
|
+
{ "type": "layout-cell", "props": {}, "style": { "backgroundColor": "#f8f9fa", "borderRadius": "8px", "padding": "16px", "gap": "12px" }, "children": [
|
|
219
|
+
{ "type": "kpi-metric", "props": { "valueKey": "data.contact.totalDealsValue", "label": "Total Deal Value", "format": "currency", "currency": "USD", "decimals": 0, "fontSize": "22px", "fontWeight": "700", "align": "left", "labelPosition": "above", "labelFontSize": "11px", "labelColor": "text.secondary" } },
|
|
220
|
+
{ "type": "kpi-trend", "props": { "valueKey": "data.contact.dealValueGrowth", "label": "vs last year", "isPercent": true, "decimals": 1, "variant": "chip", "size": "small", "showIcon": true } }
|
|
221
|
+
]},
|
|
222
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
223
|
+
{ "type": "divider", "props": { "orientation": "horizontal" } }
|
|
224
|
+
]},
|
|
225
|
+
{ "type": "layout-cell", "props": {}, "style": { "justifyContent": "space-between", "alignItems": "center" }, "children": [
|
|
226
|
+
{ "type": "label", "props": { "text": "Open Deals", "variant": "body2", "color": "textSecondary" } },
|
|
227
|
+
{ "type": "kpi-metric", "props": { "valueKey": "data.contact.openDeals", "format": "number", "fontSize": "16px", "fontWeight": "600", "align": "right", "labelPosition": "none" } }
|
|
228
|
+
]},
|
|
229
|
+
{ "type": "layout-cell", "props": {}, "style": { "justifyContent": "space-between", "alignItems": "center" }, "children": [
|
|
230
|
+
{ "type": "label", "props": { "text": "Won Deals", "variant": "body2", "color": "textSecondary" } },
|
|
231
|
+
{ "type": "kpi-metric", "props": { "valueKey": "data.contact.wonDeals", "format": "number", "fontSize": "16px", "fontWeight": "600", "align": "right", "labelPosition": "none", "color": "success.main" } }
|
|
232
|
+
]},
|
|
233
|
+
{ "type": "layout-cell", "props": {}, "style": { "justifyContent": "space-between", "alignItems": "center" }, "children": [
|
|
234
|
+
{ "type": "label", "props": { "text": "Lost Deals", "variant": "body2", "color": "textSecondary" } },
|
|
235
|
+
{ "type": "kpi-metric", "props": { "valueKey": "data.contact.lostDeals", "format": "number", "fontSize": "16px", "fontWeight": "600", "align": "right", "labelPosition": "none", "color": "error.main" } }
|
|
236
|
+
]},
|
|
237
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
238
|
+
{ "type": "divider", "props": { "orientation": "horizontal" } }
|
|
239
|
+
]},
|
|
240
|
+
{ "type": "layout-cell", "props": {}, "style": { "justifyContent": "space-between", "alignItems": "center" }, "children": [
|
|
241
|
+
{ "type": "label", "props": { "text": "Last Contact", "variant": "body2", "color": "textSecondary" } },
|
|
242
|
+
{ "type": "label", "props": { "text": "data.contact.lastContactDate", "variant": "body2", "color": "textPrimary", "fontWeight": "500" } }
|
|
243
|
+
]},
|
|
244
|
+
{ "type": "layout-cell", "props": {}, "style": { "justifyContent": "space-between", "alignItems": "center" }, "children": [
|
|
245
|
+
{ "type": "label", "props": { "text": "Next Follow-up", "variant": "body2", "color": "textSecondary" } },
|
|
246
|
+
{ "type": "label", "props": { "text": "data.contact.nextFollowup", "variant": "body2", "color": "warning.main", "fontWeight": "500" } }
|
|
247
|
+
]},
|
|
248
|
+
{ "type": "layout-cell", "props": {}, "style": { "justifyContent": "space-between", "alignItems": "center" }, "children": [
|
|
249
|
+
{ "type": "label", "props": { "text": "Customer Since", "variant": "body2", "color": "textSecondary" } },
|
|
250
|
+
{ "type": "label", "props": { "text": "data.contact.customerSince", "variant": "body2", "color": "textPrimary", "fontWeight": "500" } }
|
|
251
|
+
]},
|
|
252
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
253
|
+
{ "type": "divider", "props": { "orientation": "horizontal" } }
|
|
254
|
+
]},
|
|
255
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
256
|
+
{ "type": "label", "props": { "text": "Assigned To", "variant": "body2", "color": "textSecondary" } },
|
|
257
|
+
{ "type": "label", "props": { "text": "data.contact.assignedRep", "variant": "body1", "color": "textPrimary", "fontWeight": "500" } }
|
|
258
|
+
]}
|
|
259
|
+
]
|
|
260
|
+
}
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
]
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
]
|
|
268
|
+
},
|
|
269
|
+
"dialogs": [],
|
|
270
|
+
"actions": [],
|
|
271
|
+
"timers": []
|
|
272
|
+
}
|