[webpack.teacher.view] instant-edit now updates the 'category label' from 'gstore.get.filters.categories' if possible
This commit is contained in:
parent
d9a6320d44
commit
24dcbcc7ba
|
@ -590,7 +590,16 @@ gstore.add('ie_handler', function(prof_i){
|
||||||
gstore.get.professors[prof_i].casLogin = cas;
|
gstore.get.professors[prof_i].casLogin = cas;
|
||||||
gstore.get.professors[prof_i].hoursToDo = hour;
|
gstore.get.professors[prof_i].hoursToDo = hour;
|
||||||
|
|
||||||
/* (5.9.2) Remove edit mode */
|
/* (5.9.2) Try to set the category label */
|
||||||
|
var ci = gstore.get.filters.categories.map( (data, i) => { return ( data.code && data.code == cat ) ? i : ''; }).join('');
|
||||||
|
|
||||||
|
/* (5.9.3) Exit if not found */
|
||||||
|
if( isNaN(ci) ) return gstore.add('edit_i', -1);
|
||||||
|
|
||||||
|
/* (5.9.4) If found -> set category label */
|
||||||
|
gstore.get.professors[prof_i].categorie = gstore.get.filters.categories[ci].name;
|
||||||
|
|
||||||
|
/* (5.9.5) Remove edit mode */
|
||||||
gstore.add('edit_i', -1);
|
gstore.add('edit_i', -1);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue