Hi,
in one dashboard, i have a BACK button at top and inside a TABLE i have buttons to load another dashboard.
I need to use :
use \koolreport\dashboard\inputs\Button;
use \koolreport\dashboard\fields\Button;
But when I do, my application crash.
If i use both separately, it works.
Panel code :
Panel::create()->width(1/4)->cssClass("trans-row page-title back-button")
->sub([
Button::create()->text("Return to report")->onClick(function(){
return Client::dashboard("SalesByRep")->load();
}),
Button inside Table code :
Button::create("viewDetails")
->type("warning")
->label("")
->textAlign("right")
->text("View Invoices")
->onClick(function($value, $row){
return Client::dashboard("SalesByRepCustomerInvoices")->load([
"customer_id"=>$row["customer_id"],
"customer_name"=>$row["customer_name"],
"start_date"=>$_SESSION['inc_start_date'],
"end_date"=>$_SESSION['inc_end_date']
]);
}),
Thanks for helping