Initial Integration Result

parent ef1e1b0b
......@@ -3,9 +3,10 @@
namespace backend\modules\ubux;
/**
* ubux module definition class
* module-id: ubux
* module-desc: Modul mengenai Unit Bagian Umum
*/
class Module extends \yii\base\Module
class Ubux extends \yii\base\Module
{
/**
* @inheritdoc
......
<?php
namespace backend\modules\ubux\controllers;
use Yii;
use backend\modules\ubux\models\DataPaket;
use backend\modules\ubux\models\search\DataPaketSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
/**
* DataPaketController implements the CRUD actions for DataPaket model.
* controller-id: data-paket
* controller-desc: Controller untuk me-manage data paket di pos satpam
*/
class DataPaketController extends Controller
{
public function behaviors()
{
return [
//TODO: crud controller actions are bypassed by default, set the appropriate privilege
'privilege' => [
'class' => \Yii::$app->privilegeControl->getAppPrivilegeControlClass(),
'skipActions' => [],
],
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['post'],
],
],
];
}
/**
* action-id: index-by-admin
* action-desc: Display all data by admin view
* Lists all DataPaket models.
* @return mixed
*/
public function actionIndexByAdmin()
{
$searchModel = new DataPaketSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('indexByAdmin', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* action-id: index-by-mahasiswa
* action-desc: Display all data by student view
* Lists all DataPaket mahasiswa & Unknown DataPaket.
* @return mixed
*/
public function actionIndexByMahasiswa()
{
$searchModel = new DataPaketSearch();
$dataProvider = $searchModel->searchUserMahasiswa(Yii::$app->request->queryParams);
return $this->render('indexByMahasiswa', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* action-id: index-by-pegawai
* action-desc: Display all data by employees view
* Lists all DataPaket Pegawai & Unknown DataPaket.
* @return mixed
*/
public function actionIndexByPegawai()
{
$searchModel = new DataPaketSearch();
$dataProvider = $searchModel->searchUserPegawai(Yii::$app->request->queryParams);
return $this->render('indexByPegawai', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* action-id: data-paket-view
* action-desc: Display a package data
* Displays a single DataPaket model.
* @param integer $id
* @return mixed
*/
public function actionDataPaketView($id)
{
return $this->render('DataPaketView', [
'model' => $this->findModel($id),
]);
}
/**
* action-id: data-paket-add
* action-desc: Menambahkan data paket yang datang
* Creates a new DataPaket model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public function actionDataPaketAdd()
{
$model = new DataPaket();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['data-paket-view', 'id' => $model->data_paket_id]);
} else {
return $this->render('DataPaketAdd', [
'model' => $model,
]);
}
}
/**
* action-id: data-paket-edit
* action-desc: Memperbaharui data paket
* Updates an existing DataPaket model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id
* @return mixed
*/
public function actionDataPaketEdit($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['data-paket-view', 'id' => $model->data_paket_id]);
} else {
return $this->render('update', [
'model' => $model,
]);
}
}
/**
* action-id: data-paket-del
* action-desc: Menghapus data paket
* Deletes an existing DataPaket model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
* @return mixed
*/
public function actionDataPaketDel($id)
{
$this->findModel($id)->softDelete();
return $this->redirect(['index']);
}
/**
* Finds the DataPaket model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param integer $id
* @return DataPaket the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id)
{
if (($model = DataPaket::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
}
}
<?php
namespace backend\modules\ubux\controllers;
use Yii;
use backend\modules\ubux\models\DataTamu;
use backend\modules\ubux\models\search\DataTamuSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
/**
* DataTamuController implements the CRUD actions for DataTamu model.
* controller-id: data-tamu
* controller-desc: Controller untuk me-manage data tamu
*/
class DataTamuController extends Controller
{
public function behaviors()
{
return [
//TODO: crud controller actions are bypassed by default, set the appropriate privilege
'privilege' => [
'class' => \Yii::$app->privilegeControl->getAppPrivilegeControlClass(),
'skipActions' => [],
],
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['post'],
],
],
];
}
/**
* action-id: index
* action-desc: Display all data
* Lists all DataTamu models.
* @return mixed
*/
public function actionIndex()
{
$searchModel = new DataTamuSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* action-id: tamu-view
* action-desc: Display a data
* Displays a single DataTamu model.
* @param integer $id
* @return mixed
*/
public function actionTamuView($id)
{
return $this->render('TamuView', [
'model' => $this->findModel($id),
]);
}
/**
* action-id: tamu-del
* action-desc: Menghapus data tamu
* Deletes an existing DataTamu model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
* @return mixed
*/
public function actionTamuDel($id)
{
$this->findModel($id)->softDelete();
return $this->redirect(['index']);
}
/**
* Finds the DataTamu model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param integer $id
* @return DataTamu the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id)
{
if (($model = DataTamu::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
}
}
......@@ -12,6 +12,8 @@ use yii\filters\VerbFilter;
/**
* KendaraanController implements the CRUD actions for Kendaraan model.
* controller-id: kendaraan
* controller-desc: Controller untuk me-manage data kendaraan
*/
class KendaraanController extends Controller
{
......@@ -19,10 +21,10 @@ class KendaraanController extends Controller
{
return [
// //TODO: crud controller actions are bypassed by default, set the appropriate privilege
// 'privilege' => [
// 'class' => \Yii::$app->privilegeControl->getAppPrivilegeControlClass(),
// 'skipActions' => ['*'],
// ],
'privilege' => [
'class' => \Yii::$app->privilegeControl->getAppPrivilegeControlClass(),
'skipActions' => [],
],
'verbs' => [
'class' => VerbFilter::className(),
......@@ -34,6 +36,8 @@ class KendaraanController extends Controller
}
/**
* action-id: index
* action-desc: Display all data
* Lists all Kendaraan models.
* @return mixed
*/
......@@ -49,6 +53,8 @@ class KendaraanController extends Controller
}
/**
* action-id: view
* action-desc: Display a data
* Displays a single Kendaraan model.
* @param integer $id
* @return mixed
......@@ -61,6 +67,8 @@ class KendaraanController extends Controller
}
/**
* action-id: add
* action-desc: Menambah kendaraan
* Creates a new Kendaraan model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
......@@ -79,6 +87,8 @@ class KendaraanController extends Controller
}
/**
* action-id: edit
* action-desc: Memperbaharui data kendaraan
* Updates an existing Kendaraan model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id
......@@ -98,6 +108,8 @@ class KendaraanController extends Controller
}
/**
* action-id: del
* action-desc: Menghapus data
* Deletes an existing Kendaraan model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
......
......@@ -12,6 +12,8 @@ use mPDF;
/**
* LaporanPemakaianKendaraanController implements the CRUD actions for LaporanPemakaianKendaraan model.
* controller-id: laporan-pemakaian-kendaraan
* controller-desc: Controller untuk me-manage data laporan pemakaian kendaraan
*/
class LaporanPemakaianKendaraanController extends Controller
{
......@@ -19,10 +21,10 @@ class LaporanPemakaianKendaraanController extends Controller
{
return [
//TODO: crud controller actions are bypassed by default, set the appropriate privilege
// 'privilege' => [
// 'class' => \Yii::$app->privilegeControl->getAppPrivilegeControlClass(),
// 'skipActions' => ['*'],
// ],
'privilege' => [
'class' => \Yii::$app->privilegeControl->getAppPrivilegeControlClass(),
'skipActions' => [],
],
'verbs' => [
'class' => VerbFilter::className(),
......@@ -34,6 +36,8 @@ class LaporanPemakaianKendaraanController extends Controller
}
/**
* action-id: index
* action-desc: Display all data
* Lists all LaporanPemakaianKendaraan models.
* @return mixed
*/
......@@ -49,6 +53,8 @@ class LaporanPemakaianKendaraanController extends Controller
}
/**
* action-id: view
* action-desc: Display a data
* Displays a single LaporanPemakaianKendaraan model.
* @param integer $id
* @return mixed
......@@ -61,6 +67,8 @@ class LaporanPemakaianKendaraanController extends Controller
}
/**
* action-id: add
* action-desc: Pembuatan Laporan Kendaraan
* Creates a new LaporanPemakaianKendaraan model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
......@@ -79,6 +87,8 @@ class LaporanPemakaianKendaraanController extends Controller
}
/**
* action-id: edit
* action-desc: Memperbaharui data laporan
* Updates an existing LaporanPemakaianKendaraan model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id
......@@ -98,6 +108,8 @@ class LaporanPemakaianKendaraanController extends Controller
}
/**
* action-id: del
* action-desc: Menghapus data
* Deletes an existing LaporanPemakaianKendaraan model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
......@@ -126,6 +138,10 @@ class LaporanPemakaianKendaraanController extends Controller
}
}
/*
* action-id: sample-pdf
* action-desc: Mencetak kedalam bentuk dokumen
*/
public function actionSamplePdf($id)
{
$pdf = $this->renderPartial('viewPdf', [
......@@ -137,6 +153,10 @@ class LaporanPemakaianKendaraanController extends Controller
exit;
}
/*
* action-id: lihat-pdf
* action-desc: Preview tampilan dokumen
*/
public function actionLihatPdf($id){
return $this->renderPartial('viewPdf', [
'model' => $this->findModel($id),
......
......@@ -16,20 +16,22 @@ use backend\modules\ubux\models\PemakaianKendaraan;
/**
* PemakaianKendaraanMhsController implements the CRUD actions for PemakaianKendaraanMhs model.
* controller-id: pemakaian-kendaraan-mhs
* controller-desc: Controller untuk me-manage data request pemakaian kendaraan oleh mahasiswa
*/
class PemakaianKendaraanMhsController extends Controller
{
// ================= FILTER ==================
public $dim_id = 1;
public $dim_id;
public function behaviors()
{
return [
//TODO: crud controller actions are bypassed by default, set the appropriate privilege
// 'privilege' => [
// 'class' => \Yii::$app->privilegeControl->getAppPrivilegeControlClass(),
// 'skipActions' => ['*'],
// ],
'privilege' => [
'class' => \Yii::$app->privilegeControl->getAppPrivilegeControlClass(),
'skipActions' => [],
],
'verbs' => [
'class' => VerbFilter::className(),
......@@ -40,7 +42,16 @@ class PemakaianKendaraanMhsController extends Controller
];
}
public function beforeAction($action)
{
$dim = Dim::find()->where('deleted != 1')->andWhere(['user_id' => Yii::$app->user->identity->user_id])->one();
$this->dim_id = $dim->dim_id;
return true;
}
/**
* action-id: index
* action-desc: Display all data
* Lists all PemakaianKendaraanMhs models.
* @return mixed
*/
......@@ -60,6 +71,8 @@ class PemakaianKendaraanMhsController extends Controller
}
/**
* action-id: view
* action-desc: Display a data
* Displays a single PemakaianKendaraanMhs model.
* @param integer $id
* @return mixed
......@@ -71,6 +84,10 @@ class PemakaianKendaraanMhsController extends Controller
]);
}
/*
* action-id: view-by-kemahasiswaan
* action-desc: Display a data as kemahasiswaan
*/
public function actionViewByKemahasiswaan($id)
{
return $this->render('viewByKemahasiswaan', [
......@@ -79,6 +96,8 @@ class PemakaianKendaraanMhsController extends Controller
}
/**
* action-id: add
* action-desc: Menambah data request
* Creates a new PemakaianKendaraanMhs model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
......@@ -92,28 +111,47 @@ class PemakaianKendaraanMhsController extends Controller
$dimModel = Dim::findOne($this->dim_id);
$model->dim_id = $dimModel->dim_id;
$model->save();
//$model->save();
// get the instance of the uploaded file
$id = $model->pemakaian_kendaraan_mhs_id;
//$id = $model->pemakaian_kendaraan_mhs_id;
$proposalName = $model->mahasiswa->nama;
$model->file = UploadedFile::getInstance($model, 'file');
$model->file->saveAs('proposal/'.$id.'. Proposal '.$proposalName.'.'.$model->file->extension);
// $model->file = UploadedFile::getInstance($model, 'file');
// $model->file->saveAs('proposal/'.$id.'. Proposal '.$proposalName.'.'.$model->file->extension);
// save the path in the db column
$model->proposal = 'proposal/'.$id.'. Proposal '.$proposalName.'.'.$model->file->extension;
//$model->proposal = 'proposal/'.$id.'. Proposal '.$proposalName.'.'.$model->file->extension;
if(isset($_FILES['PemakaianKendaraanMhs']['name'])){
$result = \Yii::$app->fileManager->saveUploadedFiles();
if(isset($result)){
if($result->status == 'success'){
$model->kode_proposal = $result->fileinfo[0]->id;
$model->proposal = $result->fileinfo[0]->name;
}
else{
\Yii::$app->messenger->addErrorFlash('Error while uploading file !');
return $this->redirect(\Yii::$app->request->referrer);
}
}//else{
// \Yii::$app->messenger->addErrorFlash('Error while uploading file !');
// return $this->redirect(\Yii::$app->request->referrer);
// }
}
$model->save();
// ==================== Variabel Hard Code ==========================//
$userId = $model->dim_id;
$subject = "Permintaan Kendaraan";
$body = "Permintaan Kendaraan";
$subject = "Permohonan Pemakaian Kendaraan";
$body = "Permohonan Pemakaian Kendaraan";
// ==================== Email ==========================//
Yii::$app->messenger->sendEmailToUser($userId, $subject, $body);
Yii::$app->messenger->addSuccessFlash("Permintaan Kendaraan Berhasil Dibuat");
Yii::$app->messenger->addSuccessFlash("Permohonan Pemakaian Kendaraan Berhasil Dibuat");
Yii::$app->messenger->addSuccessFlash("Email Terkirim");
return $this->redirect(['view', 'id' => $model->pemakaian_kendaraan_mhs_id]);
......@@ -125,6 +163,8 @@ class PemakaianKendaraanMhsController extends Controller
}
/**
* action-id: edit
* action-desc: Memeperbaharui data request
* Updates an existing PemakaianKendaraanMhs model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id
......@@ -155,6 +195,8 @@ class PemakaianKendaraanMhsController extends Controller
}
/**
* action-id: del
* action-desc: Menghapus data request
* Deletes an existing PemakaianKendaraanMhs model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
......@@ -197,6 +239,10 @@ class PemakaianKendaraanMhsController extends Controller
}
// Download Proposal ------------------------------------!!
/*
* action-id: download
* action-desc: Men-download dokumen
*/
public function actionDownload($id){
$model = $this->findModel($id);
$file = $model->proposal;
......@@ -209,10 +255,18 @@ class PemakaianKendaraanMhsController extends Controller
}
}
/*
* action-id: pop-up
* action-desc: Menampilakn halaman pop-up
*/
public function actionPopUp(){
return $this->render('PopUp');
}
/*
* action-id: cetak
* action-desc: Mencetak dokumen
*/
public function actionCetak($id)
{
$pdf = $this->renderPartial('viewPdf', [
......@@ -225,6 +279,10 @@ class PemakaianKendaraanMhsController extends Controller
}
// Kemahasiswaan -----------------------------------------------------------------
/*
* action-id: index-by-kemahasiswaan
* action-desc: Display all data as kemahasiswaan
*/
public function actionIndexByKemahasiswaan()
{
$searchModel = new PemakaianKendaraanMhsSearch();
......@@ -236,6 +294,10 @@ class PemakaianKendaraanMhsController extends Controller
]);
}
/*
* action-id: accept
* action-desc: Menyetujui request
*/
public function actionAccept($id)
{
$model = $this->findModel($id);
......@@ -261,10 +323,7 @@ class PemakaianKendaraanMhsController extends Controller
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
Yii::$app->messenger->addSuccessFlash("Berhasil");
return $this->render('indexByKemahasiswaan', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
return $this->redirect('indexByKemahasiswaan');
}
}else{
$searchModel = new PemakaianKendaraanMhsSearch();
......@@ -278,6 +337,10 @@ class PemakaianKendaraanMhsController extends Controller
}
}
/*
* action-id: reject
* action-desc: Menolak request
*/
public function actionReject($id)
{
$model = $this->findModel($id);
......@@ -287,10 +350,7 @@ class PemakaianKendaraanMhsController extends Controller
$searchModel = new PemakaianKendaraanMhsSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('indexByKemahasiswaan', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
return $this->redirect('indexByKemahasiswaan');
}
}
<?php
namespace backend\modules\ubux\controllers;
use Yii;
use backend\modules\ubux\models\PosisiPaket;
use backend\modules\ubux\models\search\PosisiPaketSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
/**
* PosisiPaketController implements the CRUD actions for PosisiPaket model.
* controller-id: posisi-paket
* controller-desc: Controller untuk me-manage posisi dari paket
*/
class PosisiPaketController extends Controller
{
public function behaviors()
{
return [
//TODO: crud controller actions are bypassed by default, set the appropriate privilege
'privilege' => [
'class' => \Yii::$app->privilegeControl->getAppPrivilegeControlClass(),
'skipActions' => [],
],
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['post'],
],
],
];
}
/**
* action-id: index
* action-desc: Display all data
* Lists all PosisiPaket models.
* @return mixed
*/
public function actionIndex()
{
$searchModel = new PosisiPaketSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* action-id: posisi-paket-add
* action-desc: Menambahkan data posisi paket
* Creates a new PosisiPaket model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public function actionPosisiPaketAdd()
{
$model = new PosisiPaket();
return $this->render('PosisiPaketAdd', [
'model' => $model,
]);
}
/**
* action-id: posisi-paket-edit
* action-desc: Memperbaharui data posisi paket
* Updates an existing PosisiPaket model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id
* @return mixed
*/
public function actionPosisiPaketEdit($id)
{
$model = $this->findModel($id);
return $this->render('PosisiPaketEdit', [
'model' => $model,
]);
}
/**
* action-id: posisi-paket-del
* action-desc: Menghapus data posisi paket
* Deletes an existing PosisiPaket model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
* @return mixed
*/
public function actionPosisiPaketDel($id)
{
$this->findModel($id)->softDelete();
return $this->redirect(['index']);
}
/**
* Finds the PosisiPaket model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param integer $id
* @return PosisiPaket the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id)
{
if (($model = PosisiPaket::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
}
}
......@@ -11,6 +11,8 @@ use yii\filters\VerbFilter;
/**
* SupirController implements the CRUD actions for Supir model.
* controller-id: supir
* controller-desc: Controller untuk me-manage data supir
*/
class SupirController extends Controller
{
......@@ -18,10 +20,10 @@ class SupirController extends Controller
{
return [
//TODO: crud controller actions are bypassed by default, set the appropriate privilege
// 'privilege' => [
// 'class' => \Yii::$app->privilegeControl->getAppPrivilegeControlClass(),
// 'skipActions' => ['*'],
// ],
'privilege' => [
'class' => \Yii::$app->privilegeControl->getAppPrivilegeControlClass(),
'skipActions' => [],
],
'verbs' => [
'class' => VerbFilter::className(),
......@@ -33,6 +35,8 @@ class SupirController extends Controller
}
/**
* action-id: index
* action-desc: Display all data
* Lists all Supir models.
* @return mixed
*/
......@@ -48,6 +52,8 @@ class SupirController extends Controller
}
/**
* action-id: view
* action-desc: Display a data
* Displays a single Supir model.
* @param integer $id
* @return mixed
......@@ -60,6 +66,8 @@ class SupirController extends Controller
}
/**
* action-id: add
* action-desc: Menambahkan data supir
* Creates a new Supir model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
......@@ -80,6 +88,8 @@ class SupirController extends Controller
}
/**
* action-id: edit
* action-desc: Memperbaharui data request
* Updates an existing Supir model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id
......@@ -99,6 +109,8 @@ class SupirController extends Controller
}
/**
* action-id: del
* action-desc: Menghapus data request
* Deletes an existing Supir model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
......
<?php
namespace backend\modules\ubux\models;
use Yii;
use common\behaviors\TimestampBehavior;
use common\behaviors\BlameableBehavior;
use common\behaviors\DeleteBehavior;
/**
* This is the model class for table "ubux_data_paket".
*
* @property integer $data_paket_id
* @property integer $tag
* @property integer $dim_id
* @property integer $pegawai_id
* @property string $pengirim
* @property string $tanggal_kedatangan
* @property string $diambil_oleh
* @property string $tanggal_diambil
* @property integer $posisi_paket_id
* @property integer $status_paket_id
* @property string $desc
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_by
* @property string $created_by
* @property string $created_at
* @property string $updated_at
* @property string $updated_by
*
* @property DimxDim $dim
* @property HrdxPegawai $pegawai
* @property UbuxRPosisiPaket $posisiPaket
* @property UbuxRStatusPaket $statusPaket
*/
class DataPaket extends \yii\db\ActiveRecord
{
/**
* behaviour to add created_at and updatet_at field with current datetime (timestamp)
* and created_by and updated_by field with current user id (blameable)
*/
public function behaviors(){
return [
'timestamp' => [
'class' => TimestampBehavior::className(),
],
'blameable' => [
'class' => BlameableBehavior::className(),
],
'delete' => [
'class' => DeleteBehavior::className(),
]
];
}
/**
* @inheritdoc
*/
public static function tableName()
{
return 'ubux_data_paket';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['tag', 'dim_id', 'pegawai_id', 'posisi_paket_id', 'status_paket_id', 'deleted'], 'integer'],
[['tanggal_kedatangan'], 'required'],
[['tanggal_kedatangan', 'tanggal_diambil', 'deleted_at', 'created_at', 'updated_at'], 'safe'],
[['desc'], 'string'],
[['pengirim', 'diambil_oleh', 'deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32],
[['dim_id'], 'exist', 'skipOnError' => true, 'targetClass' => Dim::className(), 'targetAttribute' => ['dim_id' => 'dim_id']],
[['pegawai_id'], 'exist', 'skipOnError' => true, 'targetClass' => Pegawai::className(), 'targetAttribute' => ['pegawai_id' => 'pegawai_id']],
[['posisi_paket_id'], 'exist', 'skipOnError' => true, 'targetClass' => PosisiPaket::className(), 'targetAttribute' => ['posisi_paket_id' => 'posisi_paket_id']],
[['status_paket_id'], 'exist', 'skipOnError' => true, 'targetClass' => StatusPaket::className(), 'targetAttribute' => ['status_paket_id' => 'status_paket_id']]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'data_paket_id' => 'Data Paket ID',
'tag' => 'Tag',
'dim_id' => 'Dim ID',
'pegawai_id' => 'Pegawai ID',
'pengirim' => 'Pengirim',
'tanggal_kedatangan' => 'Tanggal Kedatangan',
'diambil_oleh' => 'Diambil Oleh',
'tanggal_diambil' => 'Tanggal Diambil',
'posisi_paket_id' => 'Posisi Paket ID',
'status_paket_id' => 'Status Paket ID',
'desc' => 'Desc',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By',
'created_by' => 'Created By',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
'updated_by' => 'Updated By',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getDim()
{
return $this->hasOne(Dim::className(), ['dim_id' => 'dim_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getPegawai()
{
return $this->hasOne(Pegawai::className(), ['pegawai_id' => 'pegawai_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getPosisiPaket()
{
return $this->hasOne(PosisiPaket::className(), ['posisi_paket_id' => 'posisi_paket_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getStatusPaket()
{
return $this->hasOne(StatusPaket::className(), ['status_paket_id' => 'status_paket_id']);
}
}
<?php
namespace backend\modules\ubux\models;
use Yii;
use common\behaviors\TimestampBehavior;
use common\behaviors\BlameableBehavior;
use common\behaviors\DeleteBehavior;
/**
* This is the model class for table "ubux_data_tamu".
*
* @property integer $data_tamu_id
* @property string $nik
* @property string $nama
* @property string $waktu_kedatangan
* @property string $desc
* @property string $waktu_kembali
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_by
* @property string $created_by
* @property string $created_at
* @property string $updated_at
* @property string $updated_by
*/
class DataTamu extends \yii\db\ActiveRecord
{
/**
* behaviour to add created_at and updatet_at field with current datetime (timestamp)
* and created_by and updated_by field with current user id (blameable)
*/
public function behaviors(){
return [
'timestamp' => [
'class' => TimestampBehavior::className(),
],
'blameable' => [
'class' => BlameableBehavior::className(),
],
'delete' => [
'class' => DeleteBehavior::className(),
]
];
}
/**
* @inheritdoc
*/
public static function tableName()
{
return 'ubux_data_tamu';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['waktu_kedatangan'], 'required'],
[['waktu_kedatangan', 'waktu_kembali', 'deleted_at', 'created_at', 'updated_at'], 'safe'],
[['desc'], 'string'],
[['deleted'], 'integer'],
[['nik', 'nama', 'deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'data_tamu_id' => 'Data Tamu ID',
'nik' => 'NIK',
'nama' => 'Nama',
'waktu_kedatangan' => 'Waktu Kedatangan',
'desc' => 'Desc',
'waktu_kembali' => 'Waktu Kembali',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By',
'created_by' => 'Created By',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
'updated_by' => 'Updated By',
];
}
}
......@@ -92,6 +92,11 @@ use common\behaviors\DeleteBehavior;
* @property AbsnAbsensi[] $absnAbsensis
* @property AdakMahasiswaAssistant[] $adakMahasiswaAssistants
* @property AdakRegistrasi[] $adakRegistrasis
* @property AskmIzinBermalam[] $askmIzinBermalams
* @property AskmIzinKeluar[] $askmIzinKeluars
* @property AskmIzinPenggunaanRuangan[] $askmIzinPenggunaanRuangans
* @property AskmIzinTambahanJamKolaboratif[] $askmIzinTambahanJamKolaboratifs
* @property AskmLogMahasiswa[] $askmLogMahasiswas
* @property DimxAlumni[] $dimxAlumnis
* @property MrefRAgama $agama0
* @property MrefRAsalSekolah $asalSekolah
......@@ -130,6 +135,7 @@ use common\behaviors\DeleteBehavior;
* @property PrklBeritaAcaraDaftarHadir[] $prklBeritaAcaraDaftarHadirs
* @property PrklInfoTa[] $prklInfoTas
* @property PrklKrsMhs[] $prklKrsMhs
* @property UbuxDataPaket[] $ubuxDataPakets
*/
class Dim extends \yii\db\ActiveRecord
{
......@@ -313,6 +319,46 @@ class Dim extends \yii\db\ActiveRecord
/**
* @return \yii\db\ActiveQuery
*/
public function getAskmIzinBermalams()
{
return $this->hasMany(AskmIzinBermalam::className(), ['dim_id' => 'dim_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getAskmIzinKeluars()
{
return $this->hasMany(AskmIzinKeluar::className(), ['dim_id' => 'dim_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getAskmIzinPenggunaanRuangans()
{
return $this->hasMany(AskmIzinPenggunaanRuangan::className(), ['dim_id' => 'dim_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getAskmIzinTambahanJamKolaboratifs()
{
return $this->hasMany(AskmIzinTambahanJamKolaboratif::className(), ['dim_id' => 'dim_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getAskmLogMahasiswas()
{
return $this->hasMany(AskmLogMahasiswa::className(), ['dim_id' => 'dim_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getDimxAlumnis()
{
return $this->hasMany(DimxAlumni::className(), ['dim_id' => 'dim_id']);
......@@ -419,7 +465,7 @@ class Dim extends \yii\db\ActiveRecord
*/
public function getUser()
{
return $this->hasOne(SysxUser::className(), ['user_id' => 'user_id']);
return $this->hasOne(User::className(), ['user_id' => 'user_id']);
}
/**
......@@ -614,7 +660,11 @@ class Dim extends \yii\db\ActiveRecord
return $this->hasMany(PrklKrsMhs::className(), ['dim_id' => 'dim_id']);
}
// public function getMahasiswa(){
// return $this->hasMany(PemakaianKendaraanMhs::className(), ['dim_id' => 'dim_id']);
// }
/**
* @return \yii\db\ActiveQuery
*/
public function getUbuxDataPakets()
{
return $this->hasMany(UbuxDataPaket::className(), ['dim_id' => 'dim_id']);
}
}
......@@ -67,6 +67,7 @@ use common\behaviors\DeleteBehavior;
*
* @property AdakPenugasanPengajaran[] $adakPenugasanPengajarans
* @property AdakRegistrasi[] $adakRegistrasis
* @property AskmKeasramaan[] $askmKeasramaans
* @property HrdxDosen[] $hrdxDosens
* @property MrefRJenisKelamin $jenisKelamin
* @property MrefRAgama $agama
......@@ -87,6 +88,7 @@ use common\behaviors\DeleteBehavior;
* @property LppmTPublikasi[] $lppmTPublikasis
* @property PrklCourseUnit[] $prklCourseUnits
* @property PrklKrsMhs[] $prklKrsMhs
* @property UbuxDataPaket[] $ubuxDataPakets
*/
class Pegawai extends \yii\db\ActiveRecord
{
......@@ -234,6 +236,14 @@ class Pegawai extends \yii\db\ActiveRecord
/**
* @return \yii\db\ActiveQuery
*/
public function getAskmKeasramaans()
{
return $this->hasMany(AskmKeasramaan::className(), ['pegawai_id' => 'pegawai_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getHrdxDosens()
{
return $this->hasMany(HrdxDosen::className(), ['pegawai_id' => 'pegawai_id']);
......@@ -316,7 +326,7 @@ class Pegawai extends \yii\db\ActiveRecord
*/
public function getUser()
{
return $this->hasOne(SysxUser::className(), ['user_id' => 'user_id']);
return $this->hasOne(User::className(), ['user_id' => 'user_id']);
}
/**
......@@ -390,4 +400,12 @@ class Pegawai extends \yii\db\ActiveRecord
{
return $this->hasMany(PrklKrsMhs::className(), ['approved_by' => 'pegawai_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getUbuxDataPakets()
{
return $this->hasMany(UbuxDataPaket::className(), ['pegawai_id' => 'pegawai_id']);
}
}
......@@ -114,7 +114,7 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord
'rencana_waktu_keberangkatan' => 'Waktu Keberangkatan',
'rencana_waktu_kembali' => 'Waktu Tiba',
'status_req_sekretaris_rektorat' => 'Status',
'status_request_kemahasiswaan' => 'Status Pemintaan Kemahasiswaan',
'status_request_kemahasiswaan' => 'Status Persetujuan Kemahasiswaan',
'no_telepon' => 'No Telepon',
'jenis_keperluan_id' => 'Jenis Permintaan',
'proposal' => 'Proposal',
......@@ -129,10 +129,10 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord
'supir_id' => 'Supir',
'no_hp_supir' => 'No Hp Supir',
'file' => 'Proposal',
'status_request_kabiro_KSD' => 'Status Permintaan Kabiro Ksd',
'status_request_hrd' => 'Status Permintaan Hrd',
'status_request_keuangan' => 'Status Permintaan Keuangan',
'status_request_wr2' => 'Status Permintaan Wr2',
'status_request_kabiro_KSD' => 'Status Persetujuan Kabiro Ksd',
'status_request_hrd' => 'Status Persetujuan Hrd',
'status_request_keuangan' => 'Status Persetujuan Keuangan',
'status_request_wr2' => 'Status Persetujuan Wr2',
'pemakaian_kendaraan_mhs_id' => 'Transaksi Kendaraan Mahasiswa ID'
];
}
......
......@@ -100,8 +100,8 @@ class PemakaianKendaraanMhs extends \yii\db\ActiveRecord
'jumlah_penumpang_kendaraan' => 'Jumlah Penumpang',
'rencana_waktu_keberangkatan' => 'Waktu Keberangkatan',
'rencana_waktu_kembali' => 'Waktu Tiba',
'status_req_sekretaris_rektorat' => 'Status Permintaan',
'status_request_kemahasiswaan' => 'Status Permintaan Kemahasiswaan',
'status_req_sekretaris_rektorat' => 'Status',
'status_request_kemahasiswaan' => 'Status Persetujuan Kemahasiswaan',
'proposal' => 'Proposal',
'no_telepon' => 'No Telepon',
'deleted' => 'Deleted',
......@@ -114,7 +114,7 @@ class PemakaianKendaraanMhs extends \yii\db\ActiveRecord
'kendaraan_id' => 'Kendaraan',
'supir_id' => 'Supir',
'no_hp_supir' => 'No Hp Supir',
'file' => 'Proposal',
'kode_proposal' => 'Proposal',
];
}
......
<?php
namespace backend\modules\ubux\models;
use Yii;
use common\behaviors\TimestampBehavior;
use common\behaviors\BlameableBehavior;
use common\behaviors\DeleteBehavior;
/**
* This is the model class for table "ubux_r_posisi_paket".
*
* @property integer $posisi_paket_id
* @property string $name
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_by
* @property string $created_at
* @property string $created_by
* @property string $updated_at
* @property string $updated_by
*
* @property UbuxDataPaket[] $ubuxDataPakets
*/
class PosisiPaket extends \yii\db\ActiveRecord
{
/**
* behaviour to add created_at and updatet_at field with current datetime (timestamp)
* and created_by and updated_by field with current user id (blameable)
*/
public function behaviors(){
return [
'timestamp' => [
'class' => TimestampBehavior::className(),
],
'blameable' => [
'class' => BlameableBehavior::className(),
],
'delete' => [
'class' => DeleteBehavior::className(),
]
];
}
/**
* @inheritdoc
*/
public static function tableName()
{
return 'ubux_r_posisi_paket';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['deleted'], 'integer'],
[['deleted_at', 'created_at', 'updated_at'], 'safe'],
[['name'], 'string', 'max' => 45],
[['deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'posisi_paket_id' => 'Posisi Paket ID',
'name' => 'Name',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By',
'created_at' => 'Created At',
'created_by' => 'Created By',
'updated_at' => 'Updated At',
'updated_by' => 'Updated By',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getDataPaket()
{
return $this->hasMany(DataPaket::className(), ['posisi_paket_id' => 'posisi_paket_id']);
}
}
<?php
namespace backend\modules\ubux\models;
use Yii;
use common\behaviors\TimestampBehavior;
use common\behaviors\BlameableBehavior;
use common\behaviors\DeleteBehavior;
/**
* This is the model class for table "ubux_r_status_paket".
*
* @property integer $status_paket_id
* @property string $status
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_by
* @property string $created_at
* @property string $created_by
* @property string $updated_at
* @property string $updated_by
*
* @property UbuxDataPaket[] $ubuxDataPakets
*/
class StatusPaket extends \yii\db\ActiveRecord
{
/**
* behaviour to add created_at and updatet_at field with current datetime (timestamp)
* and created_by and updated_by field with current user id (blameable)
*/
public function behaviors(){
return [
'timestamp' => [
'class' => TimestampBehavior::className(),
],
'blameable' => [
'class' => BlameableBehavior::className(),
],
'delete' => [
'class' => DeleteBehavior::className(),
]
];
}
/**
* @inheritdoc
*/
public static function tableName()
{
return 'ubux_r_status_paket';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['deleted'], 'integer'],
[['deleted_at', 'created_at', 'updated_at'], 'safe'],
[['status', 'deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'status_paket_id' => 'Status Paket ID',
'status' => 'Status',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By',
'created_at' => 'Created At',
'created_by' => 'Created By',
'updated_at' => 'Updated At',
'updated_by' => 'Updated By',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getDataPaket()
{
return $this->hasMany(DataPaket::className(), ['status_paket_id' => 'status_paket_id']);
}
}
<?php
namespace backend\modules\ubux\models;
use Yii;
use common\behaviors\TimestampBehavior;
use common\behaviors\BlameableBehavior;
use common\behaviors\DeleteBehavior;
/**
* This is the model class for table "sysx_user".
*
* @property integer $user_id
* @property integer $profile_id
* @property string $sysx_key
* @property integer $authentication_method_id
* @property string $username
* @property string $auth_key
* @property string $password_hash
* @property string $password_reset_token
* @property string $email
* @property integer $status
* @property string $created_at
* @property string $updated_at
* @property string $created_by
* @property string $updated_by
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_by
*
* @property ArspArsip[] $arspArsips
* @property ArtkPost[] $artkPosts
* @property DimxDim[] $dimxDims
* @property HrdxPegawai[] $hrdxPegawais
* @property InvtPelaporanBarangRusak[] $invtPelaporanBarangRusaks
* @property InvtPeminjamanBarang[] $invtPeminjamanBarangs
* @property InvtPeminjamanBarang[] $invtPeminjamanBarangs0
* @property InvtUnitCharged[] $invtUnitChargeds
* @property PrklKrsReview[] $prklKrsReviews
* @property RprtComplaint[] $rprtComplaints
* @property RprtResponse[] $rprtResponses
* @property RprtUserHasBagian[] $rprtUserHasBagians
* @property SchdEventInvitee[] $schdEventInvitees
* @property SrvyKuesionerJawabanPeserta[] $srvyKuesionerJawabanPesertas
* @property SysxLog[] $sysxLogs
* @property SysxTelkomSsoUser[] $sysxTelkomSsoUsers
* @property SysxAuthenticationMethod $authenticationMethod
* @property SysxProfile $profile
* @property SysxUserConfig[] $sysxUserConfigs
* @property SysxUserHasRole[] $sysxUserHasRoles
* @property SysxRole[] $roles
* @property SysxUserHasWorkgroup[] $sysxUserHasWorkgroups
* @property SysxWorkgroup[] $workgroups
* @property TmbhPengumuman[] $tmbhPengumumen
*/
class User extends \yii\db\ActiveRecord
{
/**
* behaviour to add created_at and updatet_at field with current datetime (timestamp)
* and created_by and updated_by field with current user id (blameable)
*/
public function behaviors(){
return [
'timestamp' => [
'class' => TimestampBehavior::className(),
],
'blameable' => [
'class' => BlameableBehavior::className(),
],
'delete' => [
'class' => DeleteBehavior::className(),
]
];
}
/**
* @inheritdoc
*/
public static function tableName()
{
return 'sysx_user';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['profile_id', 'authentication_method_id', 'status', 'deleted'], 'integer'],
[['username', 'auth_key', 'password_hash', 'email'], 'required'],
[['created_at', 'updated_at', 'deleted_at'], 'safe'],
[['sysx_key', 'auth_key', 'deleted_by'], 'string', 'max' => 32],
[['username', 'password_hash', 'password_reset_token', 'email'], 'string', 'max' => 255],
[['created_by', 'updated_by'], 'string', 'max' => 45],
[['authentication_method_id'], 'exist', 'skipOnError' => true, 'targetClass' => SysxAuthenticationMethod::className(), 'targetAttribute' => ['authentication_method_id' => 'authentication_method_id']],
[['profile_id'], 'exist', 'skipOnError' => true, 'targetClass' => SysxProfile::className(), 'targetAttribute' => ['profile_id' => 'profile_id']]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'user_id' => 'User ID',
'profile_id' => 'Profile ID',
'sysx_key' => 'Sysx Key',
'authentication_method_id' => 'Authentication Method ID',
'username' => 'Username',
'auth_key' => 'Auth Key',
'password_hash' => 'Password Hash',
'password_reset_token' => 'Password Reset Token',
'email' => 'Email',
'status' => 'Status',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
'created_by' => 'Created By',
'updated_by' => 'Updated By',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getArspArsips()
{
return $this->hasMany(ArspArsip::className(), ['user_id' => 'user_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getArtkPosts()
{
return $this->hasMany(ArtkPost::className(), ['user_id' => 'user_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getDim()
{
return $this->hasMany(Dim::className(), ['user_id' => 'user_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getPegawai()
{
return $this->hasMany(Pegawai::className(), ['user_id' => 'user_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getInvtPelaporanBarangRusaks()
{
return $this->hasMany(InvtPelaporanBarangRusak::className(), ['pelapor' => 'user_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getInvtPeminjamanBarangs()
{
return $this->hasMany(InvtPeminjamanBarang::className(), ['approved_by' => 'user_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getInvtPeminjamanBarangs0()
{
return $this->hasMany(InvtPeminjamanBarang::className(), ['oleh' => 'user_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getInvtUnitChargeds()
{
return $this->hasMany(InvtUnitCharged::className(), ['user_id' => 'user_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getPrklKrsReviews()
{
return $this->hasMany(PrklKrsReview::className(), ['comment_by' => 'user_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getRprtComplaints()
{
return $this->hasMany(RprtComplaint::className(), ['user_id' => 'user_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getRprtResponses()
{
return $this->hasMany(RprtResponse::className(), ['user_id' => 'user_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getRprtUserHasBagians()
{
return $this->hasMany(RprtUserHasBagian::className(), ['user_id' => 'user_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getSchdEventInvitees()
{
return $this->hasMany(SchdEventInvitee::className(), ['user_id' => 'user_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getSrvyKuesionerJawabanPesertas()
{
return $this->hasMany(SrvyKuesionerJawabanPeserta::className(), ['user_id' => 'user_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getSysxLogs()
{
return $this->hasMany(SysxLog::className(), ['user_id' => 'user_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getSysxTelkomSsoUsers()
{
return $this->hasMany(SysxTelkomSsoUser::className(), ['user_id' => 'user_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getAuthenticationMethod()
{
return $this->hasOne(SysxAuthenticationMethod::className(), ['authentication_method_id' => 'authentication_method_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getProfile()
{
return $this->hasOne(SysxProfile::className(), ['profile_id' => 'profile_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getSysxUserConfigs()
{
return $this->hasMany(SysxUserConfig::className(), ['user_id' => 'user_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getSysxUserHasRoles()
{
return $this->hasMany(SysxUserHasRole::className(), ['user_id' => 'user_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getRoles()
{
return $this->hasMany(SysxRole::className(), ['role_id' => 'role_id'])->viaTable('sysx_user_has_role', ['user_id' => 'user_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getSysxUserHasWorkgroups()
{
return $this->hasMany(SysxUserHasWorkgroup::className(), ['user_id' => 'user_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getWorkgroups()
{
return $this->hasMany(SysxWorkgroup::className(), ['workgroup_id' => 'workgroup_id'])->viaTable('sysx_user_has_workgroup', ['user_id' => 'user_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getTmbhPengumumen()
{
return $this->hasMany(TmbhPengumuman::className(), ['owner' => 'user_id']);
}
}
<?php
namespace backend\modules\ubux\models\search;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\modules\ubux\models\DataPaket;
use backend\modules\ubux\models\Dim;
use backend\modules\ubux\models\Pegawai;
/**
* DataPaketSearch represents the model behind the search form about `backend\modules\ubux\models\DataPaket`.
*/
class DataPaketSearch extends DataPaket
{
public $dim_nama;
public $pegawai_nama;
/**
* @inheritdoc
*/
public function rules()
{
return [
[['data_paket_id', 'tag', 'dim_id', 'pegawai_id', 'posisi_paket_id', 'status_paket_id', 'deleted'], 'integer'],
[['dim_nama','pegawai_nama','pengirim', 'tanggal_kedatangan', 'diambil_oleh', 'tanggal_diambil', 'desc', 'deleted_at', 'deleted_by', 'created_by', 'created_at', 'updated_at', 'updated_by'], 'safe'],
];
}
/**
* @inheritdoc
*/
public function scenarios()
{
// bypass scenarios() implementation in the parent class
return Model::scenarios();
}
/**
* Creates data provider instance with search query applied
*
* @param array $params
*
* @return ActiveDataProvider
*/
public function search($params)
{
$query = DataPaket::find()->andWhere('ubux_data_paket.deleted!=1')
->JoinWith('dim',false)->JoinWith('pegawai',false);
$dataProvider = new ActiveDataProvider([
'query' => $query,
'pagination'=>['pageSize'=>10],
'sort' => ['defaultOrder' => ['data_paket_id' => SORT_ASC, 'updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
$query->andFilterWhere([
'data_paket_id' => $this->data_paket_id,
'tag' => $this->tag,
'dim_id' => $this->dim_id,
'pegawai_id' => $this->pegawai_id,
'tanggal_kedatangan' => $this->tanggal_kedatangan,
'tanggal_diambil' => $this->tanggal_diambil,
'posisi_paket_id' => $this->posisi_paket_id,
'status_paket_id' => $this->status_paket_id,
'deleted' => $this->deleted,
'deleted_at' => $this->deleted_at,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
]);
$query->andFilterWhere(['like', 'dimx_dim.nama', $this->dim_nama])
->andFilterWhere(['like', 'hrdx_pegawai.nama', $this->pegawai_nama])
->andFilterWhere(['like', 'pengirim', $this->pengirim])
->andFilterWhere(['like', 'diambil_oleh', $this->diambil_oleh])
->andFilterWhere(['like', 'desc', $this->desc])
->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'created_by', $this->created_by])
->andFilterWhere(['like', 'updated_by', $this->updated_by])
->andFilterWhere(['not', ['ubux_data_paket.deleted' => 1]]);
return $dataProvider;
}
/**
* Search Untuk Paket Mahasiswa
*/
public function searchUserMahasiswa($params){
$dim = Dim::find('dim_id')->where('deleted!=1')->andWhere(['user_id'=>(Yii::$app->user->identity->user_id)])->one();
$query = DataPaket::find()->where('deleted!=1')->andWhere(['dim_id'=>$dim])->orWhere(['dim_id'=>NULL])->andWhere(['pegawai_id'=>NULL]);
$dataProvider = new ActiveDataProvider([
'query' => $query,
'pagination'=>['pageSize'=>10],
'sort' => ['defaultOrder' => ['data_paket_id' => SORT_ASC, 'updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
$query->andFilterWhere([
'data_paket_id' => $this->data_paket_id,
'tag' => $this->tag,
'dim_id' => $this->dim_id,
'tanggal_kedatangan' => $this->tanggal_kedatangan,
'tanggal_diambil' => $this->tanggal_diambil,
'posisi_paket_id' => $this->posisi_paket_id,
'status_paket_id' => $this->status_paket_id,
'deleted' => $this->deleted,
'deleted_at' => $this->deleted_at,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
]);
$query->andFilterWhere(['like', 'pengirim', $this->pengirim])
->andFilterWhere(['like', 'diambil_oleh', $this->diambil_oleh])
->andFilterWhere(['like', 'desc', $this->desc])
->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'created_by', $this->created_by])
->andFilterWhere(['like', 'updated_by', $this->updated_by])
->andFilterWhere(['not', ['deleted' => 1]]);
return $dataProvider;
}
/**
* Search untuk paket Pegawai
*/
public function searchUserPegawai($params){
$pegawai = Pegawai::find('pegawai_id')->where('deleted!=1')->andWhere(['user_id'=>(Yii::$app->user->identity->user_id)])->one();
$query = DataPaket::find()->where('deleted!=1')->andWhere(['pegawai_id'=>$pegawai])->orWhere(['pegawai_id'=>NULL])->andWhere(['dim_id'=>NULL]);
$dataProvider = new ActiveDataProvider([
'query' => $query,
'pagination'=>['pageSize'=>10],
'sort' => ['defaultOrder' => ['data_paket_id' => SORT_ASC, 'updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
$query->andFilterWhere([
'data_paket_id' => $this->data_paket_id,
'tag' => $this->tag,
'pegawai_id' => $this->pegawai_id,
'tanggal_kedatangan' => $this->tanggal_kedatangan,
'tanggal_diambil' => $this->tanggal_diambil,
'posisi_paket_id' => $this->posisi_paket_id,
'status_paket_id' => $this->status_paket_id,
'deleted' => $this->deleted,
'deleted_at' => $this->deleted_at,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
]);
$query->andFilterWhere(['like', 'pengirim', $this->pengirim])
->andFilterWhere(['like', 'diambil_oleh', $this->diambil_oleh])
->andFilterWhere(['like', 'desc', $this->desc])
->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'created_by', $this->created_by])
->andFilterWhere(['like', 'updated_by', $this->updated_by])
->andFilterWhere(['not', ['deleted' => 1]]);
return $dataProvider;
}
}
<?php
namespace backend\modules\ubux\models\search;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\modules\ubux\models\DataTamu;
/**
* DataTamuSearch represents the model behind the search form about `backend\modules\askm\models\DataTamu`.
*/
class DataTamuSearch extends DataTamu
{
/**
* @inheritdoc
*/
public function rules()
{
return [
[['data_tamu_id', 'deleted'], 'integer'],
[['nik', 'nama', 'waktu_kedatangan', 'desc', 'waktu_kembali', 'deleted_at', 'deleted_by', 'created_by', 'created_at', 'updated_at', 'updated_by'], 'safe'],
];
}
/**
* @inheritdoc
*/
public function scenarios()
{
// bypass scenarios() implementation in the parent class
return Model::scenarios();
}
/**
* Creates data provider instance with search query applied
*
* @param array $params
*
* @return ActiveDataProvider
*/
public function search($params)
{
$query = DataTamu::find()->andWhere('deleted!=1');
$dataProvider = new ActiveDataProvider([
'query' => $query,
'sort' => ['defaultOrder' => ['data_tamu_id' => SORT_ASC, 'updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
$query->andFilterWhere([
'data_tamu_id' => $this->data_tamu_id,
'waktu_kedatangan' => $this->waktu_kedatangan,
'waktu_kembali' => $this->waktu_kembali,
'deleted' => $this->deleted,
'deleted_at' => $this->deleted_at,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
]);
$query->andFilterWhere(['like', 'nik', $this->nik])
->andFilterWhere(['like', 'nama', $this->nama])
->andFilterWhere(['like', 'desc', $this->desc])
->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'created_by', $this->created_by])
->andFilterWhere(['like', 'updated_by', $this->updated_by])
->andFilterWhere(['not', ['deleted' => 1]]);
return $dataProvider;
}
}
<?php
namespace backend\modules\ubux\models\search;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\modules\ubux\models\PosisiPaket;
/**
* PosisiPaketSearch represents the model behind the search form about `backend\modules\ubux\models\PosisiPaket`.
*/
class PosisiPaketSearch extends PosisiPaket
{
/**
* @inheritdoc
*/
public function rules()
{
return [
[['posisi_paket_id', 'deleted'], 'integer'],
[['name', 'deleted_at', 'deleted_by', 'created_at', 'created_by', 'updated_at', 'updated_by'], 'safe'],
];
}
/**
* @inheritdoc
*/
public function scenarios()
{
// bypass scenarios() implementation in the parent class
return Model::scenarios();
}
/**
* Creates data provider instance with search query applied
*
* @param array $params
*
* @return ActiveDataProvider
*/
public function search($params)
{
$query = PosisiPaket::find()->andWhere('deleted!=1');
$dataProvider = new ActiveDataProvider([
'query' => $query,
'sort' => ['defaultOrder' => ['posisi_paket_id' => SORT_ASC, 'updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
$query->andFilterWhere([
'posisi_paket_id' => $this->posisi_paket_id,
'deleted' => $this->deleted,
'deleted_at' => $this->deleted_at,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
]);
$query->andFilterWhere(['like', 'name', $this->name])
->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'created_by', $this->created_by])
->andFilterWhere(['like', 'updated_by', $this->updated_by])
->andFilterWhere(['not', ['deleted' => 1]]);
return $dataProvider;
}
}
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\DataPaket */
$this->title = 'Create Data Paket';
$this->params['breadcrumbs'][] = ['label' => 'Data Paket', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="data-paket-create">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\DataPaket */
$this->title = 'Update Data Paket: ' . ' ' . $model->data_paket_id;
$this->params['breadcrumbs'][] = ['label' => 'Data Paket', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->data_paket_id, 'url' => ['view', 'id' => $model->data_paket_id]];
$this->params['breadcrumbs'][] = 'Update';
?>
<div class="data-paket-update">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\DataPaket */
if($model->dim_id!=null){
$this->title = $model->dim->nama;
}
else if($model->pegawai_id!=null){
$this->title = $model->pegawai->nama;
}
else{
$this->title = "Paket tidak diketahui";
}
$this->params['breadcrumbs'][] = ['label' => 'Data Paket', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="data-paket-view">
<h1><?= Html::encode($this->title) ?></h1>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'pengirim',
[
'attribute'=>'tanggal_kedatangan',
'label' => 'Tanggal kedatangan',
'format'=> 'raw',
'headerOptions' => ['style' => 'color:#337ab7'],
'value'=>function($model){
if($model->tanggal_kedatangan==NULL){
return '-';
}
else{
return Yii::$app->formatter->asDateTime($model->tanggal_kedatangan, 'php:d M Y H:i:s');
}
}
],
[
'attribute'=>'diambil_oleh',
'format'=>'raw',
'value'=>function($model){
if($model->diambil_oleh!=NULL){
return $model->diambil_oleh;
}
else{
return '-';
}
}
],
[
'attribute'=>'tanggal_diambil',
'label' => 'Tanggal diambil',
'format'=> 'raw',
'headerOptions' => ['style' => 'color:#337ab7'],
'value'=>function($model){
if($model->tanggal_diambil==NULL){
return '-';
}
else{
return Yii::$app->formatter->asDateTime($model->tanggal_diambil, 'php:d M Y H:i:s');
}
}
],
//'posisi',
[
'attribute'=>'posisi_paket_id',
'label'=>'Posisi Paket',
'value'=>$model->posisiPaket->name,
],
[
'attribute'=>'status_paket_id',
'label'=>'Status',
'format'=>'raw',
'value'=>function($model){
if($model->status_paket_id==1){
return '<b class="text-danger">'.$model->statusPaket->status.'</b>';
}
else{
return '<b class="text-success">'.$model->statusPaket->status.'</b>';
}
}
],
[
'attribute'=>'desc',
'label'=>'Deskripsi',
'value'=>function($model){
if($model->desc==NULL){
return '-';
}
else{
return $model->desc;
}
}
],
],
])?>
</div>
<?php
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\DataPaket */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="data-paket-form">
<?php
$form = ActiveForm::begin([
'layout' => 'horizontal',
'fieldConfig' => [
'template' => "{label}\n{beginWrapper}\n{input}\n{error}\n{endWrapper}\n{hint}",
'horizontalCssClasses' => [
'label' => 'col-sm-2',
'wrapper' => 'col-sm-8',
'error' => '',
'hint' => '',
],
],
])
?>
<?= $form->field($model, 'tag')->textInput() ?>
<?= $form->field($model, 'dim_id')->textInput()->label('Nama Mahasiswa') ?>
<?= $form->field($model, 'pegawai_id')->textInput()->label('Nama Pegawai') ?>
<?= $form->field($model, 'pengirim')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'desc')->textarea(['rows' => 6])->label('Deskrpisi') ?>
<div class="form-group">
<div class="col-md-1 col-md-offset-2">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\search\DataPaketSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="data-paket-search">
<?php $form = ActiveForm::begin([
'action' => ['index-by-admin'],
'method' => 'get',
]); ?>
<?= $form->field($model, 'dim_nama')->label('Nama Mahasiswa') ?>
<?= $form->field($model, 'pegawai_nama')->label('Nama Pegawai')?>
<?php // echo $form->field($model, 'tanggal_kedatangan') ?>
<?php // echo $form->field($model, 'diambil_oleh') ?>
<?php // echo $form->field($model, 'tanggal_diambil') ?>
<?php // echo $form->field($model, 'posisi_paket_id') ?>
<?php // echo $form->field($model, 'status_paket_id') ?>
<?php // echo $form->field($model, 'desc') ?>
<?php // echo $form->field($model, 'deleted') ?>
<?php // echo $form->field($model, 'deleted_at') ?>
<?php // echo $form->field($model, 'deleted_by') ?>
<?php // echo $form->field($model, 'created_by') ?>
<?php // echo $form->field($model, 'created_at') ?>
<?php // echo $form->field($model, 'updated_at') ?>
<?php // echo $form->field($model, 'updated_by') ?>
<div class="form-group">
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
use yii\helpers\Html;
use yii\grid\GridView;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\DataPaketSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Data Paket';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="data-paket-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php echo $this->render('_search', ['model' => $searchModel]); ?>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
[
'attribute'=>'dim_id',
'format'=>'raw',
'label'=>'Nama Mahasiswa',
'value'=>function($model,$key,$index){
if($model->dim_id!=NULL){
return $model->dim->nama;
}
else {
return '-';
}
}
],
[
'attribute'=>'pegawai_id',
'format'=>'raw',
'label'=>'Nama Pegawai',
'value'=>function($model,$key,$index){
if($model->pegawai_id!=NULL){
return $model->pegawai->nama;
}
else{
return '-';
}
}
],
'pengirim',
[
'attribute'=>'tanggal_kedatangan',
'format'=>['Date','php: d M y H:i']
],
[
'attribute'=>'posisi_paket_id',
'label'=>'Posisi',
'value'=>'posisiPaket.name'
],
[
'attribute'=>'status_paket_id',
'format'=>'raw',
'label'=>'Status Paket',
'value'=>function($model,$key,$index){
if($model->status_paket_id==1){
return '<b class="text-danger">'.$model->statusPaket->status.'</b>';
}
else{
return '<b class="text-success">'.$model->statusPaket->status.'</b>';
}
}
],
['class' => 'common\components\ToolsColumn',
'template' => '{view}',
'urlCreator' => function ($action, $model, $key, $index){
if ($action === 'view') {
return Url::toRoute(['data-paket-view', 'id' => $key]);
}
}
]
],
]); ?>
</div>
<?php
use yii\helpers\Html;
use yii\grid\GridView;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\DataPaketSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Data Paket';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="data-paket-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
[
'attribute'=>'dim_id',
'format'=>'raw',
'label'=>'Nama',
'value'=>function($model,$key,$index){
if($model->dim_id!=NULL){
return $model->dim->nama;
}
else {
return '-';
}
}
],
'pengirim',
[
'attribute'=>'tanggal_kedatangan',
'format'=>['Date','php: d M y H:i']
],
[
'attribute'=>'posisi_paket_id',
'label'=>'Posisi',
'value'=>'posisiPaket.name'
],
[
'attribute'=>'status_paket_id',
'format'=>'raw',
'label'=>'Status Paket',
'value'=>function($model,$key,$index){
if($model->status_paket_id==1){
return '<b class="text-danger">'.$model->statusPaket->status.'</b>';
}
else{
return '<b class="text-success">'.$model->statusPaket->status.'</b>';
}
}
],
['class' => 'common\components\ToolsColumn',
'template' => '{view}',
'urlCreator' => function ($action, $model, $key, $index){
if ($action === 'view') {
return Url::toRoute(['data-paket-view', 'id' => $key]);
}
}
]
],
]); ?>
</div>
<?php
use yii\helpers\Html;
use yii\grid\GridView;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\DataPaketSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Data Paket';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="data-paket-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
[
'attribute'=>'pegawai_id',
'format'=>'raw',
'label'=>'Nama',
'value'=>function($model,$key,$index){
if($model->pegawai!=NULL){
return $model->pegawai->nama;
}
else {
return '-';
}
}
],
'pengirim',
[
'attribute'=>'tanggal_kedatangan',
'format'=>['Date','php: d M y H:i']
],
[
'attribute'=>'posisi_paket_id',
'label'=>'Posisi',
'value'=>'posisiPaket.name'
],
[
'attribute'=>'status_paket_id',
'format'=>'raw',
'label'=>'Status Paket',
'value'=>function($model,$key,$index){
if($model->status_paket_id==1){
return '<b class="text-danger">'.$model->statusPaket->status.'</b>';
}
else{
return '<b class="text-success">'.$model->statusPaket->status.'</b>';
}
}
],
['class' => 'common\components\ToolsColumn',
'template' => '{view}',
'urlCreator' => function ($action, $model, $key, $index){
if ($action === 'view') {
return Url::toRoute(['data-paket-view', 'id' => $key]);
}
}
]
],
]); ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\DataTamu */
$this->title = $model->nama;
$this->params['breadcrumbs'][] = ['label' => 'Data Tamu', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="data-tamu-view">
<h1><?= Html::encode($this->title) ?></h1>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'nik',
'nama',
[
'attribute'=>'waktu_kedatangan',
'format' => ['date', 'php:d M Y H:i:s'],
],
[
'attribute'=>'desc',
'label'=>'Deskripsi',
'value'=>$model->desc,
],
[
'attribute'=>'waktu_kembali',
'label' => 'Waktu Kembali',
'format'=> 'raw',
'headerOptions' => ['style' => 'color:#337ab7'],
'value'=>function($model){
if($model->waktu_kembali==NULL){
return '-';
}
else{
return Yii::$app->formatter->asDateTime($model->waktu_kembali, 'php:d M Y H:i:s');
}
}
],
],
]) ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\search\DataTamuSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="data-tamu-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
'method' => 'get',
]); ?>
<?= $form->field($model, 'nama') ?>
<?php // echo $form->field($model, 'waktu_kembali') ?>
<?php // echo $form->field($model, 'deleted') ?>
<?php // echo $form->field($model, 'deleted_at') ?>
<?php // echo $form->field($model, 'deleted_by') ?>
<?php // echo $form->field($model, 'created_by') ?>
<?php // echo $form->field($model, 'created_at') ?>
<?php // echo $form->field($model, 'updated_at') ?>
<?php // echo $form->field($model, 'updated_by') ?>
<div class="form-group">
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
use yii\helpers\Html;
use yii\grid\GridView;
use common\components\ToolsColumn;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\DataTamuSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Data Tamu';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="data-tamu-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'nik',
'nama',
[
'attribute'=>'waktu_kedatangan',
'format' => ['date', 'php:d M Y H:i:s'],
],
[
'attribute'=>'desc',
'label'=>'Deskripsi',
'value'=>'desc',
],
[
'attribute'=>'waktu_kembali',
'label' => 'Waktu Kembali',
'format'=> 'raw',
'headerOptions' => ['style' => 'color:#337ab7'],
'value'=>function($model,$index,$key){
if($model->waktu_kembali==NULL){
return '-';
}
else{
return Yii::$app->formatter->asDateTime($model->waktu_kembali, 'php:d M Y H:i:s');
}
}
],
// 'deleted',
// 'deleted_at',
// 'deleted_by',
// 'created_by',
// 'created_at',
// 'updated_at',
// 'updated_by',
['class' => 'common\components\ToolsColumn',
'template' => '{view} {delete}',
'buttons' => [
'delete' => function ($url, $model){
return "<li>".Html::a('<span class="fa fa-trash"></span> Delete', $url, [
'title' => Yii::t('yii', 'Hapus'),
'data-confirm' => Yii::t('yii', 'Are you sure to delete the data ?'),
'data-method' => 'post',
'data-pjax' => '0',
])."</li>";
},
],
'urlCreator' => function ($action, $model, $key, $index){
if ($action === 'delete') {
return Url::toRoute(['tamu-del', 'id' => $key]);
}
if($action === 'view'){
return Url::toRoute(['tamu-view','id'=>$key]);
}
}
],
],
]); ?>
</div>
<div class="ubux-default-index">
<h1><?= $this->context->action->uniqueId ?></h1>
<p>
This is the view content for action "<?= $this->context->action->id ?>".
The action belongs to the controller "<?= get_class($this->context) ?>"
in the "<?= $this->context->module->id ?>" module.
</p>
<p>
You may customize this page by editing the following file:<br>
<code><?= __FILE__ ?></code>
</p>
</div>
......@@ -7,7 +7,7 @@ use yii\helpers\Html;
/* @var $model backend\modules\ubux\models\Kendaraan */
$this->title = 'Tambah Kendaraan';
$this->params['breadcrumbs'][] = ['label' => 'Tambah Kendaraan', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => 'Manajemen Kendaraan', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-kendaraan-create">
......
......@@ -6,8 +6,8 @@ use yii\helpers\Html;
/* @var $model backend\modules\ubux\models\Kendaraan */
$this->title = 'Ubah Kendaraan : ' . ' ' . $model->kendaraan;
$this->params['breadcrumbs'][] = ['label' => 'Ubah Kendaraan', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->kendaraan_id, 'url' => ['view', 'id' => $model->kendaraan_id]];
$this->params['breadcrumbs'][] = ['label' => 'Manajemen Kendaraan', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->kendaraan, 'url' => ['view', 'id' => $model->kendaraan_id]];
$this->params['breadcrumbs'][] = 'Ubah';
?>
<div class="ubux-kendaraan-update">
......
......@@ -9,7 +9,7 @@ use common\components\ToolsColumn;
/* @var $searchModel backend\modules\ubux\models\KendaraanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Kendaraan';
$this->title = 'Manajemen Kendaraan';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-kendaraan-index">
......
......@@ -7,7 +7,7 @@ use yii\widgets\DetailView;
/* @var $model backend\modules\ubux\models\Kendaraan */
$this->title = $model->kendaraan;
$this->params['breadcrumbs'][] = ['label' => 'Ubux Kendaraan', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => 'Manajemen Kendaraan', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-kendaraan-view">
......
......@@ -75,14 +75,18 @@ use yii\bootstrap\ActiveForm;
<?= $form->field($model, 'kendaraan_id')->dropDownList(
ArrayHelper::map(Kendaraan::find()->select([
'kendaraan_id', 'kendaraan', 'plat_nomor'
])->where(['deleted' => 0])->all(), 'kendaraan_id', 'KeteranganKendaraan'),
])->where('deleted!=1')->orderBy(['kendaraan' => SORT_ASC])->all(), 'kendaraan_id', 'KeteranganKendaraan'),
['prompt' => 'Pilih Kendaraan']
) ?>
<?= $form->field($model, 'supir_id')->dropDownList(
ArrayHelper::map(Supir::find()->select([
'supir_id', 'pegawai_id',
])->where(['deleted' => 0])->all(), 'supir_id', 'NamaSupir'),
'ubux_supir.supir_id', 'ubux_supir.pegawai_id',
])->where('ubux_supir.deleted!=1')->joinWith([
'pegawai' => function($query){
$query->where('hrdx_pegawai.deleted!=1')->orderBy(['hrdx_pegawai.nama' => SORT_ASC]);
}
])->all(), 'supir_id', 'NamaSupir'),
['prompt' => 'Pilih Supir']
) ?>
......
......@@ -54,7 +54,7 @@ use dosamigos\datetimepicker\DateTimePicker;
]
]); ?>
<?= $form->field($model, 'file')->fileInput() ?>
<?= $form->field($model, 'proposal')->fileInput() ?>
<?= $form->field($model, 'no_telepon')->textInput(['maxlength' => true]) ?>
<!--
......
......@@ -6,8 +6,8 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraanMhs */
$this->title = 'Buat Permintaan Kendaraan Mahasiswa';
$this->params['breadcrumbs'][] = ['label' => 'Buat Permintaan Kendaraan Mahasiswa', 'url' => ['index']];
$this->title = 'Buat Permohonan Pemakaian';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-baru-create">
......
......@@ -5,10 +5,10 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraanMhs */
$this->title = 'Ubah Permintaan Kendaraan Mahasiswa';
$this->params['breadcrumbs'][] = ['label' => 'Ubah Permitaan Kendaraan Mahasiswa', 'url' => ['index']];
$this->title = 'Ubah Permohonan Pemakaian';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->pemakaian_kendaraan_mhs_id, 'url' => ['view', 'id' => $model->pemakaian_kendaraan_mhs_id]];
$this->params['breadcrumbs'][] = 'Ubah';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-baru-update">
......
......@@ -8,19 +8,17 @@ use yii\helpers\Url;
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanMahasiswaSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Permintaan Kendaraan Mahasiswa';
$this->title = 'Permohonan Pemakaian';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-baru-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<div class="col-md-9">
<p><?= Html::a('Permintaan Kendaraan Mahasiswa', ['add'], ['class' => 'btn btn-success']) ?></p>
</div>
<div class="col-md-3">
<p><?= Html::a('Buat Permohonan Pemakaian', ['add'], ['class' => 'btn btn-success']) ?></p>
<!-- <div class="col-md-3">
<p style="color: red;"><b>Nomor yang dapat dihubungi: Ibu Cori : 0822 7335 4777 (WA) atau 0812 6219 9995 (HP)</b></p>
</div>
</div> -->
<?= GridView::widget([
'dataProvider' => $dataProvider,
......@@ -37,13 +35,14 @@ $this->params['breadcrumbs'][] = $this->title;
'rencana_waktu_keberangkatan',
'rencana_waktu_kembali',
[
'attribute' => 'status_req_sekretaris_rektorat',
'value' => 'statusRequestSekretarisRektorat.status'
],
[
'attribute' => 'status_request_kemahasiswaan',
'value' => 'statusRequestKemahasiswaan.status'
],
[
'attribute' => 'status_req_sekretaris_rektorat',
'value' => 'statusRequestSekretarisRektorat.status',
'label' => 'Status Akhir'
],
// 'proposal',
// 'no_telepon',
// 'deleted',
......
......@@ -8,17 +8,15 @@ use yii\helpers\Url;
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanMahasiswaSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Permintaan Kendaraan Mahasiswa';
$this->title = 'Permohonan Pemakaian oleh Mahasiswa';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-baru-index">
<div class="col-md-9">
<h1><?= Html::encode($this->title) ?></h1>
</div>
<div class="col-md-3">
<!-- <div class="col-md-3">
<p style="color: red;"><b>Nomor yang dapat dihubungi: Ibu Cori : 0822 7335 4777 (WA) atau 0812 6219 9995 (HP)</b></p>
</div>
</div> -->
<?= GridView::widget([
'dataProvider' => $dataProvider,
......@@ -40,14 +38,16 @@ $this->params['breadcrumbs'][] = $this->title;
'jumlah_penumpang_kendaraan',
// 'rencana_waktu_keberangkatan',
// 'rencana_waktu_kembali',
[
'attribute' => 'status_req_sekretaris_rektorat',
'value' => 'statusRequestSekretarisRektorat.status'
],
[
'attribute' => 'status_request_kemahasiswaan',
'value' => 'statusRequestKemahasiswaan.status'
],
[
'attribute' => 'status_req_sekretaris_rektorat',
'value' => 'statusRequestSekretarisRektorat.status',
'label' => 'Status Akhir'
],
// 'proposal',
// 'no_telepon',
// 'deleted',
......
......@@ -7,8 +7,8 @@ use yii\base\Model;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraanMhs */
$this->title = 'Rincian Permintaan Kendaraan';
$this->params['breadcrumbs'][] = ['label' => 'Permintaan Kendaraan Mahasiswa', 'url' => ['index']];
$this->title = 'Rincian Permohonan Pemakaian Kendaraan';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-baru-view">
......@@ -39,14 +39,14 @@ $this->params['breadcrumbs'][] = $this->title;
'attributes' => [
// 'pemakaian_kendaraan_mhs_id',
// 'dim_id',
[
'attribute' => 'NIM',
'value' => $model->mahasiswa->nim,
],
[
'attribute' => 'Nama',
'value' => $model->mahasiswa->nama,
],
// [
// 'attribute' => 'NIM',
// 'value' => $model->mahasiswa->nim,
// ],
// [
// 'attribute' => 'Nama',
// 'value' => $model->mahasiswa->nama,
// ],
'desc',
'tujuan',
'jumlah_penumpang_kendaraan',
......@@ -103,9 +103,14 @@ $this->params['breadcrumbs'][] = $this->title;
}
},
],
[
'attribute' => 'proposal',
'format' => 'html',
'value' => isset($model->proposal) && $model->proposal!==''?LinkHelper::renderLink(['options'=>'target = _blank','label'=>$model->proposal, 'url'=>\Yii::$app->fileManager->generateUri($model->kode_proposal)]):'-',
],
],
]) ?>
<?= Html::a('Download Proposal', ['pemakaian-kendaraan-mhs/download', 'id' => $model->pemakaian_kendaraan_mhs_id], ['class' => 'btn btn-success']) ?>
<!-- <?= Html::a('Download Proposal', ['pemakaian-kendaraan-mhs/download', 'id' => $model->pemakaian_kendaraan_mhs_id], ['class' => 'btn btn-success']) ?> -->
</div>
......@@ -7,8 +7,8 @@ use yii\base\Model;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraanMhs */
$this->title = 'Rincian Permintaan Kendaraan';
$this->params['breadcrumbs'][] = ['label' => 'Permintaan Kendaraan Mahasiswa', 'url' => ['index']];
$this->title = 'Rincian Permohonan Pemakaian';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian oleh Mahasiswa', 'url' => ['index-by-kemahasiswaan']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-baru-view">
......@@ -35,7 +35,7 @@ $this->params['breadcrumbs'][] = $this->title;
'attributes' => [
// 'dim_id',
[
'attribute' => 'NIM',
'label' => 'NIM',
'value' => $model->mahasiswa->nim,
],
[
......@@ -97,9 +97,14 @@ $this->params['breadcrumbs'][] = $this->title;
}
},
],
[
'attribute' => 'proposal',
'format' => 'html',
'value' => isset($model->proposal) && $model->proposal!==''?LinkHelper::renderLink(['options'=>'target = _blank','label'=>$model->proposal, 'url'=>\Yii::$app->fileManager->generateUri($model->kode_proposal)]):'-',
],
],
]) ?>
<?= Html::a('Download Proposal', ['pemakaian-kendaraan-mhs/download', 'id' => $model->pemakaian_kendaraan_mhs_id], ['class' => 'btn btn-success']) ?>
<!-- <?= Html::a('Download Proposal', ['pemakaian-kendaraan-mhs/download', 'id' => $model->pemakaian_kendaraan_mhs_id], ['class' => 'btn btn-success']) ?> -->
</div>
......@@ -9,6 +9,16 @@ use backend\modules\ubux\models\Kendaraan;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */
/* @var $form yii\widgets\ActiveForm */
if(!$model->isNewRecord){
$this->title = 'Ubah Permohonan Pemakaian';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian untuk Keperluan Dinas', 'url' => ['index-by-pegawai']];
$this->params['breadcrumbs'][] = ['label' => $model->pemakaian_kendaraan_id, 'url' => ['view-by-pegawai', 'id' => $model->pemakaian_kendaraan_id]];
$this->params['breadcrumbs'][] = $this->title;
}else{
$this->title = 'Buat Permohonan Pemakaian';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian untuk Keperluan Dinas', 'url' => ['index-by-pegawai']];
$this->params['breadcrumbs'][] = $this->title;
}
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-form">
......
......@@ -9,6 +9,16 @@ use backend\modules\ubux\models\Kendaraan;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */
/* @var $form yii\widgets\ActiveForm */
if(!$model->isNewRecord){
$this->title = 'Ubah Permohonan Pemakaian';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian untuk Keperluan Pribadi', 'url' => ['index-by-pribadi']];
$this->params['breadcrumbs'][] = ['label' => $model->pemakaian_kendaraan_id, 'url' => ['view-by-pribadi', 'id' => $model->pemakaian_kendaraan_id]];
$this->params['breadcrumbs'][] = $this->title;
}else{
$this->title = 'Buat Permohonan Pemakaian';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian untuk Keperluan Pribadi', 'url' => ['index-by-pribadi']];
$this->params['breadcrumbs'][] = $this->title;
}
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-form">
......
......@@ -5,9 +5,9 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */
$this->title = 'Ubah Permintaan Kendaraan Mahasiswa';
$this->params['breadcrumbs'][] = ['label' => 'Permintaan Kendaraan Mahasiswa', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->pemakaian_kendaraan_id, 'url' => ['view', 'id' => $model->pemakaian_kendaraan_id]];
$this->title = 'Ubah Permohonan Pemakaian';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->kendaraan->kendaraan, 'url' => ['view', 'id' => $model->pemakaian_kendaraan_id]];
$this->params['breadcrumbs'][] = 'Ubah';
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-update">
......
......@@ -9,7 +9,7 @@ use yii\bootstrap\Alert;
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Data Permintaan Kendaraan Pribadi';
$this->title = 'Permohonan Pemakaian untuk Keperluan Pribadi';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-index">
......
......@@ -9,7 +9,7 @@ use yii\bootstrap\Alert;
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Data Permintaan Kendaraan Pribadi';
$this->title = 'Permohonan Pemakaian untuk Keperluan Pribadi';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-index">
......
......@@ -9,7 +9,7 @@ use yii\bootstrap\Alert;
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Data Permintaan Kendaraan Pribadi';
$this->title = 'Permohonan Pemakaian untuk Keperluan Pribadi';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-index">
......
......@@ -9,7 +9,7 @@ use yii\base\Model;
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Semua Permintaan Kendaraan Pegawai';
$this->title = 'Permohonan Pemakaian untuk Keperluan Dinas';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-index">
......@@ -18,7 +18,7 @@ $this->params['breadcrumbs'][] = $this->title;
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a('Permintaan Kendaraan Pegawai', ['add-by-pegawai'], ['class' => 'btn btn-success']) ?>
<?= Html::a('Buat Permohonan Pemakaian', ['add-by-pegawai'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
......@@ -28,16 +28,16 @@ $this->params['breadcrumbs'][] = $this->title;
['class' => 'yii\grid\SerialColumn'],
// 'pemakaian_kendaraan_id',
[
'attribute' => 'Nama',
'value' => function(Model $model){
if($model->pegawai_id == null){
return 'Kemahasiswaan';
}else{
return $model->pegawai->nama;
}
}
],
// [
// 'attribute' => 'Nama',
// 'value' => function(Model $model){
// if($model->pegawai_id == null){
// return 'Kemahasiswaan';
// }else{
// return $model->pegawai->nama;
// }
// }
// ],
'desc',
'tujuan',
'jumlah_penumpang_kendaraan',
......@@ -65,7 +65,7 @@ $this->params['breadcrumbs'][] = $this->title;
],
// 'status_req_sekretaris_rektorat',
[
'attribute' => 'Status Request',
'attribute' => 'status_req_sekretaris_rektorat',
'value' => 'statusRequestSekretarisRektorat.status',
],
[
......
......@@ -9,7 +9,7 @@ use yii\bootstrap\Alert;
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Data Permintaan Kendaraan Pribadi';
$this->title = 'Permohonan Pemakaian untuk Keperluan Pribadi';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-index">
......@@ -18,7 +18,7 @@ $this->params['breadcrumbs'][] = $this->title;
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<div class="col-md-9">
<?= Html::a('Permintaan Kendaraan Pribadi', ['add-by-pribadi'], ['class' => 'btn btn-success']) ?>
<?= Html::a('Buat Permohonan Pemakaian', ['add-by-pribadi'], ['class' => 'btn btn-success']) ?>
</div>
<div class="col-md-3">
<p style="color: red;"><b>Nomor yang dapat dihubungi: Ibu Cori : 0822 7335 4777 (WA) atau 0812 6219 9995 (HP)</b></p>
......@@ -52,7 +52,8 @@ $this->params['breadcrumbs'][] = $this->title;
// 'value' => 'kendaraan.kendaraan',
// ],
[
'attribute' => 'Status Request Sekretaris Rektorat',
'attribute' => 'status_req_sekretaris_rektorat',
'label' => 'Status Persetujuan Sekretaris Rektorat',
'value' => 'statusRequestSekretarisRektorat.status',
],
[
......
......@@ -9,7 +9,7 @@ use yii\base\Model;
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Semua Permintaan Kendaraan';
$this->title = 'Permohonan Pemakaian';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-index">
......
......@@ -9,7 +9,7 @@ use yii\bootstrap\Alert;
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Data Permintaan Kendaraan Pribadi';
$this->title = 'Permohonan Pemakaian untuk Keperluan Pribadi';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-index">
......
......@@ -7,8 +7,8 @@ use yii\base\Model;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */
$this->title = 'Permintaan Kendaraan Pribadi';
$this->params['breadcrumbs'][] = ['label' => 'Permintaan Kendaraan Pribadi', 'url' => ['index-by-hrd']];
$this->title = 'Permohonan Pemakaian';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian untuk Keperluan Pribadi', 'url' => ['index-by-hrd']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-view">
......
......@@ -7,8 +7,8 @@ use yii\base\Model;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */
$this->title = 'Permintaan Kendaraan Pribadi';
$this->params['breadcrumbs'][] = ['label' => 'Permintaan Kendaraan Pribadi', 'url' => ['index-by-kabiro-ksd']];
$this->title = 'Permohonan Pemakaian';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian untuk Keperluan Pribadi', 'url' => ['index-by-kabiro-ksd']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-view">
......
......@@ -7,8 +7,8 @@ use yii\base\Model;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */
$this->title = 'Permintaan Kendaraan Pribadi';
$this->params['breadcrumbs'][] = ['label' => 'Permintaan Kendaraan Pribadi', 'url' => ['index-by-keuangan']];
$this->title = 'Permohonan Pemakaian';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian untuk Keperluan Pribadi', 'url' => ['index-by-keuangan']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-view">
......
......@@ -7,8 +7,8 @@ use yii\base\Model;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */
$this->title = 'Permintaan Kendaraan Pegawai';
$this->params['breadcrumbs'][] = ['label' => 'Semua Permintaan Kendaraan Pegawai', 'url' => ['index-by-pegawai']];
$this->title = 'Permohonan Pemakaian';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian untuk Keperluan Pribadi', 'url' => ['index-by-pegawai']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-view">
......@@ -34,10 +34,10 @@ $this->params['breadcrumbs'][] = $this->title;
'model' => $model,
'attributes' => [
// 'pemakaian_kendaraan_id',
[
'attribute' => 'Nama',
'value' => $model->pegawai->nama,
],
// [
// 'attribute' => 'Nama',
// 'value' => $model->pegawai->nama,
// ],
'desc',
'tujuan',
'jumlah_penumpang_kendaraan',
......
......@@ -7,8 +7,8 @@ use yii\base\Model;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */
$this->title = 'Permintaan Kendaraan Pribadi';
$this->params['breadcrumbs'][] = ['label' => 'Permintaan Kendaraan Pribadi', 'url' => ['index-by-pribadi']];
$this->title = 'Permohonan Pemakaian';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian untuk Keperluan Pribadi', 'url' => ['index-by-pribadi']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-view">
......@@ -35,10 +35,10 @@ $this->params['breadcrumbs'][] = $this->title;
'model' => $model,
'attributes' => [
// 'pemakaian_kendaraan_id',
[
'attribute' => 'Nama',
'value' => $model->pegawai->nama,
],
// [
// 'attribute' => 'Nama',
// 'value' => $model->pegawai->nama,
// ],
'desc',
'tujuan',
'jumlah_penumpang_kendaraan',
......
......@@ -7,8 +7,8 @@ use yii\base\Model;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */
$this->title = 'Pemintaan Kendaraan';
$this->params['breadcrumbs'][] = ['label' => 'Permintaan Kendaraan', 'url' => ['index-all']];
$this->title = 'Permohonan Pemakaian';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian', 'url' => ['index-all']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-view">
......
......@@ -7,8 +7,8 @@ use yii\base\Model;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */
$this->title = 'Permintaan Kendaraan Pribadi';
$this->params['breadcrumbs'][] = ['label' => 'Ubux Transaksi Kendaraan Pribadi', 'url' => ['index-by-wr2']];
$this->title = 'Permohonan Pemakaian';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian untuk Keperluan Pribadi', 'url' => ['index-by-wr2']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-view">
......
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PosisiPaket */
$this->title = 'Posisi Paket Add';
$this->params['breadcrumbs'][] = ['label' => 'Posisi Paket', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="posisi-paket-create">
<div class="col-sm-2">
</div>
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PosisiPaket */
$this->title = 'Update Posisi Paket: ' . ' ' . $model->name;
$this->params['breadcrumbs'][] = ['label' => 'Posisi Paket', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['posisi-paket-view', 'id' => $model->posisi_paket_id]];
$this->params['breadcrumbs'][] = 'Update';
?>
<div class="posisi-paket-update">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
<?php
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PosisiPaket */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="posisi-paket-form">
<?php
$form = ActiveForm::begin([
'layout' => 'horizontal',
'fieldConfig' => [
'template' => "{label}\n{beginWrapper}\n{input}\n{error}\n{endWrapper}\n{hint}",
'horizontalCssClasses' => [
'label' => 'col-sm-2',
'wrapper' => 'col-sm-8',
'error' => '',
'hint' => '',
],
],
])
?>
<?= $form->field($model, 'name') ?>
<div class="form-group">
<div class="col-md-1 col-md-offset-2">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\search\PosisiPaketSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="posisi-paket-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
'method' => 'get',
]); ?>
<?= $form->field($model, 'name') ?>
<?php // echo $form->field($model, 'created_at') ?>
<?php // echo $form->field($model, 'created_by') ?>
<?php // echo $form->field($model, 'updated_at') ?>
<?php // echo $form->field($model, 'updated_by') ?>
<div class="form-group">
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
use yii\helpers\Html;
use yii\grid\GridView;
use common\components\ToolsColumn;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\PosisiPaketSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Posisi Paket';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="posisi-paket-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a('Create Posisi Paket', ['posisi-paket-add'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
//'posisi_paket_id',
'name',
//'deleted',
//'deleted_at',
//'deleted_by',
// 'created_at',
// 'created_by',
// 'updated_at',
// 'updated_by',
['class' => 'common\components\ToolsColumn',
'template' => '{update} {delete}',
'buttons' => [
'update' => function ($url, $model){
$url = 'posisi-paket-edit?id='.$model->posisi_paket_id;
return ToolsColumn::renderCustomButton($url, $model, 'Edit', 'fa fa-pencil');
},
'delete' => function ($url, $model){
return "<li>".Html::a('<span class="fa fa-trash"></span> Delete', $url, [
'title' => Yii::t('yii', 'Hapus'),
'data-confirm' => Yii::t('yii', 'Are you sure to delete the data ?'),
'data-method' => 'post',
'data-pjax' => '0',
])."</li>";
},
],
'urlCreator' => function ($action, $model, $key, $index){
if ($action === 'delete') {
return Url::toRoute(['posisi-paket/posisi-paket-del', 'id' => $key]);
}
if ($action === 'update') {
return Url::toRoute(['posisi-paket/posisi-paket-edit', 'id' => $key]);
}
}
],
],
]); ?>
</div>
......@@ -28,7 +28,7 @@ use yii\helpers\ArrayHelper;
<?= $form->field($model, 'pegawai_id')->dropDownList(
ArrayHelper::map(Pegawai::find()->select([
'pegawai_id', 'nama',
])->all(), 'pegawai_id', 'nama'),
])->where('deleted != 1')->andWhere(['in', 'status_aktif_pegawai_id', [1,2]])->orderBy(['nama' => SORT_ASC])->all(), 'pegawai_id', 'nama'),
['prompt' => 'Pilih Pegawai']
) ?>
<!--
......
......@@ -7,7 +7,7 @@ use yii\helpers\Html;
/* @var $model backend\modules\ubux\models\Supir */
$this->title = 'Tambah Supir';
$this->params['breadcrumbs'][] = ['label' => 'Supir', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => 'Manajemen Supir', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="supir-create">
......
......@@ -6,8 +6,8 @@ use yii\helpers\Html;
/* @var $model backend\modules\ubux\models\Supir */
$this->title = 'Ubah Supir : ' . ' ' . $model->pegawai->nama;
$this->params['breadcrumbs'][] = ['label' => 'Supir', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->supir_id, 'url' => ['view', 'id' => $model->supir_id]];
$this->params['breadcrumbs'][] = ['label' => 'Manajemen Supir', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->pegawai->nama, 'url' => ['view', 'id' => $model->supir_id]];
$this->params['breadcrumbs'][] = 'Edit';
?>
<div class="supir-update">
......
......@@ -8,7 +8,7 @@ use yii\helpers\Url;
/* @var $searchModel backend\modules\ubux\models\SupirSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Supir';
$this->title = 'Manajemen Supir';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="supir-index">
......
......@@ -7,7 +7,7 @@ use yii\widgets\DetailView;
/* @var $model backend\modules\ubux\models\Supir */
$this->title = $model->pegawai->nama;
$this->params['breadcrumbs'][] = ['label' => 'Supir', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => 'Manajemen Supir', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="supir-view">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment