mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Working on time tracker
This commit is contained in:
parent
adcf25ee87
commit
331a8ad0a2
@ -243,7 +243,7 @@ class TaskController extends BaseController
|
||||
}
|
||||
|
||||
if (request()->wantsJson()) {
|
||||
return $task->toJson();
|
||||
return $task->load(['client.contacts', 'project'])->toJson();
|
||||
} else {
|
||||
return Redirect::to("tasks/{$task->public_id}/edit");
|
||||
}
|
||||
|
@ -655,7 +655,7 @@ $LANG = array(
|
||||
'created_by_invoice' => 'Created by :invoice',
|
||||
'primary_user' => 'Primary User',
|
||||
'help' => 'Help',
|
||||
'customize_help' => '<p>We use <a href="http://pdfmake.org/" target="_blank">pdfmake</a> to define the invoice designs declaratively. The pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> provide\'s a great way to see the library in action.</p>
|
||||
'customize_help' => '<p>We use <a href="http://pdfmake.org/" target="_blank">pdfmake</a> to define the invoice designs declaratively. The pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> provides a great way to see the library in action.</p>
|
||||
<p>You can access a child property using dot notation. For example to show the client name you could use <code>$client.name</code>.</p>
|
||||
<p>If you need help figuring something out post a question to our <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">support forum</a> with the design you\'re using.</p>',
|
||||
'invoice_due_date' => 'Due Date',
|
||||
|
@ -233,16 +233,13 @@
|
||||
},
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
//var task = new TaskModel(response);
|
||||
var task = self.selectedTask();
|
||||
//self.selectTask(task);
|
||||
if (task.isNew()) {
|
||||
self.addTask(task);
|
||||
} else {
|
||||
//self.removeTask(task.original);
|
||||
//self.addTask(task);
|
||||
}
|
||||
task.update(response);
|
||||
self.formChanged(false);
|
||||
//self.selectTask(task);
|
||||
},
|
||||
});
|
||||
}
|
||||
@ -254,10 +251,7 @@
|
||||
self.selectedTask(false);
|
||||
$('.search').focus();
|
||||
} else {
|
||||
//console.log(task.data.client)
|
||||
//console.log('before: ' + task.client_id());
|
||||
task.update(task.data);
|
||||
//console.log('after: ' + task.client_id());
|
||||
}
|
||||
self.formChanged(false);
|
||||
});
|
||||
@ -399,8 +393,6 @@
|
||||
}
|
||||
|
||||
self.removeTask = function(task) {
|
||||
console.log('remove:');
|
||||
console.log(task);
|
||||
self.tasks.remove(task);
|
||||
}
|
||||
|
||||
@ -442,20 +434,24 @@
|
||||
'client': {
|
||||
update: function(data) {
|
||||
if (! data.data) {
|
||||
self.client_id(0);
|
||||
return false;
|
||||
};
|
||||
} else {
|
||||
self.client_id(data.data.public_id);
|
||||
return new ClientModel(data.data);
|
||||
}
|
||||
}
|
||||
},
|
||||
'project': {
|
||||
update: function(data) {
|
||||
if (! data.data) {
|
||||
self.project_id(0);
|
||||
return false;
|
||||
};
|
||||
} else {
|
||||
self.project_id(data.data.public_id);
|
||||
return data.data ? new ProjectModel(data.data) : null;
|
||||
return new ProjectModel(data.data);
|
||||
}
|
||||
},
|
||||
},
|
||||
'ignore': [
|
||||
'time_log',
|
||||
|
Loading…
Reference in New Issue
Block a user