55 lines
1.6 KiB
JavaScript
55 lines
1.6 KiB
JavaScript
/**
|
|
* Created by Pensare Software.
|
|
* External: Theo Weijmer
|
|
* Date: 25/12/2017
|
|
* Time: 09:50
|
|
*/
|
|
|
|
dbo.externalDataService = {
|
|
|
|
getAllExternals: function ( archive = 'F', callback ) {
|
|
$.getJSON( 'index.php/beheer/externalsController/getAllExternals/' + archive )
|
|
.done( function ( data ) {
|
|
callback( data );
|
|
} );
|
|
},
|
|
|
|
getExternal: function ( userID, callback ) {
|
|
$.getJSON( 'index.php/beheer/externalsController/getExternal/' + userID )
|
|
.done( function ( data ) {
|
|
callback( data );
|
|
} );
|
|
},
|
|
|
|
checkExternalname: function ( username, callback ) {
|
|
$.post( 'index.php/beheer/userController/checkExternalname', 'json' )
|
|
.done( function ( data ) {
|
|
console.log( data );
|
|
callback( data );
|
|
} );
|
|
},
|
|
|
|
saveExternal: function ( submitDATA, callback ) {
|
|
$.post( 'index.php/beheer/externalsController/saveExternal', submitDATA, function () {
|
|
}, 'json' )
|
|
.done( function ( data ) {
|
|
callback( data );
|
|
} );
|
|
},
|
|
|
|
archiveExternal: function(userID, status, callback){
|
|
$.get('index.php/beheer/externalsController/archiveExternal/' + userID + '/' + status)
|
|
.done(function(){
|
|
callback();
|
|
});
|
|
},
|
|
|
|
removeExternal: function ( userID, callback ) {
|
|
$.getJSON( 'index.php/beheer/externalsController/removeExternal/' + userID )
|
|
.done( function ( data ) {
|
|
callback( data );
|
|
} );
|
|
}
|
|
|
|
|
|
} |