Merge branch 'master' of bitbucket.org:pensare/dbois

# Conflicts:
#	application/controllers/projects/EmployeeHoursController.php
#	application/views/pages/employeehours_view.php
#	public/js/lib/modules/projects/employeehoursModule.js
This commit is contained in:
2018-04-02 17:34:19 +02:00
15 changed files with 137 additions and 69 deletions
+5 -2
View File
@@ -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 ( callback = false ) {
@@ -58,6 +59,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(),
@@ -68,7 +70,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',
@@ -136,7 +138,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 () {
+11 -7
View File
@@ -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 ) );
} );