|
| 1 | +export const OrderActions = [ |
| 2 | + { |
| 3 | + name: 'order_change_status', |
| 4 | + label: 'Change Status', |
| 5 | + icon: 'refresh-cw', |
| 6 | + type: 'api' as const, |
| 7 | + locations: ['record_header' as const, 'list_item' as const], |
| 8 | + params: [ |
| 9 | + { |
| 10 | + name: 'new_status', label: 'New Status', type: 'select' as const, required: true, |
| 11 | + options: [ |
| 12 | + { label: 'Draft', value: 'draft' }, |
| 13 | + { label: 'Pending', value: 'pending' }, |
| 14 | + { label: 'Paid', value: 'paid' }, |
| 15 | + { label: 'Shipped', value: 'shipped' }, |
| 16 | + { label: 'Delivered', value: 'delivered' }, |
| 17 | + { label: 'Cancelled', value: 'cancelled' }, |
| 18 | + ], |
| 19 | + }, |
| 20 | + ], |
| 21 | + refreshAfter: true, |
| 22 | + successMessage: 'Order status updated', |
| 23 | + }, |
| 24 | + { |
| 25 | + name: 'order_generate_invoice', |
| 26 | + label: 'Generate Invoice', |
| 27 | + icon: 'file-text', |
| 28 | + type: 'api' as const, |
| 29 | + locations: ['record_header' as const], |
| 30 | + confirmText: 'Generate an invoice for this order?', |
| 31 | + successMessage: 'Invoice generated successfully', |
| 32 | + }, |
| 33 | + { |
| 34 | + name: 'order_mark_shipped', |
| 35 | + label: 'Mark as Shipped', |
| 36 | + icon: 'truck', |
| 37 | + type: 'api' as const, |
| 38 | + locations: ['record_header' as const], |
| 39 | + params: [ |
| 40 | + { name: 'tracking_number', label: 'Tracking Number', type: 'text' as const, required: true }, |
| 41 | + { name: 'carrier', label: 'Carrier', type: 'text' as const }, |
| 42 | + ], |
| 43 | + refreshAfter: true, |
| 44 | + successMessage: 'Order marked as shipped', |
| 45 | + }, |
| 46 | +]; |
0 commit comments