ProjetRIOT/components/main-controller.riot
2023-03-30 19:28:40 +02:00

38 lines
1.1 KiB
Plaintext

<main-controller>
<div class="columns">
<div class="column is-one-third">
<div class="box p-3 m-2">
<img class="mt-1 ml-5 mr-auto" style="margin: auto;" src="../resources/logo-parcoursup.svg"/>
</div>
<search updateCourse={updateCourse}></search>
</div>
<div class="column">
<fili-info course={state.course} shouldShowInfos={state.shouldShowInfos}></fili-info>
<school parentUpdate={state.updating} course={state.course} shouldShowInfos={state.shouldShowInfos}></school>
</div>
</div>
<school-info></school-info>
<script>
export default {
onBeforeMount(props, state) {
//Initial state
this.state = {
course: null,
updating: false,
shouldShowInfos: false
}
},
updateCourse(course){
this.update({
course: course,
shouldShowInfos: course != null,
updating: !this.state.updating
})
}
}
</script>
</main-controller>