[webpack.teacher.view] CREATE feedback (green msg)
This commit is contained in:
parent
e818886972
commit
f544959e76
|
@ -24,7 +24,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div :class="gstore.create_err.length > 0 ? 'sub warning' : 'sub'">{{ gstore.create_err }}</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'>
|
<div class='footer'>
|
||||||
<button class='valid' @click='gstore.ic_handler()'>Créer l'enseignant</button>
|
<button class='valid' @click='gstore.ic_handler()'>Créer l'enseignant</button>
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
<div class='remove' :data-remove='prof.idProfesseur' @click="gstore.ir_handler($event.currentTarget.getAttribute('data-remove'))"></div>
|
<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>
|
<div class='edit' :data-edit='prof.idProfesseur' @click="gstore.ie_handler($event.currentTarget.getAttribute('data-edit'))"></div>
|
||||||
<div class='admin' :data-admin='prof.idProfesseur' :data-active='prof.admin' @click="gstore.ia_handler($event.currentTarget.getAttribute('data-admin'))"></div>
|
<div class='admin' :data-admin='prof.idProfesseur' :data-active='prof.admin?1:0' @click="gstore.ia_handler($event.currentTarget.getAttribute('data-admin'))"></div>
|
||||||
|
|
||||||
<span class='category'>{{ prof.categorie }}</span>
|
<span class='category'>{{ prof.categorie }}</span>
|
||||||
<h1 :class="prof.hoursToDo > prof.equiTD ? 'warning' : ''">{{ prof.firstName }} {{ prof.lastName }} <span :data-visible='prof.casLogin.length'>{{ prof.casLogin }}</span></h1>
|
<h1 :class="prof.hoursToDo > prof.equiTD ? 'warning' : ''">{{ prof.firstName }} {{ prof.lastName }} <span :data-visible='prof.casLogin.length'>{{ prof.casLogin }}</span></h1>
|
||||||
|
|
|
@ -216,6 +216,7 @@ gstore.add('create_cas', '');
|
||||||
gstore.add('create_h', '');
|
gstore.add('create_h', '');
|
||||||
|
|
||||||
/* (2) Initialize error message */
|
/* (2) Initialize error message */
|
||||||
|
gstore.add('create_err_valid', false);
|
||||||
gstore.add('create_err', '');
|
gstore.add('create_err', '');
|
||||||
|
|
||||||
/* (3) Define create handler */
|
/* (3) Define create handler */
|
||||||
|
@ -265,10 +266,10 @@ gstore.add('ic_handler', function(prof_id){
|
||||||
|
|
||||||
/* (4.1) Création de la requête */
|
/* (4.1) Création de la requête */
|
||||||
var rq = {
|
var rq = {
|
||||||
firstName: name[1],
|
firstName: name[0],
|
||||||
lastName: name[0],
|
lastName: name[1],
|
||||||
category: cat,
|
category: cat,
|
||||||
initials: name[1].substr(0,2)+name[0].substr(0,2),
|
initials: name[0].substr(0,2)+name[1].substr(0,2),
|
||||||
hoursToDo: hour,
|
hoursToDo: hour,
|
||||||
isAdmin: false
|
isAdmin: false
|
||||||
};
|
};
|
||||||
|
@ -295,7 +296,20 @@ gstore.add('ic_handler', function(prof_id){
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (4.2.3) Show that user is created */
|
/* (4.2.3) Show that user is created */
|
||||||
console.log('Create')
|
// display all is ok
|
||||||
|
gstore.add('create_err_valid', true);
|
||||||
|
gstore.add('create_err', 'L\'enseignant a été créé, il s\'affichera au prochain rechargement');
|
||||||
|
|
||||||
|
// empty fields
|
||||||
|
gstore.get.create_cat = '-';
|
||||||
|
gstore.get.create_name = '';
|
||||||
|
gstore.get.create_cas = '';
|
||||||
|
gstore.get.create_h = '';
|
||||||
|
|
||||||
|
return setTimeout(() => {
|
||||||
|
gstore.add('create_err', '');
|
||||||
|
gstore.add('create_err_valid', false);
|
||||||
|
}, 2000);
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -549,6 +549,10 @@
|
||||||
background-image: url('/asset/svg/warning_radio.svg@#{$rd-form-invalid-color}');
|
background-image: url('/asset/svg/warning_radio.svg@#{$rd-form-invalid-color}');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&[data-valid='1']{
|
||||||
|
color: $form-valid-color;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue