fix resume in docx format

This commit is contained in:
iIronside 2022-11-24 15:00:09 +03:00
parent 454286ca03
commit 88bab78b3b
2 changed files with 6 additions and 2 deletions

View File

@ -6,6 +6,7 @@ use backend\modules\card\models\ResumeTemplate;
use backend\modules\card\models\UserCard; use backend\modules\card\models\UserCard;
use backend\modules\card\models\UserCardSearch; use backend\modules\card\models\UserCardSearch;
use backend\modules\settings\models\Skill; use backend\modules\settings\models\Skill;
use common\classes\Debug;
use common\models\AchievementUserCard; use common\models\AchievementUserCard;
use common\models\CardSkill; use common\models\CardSkill;
use common\models\FieldsValueNew; use common\models\FieldsValueNew;
@ -267,6 +268,10 @@ class UserCardController extends Controller
->column(); ->column();
$fieldValue = implode(', ', $skills); $fieldValue = implode(', ', $skills);
} elseif ($fieldDbName == 'vc_text') {
$fieldValue = $userCard[$fieldDbName];
$resumeText = str_replace('<p>' . $fieldSignature. '</p>', $fieldValue, $resumeText);
continue;
} else { } else {
$fieldValue = $userCard[$fieldDbName]; $fieldValue = $userCard[$fieldDbName];
} }
@ -296,7 +301,6 @@ class UserCardController extends Controller
private function downloadResumePdf(UserCard $userCard) private function downloadResumePdf(UserCard $userCard)
{ {
// $userCard = UserCard::findOne($id);
$resumeTemplate = ResumeTemplate::findOne($userCard->resume_template_id); $resumeTemplate = ResumeTemplate::findOne($userCard->resume_template_id);

View File

@ -50,7 +50,7 @@ class ResumeTemplate extends \yii\db\ActiveRecord
'${gender}'=> 'gender', '${gender}'=> 'gender',
'${resume}'=> 'resume', '${resume}'=> 'resume',
'${salary}' => 'salary', '${salary}' => 'salary',
'${resume_tariff}' => 'resume_tariff', '${resume_tariff}' => 'resume_tariff',
'${position_id}'=> 'position_id', '${position_id}'=> 'position_id',
'${city}'=> 'city', '${city}'=> 'city',
'${link_vk}' => 'link_vk', '${link_vk}' => 'link_vk',