2018-03-12 18:50:33 +00:00
|
|
|
<template>
|
|
|
|
|
2018-03-14 18:57:31 +00:00
|
|
|
<div id='CONTAINER' class='list'>
|
2018-03-12 18:50:33 +00:00
|
|
|
|
2018-03-14 18:57:31 +00:00
|
|
|
<div class='list container' data-anim-incoming='1' :data-anim-bounce='gstore.nav_anim.out?1:0'>
|
|
|
|
|
2018-03-18 16:17:31 +00:00
|
|
|
<!-- CREATE -->
|
|
|
|
<section class='cours'
|
|
|
|
data-anim-incoming='1'
|
|
|
|
:data-anim-bounce='gstore.nav_anim.out?1:0'>
|
|
|
|
|
|
|
|
<div class='icon' @click='gstore.ccreate()'></div>
|
|
|
|
<select v-model='gstore.ccrea.prof'>
|
|
|
|
<option value='-1'>Aucun enseignant affecté</option>
|
|
|
|
<option v-for='p in gstore.manage.prof' :value='p.idProfesseur'>{{ `${p.firstName} ${p.lastName}` }}</option>
|
|
|
|
</select>
|
|
|
|
<select v-model='gstore.ccrea.type' class='min'>
|
|
|
|
<option value='-' disabled>Type</option>
|
|
|
|
<option value='0'>Cours</option>
|
|
|
|
<option value='1'>TD</option>
|
|
|
|
<option value='2'>TP</option>
|
|
|
|
</select>
|
|
|
|
<input type='text' placeholder='volume' v-model='gstore.ccrea.vol'>
|
|
|
|
|
|
|
|
<div style='margin-left: 1em;' :class="gstore.ccrea.err.length > 0 ? (gstore.ccrea.valid ? 'warning valid' : 'warning invalid') : ''" :data-valid='gstore.ccrea.valid?1:0'>{{ gstore.ccrea.err }}</div>
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class='filter'></section>
|
|
|
|
|
|
|
|
|
2018-03-14 18:57:31 +00:00
|
|
|
|
|
|
|
<!-- FILTERS -->
|
2018-03-15 12:13:35 +00:00
|
|
|
<section class='filter'>
|
2018-03-14 18:57:31 +00:00
|
|
|
|
|
|
|
<div>enseignant</div>
|
2018-03-16 14:18:57 +00:00
|
|
|
<div class='null'></div>
|
2018-03-14 18:57:31 +00:00
|
|
|
<div>volume horaire</div>
|
|
|
|
<div>formations</div>
|
|
|
|
|
2018-03-15 12:13:35 +00:00
|
|
|
</section>
|
2018-03-12 18:50:33 +00:00
|
|
|
|
2018-03-14 17:56:55 +00:00
|
|
|
<!-- COURS -->
|
2018-03-15 12:41:16 +00:00
|
|
|
<section class='cours'
|
2018-03-15 19:08:27 +00:00
|
|
|
v-for='(c,i) in gstore.manage.cours'
|
2018-03-14 18:57:31 +00:00
|
|
|
:data-id='c.idCours'>
|
2018-03-12 18:50:33 +00:00
|
|
|
|
2018-03-18 16:17:31 +00:00
|
|
|
<div class='icon remove' @click='gstore.rem(0, i)'></div>
|
2018-03-16 14:39:03 +00:00
|
|
|
<select v-model='c.new_prof' @change='gstore.upd_prof(0, i)'>
|
2018-03-16 14:18:57 +00:00
|
|
|
<option value='-1' v-show='c.idProf!=-1'>Aucun enseignant affecté</option>
|
|
|
|
<option v-for='p in gstore.manage.prof' :value='p.idProfesseur' v-show='p.idProfesseur!=c.idProf'>{{ `${p.firstName} ${p.lastName}` }}</option>
|
|
|
|
</select>
|
2018-03-14 18:57:31 +00:00
|
|
|
<div>Cours</div>
|
2018-03-18 15:31:03 +00:00
|
|
|
<div><span class='mono'>{{ c.volume }}</span> heures</div>
|
2018-03-14 18:57:31 +00:00
|
|
|
<div class='taglist'>
|
2018-03-15 14:15:12 +00:00
|
|
|
<div v-for='f in c.formations' data-action>
|
|
|
|
<span class='tag'>{{ gstore.form_by_id(f).labelForm || '???' }}</span>
|
2018-03-16 14:18:57 +00:00
|
|
|
<span data-remove @click='gstore.rem_form(0, i, f)'></span>
|
2018-03-15 14:15:12 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div data-action>
|
2018-03-15 19:08:27 +00:00
|
|
|
<select class='tag' v-model='gstore.manage.cours[i].add_form'>
|
|
|
|
<option value='-' selected disabled>Ajouter</option>
|
2018-03-15 14:15:12 +00:00
|
|
|
<option
|
|
|
|
v-for='f in gstore.formations'
|
|
|
|
v-show='c.formations.indexOf(f.idForm) < 0'
|
|
|
|
:value='f.idForm'>{{ f.labelForm }}</option>
|
|
|
|
</select>
|
2018-03-16 14:28:47 +00:00
|
|
|
<span class='pointer' data-create @click='gstore.add_form(0, i)'></span>
|
2018-03-15 14:15:12 +00:00
|
|
|
</div>
|
2018-03-14 18:57:31 +00:00
|
|
|
</div>
|
2018-03-12 18:50:33 +00:00
|
|
|
|
|
|
|
</section>
|
|
|
|
|
2018-03-14 17:56:55 +00:00
|
|
|
|
|
|
|
<!-- TD -->
|
2018-03-15 12:41:16 +00:00
|
|
|
<section class='td'
|
2018-03-15 19:08:27 +00:00
|
|
|
v-for='(td,i) in gstore.manage.td'
|
2018-03-14 18:57:31 +00:00
|
|
|
:data-id='td.idTD'
|
|
|
|
data-anim-incoming='1'
|
|
|
|
:data-anim-bounce='gstore.nav_anim.out?1:0'>
|
|
|
|
|
2018-03-18 16:17:31 +00:00
|
|
|
<div class='icon remove' @click='gstore.rem(1, i)'></div>
|
2018-03-16 14:39:03 +00:00
|
|
|
<select v-model='td.new_prof' @change='gstore.upd_prof(1, i)'>
|
2018-03-16 14:18:57 +00:00
|
|
|
<option value='-1' v-show='td.idProf!=-1'>Aucun enseignant affecté</option>
|
|
|
|
<option v-for='p in gstore.manage.prof' :value='p.idProfesseur' v-show='p.idProfesseur!=td.idProf'>{{ `${p.firstName} ${p.lastName}` }}</option>
|
|
|
|
</select>
|
2018-03-14 18:57:31 +00:00
|
|
|
<div>TD</div>
|
2018-03-18 15:31:03 +00:00
|
|
|
<div><span class='mono'>{{ td.volume }}</span> heures</div>
|
2018-03-14 18:57:31 +00:00
|
|
|
<div class='taglist'>
|
2018-03-15 14:15:12 +00:00
|
|
|
<div v-for='f in td.formations' data-action>
|
|
|
|
<span class='tag'>{{ gstore.form_by_id(f).labelForm || '???' }}</span>
|
2018-03-16 14:18:57 +00:00
|
|
|
<span data-remove @click='gstore.rem_form(1, i, f)'></span>
|
2018-03-15 14:15:12 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div data-action>
|
2018-03-15 19:08:27 +00:00
|
|
|
<select class='tag'v-model='gstore.manage.td[i].add_form'>
|
|
|
|
<option value='-' selected disabled>Ajouter</option>
|
2018-03-15 14:15:12 +00:00
|
|
|
<option
|
|
|
|
v-for='f in gstore.formations'
|
|
|
|
v-show='td.formations.indexOf(f.idForm) < 0'
|
|
|
|
:value='f.idForm'>{{ f.labelForm }}</option>
|
|
|
|
</select>
|
2018-03-16 14:28:47 +00:00
|
|
|
<span class='pointer' data-create @click='gstore.add_form(1, i)'></span>
|
2018-03-15 14:15:12 +00:00
|
|
|
</div>
|
2018-03-14 18:57:31 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</section>
|
2018-03-14 17:56:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- TP -->
|
2018-03-15 12:41:16 +00:00
|
|
|
<section class='tp'
|
2018-03-15 19:08:27 +00:00
|
|
|
v-for='(tp,i) in gstore.manage.tp'
|
2018-03-14 18:57:31 +00:00
|
|
|
:data-id='tp.idTP'
|
|
|
|
data-anim-incoming='1'
|
|
|
|
:data-anim-bounce='gstore.nav_anim.out?1:0'>
|
2018-03-14 17:56:55 +00:00
|
|
|
|
2018-03-18 16:17:31 +00:00
|
|
|
<div class='icon remove' @click='gstore.rem(2, i)'></div>
|
2018-03-16 14:39:03 +00:00
|
|
|
<select v-model='tp.new_prof' @change='gstore.upd_prof(2, i)'>
|
2018-03-16 14:18:57 +00:00
|
|
|
<option value='-1' v-show='tp.idProf!=-1'>Aucun enseignant affecté</option>
|
|
|
|
<option v-for='p in gstore.manage.prof' :value='p.idProfesseur' v-show='p.idProfesseur!=tp.idProf'>{{ `${p.firstName} ${p.lastName}` }}</option>
|
|
|
|
</select>
|
2018-03-14 18:57:31 +00:00
|
|
|
<div>TP</div>
|
2018-03-18 15:31:03 +00:00
|
|
|
<div><span class='mono'>{{ tp.volume }}</span> heures</div>
|
2018-03-14 18:57:31 +00:00
|
|
|
<div class='taglist'>
|
2018-03-15 14:15:12 +00:00
|
|
|
<div v-for='f in tp.formations' data-action>
|
|
|
|
<span class='tag'>{{ gstore.form_by_id(f).labelForm || '???' }}</span>
|
2018-03-16 14:18:57 +00:00
|
|
|
<span data-remove @click='gstore.rem_form(2, i, f)'></span>
|
2018-03-15 14:15:12 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div data-action>
|
2018-03-15 19:08:27 +00:00
|
|
|
<select class='tag' v-model='gstore.manage.tp[i].add_form'>
|
|
|
|
<option value='-' selected disabled>Ajouter</option>
|
2018-03-15 14:15:12 +00:00
|
|
|
<option
|
|
|
|
v-for='f in gstore.formations'
|
|
|
|
v-show='tp.formations.indexOf(f.idForm) < 0'
|
|
|
|
:value='f.idForm'>{{ f.labelForm }}</option>
|
|
|
|
</select>
|
2018-03-16 14:28:47 +00:00
|
|
|
<span class='pointer' data-create @click='gstore.add_form(2, i)'></span>
|
2018-03-15 14:15:12 +00:00
|
|
|
</div>
|
2018-03-14 18:57:31 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</section>
|
2018-03-18 16:17:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-12 18:50:33 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'CONTAINER_VIEW',
|
|
|
|
data(){
|
|
|
|
return { gstore: gstore.get }
|
2018-03-14 17:56:55 +00:00
|
|
|
},
|
|
|
|
beforeMount(){
|
2018-03-16 14:18:57 +00:00
|
|
|
|
|
|
|
/* (1) Try to load data */
|
|
|
|
gstore.get.load_ue_groups(this.$route.params.code, 3).catch( (err) => { // try at max 3 times (200ms each) for UE to be loaded
|
|
|
|
|
|
|
|
/* (2) On error -> go to 'view' page */
|
|
|
|
gstore.get.router.push('/ue/view/');
|
|
|
|
|
|
|
|
});
|
2018-03-12 18:50:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|