new features
This commit is contained in:
@@ -49,8 +49,18 @@ const typeColors: Record<string, string> = {
|
||||
};
|
||||
|
||||
export default function Dashboard() {
|
||||
const { data, loading, lastUpdated, refresh, reloadFromCSV, typeCounts, groupedByType, parseLog, setData } =
|
||||
useTraceabilityData();
|
||||
const {
|
||||
data,
|
||||
loading,
|
||||
lastUpdated,
|
||||
refresh,
|
||||
reloadFromCSV,
|
||||
syncFromServer,
|
||||
typeCounts,
|
||||
groupedByType,
|
||||
parseLog,
|
||||
setData
|
||||
} = useTraceabilityData();
|
||||
const [showDebug, setShowDebug] = useState(false);
|
||||
const [showUpload, setShowUpload] = useState(false);
|
||||
|
||||
@@ -157,7 +167,18 @@ export default function Dashboard() {
|
||||
Update Data
|
||||
</Button>
|
||||
<Button variant="outline" onClick={reloadFromCSV} disabled={loading}>
|
||||
Reload from CSV
|
||||
{loading ? (
|
||||
<><RefreshCw className="h-4 w-4 mr-2 animate-spin" /> Loading...</>
|
||||
) : (
|
||||
<>Reload from Static CSV</>
|
||||
)}
|
||||
</Button>
|
||||
<Button variant="secondary" onClick={syncFromServer} disabled={loading}>
|
||||
{loading ? (
|
||||
<><RefreshCw className="h-4 w-4 mr-2 animate-spin" /> Syncing...</>
|
||||
) : (
|
||||
<><RefreshCw className="h-4 w-4 mr-2" /> Sync from OpenProject</>
|
||||
)}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user