2023-03-28 13:42:53 +02:00
|
|
|
var mainController = {
|
|
|
|
css: null,
|
2023-03-29 22:56:14 +02:00
|
|
|
exports: {
|
2023-03-29 22:01:50 +02:00
|
|
|
onBeforeMount(props, state) {
|
|
|
|
//Initial state
|
|
|
|
this.state = {
|
2023-03-30 00:54:13 +02:00
|
|
|
course: null,
|
2023-03-30 19:28:40 +02:00
|
|
|
updating: false,
|
2023-03-30 00:54:13 +02:00
|
|
|
shouldShowInfos: false
|
2023-03-29 22:01:50 +02:00
|
|
|
};
|
|
|
|
},
|
2023-03-30 00:54:13 +02:00
|
|
|
updateCourse(course) {
|
2023-03-29 22:01:50 +02:00
|
|
|
this.update({
|
2023-03-30 00:54:13 +02:00
|
|
|
course: course,
|
2023-03-30 19:28:40 +02:00
|
|
|
shouldShowInfos: course != null,
|
|
|
|
updating: !this.state.updating
|
2023-03-29 22:01:50 +02:00
|
|
|
});
|
2023-03-29 22:56:14 +02:00
|
|
|
}
|
|
|
|
},
|
2023-03-30 19:28:40 +02:00
|
|
|
template: (template, expressionTypes, bindingTypes, getComponent) => template('<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 expr125="expr125"></search></div><div class="column"><fili-info expr126="expr126"></fili-info><school expr127="expr127"></school></div></div><school-info expr128="expr128"></school-info>', [{
|
2023-03-28 13:42:53 +02:00
|
|
|
type: bindingTypes.TAG,
|
|
|
|
getComponent: getComponent,
|
|
|
|
evaluate: _scope => 'search',
|
|
|
|
slots: [],
|
2023-03-29 22:56:14 +02:00
|
|
|
attributes: [{
|
|
|
|
type: expressionTypes.ATTRIBUTE,
|
2023-03-29 22:01:50 +02:00
|
|
|
name: 'updateCourse',
|
|
|
|
evaluate: _scope => _scope.updateCourse
|
2023-03-29 22:56:14 +02:00
|
|
|
}],
|
2023-03-30 19:28:40 +02:00
|
|
|
redundantAttribute: 'expr125',
|
|
|
|
selector: '[expr125]'
|
2023-03-28 13:42:53 +02:00
|
|
|
}, {
|
|
|
|
type: bindingTypes.TAG,
|
|
|
|
getComponent: getComponent,
|
|
|
|
evaluate: _scope => 'fili-info',
|
|
|
|
slots: [],
|
2023-03-30 00:54:13 +02:00
|
|
|
attributes: [{
|
|
|
|
type: expressionTypes.ATTRIBUTE,
|
|
|
|
name: 'course',
|
|
|
|
evaluate: _scope => _scope.state.course
|
|
|
|
}, {
|
|
|
|
type: expressionTypes.ATTRIBUTE,
|
|
|
|
name: 'shouldShowInfos',
|
|
|
|
evaluate: _scope => _scope.state.shouldShowInfos
|
|
|
|
}],
|
2023-03-30 19:28:40 +02:00
|
|
|
redundantAttribute: 'expr126',
|
|
|
|
selector: '[expr126]'
|
2023-03-28 13:42:53 +02:00
|
|
|
}, {
|
|
|
|
type: bindingTypes.TAG,
|
|
|
|
getComponent: getComponent,
|
|
|
|
evaluate: _scope => 'school',
|
|
|
|
slots: [],
|
2023-03-30 00:54:13 +02:00
|
|
|
attributes: [{
|
2023-03-30 19:28:40 +02:00
|
|
|
type: expressionTypes.ATTRIBUTE,
|
|
|
|
name: 'parentUpdate',
|
|
|
|
evaluate: _scope => _scope.state.updating
|
|
|
|
}, {
|
2023-03-30 00:54:13 +02:00
|
|
|
type: expressionTypes.ATTRIBUTE,
|
|
|
|
name: 'course',
|
|
|
|
evaluate: _scope => _scope.state.course
|
|
|
|
}, {
|
|
|
|
type: expressionTypes.ATTRIBUTE,
|
|
|
|
name: 'shouldShowInfos',
|
|
|
|
evaluate: _scope => _scope.state.shouldShowInfos
|
|
|
|
}],
|
2023-03-30 19:28:40 +02:00
|
|
|
redundantAttribute: 'expr127',
|
|
|
|
selector: '[expr127]'
|
2023-03-28 13:42:53 +02:00
|
|
|
}, {
|
|
|
|
type: bindingTypes.TAG,
|
|
|
|
getComponent: getComponent,
|
|
|
|
evaluate: _scope => 'school-info',
|
|
|
|
slots: [],
|
|
|
|
attributes: [],
|
2023-03-30 19:28:40 +02:00
|
|
|
redundantAttribute: 'expr128',
|
|
|
|
selector: '[expr128]'
|
2023-03-28 13:42:53 +02:00
|
|
|
}]),
|
|
|
|
name: 'main-controller'
|
|
|
|
};
|
|
|
|
|
|
|
|
export { mainController as default };
|