Example #1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     var_dump($params['ResumeSearch']['resumeProfessions']);
     $query = Resume::find();
     $query->joinWith(['resumeProfessions']);
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id, 'person_id' => $this->person_id, 'salary' => $this->salary, 'vacancy_id' => $this->vacancy_id, 'date_start' => $this->date_start, 'date_end' => $this->date_end, 'resume_status_id' => $this->resume_status_id, 'workplace_id' => $this->workplace_id, 'rec_status_id' => $this->rec_status_id, 'user_id' => $this->user_id, 'dc' => $this->dc]);
     $query->andFilterWhere(['like', 'note', $this->note]);
     if (isset($params['ResumeSearch']['resumeProfessions']) and $params['ResumeSearch']['resumeProfessions'] > '') {
         $query->andWhere(['resume_profession.profession_id' => $this->resumeProfessions]);
     }
     // var_dump($query->prepare(Yii::$app->db->queryBuilder)->createCommand()->rawSql);
     return $dataProvider;
 }
Example #2
0
 public function delete_resume($resume_id)
 {
     Resume::where('id', $resume_id)->delete();
     return redirect('/my/edit/edit_resume');
 }
Example #3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getResume()
 {
     return $this->hasOne(Resume::className(), ['id' => 'resume_id']);
 }
Example #4
0
 function rireki_add_store(Request $request)
 {
     $resume_column = ['office', 'syear', 'smonth', 'eyear', 'emonth', 'r_shokushu', 'r_keitai', 'job_content'];
     $resume = [];
     $resume["user_id"] = $this->user->id;
     foreach ($resume_column as $column) {
         $resume["{$column}"] = $request->input($column);
     }
     Resume::create($resume);
     return redirect('/my/regist/rireki');
 }
Example #5
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getResumes()
 {
     return $this->hasMany(Resume::className(), ['user_id' => 'id']);
 }
Example #6
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getResumes()
 {
     return $this->hasMany(Resume::className(), ['idStudent' => 'idUser']);
 }
Example #7
0
 /**
  * Finds the Resume model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Resume the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Resume::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Example #8
0
 /**
  * 获取求职偏好信息
  */
 public function actionGet_hope()
 {
     $mem_id = $_REQUEST['member_id'];
     $info = Resume::find()->select(['hope_city', 'hope_salary', 'hope_position'])->where(['member_id' => $mem_id])->asArray()->one();
     if ($info) {
         $data['status'] = '200';
         $data['msg'] = 'success';
         $data['data'] = $info;
     } else {
         $data['status'] = '100';
         $data['msg'] = '没有该用户简历信息';
         $data['data'] = '';
     }
     echo json_encode($data);
 }
Example #9
0
echo helpers\Html::a('(посмотреть)', ['/education/index']);
?>
</li>
                <li>Добавил блок "Опыт работы" <?php 
echo helpers\Html::a('(посмотреть)', ['/experience/index']);
?>
</li>
            </ul>
        </div>
        <hr>

        <div class="site-what-do">
            <h4><span class="label label-default">06.07.2015</span></h4>
            <ul>
                <li>Резюме: добавил подробную информацию о соискателе <?php 
echo helpers\Html::a('(посмотреть)', ['/resume/view', 'id' => \app\models\Resume::find('id>0')->one()->id]);
?>
</li>
                <li>Резюме: добавил на форму данные соискателя + валидация при сабмите <?php 
echo helpers\Html::a('(посмотреть)', ['/resume/create']);
?>
</li>
                <li>Добавил флеш сообщения после успешного/неуспешного действия с
                    записью <?php 
echo helpers\Html::a('(посмотреть)', ['/rec-status/update', 'id' => 1]);
?>
</li>
                <li>Во всех блоках добавил кнопки действий <?php 
echo helpers\Html::a('(посмотреть)', ['/rec-status/view', 'id' => 1]);
?>
</li>