Allow creating same dashlets from different modules

This commit is contained in:
Yonas Habteab 2022-06-10 10:37:54 +02:00
parent ec4d246a3c
commit a2e9d3c946
2 changed files with 3 additions and 1 deletions

View File

@ -63,7 +63,7 @@ class SetupNewDashboardForm extends BaseDashboardForm
if (! $strict && $title && $url) {
$dashlet
->setUrl($url)
->setName($title)
->setName($title . '(' . $module . ')')
->setTitle($title);
}

View File

@ -212,6 +212,8 @@ class Pane extends BaseDashboard implements Sortable
'module_dashlet_id' => $systemUuid
]);
}
$this->addEntry($dashlet);
} elseif (! $this->hasEntry($dashlet->getName()) || ! $moveDashlet) {
$filterCondition = [
'id = ?' => $dashlet->getUuid(),