* баг с минутами
* добавлено редактирование портфолио
This commit is contained in:
parent
8e490ce518
commit
c4139baeb2
@ -75,6 +75,7 @@ class Reports extends \yii\db\ActiveRecord
|
|||||||
foreach ($this->task as $task) {
|
foreach ($this->task as $task) {
|
||||||
$this->_task[$i]['task'] = $task->task;
|
$this->_task[$i]['task'] = $task->task;
|
||||||
$this->_task[$i]['hours_spent'] = $task->hours_spent;
|
$this->_task[$i]['hours_spent'] = $task->hours_spent;
|
||||||
|
$this->_task[$i]['minutes_spent'] = $task->minutes_spent;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,6 +51,11 @@ class UserCardController extends Controller
|
|||||||
$result = UserCard::find()->where(['id_user' => $id_user])->asArray()->all();
|
$result = UserCard::find()->where(['id_user' => $id_user])->asArray()->all();
|
||||||
if($result) {
|
if($result) {
|
||||||
$id = $result[0]['id'];
|
$id = $result[0]['id'];
|
||||||
|
$model = $this->findModel($id);
|
||||||
|
if ($model->load(Yii::$app->request->post())) {
|
||||||
|
$model->updated_at = date('Y-m-d h:i:s');
|
||||||
|
$model->save();
|
||||||
|
}
|
||||||
$dataProvider = new ActiveDataProvider([
|
$dataProvider = new ActiveDataProvider([
|
||||||
'query' => FieldsValueNew::find()
|
'query' => FieldsValueNew::find()
|
||||||
->where(['item_id' => $id, 'item_type' => FieldsValueNew::TYPE_PROFILE])
|
->where(['item_id' => $id, 'item_type' => FieldsValueNew::TYPE_PROFILE])
|
||||||
@ -69,7 +74,7 @@ class UserCardController extends Controller
|
|||||||
->all();
|
->all();
|
||||||
|
|
||||||
return $this->render('view', [
|
return $this->render('view', [
|
||||||
'model' => $this->findModel($id),
|
'model' => $model,
|
||||||
'modelFildValue' => $dataProvider,
|
'modelFildValue' => $dataProvider,
|
||||||
'skills' => $skills,
|
'skills' => $skills,
|
||||||
'achievements' => $achievements,
|
'achievements' => $achievements,
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use asmoday74\ckeditor5\EditorClassic;
|
||||||
use yii\grid\GridView;
|
use yii\grid\GridView;
|
||||||
use yii\helpers\Html;
|
use yii\helpers\Html;
|
||||||
|
use yii\widgets\ActiveForm;
|
||||||
use yii\widgets\DetailView;
|
use yii\widgets\DetailView;
|
||||||
|
|
||||||
/* @var $this yii\web\View */
|
/* @var $this yii\web\View */
|
||||||
@ -65,6 +67,18 @@ $this->title = 'Профиль';
|
|||||||
return $model->value;
|
return $model->value;
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
'vc_text'
|
||||||
],
|
],
|
||||||
]); ?>
|
]); ?>
|
||||||
|
|
||||||
|
<?php $form = ActiveForm::begin(); ?>
|
||||||
|
<?= $form->field($model, 'vc_text')->widget(EditorClassic::className(), [
|
||||||
|
'clientOptions' => [
|
||||||
|
'language' => 'ru',
|
||||||
|
]
|
||||||
|
]); ?>
|
||||||
|
<div class="form-group">
|
||||||
|
<?= Html::submitButton('Save', ['class' => 'btn btn-success']) ?>
|
||||||
|
</div>
|
||||||
|
<?php $form = ActiveForm::end(); ?>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user