Merge branch 'master' into add_document

# Conflicts:
#	frontend-access.log
#	frontend-error.log
This commit is contained in:
iironside
2022-03-14 14:34:11 +03:00
12 changed files with 2171 additions and 1075 deletions

View File

@ -6,7 +6,7 @@ $this->title = 'Календарь ДР';
?>
<?= \backend\widgets\Calendar::widget([
'css' => '.success{color: orange;}',
'css' => '.success{color: green;}',
'button' => Html::a('<i class="fa fa-table" aria-hidden="true"></i> Таблица',
['table'], ['class' => 'btn btn-primary',]),

View File

@ -21,7 +21,7 @@ class UserCardSearch extends UserCard
{
return [
[['id', 'gender', 'status'], 'integer'],
[['fio', 'passport', 'photo', 'email', 'dob', 'created_at', 'updated_at', 'city'], 'safe'],
[['fio', 'passport', 'photo', 'email', 'dob', 'created_at', 'updated_at', 'city', 'test_task_getting_date', 'test_task_complete_date'], 'safe'],
['skills', 'each', 'rule' => ['integer']],
];
}
@ -83,6 +83,8 @@ class UserCardSearch extends UserCard
'city' => $this->city,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
'test_task_getting_date' => $this->test_task_getting_date,
'test_task_complete_date' => $this->test_task_complete_date,
]);
$query->andFilterWhere(['like', 'fio', $this->fio])

View File

@ -26,7 +26,7 @@ use yii\widgets\ActiveForm;
</div>
</div>
<div class="row" style="padding-bottom: 15px">
<div class="row" style="padding-bottom: 15px">add_a_test_task_completion_date_to_ucer_card
<div class="imgUpload col-xs-6">
<div class="media__upload_img"><img src="<?= $model->photo; ?>" width="100px"/></div>
<?php
@ -176,6 +176,28 @@ use yii\widgets\ActiveForm;
'language' => 'ru',
]
]); ?>
<div class="row">
<div class="col-xs-6">
<?= $form->field($model, 'test_task_getting_date')->input(
'date',
[
'language' => 'en',
"data-format" => "DD MMMM YYYY",
]
) ?>
</div>
<div class="col-xs-6">
<?= $form->field($model, 'test_task_complete_date')->input(
'date',
[
'language' => 'en',
"data-format" => "DD MMMM YYYY",
]
) ?>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<?= $form->field($model, 'achievements')->widget(Select2::class,

View File

@ -88,7 +88,15 @@ $this->params['breadcrumbs'][] = $this->title;
[
'attribute' => 'vc_text',
'format' => 'raw'
]
],
[
'attribute' => 'test_task_getting_date',
'format' => ['datetime', 'php:d.m.Y']
],
[
'attribute' => 'test_task_complete_date',
'format' => ['datetime', 'php:d.m.Y']
],
],
]) ?>

View File

@ -378,6 +378,14 @@
cursor: pointer;
}
.fully_day {
background-color: #99ff99;
}
.empty_day {
background-color: #ff9999;
}
.active_day {
background: #cdcfce;
}

View File

@ -384,6 +384,14 @@
cursor: pointer;
}
.fully_day {
background-color: #99ff99;
}
.empty_day {
background-color: #ff9999;
}
.active_day {
background: #cdcfce;
}

View File

@ -151,7 +151,15 @@ class CalendarHelper {
}
static _getCalendarDay(dayNum, className = ``, color = ``) {
return `<div class="calendar__day ${className}">
let day = ''
if (color === 'danger' && className !== 'inactive') {
day = 'empty_day'
}
else if (color === 'success' && className !== 'inactive') {
day = 'fully_day'
}
return `<div class="calendar__day ${className} ${day} ">
<span class="calendar__date ${color}">${dayNum}</span>
</div>`;
}