Models/Todo.php
Components/TableTodo.tsx
Controllers/Todo.php
Views/Todo.twig
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
namespace Hubleto\App\Community\Tasks\Models;
                  
class Todo extends \Hubleto\Erp\Model {
  public array $relations = [
    'RESPONSIBLE' => [ self::BELONGS_TO, User::class, 'id_responsible', 'id' ],
  ];

  public function describeColumns(): array {
    return [
      'todo' => new Varchar($this, $this->translate('To do'))
        ->setDefaultVisible(),
      'id_responsible' => new Lookup($this, $this->translate('Responsible'), User::class)
        ->setDefaultValue($this->getService(AuthProvider::class)->getUserId()),
      'is_closed' => new Boolean($this, $this->translate('Closed'))
        ->setYesText('Closed'),
      'deadline' => new Date($this, $this->translate('Deadline'))
        ->setDefaultValue(date("Y-m-d")),
    ];
  }
}
main*
You, 3 minutes ago Claude UTF-8 CRLF Spaces: 2 Ln 4, Col 26