spec and exp
This commit is contained in:
parent
4c3930f5e6
commit
93f7d4496c
@ -136,6 +136,15 @@ use yii\widgets\ActiveForm;
|
|||||||
['prompt' => '...']
|
['prompt' => '...']
|
||||||
) ?>
|
) ?>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<?= $form->field($model, 'specification')->textInput(['maxlength' => true]) ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<?= $form->field($model, 'years_of_exp')->input('number') ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,6 +41,10 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
return \common\models\UserCard::getLevelLabel($model->level);
|
return \common\models\UserCard::getLevelLabel($model->level);
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'attribute' => 'specification',
|
||||||
|
'value' => $model->specification
|
||||||
|
],
|
||||||
[
|
[
|
||||||
'attribute' => 'resume',
|
'attribute' => 'resume',
|
||||||
'format' => 'raw',
|
'format' => 'raw',
|
||||||
|
@ -28,6 +28,8 @@ use yii\helpers\ArrayHelper;
|
|||||||
* @property string $salary
|
* @property string $salary
|
||||||
* @property string $vc_text
|
* @property string $vc_text
|
||||||
* @property string $vc_text_short
|
* @property string $vc_text_short
|
||||||
|
* @property string $specification
|
||||||
|
* @property int $years_of_exp
|
||||||
* @property int $position_id
|
* @property int $position_id
|
||||||
* @property int $city
|
* @property int $city
|
||||||
* @property int $level
|
* @property int $level
|
||||||
@ -96,9 +98,9 @@ class UserCard extends \yii\db\ActiveRecord
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
[['fio', 'status', 'gender', 'email', 'level', 'position_id'], 'required'],
|
[['fio', 'status', 'gender', 'email', 'level', 'position_id'], 'required'],
|
||||||
[['gender', 'status', 'position_id', 'id_user', 'level'], 'integer'],
|
[['gender', 'status', 'position_id', 'id_user', 'level', 'years_of_exp'], 'integer'],
|
||||||
[['dob', 'created_at', 'updated_at', 'deleted_at', 'vc_text', 'vc_text_short'], 'safe'],
|
[['dob', 'created_at', 'updated_at', 'deleted_at', 'vc_text', 'vc_text_short'], 'safe'],
|
||||||
[['fio', 'passport', 'photo', 'email', 'resume', 'city', 'link_vk', 'link_telegram'], 'string', 'max' => 255],
|
[['fio', 'passport', 'photo', 'email', 'resume', 'city', 'link_vk', 'link_telegram', 'specification'], 'string', 'max' => 255],
|
||||||
[['salary'], 'string', 'max' => 100],
|
[['salary'], 'string', 'max' => 100],
|
||||||
[['position_id'], 'exist', 'skipOnError' => true, 'targetClass' => Position::class, 'targetAttribute' => ['position_id' => 'id']],
|
[['position_id'], 'exist', 'skipOnError' => true, 'targetClass' => Position::class, 'targetAttribute' => ['position_id' => 'id']],
|
||||||
[['status'], 'exist', 'skipOnError' => true, 'targetClass' => Status::class, 'targetAttribute' => ['status' => 'id']],
|
[['status'], 'exist', 'skipOnError' => true, 'targetClass' => Status::class, 'targetAttribute' => ['status' => 'id']],
|
||||||
@ -131,7 +133,9 @@ class UserCard extends \yii\db\ActiveRecord
|
|||||||
'link_telegram' => 'Telegram',
|
'link_telegram' => 'Telegram',
|
||||||
'vc_text' => 'Резюме текст',
|
'vc_text' => 'Резюме текст',
|
||||||
'vc_text_short' => 'Резюме короткий текст',
|
'vc_text_short' => 'Резюме короткий текст',
|
||||||
'level' => 'Уровень'
|
'level' => 'Уровень',
|
||||||
|
'years_of_exp' => 'Лет опыта',
|
||||||
|
'specification' => 'Спецификация'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use yii\db\Migration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class m210811_140738_add_columns_years_of_exp_to_user_card_table
|
||||||
|
*/
|
||||||
|
class m210811_140738_add_columns_years_of_exp_to_user_card_table extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function safeUp()
|
||||||
|
{
|
||||||
|
$this->addColumn('user_card', 'years_of_exp', $this->integer(2));
|
||||||
|
$this->addColumn('user_card', 'specification', $this->string(255));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function safeDown()
|
||||||
|
{
|
||||||
|
$this->dropColumn('user_card', 'years_of_exp');
|
||||||
|
$this->dropColumn('user_card', 'specification');
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Use up()/down() to run migration code without a transaction.
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
echo "m210811_140738_add_columns_years_of_exp_to_user_card_table cannot be reverted.\n";
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user