[webpack.ue.view][webpack.ue.manage] created sub-page of 'ue.view': 'ue.manage' which takes a 'code' as URI argument + $router commands

This commit is contained in:
xdrm-brackets 2018-03-12 19:50:33 +01:00
parent 87a069ca84
commit 1a956cbc58
3 changed files with 94 additions and 2 deletions

View File

@ -0,0 +1,81 @@
<template>
<div id='CONTAINER' class='card'>
<div class='card filter'>
<div v-for='(filter_grp, gname) in gstore.filters' :title='gname'>
<div class='fold-toggle' :data-show='gstore.filters[gname][0].visible?1:0' @click='gstore.show_fgroup(gname)' :data-count='gstore.filters[gname][0].active.length'>{{ gname }}</div>
<div class='fold'>
<span v-for='(data, i) in filter_grp' v-if='i > 0' :class="data.active == true ? 'active' : ''" @click='gstore.toggle_filter(gname, i); gstore.filter_handler(gname);' :title='data.code'>{{ data.name }}</span>
</div>
</div>
</div>
<div class='card container'>
<input class='card instant-search neutral' type='text' @keyup='gstore.is_handler($event)' placeholder='Recherche instantannée' id='teacher_view_instant_search'>
<button class='card toggle valid' :data-active='gstore.create_card?1:0' @click='gstore.create_card=!gstore.create_card' title='Créer un enseignant'>+</button>
<section class='valid' data-create='' v-show='gstore.create_card'>
<select class='category' v-model='gstore.create_cat'>
<option selected='selected' disabled='disabled' value='-'>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' v-model='gstore.create_name'>
<span data-visible='1'>(<input type='text' placeholder='identifiant' v-model='gstore.create_cas'>)</span>
</h1>
<div class='table'>
<div>
<span><input type='text' placeholder='???' v-model='gstore.create_h'></span>
<span>heures à faire</span>
</div>
</div>
<div :class="gstore.create_err.length > 0 ? 'sub warning' : 'sub'" :data-valid='gstore.create_err_valid?1:0'>{{ gstore.create_err }}</div>
<div class='footer'>
<button class='valid' @click='gstore.ic_handler()'>Créer l'enseignant</button>
</div>
</section>
<section>
<h1 >{{ $route.params.code }}</h1>
<div class='footer'>
<button class='neutral' @click='$router.push(`/ue/view`)'>Retour</button>
</div>
</section>
</div>
</div>
</template>
<script>
export default {
name: 'CONTAINER_VIEW',
data(){
return { gstore: gstore.get }
}
}
</script>

View File

@ -96,11 +96,17 @@
</div>
<!-- if VIEW MODE -->
<div class='footer' v-show='gstore.edit_i!=pi'>
<button class='neutral' @click='gstore.nav_in($router, pi)'>Configurer</button>
</div>
<!-- if EDIT MODE -->
<div class='footer' v-show='gstore.edit_i==pi'>
<button v-show='gstore.edit_i==pi' class='search' @click='gstore.ie_handler(pi)'>Modifier l'UE</button>
<button v-show='gstore.edit_i==pi' class='grey' @click='gstore.ie_toggle(-1)'>Annuler</button>
<button class='search' @click='gstore.ie_handler(pi)'>Modifier l'UE</button>
<button class='grey' @click='gstore.ie_toggle(-1)'>Annuler</button>
</div>
<!-- endif -->
</section>

View File

@ -1,8 +1,13 @@
export default{ 0: [
{
name: 'view',
path: '/ue/view/',
component: require('../component/ue/view.vue').default
}, {
name: 'manage',
path: '/ue/manage/:code',
component: require('../component/ue/manage.vue').default
}, {
path: '*',
redirect: '/ue/view/'