add ugiro changes

This commit is contained in:
2016-04-18 19:22:53 +02:00
parent 01ada90e8c
commit 776e0ea3e0
4 changed files with 47 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ use yii\web\UploadedFile;
use yii\data\ArrayDataProvider;
use yii\db\Query;
use yii\data\ActiveDataProvider;
use common\models\MessageDetsta;
/**
* UgiroController implements the CRUD actions for Ugiro model.
@@ -97,6 +98,7 @@ class UgiroController extends Controller {
'koteg' => $model
] );
$processor->run ();
$this->redirect(['view', 'id' => $model->id_ugiro]);
} else {
\Yii::$app->session->setFlash ( 'danger', 'Nem lehet futtatni a fájlt' );
\Yii::error ( "a koteg státusza nem STATUS_RECIEVED. A koteg azonosíótja:" . $model->id_ugiro );
@@ -111,8 +113,19 @@ class UgiroController extends Controller {
}
}
$query = MessageDetsta::find();
$query->andWhere(['id_ugiro' => $model->id_ugiro]);
$query->orderBy([ 'created_at' => SORT_ASC ]);
$detstaDp = new ActiveDataProvider([
'query' => $query,
'pagination' => false,
'sort' => false
]);
return $this->render ( 'view', [
'model' => $this->findModel ( $id )
'model' => $this->findModel ( $id ) ,
'detstaDp' => $detstaDp
] );
}
protected function downloadUgiro($model) {