{{ notice.text }}
Secure Admin Access

CRM Command Deck

Manage users, stores, appointments, coupons, and audit activity in one place.

{{ error }}

Developer

Built with care by Vivek M from India.

Thank you for trusting this dashboard.

Contact: +91 7972495890

Operations

{{ currentTabMeta.title }}

{{ currentTabMeta.subtitle }}

Live session

{{ card.label }}

{{ card.value }}

Quick Operations

System Health

{{ systemHealth?.status === 'ok' ? 'Supabase Online' : 'Unknown' }}

Status: {{ systemHealth.status }}

Latency: {{ systemHealth.latency_ms ?? '-' }} ms

Checked: {{ formatTS(systemHealth.checked_at || systemHealth.timestamp) }}

Error: {{ systemHealth.error }}

Run health check to verify Supabase connectivity.

Recent Audit Trail

No log entries yet.

{{ formatTS(log.timestamp) }}

{{ log.action }}

{{ log.target_type || 'system' }} {{ log.target_id ? `: ${log.target_id}` : '' }}

Users Management

Name Phone City Step Status Action
{{ user.first_name || 'N/A' }} {{ user.phone }} {{ user.city || '-' }} {{ user.conversation_step || '-' }} {{ user.is_banned ? 'Banned' : 'Active' }}
No users match this search.

Create New Store

City Management

City Code Status Action
{{ city.city_name }} {{ city.city_code }} {{ city.is_active ? 'Active' : 'Inactive' }}
No cities found.

Store Controls

Store City Latitude Longitude Status PIN Actions

{{ store.store_name }}

{{ store.store_id }}

{{ store.city || '-' }} {{ store.is_active ? 'Active' : 'Inactive' }}

{{ store.visible_pin }}

Set: {{ formatTS(store.store_pin_set_at) }}

Map
No stores found for this filter.

Find Pepsodent Appointment

Appointment found.

No appointment found for this phone.

Name Phone Date Time Store City Brand
{{ appointment.first_name || 'Anonymous' }} {{ appointment.phone_number }} {{ appointment.date }} {{ appointment.time_slot }} {{ getStoreName(appointment.store_id) }} {{ appointment.city || '-' }} {{ appointment.brand || 'pepsodent' }}
No appointments for selected filters.
Code Phone Brand Store Status Expires Scans
{{ coupon.coupon_code }} {{ coupon.phone }} {{ coupon.brand }} {{ getStoreName(coupon.assigned_store) }} {{ getCouponDisplayStatus(coupon) }} {{ formatDateOnly(coupon.token_expires_at) }} {{ coupon.scan_attempts || 0 }}
No coupons found for this filter.

Quota Calculator

Calculate recommended per-slot quota from remaining Saturdays, active stores, and monthly target.

Month: {{ quotaCalcResult.month }}

Total Quota Target: {{ quotaCalcResult.total_quota }}

Active Stores: {{ quotaCalcResult.active_store_count || 0 }}

Remaining Saturdays: {{ quotaCalcResult.count }}

Slots Per Day: {{ quotaCalcResult.slots_per_day || 0 }}

Total Slot Rows: {{ quotaCalcResult.total_slot_rows || 0 }}

Per Store / Saturday: {{ quotaCalcResult.per_store_per_saturday || 0 }}

Per Saturday (All Stores): {{ quotaCalcResult.per_saturday }}

Per Slot: {{ quotaCalcResult.per_slot }}

Projected Total: {{ quotaCalcResult.projected_total_quota || 0 }}

Dates: {{ (quotaCalcResult.remaining_saturdays || []).join(', ') }}

{{ quotaGenerateText }}

Recalculate Slot Quotas

Apply new quota to unbooked slots for one store and month.

{{ quotaResultText }}

Store Slot Tracking

Track how many slots and quotas are assigned, booked, and remaining per store.

Slot Rows

{{ slotSummaryMeta.slot_count || 0 }}

Total Quota

{{ slotSummaryMeta.total_quota || 0 }}

Booked

{{ slotSummaryMeta.total_booked || 0 }}

Remaining

{{ slotSummaryMeta.total_remaining || 0 }}

Store Store ID Slot Rows Total Quota Booked Remaining Active Dates Avg/Slot
{{ getStoreName(row.store_id) }} {{ row.store_id }} {{ row.slot_count || 0 }} {{ row.total_quota || 0 }} {{ row.total_booked || 0 }} {{ row.total_remaining || 0 }} {{ row.active_dates || 0 }} {{ row.avg_quota_per_slot || 0 }}
No slot data found for this month.

Campaign Launch Controls

Enable only the offers you want visible in WhatsApp templates and benefit menus.

{{ campaign.emoji }} {{ campaign.campaign_name }}

{{ campaign.campaign_key }}

Offer code: {{ campaign.offer_code }}

{{ campaign.is_enabled ? 'Enabled' : 'Disabled' }}
Order: {{ campaign.display_order }}
No campaign settings found. Click Sync Defaults to initialize.

Marketing Reports

Simple campaign segmentation by city and source.

Total Users

{{ reportsTotalUsers }}

Cities Tracked

{{ reportByCity.length }}

Sources Tracked

{{ reportBySource.length }}

Users by City

City Users
{{ row.city }} {{ row.count }}
No city data yet.

Users by Source

Source Users
{{ row.source }} {{ row.count }}
No source data yet.

City × Source

City Source Users
{{ row.city }} {{ row.source }} {{ row.count }}
No matrix data yet.

Audit Logs

Timestamp Admin Action Target Details
{{ formatTS(log.timestamp) }} {{ log.admin_id || '-' }} {{ log.action }} {{ log.target_type || '-' }}{{ log.target_id ? `:${log.target_id}` : '' }}
{{ formatDetails(log.details) }}
No logs available.