Exemplo n.º 1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Tareas::find();
     $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(['idtareas' => $this->idtareas, 'fecha_inicio' => $this->fecha_inicio, 'fecha_fin' => $this->fecha_fin]);
     $query->andFilterWhere(['like', 'nombre', $this->nombre])->andFilterWhere(['like', 'descripcion', $this->descripcion]);
     return $dataProvider;
 }
Exemplo n.º 2
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Tareas::find();
     $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(['idTareas' => $this->idTareas]);
     $query->andFilterWhere(['like', 'Tarea', $this->Tarea]);
     return $dataProvider;
 }
Exemplo n.º 3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getIdTarea0()
 {
     return $this->hasOne(Tareas::className(), ['idTarea' => 'idTarea']);
 }
Exemplo n.º 4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTareasIdtareas()
 {
     return $this->hasOne(Tareas::className(), ['idtareas' => 'tareas_idtareas']);
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTareas()
 {
     return $this->hasMany(Tareas::className(), ['tipo_tarea_idtipo_tarea' => 'idtipo_tarea']);
 }
Exemplo n.º 6
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTareas()
 {
     return $this->hasMany(Tareas::className(), ['Curso_idCurso' => 'idCurso']);
 }
Exemplo n.º 7
0
/* @var $model app\models\TareaTipo */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="tarea-tipo-form">

    <?php 
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($model, 'idtarea_tipo')->textInput();
?>

    <?php 
echo $form->field($model, 'idTareas')->dropDownList(ArrayHelper::map(Tareas::find()->all(), 'idTareas', 'Tarea'), ['prompt' => 'Seleccione Tarea']);
?>

    <?php 
echo $form->field($model, 'idTipo')->dropDownList(ArrayHelper::map(Tipo::find()->all(), 'idTipo', 'Tipo'), ['prompt' => 'Seleccione Tipo']);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>
Exemplo n.º 8
0
/* @var $form yii\widgets\ActiveForm */
?>

<div class="detalle-form">

    <?php 
$form = ActiveForm::begin();
?>

    
	  <?php 
echo $form->field($model, 'recurso_humano_idrecurso_humano')->dropDownList(ArrayHelper::map(\app\models\RecursoHumano::find()->asArray()->all(), 'idrecurso_humano', 'nombre'), ['prompt' => 'Selecciona']);
?>

	<?php 
echo $form->field($model, 'tareas_idtareas')->dropDownList(ArrayHelper::map(\app\models\Tareas::find()->asArray()->all(), 'idtareas', 'nombre'), ['prompt' => 'Selecciona']);
?>

    

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>

</div>
Exemplo n.º 9
0
 /**
  * Finds the Tareas model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Tareas the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Tareas::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Exemplo n.º 10
0
 public function getTipo()
 {
     $tipo = TipoTarea;
     return $this->hasOne(Tareas::className(), ['idtareas' => 'tareas_idtareas']);
 }
Exemplo n.º 11
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTareasIdtareas()
 {
     return $this->hasMany(Tareas::className(), ['idtareas' => 'tareas_idtareas'])->viaTable('tareas_has_recurso_humano', ['recurso_humano_idrecurso_humano' => 'idrecurso_humano']);
 }