commit
53514bee94
@ -75,6 +75,7 @@ class Reports extends \yii\db\ActiveRecord
|
||||
foreach ($this->task as $task) {
|
||||
$this->_task[$i]['task'] = $task->task;
|
||||
$this->_task[$i]['hours_spent'] = $task->hours_spent;
|
||||
$this->_task[$i]['minutes_spent'] = $task->minutes_spent;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
@ -51,6 +51,11 @@ class UserCardController extends Controller
|
||||
$result = UserCard::find()->where(['id_user' => $id_user])->asArray()->all();
|
||||
if($result) {
|
||||
$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([
|
||||
'query' => FieldsValueNew::find()
|
||||
->where(['item_id' => $id, 'item_type' => FieldsValueNew::TYPE_PROFILE])
|
||||
@ -69,7 +74,7 @@ class UserCardController extends Controller
|
||||
->all();
|
||||
|
||||
return $this->render('view', [
|
||||
'model' => $this->findModel($id),
|
||||
'model' => $model,
|
||||
'modelFildValue' => $dataProvider,
|
||||
'skills' => $skills,
|
||||
'achievements' => $achievements,
|
||||
|
@ -1,7 +1,9 @@
|
||||
<?php
|
||||
|
||||
use asmoday74\ckeditor5\EditorClassic;
|
||||
use yii\grid\GridView;
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
use yii\widgets\DetailView;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
@ -67,4 +69,15 @@ $this->title = 'Профиль';
|
||||
],
|
||||
],
|
||||
]); ?>
|
||||
|
||||
<?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>
|
||||
|
Loading…
Reference in New Issue
Block a user