diversen nav opmerkingen
This commit is contained in:
@@ -21,6 +21,7 @@ $( function () {
|
||||
offerleader_id : ko.observable(),
|
||||
own_revenue : ko.observable(),
|
||||
other_revenue : ko.observable(),
|
||||
costs : ko.observable(),
|
||||
hasProject : ko.observable(),
|
||||
|
||||
init: function () {
|
||||
@@ -54,6 +55,7 @@ $( function () {
|
||||
offernumber : vm.offernumber(),
|
||||
own_revenue : vm.own_revenue(),
|
||||
other_revenue : vm.other_revenue(),
|
||||
costs : vm.costs(),
|
||||
startdate : vm.startdate(),
|
||||
acceptance_chance: vm.acceptance_chance(),
|
||||
accepteddate : vm.accepteddate(),
|
||||
@@ -64,7 +66,7 @@ $( function () {
|
||||
if ( data.createProject ) {
|
||||
tellMe( {
|
||||
title : 'project aanmaken',
|
||||
message : 'De offerte is goedgekeurt maar nog niet gekoppeld aan een project, wilt u een project aanmaken?',
|
||||
message : 'De offerte is goedgekeurd maar nog niet gekoppeld aan een project, wilt u een project aanmaken?',
|
||||
notify : true,
|
||||
noText : 'Nee, maak geen project aan',
|
||||
yesText : 'Ja, maak een project aan',
|
||||
@@ -77,7 +79,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 +106,7 @@ $( function () {
|
||||
message : errorMessage,
|
||||
modalClass: 'modal-danger'
|
||||
} );
|
||||
}else{
|
||||
} else {
|
||||
vm.hideOfferModal();
|
||||
vm.callback();
|
||||
}
|
||||
@@ -132,7 +134,8 @@ $( function () {
|
||||
vm.accepteddate( offer.accepteddate || null );
|
||||
vm.rejectdate( offer.rejectdate || null );
|
||||
vm.own_revenue( offer.own_revenue || 0 );
|
||||
vm.other_revenue( offer.other_revenue || 0 )
|
||||
vm.other_revenue( offer.other_revenue || 0 );
|
||||
vm.costs( offer.costs || 0 );
|
||||
},
|
||||
|
||||
showOfferModal: function () {
|
||||
|
||||
@@ -41,6 +41,9 @@ $( function () {
|
||||
projectname : ko.observable(),
|
||||
years : ko.observableArray( dbo.years ),
|
||||
months : ko.observableArray( dbo.monthArray ),
|
||||
outstanding : ko.observable(),
|
||||
toForecast : ko.observable(),
|
||||
totalForecast : ko.observable(),
|
||||
|
||||
init: function () {
|
||||
var vm = dbo.editProjectModal;
|
||||
@@ -700,14 +703,15 @@ $( function () {
|
||||
vm.enddate( dbo.helpers.mysql2date( data.enddate ) );
|
||||
vm.projectnumber( data.projectnumber );
|
||||
vm.projectname( data.projectname );
|
||||
vm.outstanding( data.outstanding );
|
||||
|
||||
vm.projectEmployees.removeAll();
|
||||
vm.projecthours.removeAll();
|
||||
$.each( data.projectemployees, function ( i, p ) {
|
||||
_.each( data.projectemployees, function ( p ) {
|
||||
vm.projectEmployees.push( new vm.Projectemployee( p ) );
|
||||
} );
|
||||
|
||||
$.each( data.projectemployees, function ( i, p ) {
|
||||
_.each( data.projectemployees, function ( p ) {
|
||||
var fullname = p.user ? p.user.fullname : '#NB';
|
||||
$.each( p.projecthours, function ( b, q ) {
|
||||
vm.projecthours.push( new vm.Projecthour( q, fullname ) );
|
||||
@@ -715,12 +719,12 @@ $( function () {
|
||||
} );
|
||||
|
||||
vm.projectcosts.removeAll();
|
||||
$.each( data.projectcosts, function ( i, p ) {
|
||||
_.each( data.projectcosts, function ( p ) {
|
||||
vm.projectcosts.push( new vm.Projectcost( p ) );
|
||||
} );
|
||||
|
||||
vm.offers.removeAll();
|
||||
$.each( data.offers, function ( i, p ) {
|
||||
_.each( data.offers, function ( p, i ) {
|
||||
if ( i == 0 ) {
|
||||
vm.ownRevenue( p.own_revenue );
|
||||
vm.otherRevenue( p.other_revenue );
|
||||
@@ -729,17 +733,17 @@ $( function () {
|
||||
} );
|
||||
|
||||
vm.invoices.removeAll();
|
||||
$.each( data.invoices, function ( i, p ) {
|
||||
_.each( data.invoices, function ( p ) {
|
||||
vm.invoices.push( new vm.Invoice( p ) );
|
||||
} );
|
||||
|
||||
vm.forecasts.removeAll();
|
||||
$.each( data.forecasts, function ( i, p ) {
|
||||
_.each( data.forecasts, function ( p ) {
|
||||
vm.forecasts.push( new vm.Forecast( p ) );
|
||||
} );
|
||||
|
||||
vm.reservations.removeAll();
|
||||
$.each( data.reservations, function ( i, p ) {
|
||||
_.each( data.reservations, function ( p ) {
|
||||
vm.reservations.push( new vm.Reservation( p ) );
|
||||
} );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user