1
0
Fork 0
mirror of synced 2024-09-09 22:16:26 +12:00
budibase/packages/server/appPackages/testApp2/components/Contact/homepage buttons.json

110 lines
3.4 KiB
JSON
Raw Normal View History

2019-10-19 05:32:03 +13:00
{
"inherits": "@budibase/standard-components/container",
2019-10-19 05:32:03 +13:00
"name": "Contact/homepage buttons",
"props": {
2019-10-19 19:24:20 +13:00
"className": "btn-toolbar mt-4 mb-2",
2019-10-19 05:32:03 +13:00
"children": [
{
"component": {
"_component": "@budibase/standard-components/container",
2019-10-19 19:24:20 +13:00
"className": "btn-group mr-3",
"children": [
2019-10-19 05:32:03 +13:00
{
2019-10-19 19:24:20 +13:00
"component": {
"_component": "common/Default Button",
"contentText": "Create Contact",
"onClick": [
{
"##eventHandlerType": "Get New Record",
"parameters": {
"statePath": "Contact",
"collectionKey": "/contacts",
"childRecordType": "Contact"
}
},
{
"##eventHandlerType": "Set State",
"parameters": {
"path": "isEditingContact",
"value": "true"
}
}
]
2019-10-19 05:32:03 +13:00
}
},
{
2019-10-19 19:24:20 +13:00
"component": {
"_component": "common/Default Button",
"contentText": "Refresh",
"onClick": [
{
"##eventHandlerType": "List Records",
"parameters": {
"statePath": "/all_contacts",
"indexKey": "/all_contacts"
}
}
]
2019-10-19 05:32:03 +13:00
}
}
]
}
},
{
"component": {
2019-10-19 19:24:20 +13:00
"_component": "@budibase/standard-components/if",
"condition": "$store.selectedrow_all_contacts && $store.selectedrow_all_contacts.length > 0",
"thenComponent": {
"_component": "@budibase/standard-components/container",
2019-10-19 19:24:20 +13:00
"className": "btn-group",
"children": [
{
"component": {
"_component": "common/Default Button",
"contentText": "Edit Contact",
"onClick": [
{
"##eventHandlerType": "Load Record",
"parameters": {
"statePath": "Contact",
"recordKey": {
"##bbstate": "selectedrow_all_contacts",
"##source": "store"
}
}
},
{
"##eventHandlerType": "Set State",
"parameters": {
"path": "isEditingContact",
"value": "true"
}
}
]
}
},
{
"component": {
"_component": "common/Default Button",
"contentText": "Delete Contact",
"onClick": [
{
"##eventHandlerType": "Delete Record",
"parameters": {
"recordKey": {
"##bbstate": "selectedrow_all_contacts",
"##source": "store"
}
}
}
]
}
2019-10-19 05:32:03 +13:00
}
2019-10-19 19:24:20 +13:00
]
}
2019-10-19 05:32:03 +13:00
}
}
]
}
}