Merge pull request #72 from q6q9/changes

add resume & fix bag minutes
This commit is contained in:
kavalar 2021-11-29 13:53:26 +03:00 committed by GitHub
commit 53514bee94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 1 deletions

View File

@ -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++;
} }
} }

View File

@ -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,

View File

@ -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 */
@ -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> </div>