Commit Graph

9 Commits

Author SHA1 Message Date
aa58b45501 Implement multiple phone numbers per workflow feature
Database Changes:
- Added twp_workflow_phones junction table for many-to-many relationship
- Updated activator to create and manage new table
- Maintained backward compatibility with existing phone_number field

Workflow Management:
- Added set_workflow_phone_numbers() and get_workflow_phone_numbers() methods
- Updated get_workflow_by_phone_number() to check both old and new structures
- Enhanced save/update handlers to support phone_numbers array
- Added AJAX endpoint for retrieving workflow phone numbers

User Interface:
- Replaced single phone number select with dynamic multi-select interface
- Added "Add Number" and "Remove" buttons for managing multiple numbers
- Updated workflow listing to display all assigned phone numbers
- Enhanced JavaScript for phone number management and validation

The webhook routing already supports multiple numbers since get_workflow_by_phone_number()
was updated to check both structures. This feature allows users to assign multiple
Twilio phone numbers to trigger the same workflow.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-13 10:35:21 -07:00
140a585085 Fix browser phone permission issues for phone agents
- Fixed error message display when browser phone initialization fails (now shows actual error instead of "undefined")
- Fixed ajax_get_phone_numbers to use wp_send_json_error instead of wp_die for proper error handling
- Added error handling for phone numbers loading in browser phone interface
- Updated phone_agent role to ensure all necessary capabilities are added to existing roles
- Added automatic capability updates for existing phone_agent roles on plugin load

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-13 10:14:20 -07:00
a5f6ab8b64 testing progress 2025-08-12 14:46:30 -07:00
f6429110e5 testing progress 2025-08-12 10:36:32 -07:00
1633eb46df testing progress 2025-08-12 10:04:31 -07:00
39eb3b96b5 testing progress 2025-08-12 07:21:20 -07:00
51dd3077d2 testing progress 2025-08-12 07:05:47 -07:00
304b5de40b progress made 2025-08-11 20:31:48 -07:00
c6edbbeba7 code revision 2025-08-06 15:25:47 -07:00