1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-18 23:42:25 +02:00

Working on time tracker

This commit is contained in:
Hillel Coren 2017-09-25 12:22:19 +03:00
parent a5c25eee43
commit c33d216a11
5 changed files with 35 additions and 8 deletions

View File

@ -151,10 +151,9 @@ elixir(function(mix) {
bowerDir + '/spectrum/spectrum.js',
bowerDir + '/moment/moment.js',
bowerDir + '/moment-timezone/builds/moment-timezone-with-data.js',
//bowerDir + '/stacktrace-js/dist/stacktrace-with-polyfills.min.js',
bowerDir + '/stacktrace-js/stacktrace.js',
bowerDir + '/es6-promise/es6-promise.auto.js',
bowerDir + '/sweetalert2/dist/sweetalert2.js',
//bowerDir + '/sweetalert/dist/sweetalert-dev.js',
bowerDir + '/nouislider/distribute/nouislider.js',
bowerDir + '/mousetrap/mousetrap.js',
bowerDir + '/toastr/toastr.js',

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -81,7 +81,10 @@
}
trackEvent('/error', errorMsg);
} catch (err) {}
} catch (exception) {
console.log('Failed to log error');
console.log(exception);
}
return false;
}

View File

@ -363,7 +363,32 @@
]
}
self.isValid = function() {
var client = self.client();
var project = self.project();
if (client && client.public_id() != self.client_id()) {
return "Client id's don't match " + client.public_id() + " " + self.client_id();
}
if (project) {
if (project.public_id() != self.project_id()) {
return "Project id's don't match " + project.public_id() + " " + self.project_id();
}
var client = projectMap[project.public_id()].client;
if (client.public_id != self.client_id()) {
return "Client and project id's don't match " + client.public_id + " " + self.client_id();
}
}
return true;
}
self.save = function(data, isSelected) {
if (! self.isValid()) {
toastr.error("{{ trans('texts.error_refresh_page') }}");
return;
}
var url = '{{ url('/tasks') }}';
var method = 'post';
if (self.public_id()) {