121 lines
3.6 KiB
JSON
121 lines
3.6 KiB
JSON
{
|
|
"name": "customer/customer Form",
|
|
"description": "Control for creating/updating '/customers/1-{id}' ",
|
|
"inherits": "@budibase/standard-components/div",
|
|
"props": {
|
|
"className": "p-1",
|
|
"children": [
|
|
{
|
|
"component": {
|
|
"_component": "@budibase/standard-components/h3",
|
|
"text": "Edit customer"
|
|
}
|
|
},
|
|
{
|
|
"component": {
|
|
"_component": "@budibase/standard-components/form",
|
|
"formControls": [
|
|
{
|
|
"control": {
|
|
"_component": "@budibase/standard-components/input",
|
|
"value": {
|
|
"##bbstate": "customer.name",
|
|
"##bbsource": "store"
|
|
},
|
|
"className": "form-control",
|
|
"type": "text"
|
|
},
|
|
"label": "Name"
|
|
},
|
|
{
|
|
"control": {
|
|
"_component": "@budibase/standard-components/select",
|
|
"options": [
|
|
{
|
|
"id": "Google",
|
|
"value": "Google"
|
|
},
|
|
{
|
|
"id": "Facebook",
|
|
"value": "Facebook"
|
|
},
|
|
{
|
|
"id": "Word of Mouth",
|
|
"value": "Word of Mouth"
|
|
}
|
|
],
|
|
"value": {
|
|
"##bbstate": "customer.enquiry",
|
|
"##bbsource": "store"
|
|
},
|
|
"className": "form-control"
|
|
},
|
|
"label": "Enquiry Source"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"component": {
|
|
"_component": "@budibase/standard-components/stackpanel",
|
|
"direction": "horizontal",
|
|
"children": [
|
|
{
|
|
"control": {
|
|
"_component": "@budibase/standard-components/div",
|
|
"className": "btn-group",
|
|
"children": [
|
|
{
|
|
"component": {
|
|
"_component": "common/Primary Button",
|
|
"contentText": "Save customer",
|
|
"onClick": [
|
|
{
|
|
"##eventHandlerType": "Save Record",
|
|
"parameters": {
|
|
"statePath": "customer"
|
|
}
|
|
},
|
|
{
|
|
"##eventHandlerType": "Set State",
|
|
"parameters": {
|
|
"path": "isEditingcustomer",
|
|
"value": ""
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"control": {
|
|
"_component": "@budibase/standard-components/div",
|
|
"className": "btn-group",
|
|
"children": [
|
|
{
|
|
"component": {
|
|
"_component": "common/Default Button",
|
|
"contentText": "Cancel",
|
|
"onClick": [
|
|
{
|
|
"##eventHandlerType": "Set State",
|
|
"parameters": {
|
|
"path": "isEditingcustomer",
|
|
"value": ""
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|