$
This commit is contained in:
parent
a10d1c590a
commit
cd16938e20
@ -12,7 +12,8 @@ export default class Model {
|
|||||||
filiaire: "fili",
|
filiaire: "fili",
|
||||||
formation: "form_lib_voe_acc",
|
formation: "form_lib_voe_acc",
|
||||||
spec: "fil_lib_voe_acc"
|
spec: "fil_lib_voe_acc"
|
||||||
}
|
},
|
||||||
|
apikey: "196a5bb3797f9946727688fc65fa0074a64fc0b7140b1cb6a6b4ddde"
|
||||||
},
|
},
|
||||||
page: {
|
page: {
|
||||||
curIndex: 0, /* section n.0 -> n.2. */
|
curIndex: 0, /* section n.0 -> n.2. */
|
||||||
@ -119,7 +120,10 @@ export default class Model {
|
|||||||
getModelData0() {
|
getModelData0() {
|
||||||
if(!localStorage.getItem(`sec0`)) {
|
if(!localStorage.getItem(`sec0`)) {
|
||||||
const link = `${ this.state.api.link }&rows=0` +
|
const link = `${ this.state.api.link }&rows=0` +
|
||||||
`&facet=${encodeURIComponent(this.state.api.facet.filiaire)}`
|
`&facet=${encodeURIComponent(this.state.api.facet.filiaire)}` +
|
||||||
|
`&apikey=${this.state.api.apikey}`
|
||||||
|
|
||||||
|
console.log(this.state.api.apikey)
|
||||||
|
|
||||||
return fetch(link)
|
return fetch(link)
|
||||||
.then((res) => res.json())
|
.then((res) => res.json())
|
||||||
@ -152,7 +156,8 @@ export default class Model {
|
|||||||
`&facet=${encodeURIComponent(this.state.api.facet.filiaire)}` +
|
`&facet=${encodeURIComponent(this.state.api.facet.filiaire)}` +
|
||||||
`&facet=${encodeURIComponent(this.state.api.facet.formation)}` +
|
`&facet=${encodeURIComponent(this.state.api.facet.formation)}` +
|
||||||
`&facet=${encodeURIComponent(this.state.api.facet.spec)}` +
|
`&facet=${encodeURIComponent(this.state.api.facet.spec)}` +
|
||||||
`&refine.${encodeURIComponent(this.state.api.facet.filiaire)}=${encodeURIComponent(this.state.page.cat)}`
|
`&refine.${encodeURIComponent(this.state.api.facet.filiaire)}=${encodeURIComponent(this.state.page.cat)}` +
|
||||||
|
`&apikey=${this.state.api.apikey}`
|
||||||
|
|
||||||
return fetch(link)
|
return fetch(link)
|
||||||
.then((res) => res.json())
|
.then((res) => res.json())
|
||||||
@ -187,7 +192,8 @@ export default class Model {
|
|||||||
`&facet=${encodeURIComponent(this.state.api.facet.formation)}` +
|
`&facet=${encodeURIComponent(this.state.api.facet.formation)}` +
|
||||||
`&facet=${encodeURIComponent(this.state.api.facet.spec)}` +
|
`&facet=${encodeURIComponent(this.state.api.facet.spec)}` +
|
||||||
`&refine.${encodeURIComponent(this.state.api.facet.filiaire)}=${encodeURIComponent(this.state.page.cat)}` +
|
`&refine.${encodeURIComponent(this.state.api.facet.filiaire)}=${encodeURIComponent(this.state.page.cat)}` +
|
||||||
`&refine.${encodeURIComponent(this.state.api.facet.formation)}=${encodeURIComponent(this.state.page.scat)}`
|
`&refine.${encodeURIComponent(this.state.api.facet.formation)}=${encodeURIComponent(this.state.page.scat)}` +
|
||||||
|
`&apikey=${this.state.api.apikey}`
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (Bilal prends la responsabilite de ce massacre)
|
* (Bilal prends la responsabilite de ce massacre)
|
||||||
@ -197,7 +203,8 @@ export default class Model {
|
|||||||
`&facet=${encodeURIComponent(this.state.api.facet.filiaire)}` +
|
`&facet=${encodeURIComponent(this.state.api.facet.filiaire)}` +
|
||||||
`&facet=${encodeURIComponent(this.state.api.facet.formation)}` +
|
`&facet=${encodeURIComponent(this.state.api.facet.formation)}` +
|
||||||
`&facet=${encodeURIComponent(this.state.api.facet.spec)}` +
|
`&facet=${encodeURIComponent(this.state.api.facet.spec)}` +
|
||||||
`&refine.fili=Ecole%20d%27Ingénieur&refine.form_lib_voe_acc=Formations%20%20des%20écoles%20d%27ingénieurs`
|
`&refine.fili=Ecole%20d%27Ingénieur&refine.form_lib_voe_acc=Formations%20%20des%20écoles%20d%27ingénieurs` +
|
||||||
|
`&apikey=${this.state.api.apikey}`
|
||||||
}
|
}
|
||||||
|
|
||||||
return fetch(link)
|
return fetch(link)
|
||||||
@ -236,15 +243,18 @@ export default class Model {
|
|||||||
`&facet=${encodeURIComponent(this.state.api.facet.spec)}` +
|
`&facet=${encodeURIComponent(this.state.api.facet.spec)}` +
|
||||||
`&refine.${encodeURIComponent(this.state.api.facet.filiaire)}=${encodeURIComponent(this.state.page.cat)}` +
|
`&refine.${encodeURIComponent(this.state.api.facet.filiaire)}=${encodeURIComponent(this.state.page.cat)}` +
|
||||||
`&refine.${encodeURIComponent(this.state.api.facet.formation)}=${encodeURIComponent(this.state.page.scat)}` +
|
`&refine.${encodeURIComponent(this.state.api.facet.formation)}=${encodeURIComponent(this.state.page.scat)}` +
|
||||||
`&refine.${encodeURIComponent(this.state.api.facet.spec)}=${encodeURIComponent(this.state.page.tcat)}`
|
`&refine.${encodeURIComponent(this.state.api.facet.spec)}=${encodeURIComponent(this.state.page.tcat)}` +
|
||||||
|
`&apikey=${this.state.api.apikey}`
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (Bilal prends la responsabilite de ce massacre)
|
* (Bilal prends la responsabilite de ce massacre)
|
||||||
* */
|
* */
|
||||||
if(this.state.page.tcat === "Formation d'ingénieur Bac + 5") {
|
if(this.state.page.tcat === "Formation d'ingénieur Bac + 5") {
|
||||||
link = `https://data.enseignementsup-recherche.gouv.fr/explore/embed/dataset/fr-esr-parcoursup/map/?timezone=Europe%2FBerlin&sort=tri&facet=fili&facet=fili&facet=form_lib_voe_acc&facet=fil_lib_voe_acc&refine.fili=Ecole%20d%27Ing%C3%A9nieur&refine.form_lib_voe_acc=Formations%20%20des%20%C3%A9coles%20d%27ing%C3%A9nieurs&refine.fil_lib_voe_acc=Formation%20d%27ing%C3%A9nieur%20Bac%20%2B%205`
|
link = `https://data.enseignementsup-recherche.gouv.fr/explore/embed/dataset/fr-esr-parcoursup/map/?timezone=Europe%2FBerlin&sort=tri&facet=fili&facet=fili&facet=form_lib_voe_acc&facet=fil_lib_voe_acc&refine.fili=Ecole%20d%27Ing%C3%A9nieur&refine.form_lib_voe_acc=Formations%20%20des%20%C3%A9coles%20d%27ing%C3%A9nieurs&refine.fil_lib_voe_acc=Formation%20d%27ing%C3%A9nieur%20Bac%20%2B%205` +
|
||||||
|
`&apikey=${this.state.api.apikey}`
|
||||||
} else if(this.state.page.tcat === "Formation Bac + 3") {
|
} else if(this.state.page.tcat === "Formation Bac + 3") {
|
||||||
link = `https://data.enseignementsup-recherche.gouv.fr/api/records/1.0/search/?dataset=fr-esr-parcoursup&q=&lang=fr&sort=tri&rows=10000&facet=fili&facet=form_lib_voe_acc&facet=fil_lib_voe_acc&refine.fili=Ecole%20d%27Ing%C3%A9nieur&refine.form_lib_voe_acc=Formations%20%20des%20%C3%A9coles%20d%27ing%C3%A9nieurs&refine.fil_lib_voe_acc=Formation%20Bac%20%2B%203`
|
link = `https://data.enseignementsup-recherche.gouv.fr/api/records/1.0/search/?dataset=fr-esr-parcoursup&q=&lang=fr&sort=tri&rows=10000&facet=fili&facet=form_lib_voe_acc&facet=fil_lib_voe_acc&refine.fili=Ecole%20d%27Ing%C3%A9nieur&refine.form_lib_voe_acc=Formations%20%20des%20%C3%A9coles%20d%27ing%C3%A9nieurs&refine.fil_lib_voe_acc=Formation%20Bac%20%2B%203` +
|
||||||
|
`&apikey=${this.state.api.apikey}`
|
||||||
}
|
}
|
||||||
|
|
||||||
return fetch(link)
|
return fetch(link)
|
||||||
@ -288,7 +298,8 @@ export default class Model {
|
|||||||
`&refine.${encodeURIComponent(this.state.api.facet.filiaire)}=${encodeURIComponent(this.state.page.cat)}` +
|
`&refine.${encodeURIComponent(this.state.api.facet.filiaire)}=${encodeURIComponent(this.state.page.cat)}` +
|
||||||
`&refine.${encodeURIComponent(this.state.api.facet.formation)}=${encodeURIComponent(this.state.page.scat)}` +
|
`&refine.${encodeURIComponent(this.state.api.facet.formation)}=${encodeURIComponent(this.state.page.scat)}` +
|
||||||
`&refine.${encodeURIComponent(this.state.api.facet.spec)}=${encodeURIComponent(this.state.page.tcat)}` +
|
`&refine.${encodeURIComponent(this.state.api.facet.spec)}=${encodeURIComponent(this.state.page.tcat)}` +
|
||||||
`&location=6,48.04137,1.74683&basemap=e69ab1`
|
`&location=6,48.04137,1.74683&basemap=e69ab1` +
|
||||||
|
`&apikey=${this.state.api.apikey}`
|
||||||
|
|
||||||
console.log(link)
|
console.log(link)
|
||||||
|
|
||||||
@ -296,9 +307,11 @@ export default class Model {
|
|||||||
* (Bilal prends la responsabilite de ce massacre)
|
* (Bilal prends la responsabilite de ce massacre)
|
||||||
* */
|
* */
|
||||||
if(this.state.page.tcat === "Formation d'ingénieur Bac + 5") {
|
if(this.state.page.tcat === "Formation d'ingénieur Bac + 5") {
|
||||||
link = `https://data.enseignementsup-recherche.gouv.fr/api/records/1.0/search/?dataset=fr-esr-parcoursup&q=&lang=fr&sort=tri&rows=10000&facet=fili&facet=form_lib_voe_acc&facet=fil_lib_voe_acc&refine.fili=Ecole%20d%27Ing%C3%A9nieur&refine.form_lib_voe_acc=Formations%20%20des%20%C3%A9coles%20d%27ing%C3%A9nieurs&refine.fil_lib_voe_acc=Formation%20d%27ing%C3%A9nieur%20Bac%20%2B%205&location=6,48.04137,1.74683&basemap=e69ab1`
|
link = `https://data.enseignementsup-recherche.gouv.fr/api/records/1.0/search/?dataset=fr-esr-parcoursup&q=&lang=fr&sort=tri&rows=10000&facet=fili&facet=form_lib_voe_acc&facet=fil_lib_voe_acc&refine.fili=Ecole%20d%27Ing%C3%A9nieur&refine.form_lib_voe_acc=Formations%20%20des%20%C3%A9coles%20d%27ing%C3%A9nieurs&refine.fil_lib_voe_acc=Formation%20d%27ing%C3%A9nieur%20Bac%20%2B%205&location=6,48.04137,1.74683&basemap=e69ab1` +
|
||||||
|
`&apikey=${this.state.api.apikey}`
|
||||||
} else if(this.state.page.tcat === "Formation Bac + 3") {
|
} else if(this.state.page.tcat === "Formation Bac + 3") {
|
||||||
link = `https://data.enseignementsup-recherche.gouv.fr/explore/embed/dataset/fr-esr-parcoursup/map/?timezone=Europe%2FBerlin&sort=tri&facet=fili&facet=form_lib_voe_acc&facet=fil_lib_voe_acc&refine.fili=Ecole%20d%27Ing%C3%A9nieur&refine.form_lib_voe_acc=Formations%20%20des%20%C3%A9coles%20d%27ing%C3%A9nieurs&refine.fil_lib_voe_acc=Formation%20Bac%20%2B%203&location=6,47.0088,2.09656&basemap=e69ab1&location=6,48.04137,1.74683&basemap=e69ab1`
|
link = `https://data.enseignementsup-recherche.gouv.fr/explore/embed/dataset/fr-esr-parcoursup/map/?timezone=Europe%2FBerlin&sort=tri&facet=fili&facet=form_lib_voe_acc&facet=fil_lib_voe_acc&refine.fili=Ecole%20d%27Ing%C3%A9nieur&refine.form_lib_voe_acc=Formations%20%20des%20%C3%A9coles%20d%27ing%C3%A9nieurs&refine.fil_lib_voe_acc=Formation%20Bac%20%2B%203&location=6,47.0088,2.09656&basemap=e69ab1&location=6,48.04137,1.74683&basemap=e69ab1` +
|
||||||
|
`&apikey=${this.state.api.apikey}`
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic">
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.css">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/milligram/1.4.0/milligram.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/milligram/1.4.0/milligram.css">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/leaflet.css" integrity="sha512-zJq3FiOjWT4O4yGm+4s1JmKj8ng/6Uf7VU/UCYXb7eUJjh/HxN7VJVVQ2KjwC0tpLZzmfMQJqvL2+X9G1c+fKw==" crossorigin=""/>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
Loading…
Reference in New Issue
Block a user