fix: new company defaults is_active=true
Creating a company with the Activa checkbox unchecked (or missing) set is_active=0, silently disabling the bot for that company. New companies now default to active; existing companies keep their current value when the form loads. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
e3be2d5b3f
commit
6dd9995b7f
@@ -1006,7 +1006,7 @@ HTML;
|
||||
$config_json = $cv('config_json');
|
||||
$bot_type = $company['bot_type'] ?? 'normal';
|
||||
$requires_approval = !empty($company['requires_approval']);
|
||||
$is_active = !empty($company['is_active']);
|
||||
$is_active = $isEdit ? !empty($company['is_active']) : true; // default active for new companies
|
||||
$erp_active_users = (int)($company['erp_active_users'] ?? 0);
|
||||
$reqAprChecked = $requires_approval ? 'checked' : '';
|
||||
$isActChecked = $is_active ? 'checked' : '';
|
||||
|
||||
Reference in New Issue
Block a user