1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 22:54:25 +01:00

Working on the time tracker

This commit is contained in:
Hillel Coren 2017-10-02 12:17:39 +03:00
parent 6fd6cf0ec5
commit 2d2a734ee7

View File

@ -362,6 +362,7 @@
return false; return false;
} }
var project = task.project(); var project = task.project();
console.log(project);
if (self.selectedProject() && self.selectedProject().public_id() == project.public_id()) { if (self.selectedProject() && self.selectedProject().public_id() == project.public_id()) {
self.filter(''); self.filter('');
self.selectedProject(false); self.selectedProject(false);
@ -388,7 +389,6 @@
setTimeout(function() { setTimeout(function() {
$('select#client_id').trigger('change'); $('select#client_id').trigger('change');
}, 1); }, 1);
} else { } else {
task.description(self.filter()); task.description(self.filter());
} }
@ -980,10 +980,15 @@
} }
self.setProject = function(project) { self.setProject = function(project) {
if (! projectMap[project.public_id()]) {
return;
}
self.project(project); self.project(project);
self.project_id(project.public_id()); self.project_id(project.public_id());
var client = projectMap[project.public_id()].client; var project = projectMap[project.public_id()];
var client = project.client;
self.setClient(new ClientModel(client)); self.setClient(new ClientModel(client));
} }