- Updated each tier with:
Enable groups for this tier toggle. Maximum People Per Group input. Minimum 2, including the group owner.
This commit is contained in:
@@ -74,7 +74,7 @@ The defaults are starting points and are fully editable in the dashboard.
|
||||
| Voice archive/export | No | Yes | Yes |
|
||||
| Email 2FA | No | Yes | Yes |
|
||||
|
||||
Each tier can independently configure its price, currency, billing interval, Stripe Price ID, active status, sort order, archive retention, group limit, and every feature entitlement.
|
||||
Each tier has an explicit **Enable groups for this tier** toggle and a separate **Maximum People Per Group** value. The minimum is two people, including the group owner; disabling groups uses the toggle rather than a numeric value of zero.
|
||||
|
||||
Administrators can assign a tier directly from **Admin > Users > Edit > Tier Override**. The override grants that tier's features without changing Stripe billing data and remains in effect until it is changed back to **Follow Stripe / billing status**.
|
||||
|
||||
|
||||
+21
-5
@@ -125,9 +125,8 @@ function renderAdminPlatformTab(): void {
|
||||
$events = $db->query("SELECT event_type,COUNT(*) AS total FROM visitor_events
|
||||
WHERE created_at>" . (time() - 2592000) . " GROUP BY event_type ORDER BY total DESC")->fetchAll();
|
||||
$featureKeys = [
|
||||
'voice_messages', 'recording_status', 'auto_voice_send', 'auto_voice_play', 'groups_available', 'group_member_limit',
|
||||
'username_color', 'text_archive_days', 'text_export', 'voice_archive',
|
||||
'voice_export', 'email_2fa',
|
||||
'voice_messages', 'recording_status', 'auto_voice_send', 'auto_voice_play',
|
||||
'username_color', 'text_archive_days', 'text_export', 'voice_archive', 'voice_export', 'email_2fa',
|
||||
];
|
||||
?>
|
||||
<div class="page-head"><h1>PLANS & PLATFORM</h1>
|
||||
@@ -205,11 +204,28 @@ function renderAdminPlatformTab(): void {
|
||||
<div class="field"><label>Sort Order</label><input type="number" name="plans[<?= $plan['id'] ?>][sort_order]" value="<?= (int)$plan['sort_order'] ?>"></div>
|
||||
</div>
|
||||
<label class="cb-row"><input type="checkbox" name="plans[<?= $plan['id'] ?>][active]" <?= $plan['active'] ? 'checked' : '' ?>><span>Plan active</span></label>
|
||||
<div style="border:1px solid var(--bd2);border-radius:4px;padding:12px;margin:12px 0">
|
||||
<div class="panel-title" style="margin-bottom:10px">// GROUPS</div>
|
||||
<div class="form-row">
|
||||
<label class="cb-row" style="align-self:center;margin:0">
|
||||
<input type="checkbox" name="plans[<?= $plan['id'] ?>][features][groups_available]"
|
||||
<?= !empty($plan['features']['groups_available']) ? 'checked' : '' ?>>
|
||||
<span><strong>Enable groups for this tier</strong></span>
|
||||
</label>
|
||||
<div class="field">
|
||||
<label>Maximum People Per Group</label>
|
||||
<input type="number" min="2" max="100" step="1"
|
||||
name="plans[<?= $plan['id'] ?>][features][group_member_limit]"
|
||||
value="<?= max(2, (int)($plan['features']['group_member_limit'] ?? 2)) ?>">
|
||||
<div class="dim" style="margin-top:5px">Minimum 2, including the group owner. Use the toggle to disable groups; no 0 value is needed.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row3">
|
||||
<?php foreach ($featureKeys as $key): ?>
|
||||
<?php if (in_array($key, ['group_member_limit','text_archive_days'], true)): ?>
|
||||
<?php if ($key === 'text_archive_days'): ?>
|
||||
<div class="field"><label><?= esc(adminFeatureLabel($key)) ?></label><input type="number"
|
||||
min="<?= $key==='text_archive_days' ? 30 : 2 ?>"
|
||||
min="30"
|
||||
name="plans[<?= $plan['id'] ?>][features][<?= $key ?>]" value="<?= (int)($plan['features'][$key] ?? 0) ?>"></div>
|
||||
<?php else: ?>
|
||||
<label class="cb-row"><input type="checkbox" name="plans[<?= $plan['id'] ?>][features][<?= $key ?>]"
|
||||
|
||||
Reference in New Issue
Block a user