Hey, I've created a table but and add a costume table but its not be reading on the view.
the code for setup:
areas,percentagem,desempenho
"I",80,"Bom"
"II",70,"Medio"
"III",60,"Mau"
"IV",90,"Bom"
"V",70,"Medio"
"VI",60,"Medio"
"VII",10,"Mau"
"VIII",10,"Mau"
"IX",80,"Bom"
"X",70,"Medio"
"XI",90,"Bom"
class TaxaDesempenhoDeCuidadosNacional extends KoolReport
{
protected function settings()
{
return array(
"dataSources" => array(
"desempenho" => array(
"class" => CSVDataSource::class,
"filePath" => "/home/camjr/Documents/e-imdvbg/MISAU-IMD-VGB/backend/reports/taxadesempenhodecuidados/TaxaDeDesempenho.csv",
),
)
);
}
protected function setup()
{
$this->src('desempenho')
->pipe($this->dataStore('taxa_de_desempenho'));
}
}
the .view.php file:
<div class="row">
<div class="col-12">
<?= Table::create([
"name" => "taxa-desempenho",
"dataSource" => $this->dataStore('taxa_de_desempenho'),
"headers" => [
[
"Area" => [],
"Desempenho" => ["colspan" => "2"],
],
[
"10 Areas" => [],
"%" => [],
"(>=80% \"Bom\")(79%-60%\"Medio\")(>60%\"Mau\")" => [],
]
],
"columns" => [
"Areas" => [
"label" => "Areas",
],
"percentagem" => [
"type" => "number",
"label" => "NĂºmero de US Avaliadas",
"footer" => "sum",
],
"desempenho" => [
"type" => "text",
"label" => "Percentagem",
],
]
]); ?>
</div>
</div>
the csv:
areas,percentagem,desempenho
"I",80,"Bom"
"II",70,"Medio"
"III",60,"Mau"
"IV",90,"Bom"
"V",70,"Medio"
"VI",60,"Medio"
"VII",10,"Mau"
"VIII",10,"Mau"
"IX",80,"Bom"
"X",70,"Medio"
"XI",90,"Bom"
Thank you in advance!