<?php
/* Smarty version 5.4.2, created on 2024-12-19 06:26:11
  from 'file:/Users/razib/Herd/suite/ui/theme/default/../../../apps/psl/views/applications.tpl' */

/* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
  'version' => '5.4.2',
  'unifunc' => 'content_676402d3ac7f18_63960490',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '3277fb19a6d931d67e981fe5fe51b128bc17e041' => 
    array (
      0 => '/Users/razib/Herd/suite/ui/theme/default/../../../apps/psl/views/applications.tpl',
      1 => 1734607570,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
))) {
function content_676402d3ac7f18_63960490 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/Users/razib/Herd/suite/apps/psl/views';
$_smarty_tpl->getInheritance()->init($_smarty_tpl, false);
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_2036100192676402d3aba783_64917812', "head");
?>

<?php 
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_2130008668676402d3abbf10_59423559', "content");
?>


<?php 
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_1897991879676402d3ac5843_08242676', "script");
}
/* {block "head"} */
class Block_2036100192676402d3aba783_64917812 extends \Smarty\Runtime\Block
{
public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/Users/razib/Herd/suite/apps/psl/views';
?>


<?php
}
}
/* {/block "head"} */
/* {block "content"} */
class Block_2130008668676402d3abbf10_59423559 extends \Smarty\Runtime\Block
{
public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/Users/razib/Herd/suite/apps/psl/views';
?>

    <div class="subheader">
        <h1 class="subheader-title">
            Loan Applications
        </h1>
        <div class="subheader-block d-lg-flex align-items-center">
            <a target="_blank" href="<?php echo $_smarty_tpl->getValue('base_url');?>
psl/app/loan-application-form" class="btn btn-primary btn-icon btn-sm me-2 waves-effect waves-themed" data-bs-toggle="tooltip" data-bs-title="View Form">
                <i class="fal fa-file-signature"></i>
            </a>
        </div>
    </div>

        <div class="panel">
            <div class="panel-hdr">
                <h3 class="card-title"><?php echo $_smarty_tpl->getSmarty()->getModifierCallback('__')('AI Responses');?>
</h3>
            </div>
            <div class="panel-container">
                <div class="panel-content">

                    <table class="table table-condensed table-hover table-bordered" id="clx_datatable">
                        <thead>
                        <tr>
                            <th>Name</th>
                            <th>Email</th>
                            <th>Phone</th>
                            <th>Amount</th>
                            <th>Term</th>
                            <th>Rate</th>
                            <th class="text-end"><?php echo $_smarty_tpl->getValue('_L')['View'];?>
</th>
                        </tr>
                        </thead>
                        <tbody>

                        <?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('loan_applications'), 'application');
$foreach0DoElse = true;
foreach ($_from ?? [] as $_smarty_tpl->getVariable('application')->value) {
$foreach0DoElse = false;
?>
                            <tr>
                                <td>
                                    <?php echo $_smarty_tpl->getValue('application')->first_name;?>
 <?php echo $_smarty_tpl->getValue('application')->last_name;?>

                                </td>
                                <td><?php echo $_smarty_tpl->getValue('application')->email;?>
</td>
                                <td><?php echo $_smarty_tpl->getValue('application')->phone;?>
</td>
                                <td>
                                    <?php echo $_smarty_tpl->getSmarty()->getModifierCallback('formatCurrency')($_smarty_tpl->getValue('application')->loan_amount,'USD');?>

                                </td>
                                <td>
                                    <?php echo $_smarty_tpl->getValue('application')->loan_term;?>

                                </td>
                                <td>
                                    <?php echo $_smarty_tpl->getValue('application')->interest_rate;?>

                                </td>
                                <td class="text-end">
                                    <a href="<?php echo $_smarty_tpl->getValue('_url');?>
psl/app/view-application/<?php echo $_smarty_tpl->getValue('application')->uuid;?>
" class="btn btn-sm btn-dark"><?php echo $_smarty_tpl->getValue('_L')['View'];?>
</a>
                                    <a target="_blank" href="<?php echo $_smarty_tpl->getValue('_url');?>
psl/app/loan-application-form/0/<?php echo $_smarty_tpl->getValue('application')->uuid;?>
" class="btn btn-sm btn-dark"><?php echo $_smarty_tpl->getValue('_L')['Edit'];?>
</a>
                                    <a href="javascript:;" class="btn btn-danger btn-sm" onclick="confirmThenGoToUrl(event,'psl/app/delete-application/<?php echo $_smarty_tpl->getValue('application')->id;?>
')" data-bs-toggle="tooltip" data-placement="top" title="<?php echo $_smarty_tpl->getValue('_L')['Delete'];?>
"><i class="fal fa-trash-alt"></i></a>
                                </td>
                            </tr>
                        <?php
}
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>

                        </tbody>

                    </table>

                </div>
            </div>
        </div>



<?php
}
}
/* {/block "content"} */
/* {block "script"} */
class Block_1897991879676402d3ac5843_08242676 extends \Smarty\Runtime\Block
{
public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/Users/razib/Herd/suite/apps/psl/views';
?>

    <?php echo '<script'; ?>
>
        $(function () {
            $('#clx_datatable').dataTable(
                {
                    responsive: true,
                    "language": {
                        "emptyTable": "<?php echo $_smarty_tpl->getValue('_L')['No items to display'];?>
",
                        "info":      "<?php echo $_smarty_tpl->getValue('_L')['Showing _START_ to _END_ of _TOTAL_ entries'];?>
",
                        "infoEmpty":      "<?php echo $_smarty_tpl->getValue('_L')['Showing 0 to 0 of 0 entries'];?>
",
                        buttons: {
                            pageLength: '<?php echo $_smarty_tpl->getValue('_L')['Show all'];?>
'
                        },
                        searchPlaceholder: "<?php echo $_smarty_tpl->getSmarty()->getModifierCallback('__')('Search');?>
"
                    },
                }
            );
        });
    <?php echo '</script'; ?>
>
<?php
}
}
/* {/block "script"} */
}
