chore: import DH V2 D5.6.4 production baseline

This commit is contained in:
DH V2
2026-09-05 10:12:35 -03:00
commit 82213e72f5
757 changed files with 84218 additions and 0 deletions
@@ -0,0 +1,32 @@
import type { SurveyCampaignStatus, SurveyTargetStatus } from '../../lib/api';
export const SURVEY_CAMPAIGN_STATUSES: Array<{ value: SurveyCampaignStatus; label: string }> = [
{ value: 'DRAFT', label: 'Borrador' },
{ value: 'PLANNED', label: 'Planificada' },
{ value: 'IN_PROGRESS', label: 'En curso' },
{ value: 'COMPLETED', label: 'Completada' },
{ value: 'CANCELLED', label: 'Cancelada' },
];
export const SURVEY_TARGET_STATUSES: Array<{ value: SurveyTargetStatus; label: string }> = [
{ value: 'PENDING', label: 'Pendiente' },
{ value: 'IN_PROGRESS', label: 'En ejecución' },
{ value: 'SUBMITTED', label: 'En revisión' },
{ value: 'COMPLETED', label: 'Completado' },
{ value: 'SKIPPED', label: 'Omitido' },
];
export function surveyCampaignStatusLabel(value: SurveyCampaignStatus): string {
return SURVEY_CAMPAIGN_STATUSES.find((item) => item.value === value)?.label ?? value;
}
export function surveyTargetStatusLabel(value: SurveyTargetStatus): string {
return SURVEY_TARGET_STATUSES.find((item) => item.value === value)?.label ?? value;
}
export function surveyStatusClass(value: SurveyCampaignStatus | SurveyTargetStatus): string {
if (value === 'COMPLETED') return 'active';
if (value === 'CANCELLED' || value === 'SKIPPED') return 'inactive';
if (value === 'IN_PROGRESS' || value === 'SUBMITTED') return 'observed';
return 'pending';
}