invoiceninja/app/Ninja/Intents/WebApp/ListTaskIntent.php

22 lines
435 B
PHP
Raw Normal View History

2017-04-04 17:51:01 +03:00
<?php
namespace App\Ninja\Intents\WebApp;
use App\Ninja\Intents\BaseIntent;
class ListTaskIntent extends BaseIntent
{
public function process()
{
2017-04-05 22:20:11 +03:00
$this->loadStates(ENTITY_TASK);
2017-04-05 22:42:54 +03:00
if (! $this->hasField('Filter', 'all') && $client = $this->requestClient()) {
2017-04-05 18:04:44 +03:00
$url = $client->present()->url . '#tasks';
} else {
$url = '/tasks';
}
return redirect($url);
2017-04-04 17:51:01 +03:00
}
}