fix: build errors in MetrcDashboardPage
Some checks are pending
Deploy to Production / deploy (push) Waiting to run
Test / backend-test (push) Waiting to run
Test / frontend-test (push) Waiting to run

This commit is contained in:
fullsizemalt 2025-12-17 22:54:18 -08:00
parent 9f4c8d88aa
commit 7f7cca415c

View file

@ -1,3 +1,4 @@
import { useState, useEffect } from 'react';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import { import {
Cloud, CloudOff, RefreshCw, Download, AlertTriangle, Cloud, CloudOff, RefreshCw, Download, AlertTriangle,
@ -75,7 +76,7 @@ export default function MetrcDashboardPage() {
} }
} }
const filteredPlants = report?.plants.filter(p => const filteredPlants = report?.plants.filter((p: any) =>
searchTerm === '' || searchTerm === '' ||
p.tagNumber.toLowerCase().includes(searchTerm.toLowerCase()) || p.tagNumber.toLowerCase().includes(searchTerm.toLowerCase()) ||
p.room.toLowerCase().includes(searchTerm.toLowerCase()) p.room.toLowerCase().includes(searchTerm.toLowerCase())
@ -284,7 +285,7 @@ export default function MetrcDashboardPage() {
<p className="text-xs text-tertiary">Location changes requiring METRC update</p> <p className="text-xs text-tertiary">Location changes requiring METRC update</p>
</div> </div>
<div className="divide-y divide-subtle"> <div className="divide-y divide-subtle">
{audit.recentMoves.slice(0, 5).map((move, i) => ( {audit.recentMoves.slice(0, 5).map((move: any, i: number) => (
<div key={i} className="p-4 flex items-center gap-4"> <div key={i} className="p-4 flex items-center gap-4">
<div className="w-10 h-10 rounded-lg bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center"> <div className="w-10 h-10 rounded-lg bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center">
<ArrowUpDown size={18} className="text-blue-600 dark:text-blue-400" /> <ArrowUpDown size={18} className="text-blue-600 dark:text-blue-400" />
@ -348,7 +349,7 @@ export default function MetrcDashboardPage() {
</tr> </tr>
</thead> </thead>
<tbody className="divide-y divide-subtle"> <tbody className="divide-y divide-subtle">
{filteredPlants.slice(0, 50).map((plant) => ( {filteredPlants.slice(0, 50).map((plant: any) => (
<tr key={plant.plantId} className="hover:bg-secondary/50"> <tr key={plant.plantId} className="hover:bg-secondary/50">
<td className="p-3 font-mono text-xs font-bold">{plant.tagNumber}</td> <td className="p-3 font-mono text-xs font-bold">{plant.tagNumber}</td>
<td className="p-3 font-mono text-xs text-accent">{plant.location || '-'}</td> <td className="p-3 font-mono text-xs text-accent">{plant.location || '-'}</td>
@ -451,7 +452,7 @@ export default function MetrcDashboardPage() {
</tr> </tr>
</thead> </thead>
<tbody className="divide-y divide-subtle"> <tbody className="divide-y divide-subtle">
{audit.recentMoves.map((move, i) => ( {audit.recentMoves.map((move: any, i: number) => (
<tr key={i} className="hover:bg-secondary/50"> <tr key={i} className="hover:bg-secondary/50">
<td className="p-3 font-mono text-xs">{move.plantTag}</td> <td className="p-3 font-mono text-xs">{move.plantTag}</td>
<td className="p-3 text-tertiary">{move.from}</td> <td className="p-3 text-tertiary">{move.from}</td>