Merge branch 'add_header_to_resume_template' into document

This commit is contained in:
iIronside
2022-11-15 12:08:09 +03:00
12 changed files with 185 additions and 86 deletions

View File

@ -16,6 +16,8 @@ use yii\helpers\ArrayHelper;
* @property string $updated_at
* @property int $status
* @property string $template_body
* @property string $header_text
* @property string $header_image
*/
class ResumeTemplate extends \yii\db\ActiveRecord
{
@ -87,7 +89,7 @@ class ResumeTemplate extends \yii\db\ActiveRecord
[['created_at', 'updated_at'], 'safe'],
[['status'], 'integer'],
[['template_body'], 'string'],
[['title'], 'string', 'max' => 255],
[['title', 'header_text', 'header_image'], 'string', 'max' => 255],
];
}
@ -102,7 +104,9 @@ class ResumeTemplate extends \yii\db\ActiveRecord
'created_at' => 'Created At',
'updated_at' => 'Updated At',
'status' => 'Статус',
'template_body' => 'Template Body'
'template_body' => 'Template Body',
'header_text' => 'Текст в верхнем контикуле',
'header_image' => 'Картинка в верхнем контикуле',
];
}
}

View File

@ -39,9 +39,11 @@ use yii\helpers\ArrayHelper;
* @property string $test_task_getting_date
* @property string $test_task_complete_date
* @property string $resume_text
* @property int $resume_template_id
*
* @property FieldsValue[] $fieldsValues
* @property ProjectUser[] $projectUsers
* @property ResumeTemplate $resumeTemplate
* @property Position $position
* @property Status $status0
* @property Achievement[] $achievements
@ -59,7 +61,7 @@ class UserCard extends \yii\db\ActiveRecord
const SCENARIO_GENERATE_RESUME_TEXT = 'generate_resume_text';
const SCENARIO_UPDATE_RESUME_TEXT = 'update_resume_text';
public $resumeTemplateId;
// public $resumeTemplateId;
/**
* @return string[]
@ -117,9 +119,10 @@ class UserCard extends \yii\db\ActiveRecord
[['salary'], 'string', 'max' => 100],
[['position_id'], 'exist', 'skipOnError' => true, 'targetClass' => Position::class, 'targetAttribute' => ['position_id' => 'id']],
[['status'], 'exist', 'skipOnError' => true, 'targetClass' => Status::class, 'targetAttribute' => ['status' => 'id']],
['resumeTemplateId', 'required', 'on' => self::SCENARIO_GENERATE_RESUME_TEXT],
['resumeTemplateId', 'integer', 'on' => self::SCENARIO_GENERATE_RESUME_TEXT],
['resume_template_id', 'required', 'on' => self::SCENARIO_GENERATE_RESUME_TEXT],
['resume_template_id', 'integer', 'on' => self::SCENARIO_GENERATE_RESUME_TEXT],
['resume_text', 'required', 'on' => self::SCENARIO_UPDATE_RESUME_TEXT],
// [['resume_template_id'], 'exist', 'skipOnError' => true, 'targetClass' => ResumeTemplate::className(), 'targetAttribute' => ['resume_template_id' => 'id'], 'on' => self::SCENARIO_GENERATE_RESUME_TEXT],
];
}
@ -154,7 +157,7 @@ class UserCard extends \yii\db\ActiveRecord
'specification' => 'Спецификация',
'test_task_getting_date' => 'Дата получения тестового',
'test_task_complete_date' => 'Дата выполнения тестового',
'resumeTemplateId' => 'Шаблон резюме',
'resume_template_id' => 'Шаблон резюме',
'resume_text' => 'Резюме сгенерированный текст'
];
}