Skip to content

Commit f18d176

Browse files
committed
wip
1 parent 5a97c56 commit f18d176

9 files changed

Lines changed: 192 additions & 193 deletions

File tree

src/Control/ColumnPicker/ColumnPickerControl.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class ColumnPickerControl extends DataControl
1818
{
1919
#[Persistent] public ?string $column = null;
20-
public array $onPick = [];
20+
public array $onPick = [];
2121

2222

2323
public function __construct(
@@ -34,24 +34,24 @@ public function loadState(array $params): void
3434
}
3535

3636

37-
public function render(): void
38-
{
39-
$this->template->column = $this->column;
37+
public function render(): void
38+
{
39+
$this->template->column = $this->column;
4040
$this->template->columns = $this->columns;
4141
$this->template->rowColumn = $this->main->getRowColumn();
42-
$this->template->render($this->main->getView()->columnPickerTemplate);
43-
}
42+
$this->template->render($this->main->getView()->columnPickerTemplate);
43+
}
4444

4545

46-
public function handlePick(?string $column = null): void
47-
{
48-
$this->column = $column;
46+
public function handlePick(?string $column = null): void
47+
{
48+
$this->column = $column;
4949
if (!isset($this->columns[$column]) || $this->columns[$column]->hide) {
5050
throw new BadRequestException;
5151
}
52-
if ($this->presenter->isAjax()) {
53-
$this->onPick($this);
54-
$this->redrawControl();
55-
}
56-
}
52+
if ($this->presenter->isAjax()) {
53+
$this->onPick($this);
54+
$this->redrawControl();
55+
}
56+
}
5757
}

src/Control/ColumnPicker/ColumnPickerTemplate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class ColumnPickerTemplate extends DataTemplate
1212
{
13-
public ?string $column;
13+
public ?string $column;
1414
public array $columns;
1515
public Column $rowColumn;
1616
}

src/Control/Crosstab/CrosstabControl.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct(
4242

4343
public function loadState(array $params): void
4444
{
45-
parent::loadState($params); // TODO: Change the autogenerated stub
45+
parent::loadState($params);
4646
$this->filter()->sort();
4747
}
4848

@@ -147,7 +147,6 @@ private function filter(): self
147147
$this->rowCollection = $this->getRowCollection()->findBy($column->filter->options[$value]->condition);
148148
$this->totalCollection = $this->getTotalCollection()->findBy($column->filter->options[$value]->condition);
149149
} else {
150-
bdump([$column->name => $value]);
151150
$this->collection = $this->getCollection()->findBy([$column->name => $value]);
152151
$this->columnCollection = $this->getColumnCollection()->findBy([$column->name => $value]);
153152
$this->rowCollection = $this->getRowCollection()->findBy([$column->name => $value]);
@@ -160,7 +159,7 @@ private function filter(): self
160159

161160
private function sort(): self
162161
{
163-
// $this->collection = $this->getCollection()->orderBy(Helper::getNextrasName($this->getRowColumn()->columnName));
162+
$this->collection = $this->getCollection()->orderBy(Helper::getNextrasName($this->getRowColumn()->columnName));
164163
return $this;
165164
}
166165

src/Control/RowPicker/RowPickerControl.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class RowPickerControl extends DataControl
1818
{
1919
#[Persistent] public ?string $row = null;
20-
public array $onPick = [];
20+
public array $onPick = [];
2121

2222

2323
public function __construct(
@@ -35,23 +35,23 @@ public function loadState(array $params): void
3535

3636

3737
public function render(): void
38-
{
39-
$this->template->row = $this->row;
38+
{
39+
$this->template->row = $this->row;
4040
$this->template->columns = $this->columns;
4141
$this->template->columnColumn = $this->main->getColumnColumn();
42-
$this->template->render($this->main->getView()->rowPickerTemplate);
43-
}
42+
$this->template->render($this->main->getView()->rowPickerTemplate);
43+
}
4444

4545

46-
public function handlePick(?string $row = null): void
47-
{
48-
$this->row = $row;
46+
public function handlePick(?string $row = null): void
47+
{
48+
$this->row = $row;
4949
if (!isset($this->columns[$row]) || $this->columns[$row]->hide) {
5050
throw new BadRequestException;
5151
}
52-
if ($this->presenter->isAjax()) {
53-
$this->onPick($this);
54-
$this->redrawControl();
55-
}
56-
}
52+
if ($this->presenter->isAjax()) {
53+
$this->onPick($this);
54+
$this->redrawControl();
55+
}
56+
}
5757
}

src/Control/RowPicker/RowPickerTemplate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class RowPickerTemplate extends DataTemplate
1212
{
13-
public ?string $row;
13+
public ?string $row;
1414
public array $columns;
1515
public Column $columnColumn;
1616
}

0 commit comments

Comments
 (0)