mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 10:44:29 -04:00
Working on time tracker
This commit is contained in:
parent
b98dfa254d
commit
ac44c1ebff
@ -32,10 +32,7 @@
|
|||||||
if (! model.selectedTask() || ! model.formChanged()) {
|
if (! model.selectedTask() || ! model.formChanged()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var task = model.selectedTask();
|
model.selectedTask().save(true);
|
||||||
var data = $('#taskForm').serialize();
|
|
||||||
data += '&time_log=' + JSON.stringify(task.times());
|
|
||||||
task.save(data, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self.onSortChange = function() {
|
self.onSortChange = function() {
|
||||||
@ -490,12 +487,19 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.save = function(data, isSelected) {
|
self.save = function(isSelected) {
|
||||||
if (self.isValid() !== true) {
|
if (self.isValid() !== true) {
|
||||||
toastr.error("{{ trans('texts.error_refresh_page') }}");
|
toastr.error("{{ trans('texts.error_refresh_page') }}");
|
||||||
throw self.isValid();
|
throw self.isValid();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var data = 'client_id=' + self.client_id()
|
||||||
|
+ '&project_id=' + self.project_id()
|
||||||
|
+ '&project_name=' + encodeURIComponent(self.project() ? self.project().name() : '')
|
||||||
|
+ '&description=' + encodeURIComponent(self.description())
|
||||||
|
+ '&time_log=' + JSON.stringify(self.times());
|
||||||
|
|
||||||
var url = '{{ url('/tasks') }}';
|
var url = '{{ url('/tasks') }}';
|
||||||
var method = 'post';
|
var method = 'post';
|
||||||
if (self.public_id()) {
|
if (self.public_id()) {
|
||||||
@ -702,7 +706,7 @@
|
|||||||
model.onSaveClick();
|
model.onSaveClick();
|
||||||
} else {
|
} else {
|
||||||
model.isStartEnabled(false);
|
model.isStartEnabled(false);
|
||||||
self.save('time_log=' + JSON.stringify(self.times()));
|
self.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user