From 2d51edc25247ed7deab6ca0f5f567e1e5cda7019 Mon Sep 17 00:00:00 2001 From: Welington De Lima Olegario Date: Fri, 5 Apr 2024 08:32:41 -0300 Subject: [PATCH 1/6] Remove codigo para enviar o usuario a primeira fase Ref.: #3154 --- src/modules/Opportunities/views/opportunity/edit.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/modules/Opportunities/views/opportunity/edit.php b/src/modules/Opportunities/views/opportunity/edit.php index f38ad9fa1f..5be5cbf2e2 100644 --- a/src/modules/Opportunities/views/opportunity/edit.php +++ b/src/modules/Opportunities/views/opportunity/edit.php @@ -6,12 +6,6 @@ use MapasCulturais\i; -$entity = $this->controller->requestedEntity; -if(!$entity->isFirstPhase){ - $url = $app->createUrl("opportunity","edit",[$entity->firstPhase->id]); - $app->redirect($url); -} - $this->layout = 'entity'; $this->import(' From 4a2e435287c9e15e2828e962a2b2aabf05d91484 Mon Sep 17 00:00:00 2001 From: Welington De Lima Olegario Date: Fri, 5 Apr 2024 08:33:28 -0300 Subject: [PATCH 2/6] =?UTF-8?q?Faz=20a=20valida=C3=A7=C3=A3o=20para=20joga?= =?UTF-8?q?r=20o=20ususario=20na=20primeira=20fase=20Ref.:=20#3154?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/OpportunityPhases/Module.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/modules/OpportunityPhases/Module.php b/src/modules/OpportunityPhases/Module.php index 894ceaa05a..ade2e662ed 100644 --- a/src/modules/OpportunityPhases/Module.php +++ b/src/modules/OpportunityPhases/Module.php @@ -212,6 +212,15 @@ function _init () { $self = $this; $registration_repository = $app->repo('Registration'); + // Redireciona o usuario sempre para a primeira fase + $app->hook("GET(opportunity.<>):<<*>>", function() use ($app) { + $entity = $this->requestedEntity; + if(!$entity->isFirstPhase){ + $url = $app->createUrl("opportunity",$this->action,[$entity->firstPhase->id]); + $app->redirect($url); + } + }); + $app->hook('view.partial(singles/registration-edit--categories).params', function(&$params, &$template) use ($app) { if($this->controller->requestedEntity->opportunity->isOpportunityPhase && !$this->controller->requestedEntity->preview) { $template = '_empty'; From f37cec7bf470e26af2f79596326f303e551cb991 Mon Sep 17 00:00:00 2001 From: Carolina Pedrosa Date: Thu, 25 Apr 2024 16:01:12 -0300 Subject: [PATCH 3/6] feat: adiciona click no nome da entidade nos entity-cards. Ref.: #3166 --- .../Components/components/entity-card/template.php | 8 +++++--- .../components/opportunity-list/template.php | 6 +++++- .../Panel/components/panel--entity-card/template.php | 10 ++++++---- .../Panel/components/panel--last-edited/template.php | 4 +++- .../components/panel--last-registrations/template.php | 4 +++- .../components/panel--card-user/template.php | 6 +++++- .../components/system-roles--card/template.php | 8 ++++++++ 7 files changed, 35 insertions(+), 11 deletions(-) diff --git a/src/modules/Components/components/entity-card/template.php b/src/modules/Components/components/entity-card/template.php index e59abd5510..352d448894 100644 --- a/src/modules/Components/components/entity-card/template.php +++ b/src/modules/Components/components/entity-card/template.php @@ -19,9 +19,11 @@