fix : add breadcumbs and fix button save

This commit is contained in:
amazuecos
2024-10-20 17:50:49 +00:00
parent ac3a93370c
commit 49e03fb7e9
2 changed files with 11 additions and 2 deletions

View File

@ -30,15 +30,24 @@ class ConfigErrores extends BaseResourceController
public function index() public function index()
{ {
$this->viewData['breadcrumb'] = [
['title' => lang("App.menu_configuration"), 'route' => "javascript:void(0);", 'active' => false],
['title' => lang("App.menu_error_presupuesto"), 'route' => site_url('configuracion/errores-presupuesto'), 'active' => true]
];
return view(static::$viewPath . $this->indexRoute, $this->viewData); return view(static::$viewPath . $this->indexRoute, $this->viewData);
} }
public function viewForm(int $error_presupuesto_id) public function viewForm(int $error_presupuesto_id)
{ {
$this->viewData['breadcrumb'] = [
['title' => lang("App.menu_configuration"), 'route' => "javascript:void(0);", 'active' => false],
['title' => lang("App.menu_error_presupuesto"), 'route' => site_url('configuracion/errores-presupuesto'), 'active' => true]
];
$this->viewData["error_presupuesto_id"] = $error_presupuesto_id;
$this->errorPresupuestoModel->update($error_presupuesto_id, [ $this->errorPresupuestoModel->update($error_presupuesto_id, [
"last_user_id" => auth()->user()->id, "last_user_id" => auth()->user()->id,
"visto" => true, "visto" => true,
]); ]);
return view(static::$viewPath . 'viewErrorPresupuestoForm', ["error_presupuesto_id" => $error_presupuesto_id]); return view(static::$viewPath . 'viewErrorPresupuestoForm', $this->viewData);
} }
public function store() public function store()
{ {

View File

@ -56,7 +56,7 @@
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<button class="btn btn-primary button-update-comment w-100" type="button"> <button class="btn btn-primary button-update-comment" type="button">
<span class="ti ti-sm ti-send me-1" id="update-button-icon"></span> <span class="ti ti-sm ti-send me-1" id="update-button-icon"></span>
<span class="spinner-border me-1" role="status" aria-hidden="true" id="update-button-loader" hidden></span> <span class="spinner-border me-1" role="status" aria-hidden="true" id="update-button-loader" hidden></span>
<?= lang("App.global_save") ?></button> <?= lang("App.global_save") ?></button>