/
var
/
www
/
html
/
restaurants
/
var
/
cache
/
prod
/
twig
/
cd
/
Upload File
HOME
<?php use Twig\Environment; use Twig\Error\LoaderError; use Twig\Error\RuntimeError; use Twig\Extension\SandboxExtension; use Twig\Markup; use Twig\Sandbox\SecurityError; use Twig\Sandbox\SecurityNotAllowedTagError; use Twig\Sandbox\SecurityNotAllowedFilterError; use Twig\Sandbox\SecurityNotAllowedFunctionError; use Twig\Source; use Twig\Template; /* Stock/supply.html.twig */ class __TwigTemplate_b3ba233a92a803a17ddcfdc5b3b575c80c3312d2bb0c6f248430a270ecbe858b extends Template { private $source; private $macros = []; public function __construct(Environment $env) { parent::__construct($env); $this->source = $this->getSourceContext(); $this->blocks = [ 'stylesheets' => [$this, 'block_stylesheets'], 'content' => [$this, 'block_content'], 'javascripts' => [$this, 'block_javascripts'], ]; } protected function doGetParent(array $context) { // line 1 return "base1.html.twig"; } protected function doDisplay(array $context, array $blocks = []) { $macros = $this->macros; $this->parent = $this->loadTemplate("base1.html.twig", "Stock/supply.html.twig", 1); $this->parent->display($context, array_merge($this->blocks, $blocks)); } // line 3 public function block_stylesheets($context, array $blocks = []) { $macros = $this->macros; // line 4 echo "\t"; $this->displayParentBlock("stylesheets", $context, $blocks); echo " \t<link rel=\"stylesheet\" href=\""; // line 5 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("css/jquery-ui.css"), "html", null, true); echo "\"> "; } // line 8 public function block_content($context, array $blocks = []) { $macros = $this->macros; // line 9 echo "\t<div class=\"content-main\"> \t\t<div class=\"card\"> \t\t\t<div class=\"card-body\"> \t\t\t\t<form action=\""; // line 12 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("supply"); echo "\" method=\"POST\" name=\"supply\"> \t\t\t\t\t<a href=\""; // line 13 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("ajax", ["page" => "supplier"]); echo "\" rel=\"modal:open\" class=\"btn btn-primary pull-right new-supplier\">New Supplier</a> \t\t\t\t\t<div class=\"col-sm-12 col-md-6\"> \t\t\t\t\t\t"; // line 18 echo " \t\t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t\t<input type=\"text\" name=\"date\" class=\"form-control\" placeholder=\"Date\" id=\"datepicker\" autocomplete=\"off\" required> \t\t\t\t\t\t</div> \t\t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t\t<select class=\"form-control ajaxSelect sup\" name=\"supplier\" required> \t\t\t\t\t\t\t\t<option value=\"\">Select Supplier</option> \t\t\t\t\t\t\t\t"; // line 25 $context['_parent'] = $context; $context['_seq'] = twig_ensure_traversable(($context["suppliers"] ?? null)); foreach ($context['_seq'] as $context["_key"] => $context["supplier"]) { // line 26 echo "\t\t\t\t\t\t\t\t\t<option value=\""; echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["supplier"], "id", [], "any", false, false, false, 26), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, twig_upper_filter($this->env, twig_get_attribute($this->env, $this->source, $context["supplier"], "name", [], "any", false, false, false, 26)), "html", null, true); echo "</option> \t\t\t\t\t\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['supplier'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 28 echo "\t\t\t\t\t\t\t\t<option value=\"newsup\">New Supplier</option> \t\t\t\t\t\t\t</select> \t\t\t\t\t\t</div> \t\t\t\t\t</div> \t\t\t\t\t<div class=\"col-sm-12 supply-items\"> \t\t\t\t\t\t<h3>Add Supply Items</h3> \t\t\t\t\t\t \t\t\t\t\t\t<div id=\"stockitems\"> \t\t\t\t\t\t\t<div class=\"row\" id=\"initial\"> \t\t\t\t\t\t\t\t<div class=\"col-sm-12 col-md-4 col-xs-12\"> \t\t\t\t\t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t\t\t\t\t<select class=\"form-control stock-item select-list ajaxSelect\" name=\"item[]\"> \t\t\t\t\t\t\t\t\t\t\t<option value=\"\">Select Inventory Item</option> \t\t\t\t\t\t\t\t\t\t\t"; // line 41 $context['_parent'] = $context; $context['_seq'] = twig_ensure_traversable(($context["items"] ?? null)); foreach ($context['_seq'] as $context["_key"] => $context["item"]) { // line 42 echo "\t\t\t\t\t\t\t\t\t\t\t\t<option value=\""; echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 42), "html", null, true); echo "|"; echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "unit", [], "any", false, false, false, 42), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, twig_upper_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "name", [], "any", false, false, false, 42)), "html", null, true); echo " ("; echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "quantity", [], "any", false, false, false, 42), "html", null, true); echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "unit", [], "any", false, false, false, 42), "html", null, true); echo ")</option> \t\t\t\t\t\t\t\t\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 44 echo "\t\t\t\t\t\t\t\t\t\t\t<option value=\"-1\">New Inventory Item</option> \t\t\t\t\t\t\t\t\t\t</select> \t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t<div class=\"col-sm-12 col-md-4 col-xs-12\"> \t\t\t\t\t\t\t\t\t<div class=\"input-group\"> \t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"quantity[]\" placeholder=\"Quantity\" class=\"form-control\"> \t\t\t\t\t\t\t\t\t\t<div class=\"input-group-append\"> \t\t\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\"></span> \t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t<div class=\"col-sm-12 col-md-4 col-xs-12\"> \t\t\t\t\t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"amount[]\" placeholder=\"Amount\" class=\"form-control\"> \t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t<div class=\"col-sm-12 col-md-4 col-xs-12 stockitem\"> \t\t\t\t\t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"stock[]\" placeholder=\"Item Name\" class=\"form-control\"> \t\t\t\t\t\t\t\t\t\t<select name=\"unit\" class=\"form-control\"> \t\t\t\t\t\t\t\t\t\t\t<option value=\"\">Select Unit</option> \t\t\t\t\t\t\t\t\t\t\t<option value=\"pieces\">pieces</option> \t\t\t\t\t\t\t\t\t\t\t<option value=\"packets\">packets</option> \t\t\t\t\t\t\t\t\t\t\t<option value=\"bags\">bags</option> \t\t\t\t\t\t\t\t\t\t\t<option value=\"cups\">cups</option> \t\t\t\t\t\t\t\t\t\t\t<option value=\"ml\">ml</option> \t\t\t\t\t\t\t\t\t\t\t<option value=\"cl\">cl</option> \t\t\t\t\t\t\t\t\t\t\t<option value=\"l\">l</option> \t\t\t\t\t\t\t\t\t\t\t<option value=\"g\">g</option> \t\t\t\t\t\t\t\t\t\t\t<option value=\"kg\">kg</option> \t\t\t\t\t\t\t\t\t\t</select> \t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t</div> \t\t\t\t\t\t<button class=\"btn btn-primary\">Save</button> \t\t\t\t\t\t<div> \t\t\t\t\t\t\t<button type=\"button\" id=\"add-item\" class=\"btn btn-primary pull-right\">+</button> \t\t\t\t\t\t\t"; // line 84 echo "\t\t\t\t\t\t</div> \t\t\t\t\t</div> \t\t\t\t\t \t\t\t\t\t \t\t\t\t</form> \t\t\t</div> \t\t</div> \t\t<br> \t\t<!-- <button class=\"btn-other pull-right\" onclick=\"addItem();\">+</button> --> \t</div> \t "; } // line 97 public function block_javascripts($context, array $blocks = []) { $macros = $this->macros; // line 98 echo "\t"; $this->displayParentBlock("javascripts", $context, $blocks); echo " \t<script src=\""; // line 99 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("js/admin.js"), "html", null, true); echo "\"></script> \t<script src=\""; // line 100 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("js/itemselect.js"), "html", null, true); echo "\"></script> \t<script> \t\t \t\t\$(document).ready(function() { \t\t\t\$( \"#datepicker\" ).datepicker(); \t\t\t\$( \"#datepicker\" ).datepicker(\"option\", \"dateFormat\", \"dd/mm/yy\"); \t\t\tvar supplierId = \""; // line 107 echo twig_escape_filter($this->env, ((array_key_exists("supplierId", $context)) ? (_twig_default_filter(($context["supplierId"] ?? null), "")) : ("")), "html", null, true); echo "\"; \t\t\tif(supplierId) { \t\t\t\t// document.forms.supply.supplier.value = supplierId; \t\t\t} \t\t\t\$('.sup').on('change', function(e){ \t\t\t\tconsole.log(e.target.value) \t\t\t\tif (e.target.value === 'newsup') { \t\t\t\t\t// \$.get('/newapp/public/ajax/supplier', function(html){ \t\t\t\t\t// \t\$(html).appendTo('body').modal(); \t\t\t\t\t// }) \t\t\t\t\t\$('.new-supplier').click(); \t\t\t\t} \t\t\t\t \t\t\t\t \t\t\t}) \t\t}); \t\t\$('#stockitems').on('change', '.select-list', function(e){ \t\t\tvar \$target = \$(e.currentTarget) \t\t\tif (\$target.val() === -1) { \t\t\t\t\$target.closest('.row').find('.input-group-text').hide() \t\t\t\treturn; \t\t\t} \t\t\tvar split = \$target.val().split(\"|\") \t\t\tvar unit = split[1]; \t\t\t\$target.closest('.row').find('.input-group-text').show().html(unit); \t\t}) \t\tvar selectTemplate = (items) => ` \t\t\t<select class=\"form-control stock-item select-list ajaxSelect\" name=\"item[]\" required> \t\t\t\t<option value=\"\">Select Inventory Item</option> \t\t\t\t\${items.map(option => optionTemplate(option)).join(\"\")} \t\t\t\t<option value=\"-1\">New Inventory Item</option> \t\t\t</select> \t\t` \t\tvar itemRow = items => ` \t\t\t<hr> \t\t\t<div class=\"row\" style=\"padding-top: 15px;\"> \t\t\t\t<div class=\"col-sm-4\"> \t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t\${selectTemplate(items)} \t\t\t\t\t</div> \t\t\t\t</div> \t\t\t\t<div class=\"col-sm-4\"> \t\t\t\t\t<div class=\"input-group\"> \t\t\t\t\t\t<input type=\"text\" name=\"quantity[]\" placeholder=\"Quantity\" class=\"form-control\"> \t\t\t\t\t\t<div class=\"input-group-append\"> \t\t\t\t\t\t\t<span class=\"input-group-text\"></span> \t\t\t\t\t\t</div> \t\t\t\t\t</div> \t\t\t\t</div> \t\t\t\t<div class=\"col-sm-3\"> \t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t<input type=\"text\" name=\"amount[]\" placeholder=\"Amount\" class=\"form-control\"> \t\t\t\t\t</div> \t\t\t\t</div> \t\t\t\t<div class=\"col-sm-1 cancel-button\" style=\"display: flex;\"> \t\t\t\t\t<button style=\"margin:auto;\" type=\"button\" class=\"btn btn-danger\"><i class=\"fa fa-times\"></i></button> \t\t\t\t</div> \t\t\t\t<div class=\"col-sm-4 stockitem\"> \t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t<input type=\"text\" name=\"stock[]\" placeholder=\"Item Name\" class=\"form-control\"> \t\t\t\t\t\t<select name=\"unit\" class=\"form-control\"> \t\t\t\t\t\t\t<option value=\"pieces\">pieces</option> \t\t\t\t\t\t\t<option value=\"packets\">packets</option> \t\t\t\t\t\t\t<option value=\"bags\">bags</option> \t\t\t\t\t\t\t<option value=\"cups\">cups</option> \t\t\t\t\t\t\t<option value=\"ml\">ml</option> \t\t\t\t\t\t\t<option value=\"cl\">cl</option> \t\t\t\t\t\t\t<option value=\"l\">l</option> \t\t\t\t\t\t\t<option value=\"g\">g</option> \t\t\t\t\t\t\t<option value=\"kg\">kg</option> \t\t\t\t\t\t</select> \t\t\t\t\t</div> \t\t\t\t</div> \t\t\t\t \t\t\t</div> \t\t`; \t</script> "; } public function getTemplateName() { return "Stock/supply.html.twig"; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 219 => 107, 209 => 100, 205 => 99, 200 => 98, 196 => 97, 181 => 84, 140 => 44, 124 => 42, 120 => 41, 105 => 28, 94 => 26, 90 => 25, 81 => 18, 76 => 13, 72 => 12, 67 => 9, 63 => 8, 57 => 5, 52 => 4, 48 => 3, 37 => 1,); } public function getSourceContext() { return new Source("", "Stock/supply.html.twig", "/var/www/html/restaurants/templates/Stock/supply.html.twig"); } }