First Commit
This commit is contained in:
+362
@@ -0,0 +1,362 @@
|
||||
<?php
|
||||
|
||||
use Twig\Environment;
|
||||
use Twig\Error\LoaderError;
|
||||
use Twig\Error\RuntimeError;
|
||||
use Twig\Extension\CoreExtension;
|
||||
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;
|
||||
use Twig\TemplateWrapper;
|
||||
|
||||
/* @fluxocaixapro/admin/categories/index.twig */
|
||||
class __TwigTemplate_8ff3a7d87f6563449834e1eb121f41b2 extends Template
|
||||
{
|
||||
private Source $source;
|
||||
/**
|
||||
* @var array<string, Template>
|
||||
*/
|
||||
private array $macros = [];
|
||||
|
||||
public function __construct(Environment $env)
|
||||
{
|
||||
parent::__construct($env);
|
||||
|
||||
$this->source = $this->getSourceContext();
|
||||
|
||||
$this->blocks = [
|
||||
'title' => [$this, 'block_title'],
|
||||
'content' => [$this, 'block_content'],
|
||||
];
|
||||
}
|
||||
|
||||
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
|
||||
{
|
||||
// line 1
|
||||
return "layouts/dashboard.twig";
|
||||
}
|
||||
|
||||
protected function doDisplay(array $context, array $blocks = []): iterable
|
||||
{
|
||||
$macros = $this->macros;
|
||||
$this->parent = $this->load("layouts/dashboard.twig", 1);
|
||||
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
|
||||
}
|
||||
|
||||
// line 3
|
||||
/**
|
||||
* @return iterable<null|scalar|\Stringable>
|
||||
*/
|
||||
public function block_title(array $context, array $blocks = []): iterable
|
||||
{
|
||||
$macros = $this->macros;
|
||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["title"] ?? null), "html", null, true);
|
||||
yield " - ";
|
||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["platformName"] ?? null), "html", null, true);
|
||||
yield from [];
|
||||
}
|
||||
|
||||
// line 5
|
||||
/**
|
||||
* @return iterable<null|scalar|\Stringable>
|
||||
*/
|
||||
public function block_content(array $context, array $blocks = []): iterable
|
||||
{
|
||||
$macros = $this->macros;
|
||||
// line 6
|
||||
yield "<div class=\"container-fluid px-4\">
|
||||
<div class=\"d-flex justify-content-between align-items-center mb-4\">
|
||||
<h1 class=\"mt-4\">";
|
||||
// line 8
|
||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["title"] ?? null), "html", null, true);
|
||||
yield "</h1>
|
||||
<div>
|
||||
<a href=\"";
|
||||
// line 10
|
||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()("/admin/fluxo-caixa"), "html", null, true);
|
||||
yield "\" class=\"btn btn-outline-secondary me-2\">
|
||||
<i class=\"bi bi-arrow-left me-1\"></i> Voltar ao Fluxo
|
||||
</a>
|
||||
<button type=\"button\" class=\"btn btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#newCategoryModal\">
|
||||
<i class=\"bi bi-plus-circle me-1\"></i> Nova Categoria
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
";
|
||||
// line 19
|
||||
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, ($context["flash_messages"] ?? null), "success", [], "any", false, false, false, 19)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
|
||||
// line 20
|
||||
yield " <div class=\"alert alert-success alert-dismissible fade show\" role=\"alert\">
|
||||
";
|
||||
// line 21
|
||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["flash_messages"] ?? null), "success", [], "any", false, false, false, 21), "html", null, true);
|
||||
yield "
|
||||
<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button>
|
||||
</div>
|
||||
";
|
||||
}
|
||||
// line 25
|
||||
yield "
|
||||
<div class=\"card shadow mb-4 border-0\">
|
||||
<div class=\"card-body p-0\">
|
||||
<div class=\"table-responsive\">
|
||||
<table class=\"table table-hover align-middle mb-0\">
|
||||
<thead class=\"bg-light\">
|
||||
<tr>
|
||||
<th class=\"ps-4\">Nome</th>
|
||||
<th>Tipo Padrão</th>
|
||||
<th>Cor</th>
|
||||
<th>Ícone</th>
|
||||
<th>Status</th>
|
||||
<th class=\"text-center\">Ações</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
";
|
||||
// line 41
|
||||
$context['_parent'] = $context;
|
||||
$context['_seq'] = CoreExtension::ensureTraversable(($context["categories"] ?? null));
|
||||
$context['_iterated'] = false;
|
||||
foreach ($context['_seq'] as $context["_key"] => $context["cat"]) {
|
||||
// line 42
|
||||
yield " <tr>
|
||||
<td class=\"ps-4 fw-bold\">";
|
||||
// line 43
|
||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "name", [], "any", false, false, false, 43), "html", null, true);
|
||||
yield "</td>
|
||||
<td>
|
||||
";
|
||||
// line 45
|
||||
if ((CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "type", [], "any", false, false, false, 45) == "income")) {
|
||||
// line 46
|
||||
yield " <span class=\"text-success small\"><i class=\"bi bi-plus-circle me-1\"></i> Receita</span>
|
||||
";
|
||||
} else {
|
||||
// line 48
|
||||
yield " <span class=\"text-danger small\"><i class=\"bi bi-dash-circle me-1\"></i> Despesa</span>
|
||||
";
|
||||
}
|
||||
// line 50
|
||||
yield " </td>
|
||||
<td>
|
||||
<div class=\"d-flex align-items-center\">
|
||||
<div style=\"width: 20px; height: 20px; border-radius: 50%; background-color: ";
|
||||
// line 53
|
||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "color", [], "any", false, false, false, 53), "html", null, true);
|
||||
yield "; margin-right: 8px;\"></div>
|
||||
<small class=\"text-muted\">";
|
||||
// line 54
|
||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "color", [], "any", false, false, false, 54), "html", null, true);
|
||||
yield "</small>
|
||||
</div>
|
||||
</td>
|
||||
<td><i class=\"";
|
||||
// line 57
|
||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "icon", [], "any", false, false, false, 57), "html", null, true);
|
||||
yield " fs-5\"></i></td>
|
||||
<td>
|
||||
";
|
||||
// line 59
|
||||
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "is_active", [], "any", false, false, false, 59)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
|
||||
// line 60
|
||||
yield " <span class=\"badge bg-success\">Ativa</span>
|
||||
";
|
||||
} else {
|
||||
// line 62
|
||||
yield " <span class=\"badge bg-secondary\">Inativa</span>
|
||||
";
|
||||
}
|
||||
// line 64
|
||||
yield " </td>
|
||||
<td class=\"text-center\">
|
||||
<div class=\"btn-group\">
|
||||
<button type=\"button\" class=\"btn btn-sm btn-outline-primary border-0\"
|
||||
data-bs-toggle=\"modal\" data-bs-target=\"#editCategoryModal";
|
||||
// line 68
|
||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "id", [], "any", false, false, false, 68), "html", null, true);
|
||||
yield "\">
|
||||
<i class=\"bi bi-pencil\"></i>
|
||||
</button>
|
||||
<form action=\"";
|
||||
// line 71
|
||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()(("/admin/fluxo-caixa/categories/delete/" . CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "id", [], "any", false, false, false, 71))), "html", null, true);
|
||||
yield "\" method=\"POST\">
|
||||
<button type=\"submit\" class=\"btn btn-sm btn-outline-";
|
||||
// line 72
|
||||
yield (((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "is_active", [], "any", false, false, false, 72)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("warning") : ("success"));
|
||||
yield " border-0\">
|
||||
<i class=\"bi bi-power\"></i>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Modal Editar Categoria -->
|
||||
<div class=\"modal fade\" id=\"editCategoryModal";
|
||||
// line 81
|
||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "id", [], "any", false, false, false, 81), "html", null, true);
|
||||
yield "\" tabindex=\"-1\" aria-hidden=\"true\">
|
||||
<div class=\"modal-dialog\">
|
||||
<div class=\"modal-content\">
|
||||
<div class=\"modal-header\">
|
||||
<h5 class=\"modal-title\">Editar Categoria: ";
|
||||
// line 85
|
||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "name", [], "any", false, false, false, 85), "html", null, true);
|
||||
yield "</h5>
|
||||
<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>
|
||||
</div>
|
||||
<form action=\"";
|
||||
// line 88
|
||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()(("/admin/fluxo-caixa/categories/update/" . CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "id", [], "any", false, false, false, 88))), "html", null, true);
|
||||
yield "\" method=\"POST\">
|
||||
<div class=\"modal-body\">
|
||||
<div class=\"mb-3\">
|
||||
<label class=\"form-label\">Nome da Categoria</label>
|
||||
<input type=\"text\" name=\"name\" class=\"form-control\" value=\"";
|
||||
// line 92
|
||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "name", [], "any", false, false, false, 92), "html", null, true);
|
||||
yield "\" required>
|
||||
</div>
|
||||
<div class=\"row\">
|
||||
<div class=\"col-md-6 mb-3\">
|
||||
<label class=\"form-label\">Tipo Padrão</label>
|
||||
<select name=\"type\" class=\"form-select\">
|
||||
<option value=\"income\" ";
|
||||
// line 98
|
||||
yield (((CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "type", [], "any", false, false, false, 98) == "income")) ? ("selected") : (""));
|
||||
yield ">Receita</option>
|
||||
<option value=\"expense\" ";
|
||||
// line 99
|
||||
yield (((CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "type", [], "any", false, false, false, 99) == "expense")) ? ("selected") : (""));
|
||||
yield ">Despesa</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class=\"col-md-6 mb-3\">
|
||||
<label class=\"form-label\">Cor</label>
|
||||
<input type=\"color\" name=\"color\" class=\"form-control form-control-color w-100\" value=\"";
|
||||
// line 104
|
||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "color", [], "any", false, false, false, 104), "html", null, true);
|
||||
yield "\">
|
||||
</div>
|
||||
</div>
|
||||
<div class=\"mb-3\">
|
||||
<label class=\"form-label\">Ícone (Bootstrap Icon)</label>
|
||||
<input type=\"text\" name=\"icon\" class=\"form-control\" value=\"";
|
||||
// line 109
|
||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "icon", [], "any", false, false, false, 109), "html", null, true);
|
||||
yield "\" placeholder=\"bi bi-tag\">
|
||||
</div>
|
||||
</div>
|
||||
<div class=\"modal-footer\">
|
||||
<button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancelar</button>
|
||||
<button type=\"submit\" class=\"btn btn-primary\">Salvar Alterações</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
";
|
||||
$context['_iterated'] = true;
|
||||
}
|
||||
// line 120
|
||||
if (!$context['_iterated']) {
|
||||
// line 121
|
||||
yield " <tr>
|
||||
<td colspan=\"6\" class=\"text-center py-4 text-muted\">Nenhuma categoria cadastrada.</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
$_parent = $context['_parent'];
|
||||
unset($context['_seq'], $context['_key'], $context['cat'], $context['_parent'], $context['_iterated']);
|
||||
$context = array_intersect_key($context, $_parent) + $_parent;
|
||||
// line 125
|
||||
yield " </tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Nova Categoria -->
|
||||
<div class=\"modal fade\" id=\"newCategoryModal\" tabindex=\"-1\" aria-hidden=\"true\">
|
||||
<div class=\"modal-dialog\">
|
||||
<div class=\"modal-content\">
|
||||
<div class=\"modal-header\">
|
||||
<h5 class=\"modal-title\">Nova Categoria</h5>
|
||||
<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>
|
||||
</div>
|
||||
<form action=\"";
|
||||
// line 140
|
||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()("/admin/fluxo-caixa/categories/store"), "html", null, true);
|
||||
yield "\" method=\"POST\">
|
||||
<div class=\"modal-body\">
|
||||
<div class=\"mb-3\">
|
||||
<label class=\"form-label\">Nome da Categoria</label>
|
||||
<input type=\"text\" name=\"name\" class=\"form-control\" required placeholder=\"Ex: Alimentação, Vendas...\">
|
||||
</div>
|
||||
<div class=\"row\">
|
||||
<div class=\"col-md-6 mb-3\">
|
||||
<label class=\"form-label\">Tipo Padrão</label>
|
||||
<select name=\"type\" class=\"form-select\">
|
||||
<option value=\"income\">Receita</option>
|
||||
<option value=\"expense\" selected>Despesa</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class=\"col-md-6 mb-3\">
|
||||
<label class=\"form-label\">Cor</label>
|
||||
<input type=\"color\" name=\"color\" class=\"form-control form-control-color w-100\" value=\"#0d6efd\">
|
||||
</div>
|
||||
</div>
|
||||
<div class=\"mb-3\">
|
||||
<label class=\"form-label\">Ícone (Bootstrap Icon)</label>
|
||||
<input type=\"text\" name=\"icon\" class=\"form-control\" value=\"bi bi-tag\" placeholder=\"bi bi-tag\">
|
||||
</div>
|
||||
</div>
|
||||
<div class=\"modal-footer\">
|
||||
<button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancelar</button>
|
||||
<button type=\"submit\" class=\"btn btn-primary\">Criar Categoria</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
";
|
||||
yield from [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function getTemplateName(): string
|
||||
{
|
||||
return "@fluxocaixapro/admin/categories/index.twig";
|
||||
}
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function isTraitable(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function getDebugInfo(): array
|
||||
{
|
||||
return array ( 297 => 140, 280 => 125, 271 => 121, 269 => 120, 253 => 109, 245 => 104, 237 => 99, 233 => 98, 224 => 92, 217 => 88, 211 => 85, 204 => 81, 192 => 72, 188 => 71, 182 => 68, 176 => 64, 172 => 62, 168 => 60, 166 => 59, 161 => 57, 155 => 54, 151 => 53, 146 => 50, 142 => 48, 138 => 46, 136 => 45, 131 => 43, 128 => 42, 123 => 41, 105 => 25, 98 => 21, 95 => 20, 93 => 19, 81 => 10, 76 => 8, 72 => 6, 65 => 5, 52 => 3, 41 => 1,);
|
||||
}
|
||||
|
||||
public function getSourceContext(): Source
|
||||
{
|
||||
return new Source("", "@fluxocaixapro/admin/categories/index.twig", "/app/modules/fluxocaixapro/views/admin/categories/index.twig");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user