diff --git a/backend/modules/reports/views/reports/index.php b/backend/modules/reports/views/reports/index.php index 01575b1..d954271 100644 --- a/backend/modules/reports/views/reports/index.php +++ b/backend/modules/reports/views/reports/index.php @@ -19,6 +19,7 @@ function next_day($date, $number) { return date('Y-m-d', strtotime($date) + 3600 * 24 * $number); } + ?>
@@ -28,33 +29,35 @@ function next_day($date, $number)

request->url .'?ReportsSearch[created_at]='; - } else{ - $url = '../..'.Yii::$app->request->url .'&ReportsSearch[created_at]='; + if (!$_GET) { + $url = '../..' . Yii::$app->request->url . '?ReportsSearch[created_at]='; + } else { + $url = '../..' . Yii::$app->request->url . '&ReportsSearch[created_at]='; } for ($date = TODAY; $date != WEEK_AGO; $date = next_day($date, -1)): ?> - 'btn btn-primary']) ?> + $date], ['class' => 'btn btn-primary']) ?>

- + + field($searchModel, 'today')->hiddenInput()->label(false) ?> +
- - - - - - '; - } - ?> + + + + + + '; + } + ?> @@ -71,7 +74,7 @@ function next_day($date, $number) 'btn btn-danger sort_by_date', 'type' => 'submit']) ?> - 'btn btn-dark']) ?> + 'btn btn-primary']) ?>
@@ -89,33 +92,33 @@ function next_day($date, $number) [ 'format' => 'raw', 'attribute' => 'created_at', - 'filter' => Html::input('date', 'ReportsSearch[created_at]', + 'filter' => Html::input('date', 'ReportsSearch[created_at]', null, [ 'class' => 'form-control', 'style' => 'display:', 'id' => 'date' - ]) , + ]), 'value' => 'created_at', ], - [ - 'attribute' => 'today', - 'format' => 'raw', - 'value' => function ($model) { - - $text = ''; - if ($model->task) { - $i = 1; - foreach ($model->task as $task) { - $text .= "

$i. ($task->hours_spent ч.) $task->task

"; - $i++; - } - } - return $text; - } - ], - 'difficulties', - 'tomorrow', +// [ +// 'attribute' => 'today', +// 'format' => 'raw', +// 'value' => function ($model) { +// +// $text = ''; +// if ($model->task) { +// $i = 1; +// foreach ($model->task as $task) { +// $text .= "

$i. ($task->hours_spent ч.) $task->task

"; +// $i++; +// } +// } +// return $text; +// } +// ], + //'difficulties', + //'tomorrow', [ 'format' => 'raw', 'attribute' => 'user_card_id', @@ -130,7 +133,7 @@ function next_day($date, $number) ], ]), 'value' => function ($data) { - return '' . \common\models\Reports::getFio($data) . ''; + return '' . \common\models\Reports::getFio($data) . ''; }, ], diff --git a/backend/views/layouts/main.php b/backend/views/layouts/main.php index 4887ecb..34f6b6c 100755 --- a/backend/views/layouts/main.php +++ b/backend/views/layouts/main.php @@ -35,8 +35,8 @@ if (Yii::$app->controller->action->id === 'login') { <?= Html::encode($this->title) ?> head() ?> - - + + beginBody() ?>