diversen opmerkingen Peter

This commit is contained in:
2018-04-02 17:32:20 +02:00
parent 0fd25f359b
commit 1b0ad5de83
5 changed files with 79 additions and 29 deletions
+9 -5
View File
@@ -23,19 +23,23 @@ $( function () {
other_revenue : ko.observable(),
hasProject : ko.observable(),
init: function () {
init: function ( callback = false ) {
dbo.editOfferModal.refreshCustomers();
dbo.editOfferModal.refreshUsers();
if ( typeof(callback) == 'function' ) callback();
},
newEditOffer: function ( offer, projectID = false, customerID = false, hasProject = false, callback ) {
var vm = dbo.editOfferModal;
vm.callback = typeof(callback) == 'function' ? callback : null;
vm.showOfferModal();
vm.init( function () {
vm.showOfferModal();
vm.setOffer( offer, projectID, customerID, hasProject );
vm.setOffer( offer, projectID, customerID, hasProject );
} );
},
getCustomerProjects: function () {
@@ -77,7 +81,7 @@ $( function () {
title : 'project aangemaakt',
message : 'er is een project aangemaakt met nummer: ' + data.projectnumber,
modalClass: 'modal-success'
}, function(){
}, function () {
vm.hideOfferModal();
vm.callback();
} );
@@ -104,7 +108,7 @@ $( function () {
message : errorMessage,
modalClass: 'modal-danger'
} );
}else{
} else {
vm.hideOfferModal();
vm.callback();
}