var/cache/dev/twig/0b/0bd6e29c9f932ec4c5e393f5da28e61d.php line 153

  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* base.html.twig */
  16. class __TwigTemplate_dc6737d1c5481174715ba189f0f8b911 extends Template
  17. {
  18.     private Source $source;
  19.     /**
  20.      * @var array<string, Template>
  21.      */
  22.     private array $macros = [];
  23.     public function __construct(Environment $env)
  24.     {
  25.         parent::__construct($env);
  26.         $this->source $this->getSourceContext();
  27.         $this->parent false;
  28.         $this->blocks = [
  29.             'title' => [$this'block_title'],
  30.             'stylesheets' => [$this'block_stylesheets'],
  31.             'body' => [$this'block_body'],
  32.             'javascripts' => [$this'block_javascripts'],
  33.         ];
  34.     }
  35.     protected function doDisplay(array $context, array $blocks = []): iterable
  36.     {
  37.         $macros $this->macros;
  38.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  39.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""base.html.twig"));
  40.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  41.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""base.html.twig"));
  42.         // line 1
  43.         yield "<!DOCTYPE html>
  44. <html>
  45. <head>
  46.     <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
  47.     <meta charset=\"UTF-8\">
  48.     <title>Global Commissions :: ";
  49.         // line 7
  50.         yield from $this->unwrap()->yieldBlock('title'$context$blocks);
  51.         yield "</title>
  52.     <link rel=\"icon\" href=\"data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>\">
  53.     <link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.datatables.net/1.11.5/css/jquery.dataTables.css\">
  54.     <link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.datatables.net/fixedheader/3.2.2/css/fixedHeader.dataTables.min.css\">
  55.     <style>
  56. \t\t/* Custom styles for table */
  57. \t\t.dataTables_wrapper {
  58. \t\t\twidth: 100%;
  59. \t\t\tmargin: 0 auto;
  60. \t\t}
  61.     </style>
  62.     ";
  63.         // line 19
  64.         yield from $this->unwrap()->yieldBlock('stylesheets'$context$blocks);
  65.         // line 22
  66.         yield "
  67.     <script src=\"https://cdn.jsdelivr.net/npm/alpinejs@3.14.1/dist/cdn.min.js\" defer></script>
  68. </head>
  69. <body ";
  70.         // line 25
  71.         if ((((CoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'25$this->source); })()), "user", [], "any"falsefalsefalse25) && CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'25$this->source); })()), "user", [], "any"falsefalsefalse25), "employeeStatus", [], "any"falsefalsefalse25)) && (CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'25$this->source); })()), "user", [], "any"falsefalsefalse25), "employeeStatus", [], "any"falsefalsefalse25), "value", [], "any"falsefalsefalse25) == "LEAVE_OF_ABSENCE")) && ((null === CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'25$this->source); })()), "user", [], "any"falsefalsefalse25), "leaveOfAbsenceStartDate", [], "any"falsefalsefalse25)) || (null === CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'25$this->source); })()), "user", [], "any"falsefalsefalse25), "leaveOfAbsenceEndDate", [], "any"falsefalsefalse25))))) {
  72.             yield "data-show-absence-popup=\"true\"";
  73.         }
  74.         yield ">
  75. <div class=\"max-w-screen-3xl  mx-auto\">
  76. ";
  77.         // line 28
  78.         yield from         $this->loadTemplate("layout/header.html.twig""base.html.twig"28)->unwrap()->yield($context);
  79.         // line 29
  80.         $context["flashMessages"] = [];
  81.         // line 30
  82.         yield "
  83. ";
  84.         // line 31
  85.         $context['_parent'] = $context;
  86.         $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'31$this->source); })()), "flashes", [["success""danger""warning"]], "method"falsefalsefalse31));
  87.         foreach ($context['_seq'] as $context["type"] => $context["messages"]) {
  88.             // line 32
  89.             yield "    ";
  90.             $context['_parent'] = $context;
  91.             $context['_seq'] = CoreExtension::ensureTraversable($context["messages"]);
  92.             foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
  93.                 // line 33
  94.                 yield "        ";
  95.                 $context["flashMessages"] = Twig\Extension\CoreExtension::merge((isset($context["flashMessages"]) || array_key_exists("flashMessages"$context) ? $context["flashMessages"] : (function () { throw new RuntimeError('Variable "flashMessages" does not exist.'33$this->source); })()), [["type" => $context["type"], "message" => $context["message"]]]);
  96.                 // line 34
  97.                 yield "    ";
  98.             }
  99.             $_parent $context['_parent'];
  100.             unset($context['_seq'], $context['_key'], $context['message'], $context['_parent']);
  101.             $context array_intersect_key($context$_parent) + $_parent;
  102.         }
  103.         $_parent $context['_parent'];
  104.         unset($context['_seq'], $context['type'], $context['messages'], $context['_parent']);
  105.         $context array_intersect_key($context$_parent) + $_parent;
  106.         // line 36
  107.         yield "
  108. ";
  109.         // line 37
  110.         if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["flashMessages"]) || array_key_exists("flashMessages"$context) ? $context["flashMessages"] : (function () { throw new RuntimeError('Variable "flashMessages" does not exist.'37$this->source); })())) > 0)) {
  111.             // line 38
  112.             yield "    <div class=\"max-w-screen-xl w-full mx-auto flex-shrink mt-6\">
  113.         ";
  114.             // line 39
  115.             $context['_parent'] = $context;
  116.             $context['_seq'] = CoreExtension::ensureTraversable((isset($context["flashMessages"]) || array_key_exists("flashMessages"$context) ? $context["flashMessages"] : (function () { throw new RuntimeError('Variable "flashMessages" does not exist.'39$this->source); })()));
  117.             foreach ($context['_seq'] as $context["_key"] => $context["flashItem"]) {
  118.                 // line 40
  119.                 yield "            <div class=\"alert-";
  120.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["flashItem"], "type", [], "any"falsefalsefalse40), "html"nulltrue);
  121.                 yield "\" >
  122.                 ";
  123.                 // line 41
  124.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["flashItem"], "message", [], "any"falsefalsefalse41), "html"nulltrue);
  125.                 yield "
  126.             </div>
  127.         ";
  128.             }
  129.             $_parent $context['_parent'];
  130.             unset($context['_seq'], $context['_key'], $context['flashItem'], $context['_parent']);
  131.             $context array_intersect_key($context$_parent) + $_parent;
  132.             // line 44
  133.             yield "    </div>
  134. ";
  135.         }
  136.         // line 46
  137.         yield "    <div class=\"flex flex-col  justify-between min-h-screen\">
  138.         <div class=\"p-8\">
  139.             ";
  140.         // line 48
  141.         yield from $this->unwrap()->yieldBlock('body'$context$blocks);
  142.         // line 49
  143.         yield "        </div>
  144.     </div>
  145. ";
  146.         // line 51
  147.         yield from         $this->loadTemplate("/layout/footer.html.twig""base.html.twig"51)->unwrap()->yield($context);
  148.         // line 52
  149.         yield "</div>
  150. ";
  151.         // line 54
  152.         if ((((CoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'54$this->source); })()), "user", [], "any"falsefalsefalse54) && CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'54$this->source); })()), "user", [], "any"falsefalsefalse54), "employeeStatus", [], "any"falsefalsefalse54)) && (CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'54$this->source); })()), "user", [], "any"falsefalsefalse54), "employeeStatus", [], "any"falsefalsefalse54), "value", [], "any"falsefalsefalse54) == "LEAVE_OF_ABSENCE")) && ((null === CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'54$this->source); })()), "user", [], "any"falsefalsefalse54), "leaveOfAbsenceStartDate", [], "any"falsefalsefalse54)) || (null === CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'54$this->source); })()), "user", [], "any"falsefalsefalse54), "leaveOfAbsenceEndDate", [], "any"falsefalsefalse54))))) {
  153.             // line 55
  154.             yield "<!-- Leave of Absence Modal -->
  155. <div id=\"leaveOfAbsenceModal\" tabindex=\"-1\" aria-hidden=\"true\" class=\"fixed inset-0 z-50 flex items-center justify-center bg-gray-900 bg-opacity-50\">
  156.     <div class=\"relative p-4 w-full max-w-md max-h-full\">
  157.         <div class=\"relative bg-white rounded-lg shadow dark:bg-gray-700\">
  158.             <div class=\"flex items-center justify-between p-4 md:p-5 border-b rounded-t dark:border-gray-600\">
  159.                 <h3 class=\"text-xl font-semibold text-gray-900 dark:text-white\">
  160.                     Leave of Absence Dates Required
  161.                 </h3>
  162.             </div>
  163.             <div class=\"p-4 md:p-5\">
  164.                 <p class=\"text-sm text-gray-500 dark:text-gray-400 mb-4\">
  165.                     Your account is set to Leave of Absence status. Please enter your leave dates to continue.
  166.                 </p>
  167.                 <form id=\"leaveOfAbsenceForm\">
  168.                     <div class=\"mb-4\">
  169.                         <label for=\"leaveStartDate\" class=\"block mb-2 text-sm font-medium text-gray-900 dark:text-white\">Start Date</label>
  170.                         <input type=\"date\" id=\"leaveStartDate\" name=\"startDate\" class=\"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white\" required>
  171.                     </div>
  172.                     <div class=\"mb-4\">
  173.                         <label for=\"leaveEndDate\" class=\"block mb-2 text-sm font-medium text-gray-900 dark:text-white\">End Date</label>
  174.                         <input type=\"date\" id=\"leaveEndDate\" name=\"endDate\" class=\"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white\" required>
  175.                     </div>
  176.                     <div id=\"leaveFormError\" class=\"hidden mb-4 text-sm text-red-600 dark:text-red-500\"></div>
  177.                     <button type=\"submit\" class=\"w-full text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800\">
  178.                         Save Dates
  179.                     </button>
  180.                 </form>
  181.             </div>
  182.         </div>
  183.     </div>
  184. </div>
  185. <script>
  186. document.addEventListener('DOMContentLoaded', function() {
  187.     var modal = document.getElementById('leaveOfAbsenceModal');
  188.     var form = document.getElementById('leaveOfAbsenceForm');
  189.     var errorDiv = document.getElementById('leaveFormError');
  190.     if (modal && form) {
  191.         form.addEventListener('submit', function(e) {
  192.             e.preventDefault();
  193.             var startDate = document.getElementById('leaveStartDate').value;
  194.             var endDate = document.getElementById('leaveEndDate').value;
  195.             errorDiv.classList.add('hidden');
  196.             fetch('/api/leave-of-absence', {
  197.                 method: 'POST',
  198.                 headers: {
  199.                     'Content-Type': 'application/json',
  200.                 },
  201.                 body: JSON.stringify({
  202.                     startDate: startDate,
  203.                     endDate: endDate
  204.                 })
  205.             })
  206.             .then(function(response) {
  207.                 return response.json();
  208.             })
  209.             .then(function(data) {
  210.                 if (data.success) {
  211.                     modal.style.display = 'none';
  212.                     window.location.reload();
  213.                 } else {
  214.                     errorDiv.textContent = data.message;
  215.                     errorDiv.classList.remove('hidden');
  216.                 }
  217.             })
  218.             .catch(function(error) {
  219.                 errorDiv.textContent = 'An error occurred. Please try again.';
  220.                 errorDiv.classList.remove('hidden');
  221.             });
  222.         });
  223.     }
  224. });
  225. </script>
  226. ";
  227.         }
  228.         // line 132
  229.         yield "
  230. ";
  231.         // line 133
  232.         yield from $this->unwrap()->yieldBlock('javascripts'$context$blocks);
  233.         // line 136
  234.         yield "<script type=\"text/javascript\" charset=\"utf8\" src=\"https://code.jquery.com/jquery-3.5.1.js\"></script>
  235. <script type=\"text/javascript\" charset=\"utf8\" src=\"https://cdn.datatables.net/1.11.5/js/jquery.dataTables.js\"></script>
  236. <script type=\"text/javascript\" charset=\"utf8\" src=\"https://cdn.datatables.net/fixedheader/3.2.2/js/dataTables.fixedHeader.min.js\"></script>
  237. <script>
  238. \t\$(document).ready(function() {
  239. \t\tvar table = \$('#commissionTable').DataTable({
  240. \t\t\tfixedHeader: true,
  241. \t\t\tpaging: false,
  242. \t\t\tscrollY: '500px',
  243. \t\t\tscrollCollapse: true,
  244. \t\t\tinfo: false,
  245. \t\t\tsearching: false
  246. \t\t});
  247. \t});
  248. </script>
  249. </body>
  250. </html>
  251. ";
  252.         
  253.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  254.         
  255.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  256.         yield from [];
  257.     }
  258.     // line 7
  259.     /**
  260.      * @return iterable<null|scalar|\Stringable>
  261.      */
  262.     public function block_title(array $context, array $blocks = []): iterable
  263.     {
  264.         $macros $this->macros;
  265.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  266.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  267.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  268.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  269.         yield "!";
  270.         
  271.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  272.         
  273.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  274.         yield from [];
  275.     }
  276.     // line 19
  277.     /**
  278.      * @return iterable<null|scalar|\Stringable>
  279.      */
  280.     public function block_stylesheets(array $context, array $blocks = []): iterable
  281.     {
  282.         $macros $this->macros;
  283.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  284.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  285.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  286.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  287.         // line 20
  288.         yield "        ";
  289.         yield $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackLinkTags("app");
  290.         yield "
  291.     ";
  292.         
  293.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  294.         
  295.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  296.         yield from [];
  297.     }
  298.     // line 48
  299.     /**
  300.      * @return iterable<null|scalar|\Stringable>
  301.      */
  302.     public function block_body(array $context, array $blocks = []): iterable
  303.     {
  304.         $macros $this->macros;
  305.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  306.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  307.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  308.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  309.         
  310.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  311.         
  312.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  313.         yield from [];
  314.     }
  315.     // line 133
  316.     /**
  317.      * @return iterable<null|scalar|\Stringable>
  318.      */
  319.     public function block_javascripts(array $context, array $blocks = []): iterable
  320.     {
  321.         $macros $this->macros;
  322.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  323.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  324.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  325.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  326.         // line 134
  327.         yield "    ";
  328.         yield $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackScriptTags("app");
  329.         yield "
  330. ";
  331.         
  332.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  333.         
  334.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  335.         yield from [];
  336.     }
  337.     /**
  338.      * @codeCoverageIgnore
  339.      */
  340.     public function getTemplateName(): string
  341.     {
  342.         return "base.html.twig";
  343.     }
  344.     /**
  345.      * @codeCoverageIgnore
  346.      */
  347.     public function isTraitable(): bool
  348.     {
  349.         return false;
  350.     }
  351.     /**
  352.      * @codeCoverageIgnore
  353.      */
  354.     public function getDebugInfo(): array
  355.     {
  356.         return array (  365 => 134,  352 => 133,  330 => 48,  316 => 20,  303 => 19,  280 => 7,  251 => 136,  249 => 133,  246 => 132,  167 => 55,  165 => 54,  161 => 52,  159 => 51,  155 => 49,  153 => 48,  149 => 46,  145 => 44,  136 => 41,  131 => 40,  127 => 39,  124 => 38,  122 => 37,  119 => 36,  109 => 34,  106 => 33,  101 => 32,  97 => 31,  94 => 30,  92 => 29,  90 => 28,  82 => 25,  77 => 22,  75 => 19,  60 => 7,  52 => 1,);
  357.     }
  358.     public function getSourceContext(): Source
  359.     {
  360.         return new Source("<!DOCTYPE html>
  361. <html>
  362. <head>
  363.     <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
  364.     <meta charset=\"UTF-8\">
  365.     <title>Global Commissions :: {% block title %}!{% endblock %}</title>
  366.     <link rel=\"icon\" href=\"data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>\">
  367.     <link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.datatables.net/1.11.5/css/jquery.dataTables.css\">
  368.     <link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.datatables.net/fixedheader/3.2.2/css/fixedHeader.dataTables.min.css\">
  369.     <style>
  370. \t\t/* Custom styles for table */
  371. \t\t.dataTables_wrapper {
  372. \t\t\twidth: 100%;
  373. \t\t\tmargin: 0 auto;
  374. \t\t}
  375.     </style>
  376.     {% block stylesheets %}
  377.         {{ encore_entry_link_tags('app') }}
  378.     {% endblock %}
  379.     <script src=\"https://cdn.jsdelivr.net/npm/alpinejs@3.14.1/dist/cdn.min.js\" defer></script>
  380. </head>
  381. <body {% if app.user and app.user.employeeStatus and app.user.employeeStatus.value == 'LEAVE_OF_ABSENCE' and (app.user.leaveOfAbsenceStartDate is null or app.user.leaveOfAbsenceEndDate is null) %}data-show-absence-popup=\"true\"{% endif %}>
  382. <div class=\"max-w-screen-3xl  mx-auto\">
  383. {% include('layout/header.html.twig') %}
  384. {% set flashMessages = [] %}
  385. {% for type, messages in app.flashes(['success', 'danger', 'warning']) %}
  386.     {% for message in messages %}
  387.         {% set flashMessages = flashMessages|merge([{type, message}]) %}
  388.     {% endfor %}
  389. {% endfor %}
  390. {% if flashMessages|length > 0 %}
  391.     <div class=\"max-w-screen-xl w-full mx-auto flex-shrink mt-6\">
  392.         {% for flashItem in flashMessages %}
  393.             <div class=\"alert-{{ flashItem.type }}\" >
  394.                 {{ flashItem.message }}
  395.             </div>
  396.         {% endfor %}
  397.     </div>
  398. {% endif %}
  399.     <div class=\"flex flex-col  justify-between min-h-screen\">
  400.         <div class=\"p-8\">
  401.             {% block body %}{% endblock %}
  402.         </div>
  403.     </div>
  404. {% include('/layout/footer.html.twig') %}
  405. </div>
  406. {% if app.user and app.user.employeeStatus and app.user.employeeStatus.value == 'LEAVE_OF_ABSENCE' and (app.user.leaveOfAbsenceStartDate is null or app.user.leaveOfAbsenceEndDate is null) %}
  407. <!-- Leave of Absence Modal -->
  408. <div id=\"leaveOfAbsenceModal\" tabindex=\"-1\" aria-hidden=\"true\" class=\"fixed inset-0 z-50 flex items-center justify-center bg-gray-900 bg-opacity-50\">
  409.     <div class=\"relative p-4 w-full max-w-md max-h-full\">
  410.         <div class=\"relative bg-white rounded-lg shadow dark:bg-gray-700\">
  411.             <div class=\"flex items-center justify-between p-4 md:p-5 border-b rounded-t dark:border-gray-600\">
  412.                 <h3 class=\"text-xl font-semibold text-gray-900 dark:text-white\">
  413.                     Leave of Absence Dates Required
  414.                 </h3>
  415.             </div>
  416.             <div class=\"p-4 md:p-5\">
  417.                 <p class=\"text-sm text-gray-500 dark:text-gray-400 mb-4\">
  418.                     Your account is set to Leave of Absence status. Please enter your leave dates to continue.
  419.                 </p>
  420.                 <form id=\"leaveOfAbsenceForm\">
  421.                     <div class=\"mb-4\">
  422.                         <label for=\"leaveStartDate\" class=\"block mb-2 text-sm font-medium text-gray-900 dark:text-white\">Start Date</label>
  423.                         <input type=\"date\" id=\"leaveStartDate\" name=\"startDate\" class=\"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white\" required>
  424.                     </div>
  425.                     <div class=\"mb-4\">
  426.                         <label for=\"leaveEndDate\" class=\"block mb-2 text-sm font-medium text-gray-900 dark:text-white\">End Date</label>
  427.                         <input type=\"date\" id=\"leaveEndDate\" name=\"endDate\" class=\"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white\" required>
  428.                     </div>
  429.                     <div id=\"leaveFormError\" class=\"hidden mb-4 text-sm text-red-600 dark:text-red-500\"></div>
  430.                     <button type=\"submit\" class=\"w-full text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800\">
  431.                         Save Dates
  432.                     </button>
  433.                 </form>
  434.             </div>
  435.         </div>
  436.     </div>
  437. </div>
  438. <script>
  439. document.addEventListener('DOMContentLoaded', function() {
  440.     var modal = document.getElementById('leaveOfAbsenceModal');
  441.     var form = document.getElementById('leaveOfAbsenceForm');
  442.     var errorDiv = document.getElementById('leaveFormError');
  443.     if (modal && form) {
  444.         form.addEventListener('submit', function(e) {
  445.             e.preventDefault();
  446.             var startDate = document.getElementById('leaveStartDate').value;
  447.             var endDate = document.getElementById('leaveEndDate').value;
  448.             errorDiv.classList.add('hidden');
  449.             fetch('/api/leave-of-absence', {
  450.                 method: 'POST',
  451.                 headers: {
  452.                     'Content-Type': 'application/json',
  453.                 },
  454.                 body: JSON.stringify({
  455.                     startDate: startDate,
  456.                     endDate: endDate
  457.                 })
  458.             })
  459.             .then(function(response) {
  460.                 return response.json();
  461.             })
  462.             .then(function(data) {
  463.                 if (data.success) {
  464.                     modal.style.display = 'none';
  465.                     window.location.reload();
  466.                 } else {
  467.                     errorDiv.textContent = data.message;
  468.                     errorDiv.classList.remove('hidden');
  469.                 }
  470.             })
  471.             .catch(function(error) {
  472.                 errorDiv.textContent = 'An error occurred. Please try again.';
  473.                 errorDiv.classList.remove('hidden');
  474.             });
  475.         });
  476.     }
  477. });
  478. </script>
  479. {% endif %}
  480. {% block javascripts %}
  481.     {{ encore_entry_script_tags('app') }}
  482. {% endblock %}
  483. <script type=\"text/javascript\" charset=\"utf8\" src=\"https://code.jquery.com/jquery-3.5.1.js\"></script>
  484. <script type=\"text/javascript\" charset=\"utf8\" src=\"https://cdn.datatables.net/1.11.5/js/jquery.dataTables.js\"></script>
  485. <script type=\"text/javascript\" charset=\"utf8\" src=\"https://cdn.datatables.net/fixedheader/3.2.2/js/dataTables.fixedHeader.min.js\"></script>
  486. <script>
  487. \t\$(document).ready(function() {
  488. \t\tvar table = \$('#commissionTable').DataTable({
  489. \t\t\tfixedHeader: true,
  490. \t\t\tpaging: false,
  491. \t\t\tscrollY: '500px',
  492. \t\t\tscrollCollapse: true,
  493. \t\t\tinfo: false,
  494. \t\t\tsearching: false
  495. \t\t});
  496. \t});
  497. </script>
  498. </body>
  499. </html>
  500. ""base.html.twig""/home/glcommissions/staging/source/templates/base.html.twig");
  501.     }
  502. }