Mise à jour de 'models'
This commit is contained in:
@@ -1,21 +1,28 @@
|
|||||||
export interface CalcResult {
|
export interface CalculatorInfo {
|
||||||
weight: number;
|
charges: CalculatorResult;
|
||||||
jumps: number;
|
sizesFeet: CalculatorResult;
|
||||||
minSize: number;
|
sizesMeter: CalculatorResult;
|
||||||
minSize11: number;
|
state: {
|
||||||
minSize21: number;
|
color: string
|
||||||
|
},
|
||||||
error?: string;
|
error?: string;
|
||||||
}
|
}
|
||||||
|
export interface CalculatorResult {
|
||||||
|
current?: number;
|
||||||
|
min: number;
|
||||||
|
min11: number;
|
||||||
|
}
|
||||||
export interface InputParams {
|
export interface InputParams {
|
||||||
jumps: number;
|
jumps: number;
|
||||||
weight: number;
|
weight: number;
|
||||||
gear: number;
|
gear: number;
|
||||||
current: number;
|
current: number;
|
||||||
|
color: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Range {
|
export interface Range {
|
||||||
num: number;
|
num: number;
|
||||||
active?: string;
|
active: string;
|
||||||
name: string;
|
name: string;
|
||||||
label: string;
|
label: string;
|
||||||
start: number;
|
start: number;
|
||||||
@@ -23,9 +30,13 @@ export interface Range {
|
|||||||
value: number;
|
value: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface TableHeader {
|
||||||
|
name: string;
|
||||||
|
active: string;
|
||||||
|
}
|
||||||
export interface WeightSize {
|
export interface WeightSize {
|
||||||
weight: number;
|
weight: number;
|
||||||
active?: string;
|
active: string;
|
||||||
ranges: Range[];
|
ranges: Range[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,80 +1,21 @@
|
|||||||
|
import { ChartConfiguration, ChartOptions } from 'chart.js';
|
||||||
|
|
||||||
import { Configuration } from 'ng-chartist';
|
export interface BarConfig {
|
||||||
|
barChartData: ChartConfiguration<'bar'>['data'],
|
||||||
|
barChartOptions: ChartConfiguration<'bar'>['options'],
|
||||||
|
barChartPlugins: any[],
|
||||||
|
barChartLegend: boolean
|
||||||
|
}
|
||||||
|
|
||||||
export const chartPieDonute: Configuration = {
|
export interface DoughnutConfig {
|
||||||
type: 'Pie',
|
doughnutChartLabels: string[],
|
||||||
data: {
|
doughnutChartDatasets: ChartConfiguration<'doughnut'>['data']['datasets'],
|
||||||
"labels": [],
|
doughnutChartOptions: ChartConfiguration<'doughnut'>['options'],
|
||||||
"series": []
|
doughnutChartLegend: boolean
|
||||||
},
|
|
||||||
options: {
|
|
||||||
donut: true,
|
|
||||||
height: 260,
|
|
||||||
donutWidth: 46,
|
|
||||||
startAngle: 270,
|
|
||||||
showLabel: true
|
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
export const chartBar: Configuration = {
|
export interface LineConfig {
|
||||||
type: 'Bar',
|
lineChartData: ChartConfiguration<'line'>['data'],
|
||||||
data: {
|
lineChartOptions: ChartOptions<'line'>,
|
||||||
"labels": [],
|
lineChartLegend: boolean
|
||||||
"series": []
|
|
||||||
},
|
|
||||||
options: {},
|
|
||||||
responsiveOptions: []
|
|
||||||
};
|
|
||||||
/*
|
|
||||||
export const chartBar: Configuration = {
|
|
||||||
type: 'Bar',
|
|
||||||
data: {
|
|
||||||
"labels": [],
|
|
||||||
"series": []
|
|
||||||
},
|
|
||||||
options: {
|
|
||||||
seriesBarDistance: 5,
|
|
||||||
high: 170,
|
|
||||||
axisX: {
|
|
||||||
showGrid: false,
|
|
||||||
offset: 20
|
|
||||||
},
|
|
||||||
axisY: {
|
|
||||||
showGrid: true,
|
|
||||||
offset: 40
|
|
||||||
},
|
|
||||||
height: 207
|
|
||||||
},
|
|
||||||
responsiveOptions: [
|
|
||||||
['screen and (min-width: 1024px)', {
|
|
||||||
axisX: {
|
|
||||||
labelInterpolationFnc: function(value: number, index: number): string {
|
|
||||||
return index % 1 === 0 ? `${value}` : '';
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}],
|
|
||||||
['screen and (min-width: 641px) and (max-width: 1024px)', {
|
|
||||||
seriesBarDistance: 10,
|
|
||||||
axisY: {
|
|
||||||
offset: 30
|
|
||||||
},
|
|
||||||
axisX: {
|
|
||||||
labelInterpolationFnc: function(value: any, index: number): string {
|
|
||||||
return index % 1 === 0 ? `${value[2]}${value[3]}` : '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
['screen and (max-width: 640px)', {
|
|
||||||
seriesBarDistance: 5,
|
|
||||||
axisY: {
|
|
||||||
offset: 20
|
|
||||||
},
|
|
||||||
axisX: {
|
|
||||||
labelInterpolationFnc: function(value: any, index: number): string {
|
|
||||||
return index % 1 === 0 ? `${value[2]}${value[3]}` : '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
]
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
export interface Profile {
|
export interface Profile {
|
||||||
username: string;
|
username: string;
|
||||||
licence?: string;
|
licence?: number;
|
||||||
|
poids?: number;
|
||||||
image?: string;
|
image?: string;
|
||||||
bg_image?: string;
|
bg_image?: string;
|
||||||
following: boolean;
|
following: boolean;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ export interface User {
|
|||||||
lastname: string;
|
lastname: string;
|
||||||
phone: string;
|
phone: string;
|
||||||
licence?: number;
|
licence?: number;
|
||||||
|
poids?: number;
|
||||||
image?: string;
|
image?: string;
|
||||||
bg_image?: string;
|
bg_image?: string;
|
||||||
token: string;
|
token: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user