Repository navigation
Add actions and form_layout sections to CRM example metadata #660
Changes from all commits
bade7b2
039c031
0897265
9ca0076
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| export const AccountActions = [ | ||
| { | ||
| name: 'account_send_email', | ||
| label: 'Send Email', | ||
| icon: 'mail', | ||
| type: 'api' as const, | ||
| locations: ['record_header' as const, 'list_item' as const], | ||
| params: [ | ||
| { name: 'to', label: 'To Email', type: 'email' as const, required: true }, | ||
| { name: 'subject', label: 'Subject', type: 'text' as const, required: true }, | ||
| { name: 'body', label: 'Message', type: 'textarea' as const }, | ||
| ], | ||
|
Comment on lines
+7
to
+12
|
||
| successMessage: 'Email sent successfully', | ||
| }, | ||
| { | ||
| name: 'account_assign_owner', | ||
| label: 'Assign Owner', | ||
| icon: 'user-plus', | ||
| type: 'api' as const, | ||
| locations: ['record_header' as const, 'list_item' as const], | ||
| params: [ | ||
| { name: 'owner_id', label: 'New Owner', type: 'lookup' as const, required: true }, | ||
| ], | ||
| refreshAfter: true, | ||
| successMessage: 'Owner assigned successfully', | ||
| }, | ||
| { | ||
| name: 'account_merge', | ||
| label: 'Merge Accounts', | ||
| icon: 'git-merge', | ||
| type: 'api' as const, | ||
| locations: ['record_more' as const], | ||
| confirmText: 'Are you sure you want to merge these accounts? This action cannot be undone.', | ||
| variant: 'danger' as const, | ||
| refreshAfter: true, | ||
| }, | ||
| ]; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| export const ContactActions = [ | ||
| { | ||
| name: 'contact_send_email', | ||
| label: 'Send Email', | ||
| icon: 'mail', | ||
| type: 'api' as const, | ||
| locations: ['record_header' as const, 'list_item' as const], | ||
| params: [ | ||
| { name: 'subject', label: 'Subject', type: 'text' as const, required: true }, | ||
| { name: 'body', label: 'Message', type: 'textarea' as const }, | ||
| ], | ||
| successMessage: 'Email sent successfully', | ||
|
Comment on lines
+7
to
+12
|
||
| }, | ||
| { | ||
| name: 'contact_convert_to_customer', | ||
| label: 'Convert to Customer', | ||
| icon: 'user-check', | ||
| type: 'api' as const, | ||
| locations: ['record_header' as const], | ||
| confirmText: 'Convert this contact to a customer?', | ||
| refreshAfter: true, | ||
| successMessage: 'Contact converted to customer', | ||
| }, | ||
| { | ||
| name: 'contact_log_call', | ||
| label: 'Log a Call', | ||
| icon: 'phone', | ||
| type: 'api' as const, | ||
| locations: ['record_header' as const, 'list_item' as const], | ||
|
Comment on lines
+2
to
+29
|
||
| params: [ | ||
| { name: 'call_subject', label: 'Subject', type: 'text' as const, required: true }, | ||
| { name: 'call_notes', label: 'Notes', type: 'textarea' as const }, | ||
| { name: 'call_duration', label: 'Duration (min)', type: 'number' as const }, | ||
| ], | ||
| successMessage: 'Call logged successfully', | ||
| }, | ||
| ]; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| export const EventActions = [ | ||
| { | ||
| name: 'event_send_invitation', | ||
| label: 'Send Invitation', | ||
| icon: 'send', | ||
| type: 'api' as const, | ||
| locations: ['record_header' as const], | ||
| params: [ | ||
| { name: 'message', label: 'Optional Message', type: 'textarea' as const }, | ||
| ], | ||
| successMessage: 'Invitation sent to all participants', | ||
| }, | ||
|
Comment on lines
+7
to
+12
|
||
| { | ||
| name: 'event_mark_completed', | ||
| label: 'Mark as Completed', | ||
| icon: 'check-circle', | ||
| type: 'api' as const, | ||
| locations: ['record_header' as const], | ||
| confirmText: 'Mark this event as completed?', | ||
| refreshAfter: true, | ||
| successMessage: 'Event marked as completed', | ||
| }, | ||
| { | ||
| name: 'event_cancel', | ||
| label: 'Cancel Event', | ||
| icon: 'x-circle', | ||
| type: 'api' as const, | ||
| locations: ['record_more' as const], | ||
| variant: 'danger' as const, | ||
| params: [ | ||
| { name: 'cancel_reason', label: 'Cancellation Reason', type: 'text' as const }, | ||
| { name: 'notify_participants', label: 'Notify Participants', type: 'boolean' as const }, | ||
| ], | ||
| confirmText: 'Are you sure you want to cancel this event?', | ||
| refreshAfter: true, | ||
| successMessage: 'Event cancelled', | ||
| }, | ||
|
Comment on lines
+2
to
+37
|
||
| ]; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These actions are declared as
type: 'api'but don't provideendpoint/api/target. In the current ActionRunner implementation,type: 'api'without an endpoint returnsNo API endpoint provided, so clicking these will always fail. Consider either supplying a dummy endpoint (if you want to exercise API execution) or switching these example actions to a non-network type (e.g.script) so Console verification can reach success/refresh flows.