Merge remote-tracking branch 'origin/add_task' into add_task

This commit is contained in:
iIronside
2021-12-21 17:39:44 +03:00
24 changed files with 308 additions and 92 deletions

View File

@ -19,7 +19,7 @@ echo GridView::widget([
if ($model->task) {
$i = 1;
foreach ($model->task as $task) {
$text .= "<p>$i. ($task->hours_spent ч.) $task->task</p>";
$text .= "<p>$i. ($task->hours_spent ч., $task->minutes_spent мин.) $task->task</p>";
$i++;
}
}

View File

@ -20,7 +20,7 @@ echo GridView::widget([
if ($model->task) {
$i = 1;
foreach ($model->task as $task) {
$text .= "<p>$i. ($task->hours_spent ч.) $task->task</p>";
$text .= "<p>$i. ($task->hours_spent ч., $task->minutes_spent мин.) $task->task</p>";
$i++;
}
}

View File

@ -10,6 +10,8 @@ use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model common\models\Reports */
/* @var $form yii\widgets\ActiveForm */
$this->registerCss('.list-cell__task{width:73%}')
?>
<div class="reports-form">
@ -27,6 +29,7 @@ use yii\widgets\ActiveForm;
echo '<b>Дата заполнения отчета:</b>';
echo DatePicker::widget([
'model' => $model,
'language' => 'ru',
'attribute' => 'created_at',
'options' => [],
'pluginOptions' => [
@ -52,6 +55,13 @@ use yii\widgets\ActiveForm;
'style' => 'width:100px'
],
],
[
'name' => 'minutes_spent',
'title' => 'Кол-во минут',
'options' => [
'type' => 'number',
],
],
],
])->label('Какие задачаи были выполнены:'); ?>

View File

@ -37,7 +37,7 @@ $this->params['breadcrumbs'][] = $this->title;
if ($model->task) {
$i = 1;
foreach ($model->task as $task) {
$text .= "<p>$i. ($task->hours_spent ч.) $task->task</p>";
$text .= "<p>$i. ($task->hours_spent ч., $task->minutes_spent мин.) $task->task</p>";
$i++;
}
}

View File

@ -68,7 +68,7 @@ class DateHelper {
static dateToString(date) {
let year = date.getFullYear()
let day = this.intToDate(date.getDate())
let month = this.intToDate(this.isDecember(date) ? 0 : date.getMonth() + 1)
let month = this.intToDate(date.getMonth() + 1)
return year + '-' + month + '-' + day
}