Modificada redireccion por defecto en formulario de editar para que se quede en editar y no vaya al listado general

This commit is contained in:
imnavajas
2023-07-26 23:02:22 +02:00
parent d25ff9666c
commit 379d540e8b
21 changed files with 24 additions and 27 deletions

View File

@ -206,7 +206,7 @@ class Cliente extends \App\Controllers\GoBaseResourceController
$clienteEntity->fill($sanitizedData);
$thenRedirect = true;
$thenRedirect = false;
endif;
if ($noException && $successfulResult) :
$id = $clienteEntity->id ?? $id;

View File

@ -162,7 +162,7 @@ class Clientecontactos extends \App\Controllers\GoBaseResourceController
$clienteContactoEntity->fill($sanitizedData);
$thenRedirect = true;
$thenRedirect = false;
endif;
if ($noException && $successfulResult) :
$id = $clienteContactoEntity->id ?? $id;

View File

@ -168,7 +168,7 @@ class Clientedistribuidores extends \App\Controllers\GoBaseResourceController
$clienteDistribuidorEntity->fill($sanitizedData);
$thenRedirect = true;
$thenRedirect = false;
endif;
if ($noException && $successfulResult) :
$id = $clienteDistribuidorEntity->id ?? $id;

View File

@ -162,7 +162,7 @@ class Comunidadesautonomas extends \App\Controllers\GoBaseResourceController
$comunidadAutonomaEntity->fill($sanitizedData);
$thenRedirect = true;
$thenRedirect = false;
endif;
if ($noException && $successfulResult) :
$id = $comunidadAutonomaEntity->id ?? $id;

View File

@ -149,7 +149,7 @@ class Formaspago extends \App\Controllers\GoBaseController
$formasPagoEntity->fill($sanitizedData);
$thenRedirect = true;
$thenRedirect = false;
endif;
if ($noException && $successfulResult) :
$id = $formasPagoEntity->id ?? $id;

View File

@ -159,7 +159,7 @@ class Formaspagos extends \App\Controllers\GoBaseResourceController
$formaPagoEntity->fill($sanitizedData);
$thenRedirect = true;
$thenRedirect = false;
endif;
if ($noException && $successfulResult) :
$id = $formaPagoEntity->id ?? $id;

View File

@ -224,7 +224,7 @@ class Group extends \App\Controllers\GoBaseController
$groupEntity->fill($sanitizedData);
$thenRedirect = true;
$thenRedirect = false;
endif;
if ($noException && $successfulResult) :
$id = $groupEntity->id ?? $id;

View File

@ -160,7 +160,7 @@ class Imposiciones extends \App\Controllers\GoBaseResourceController
$imposicion->fill($sanitizedData);
$thenRedirect = true;
$thenRedirect = false;
endif;
if ($noException && $successfulResult) :
$id = $imposicion->id ?? $id;

View File

@ -194,7 +194,7 @@ class Maquinasdefecto extends \App\Controllers\GoBaseResourceController
$maquinasDefectoEntity->fill($sanitizedData);
$thenRedirect = true;
$thenRedirect = false;
endif;
if ($noException && $successfulResult) :
$id = $maquinasDefectoEntity->id ?? $id;

View File

@ -177,7 +177,7 @@ class Maquinastarifasimpresion extends \App\Controllers\GoBaseResourceController
$maquinasTarifasImpresion->fill($sanitizedData);
$thenRedirect = true;
$thenRedirect = false;
endif;
if ($noException && $successfulResult) :
$id = $maquinasTarifasImpresion->id ?? $id;

View File

@ -162,7 +162,7 @@ class Paises extends \App\Controllers\GoBaseResourceController
$paisEntity->fill($sanitizedData);
$thenRedirect = true;
$thenRedirect = false;
endif;
if ($noException && $successfulResult) :
$id = $paisEntity->id ?? $id;

View File

