add resume tariff column to user_card table
This commit is contained in:
parent
0f8aa34b4f
commit
816b39fc74
@ -85,6 +85,7 @@ class UserCardSearch extends UserCard
|
||||
'updated_at' => $this->updated_at,
|
||||
'test_task_getting_date' => $this->test_task_getting_date,
|
||||
'test_task_complete_date' => $this->test_task_complete_date,
|
||||
'resume_tariff' => $this->resume_tariff,
|
||||
]);
|
||||
|
||||
$query->andFilterWhere(['like', 'fio', $this->fio])
|
||||
|
@ -120,6 +120,7 @@ use yii\widgets\ActiveForm;
|
||||
<?php if (Yii::$app->user->can('confidential_information')): ?>
|
||||
<div class="col-xs-6">
|
||||
<?= $form->field($model, 'salary')->textInput(['maxlength' => true]) ?>
|
||||
<?= $form->field($model, 'resume_tariff')->textInput(['maxlength' => true]) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="col-xs-6">
|
||||
|
@ -80,6 +80,10 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'attribute' => 'salary',
|
||||
'visible' => Yii::$app->user->can('confidential_information')
|
||||
],
|
||||
[
|
||||
'attribute' => 'resume_tariff',
|
||||
'visible' => Yii::$app->user->can('confidential_information')
|
||||
],
|
||||
[
|
||||
'attribute' => 'position_id',
|
||||
'value' => (isset($model->position->name)) ? $model->position->name : 'Без должности',
|
||||
|
@ -28,6 +28,7 @@ class ResumeTemplate extends \yii\db\ActiveRecord
|
||||
'Пол' => '${gender}',
|
||||
'Резюме' => '${resume}',
|
||||
'Зароботная плата' => '${salary}',
|
||||
'Ставка для резюме' => '${resume_tariff}',
|
||||
'Позиция' => '${position_id}',
|
||||
'Город' => '${city}',
|
||||
'Ссылка ВК' => '${link_vk}',
|
||||
@ -47,6 +48,7 @@ class ResumeTemplate extends \yii\db\ActiveRecord
|
||||
'${gender}'=> 'gender',
|
||||
'${resume}'=> 'resume',
|
||||
'${salary}' => 'salary',
|
||||
'${resume_tariff}' => 'resume_tariff',
|
||||
'${position_id}'=> 'position_id',
|
||||
'${city}'=> 'city',
|
||||
'${link_vk}' => 'link_vk',
|
||||
@ -104,7 +106,7 @@ class ResumeTemplate extends \yii\db\ActiveRecord
|
||||
'created_at' => 'Created At',
|
||||
'updated_at' => 'Updated At',
|
||||
'status' => 'Статус',
|
||||
'template_body' => 'Template Body',
|
||||
'template_body' => 'Тело шаблона',
|
||||
'header_text' => 'Текст в верхнем контикуле',
|
||||
'header_image' => 'Картинка в верхнем контикуле',
|
||||
];
|
||||
|
@ -40,6 +40,7 @@ use yii\helpers\ArrayHelper;
|
||||
* @property string $test_task_complete_date
|
||||
* @property string $resume_text
|
||||
* @property int $resume_template_id
|
||||
* @property int $resume_tariff
|
||||
*
|
||||
* @property FieldsValue[] $fieldsValues
|
||||
* @property ProjectUser[] $projectUsers
|
||||
@ -112,7 +113,7 @@ class UserCard extends \yii\db\ActiveRecord
|
||||
{
|
||||
return [
|
||||
[['fio', 'status', 'gender', 'email', 'level', 'position_id'], 'required'],
|
||||
[['gender', 'status', 'position_id', 'id_user', 'level', 'years_of_exp'], 'integer'],
|
||||
[['gender', 'status', 'position_id', 'id_user', 'level', 'years_of_exp', 'resume_tariff'], 'integer'],
|
||||
[['dob', 'created_at', 'updated_at', 'deleted_at', 'vc_text', 'vc_text_short', 'test_task_getting_date', 'test_task_complete_date'], 'safe'],
|
||||
['email', 'unique', 'message'=>'Почтовый адрес уже используется'],
|
||||
[['fio', 'passport', 'photo', 'email', 'resume', 'city', 'link_vk', 'link_telegram', 'specification'], 'string', 'max' => 255],
|
||||
@ -158,7 +159,8 @@ class UserCard extends \yii\db\ActiveRecord
|
||||
'test_task_getting_date' => 'Дата получения тестового',
|
||||
'test_task_complete_date' => 'Дата выполнения тестового',
|
||||
'resume_template_id' => 'Шаблон резюме',
|
||||
'resume_text' => 'Резюме сгенерированный текст'
|
||||
'resume_text' => 'Резюме сгенерированный текст',
|
||||
'resume_tariff' => 'Ставка для резюме'
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
/**
|
||||
* Class m221117_091058_add_resume_tariff_column_at_user_card_table
|
||||
*/
|
||||
class m221117_091058_add_resume_tariff_column_at_user_card_table extends Migration
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeUp()
|
||||
{
|
||||
$this->addColumn('user_card', 'resume_tariff', $this->integer());
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeDown()
|
||||
{
|
||||
$this->dropColumn('user_card', 'resume_tariff');
|
||||
}
|
||||
|
||||
/*
|
||||
// Use up()/down() to run migration code without a transaction.
|
||||
public function up()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "m221117_091058_add_resume_tariff_column_at_user_card_table cannot be reverted.\n";
|
||||
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
}
|
Loading…
Reference in New Issue
Block a user