Commit 0a7c2d1d by Hendro Prabowo

Revisi Integrasi 3

parent e2653d07
<?php
namespace backend\modules\ubux\controllers;
use yii\web\Controller;
/**
* Default controller for the `ubux` module
*/
class DefaultController extends Controller
{
/**
* Renders the index view for the module
* @return string
*/
public function actionIndex()
{
return $this->render('index');
}
}
......@@ -65,14 +65,14 @@ class KendaraanController extends Controller
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public function actionCreate()
public function actionAdd()
{
$model = new Kendaraan();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->kendaraan_id]);
} else {
return $this->render('create', [
return $this->render('add', [
'model' => $model,
]);
}
......@@ -84,14 +84,14 @@ class KendaraanController extends Controller
* @param integer $id
* @return mixed
*/
public function actionUpdate($id)
public function actionEdit($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->kendaraan_id]);
} else {
return $this->render('update', [
return $this->render('edit', [
'model' => $model,
]);
}
......@@ -103,7 +103,7 @@ class KendaraanController extends Controller
* @param integer $id
* @return mixed
*/
public function actionDelete($id)
public function actionDel($id)
{
$this->findModel($id)->softDelete();
......@@ -119,10 +119,7 @@ class KendaraanController extends Controller
*/
protected function findModel($id)
{
if (($model = Kendaraan::find()->where([
'kendaraan_id' => $id,
'deleted' => 0,
])->one()) !== null) {
if (($model = Kendaraan::findOne($id))) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
......
......@@ -65,14 +65,14 @@ class LaporanPemakaianKendaraanController extends Controller
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public function actionCreate()
public function actionAdd()
{
$model = new LaporanPemakaianKendaraan();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->laporan_pemakaian_kendaraan_id]);
} else {
return $this->render('create', [
return $this->render('add', [
'model' => $model,
]);
}
......@@ -84,14 +84,14 @@ class LaporanPemakaianKendaraanController extends Controller
* @param integer $id
* @return mixed
*/
public function actionUpdate($id)
public function actionEdit($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->laporan_pemakaian_kendaraan_id]);
} else {
return $this->render('update', [
return $this->render('edit', [
'model' => $model,
]);
}
......@@ -103,7 +103,7 @@ class LaporanPemakaianKendaraanController extends Controller
* @param integer $id
* @return mixed
*/
public function actionDelete($id)
public function actionDel($id)
{
$this->findModel($id)->softDelete();
......@@ -119,10 +119,7 @@ class LaporanPemakaianKendaraanController extends Controller
*/
protected function findModel($id)
{
if (($model = LaporanPemakaianKendaraan::find()->where([
'laporan_pemakaian_kendaraan_id' => $id,
'deleted' => 0,
])->one()) !== null) {
if (($model = LaporanPemakaianKendaraan::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
......
......@@ -19,23 +19,23 @@ use backend\modules\ubux\models\PemakaianKendaraan;
*/
class PemakaianKendaraanMahasiswaController extends Controller
{
// public function behaviors()
// {
// return [
// //TODO: crud controller actions are bypassed by default, set the appropriate privilege
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'],
// ],
// ],
// ];
// }
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['post'],
],
],
];
}
/**
* Lists all PemakaianKendaraanMahasiswa models.
......@@ -49,8 +49,8 @@ class PemakaianKendaraanMahasiswaController extends Controller
{
$searchModel = new PemakaianKendaraanMahasiswaSearch();
$dataProvider = new ActiveDataProvider([
'query' => PemakaianKendaraanMahasiswa::find()->where(['dim_id' => $this->dim_id]),
'sort' => ['defaultOrder' => ['dim_id' => SORT_ASC, 'updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
'query' => PemakaianKendaraanMahasiswa::find()->where(['dim_id' => $this->dim_id])->andWhere('deleted!=1'),
'sort' => ['defaultOrder' => ['updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
]);
return $this->render('index', [
......@@ -83,7 +83,7 @@ class PemakaianKendaraanMahasiswaController extends Controller
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public function actionCreate()
public function actionAdd()
{
$model = new PemakaianKendaraanMahasiswa();
......@@ -118,7 +118,7 @@ class PemakaianKendaraanMahasiswaController extends Controller
return $this->redirect(['view', 'id' => $model->transaksi_kendaraan_id]);
} else {
return $this->render('create', [
return $this->render('add', [
'model' => $model,
]);
}
......@@ -130,14 +130,14 @@ class PemakaianKendaraanMahasiswaController extends Controller
* @param integer $id
* @return mixed
*/
public function actionUpdate($id)
public function actionEdit($id)
{
$model = $this->findModel($id);
if($model->status_request_kemahasiswaan == 2 || $model->status_request_kemahasiswaan == 3){
$searchModel = new PemakaianKendaraanMahasiswaSearch();
$dataProvider = new ActiveDataProvider([
'query' => PemakaianKendaraanMahasiswa::find()->where(['dim_id' => $this->dim_id]),
'sort' => ['defaultOrder' => ['dim_id' => SORT_ASC, 'updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
'query' => PemakaianKendaraanMahasiswa::find()->where(['dim_id' => $this->dim_id])->andWhere('deleted!=1'),
'sort' => ['defaultOrder' => ['updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
]);
Yii::$app->messenger->addErrorFlash("Tidak bisa mengubah, Sudah di setujui/ditolak Kemahasiswaan");
return $this->render('index', [
......@@ -148,7 +148,7 @@ class PemakaianKendaraanMahasiswaController extends Controller
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->transaksi_kendaraan_id]);
} else {
return $this->render('update', [
return $this->render('edit', [
'model' => $model,
]);
}
......@@ -160,14 +160,14 @@ class PemakaianKendaraanMahasiswaController extends Controller
* @param integer $id
* @return mixed
*/
public function actionDelete($id)
public function actionDel($id)
{
$model = $this->findModel($id);
if($model->status_request_kemahasiswaan == 2 || $model->status_request_kemahasiswaan == 3){
$searchModel = new PemakaianKendaraanMahasiswaSearch();
$dataProvider = new ActiveDataProvider([
'query' => PemakaianKendaraanMahasiswa::find()->where(['dim_id' => $this->dim_id]),
'sort' => ['defaultOrder' => ['transaksi_kendaraan_id' => SORT_ASC, 'updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
'query' => PemakaianKendaraanMahasiswa::find()->where(['dim_id' => $this->dim_id])->andWhere('deleted!=1'),
'sort' => ['defaultOrder' => ['updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
]);
Yii::$app->messenger->addErrorFlash("Tidak bisa menghapus, Sudah di setujui Kemahasiswaan");
return $this->render('index', [
......@@ -175,7 +175,7 @@ class PemakaianKendaraanMahasiswaController extends Controller
'dataProvider' => $dataProvider,
]);
}
$this->findModel($id)->delete();
$this->findModel($id)->softDelete();
return $this->redirect(['index']);
}
......@@ -189,10 +189,7 @@ class PemakaianKendaraanMahasiswaController extends Controller
*/
protected function findModel($id)
{
if (($model = PemakaianKendaraanMahasiswa::find()->where([
'transaksi_kendaraan_id' => $id,
'deleted' => 0,
])->one()) !== null) {
if (($model = PemakaianKendaraanMahasiswa::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
......@@ -244,14 +241,14 @@ class PemakaianKendaraanMahasiswaController extends Controller
$model = $this->findModel($id);
if($model->status_request_kemahasiswaan == 1){
$modelBaru = new PemakaianKendaraan();
$modelBaru->transaksi_kendaraan_mahasiswa_id = $model->transaksi_kendaraan_id;
$modelBaru->transaksi_kendaraan_mhs_id = $model->transaksi_kendaraan_id;
$modelBaru->nama_perequest_kendaraan = $model->mahasiswa->nama;
$modelBaru->desc_penggunaan_kendaraan = $model->desc_penggunaan_kendaraan;
$modelBaru->tujuan = $model->tujuan;
$modelBaru->jumlah_penumpang_kendaraan = $model->jumlah_penumpang_kendaraan;
$modelBaru->rencana_waktu_keberangkatan = $model->rencana_waktu_keberangkatan;
$modelBaru->rencana_waktu_kembali = $model->rencana_waktu_kembali;
$modelBaru->status_request_sekertaris_rektorat = 1;
$modelBaru->status_req_sekretaris_rektorat = 1;
$modelBaru->status_request_kemahasiswaan = $model->status_request_kemahasiswaan;
$modelBaru->role = 1;
$modelBaru->proposal = $model->proposal;
......
......@@ -65,7 +65,7 @@ class SupirController extends Controller
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public function actionCreate()
public function actionAdd()
{
$model = new Supir();
......@@ -77,7 +77,7 @@ class SupirController extends Controller
$model->save();
return $this->redirect(['view', 'id' => $model->supir_id]);
} else {
return $this->render('create', [
return $this->render('add', [
'model' => $model,
]);
}
......@@ -89,7 +89,7 @@ class SupirController extends Controller
* @param integer $id
* @return mixed
*/
public function actionUpdate($id)
public function actionEdit($id)
{
$model = $this->findModel($id);
......@@ -108,7 +108,7 @@ class SupirController extends Controller
* @param integer $id
* @return mixed
*/
public function actionDelete($id)
public function actionDel($id)
{
$this->findModel($id)->softDelete();
......@@ -124,10 +124,7 @@ class SupirController extends Controller
*/
protected function findModel($id)
{
if (($model = Supir::find()->where([
'supir_id' => $id,
'deleted' => 0,
])) !== null) {
if ($model = Supir::findOne($id)) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
......
......@@ -13,7 +13,7 @@ use common\behaviors\DeleteBehavior;
*
* @property integer $laporan_pemakaian_kendaraan_id
* @property string $tujuan
* @property string $deskripsi_penumpang
* @property string $desc_penumpang
* @property integer $jumlah_penumpang
* @property string $keperluan
* @property string $waktu_keberangkatan
......@@ -66,10 +66,10 @@ class LaporanPemakaianKendaraan extends \yii\db\ActiveRecord
public function rules()
{
return [
[['tujuan', 'deskripsi_penumpang', 'jumlah_penumpang', 'keperluan', 'waktu_keberangkatan', 'waktu_tiba'], 'required'],
[['tujuan', 'desc_penumpang', 'jumlah_penumpang', 'keperluan', 'waktu_keberangkatan', 'waktu_tiba'], 'required'],
[['jumlah_penumpang', 'deleted', 'kendaraan_id', 'supir_id'], 'integer'],
[['waktu_keberangkatan', 'waktu_tiba', 'deleted_at', 'created_at', 'updated_at'], 'safe'],
[['tujuan', 'deskripsi_penumpang', 'keperluan'], 'string', 'max' => 45],
[['tujuan', 'desc_penumpang', 'keperluan'], 'string'],
[['deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32],
[['kendaraan_id'], 'exist', 'skipOnError' => true, 'targetClass' => Kendaraan::className(), 'targetAttribute' => ['kendaraan_id' => 'kendaraan_id']],
[['supir_id'], 'exist', 'skipOnError' => true, 'targetClass' => Supir::className(), 'targetAttribute' => ['supir_id' => 'supir_id']]
......@@ -84,7 +84,7 @@ class LaporanPemakaianKendaraan extends \yii\db\ActiveRecord
return [
'laporan_pemakaian_kendaraan_id' => 'Laporan Pemakaian Kendaraan ID',
'tujuan' => 'Tujuan',
'deskripsi_penumpang' => 'Deskripsi Penumpang',
'desc_penumpang' => 'Deskripsi Penumpang',
'jumlah_penumpang' => 'Jumlah Penumpang',
'keperluan' => 'Keperluan',
'waktu_keberangkatan' => 'Waktu Keberangkatan',
......
......@@ -12,14 +12,15 @@ use common\behaviors\DeleteBehavior;
* This is the model class for table "ubux_pemakaian_kendaraan".
*
* @property integer $transaksi_kendaraan_id
* @property integer $transaksi_kendaraan_mahasiswa_id
* @property integer $transaksi_kendaraan_mhs_id
* @property integer $pegawai_id
* @property string $nama_perequest_kendaraan
* @property string $desc_penggunaan_kendaraan
* @property string $tujuan
* @property integer $jumlah_penumpang_kendaraan
* @property string $rencana_waktu_keberangkatan
* @property string $rencana_waktu_kembali
* @property string $status_request_sekertaris_rektorat
* @property string $status_req_sekretaris_rektorat
* @property string $status_request_kemahasiswaan
* @property string $role
* @property string $no_telepon
......@@ -34,20 +35,21 @@ use common\behaviors\DeleteBehavior;
* @property integer $kendaraan_id
* @property integer $supir_id
* @property string $no_hp_supir
* @property string $status_request_kabiro_KSD
* @property string $status_request_hrd
* @property string $status_request_keuangan
* @property string $status_request_wr2
* @property integer $status_request_kabiro_KSD
* @property integer $status_request_hrd
* @property integer $status_request_keuangan
* @property integer $status_request_wr2
*
* @property Supir $supir
* @property Kendaraan $kendaraan
* @property Referesi $statusRequestSekertarisRektorat
* @property Referesi $statusRequestKemahasiswaan
* @property Referesi $statusRequestKabiroKSD
* @property Referesi $statusRequestHRD
* @property Referesi $statusRequestKeuangan
* @property Referesi $statusRequestWr2
* @property StatusRequest $statusRequestSekretarisRektorat
* @property StatusRequest $statusRequestKemahasiswaan
* @property StatusRequest $statusRequestKabiroKSD
* @property StatusRequest $statusRequestHRD
* @property StatusRequest $statusRequestKeuangan
* @property StatusRequest $statusRequestWr2
* @property JenisKeperluan $jenisKeperluan
* @property HrdxPegawai $pegawai
*/
class PemakaianKendaraan extends \yii\db\ActiveRecord
{
......@@ -84,8 +86,8 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord
public function rules()
{
return [
[['nama_perequest_kendaraan', 'desc_penggunaan_kendaraan', 'tujuan', 'rencana_waktu_keberangkatan', 'rencana_waktu_kembali', 'no_telepon'], 'required'],
[['status_request_sekertaris_rektorat', 'status_request_kemahasiswaan', 'jumlah_penumpang_kendaraan', 'deleted', 'kendaraan_id', 'supir_id', 'transaksi_kendaraan_mahasiswa_id', 'status_request_kabiro_KSD', 'status_request_hrd', 'status_request_keuangan', 'status_request_wr2', 'role'], 'integer'],
[['desc_penggunaan_kendaraan', 'tujuan', 'rencana_waktu_keberangkatan', 'rencana_waktu_kembali', 'no_telepon'], 'required'],
[['status_req_sekretaris_rektorat', 'status_request_kemahasiswaan', 'jumlah_penumpang_kendaraan', 'deleted', 'kendaraan_id', 'supir_id', 'transaksi_kendaraan_mhs_id', 'status_request_kabiro_KSD', 'status_request_hrd', 'status_request_keuangan', 'status_request_wr2', 'role', 'pegawai_id'], 'integer'],
[['rencana_waktu_keberangkatan', 'rencana_waktu_kembali', 'deleted_at', 'created_at', 'updated_at'], 'safe'],
[['file'], 'file'],
[['nama_perequest_kendaraan',], 'string', 'max' => 45],
......@@ -95,7 +97,8 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord
[['no_telepon', 'deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32],
[['no_hp_supir'], 'string', 'max' => 300],
[['supir_id'], 'exist', 'skipOnError' => true, 'targetClass' => Supir::className(), 'targetAttribute' => ['supir_id' => 'supir_id']],
[['kendaraan_id'], 'exist', 'skipOnError' => true, 'targetClass' => Kendaraan::className(), 'targetAttribute' => ['kendaraan_id' => 'kendaraan_id']]
[['kendaraan_id'], 'exist', 'skipOnError' => true, 'targetClass' => Kendaraan::className(), 'targetAttribute' => ['kendaraan_id' => 'kendaraan_id']],
[['pegawai_id'], 'exist', 'skipOnError' => true, 'targetClass' => Pegawai::className(), 'targetAttribute' => ['pegawai_id' => 'pegawai_id']],
];
}
......@@ -106,13 +109,14 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord
{
return [
'transaksi_kendaraan_id' => 'Transaksi Kendaraan ID',
'pegawai_id' => 'Pegawai ID',
'nama_perequest_kendaraan' => 'Nama',
'desc_penggunaan_kendaraan' => 'Keperluan',
'tujuan' => 'Tujuan',
'jumlah_penumpang_kendaraan' => 'Jumlah Penumpang',
'rencana_waktu_keberangkatan' => 'Waktu Keberangkatan',
'rencana_waktu_kembali' => 'Waktu Tiba',
'status_request_sekertaris_rektorat' => 'Status',
'status_req_sekretaris_rektorat' => 'Status',
'status_request_kemahasiswaan' => 'Status Pemintaan Kemahasiswaan',
'no_telepon' => 'No Telepon',
'role' => 'Jenis Permintaan',
......@@ -132,7 +136,7 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord
'status_request_hrd' => 'Status Permintaan Hrd',
'status_request_keuangan' => 'Status Permintaan Keuangan',
'status_request_wr2' => 'Status Permintaan Wr2',
'transaksi_kendaraan_mahasiswa_id' => 'Transaksi Kendaraan Mahasiswa ID'
'transaksi_kendaraan_mhs_id' => 'Transaksi Kendaraan Mahasiswa ID'
];
}
......@@ -155,39 +159,43 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord
/**
* @return \yii\db\ActiveQuery
*/
public function getStatusRequestSekertarisRektorat()
public function getStatusRequestSekretarisRektorat()
{
return $this->hasOne(Referesi::className(), ['id' => 'status_request_sekertaris_rektorat']);
return $this->hasOne(StatusRequest::className(), ['id' => 'status_req_sekretaris_rektorat']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getStatusRequestKemahasiswaan()
{
return $this->hasOne(Referesi::className(), ['id' => 'status_request_kemahasiswaan']);
return $this->hasOne(StatusRequest::className(), ['id' => 'status_request_kemahasiswaan']);
}
public function getStatusRequestKabiroKSD()
{
return $this->hasOne(Referesi::className(), ['id' => 'status_request_kabiro_KSD']);
return $this->hasOne(StatusRequest::className(), ['id' => 'status_request_kabiro_KSD']);
}
public function getStatusRequestHRD()
{
return $this->hasOne(Referesi::className(), ['id' => 'status_request_hrd']);
return $this->hasOne(StatusRequest::className(), ['id' => 'status_request_hrd']);
}
public function getStatusRequestKeuangan()
{
return $this->hasOne(Referesi::className(), ['id' => 'status_request_keuangan']);
return $this->hasOne(StatusRequest::className(), ['id' => 'status_request_keuangan']);
}
public function getStatusRequestWr2()
{
return $this->hasOne(Referesi::className(), ['id' => 'status_request_wr2']);
return $this->hasOne(StatusRequest::className(), ['id' => 'status_request_wr2']);
}
public function getJenisKeperluan(){
return $this->hasOne(JenisKeperluan::className(), ['id' => 'role']);
}
public function getPegawai(){
return $this->hasOne(Pegawai::className(), ['pegawai_id' => 'pegawai_id']);
}
}
......@@ -18,7 +18,7 @@ use common\behaviors\DeleteBehavior;
* @property integer $jumlah_penumpang_kendaraan
* @property string $rencana_waktu_keberangkatan
* @property string $rencana_waktu_kembali
* @property integer $status_request_sekertaris_rektorat
* @property integer $status_req_sekretaris_rektorat
* @property integer $status_request_kemahasiswaan
* @property string $proposal
* @property string $no_telepon
......@@ -37,8 +37,8 @@ use common\behaviors\DeleteBehavior;
* @property Supir $supir
* @property Kendaraan $kendaraan
* @property Dim $mahasiswa
* @property Referesi $statusRequestSekertarisRektorat
* @property Referesi $statusRequestKemahasiswaan
* @property StatusRequest $statusRequestSekretarisRektorat
* @property StatusRequest $statusRequestKemahasiswaan
*/
class PemakaianKendaraanMahasiswa extends \yii\db\ActiveRecord
{
......@@ -76,7 +76,7 @@ class PemakaianKendaraanMahasiswa extends \yii\db\ActiveRecord
{
return [
[['desc_penggunaan_kendaraan', 'tujuan', 'rencana_waktu_keberangkatan', 'rencana_waktu_kembali', 'no_telepon'], 'required'],
[['dim_id', 'jumlah_penumpang_kendaraan', 'deleted', 'kendaraan_id', 'supir_id', 'status_request_sekertaris_rektorat', 'status_request_kemahasiswaan'], 'integer'],
[['dim_id', 'jumlah_penumpang_kendaraan', 'deleted', 'kendaraan_id', 'supir_id', 'status_req_sekretaris_rektorat', 'status_request_kemahasiswaan'], 'integer'],
[['rencana_waktu_keberangkatan', 'rencana_waktu_kembali', 'deleted_at', 'created_at', 'updated_at'], 'safe'],
[['file'],'file'],
[['desc_penggunaan_kendaraan', 'tujuan'], 'string'],
......@@ -100,7 +100,7 @@ class PemakaianKendaraanMahasiswa extends \yii\db\ActiveRecord
'jumlah_penumpang_kendaraan' => 'Jumlah Penumpang',
'rencana_waktu_keberangkatan' => 'Waktu Keberangkatan',
'rencana_waktu_kembali' => 'Waktu Tiba',
'status_request_sekertaris_rektorat' => 'Status Permintaan',
'status_req_sekretaris_rektorat' => 'Status Permintaan',
'status_request_kemahasiswaan' => 'Status Permintaan Kemahasiswaan',
'proposal' => 'Proposal',
'no_telepon' => 'No Telepon',
......@@ -135,15 +135,15 @@ class PemakaianKendaraanMahasiswa extends \yii\db\ActiveRecord
/**
* @return \yii\db\ActiveQuery
*/
public function getStatusRequestSekertarisRektorat()
public function getStatusRequestSekretarisRektorat()
{
return $this->hasOne(Referesi::className(), ['id' => 'status_request_sekertaris_rektorat']);
return $this->hasOne(StatusRequest::className(), ['id' => 'status_req_sekretaris_rektorat']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getStatusRequestKemahasiswaan()
{
return $this->hasOne(Referesi::className(), ['id' => 'status_request_kemahasiswaan']);
return $this->hasOne(StatusRequest::className(), ['id' => 'status_request_kemahasiswaan']);
}
}
......@@ -17,7 +17,7 @@ use common\behaviors\DeleteBehavior;
* @property PemakaianKendaraanMahasiswa[] $pemakaianKendaraanMahasiswas
* @property PemakaianKendaraanMahasiswa[] $pemakaianKendaraanMahasiswas0
*/
class Referesi extends \yii\db\ActiveRecord
class StatusRequest extends \yii\db\ActiveRecord
{
/**
......@@ -43,7 +43,7 @@ class Referesi extends \yii\db\ActiveRecord
*/
public static function tableName()
{
return 'ubux_referesi';
return 'ubux_status_request';
}
/**
......
......@@ -45,7 +45,7 @@ class KendaraanSearch extends Kendaraan
$dataProvider = new ActiveDataProvider([
'query' => $query,
'sort' => ['defaultOrder' => ['kendaraan_id' => SORT_ASC, 'updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
'sort' => ['defaultOrder' => ['updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
]);
$this->load($params);
......
......@@ -19,7 +19,7 @@ class LaporanPemakaianKendaraanSearch extends LaporanPemakaianKendaraan
{
return [
[['laporan_pemakaian_kendaraan_id', 'jumlah_penumpang', 'deleted', 'kendaraan_id', 'supir_id'], 'integer'],
[['tujuan', 'deskripsi_penumpang', 'keperluan', 'waktu_keberangkatan', 'waktu_tiba', 'deleted_at', 'deleted_by', 'created_at', 'created_by', 'updated_at', 'updated_by'], 'safe'],
[['tujuan', 'desc_penumpang', 'keperluan', 'waktu_keberangkatan', 'waktu_tiba', 'deleted_at', 'deleted_by', 'created_at', 'created_by', 'updated_at', 'updated_by'], 'safe'],
];
}
......@@ -45,7 +45,7 @@ class LaporanPemakaianKendaraanSearch extends LaporanPemakaianKendaraan
$dataProvider = new ActiveDataProvider([
'query' => $query,
'sort' => ['defaultOrder' => ['laporan_pemakaian_kendaraan_id' => SORT_ASC, 'updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
'sort' => ['defaultOrder' => ['updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
]);
$this->load($params);
......@@ -70,7 +70,7 @@ class LaporanPemakaianKendaraanSearch extends LaporanPemakaianKendaraan
]);
$query->andFilterWhere(['like', 'tujuan', $this->tujuan])
->andFilterWhere(['like', 'deskripsi_penumpang', $this->deskripsi_penumpang])
->andFilterWhere(['like', 'desc_penumpang', $this->desc_penumpang])
->andFilterWhere(['like', 'keperluan', $this->keperluan])
->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'created_by', $this->created_by])
......
......@@ -18,7 +18,7 @@ class PemakaianKendaraanMahasiswaSearch extends PemakaianKendaraanMahasiswa
public function rules()
{
return [
[['status_request_sekertaris_rektorat', 'status_request_kemahasiswaan','transaksi_kendaraan_id', 'dim_id', 'jumlah_penumpang_kendaraan', 'deleted', 'kendaraan_id', 'supir_id'], 'integer'],
[['status_req_sekretaris_rektorat', 'status_request_kemahasiswaan','transaksi_kendaraan_id', 'dim_id', 'jumlah_penumpang_kendaraan', 'deleted', 'kendaraan_id', 'supir_id'], 'integer'],
[['desc_penggunaan_kendaraan', 'tujuan', 'rencana_waktu_keberangkatan', 'rencana_waktu_kembali', 'proposal', 'no_telepon', 'deleted_at', 'deleted_by', 'created_at', 'created_by', 'updated_at', 'updated_by', 'no_hp_supir'], 'safe'],
];
}
......@@ -41,11 +41,11 @@ class PemakaianKendaraanMahasiswaSearch extends PemakaianKendaraanMahasiswa
*/
public function search($params)
{
$query = PemakaianKendaraanMahasiswa::find();
$query = PemakaianKendaraanMahasiswa::find()->where(['deleted' => 0]);
$dataProvider = new ActiveDataProvider([
'query' => $query,
'sort' => ['defaultOrder' => ['transaksi_kendaraan_id' => SORT_ASC, 'updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
'sort' => ['defaultOrder' => ['updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
]);
$this->load($params);
......@@ -72,7 +72,7 @@ class PemakaianKendaraanMahasiswaSearch extends PemakaianKendaraanMahasiswa
$query->andFilterWhere(['like', 'desc_penggunaan_kendaraan', $this->desc_penggunaan_kendaraan])
->andFilterWhere(['like', 'tujuan', $this->tujuan])
->andFilterWhere(['like', 'status_request_sekertaris_rektorat', $this->status_request_sekertaris_rektorat])
->andFilterWhere(['like', 'status_req_sekretaris_rektorat', $this->status_req_sekretaris_rektorat])
->andFilterWhere(['like', 'status_request_kemahasiswaan', $this->status_request_kemahasiswaan])
->andFilterWhere(['like', 'proposal', $this->proposal])
->andFilterWhere(['like', 'no_telepon', $this->no_telepon])
......
......@@ -18,8 +18,8 @@ class PemakaianKendaraanSearch extends PemakaianKendaraan
public function rules()
{
return [
[['transaksi_kendaraan_id', 'jumlah_penumpang_kendaraan', 'deleted', 'kendaraan_id', 'supir_id', 'role'], 'integer'],
[['nama_perequest_kendaraan', 'desc_penggunaan_kendaraan', 'rencana_waktu_keberangkatan', 'rencana_waktu_kembali', 'status_request_sekertaris_rektorat', 'status_request_kemahasiswaan', 'proposal', 'no_telepon', 'deleted_at', 'deleted_by', 'created_at', 'created_by', 'updated_at', 'updated_by', 'no_hp_supir', 'status_request_kabiro_KSD', 'status_request_hrd', 'status_request_keuangan', 'status_request_wr2'], 'safe'],
[['transaksi_kendaraan_id', 'jumlah_penumpang_kendaraan', 'deleted', 'kendaraan_id', 'supir_id', 'role', 'pegawai_id'], 'integer'],
[['nama_perequest_kendaraan', 'desc_penggunaan_kendaraan', 'rencana_waktu_keberangkatan', 'rencana_waktu_kembali', 'status_req_sekretaris_rektorat', 'status_request_kemahasiswaan', 'proposal', 'no_telepon', 'deleted_at', 'deleted_by', 'created_at', 'created_by', 'updated_at', 'updated_by', 'no_hp_supir', 'status_request_kabiro_KSD', 'status_request_hrd', 'status_request_keuangan', 'status_request_wr2'], 'safe'],
];
}
......@@ -41,11 +41,11 @@ class PemakaianKendaraanSearch extends PemakaianKendaraan
*/
public function search($params)
{
$query = PemakaianKendaraan::find();
$query = PemakaianKendaraan::find()->where(['deleted' => 0]);
$dataProvider = new ActiveDataProvider([
'query' => $query,
'sort' => ['defaultOrder' => ['transaksi_kendaraan_id' => SORT_ASC, 'updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
'sort' => ['defaultOrder' => ['updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
]);
$this->load($params);
......@@ -58,6 +58,7 @@ class PemakaianKendaraanSearch extends PemakaianKendaraan
$query->andFilterWhere([
'transaksi_kendaraan_id' => $this->transaksi_kendaraan_id,
'pegawai_id' => $this->pegawai_id,
'jumlah_penumpang_kendaraan' => $this->jumlah_penumpang_kendaraan,
'rencana_waktu_keberangkatan' => $this->rencana_waktu_keberangkatan,
'rencana_waktu_kembali' => $this->rencana_waktu_kembali,
......@@ -71,7 +72,8 @@ class PemakaianKendaraanSearch extends PemakaianKendaraan
$query->andFilterWhere(['like', 'nama_perequest_kendaraan', $this->nama_perequest_kendaraan])
->andFilterWhere(['like', 'desc_penggunaan_kendaraan', $this->desc_penggunaan_kendaraan])
->andFilterWhere(['like', 'status_request_sekertaris_rektorat', $this->status_request_sekertaris_rektorat])
->andFilterWhere(['like', 'pegawai_id', $this->pegawai_id])
->andFilterWhere(['like', 'status_req_sekretaris_rektorat', $this->status_req_sekretaris_rektorat])
->andFilterWhere(['like', 'status_request_kemahasiswaan', $this->status_request_kemahasiswaan])
->andFilterWhere(['like', 'role', $this->role])
->andFilterWhere(['like', 'proposal', $this->proposal])
......
......@@ -45,7 +45,7 @@ class SupirSearch extends Supir
$dataProvider = new ActiveDataProvider([
'query' => $query,
'sort' => ['defaultOrder' => ['supir_id' => SORT_ASC, 'updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
'sort' => ['defaultOrder' => ['updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
]);
$this->load($params);
......
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
//use yii\widgets\ActiveForm;
use yii\bootstrap\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Kendaraan */
......@@ -10,7 +11,18 @@ use yii\widgets\ActiveForm;
<div class="ubux-kendaraan-form">
<?php $form = ActiveForm::begin(); ?>
<?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, 'kendaraan')->textInput(['maxlength' => true]) ?>
......@@ -33,7 +45,9 @@ use yii\widgets\ActiveForm;
<?= $form->field($model, 'updated_by')->textInput(['maxlength' => true]) ?>
-->
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Buat' : 'Ubah', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
<div class="col-md-1 col-md-offset-2">
<?= Html::submitButton($model->isNewRecord ? 'Buat' : 'Ubah', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
</div>
<?php ActiveForm::end(); ?>
......
......@@ -18,7 +18,7 @@ $this->params['breadcrumbs'][] = $this->title;
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a('Tambah Kendaraan', ['create'], ['class' => 'btn btn-success']) ?>
<?= Html::a('Tambah Kendaraan', ['add'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
......@@ -64,9 +64,9 @@ $this->params['breadcrumbs'][] = $this->title;
if ($action === 'view') {
return Url::toRoute(['view', 'id' => $key]);
}else if ($action === 'update') {
return Url::toRoute(['update', 'id' => $key]);
return Url::toRoute(['edit', 'id' => $key]);
}else if ($action === 'delete') {
return Url::toRoute(['delete', 'id' => $key]);
return Url::toRoute(['del', 'id' => $key]);
}
}
......
......@@ -15,8 +15,8 @@ $this->params['breadcrumbs'][] = $this->title;
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a('Ubah', ['update', 'id' => $model->kendaraan_id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Hapus', ['delete', 'id' => $model->kendaraan_id], [
<?= Html::a('Ubah', ['edit', 'id' => $model->kendaraan_id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Hapus', ['del', 'id' => $model->kendaraan_id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Apakah anda yakin ?',
......
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
//use yii\widgets\ActiveForm;
use dosamigos\datetimepicker\DateTimePicker;
use yii\helpers\ArrayHelper;
use backend\modules\ubux\models\Kendaraan;
use backend\modules\ubux\models\Supir;
use yii\bootstrap\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\LaporanPemakaianKendaraan */
......@@ -14,15 +15,26 @@ use backend\modules\ubux\models\Supir;
<div class="ubux-laporan-pemakaian-kendaraan-form">
<?php $form = ActiveForm::begin(); ?>
<?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, 'tujuan')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'tujuan')->textarea() ?>
<?= $form->field($model, 'deskripsi_penumpang')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'desc_penumpang')->textarea() ?>
<?= $form->field($model, 'jumlah_penumpang')->textInput() ?>
<?= $form->field($model, 'keperluan')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'keperluan')->textarea() ?>
<?= $form->field($model, 'waktu_keberangkatan')->widget(DateTimePicker::className(),[
'inline' => false,
......@@ -75,8 +87,9 @@ use backend\modules\ubux\models\Supir;
) ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Buat' : 'Ubah', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<div class="col-md-1 col-md-offset-2">
<?= Html::submitButton($model->isNewRecord ? 'Buat' : 'Ubah', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div></div>
<?php ActiveForm::end(); ?>
......
......@@ -19,7 +19,7 @@ use yii\widgets\ActiveForm;
<?= $form->field($model, 'tujuan') ?>
<?= $form->field($model, 'deskripsi_penumpang') ?>
<?= $form->field($model, 'desc_penumpang') ?>
<?= $form->field($model, 'jumlah_penumpang') ?>
......
......@@ -17,7 +17,7 @@ $this->params['breadcrumbs'][] = $this->title;
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a('Tambah Laporan Pemakaian Kendaraan', ['create'], ['class' => 'btn btn-success']) ?>
<?= Html::a('Tambah Laporan Pemakaian Kendaraan', ['add'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
......@@ -28,7 +28,7 @@ $this->params['breadcrumbs'][] = $this->title;
// 'laporan_pemakaian_kendaraan_id',
'tujuan',
'deskripsi_penumpang',
'desc_penumpang',
'jumlah_penumpang',
'keperluan',
'waktu_keberangkatan',
......@@ -74,10 +74,10 @@ $this->params['breadcrumbs'][] = $this->title;
'urlCreator' => function ($action, $model, $key, $index){
if ($action === 'view') {
return Url::toRoute(['view', 'id' => $key]);
}else if ($action === 'update') {
}else if ($action === 'edit') {
return Url::toRoute(['update', 'id' => $key]);
}else if ($action === 'delete') {
return Url::toRoute(['delete', 'id' => $key]);
return Url::toRoute(['del', 'id' => $key]);
}
}
......
......@@ -15,8 +15,8 @@ $this->params['breadcrumbs'][] = $this->title;
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a('Ubah', ['update', 'id' => $model->laporan_pemakaian_kendaraan_id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Hapus', ['delete', 'id' => $model->laporan_pemakaian_kendaraan_id], [
<?= Html::a('Ubah', ['edit', 'id' => $model->laporan_pemakaian_kendaraan_id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Hapus', ['del', 'id' => $model->laporan_pemakaian_kendaraan_id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Apakah anda yakin ?',
......@@ -31,7 +31,7 @@ $this->params['breadcrumbs'][] = $this->title;
'attributes' => [
// 'laporan_pemakaian_kendaraan_id',
'tujuan',
'deskripsi_penumpang',
'desc_penumpang',
'jumlah_penumpang',
'keperluan',
'waktu_keberangkatan',
......
......@@ -49,7 +49,7 @@ $this->params['breadcrumbs'][] = $this->title;
<tr>
<td class="kolom">Deskripsi Penumpang</td>
<td class="kolom">:</td>
<td class="kolom"><?= $model->deskripsi_penumpang ?></td>
<td class="kolom"><?= $model->desc_penumpang ?></td>
</tr>
<tr>
<td class="kolom">Jumlah Penumpang</td>
......@@ -89,7 +89,7 @@ $this->params['breadcrumbs'][] = $this->title;
// 'attributes' => [
// 'laporan_pemakaian_kendaraan_id',
// 'tujuan',
// 'deskripsi_penumpang',
// 'desc_penumpang',
// 'jumlah_penumpang',
// 'keperluan',
// 'waktu_keberangkatan',
......
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\UbuxPegawai */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="ubux-pegawai-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'jabatan')->textInput(['maxlength' => true]) ?>
<!--
<?= $form->field($model, 'deleted')->textInput() ?>
<?= $form->field($model, 'deleted_at')->textInput() ?>
<?= $form->field($model, 'deleted_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'created_at')->textInput() ?>
<?= $form->field($model, 'created_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'updated_at')->textInput() ?>
<?= $form->field($model, 'updated_by')->textInput(['maxlength' => true]) ?>
-->
<div class="form-group">
<?= 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\UbuxPegawaiSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="ubux-pegawai-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
'method' => 'get',
]); ?>
<?= $form->field($model, 'pegawai_id') ?>
<?= $form->field($model, 'jabatan') ?>
<?= $form->field($model, 'deleted') ?>
<?= $form->field($model, 'deleted_at') ?>
<?= $form->field($model, 'deleted_by') ?>
<?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;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\UbuxPegawai */
$this->title = 'Tambah Pegawai';
$this->params['breadcrumbs'][] = ['label' => 'Ubux Pegawai', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-pegawai-create">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
<?php
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\UbuxPegawaiSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Ubux Pegawai';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-pegawai-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a('Tambah Pegawai', ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
// 'pegawai_id',
'jabatan',
// 'deleted',
// 'deleted_at',
// 'deleted_by',
// 'created_at',
// 'created_by',
// 'updated_at',
// 'updated_by',
['class' => 'yii\grid\ViewColumn'],
['class' => 'yii\grid\DeleteColumn'],
['class' => 'yii\grid\UpdateColumn'],
],
]); ?>
</div>
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\UbuxPegawai */
$this->title = 'Update Ubux Pegawai: ' . ' ' . $model->pegawai_id;
$this->params['breadcrumbs'][] = ['label' => 'Ubux Pegawai', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->pegawai_id, 'url' => ['view', 'id' => $model->pegawai_id]];
$this->params['breadcrumbs'][] = 'Update';
?>
<div class="ubux-pegawai-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\UbuxPegawai */
$this->title = $model->jabatan;
$this->params['breadcrumbs'][] = ['label' => 'Ubux Pegawai', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ubux-pegawai-view">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a('Update', ['update', 'id' => $model->pegawai_id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Delete', ['delete', 'id' => $model->pegawai_id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Are you sure you want to delete this item?',
'method' => 'post',
],
]) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
// 'pegawai_id',
'jabatan',
// 'deleted',
// 'deleted_at',
// 'deleted_by',
// 'created_at',
// 'created_by',
// 'updated_at',
// 'updated_by',
],
]) ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\bootstrap\ActiveForm;
use dosamigos\datetimepicker\DateTimePicker;
/* @var $this yii\web\View */
......@@ -11,7 +11,18 @@ use dosamigos\datetimepicker\DateTimePicker;
<div class="ubux-transaksi-kendaraan-mahasiswa-baru-form">
<?php $form = ActiveForm::begin(); ?>
<?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, 'dim_id')->textInput() ?>
-->
......@@ -68,7 +79,9 @@ use dosamigos\datetimepicker\DateTimePicker;
<?= $form->field($model, 'no_hp_supir')->textInput(['maxlength' => true]) ?>
-->
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Buat' : 'Ubah', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
<div class="col-md-1 col-md-offset-2">
<?= Html::submitButton($model->isNewRecord ? 'Buat' : 'Ubah', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
</div>
<?php ActiveForm::end(); ?>
......
......@@ -31,7 +31,7 @@ use yii\widgets\ActiveForm;
<?php // echo $form->field($model, 'rencana_waktu_kembali') ?>
<?php // echo $form->field($model, 'status_request_sekertaris_rektorat') ?>
<?php // echo $form->field($model, 'status_req_sekretaris_rektorat') ?>
<?php // echo $form->field($model, 'status_request_kemahasiswaan') ?>
......
......@@ -16,7 +16,7 @@ $this->params['breadcrumbs'][] = $this->title;
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<div class="col-md-9">
<p><?= Html::a('Permintaan Kendaraan Mahasiswa', ['create'], ['class' => 'btn btn-success']) ?></p>
<p><?= Html::a('Permintaan Kendaraan Mahasiswa', ['add'], ['class' => 'btn btn-success']) ?></p>
</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>
......@@ -37,8 +37,8 @@ $this->params['breadcrumbs'][] = $this->title;
'rencana_waktu_keberangkatan',
'rencana_waktu_kembali',
[
'attribute' => 'status_request_sekertaris_rektorat',
'value' => 'statusRequestSekertarisRektorat.status'
'attribute' => 'status_req_sekretaris_rektorat',
'value' => 'statusRequestSekretarisRektorat.status'
],
[
'attribute' => 'status_request_kemahasiswaan',
......@@ -72,10 +72,10 @@ $this->params['breadcrumbs'][] = $this->title;
return Url::toRoute(['view', 'id' => $key]);
}
if($action == 'edit'){
return Url::toRoute(['update', 'id' => $key]);
return Url::toRoute(['edit', 'id' => $key]);
}
if($action == 'del'){
return Url::toRoute(['delete', 'id' => $key]);
return Url::toRoute(['del', 'id' => $key]);
}
else{
return Url::toRoute(['pop-up', 'id' => $key]);
......
......@@ -42,8 +42,8 @@ $this->params['breadcrumbs'][] = $this->title;
// 'rencana_waktu_keberangkatan',
// 'rencana_waktu_kembali',
[
'attribute' => 'status_request_sekertaris_rektorat',
'value' => 'statusRequestSekertarisRektorat.status'
'attribute' => 'status_req_sekretaris_rektorat',
'value' => 'statusRequestSekretarisRektorat.status'
],
[
'attribute' => 'status_request_kemahasiswaan',
......
......@@ -17,16 +17,16 @@ $this->params['breadcrumbs'][] = $this->title;
<p>
<?php
if($model->status_request_kemahasiswaan == 1){
echo Html::a('Ubah', ['update', 'id' => $model->transaksi_kendaraan_id], ['class' => 'btn btn-primary']);
echo Html::a('Ubah', ['edit', 'id' => $model->transaksi_kendaraan_id], ['class' => 'btn btn-primary']);
echo '&nbsp';
echo Html::a('Hapus', ['delete', 'id' => $model->transaksi_kendaraan_id], [
echo Html::a('Hapus', ['del', 'id' => $model->transaksi_kendaraan_id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Apakah anda yakin ingin menhapus ?',
'method' => 'post',
],
]);
}else if($model->status_request_sekertaris_rektorat == 2){
}else if($model->status_req_sekretaris_rektorat == 2){
echo Html::a('Cetak', ['cetak', 'id' => $model->transaksi_kendaraan_id], ['class' => 'btn btn-warning']);
}
?>
......@@ -52,8 +52,8 @@ $this->params['breadcrumbs'][] = $this->title;
'rencana_waktu_keberangkatan',
'rencana_waktu_kembali',
[
'attribute' => 'status_request_sekertaris_rektorat',
'value' => $model->statusRequestSekertarisRektorat->status,
'attribute' => 'status_req_sekretaris_rektorat',
'value' => $model->statusRequestSekretarisRektorat->status,
],
[
'attribute' => 'status_request_kemahasiswaan',
......
......@@ -16,13 +16,13 @@ $this->params['breadcrumbs'][] = $this->title;
<p>
<?php
if($model->status_request_sekertaris_rektorat == 2){
if($model->status_req_sekretaris_rektorat == 2){
echo Html::a('Cetak', ['cetak', 'id' => $model->transaksi_kendaraan_id], ['class' => 'btn btn-warning']);
}if($model->status_request_kemahasiswaan == 1){
echo Html::a('Terima', ['accept', 'id' => $model->transaksi_kendaraan_id], ['class' => 'btn btn-success']);
echo '&nbsp';
echo Html::a('Tolak', ['reject', 'id' => $model->transaksi_kendaraan_id], ['class' => 'btn btn-danger']);
}if($model->status_request_kemahasiswaan == 2 && $model->status_request_sekertaris_rektorat == 1){
}if($model->status_request_kemahasiswaan == 2 && $model->status_req_sekretaris_rektorat == 1){
echo '<p style="color:red;">Permintaan Telah disetuju. Menunggu persetujuan Sekretaris Rektorat</p>';
}
?>
......@@ -48,8 +48,8 @@ $this->params['breadcrumbs'][] = $this->title;
'rencana_waktu_keberangkatan',
'rencana_waktu_kembali',
[
'attribute' => 'status_request_sekertaris_rektorat',
'value' => $model->statusRequestSekertarisRektorat->status,
'attribute' => 'status_req_sekretaris_rektorat',
'value' => $model->statusRequestSekretarisRektorat->status,
],
[
'attribute' => 'status_request_kemahasiswaan',
......
......@@ -79,7 +79,7 @@ $this->params['breadcrumbs'][] = $this->title;
<tr>
<td class="kolom">Status</td>
<td>:</td>
<td><?= $model->status_request_sekertaris_rektorat ?></td>
<td><?= $model->status_req_sekretaris_rektorat ?></td>
</tr>
<tr>
<td class="kolom">No Telepon</td>
......@@ -114,7 +114,7 @@ $this->params['breadcrumbs'][] = $this->title;
// 'jumlah_penumpang_kendaraan',
// 'rencana_waktu_keberangkatan',
// 'rencana_waktu_kembali',
// 'status_request_sekertaris_rektorat',
// 'status_req_sekretaris_rektorat',
// 'status_request_kemahasiswaan',
// 'role',
// 'no_telepon',
......
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\bootstrap\ActiveForm;
use dosamigos\datetimepicker\DateTimePicker;
use common\helpers\ArrayHelper;
use backend\modules\ubux\models\Kendaraan;
......@@ -15,10 +15,22 @@ use backend\modules\ubux\models\Kendaraan;
<h1>Request Kendaraan by Pegawai</h1>
<?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]); ?>
<?php $form = ActiveForm::begin(['options' => [
'enctype' => 'multipart/form-data'],
'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, 'nama_perequest_kendaraan')->textInput(['maxlength' => true]) ?>
-->
<?= $form->field($model, 'desc_penggunaan_kendaraan')->textarea() ?>
<?= $form->field($model, 'tujuan')->textarea() ?>
......@@ -48,7 +60,7 @@ use backend\modules\ubux\models\Kendaraan;
]); ?>
<!--
<?= $form->field($model, 'status_request_sekertaris_rektorat')->dropDownList([ 'Menunggu' => 'Menunggu', 'Diterima' => 'Diterima', 'Ditolak' => 'Ditolak', ], ['prompt' => '']) ?>
<?= $form->field($model, 'status_req_sekretaris_rektorat')->dropDownList([ 'Menunggu' => 'Menunggu', 'Diterima' => 'Diterima', 'Ditolak' => 'Ditolak', ], ['prompt' => '']) ?>
<?= $form->field($model, 'status_request_kemahasiswaan')->dropDownList([ 'Menunggu' => 'Menunggu', 'Diterima' => 'Diterima', 'Ditolak' => 'Ditolak', ], ['prompt' => '']) ?>
......@@ -82,7 +94,9 @@ use backend\modules\ubux\models\Kendaraan;
) ?>
-->
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Buat' : 'Ubah', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
<div class="col-md-1 col-md-offset-2">
<?= Html::submitButton($model->isNewRecord ? 'Buat' : 'Ubah', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
</div>
<?php ActiveForm::end(); ?>
......
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\bootstrap\ActiveForm;
use dosamigos\datetimepicker\DateTimePicker;
use common\helpers\ArrayHelper;
use backend\modules\ubux\models\Kendaraan;
......@@ -15,9 +15,21 @@ use backend\modules\ubux\models\Kendaraan;
<h1>Request Kendaraan by Pribadi</h1>
<?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]); ?>
<?= $form->field($model, 'nama_perequest_kendaraan')->textInput(['maxlength' => true]) ?>
<?php $form = ActiveForm::begin([
'options' => ['enctype' => 'multipart/form-data'],
'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, 'nama_perequest_kendaraan')->textInput() ?>
<?= $form->field($model, 'desc_penggunaan_kendaraan')->textarea() ?>
......@@ -48,31 +60,31 @@ use backend\modules\ubux\models\Kendaraan;
]); ?>
<!--
<?= $form->field($model, 'status_request_sekertaris_rektorat')->dropDownList([ 'Menunggu' => 'Menunggu', 'Diterima' => 'Diterima', 'Ditolak' => 'Ditolak', ], ['prompt' => '']) ?>
<?= $form->field($model, 'status_req_sekretaris_rektorat')->dropDownList([ 'Menunggu' => 'Menunggu', 'Diterima' => 'Diterima', 'Ditolak' => 'Ditolak', ], ['prompt' => '']) ?>
<?= $form->field($model, 'status_request_kemahasiswaan')->dropDownList([ 'Menunggu' => 'Menunggu', 'Diterima' => 'Diterima', 'Ditolak' => 'Ditolak', ], ['prompt' => '']) ?>
<?= $form->field($model, 'role')->dropDownList([ 'Mahasiswa' => 'Mahasiswa', 'Pegawai' => 'Pegawai', ], ['prompt' => '']) ?>
<?= $form->field($model, 'proposal')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'proposal')->textInput() ?>
<?= $form->field($model, 'file')->fileInput(); ?>
-->
<?= $form->field($model, 'no_telepon')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'no_telepon')->textInput() ?>
<!--
<?= $form->field($model, 'deleted')->textInput() ?>
<?= $form->field($model, 'deleted_at')->textInput() ?>
<?= $form->field($model, 'deleted_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'deleted_by')->textInput() ?>
<?= $form->field($model, 'created_at')->textInput() ?>
<?= $form->field($model, 'created_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'created_by')->textInput() ?>
<?= $form->field($model, 'updated_at')->textInput() ?>
<?= $form->field($model, 'updated_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'updated_by')->textInput() ?>
<?= $form->field($model, 'kendaraan_id')->dropDownList(
ArrayHelper::map(Kendaraan::find()->select([
......@@ -82,7 +94,9 @@ use backend\modules\ubux\models\Kendaraan;
) ?>
-->
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Buat' : 'Ubah', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
<div class="col-md-1 col-md-offset-2">
<?= Html::submitButton($model->isNewRecord ? 'Buat' : 'Ubah', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
</div>
<?php ActiveForm::end(); ?>
......
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\bootstrap\ActiveForm;
use common\helpers\ArrayHelper;
use backend\modules\ubux\models\Kendaraan;
use backend\modules\ubux\models\Supir;
......@@ -15,7 +15,18 @@ use backend\modules\ubux\models\Supir;
<h1>Catatan :</h1>
<?php $form = ActiveForm::begin(); ?>
<?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, 'kendaraan_id')->dropDownList(
ArrayHelper::map(Kendaraan::find()->select([
......@@ -31,10 +42,12 @@ use backend\modules\ubux\models\Supir;
['prompt' => 'Pilih Supir']
) ?>
<!--
<?= $form->field($model, 'no_hp_supir')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'no_hp_supir')->textInput() ?>
-->
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Buat' : 'Tambah', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-success']) ?>
<div class="col-md-1 col-md-offset-2">
<?= Html::submitButton($model->isNewRecord ? 'Buat' : 'Tambah', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-success']) ?>
</div>
</div>
<?php ActiveForm::end(); ?>
......
......@@ -47,7 +47,7 @@ $this->params['breadcrumbs'][] = $this->title;
// ],
[
'attribute' => 'Status Request Sekretaris Rektorat',
'value' => 'statusRequestSekertarisRektorat.status',
'value' => 'statusRequestSekretarisRektorat.status',
],
[
'attribute' => 'status_request_kabiro_KSD',
......
......@@ -47,7 +47,7 @@ $this->params['breadcrumbs'][] = $this->title;
// ],
[
'attribute' => 'Status Request Sekretaris Rektorat',
'value' => 'statusRequestSekertarisRektorat.status',
'value' => 'statusRequestSekretarisRektorat.status',
],
[
'attribute' => 'status_request_kabiro_KSD',
......
......@@ -47,7 +47,7 @@ $this->params['breadcrumbs'][] = $this->title;
// ],
[
'attribute' => 'Status Request Sekretaris Rektorat',
'value' => 'statusRequestSekertarisRektorat.status',
'value' => 'statusRequestSekretarisRektorat.status',
],
[
'attribute' => 'status_request_kabiro_KSD',
......
......@@ -17,7 +17,7 @@ $this->params['breadcrumbs'][] = $this->title;
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a('Permintaan Kendaraan Pegawai', ['create-by-pegawai'], ['class' => 'btn btn-success']) ?>
<?= Html::a('Permintaan Kendaraan Pegawai', ['add-by-pegawai'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
......@@ -33,7 +33,7 @@ $this->params['breadcrumbs'][] = $this->title;
'jumlah_penumpang_kendaraan',
'rencana_waktu_keberangkatan',
'rencana_waktu_kembali',
'role',
// 'role',
// 'proposal',
// 'deleted',
// 'deleted_at',
......@@ -47,10 +47,10 @@ $this->params['breadcrumbs'][] = $this->title;
'attribute' => 'Kendaraan',
'value' => 'kendaraan.kendaraan',
],
// 'status_request_sekertaris_rektorat',
// 'status_req_sekretaris_rektorat',
[
'attribute' => 'Status Request Sekretaris Rektorat',
'value' => 'statusRequestSekertarisRektorat.status',
'value' => 'statusRequestSekretarisRektorat.status',
],
[
'class' => 'common\components\ToolsColumn',
......@@ -59,12 +59,12 @@ $this->params['breadcrumbs'][] = $this->title;
if($action === 'view'){
return Url::toRoute(['view-by-pegawai', 'id' => $key]);
}
if($model->status_request_sekertaris_rektorat == 1){
if($model->status_req_sekretaris_rektorat == 1){
if($action == 'edit'){
return Url::toRoute(['update-by-pegawai', 'id' => $key]);
return Url::toRoute(['edit-by-pegawai', 'id' => $key]);
}
if($action == 'del'){
return Url::toRoute(['delete', 'id' => $key]);
return Url::toRoute(['del', 'id' => $key]);
}
}else{
return Url::toRoute(['pop-up-pegawai', 'id' => $key]);
......
......@@ -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', ['create-by-pribadi'], ['class' => 'btn btn-success']) ?>
<?= Html::a('Permintaan Kendaraan Pribadi', ['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>
......@@ -54,7 +54,7 @@ $this->params['breadcrumbs'][] = $this->title;
// ],
[
'attribute' => 'Status Request Sekretaris Rektorat',
'value' => 'statusRequestSekertarisRektorat.status',
'value' => 'statusRequestSekretarisRektorat.status',
],
[
'attribute' => 'status_request_kabiro_KSD',
......@@ -83,12 +83,12 @@ $this->params['breadcrumbs'][] = $this->title;
if($action === 'view'){
return Url::toRoute(['view-by-pribadi', 'id' => $key]);
}
if($model->status_request_sekertaris_rektorat == 1 && $model->status_request_kemahasiswaan == 1 && $model->status_request_hrd == 1 && $model->status_request_kabiro_KSD == 1 && $model->status_request_keuangan == 1 && $model->status_request_wr2 == 1){
if($model->status_req_sekretaris_rektorat == 1 && $model->status_request_kemahasiswaan == 1 && $model->status_request_hrd == 1 && $model->status_request_kabiro_KSD == 1 && $model->status_request_keuangan == 1 && $model->status_request_wr2 == 1){
if($action == 'edit'){
return Url::toRoute(['update-by-pribadi', 'id' => $key]);
return Url::toRoute(['edit-by-pribadi', 'id' => $key]);
}
if($action == 'del'){
return Url::toRoute(['delete', 'id' => $key]);
return Url::toRoute(['del', 'id' => $key]);
}
}else{
return Url::toRoute(['pop-up-pribadi', 'id' => $key]);
......
......@@ -52,21 +52,21 @@ $this->params['breadcrumbs'][] = $this->title;
'value' => 'kendaraan.kendaraan',
],
[
'attribute' => 'status_request_sekertaris_rektorat',
'value' => 'statusRequestSekertarisRektorat.status',
'attribute' => 'status_req_sekretaris_rektorat',
'value' => 'statusRequestSekretarisRektorat.status',
],
[
'class' => 'common\components\ToolsColumn',
'template' => '{view}{acc}{rej}',
'urlCreator' => function($action, $model, $key, $index){
if($action === 'view'){
return Url::toRoute(['view-by-sekertaris-rektorat', 'id' => $key]);
return Url::toRoute(['view-by-sekretaris-rektorat', 'id' => $key]);
}
if($action === 'acc'){
return Url::toRoute(['accept-by-sekertaris-rektorat', 'id' => $key]);
return Url::toRoute(['accept-by-sekretaris-rektorat', 'id' => $key]);
}
if($action === 'rej'){
return Url::toRoute(['reject-by-sekertaris-rektorat', 'id' => $key]);
return Url::toRoute(['reject-by-sekretaris-rektorat', 'id' => $key]);
}
}
],
......
......@@ -47,7 +47,7 @@ $this->params['breadcrumbs'][] = $this->title;
// ],
[
'attribute' => 'Status Request Sekretaris Rektorat',
'value' => 'statusRequestSekertarisRektorat.status',
'value' => 'statusRequestSekretarisRektorat.status',
],
[
'attribute' => 'status_request_kabiro_KSD',
......
......@@ -54,8 +54,8 @@ $this->params['breadcrumbs'][] = $this->title;
// 'status_request_keuangan',
// 'status_request_wr2',
[
'attribute' => 'Status Request Sekertaris Rektorat',
'value' => $model->statusRequestSekertarisRektorat->status,
'attribute' => 'Status Request Sekretaris Rektorat',
'value' => $model->statusRequestSekretarisRektorat->status,
],
[
'attribute' => 'status_request_kabiro_KSD',
......
......@@ -50,8 +50,8 @@ $this->params['breadcrumbs'][] = $this->title;
],
'no_hp_supir',
[
'attribute' => 'Status Request Sekertaris Rektorat',
'value' => $model->statusRequestSekertarisRektorat->status,
'attribute' => 'Status Request Sekretaris Rektorat',
'value' => $model->statusRequestSekretarisRektorat->status,
],
[
'attribute' => 'status_request_kabiro_KSD',
......
......@@ -50,8 +50,8 @@ $this->params['breadcrumbs'][] = $this->title;
],
'no_hp_supir',
[
'attribute' => 'Status Request Sekertaris Rektorat',
'value' => $model->statusRequestSekertarisRektorat->status,
'attribute' => 'Status Request Sekretaris Rektorat',
'value' => $model->statusRequestSekretarisRektorat->status,
],
[
'attribute' => 'status_request_kabiro_KSD',
......
......@@ -15,16 +15,16 @@ $this->params['breadcrumbs'][] = $this->title;
<h1><?= Html::encode($this->title) ?></h1>
<?php
if($model->status_request_sekertaris_rektorat == 1) {
echo Html::a('Ubah', ['update-by-pegawai', 'id' => $model->transaksi_kendaraan_id], ['class' => 'btn btn-primary']);
echo Html::a('Hapus', ['delete', 'id' => $model->transaksi_kendaraan_id], [
if($model->status_req_sekretaris_rektorat == 1) {
echo Html::a('Ubah', ['edit-by-pegawai', 'id' => $model->transaksi_kendaraan_id], ['class' => 'btn btn-primary']);
echo Html::a('Hapus', ['del', 'id' => $model->transaksi_kendaraan_id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Are you sure you want to delete this item?',
'method' => 'post',
],
]);
}else if($model->status_request_sekertaris_rektorat == 2){
}else if($model->status_req_sekretaris_rektorat == 2){
echo Html::a('Cetak', ['pegawai-pdf', 'id' => $model->transaksi_kendaraan_id], ['class' => 'btn btn-warning']);
}
?>
......@@ -39,10 +39,10 @@ $this->params['breadcrumbs'][] = $this->title;
'jumlah_penumpang_kendaraan',
'rencana_waktu_keberangkatan',
'rencana_waktu_kembali',
// 'status_request_sekertaris_rektorat',
// 'status_req_sekretaris_rektorat',
[
'attribute' => 'Status Request Sekretaris Rektorat',
'value' => $model->statusRequestSekertarisRektorat->status,
'value' => $model->statusRequestSekretarisRektorat->status,
],
// 'status_request_kemahasiswaan',
'no_telepon',
......
......@@ -74,7 +74,7 @@ $this->params['breadcrumbs'][] = $this->title;
<tr>
<td class="kolom">Status Request</td>
<td class="kolom">:</td>
<td class="kolom"><?= $model->statusRequestSekertarisRektorat->status ?></td>
<td class="kolom"><?= $model->statusRequestSekretarisRektorat->status ?></td>
</tr>
<tr>
<td class="kolom">Jenis Permintaan</td>
......@@ -98,7 +98,7 @@ $this->params['breadcrumbs'][] = $this->title;
</tr>
</table>
<br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<hr>
<table>
<tr>
......
......@@ -15,16 +15,16 @@ $this->params['breadcrumbs'][] = $this->title;
<p>
<?php
if($model->status_request_sekertaris_rektorat == 1 && $model->status_request_kemahasiswaan == 1 && $model->status_request_hrd == 1 && $model->status_request_kabiro_KSD == 1 && $model->status_request_keuangan == 1 && $model->status_request_wr2 == 1) {
echo Html::a('Ubah', ['update-by-pribadi', 'id' => $model->transaksi_kendaraan_id], ['class' => 'btn btn-primary']);
echo Html::a('Hapus', ['delete', 'id' => $model->transaksi_kendaraan_id], [
if($model->status_req_sekretaris_rektorat == 1 && $model->status_request_kemahasiswaan == 1 && $model->status_request_hrd == 1 && $model->status_request_kabiro_KSD == 1 && $model->status_request_keuangan == 1 && $model->status_request_wr2 == 1) {
echo Html::a('Ubah', ['edit-by-pribadi', 'id' => $model->transaksi_kendaraan_id], ['class' => 'btn btn-primary']);
echo Html::a('Hapus', ['del', 'id' => $model->transaksi_kendaraan_id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Are you sure you want to delete this item?',
'method' => 'post',
],
]);
}else if($model->status_request_sekertaris_rektorat == 2 && $model->status_request_kemahasiswaan == 2 && $model->status_request_hrd == 2 && $model->status_request_kabiro_KSD == 2 && $model->status_request_keuangan == 2 && $model->status_request_wr2 == 2) {
}else if($model->status_req_sekretaris_rektorat == 2 && $model->status_request_kemahasiswaan == 2 && $model->status_request_hrd == 2 && $model->status_request_kabiro_KSD == 2 && $model->status_request_keuangan == 2 && $model->status_request_wr2 == 2) {
echo Html::a('Cetak', ['pribadi-pdf', 'id' => $model->transaksi_kendaraan_id], ['class' => 'btn btn-warning']);
}
?>
......@@ -62,8 +62,8 @@ $this->params['breadcrumbs'][] = $this->title;
],
'no_hp_supir',
[
'attribute' => 'Status Request Sekertaris Rektorat',
'value' => $model->statusRequestSekertarisRektorat->status,
'attribute' => 'Status Request Sekretaris Rektorat',
'value' => $model->statusRequestSekretarisRektorat->status,
],
[
'attribute' => 'status_request_kabiro_KSD',
......
......@@ -83,7 +83,7 @@ $this->params['breadcrumbs'][] = $this->title;
<tr>
<td class="kolom">Status Request Seketaris Rektorat</td>
<td class="kolom">:</td>
<td class="kolom"><?= $model->statusRequestSekertarisRektorat->status ?></td>
<td class="kolom"><?= $model->statusRequestSekretarisRektorat->status ?></td>
</tr>
<tr>
<td class="kolom">Status Request Kabiro KSD</td>
......
......@@ -15,8 +15,8 @@ $this->params['breadcrumbs'][] = $this->title;
<h1><?= Html::encode($this->title) ?></h1>
<?php
echo Html::a('Terima', ['accept-by-sekertaris-rektorat', 'id' => $model->transaksi_kendaraan_id], ['class' => 'btn btn-success']);
echo Html::a('Tolak', ['reject-by-sekertaris-rektorat', 'id' => $model->transaksi_kendaraan_id], ['class' => 'btn btn-danger']);
echo Html::a('Terima', ['accept-by-sekretaris-rektorat', 'id' => $model->transaksi_kendaraan_id], ['class' => 'btn btn-success']);
echo Html::a('Tolak', ['reject-by-sekretaris-rektorat', 'id' => $model->transaksi_kendaraan_id], ['class' => 'btn btn-danger']);
?>
<?= DetailView::widget([
......@@ -29,10 +29,10 @@ $this->params['breadcrumbs'][] = $this->title;
'jumlah_penumpang_kendaraan',
'rencana_waktu_keberangkatan',
'rencana_waktu_kembali',
// 'status_request_sekertaris_rektorat',
// 'status_req_sekretaris_rektorat',
[
'attribute' => 'status_request_sekertaris_rektorat',
'value' => $model->statusRequestSekertarisRektorat->status,
'attribute' => 'status_req_sekretaris_rektorat',
'value' => $model->statusRequestSekretarisRektorat->status,
],
// 'status_request_kemahasiswaan',
'no_telepon',
......
......@@ -50,8 +50,8 @@ $this->params['breadcrumbs'][] = $this->title;
],
'no_hp_supir',
[
'attribute' => 'Status Request Sekertaris Rektorat',
'value' => $model->statusRequestSekertarisRektorat->status,
'attribute' => 'Status Request Sekretaris Rektorat',
'value' => $model->statusRequestSekretarisRektorat->status,
],
[
'attribute' => 'status_request_kabiro_KSD',
......
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\bootstrap\ActiveForm;
use yii\helpers\ArrayHelper;
use backend\modules\ubux\models\Pegawai;
use common\widgets\Redactor;
......@@ -13,7 +13,18 @@ use common\widgets\Redactor;
<div class="ubux-supir-form">
<?php $form = ActiveForm::begin(); ?>
<?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, 'pegawai_id')->dropDownList(
ArrayHelper::map(Pegawai::find()->select([
......@@ -41,9 +52,10 @@ use common\widgets\Redactor;
<?= $form->field($model, 'updated_by')->textInput(['maxlength' => true]) ?>
-->
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Buat' : 'Ubah', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
<div class="col-md-1 col-md-offset-2">
<?= Html::submitButton($model->isNewRecord ? 'Buat' : 'Ubah', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
</div>
<?php ActiveForm::end(); ?>
......
......@@ -19,7 +19,7 @@ $this->params['breadcrumbs'][] = $this->title;
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a('Tambah Supir', ['create'], ['class' => 'btn btn-success']) ?>
<?= Html::a('Tambah Supir', ['add'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
......@@ -62,9 +62,9 @@ $this->params['breadcrumbs'][] = $this->title;
'urlCreator' => function ($action, $model, $key, $index){
if ($action === 'view') {
return Url::toRoute(['view', 'id' => $key]);
}else if ($action === 'update') {
}else if ($action === 'edit') {
return Url::toRoute(['update', 'id' => $key]);
}else if ($action === 'delete') {
}else if ($action === 'del') {
return Url::toRoute(['delete', 'id' => $key]);
}
}
......
......@@ -15,8 +15,8 @@ $this->params['breadcrumbs'][] = $this->title;
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a('Ubah', ['update', 'id' => $model->supir_id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Hapus', ['delete', 'id' => $model->supir_id], [
<?= Html::a('Ubah', ['edit', 'id' => $model->supir_id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Hapus', ['del', 'id' => $model->supir_id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Apakah anda yakin ?',
......
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