Merge branch 'fouten/koppelengebruikers' into develop
# Conflicts: # application/core/MY_Controller.php
This commit is contained in:
@@ -76,8 +76,9 @@ class MY_Controller extends CI_Controller{
|
|||||||
// public $version = '1.18.00';// alle instrumenten in het compact sop
|
// public $version = '1.18.00';// alle instrumenten in het compact sop
|
||||||
// public $version = '1.18.02';// fout in resultaatmatrix
|
// public $version = '1.18.02';// fout in resultaatmatrix
|
||||||
// public $version = '1.18.04';// invul status
|
// public $version = '1.18.04';// invul status
|
||||||
// public $version = '1.18.05';// drag and drop
|
// public $version = '1.18.05';// fout schoolgegevens compactsop
|
||||||
public $version = '1.18.06';// drag and drop zichtbaar na switchen
|
// public $version = '1.18.08';// kleurenfout
|
||||||
|
public $version = '1.18.09';// zoek gebruikers sneller
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -89,15 +89,34 @@ class Users_model extends MY_Model{
|
|||||||
ORDER BY U.achternaam";
|
ORDER BY U.achternaam";
|
||||||
return $this->get_query_result();
|
return $this->get_query_result();
|
||||||
}
|
}
|
||||||
function otherusers($orgid, $orgids){
|
// function otherusers($orgid, $orgids){
|
||||||
$this->sql="SELECT DISTINCT(U.id), concat_ws(' ',voornaam, tussenvoegsel, achternaam) AS fullname
|
// $this->sql="SELECT DISTINCT(U.id), concat_ws(' ',voornaam, tussenvoegsel, achternaam) AS fullname
|
||||||
FROM tb_users U
|
// FROM tb_users U
|
||||||
JOIN tb_orgusers OU ON OU.user_id= U.id
|
// JOIN tb_orgusers OU ON OU.user_id= U.id
|
||||||
WHERE (SELECT count(id) FROM tb_orgusers WHERE user_id = U.id AND organisatie_id = {$orgid}) = 0
|
// WHERE (SELECT count(id) FROM tb_orgusers WHERE user_id = U.id AND organisatie_id = {$orgid})
|
||||||
AND (OU.organisatie_id IN ({$orgids}) )
|
// AND (OU.organisatie_id IN ({$orgids}) )
|
||||||
ORDER BY achternaam";
|
// ORDER BY achternaam";
|
||||||
return $this->get_query_result();
|
// return $this->get_query_result();
|
||||||
}
|
// }
|
||||||
|
function otherusers($orgid, $orgids){
|
||||||
|
$this->sql="SELECT DISTINCT(U.id), concat_ws(' ',voornaam, tussenvoegsel, achternaam) AS fullname
|
||||||
|
FROM tb_users U
|
||||||
|
JOIN tb_orgusers OU ON OU.user_id= U.id
|
||||||
|
WHERE OU.organisatie_id IN ({$orgids})
|
||||||
|
AND U.actief = 1
|
||||||
|
AND U.voornaam <> ''
|
||||||
|
AND U.achternaam <> ''
|
||||||
|
AND OU.user_id NOT IN (
|
||||||
|
SELECT OU2.user_id
|
||||||
|
FROM tb_orgusers OU2
|
||||||
|
WHERE OU2.organisatie_id = {$orgid}
|
||||||
|
)
|
||||||
|
GROUP BY U.id
|
||||||
|
ORDER BY achternaam ";
|
||||||
|
return $this->get_query_result();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function get_users_by_organisatie($orgid){
|
function get_users_by_organisatie($orgid){
|
||||||
// uit partituur users
|
// uit partituur users
|
||||||
$this->sql = "SELECT U.id, U.gnaam as user_name, concat_ws(' ', voornaam, tussenvoegsel, achternaam) as fullname
|
$this->sql = "SELECT U.id, U.gnaam as user_name, concat_ws(' ', voornaam, tussenvoegsel, achternaam) as fullname
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
$(function(){
|
$(function(){
|
||||||
|
|
||||||
ls.initGebruikersModel = function(){
|
ls.initGebruikersModel = function(){
|
||||||
|
var timer;
|
||||||
|
|
||||||
function fAddOrgs(p){
|
function fAddOrgs(p){
|
||||||
var dit =this;
|
var dit =this;
|
||||||
@@ -91,7 +92,7 @@ ls.initGebruikersModel = function(){
|
|||||||
|
|
||||||
}
|
}
|
||||||
function fAddOtherUser(p){
|
function fAddOtherUser(p){
|
||||||
this.id = p.id ; //userid
|
this.id = p.id ; //userid
|
||||||
this.fullname = p.fullname;
|
this.fullname = p.fullname;
|
||||||
this.autorisatienivoid = ko.observable(10);
|
this.autorisatienivoid = ko.observable(10);
|
||||||
}
|
}
|
||||||
@@ -342,18 +343,41 @@ ls.initGebruikersModel = function(){
|
|||||||
self.selectedOrg(this);
|
self.selectedOrg(this);
|
||||||
self.fGetGebruikers();
|
self.fGetGebruikers();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
fPopCopy : function(){
|
fPopCopy : function(){
|
||||||
var self= ls.GebruikersModel;
|
var self= ls.GebruikersModel;
|
||||||
$.post("index.php/shared/users/getotherusers/" + self.selectedOrg().id, function(data){
|
showAjaxLoader();
|
||||||
|
self.fGetOtherUsers(function(){self.fOpenPopUp()})
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
fGetOtherUsers: function(callback){
|
||||||
|
var self= ls.GebruikersModel;
|
||||||
|
|
||||||
|
$.post("index.php/shared/users/getotherusers/" + self.selectedOrg().id, function (data) {
|
||||||
self.otherUsers.removeAll();
|
self.otherUsers.removeAll();
|
||||||
if (data){
|
if (data) {
|
||||||
$.each(data, function(i,p){
|
$.each(data, function (i, p) {
|
||||||
self.otherUsers.push(new fAddOtherUser(p));
|
self.otherUsers.push(new fAddOtherUser(p));
|
||||||
}); // each
|
}); // each
|
||||||
}
|
}
|
||||||
},'json');
|
|
||||||
$("#modCopyUser").modal('show');
|
if (typeof callback == "function") callback()
|
||||||
|
hideAjaxLoader();
|
||||||
|
}, 'json');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
fOpenPopUp: function(){
|
||||||
|
var self= ls.GebruikersModel;
|
||||||
|
$("#modCopyUser").modal('show');
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
fSaveCopyUser :function(){
|
fSaveCopyUser :function(){
|
||||||
var self= ls.GebruikersModel;
|
var self= ls.GebruikersModel;
|
||||||
var submitData={ userid : self.copyUser().id,
|
var submitData={ userid : self.copyUser().id,
|
||||||
|
|||||||
Reference in New Issue
Block a user