ptut-vhost/webpack/component/teacher/view.vue

99 lines
2.9 KiB
Vue
Raw Normal View History

2018-03-01 17:26:07 +00:00
<template>
<div id='CONTAINER'>
<input class='card instant-search neutral' type='text' @keyup='gstore.is_handler($event)' placeholder='Recherche instantannée' id='teacher_view_instant_search'>
<div class='card container'>
<section class='valid' data-create=''>
<select class='category'>
<option selected='selected' disabled='disabled'>Catégorie d'enseignant</option>
<option v-for='cat in gstore.categories' :value='cat.idCategorie'>{{ cat.labelCategorie }}</option>
</select>
<h1>
<input type='text' placeholder='Prénom Nom' value=''>
</h1>
<div class='table'>
<div>
<span><input type='text' placeholder='???' value=''></span>
<span>heures à faire</span>
</div>
</div>
<div class='sub'>&nbsp;</div>
<div class='footer'>
<button class='valid'>Créer l'enseignant</button>
</div>
</section>
<section v-if='gstore.professors.length <= 0'>Aucun enseignant trouvé</section>
<section v-for='prof in gstore.professors'
:data-id='prof.idProfesseur'
:data-category='prof.idCat'
:data-lname='prof.lastName'
:data-fname='prof.firstName'>
<div class='remove' :data-remove='prof.idProfesseur' @click="gstore.ir_handler($event.currentTarget.getAttribute('data-remove'))"></div>
<div class='edit' :data-edit='prof.idProfesseur' @click="gstore.ie_handler($event.currentTarget.getAttribute('data-edit'))"></div>
<span class='category'>{{ prof.categorie }}</span>
2018-03-06 15:37:27 +00:00
<h1 :class="prof.hoursToDo > prof.equiTD ? 'warning' : ''">{{ prof.firstName }} {{ prof.lastName }}</h1>
<div class='table'>
<div>
<span>{{prof.hoursToDo}}</span>
<span>heures à faire</span>
</div>
<div>
<span>{{ prof.equiTD }}</span>
<span>heures prévues</span>
</div>
</div>
<div class='sub'><strong>{{ prof.VHCours + prof.VHTd + prof.VHTp }}h</strong> physiques prévues</div>
<div class='footer'>
<span :class="(prof.VHCours == 0) ? 'course' : 'course active'">{{ prof.VHCours }}h <span>Cours</span></span><hr>
<span :class="(prof.VHTd == 0) ? 'td' : 'td active'">{{ prof.VHTd }}h <span>TD</span></span><hr>
<span :class="(prof.VHTp == 0) ? 'tp' : 'tp active'">{{ prof.VHTp }}h <span>TP</span></span>
</div>
</section>
</div>
<div class='card filter'>
<div v-for='(filter_grp, gname) in gstore.filters' :title='gname'>
<div class='fold' :data-show='gstore.filters[gname][0].visible ? 1 : 0' @click='gstore.filters[gname][0].visible = !gstore.filters[gname][0].visible'>{{ gname }}</div>
<span v-for='(data, i) in filter_grp' v-if='i > 0' :class="data.active == true ? 'active' : ''" @click='data.active = !data.active; gstore.filter_handler();' :title='data.code'>{{ data.name }}</span>
</div>
</div>
2018-03-01 17:26:07 +00:00
</div>
</template>
<script>
export default {
name: 'CONTAINER_VIEW',
data(){
return { gstore: gstore.get }
}
}
</script>