@ -179,7 +179,7 @@ class Papelesgenericos extends \App\Controllers\GoBaseResourceController
$papelGenerico->fill($sanitizedData);
$thenRedirect = true;
$thenRedirect = false;
endif;
if ($noException && $successfulResult) :
$id = $papelGenerico->id ?? $id;

View File

@ -226,7 +226,7 @@ class Papelesimpresion extends \App\Controllers\GoBaseResourceController
$papelImpresion->fill($sanitizedData);
$thenRedirect = true;
$thenRedirect = false;
endif;
if ($noException && $successfulResult) :
$id = $papelImpresion->id ?? $id;

View File

@ -162,7 +162,7 @@ class Provincias extends \App\Controllers\GoBaseResourceController
$provinciaEntity->fill($sanitizedData);
$thenRedirect = true;
$thenRedirect = false;
endif;
if ($noException && $successfulResult) :
$id = $provinciaEntity->id ?? $id;

View File

@ -142,7 +142,7 @@ class Tipologias extends \App\Controllers\GoBaseController
$tipologiasEntity->fill($sanitizedData);
$thenRedirect = true;
$thenRedirect = false;
endif;
if ($noException && $successfulResult) :
$id = $tipologiasEntity->id ?? $id;
@ -155,7 +155,7 @@ class Tipologias extends \App\Controllers\GoBaseController
return $this->redirect2listView('successMessage', $message);
endif;
else:
$this->viewData['successMessage'] = $message;
$this->session->setFlashData('sweet-success', $message);
endif;
endif; // $noException && $successfulResult

View File

@ -195,13 +195,10 @@ class Users extends \App\Controllers\GoBaseController {
$this->session->setFlashdata('formErrors', $this->model->errors());
endif;
$user->fill($sanitizedData);
$thenRedirect = true;
$thenRedirect = false;
endif;
if ($noException && $successfulResult) :
$postData = $this->request->getPost();
@ -227,7 +224,7 @@ class Users extends \App\Controllers\GoBaseController {
return $this->redirect2listView('successMessage', $message);
endif;
else:
$this->viewData['successMessage'] = $message;
$this->session->setFlashData('sweet-success', $message);
endif;
endif; // $noException && $successfulResult

View File

@ -175,7 +175,7 @@ class Tarifaacabadolineas extends \App\Controllers\GoBaseResourceController
$tarifaAcabadoLinea->fill($sanitizedData);
$thenRedirect = true;
$thenRedirect = false;
endif;
if ($noException && $successfulResult) :
$id = $tarifaAcabadoLinea->id ?? $id;

View File

@ -171,7 +171,7 @@ class Tarifaencuadernacionlineas extends \App\Controllers\GoBaseResourceControll
$tarifaEncuadernacionLinea->fill($sanitizedData);
$thenRedirect = true;
$thenRedirect = false;
endif;
if ($noException && $successfulResult) :
$id = $tarifaEncuadernacionLinea->id ?? $id;

View File

@ -171,7 +171,7 @@ class Tarifamanipuladolineas extends \App\Controllers\GoBaseResourceController
$tarifaManipuladoLinea->fill($sanitizedData);
$thenRedirect = true;
$thenRedirect = false;
endif;
if ($noException && $successfulResult) :
$id = $tarifaManipuladoLinea->id ?? $id;

View File

@ -198,7 +198,7 @@ class Tarifasencuadernacion extends \App\Controllers\GoBaseResourceController
return $this->redirect2listView('sweet-success', $message);
endif;
else:
$this->viewData['successMessage'] = $message;
$this->session->setFlashData('sweet-success', $message);
endif;
endif; // $noException && $successfulResult

View File

@ -198,7 +198,7 @@ class Tarifasmanipulado extends \App\Controllers\GoBaseResourceController
return $this->redirect2listView('sweet-success', $message);
endif;
else:
$this->viewData['successMessage'] = $message;
$this->session->setFlashData('sweet-success', $message);
endif;
endif; // $noException && $successfulResult