Hello, I have added same as example of visual query builder but UI doesn't look good. Please let me know what i am missing.
Code:
<?php
use \koolreport\visualQuery\VisualQuery;
use \koolreport\datagrid\DataTables;
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Présentation</title>
</head>
<body>
<form method="post">
<div class="report-content">
<div class="text-center">
<h1>VisualQuery</h1>
<p class="lead">
The basic working of VisualQuery
</p>
</div>
<?php
\koolreport\visualquery\VisualQuery::create(array(
"name" => "visualquery1",
"themeBase" => "bs4",
"schema" => "salesSchema",
"defaultValue" => [
"selectDistinct" => false,
"selectTables" => [
"orders",
"customers",
],
"selectFields" => [
"orders.orderNumber",
],
"filters" => [
"(",
[
"field" => "orders.orderDay",
"operator" => ">",
"value1" => "2001-01-01",
"value2" => "",
"logic" => "and",
"toggle" => true,
],
")",
],
"groups" => [
[
"field" => "orders.orderNumber",
"toggle" => true
]
],
"limit" => [
"offset" => 5,
"limit" => 10,
"toggle" => false,
]
],
"activeTab" => "filters",
));
?>
<button type='submit' class='btn btn-light'>Submit</button>
<style>
pre {
overflow-x: auto;
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
}
</style>
<div style="margin: 30px; width:800px">
<b>Select query:</b>
<pre style="width:800px"><?php echo $this->queryStr; ?></pre>
<b>Query with parameters:</b>
<pre style="width:800px"><?php echo $this->paramQuery; ?></pre>
<b>Parameters:</b>
<?php \koolreport\core\Utility::prettyPrint($this->sqlParams); ?>
</div>
<?php
// print_r($this->dataStore('vqDS')->meta());
DataTables::create(array(
"name" => "charttable1",
"dataSource" => $this->dataStore('vqDS'),
// "columns" => ["Quantity", "Product Name"],
"options" => [
"paging" => true
]
));
?>
</div>
</form>
</body>
</html>