Skip to content

Fix missing updateApprovalModeUI JavaScript function#377

Merged
bokelley merged 1 commit intomainfrom
bokelley/fix-creative-rules-js-error
Oct 13, 2025
Merged

Fix missing updateApprovalModeUI JavaScript function#377
bokelley merged 1 commit intomainfrom
bokelley/fix-creative-rules-js-error

Conversation

@bokelley
Copy link
Collaborator

Summary

  • Fixed ReferenceError: Can't find variable: updateApprovalModeUI when changing creative approval mode dropdown
  • Added missing JavaScript function to toggle UI elements based on selected approval mode
  • Function now properly shows/hides mode descriptions and AI configuration section

Changes

  • Added updateApprovalModeUI() function to static/js/tenant_settings.js
  • Function toggles visibility of mode descriptions (auto-approve, require-human, ai-powered)
  • Shows/hides AI configuration section when ai-powered mode is selected
  • Initializes on page load to ensure correct UI state

Test Plan

  • ✅ Pre-commit hooks passed
  • ✅ Unit tests passed (610 passed, 26 skipped)
  • ✅ Integration tests passed (192 passed, 174 skipped)
  • Manual testing: Change approval mode dropdown and verify UI updates correctly

Before

JavaScript error when changing approval mode dropdown:

ReferenceError: Can't find variable: updateApprovalModeUI

After

Dropdown works correctly with proper UI state changes for each mode.

🤖 Generated with Claude Code

Fixes ReferenceError when changing creative approval mode dropdown.

The function:
- Shows/hides mode descriptions (auto-approve, require-human, ai-powered)
- Shows/hides AI configuration section when ai-powered mode is selected
- Initializes on page load to display correct initial state

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

Co-Authored-By: Claude <noreply@anthropic.com>
@bokelley bokelley merged commit 2d91abe into main Oct 13, 2025
8 checks passed
bokelley added a commit that referenced this pull request Oct 14, 2025
Merged latest changes from main including:
- Product pricing display and migration to pricing_options table (#369)
- Update media buy fix for database-persisted buys (#380)
- Automatic creative preview fetching (#379)
- Creative sync improvements (#378, #376, #373)
- Budget field access fixes (#374)
- UI improvements (#377, #375, #372)

Conflict Resolution:
- src/core/main.py: Combined debug logging from main with helper function from our branch
- Kept both improvements: stderr debug prints + create_get_products_request() helper

No conflicts in schema files - automatic merges succeeded.
danf-newton pushed a commit to Newton-Research-Inc/salesagent that referenced this pull request Nov 24, 2025
…rebid#377)

Fixes ReferenceError when changing creative approval mode dropdown.

The function:
- Shows/hides mode descriptions (auto-approve, require-human, ai-powered)
- Shows/hides AI configuration section when ai-powered mode is selected
- Initializes on page load to display correct initial state

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

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant