Loading...

Admin Dashboard

Sign in to manage your telemedicine platform

{{ error }}

{{ menuItems.find(item => item.id === currentView)?.name || 'Dashboard' }}

{{ currentEnvironment }}
{{ new Date().toLocaleString() }}

⚠️ Production Environment

You are managing the PRODUCTION environment. Changes will affect live data. Please be careful!

Total Products

{{ stats.products }}

Total Doctors

{{ stats.doctors }}

Total Pharmacies

{{ stats.pharmacies }}

Total Orders

{{ stats.orders }}

Quick Actions

Slack Error Logging Test

Developer Tools

Test that Slack error notifications are working correctly. Messages will be sent to #soos-errors.

{{ slackTestResult.message }}

Showing {{ filteredProducts.length }} of {{ products.length }} products
Image Name / Abbreviation THC / CBD Price / Stock Category CannaFlow Status Actions
{{ product.name }}
{{ product.abbreviation || '-' }}
THC: {{ product.syncedFields?.thc || '-' }}%
CBD: {{ product.syncedFields?.cbd || '-' }}%
€{{ (product.syncedFields?.price / 100).toFixed(2) || '0.00' }}
Stock: {{ product.syncedFields?.stock || 0 }}
{{ product.category || '-' }} {{ product.cannaflowId }} Not linked {{ product.active !== false ? 'Active' : 'Inactive' }}
Showing {{ filteredTemplates.length }} of {{ templates.length }} templates
Image Product Name Category Manufacturer Variants Status Actions
{{ template.displayName }}
{{ template.cultivar || '-' }}
{{ template.category || '-' }} {{ template.manufacturer || '-' }}
{{ template.cannaflowIds?.length || 0 }} ({{ getAvailableVariantCount(template) }} available)
{{ template.active !== false ? 'Active' : 'Inactive' }}

{{ selectedTemplate.displayName }}

{{ selectedTemplate.cannaflowIds?.length || 0 }} variants

No variants found for this template

{{ variant.name }} {{ variant.availability ? 'Available' : 'Unavailable' }}
THC: {{ variant.thc }}%
CBD: {{ variant.cbd }}%
Price: €{{ typeof variant.price === 'number' ? (variant.price / 100).toFixed(2) : (parseFloat(variant.price) / 100 || 0).toFixed(2) }}
ID: {{ variant.cannaflowId }}
{{ variant.country }} Irradiated
Name Specialty Email Phone Actions
{{ doctor.name }}
{{ doctor.specialty }} {{ doctor.email }} {{ doctor.phone }}
Name Email Phone Address Actions
{{ pharmacy.name }}
{{ pharmacy.email }} {{ pharmacy.phone }} {{ pharmacy.street }}, {{ pharmacy.city }} {{ pharmacy.zip }}

Catalog Sync

Updates prices & availability from pharmacy catalog

Last Result {{ catalogSyncResult.success ? 'Success' : 'Failed' }}

{{ catalogSyncResult.stats?.variantsUpdated || 0 }}

Updated

{{ catalogSyncResult.stats?.variantsCreated || 0 }}

Created

{{ catalogSyncResult.stats?.variantsUnavailable || 0 }}

Unavailable

Templates: {{ catalogSyncResult.stats?.templatesProcessed || 0 }} Duration: {{ catalogSyncResult.stats?.duration || 0 }}ms
⚠️ {{ catalogSyncResult.stats.newVariantsDetected }} new variants detected in registry!

Registry Sync

Scans full Cannaflow registry for new variants

Last Result {{ registrySyncResult.success ? 'Success' : 'Failed' }}

{{ registrySyncResult.stats?.registryProductsScanned || 0 }}

Products Scanned

{{ registrySyncResult.stats?.newVariantsDetected || 0 }}

New Variants Found

⚠️ Broken products skipped:

{{ registrySyncResult.stats.brokenProducts.join(', ') }}

Duration: {{ registrySyncResult.stats?.duration || 0 }}ms

Google Sheet Import

Import templates & variants from the product spreadsheet

{{ sheetImportResult.message }} {{ sheetImportResult.success ? 'Success' : 'Failed' }}

{{ sheetImportResult.stats?.totalRows || 0 }}

Rows

{{ sheetImportResult.stats?.templatesCreated || 0 }}

Templates Created

{{ sheetImportResult.stats?.templatesUpdated || 0 }}

Templates Updated

{{ sheetImportResult.stats?.variantsCreated || 0 }}

