Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions db/migrations/20260727102106_update_insight_menu.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class UpdateInsightMenu extends AbstractMigration
{
public function up(): void
{
// Rename "Insight" menu and move to top
$this->execute("
UPDATE `cms_functions` SET `title_en` = 'Statistics', seq = 0 WHERE `id` = '128';
");
// Put "Sales report" below "Dashboard v2"
$this->execute("
UPDATE `cms_functions` SET `seq` = 19 WHERE `id` = '96';
");
// Remove "Fancy graphs"
$this->execute("
DELETE FROM `cms_functions` WHERE `id` = '102';
");
Comment thread
pylipp marked this conversation as resolved.
}

public function down(): void
{
$this->execute("
UPDATE `cms_functions` SET `title_en` = 'Insight', seq = 6 WHERE `id` = '128';
");
$this->execute("
UPDATE `cms_functions` SET `seq` = 16 WHERE `id` = '96';
");
$this->execute("
INSERT INTO `cms_functions` (`id`, `parent_id`, `title_en`, `include`, `seq`, `alert`, `adminonly`, `visible`, `allusers`, `allcamps`, `action_permissions`) VALUES (102,128,'Fancy Graphs (<span>beta</span>)','fancygraphs',17,0,0,1,0,0,'view_beneficiary_graph');
");
}
}
61 changes: 0 additions & 61 deletions include/fancygraphs.php

This file was deleted.

13 changes: 0 additions & 13 deletions library/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,19 +187,6 @@
'list_sales',
],
],
[
'id' => 102,
'module' => 'Report',
'menu' => 'Fancy graphs (<span>beta</span>)',
'action' => 'fancygraphs',
'adminonly' => '0',
'visible' => '1',
'allusers' => '0',
'allcamps' => '0',
'action_permission' => [
'view_beneficiary_graph',
],
],
[
'id' => 167,
'module' => 'Report',
Expand Down
184 changes: 0 additions & 184 deletions templates/fancygraphs.tpl

This file was deleted.

Loading