Files
leadchat/app/views/fields/account_features_field/_form.html.erb
Sojan Jose 3b141fca28 chore: Add internal feature flags for Chatwoot Cloud (#10902)
This PR introduces internal feature flags for testing purposes. These
flags will not be displayed on regular instances to prevent customer
confusion.

Additionally, a new feature flag, `contact_chatwoot_support_team`, has
been added for Chatwoot Cloud. This flag disables contact support for
third-party onboarded accounts, as support will be handled by the
original affiliate team.

Co-authored-by: Pranav <pranav@chatwoot.com>
2025-02-15 16:21:46 -08:00

19 lines
1.0 KiB
Plaintext

<div class="field-unit__label">
<%= f.label field.attribute %>
</div>
<div class="field-unit__field feature-container">
<% SuperAdmin::AccountFeaturesHelper.filtered_features(field.data).each do |key, val| %>
<div class='feature-cell'>
<% is_premium = SuperAdmin::AccountFeaturesHelper.account_premium_features.include? key %>
<% if is_premium %>
<span class='icon-container'>
<svg class="inline" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 512 512"><path d="M480 224l-186.828 7.487L401.688 64l-59.247-32L256 208 169.824 32l-59.496 32 108.5 167.487L32 224v64l185.537-10.066L113.65 448l55.969 32L256 304l86.381 176 55.949-32-103.867-170.066L480 288z" fill="currentColor"/></svg>
</span>
<% end %>
<span><%= key %></span>
<% should_disable = is_premium && ChatwootHub.pricing_plan == 'community' %>
<span class='value-container'><%= check_box "enabled_features", "feature_#{key}", { checked: val, disabled: should_disable }, true, false %></span>
</div>
<% end %>
</div>