Variants Created

{{ sheetImportResult.stats?.skipped || 0 }}

Skipped

⚠️ {{ sheetImportResult.stats.errors.length }} errors:

Row {{ err.row }}: {{ err.error }}
... and {{ sheetImportResult.stats.errors.length - 5 }} more
Duration: {{ sheetImportResult.stats?.duration || 0 }}ms

Sync Status

Templates

{{ variantSyncStatus.templatesCount || 0 }}

Active Variants

{{ variantSyncStatus.activeVariantsCount || 0 }}

Last Catalog Sync

{{ variantSyncStatus.lastCatalogSync ? formatDateTime(variantSyncStatus.lastCatalogSync) : 'Never' }}

Last Registry Scan

{{ variantSyncStatus.lastRegistryScan ? formatDateTime(variantSyncStatus.lastRegistryScan) : 'Never' }}

Last Sheet Import

{{ variantSyncStatus.lastSheetImport ? formatDateTime(variantSyncStatus.lastSheetImport) : 'Never' }}

Click refresh to load sync status

Catalog Sync

  • • Fetches products from pharmacy catalog
  • • Updates prices, availability, stock
  • • Runs automatically every 6 hours
  • • Only updates existing variants

Registry Sync

  • • Scans full Cannaflow registry
  • • Detects new variants for templates
  • • Sends email notifications
  • • Handles broken products gracefully

Sheet Import

  • • Imports from Google Spreadsheet
  • • Creates templates & variants
  • • Use "Dry Run" to preview
  • • Run after updating the sheet
Order ID Doctor User Status Items Created Actions
{{ order.id.substring(0, 8) }}...
{{ getDoctorName(order.doctorId) }} {{ order.userId }}
⚠️
{{ order.items?.length || 0 }} items {{ formatDate(order.createdAt) }}

Total Vouchers

{{ voucherAnalytics?.totalVouchers || 0 }}

Active Vouchers

{{ voucherAnalytics?.activeVouchers || 0 }}

Total Redemptions

{{ voucherAnalytics?.totalRedemptions || 0 }}

Total Discount Given

€{{ ((voucherAnalytics?.totalDiscountGiven || 0) / 100).toFixed(2) }}

Manage Vouchers

Code Type Value Applies To Usage Status Actions
{{ voucher.code }}
{{ voucher.description }}
{{ voucher.type }} {{ voucher.value }}% €{{ (voucher.value / 100).toFixed(2) }} {{ voucher.appliesTo }} {{ voucher.usageCount || 0 }} / {{ voucher.usageLimit }} / ∞ {{ voucher.active ? 'Active' : 'Inactive' }}

Redemption Statistics

Voucher Code Redemptions Total Discount Status
{{ stat.code }} {{ stat.redemptions }} €{{ (stat.totalDiscount / 100).toFixed(2) }} {{ stat.active ? 'Active' : 'Inactive' }}

Access Denied

You don't have admin privileges to access this dashboard.

Register New Doctor

A random password will be generated and shown after registration

Doctor Registered Successfully!

Doctor account created successfully

Email: {{ registeredDoctorInfo.email }}

UID: {{ registeredDoctorInfo.uid }}

Important: Save this password!

This is the only time you'll see this password. Please copy it and send it to the doctor securely.

{{ registeredDoctorInfo.password }}

Change Password for {{ selectedDoctorForPassword?.firstName }} {{ selectedDoctorForPassword?.lastName }}

Choose to either generate a random password or set a custom one

OR

Minimum 8 characters

{{ (editingItem || editingTemplate) ? 'Edit' : 'Add' }} {{ currentView === 'products' ? 'Product' : currentView === 'templates' ? 'Template' : currentView === 'doctors' ? 'Doctor' : currentView === 'pharmacies' ? 'Pharmacy' : currentView === 'vouchers' ? 'Voucher' : currentView.slice(0, -1) }}

Upload Product Images

Product: {{ selectedProduct.name }}

Abbreviation: {{ selectedProduct.abbreviation }}

Product Gallery ({{ selectedProduct.images.length }} image{{ selectedProduct.images.length !== 1 ? 's' : '' }})

High Low

{{ imageUrl.split('/').pop() }}


No images uploaded yet

Upload high-res and low-res images. Name files with "_h" or "_high" for high-res, "_l" or "_low" for low-res.

Selected Files ({{ imageFiles.length }})

  • {{ file.name }} ({{ (file.size / 1024).toFixed(1) }} KB)