Mise à jour de 'models'

This commit is contained in:
Julien Gautier
2023-10-03 13:48:55 +02:00
parent 3a5e837842
commit 7e3dd53479
4 changed files with 226 additions and 92 deletions
+163 -31
View File
@@ -1,20 +1,23 @@
import { FormControl } from '@angular/forms';
import { Profile } from './profile.model';
export interface Jump {
slug: string;
date: string;
numero: number,
numero: number;
lieu?: string;
oaci?: string;
aeronef?: string;
imat?: string;
hauteur?: number,
hauteur?: number;
deploiement?: number;
voile?: string;
taille?: number,
taille?: number;
categorie?: string;
module?: string;
participants?: number,
sautants?: Array<string>;
participants?: number;
sautants: Array<string>;
programme?: string;
accessoires?: string;
zone?: string;
@@ -23,35 +26,164 @@ export interface Jump {
author: Profile;
createdAt: string;
updatedAt: string;
//isEdit?: boolean;
isSelected?: boolean;
};
export interface JumpForm {
date: FormControl<string>;
numero: FormControl<number>;
lieu: FormControl<string>;
oaci: FormControl<string>;
aeronef: FormControl<string>;
imat: FormControl<string>;
hauteur: FormControl<number>;
deploiement: FormControl<number>;
voile: FormControl<string>;
taille: FormControl<number>;
categorie: FormControl<string>;
module: FormControl<string>;
participants: FormControl<number>;
//sautants: FormControl<Array<string>>;
programme: FormControl<string>;
accessoires: FormControl<string>;
zone: FormControl<string>;
dossier: FormControl<string>;
video: FormControl<string>;
}
export interface JumpAddParams {
numeros: string;
date: string;
video: boolean;
};
export interface JumpByDate {
_id: {
month: number,
year: number
},
count: number
}
month: number;
year: number;
};
count: number;
};
export interface JumpDoc {
_id?: string;
_rev?: string;
export interface ColumnDefinition {
key: string;
type: string;
date: string;
numero: number,
lieu?: string;
oaci?: string;
aeronef?: string;
imat?: string;
hauteur?: number,
voile?: string;
taille?: number,
categorie?: string;
module?: string;
participants?: number,
programme?: string;
accessoires?: string;
zone?: string;
dossier?: string;
video?: string;
}
label: string;
required?: boolean;
pattern?: string;
min?: number;
step?: number;
};
export const jumpColumns: Array<ColumnDefinition> = [
{
key: 'isSelected',
type: 'isSelected',
label: ''
},
{
key: 'date',
type: 'date',
label: 'Date',
required: true
},
{
key: 'numero',
type: 'numeric',
label: 'Numéro',
required: true,
min: 0,
step: 1
},
{
key: 'lieu',
type: 'text',
label: 'Lieu'
},
{
key: 'oaci',
type: 'text',
label: 'OACI'
},
{
key: 'aeronef',
type: 'text',
label: 'Aéronef'
},
{
key: 'imat',
type: 'text',
label: 'Imat.'
},
{
key: 'hauteur',
type: 'numeric',
label: 'Hauteur'
},
{
key: 'deploiement',
type: 'numeric',
label: 'Deploiement'
},
{
key: 'voile',
type: 'text',
label: 'Voile'
},
{
key: 'taille',
type: 'numeric',
label: 'Taille'
},
{
key: 'categorie',
type: 'text',
label: 'Categorie'
},
{
key: 'module',
type: 'text',
label: 'Module'
},
{
key: 'participants',
type: 'numeric',
label: 'Participants'
},
{
key: 'sautants',
type: 'text',
label: 'Sautants'
},
{
key: 'programme',
type: 'text',
label: 'Programme'
},
{
key: 'accessoires',
type: 'text',
label: 'Accessoires'
},
{
key: 'zone',
type: 'text',
label: 'Zone'
},
/*{
key: 'dossier',
type: 'text',
label: ''
},*/
{
key: 'video',
type: 'text',
label: 'Vidéo'
},
{
key: 'isEdit',
type: 'isEdit',
label: ''
}
];