/** * Creates data provider instance with search query applied * * @param array $params * * @return ActiveDataProvider */ public function search($params) { $query = LgKendaraan::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(['kode' => $this->kode, 'tahun_pembelian' => $this->tahun_pembelian, 'jenis_transportasi' => $this->jenis_transportasi, 'penanggung_jawab' => $this->penanggung_jawab, 'berat_muatan' => $this->berat_muatan, 'status_pemakaian' => $this->status_pemakaian]); $query->andFilterWhere(['like', 'nomor_polisi', $this->nomor_polisi])->andFilterWhere(['like', 'bahan_bakar', $this->bahan_bakar]); return $dataProvider; }
protected function findModelKendaraan($id) { if (($model = LgKendaraan::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
use yii\helpers\Html; use yii\widgets\ActiveForm; use app\models\logistic\LgKendaraan; /* @var $this yii\web\View */ /* @var $model app\models\logistic\LgStatusKendaraan */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="lg-status-kendaraan-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'kendaraan')->dropdownList(LgKendaraan::find()->select(['nomor_polisi', 'kode'])->indexBy('kode')->column(), ['prompt' => 'Select Kendaraan', 'disabled' => true]); ?> <?php echo $form->field($model, 'tgl_permasalahan')->textInput(['readonly' => true]); ?> <?php echo $form->field($model, 'permasalahan')->textArea(['maxlength' => true]); ?> <?php echo $form->field($model, 'tanggal_solusi')->textInput(['readonly' => true, 'value' => date("Y-m-h")]); ?> <?php
<?php use yii\helpers\Html; use yii\grid\GridView; use app\models\logistic\LgKendaraan; $status = new LgKendaraan(); /* @var $this yii\web\View */ /* @var $searchModel app\models\logistic\LgKendaraanSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = 'Monitoring Kendaraan'; $this->params['breadcrumbs'][] = $this->title; ?> <div class="col-md-12"> <div class="col-md-12"> <div class="widget widget-green"> <div class="widget-title"> <div class="widget-controls"> <a href="#" class="widget-control widget-control-full-screen" data-toggle="tooltip" data-placement="top" title="" data-original-title="Full Screen"><i class="fa fa-expand"></i></a> <a href="#" class="widget-control widget-control-full-screen widget-control-show-when-full" data-toggle="tooltip" data-placement="left" title="" data-original-title="Exit Full Screen"><i class="fa fa-expand"></i></a> <a href="#" class="widget-control widget-control-refresh" data-toggle="tooltip" data-placement="top" title="" data-original-title="Refresh"><i class="fa fa-refresh"></i></a> <a href="#" class="widget-control widget-control-minimize" data-toggle="tooltip" data-placement="top" title="" data-original-title="Minimize"><i class="fa fa-minus-circle"></i></a> </div> <h3><i class="fa fa-ok-circle"></i><?php echo Html::encode($this->title); ?> </h3> </div> <div class="widget-content"> <div class="row"> <div class="col-md-12"> <?php
<?php use yii\helpers\Html; use yii\widgets\DetailView; use app\models\logistic\LgKendaraan; $status = new LgKendaraan(); /* @var $this yii\web\View */ /* @var $model app\models\logistic\LgKendaraan */ $this->title = 'Detail Kendaraan: ' . ' ' . $model->kode; $this->params['breadcrumbs'][] = ['label' => 'Lg Kendaraans', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; ?> <div class="col-md-12"> <div class="col-md-12"> <div class="widget widget-green"> <div class="widget-title"> <div class="widget-controls"> <a href="#" class="widget-control widget-control-full-screen" data-toggle="tooltip" data-placement="top" title="" data-original-title="Full Screen"><i class="fa fa-expand"></i></a> <a href="#" class="widget-control widget-control-full-screen widget-control-show-when-full" data-toggle="tooltip" data-placement="left" title="" data-original-title="Exit Full Screen"><i class="fa fa-expand"></i></a> <a href="#" class="widget-control widget-control-refresh" data-toggle="tooltip" data-placement="top" title="" data-original-title="Refresh"><i class="fa fa-refresh"></i></a> <a href="#" class="widget-control widget-control-minimize" data-toggle="tooltip" data-placement="top" title="" data-original-title="Minimize"><i class="fa fa-minus-circle"></i></a> </div> <h3><i class="fa fa-ok-circle"></i><?php echo Html::encode($this->title); ?> </h3> </div> <div class="widget-content"> <div class="row"> <div class="col-md-12"> <p>