<?php
/* Smarty version 5.4.1, created on 2024-11-19 22:58:11
  from 'file:../default/projects_gantt_chart.tpl' */

/* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
  'version' => '5.4.1',
  'unifunc' => 'content_673d5e53b9a851_99374416',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '5c70d8ef1b3522e8f8f7444f8e49fbbc8c08e79b' => 
    array (
      0 => '../default/projects_gantt_chart.tpl',
      1 => 1730635718,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
))) {
function content_673d5e53b9a851_99374416 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/Users/razib/Herd/suite/ui/theme/default';
$_smarty_tpl->getInheritance()->init($_smarty_tpl, true);
?>


<?php 
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_271890911673d5e53b8bd10_04804189', "head");
?>


<?php 
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_1381685550673d5e53b8cc63_08633819', "project_content");
?>


<?php 
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_322857069673d5e53b8e8b9_15672704', "script");
?>

<?php $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "project_base.tpl", $_smarty_current_dir);
}
/* {block "head"} */
class Block_271890911673d5e53b8bd10_04804189 extends \Smarty\Runtime\Block
{
public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/Users/razib/Herd/suite/ui/theme/default';
?>

    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/frappe-gantt@0.5.0/dist/frappe-gantt.css" />
<?php
}
}
/* {/block "head"} */
/* {block "project_content"} */
class Block_1381685550673d5e53b8cc63_08633819 extends \Smarty\Runtime\Block
{
public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/Users/razib/Herd/suite/ui/theme/default';
?>

    <svg id="gantt"></svg>
<?php
}
}
/* {/block "project_content"} */
/* {block "script"} */
class Block_322857069673d5e53b8e8b9_15672704 extends \Smarty\Runtime\Block
{
public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/Users/razib/Herd/suite/ui/theme/default';
?>

    <?php echo '<script'; ?>
 src="https://cdn.jsdelivr.net/combine/npm/snapsvg@0.5.1,npm/frappe-gantt@0.5.0/dist/frappe-gantt.min.js"><?php echo '</script'; ?>
>
    <?php echo '<script'; ?>
>
        $(function () {

            var tasks = [
                <?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('tasks'), 'task');
$foreach0DoElse = true;
foreach ($_from ?? [] as $_smarty_tpl->getVariable('task')->value) {
$foreach0DoElse = false;
?>
                {
                    id: '<?php echo $_smarty_tpl->getValue('task')->id;?>
',
                    name: '<?php echo $_smarty_tpl->getValue('task')->title;?>
',
                    start: '<?php echo $_smarty_tpl->getValue('task')->started;?>
',
                    end: '<?php echo $_smarty_tpl->getValue('task')->due_date;?>
',

                    <?php if ($_smarty_tpl->getValue('task')->status === 'In Progress') {?>
                    progress: 70,
                    <?php } elseif ($_smarty_tpl->getValue('task')->status === 'Not Started') {?>
                    progress: 0,
                    <?php } elseif ($_smarty_tpl->getValue('task')->status === 'Completed') {?>
                    progress: 100,
                    <?php } elseif ($_smarty_tpl->getValue('task')->status === 'Waiting on someone else') {?>
                    progress: 50,
                    <?php } elseif ($_smarty_tpl->getValue('task')->status === 'Deferred') {?>
                    progress: 40,
                    <?php } else { ?>
                    progress: 50,
                    <?php }?>
                    // dependencies: 'Task 2, Task 3'
                },
                <?php
}
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
            ]
            var gantt = new Gantt("#gantt", tasks);
        });
    <?php echo '</script'; ?>
>
<?php
}
}
/* {/block "script"} */
}
