Skip to content

Commit

Permalink
feat: add via hook os novos componentes de cards e dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
vicmagpac committed Jun 26, 2024
1 parent 9e8d07f commit 300dd69
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 3 deletions.
8 changes: 8 additions & 0 deletions src/plugins/Metabase/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ public function _init()
$this->part('search-tabs/agent');
});

$app->hook('template(search.opportunities.search-tabs):after', function(){
$this->part('search-tabs/opportunity');
});

// $app->hook('template(search.spaces.search-tabs):after', function(){
// $this->part('search-tabs/space');
// });
Expand All @@ -35,6 +39,10 @@ public function _init()
$this->part('search-tabs/entity-agent-cards');
});

$app->hook('template(search.opportunities.search-header):after', function(){
$this->part('search-tabs/entity-opportunity-cards');
});

// $app->hook('template(search.spaces.search-header):after', function(){
// $this->part('search-tabs/entity-space-cards');
// });
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

/**
* @var MapasCulturais\App $app
* @var MapasCulturais\Themes\BaseV2\Theme $this
*/

use MapasCulturais\i;

$this->import('
entity-cards
');
?>
<entity-cards type="opportunity"></entity-cards>
19 changes: 19 additions & 0 deletions src/plugins/Metabase/layouts/parts/search-tabs/opportunity.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

/**
* @var MapasCulturais\App $app
* @var MapasCulturais\Themes\BaseV2\Theme $this
*/

use MapasCulturais\i;

$this->import('
search-dashboard
');

?>
<mc-tab icon="indicator" label="<?php i::esc_attr_e('Indicadores') ?>" slug="indicator">
<div class="search__tabs--indicator">
<search-dashboard panel-Id="painel-oportunidades"></search-dashboard>
</div>
</mc-tab>
5 changes: 2 additions & 3 deletions src/themes/BaseV2/assets-src/sass/pages/_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -584,17 +584,16 @@
.search {
.tabs-component__panels {
background: var(--mc-gray-100);
margin-top: size(88);
padding-bottom: size(40);
margin-bottom: 0;
min-height: size(500);

@media (max-width: size(800)) {
margin-top: size(123);
margin-top: size(5);
}

@media (max-width: size(500)) {
margin-top: size(130);
margin-top: size(5);
}
}

Expand Down

0 comments on commit 300dd69

Please sign in to comment.