Update admin panel to use unified dispensaries table
- Add migration 026 to update dispensary_crawl_status view with new fields - Update dashboard API to use dispensaries table (not stores) - Show current inventory counts (products seen in last 7 days) - Update ScraperSchedule UI to show provider_type correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,7 @@ interface DispensarySchedule {
|
||||
website: string | null;
|
||||
menu_url: string | null;
|
||||
product_provider: string | null;
|
||||
provider_type: string | null;
|
||||
product_confidence: number | null;
|
||||
product_crawler_mode: string | null;
|
||||
last_product_scan_at: string | null;
|
||||
@@ -415,7 +416,7 @@ export function ScraperSchedule() {
|
||||
</div>
|
||||
</td>
|
||||
<td style={{ padding: '15px', textAlign: 'center' }}>
|
||||
{disp.product_provider ? (
|
||||
{(disp.product_provider || disp.provider_type) && disp.product_provider !== 'unknown' && disp.provider_type !== 'unknown' ? (
|
||||
<div>
|
||||
<span style={{
|
||||
padding: '4px 10px',
|
||||
@@ -425,12 +426,23 @@ export function ScraperSchedule() {
|
||||
background: disp.product_crawler_mode === 'production' ? '#d1fae5' : '#fef3c7',
|
||||
color: disp.product_crawler_mode === 'production' ? '#065f46' : '#92400e'
|
||||
}}>
|
||||
{disp.product_provider}
|
||||
{disp.product_provider || disp.provider_type}
|
||||
</span>
|
||||
{disp.product_crawler_mode !== 'production' && (
|
||||
<div style={{ fontSize: '10px', color: '#92400e', marginTop: '2px' }}>sandbox</div>
|
||||
)}
|
||||
</div>
|
||||
) : disp.menu_url ? (
|
||||
<span style={{
|
||||
padding: '4px 10px',
|
||||
borderRadius: '12px',
|
||||
fontSize: '12px',
|
||||
fontWeight: '600',
|
||||
background: '#dbeafe',
|
||||
color: '#1e40af'
|
||||
}}>
|
||||
Pending
|
||||
</span>
|
||||
) : (
|
||||
<span style={{
|
||||
padding: '4px 10px',
|
||||
@@ -440,7 +452,7 @@ export function ScraperSchedule() {
|
||||
background: '#f3f4f6',
|
||||
color: '#666'
|
||||
}}>
|
||||
Unknown
|
||||
-
|
||||
</span>
|
||||
)}
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user