fix coquille

This commit is contained in:
Haïssous Kayyissa 2023-03-28 16:54:41 +02:00
parent 7d6501016e
commit 5ed4cf2001
4 changed files with 26 additions and 27 deletions

View File

@ -53,16 +53,17 @@
})
console.log(this.state.items)
this.state.items.forEach(etablissement => {
// calcul la moyenne
let pct_sansmention = etablissement.fields.pct_sansmention
let pct_AB = etablissement.fields.pct_ab
let pct_B = etablissement.fields.pct_b
let pct_TB = etablissement.fields.pct_tb
let pct_TBF = etablissement.fields.pct_tbf
let moyenne = ((pct_TBF*18)+(pct_TB*16)+(pct_B*14)+(pct_AB*12)+(pct_sansmention*10))/100
etablissement.fields['list_com']=moyenne
// calcul la moyenne
let pct_sansmention = etablissement.fields.pct_sansmention
let pct_AB = etablissement.fields.pct_ab
let pct_B = etablissement.fields.pct_b
let pct_TB = etablissement.fields.pct_tb
let pct_TBF = etablissement.fields.pct_tbf
let moyenne = ((pct_TBF*18)+(pct_TB*16)+(pct_B*14)+(pct_AB*12)+(pct_sansmention*10))/100
etablissement.fields['list_com']=moyenne
})
})
}
}

View File

@ -33,7 +33,7 @@ class PAPI {
static async fetchEtablissement(filiere, sousfiliere, soussousfiliere) {
let request = await fetch(`${PAPI.searchURL}&refine.fil_lib_voe_acc=${soussousfiliere}&refine.form_lib_voe_acc=${sousfiliere}&refine.fili=${filiere}`)
let result = await request.json()
console.log(result["records"])
return result["records"]
}
}

View File

@ -25,7 +25,6 @@ class PAPI {
static async fetchEtablissement(filiere, sousfiliere, soussousfiliere) {
let request = await fetch(`${PAPI.searchURL}&refine.fil_lib_voe_acc=${soussousfiliere}&refine.form_lib_voe_acc=${sousfiliere}&refine.fili=${filiere}`);
let result = await request.json();
console.log(result["records"]);
return result["records"];
}
}
@ -63,53 +62,53 @@ var school = {
}
};
},
template: (template, expressionTypes, bindingTypes, getComponent) => template('<main class="container"><div class="block control has-icons-left is-inline-block is-pulled-right"><input class="input" type="search" placeholder="Établissement"/><span class="icon is-small is-left"><i class="fas fa-search"></i></span></div><table class="table is-fullwidth is-hoverable"><thead><tr><th><abbr title="name">Nom</abbr></th><th><abbr title="city">Ville</abbr></th><th><abbr title="dept">Dpt</abbr></th><th><abbr title="moyenne">Moyenne</abbr></th><th><abbr title="selectivite">Sélectivité</abbr></th></tr></thead><tbody><tr expr90="expr90"></tr></tbody></table></main>', [{
template: (template, expressionTypes, bindingTypes, getComponent) => template('<main class="container"><div class="block control has-icons-left is-inline-block is-pulled-right"><input class="input" type="search" placeholder="Établissement"/><span class="icon is-small is-left"><i class="fas fa-search"></i></span></div><table class="table is-fullwidth is-hoverable"><thead><tr><th><abbr title="name">Nom</abbr></th><th><abbr title="city">Ville</abbr></th><th><abbr title="dept">Dpt</abbr></th><th><abbr title="moyenne">Moyenne</abbr></th><th><abbr title="selectivite">Sélectivité</abbr></th></tr></thead><tbody><tr expr102="expr102"></tr></tbody></table></main>', [{
type: bindingTypes.EACH,
getKey: null,
condition: null,
template: template('<td expr91="expr91"> </td><td expr92="expr92"> </td><td expr93="expr93"> </td><td expr94="expr94"> </td><td expr95="expr95"> </td>', [{
redundantAttribute: 'expr91',
selector: '[expr91]',
template: template('<td expr103="expr103"> </td><td expr104="expr104"> </td><td expr105="expr105"> </td><td expr106="expr106"> </td><td expr107="expr107"> </td>', [{
redundantAttribute: 'expr103',
selector: '[expr103]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
evaluate: _scope => _scope.etablissement.g_ea_lib_vx
}]
}, {
redundantAttribute: 'expr92',
selector: '[expr92]',
redundantAttribute: 'expr104',
selector: '[expr104]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
evaluate: _scope => _scope.etablissement.ville_etab
}]
}, {
redundantAttribute: 'expr93',
selector: '[expr93]',
redundantAttribute: 'expr105',
selector: '[expr105]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
evaluate: _scope => _scope.etablissement.dep
}]
}, {
redundantAttribute: 'expr94',
selector: '[expr94]',
redundantAttribute: 'expr106',
selector: '[expr106]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
evaluate: _scope => _scope.etablissement.list_com
}]
}, {
redundantAttribute: 'expr95',
selector: '[expr95]',
redundantAttribute: 'expr107',
selector: '[expr107]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
evaluate: _scope => _scope.etablissement.taux_acces_ens
}]
}]),
redundantAttribute: 'expr90',
selector: '[expr90]',
redundantAttribute: 'expr102',
selector: '[expr102]',
itemName: 'etablissement',
indexName: null,
evaluate: _scope => _scope.state.items

View File

@ -25,7 +25,6 @@ class PAPI {
static async fetchEtablissement(filiere, sousfiliere, soussousfiliere) {
let request = await fetch(`${PAPI.searchURL}&refine.fil_lib_voe_acc=${soussousfiliere}&refine.form_lib_voe_acc=${sousfiliere}&refine.fili=${filiere}`);
let result = await request.json();
console.log(result["records"]);
return result["records"];
}
}