MMCT TEAM
Server IP : 192.185.129.71  /  Your IP : 3.128.181.81
Web Server : Apache
System : Linux bh-ht-3.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : svymadmin ( 4072)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home4/svymadmin/public_html/vivekaexcel.edu.in/bkp/application/services/projects/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home4/svymadmin/public_html/vivekaexcel.edu.in/bkp/application/services/projects/AbstractGantt.php
<?php

namespace app\services\projects;

abstract class AbstractGantt
{
    abstract public function get();

    public static function tasks_array_data($task, $dep_id = null, $defaultEnd = null)
    {
        $data = [];

        $data['id']     = $task['id'];
        $data['desc']   = $task['name'];
        $data['status'] = $task['status'];

        $data['start'] = date('Y-m-d', strtotime($task['startdate']));

        if ($task['duedate']) {
            $data['end'] = date('Y-m-d', strtotime($task['duedate']));
        } else {
            $data['end'] = $defaultEnd;
        }

        $data['desc']  = $task['name'] . ' - ' . _l('task_total_logged_time') . ' ' . seconds_to_time_format($task['total_logged_time']);
        $data['label'] = $task['name'];
        if ($task['duedate'] && date('Y-m-d') > $task['duedate'] && $task['status'] != \Tasks_model::STATUS_COMPLETE) {
            $data['custom_class'] = 'ganttRed';
        } elseif ($task['status'] == \Tasks_model::STATUS_COMPLETE) {
            $data['custom_class'] = 'ganttGreen';
        }

        $data['name']     = $task['name'];
        $data['task_id']  = $task['id'];
        $data['progress'] = 0;

        //for task in single project gantt
        if ($dep_id) {
            $data['dependencies'] = $dep_id;
        }

        if (!staff_can('edit', 'tasks') || is_client_logged_in()) {
            if (isset($data['custom_class'])) {
                $data['custom_class'] .= ' noDrag';
            } else {
                $data['custom_class'] = 'noDrag';
            }
        }

        return $data;
    }
}

MMCT - 2023