Skip to content

Commit

Permalink
Fix tab rendering for EnrollmentFlow plugins (COmanage#235)
Browse files Browse the repository at this point in the history
* Fix tab rendering for EnrollmentFlow plugins

* Improve getLayout trait

* fix enrollment attributes add/edit view title
  • Loading branch information
Ioannis authored and arlen committed Dec 19, 2024
1 parent dc8285c commit 7c078aa
Showing 1 changed file with 6 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
class AttributeCollectorsTable extends Table {
use \App\Lib\Traits\AutoViewVarsTrait;
use \App\Lib\Traits\CoLinkTrait;
use \App\Lib\Traits\LayoutTrait;
use \App\Lib\Traits\PermissionsTrait;
use \App\Lib\Traits\PrimaryLinkTrait;
use \App\Lib\Traits\TabTrait;
Expand Down Expand Up @@ -79,33 +80,17 @@ public function initialize(array $config): void {
$this->setTabsConfig(
[
// Ordered list of Tabs
'tabs' => ['EnrollmentFlows', 'EnrollmentFlowSteps', 'Petitions'],
'tabs' => ['EnrollmentFlowSteps', 'CoreEnroller.AttributeCollectors', 'CoreEnroller.EnrollmentAttributes'],
// What actions will inlcude the subnavigation header
'action' => [
// If a model renders in a subnavigation mode in edit/view mode, it cannot
// render in index mode for the same use case/context
// XXX edit should go first.
'EnrollmentFlows' => ['edit', 'view'],
'EnrollmentFlowSteps' => ['index'],
'Petitions' => ['index'],
'EnrollmentFlowSteps' => ['edit', 'view'],
'CoreEnroller.AttributeCollectors' => ['edit'],
'CoreEnroller.EnrollmentAttributes' => ['index'],
],
// What model will have a counter-badge after the tab title
'counter' => ['EnrollmentFlowSteps', 'Petitions'],
'nested' => [
// Ordered list of Tabs
'tabs' => ['EnrollmentFlowSteps', 'CoreEnroller.AttributeCollectors', 'CoreEnroller.EnrollmentAttributes'],
// What actions will include the subnavigation header
'action' => [
// If a model renders in a subnavigation mode in edit/view mode, it cannot
// render in index mode for the same use case/context
// XXX edit should go first.
'EnrollmentFlowSteps' => ['edit', 'view'],
'CoreEnroller.AttributeCollectors' => ['edit'],
'CoreEnroller.EnrollmentAttributes' => ['index']
],
// What model will have a counter-badge after the tab title
'counter' => ['CoreEnroller.EnrollmentAttributes'],
]
'skipTab' => ['CoreEnroller.AttributeCollectors']
]
);

Expand Down

0 comments on commit 7c078aa

Please sign in to comment.