56 lines
1.6 KiB
TypeScript
56 lines
1.6 KiB
TypeScript
export type Criterion = {
|
|
code: string;
|
|
question: string;
|
|
applies_to: 'all' | 'individual' | 'entity';
|
|
expected: 'yes' | 'no';
|
|
source_reference: string;
|
|
explanation: string;
|
|
};
|
|
export type FundingWindow = {
|
|
code: string;
|
|
title: string;
|
|
state: string;
|
|
coverage: string;
|
|
territory_paths?: { id: string; name: string; type: string }[][];
|
|
start_on?: string | null;
|
|
end_on?: string | null;
|
|
coverage_text?: string | null;
|
|
source_url: string;
|
|
source_reference: string;
|
|
checked_on: string;
|
|
application_url?: string | null;
|
|
criteria: Criterion[];
|
|
};
|
|
export type Programme = {
|
|
filter_explanation?: Record<string, string>;
|
|
id: string;
|
|
code: string;
|
|
version_id: string;
|
|
version: number;
|
|
published_at: string;
|
|
payload: {
|
|
title: string;
|
|
kind: string;
|
|
summary: string;
|
|
manager_name: string;
|
|
coverage: string;
|
|
coverage_text?: string | null;
|
|
territory_paths?: { id: string; name: string; type: string }[][];
|
|
sector_snapshots?: { id: number; name: string }[];
|
|
sectors_scope: string;
|
|
sectors_text?: string | null;
|
|
source_url: string;
|
|
source_reference: string;
|
|
source_checked_on: string;
|
|
criteria: Criterion[];
|
|
windows: FundingWindow[];
|
|
documents: { resource_id: number; title: string; available: boolean }[];
|
|
};
|
|
};
|
|
export const windowLabels: Record<string, string> = {
|
|
open: 'Janela aberta segundo as datas documentadas',
|
|
closed: 'Janela encerrada',
|
|
upcoming: 'Abertura futura',
|
|
unknown: 'Janela por confirmar',
|
|
};
|