Improve demo seed
This commit is contained in:
@@ -9,7 +9,8 @@ export enum QualityCheckType {
|
||||
TEMPERATURE = 'temperature',
|
||||
WEIGHT = 'weight',
|
||||
BOOLEAN = 'boolean',
|
||||
TIMING = 'timing'
|
||||
TIMING = 'timing',
|
||||
CHECKLIST = 'checklist'
|
||||
}
|
||||
|
||||
export enum ProcessStage {
|
||||
|
||||
@@ -85,6 +85,12 @@ const QUALITY_CHECK_TYPE_CONFIG = {
|
||||
label: 'Tiempo',
|
||||
color: 'bg-orange-500',
|
||||
description: 'Control de tiempo'
|
||||
},
|
||||
[QualityCheckType.CHECKLIST]: {
|
||||
icon: FileCheck,
|
||||
label: 'Lista de verificación',
|
||||
color: 'bg-indigo-500',
|
||||
description: 'Checklist de verificación'
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ export const DemoSetupPage: React.FC = () => {
|
||||
}}
|
||||
>
|
||||
<div className="flex flex-col items-center justify-center min-h-[60vh]">
|
||||
<LoadingSpinner size="large" />
|
||||
<LoadingSpinner size="lg" />
|
||||
<p className="mt-4 text-[var(--text-secondary)]">
|
||||
Inicializando entorno demo...
|
||||
</p>
|
||||
@@ -159,7 +159,7 @@ export const DemoSetupPage: React.FC = () => {
|
||||
{progressPercentage}%
|
||||
</span>
|
||||
</div>
|
||||
<ProgressBar value={progressPercentage} variant="primary" />
|
||||
<ProgressBar value={progressPercentage} variant="default" animated />
|
||||
</div>
|
||||
|
||||
{status.status === 'pending' && (
|
||||
@@ -225,12 +225,15 @@ function calculateProgressPercentage(status: SessionStatusResponse): number {
|
||||
if (!status.progress) return 0;
|
||||
|
||||
const services = Object.values(status.progress);
|
||||
if (services.length === 0) return 0;
|
||||
|
||||
const completedServices = services.filter(
|
||||
(s) => s.status === 'completed' || s.status === 'failed'
|
||||
).length;
|
||||
const totalServices = services.length;
|
||||
|
||||
return Math.round((completedServices / totalServices) * 100);
|
||||
const percentage = (completedServices / totalServices) * 100;
|
||||
return Math.round(isNaN(percentage) ? 0 : percentage);
|
||||
}
|
||||
|
||||
export default DemoSetupPage;
|
||||
|
||||
Reference in New Issue
Block a user