Verified Commit 68da4335 authored by dockx thibault's avatar dockx thibault
Browse files

:sparkles: Feat(Tasks) - First usages of column info

Each cells of tasks management report informations.
Not proper ones yet, but it is a start.
Showing with 36 additions and 10 deletions
+36 -10
......@@ -303,8 +303,22 @@ attributetype ( 1.3.6.1.4.1.38414.89.1.2 NAME 'fdTasksSchedule'
attributetype ( 1.3.6.1.4.1.38414.89.1.3 NAME 'fdTasksMailUsers'
DESC 'Fusion Directory - Tasks Mail Users Recipient'
EQUALITY caseExactMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE )
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
attributetype ( 1.3.6.1.4.1.38414.89.1.4 NAME 'fdTasksStatus'
DESC 'Fusion Directory - Task Status'
EQUALITY caseExactMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
attributetype ( 1.3.6.1.4.1.38414.89.1.5 NAME 'fdTasksEndDate'
DESC 'Fusion Directory - Task End Date'
EQUALITY caseExactMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
attributetype ( 1.3.6.1.4.1.38414.89.1.6 NAME 'fdTasksCreationDate'
DESC 'Fusion Directory - Task Start Date'
EQUALITY caseExactMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
##### Classes #####
......@@ -392,11 +406,11 @@ objectclass ( 1.3.6.1.4.1.38414.88.2.5 NAME 'fdMailTemplateInvitations'
objectclass (1.3.6.1.4.1.38414.89.2.1 NAME 'fdTasks'
DESC 'FusionDirectory - Tasks objects'
MUST ( cn )
MAY ( fdTasksSchedule ) )
MUST ( cn $ fdTasksStatus $ fdTasksCreationDate )
MAY ( fdTasksSchedule $ fdTasksEndDate) )
objectclass (1.3.6.1.4.1.38414.89.2.2 NAME 'fdTasksMail'
DESC 'FusionDirectory - Tasks objects Mail'
SUP top AUXILIARY
MUST ( fdTasksMailObject )
MAY ( fdTasksMailUsers) )
MUST ( fdTasksMailObject )
MAY ( fdTasksMailUsers ) )
......@@ -56,6 +56,8 @@ class tasks extends simplePlugin
'fdTasksSchedule', FALSE,
''
),
new HiddenAttribute('fdTasksStatus', TRUE, '1', '', 'Status', 'Status of the task'),
new HiddenAttribute('fdTasksCreationDate', TRUE, date("Y-m-d h:i:sa"), '', 'StartDate', 'Start Date And Time Of A Task'),
]
],
];
......
......@@ -24,8 +24,13 @@
* Important that a "query method" must be defined in order to have the listing
*/
class tasksColumn extends Column
{
function __construct (managementListing $parent, array $attributes = NULL, string $label = NULL)
{
parent::__construct($parent, ['supannRessourceEtatDate', 'supannRessourceEtat'], $label);
}
protected function renderSingleValue (ListingEntry $entry, string $value): string
{
if ($value == '') {
......@@ -53,10 +58,13 @@ class tasksColumn extends Column
static function filterSchedule (): string
{
//A method retrieving the time set by the task
return '';
}
static function filterStatus (): string
{
//A method retrieving the status of the task
return '';
}
}
......@@ -27,9 +27,11 @@ class tasksManagement extends management
*/
public static $columns = [
['LinkColumn', ['attributes' => 'cn', 'label' => 'Tasks']],
['tasksColumn', ['attributes' => 'TYPE', 'label' => 'Types']],
['tasksColumn', ['attributes' => 'TIMESTAMP', 'label' => 'Schedule']],
['tasksColumn', ['attributes' => 'STATUS', 'label' => 'Status']],
//below fdTasksMailObject must be change to have a type defined within task creation (new ldap attributes ?hidden)
['Column', ['attributes' => 'fdTasksMailObject', 'label' => 'Types']],
['Column', ['attributes' => 'fdTasksSchedule', 'label' => 'Schedule']],
//below fdTasksStatus attribute needs to be calculated based on the type of the task.
['Column', ['attributes' => 'fdTasksStatus', 'label' => 'Status']],
['ActionsColumn', ['label' => 'Actions']],
];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment