mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 18:34:30 -04:00
Working on projects
This commit is contained in:
parent
d2ba15a15a
commit
a9121e9a72
@ -12,7 +12,7 @@ class TaskKanbanController extends BaseController
|
||||
/**
|
||||
* @return \Illuminate\Contracts\View\View
|
||||
*/
|
||||
public function index($clientPublicId = false)
|
||||
public function index($clientPublicId = false, $projectPublicId = false)
|
||||
{
|
||||
$tasks = Task::scope()
|
||||
->with(['project', 'client', 'task_status'])
|
||||
@ -85,6 +85,7 @@ class TaskKanbanController extends BaseController
|
||||
'clients' => $clients,
|
||||
'projects' => $projects,
|
||||
'clientPublicId' => $clientPublicId,
|
||||
'projectPublicId' => $projectPublicId,
|
||||
];
|
||||
|
||||
return view('tasks.kanban', $data);
|
||||
|
@ -48,7 +48,7 @@ class Project extends EntityModel
|
||||
*/
|
||||
public function getRoute()
|
||||
{
|
||||
return "/projects/{$this->public_id}/edit";
|
||||
return "/projects/{$this->public_id}";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -84,7 +84,7 @@
|
||||
});
|
||||
</script>
|
||||
@elseif ($entityType == ENTITY_TASK)
|
||||
{!! Button::normal(trans('texts.kanban'))->asLinkTo(url('/tasks/kanban' . (! empty($clientId) ? '/' . $clientId : '')))->appendIcon(Icon::create('th')) !!}
|
||||
{!! Button::normal(trans('texts.kanban'))->asLinkTo(url('/tasks/kanban' . (! empty($clientId) ? ('/' . $clientId . (! empty($projectId) ? '/' . $projectId : '')) : '')))->appendIcon(Icon::create('th')) !!}
|
||||
{!! Button::normal(trans('texts.time_tracker'))->asLinkTo('javascript:openTimeTracker()')->appendIcon(Icon::create('time')) !!}
|
||||
@endif
|
||||
|
||||
|
@ -61,7 +61,8 @@
|
||||
<center class="buttons">
|
||||
{!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(HTMLUtils::previousUrl('/projects'))->appendIcon(Icon::create('remove-circle')) !!}
|
||||
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
|
||||
@if ($project && Auth::user()->can('create', ENTITY_TASK))
|
||||
|
||||
@if (false && $project && Auth::user()->can('create', ENTITY_TASK))
|
||||
{!! DropdownButton::normal(trans('texts.more_actions'))
|
||||
->withContents([
|
||||
[
|
||||
|
@ -36,13 +36,6 @@
|
||||
]
|
||||
)->split() !!}
|
||||
@endcan
|
||||
@if ( ! $project->trashed())
|
||||
@can('create', ENTITY_TASK)
|
||||
{!! Button::primary(trans("texts.new_task"))
|
||||
->asLinkTo(URL::to("/tasks/create/{$project->client->public_id}/{$project->public_id}"))
|
||||
->appendIcon(Icon::create('plus-sign')) !!}
|
||||
@endcan
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if ($project->trashed())
|
||||
|
@ -650,7 +650,13 @@
|
||||
window.model = new ViewModel();
|
||||
ko.applyBindings(model);
|
||||
|
||||
if ({{ $clientPublicId ? 'true' : 'false' }}) {
|
||||
if ({{ $projectPublicId ? 'true' : 'false' }}) {
|
||||
var project = projectMap[{{ $projectPublicId ?: 0}}];
|
||||
if (project) {
|
||||
model.filter_project_id({{ $projectPublicId }});
|
||||
model.filter(project.name());
|
||||
}
|
||||
} else if ({{ $clientPublicId ? 'true' : 'false' }}) {
|
||||
var client = clientMap[{{ $clientPublicId ?: 0 }}];
|
||||
if (client) {
|
||||
model.filter_client_id({{ $clientPublicId }});
|
||||
|
@ -143,7 +143,7 @@ Route::group(['middleware' => ['lookup:user', 'auth:user']], function () {
|
||||
Route::get('clients/statement/{client_id}/{status_id?}/{start_date?}/{end_date?}', 'ClientController@statement');
|
||||
|
||||
Route::get('time_tracker', 'TimeTrackerController@index');
|
||||
Route::get('tasks/kanban/{client_id?}', 'TaskKanbanController@index');
|
||||
Route::get('tasks/kanban/{client_id?}/{project_id?}', 'TaskKanbanController@index');
|
||||
Route::post('task_statuses', 'TaskKanbanController@storeStatus');
|
||||
Route::put('task_statuses/{task_status_id}', 'TaskKanbanController@updateStatus');
|
||||
Route::delete('task_statuses/{task_status_id}', 'TaskKanbanController@deleteStatus');
|
||||
|
Loading…
x
Reference in New Issue
Block a user