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:36:23 +00:00
|
|
|
|
2018-04-17 15:38:32 +00:00
|
|
|
<section class='filter'>
|
|
|
|
<button class='back reflow search' @click='$router.back()'>Retour</button>
|
|
|
|
</section>
|
|
|
|
|
2018-03-18 16:36:23 +00:00
|
|
|
<!-- FILTERS -->
|
|
|
|
<section class='filter'>
|
2018-04-17 16:13:57 +00:00
|
|
|
<div style='flex-basis: 3.2em'></div>
|
2018-04-17 15:38:32 +00:00
|
|
|
<div data-filter='1'>enseignant <span class='arrow' data-way='down'></span></div>
|
|
|
|
<div data-filter='0'>volume horaire <span class='arrow' data-way='down'></span></div>
|
|
|
|
<div data-filter='0'>formations <span class='arrow' data-way='down'></span></div>
|
2018-03-18 16:36:23 +00:00
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-18 16:17:31 +00:00
|
|
|
<!-- CREATE -->
|
2018-03-18 16:36:23 +00:00
|
|
|
<section class='create'
|
2018-03-18 16:17:31 +00:00
|
|
|
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>
|
2018-04-17 16:13:57 +00:00
|
|
|
<option value='0'>CM</option>
|
2018-03-18 16:17:31 +00:00
|
|
|
<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>
|
|
|
|
|
|
|
|
|
2018-03-18 16:36:23 +00:00
|
|
|
<section class='filter'></section>
|
2018-03-14 18:57:31 +00:00
|
|
|
|
|
|
|
|
2018-03-12 18:50:33 +00:00
|
|
|
|
2018-03-14 17:56:55 +00:00
|
|
|
<!-- COURS -->
|
2018-03-29 19:21:37 +00:00
|
|
|
<section class='bcours'
|
2018-03-15 19:08:27 +00:00
|
|
|
v-for='(c,i) in gstore.manage.cours'
|
2018-04-17 15:38:32 +00:00
|
|
|
:data-id='c.idCours'
|
|
|
|
data-anim-incoming='1'
|
|
|
|
:data-anim-bounce='gstore.nav_anim.out?1:0'
|
|
|
|
|
|
|
|
:data-vol='c.volume'
|
|
|
|
:data-form='c.formations.join(`|`)'
|
|
|
|
data-typ='cm'>
|
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-04-17 16:13:57 +00:00
|
|
|
<div class='cm reflow active'>{{ c.volume }}</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-29 19:21:37 +00:00
|
|
|
<section class='btd'
|
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'
|
2018-04-17 15:38:32 +00:00
|
|
|
:data-anim-bounce='gstore.nav_anim.out?1:0'
|
|
|
|
|
|
|
|
:data-vol='td.volume'
|
|
|
|
:data-form='td.formations.join(`|`)'
|
|
|
|
data-typ='td'>
|
2018-03-14 18:57:31 +00:00
|
|
|
|
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-04-17 16:13:57 +00:00
|
|
|
<div class='td reflow active'>{{ td.volume }}</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-29 19:21:37 +00:00
|
|
|
<section class='btp'
|
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'
|
2018-04-17 15:38:32 +00:00
|
|
|
:data-anim-bounce='gstore.nav_anim.out?1:0'
|
|
|
|
|
|
|
|
:data-vol='tp.volume'
|
|
|
|
:data-form='tp.formations.join(`|`)'
|
|
|
|
data-typ='td'>
|
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-04-17 16:13:57 +00:00
|
|
|
<div class='tp reflow active'>{{ tp.volume }}</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>
|