KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Get active dashboard #2788

Closed GHSix opened this topic on on Aug 8, 2022 - 5 comments

GHSix commented on Aug 8, 2022

Instead of

->onClick(Client::dashboard("SaleBoard")->coolMethod())

How to get the active/last loaded dashoboard? i.e.

->onClick(Client::dashboard()->coolMethod())
KoolReport commented on Aug 8, 2022

You can do:

->onClick(Client::dashboard($this->dashboard())->coolMethod())
GHSix commented on Aug 8, 2022

And if I´m outside of the dashboard, like on the menu or topMenu?

KoolReport commented on Aug 8, 2022

Let say your Dashboard has an action like this:

class MyDashboard extends Dashboard
{
    protected function actionDoSomething($request, $response)
    {

    }
}

At topMenu you can call MyDashboard action at server by following javascript (MyDashboard is an active dashboard)

->onClick("dashboardAction('doSomething')")
GHSix commented on Aug 8, 2022

Dude, that's gold.

This info got to get into the docs!

Thank you

KoolReport commented on Aug 9, 2022

Will be in the docs :)

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed
solved

Dashboard