Commit 7ec3f309 by Hendro Prabowo

After Integration 2

parent e03b9a18
...@@ -25,10 +25,10 @@ class LaporanPemakaianKendaraanController extends Controller ...@@ -25,10 +25,10 @@ class LaporanPemakaianKendaraanController extends Controller
{ {
return [ return [
//TODO: crud controller actions are bypassed by default, set the appropriate privilege //TODO: crud controller actions are bypassed by default, set the appropriate privilege
'privilege' => [ // 'privilege' => [
'class' => \Yii::$app->privilegeControl->getAppPrivilegeControlClass(), // 'class' => \Yii::$app->privilegeControl->getAppPrivilegeControlClass(),
'skipActions' => [], // 'skipActions' => [],
], // ],
'verbs' => [ 'verbs' => [
'class' => VerbFilter::className(), 'class' => VerbFilter::className(),
'actions' => [ 'actions' => [
......
...@@ -25,16 +25,16 @@ use backend\modules\ubux\models\Pegawai; ...@@ -25,16 +25,16 @@ use backend\modules\ubux\models\Pegawai;
class PemakaianKendaraanController extends Controller class PemakaianKendaraanController extends Controller
{ {
// ====================== FILTER ======================= // ====================== FILTER =======================
public $pegawai_id; public $pegawai_id = 10;
public function behaviors() public function behaviors()
{ {
return [ return [
//TODO: crud controller actions are bypassed by default, set the appropriate privilege //TODO: crud controller actions are bypassed by default, set the appropriate privilege
'privilege' => [ // 'privilege' => [
'class' => \Yii::$app->privilegeControl->getAppPrivilegeControlClass(), // 'class' => \Yii::$app->privilegeControl->getAppPrivilegeControlClass(),
'skipActions' => [], // 'skipActions' => [],
], // ],
'verbs' => [ 'verbs' => [
'class' => VerbFilter::className(), 'class' => VerbFilter::className(),
'actions' => [ 'actions' => [
...@@ -44,12 +44,12 @@ class PemakaianKendaraanController extends Controller ...@@ -44,12 +44,12 @@ class PemakaianKendaraanController extends Controller
]; ];
} }
public function beforeAction($action) // public function beforeAction($action)
{ // {
$pegawai = Pegawai::find()->where('deleted != 1')->andWhere(['user_id' => Yii::$app->user->identity->user_id])->one(); // $pegawai = Pegawai::find()->where('deleted != 1')->andWhere(['user_id' => Yii::$app->user->identity->user_id])->one();
$this->pegawai_id = $pegawai->pegawai_id; // $this->pegawai_id = $pegawai->pegawai_id;
return true; // return true;
} // }
/** /**
* action-id: index * action-id: index
...@@ -292,17 +292,17 @@ class PemakaianKendaraanController extends Controller ...@@ -292,17 +292,17 @@ class PemakaianKendaraanController extends Controller
$model->status_req_sekretaris_rektorat = 2; $model->status_req_sekretaris_rektorat = 2;
// $model->no_hp_supir = $model->supir->no_telepon_supir; // $model->no_hp_supir = $model->supir->no_telepon_supir;
if($model->supir != null){ // if($model->supir != null){
$supir = Supir::findOne($model->supir_id); // $supir = Supir::findOne($model->supir_id);
$supir->status = 1; // $supir->status = 1;
$supir->save(); // $supir->save();
} // }
//
if($model->kendaraan_id != null){ // if($model->kendaraan_id != null){
$kendaraan = Kendaraan::findOne($model->kendaraan_id); // $kendaraan = Kendaraan::findOne($model->kendaraan_id);
$kendaraan->status = 1; // $kendaraan->status = 1;
$kendaraan->save(); // $kendaraan->save();
} // }
if($model->jenis_keperluan_id == 1){ if($model->jenis_keperluan_id == 1){
$mahasiswa = PemakaianKendaraanMhs::findOne(['pemakaian_kendaraan_mhs_id' => $model->pemakaian_kendaraan_mhs_id]); $mahasiswa = PemakaianKendaraanMhs::findOne(['pemakaian_kendaraan_mhs_id' => $model->pemakaian_kendaraan_mhs_id]);
...@@ -310,7 +310,14 @@ class PemakaianKendaraanController extends Controller ...@@ -310,7 +310,14 @@ class PemakaianKendaraanController extends Controller
$mahasiswa->kendaraan_id = $model->kendaraan_id; $mahasiswa->kendaraan_id = $model->kendaraan_id;
$mahasiswa->supir_id = $model->supir_id; $mahasiswa->supir_id = $model->supir_id;
$mahasiswa->no_hp_supir = $model->no_hp_supir; $mahasiswa->no_hp_supir = $model->no_hp_supir;
// Notifikasi Ke mahasiswa, permintaan kendaraan telah disetujui
// \Yii::$app->messenger->sendNotificationToUser($mahasiswa->dim_id, "Permintaan kendaraan desetujui");
$mahasiswa->save(); $mahasiswa->save();
}else{
// Notifikasi Ke pegawai, permintaan telah disetujui
// \Yii::$app->messenger->sendNotificationToUser($model->pegawai_id, "Permintaan kendaraan disetujui");
} }
if($model->save()){ if($model->save()){
...@@ -393,21 +400,21 @@ class PemakaianKendaraanController extends Controller ...@@ -393,21 +400,21 @@ class PemakaianKendaraanController extends Controller
$model->status_request_kemahasiswaan = 3; $model->status_request_kemahasiswaan = 3;
$model->status_req_sekretaris_rektorat = 3; $model->status_req_sekretaris_rektorat = 3;
if($model->supir_id != null){ // if($model->supir_id != null){
$supir = Supir::findOne($model->supir_id); // $supir = Supir::findOne($model->supir_id);
$supir->status = 0; // $supir->status = 0;
$supir->save(); // $supir->save();
//
$model->supir_id = null; // $model->supir_id = null;
} // }
//
if($model->kendaraan_id != null){ // if($model->kendaraan_id != null){
$kendaraan = Kendaraan::findOne($model->kendaraan_id); // $kendaraan = Kendaraan::findOne($model->kendaraan_id);
$kendaraan->status = 0; // $kendaraan->status = 0;
$kendaraan->save(); // $kendaraan->save();
//
$model->kendaraan_id = null; // $model->kendaraan_id = null;
} // }
if($model->jenis_keperluan_id == 1){ if($model->jenis_keperluan_id == 1){
$mahasiswa = PemakaianKendaraanMhs::findOne(['pemakaian_kendaraan_mhs_id' => $model->pemakaian_kendaraan_mhs_id]); $mahasiswa = PemakaianKendaraanMhs::findOne(['pemakaian_kendaraan_mhs_id' => $model->pemakaian_kendaraan_mhs_id]);
...@@ -416,7 +423,14 @@ class PemakaianKendaraanController extends Controller ...@@ -416,7 +423,14 @@ class PemakaianKendaraanController extends Controller
$mahasiswa->kendaraan_id = $model->kendaraan_id; $mahasiswa->kendaraan_id = $model->kendaraan_id;
$mahasiswa->supir_id = $model->supir_id; $mahasiswa->supir_id = $model->supir_id;
$mahasiswa->no_hp_supir = $model->no_hp_supir; $mahasiswa->no_hp_supir = $model->no_hp_supir;
// Notifikasi Ke mahasiswa, permintaan kendaraan ditolak
// \Yii::$app->messenger->sendNotificationToUser($mahasiswa->dim_id, "Permintaan kendaraan ditolak");
$mahasiswa->save(); $mahasiswa->save();
}else{
// Notifikasi Ke pegawai, permintaan kendaraan ditolak
// \Yii::$app->messenger->sendNotificationToUser($model->pegawai_id, "Ada permintaan kendaraan");
} }
if($model->save()){ if($model->save()){
...@@ -548,6 +562,10 @@ class PemakaianKendaraanController extends Controller ...@@ -548,6 +562,10 @@ class PemakaianKendaraanController extends Controller
$model->jenis_keperluan_id = 3; $model->jenis_keperluan_id = 3;
$model->save(); $model->save();
//Yii::$app->messenger->addSuccessFlash("Message flash berhasil dibuat!!"); //Yii::$app->messenger->addSuccessFlash("Message flash berhasil dibuat!!");
// Notifikasi Ke bu cory
// \Yii::$app->messenger->sendNotificationToUser($model->dim_id, "Ada permintaan kendaraan");
return $this->redirect(['view-by-pribadi', 'id' => $model->pemakaian_kendaraan_id]); return $this->redirect(['view-by-pribadi', 'id' => $model->pemakaian_kendaraan_id]);
} else { } else {
return $this->render('_formByPribadi', [ return $this->render('_formByPribadi', [
...@@ -740,6 +758,21 @@ class PemakaianKendaraanController extends Controller ...@@ -740,6 +758,21 @@ class PemakaianKendaraanController extends Controller
]); ]);
} }
public function actionAddBiaya($id)
{
$model = PemakaianKendaraan::findOne($id);
if ($model->load(Yii::$app->request->post())) {
if($model->save()){
$this->redirect('index-by-hrd');
}
} else {
return $this->render('_formByHrd', [
'model' => $model,
]);
}
}
// Untuk Keuangan !!---------------------------------------------------------------!! // Untuk Keuangan !!---------------------------------------------------------------!!
/* /*
...@@ -750,7 +783,12 @@ class PemakaianKendaraanController extends Controller ...@@ -750,7 +783,12 @@ class PemakaianKendaraanController extends Controller
{ {
$searchModel = new PemakaianKendaraanSearch(); $searchModel = new PemakaianKendaraanSearch();
$dataProvider = new ActiveDataProvider([ $dataProvider = new ActiveDataProvider([
'query' => PemakaianKendaraan::find()->where(['jenis_keperluan_id' => 3])->andWhere('deleted!=1'), 'query' => PemakaianKendaraan::find()->where([
'jenis_keperluan_id' => 3,
'status_req_sekretaris_rektorat' => 2,
'status_request_kabiro_KSD' => 2,
'status_request_wr2' => 2,
])->andWhere('deleted!=1'),
]); ]);
return $this->render('indexByKeuangan', [ return $this->render('indexByKeuangan', [
...@@ -810,6 +848,22 @@ class PemakaianKendaraanController extends Controller ...@@ -810,6 +848,22 @@ class PemakaianKendaraanController extends Controller
]); ]);
} }
public function actionKonfirmasiByKeuangan($id){
$model = PemakaianKendaraan::findOne($id);
$model->konfirmasi_keuangan = 1;
$model->save();
return $this->redirect('index-by-keuangan');
}
public function actionBelumKonfirmasiByKeuangan($id){
$model = PemakaianKendaraan::findOne($id);
$model->konfirmasi_keuangan = 0;
$model->save();
return $this->redirect('index-by-keuangan');
}
// Untuk WR2 !!---------------------------------------------------------------!! // Untuk WR2 !!---------------------------------------------------------------!!
/* /*
......
...@@ -22,16 +22,16 @@ use backend\modules\ubux\models\PemakaianKendaraan; ...@@ -22,16 +22,16 @@ use backend\modules\ubux\models\PemakaianKendaraan;
class PemakaianKendaraanMhsController extends Controller class PemakaianKendaraanMhsController extends Controller
{ {
// ================= FILTER ================== // ================= FILTER ==================
public $dim_id; public $dim_id = 1;
public function behaviors() public function behaviors()
{ {
return [ return [
//TODO: crud controller actions are bypassed by default, set the appropriate privilege //TODO: crud controller actions are bypassed by default, set the appropriate privilege
'privilege' => [ // 'privilege' => [
'class' => \Yii::$app->privilegeControl->getAppPrivilegeControlClass(), // 'class' => \Yii::$app->privilegeControl->getAppPrivilegeControlClass(),
'skipActions' => [], // 'skipActions' => [],
], // ],
'verbs' => [ 'verbs' => [
'class' => VerbFilter::className(), 'class' => VerbFilter::className(),
'actions' => [ 'actions' => [
...@@ -41,12 +41,12 @@ class PemakaianKendaraanMhsController extends Controller ...@@ -41,12 +41,12 @@ class PemakaianKendaraanMhsController extends Controller
]; ];
} }
public function beforeAction($action) // public function beforeAction($action)
{ // {
$dim = Dim::find()->where('deleted != 1')->andWhere(['user_id' => Yii::$app->user->identity->user_id])->one(); // $dim = Dim::find()->where('deleted != 1')->andWhere(['user_id' => Yii::$app->user->identity->user_id])->one();
$this->dim_id = $dim->dim_id; // $this->dim_id = $dim->dim_id;
return true; // return true;
} // }
/** /**
* action-id: index * action-id: index
...@@ -150,6 +150,9 @@ class PemakaianKendaraanMhsController extends Controller ...@@ -150,6 +150,9 @@ class PemakaianKendaraanMhsController extends Controller
//Yii::$app->messenger->addSuccessFlash("Permohonan Pemakaian Kendaraan Berhasil Dibuat"); //Yii::$app->messenger->addSuccessFlash("Permohonan Pemakaian Kendaraan Berhasil Dibuat");
// Yii::$app->messenger->addSuccessFlash("Email Terkirim"); // Yii::$app->messenger->addSuccessFlash("Email Terkirim");
// ==================== Notifikasi Ke Kemahasiswaan ==================== //
\Yii::$app->messenger->sendNotificationToUser($model->dim_id, "Ada permintaan kendaraan");
if($model->save()){ if($model->save()){
Yii::$app->messenger->addSuccessFlash("Permohonan Pemakaian Kendaraan Berhasil Dibuat"); Yii::$app->messenger->addSuccessFlash("Permohonan Pemakaian Kendaraan Berhasil Dibuat");
return $this->redirect(['view', 'id' => $model->pemakaian_kendaraan_mhs_id]); return $this->redirect(['view', 'id' => $model->pemakaian_kendaraan_mhs_id]);
...@@ -319,6 +322,13 @@ class PemakaianKendaraanMhsController extends Controller ...@@ -319,6 +322,13 @@ class PemakaianKendaraanMhsController extends Controller
$model->save(); $model->save();
Yii::$app->messenger->addSuccessFlash("Berhasil"); Yii::$app->messenger->addSuccessFlash("Berhasil");
// Notifikasi Ke bu cory, bahwa ada permintaan kendaraan
\Yii::$app->messenger->sendNotificationToUser($model->dim_id, "Ada permintaan kendaraan");
// Notifikasi Ke mahasiswa, bahwa permintaan kendaraannya sedang di proses
\Yii::$app->messenger->sendNotificationToUser($model->dim_id, "Permintaan kendaraan sedang di proses");
return $this->redirect('index-by-kemahasiswaan'); return $this->redirect('index-by-kemahasiswaan');
} }
}else{ }else{
...@@ -343,6 +353,9 @@ class PemakaianKendaraanMhsController extends Controller ...@@ -343,6 +353,9 @@ class PemakaianKendaraanMhsController extends Controller
$model->status_request_kemahasiswaan = 3; $model->status_request_kemahasiswaan = 3;
$model->save(); $model->save();
// Notifikasi Ke mahasiswa, permintaan kendaraan ditolak
\Yii::$app->messenger->sendNotificationToUser($model->dim_id, "Permintaan kendaraan ditolak");
$searchModel = new PemakaianKendaraanMhsSearch(); $searchModel = new PemakaianKendaraanMhsSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams); $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
......
...@@ -75,12 +75,11 @@ class DataTamu extends \yii\db\ActiveRecord ...@@ -75,12 +75,11 @@ class DataTamu extends \yii\db\ActiveRecord
{ {
return [ return [
'data_tamu_id' => 'Data Tamu ID', 'data_tamu_id' => 'Data Tamu ID',
'nik' => 'Nik', 'nik' => 'NIK',
'nama' => 'Nama', 'nama' => 'Nama',
'waktu_kedatangan' => 'Waktu Kedatangan', 'waktu_kedatangan' => 'Waktu Kedatangan',
'desc' => 'Desc', 'desc' => 'Desc',
'waktu_kembali' => 'Waktu Kembali', 'waktu_kembali' => 'Waktu Kembali',
'kendaraan'=>'Kendaraan',
'deleted' => 'Deleted', 'deleted' => 'Deleted',
'deleted_at' => 'Deleted At', 'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By', 'deleted_by' => 'Deleted By',
......
...@@ -92,11 +92,6 @@ use common\behaviors\DeleteBehavior; ...@@ -92,11 +92,6 @@ use common\behaviors\DeleteBehavior;
* @property AbsnAbsensi[] $absnAbsensis * @property AbsnAbsensi[] $absnAbsensis
* @property AdakMahasiswaAssistant[] $adakMahasiswaAssistants * @property AdakMahasiswaAssistant[] $adakMahasiswaAssistants
* @property AdakRegistrasi[] $adakRegistrasis * @property AdakRegistrasi[] $adakRegistrasis
* @property AskmIzinBermalam[] $askmIzinBermalams
* @property AskmIzinKeluar[] $askmIzinKeluars
* @property AskmIzinPenggunaanRuangan[] $askmIzinPenggunaanRuangans
* @property AskmIzinTambahanJamKolaboratif[] $askmIzinTambahanJamKolaboratifs
* @property AskmLogMahasiswa[] $askmLogMahasiswas
* @property DimxAlumni[] $dimxAlumnis * @property DimxAlumni[] $dimxAlumnis
* @property MrefRAgama $agama0 * @property MrefRAgama $agama0
* @property MrefRAsalSekolah $asalSekolah * @property MrefRAsalSekolah $asalSekolah
...@@ -135,7 +130,6 @@ use common\behaviors\DeleteBehavior; ...@@ -135,7 +130,6 @@ use common\behaviors\DeleteBehavior;
* @property PrklBeritaAcaraDaftarHadir[] $prklBeritaAcaraDaftarHadirs * @property PrklBeritaAcaraDaftarHadir[] $prklBeritaAcaraDaftarHadirs
* @property PrklInfoTa[] $prklInfoTas * @property PrklInfoTa[] $prklInfoTas
* @property PrklKrsMhs[] $prklKrsMhs * @property PrklKrsMhs[] $prklKrsMhs
* @property UbuxDataPaket[] $ubuxDataPakets
*/ */
class Dim extends \yii\db\ActiveRecord class Dim extends \yii\db\ActiveRecord
{ {
...@@ -319,46 +313,6 @@ class Dim extends \yii\db\ActiveRecord ...@@ -319,46 +313,6 @@ class Dim extends \yii\db\ActiveRecord
/** /**
* @return \yii\db\ActiveQuery * @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() public function getDimxAlumnis()
{ {
return $this->hasMany(DimxAlumni::className(), ['dim_id' => 'dim_id']); return $this->hasMany(DimxAlumni::className(), ['dim_id' => 'dim_id']);
...@@ -465,7 +419,7 @@ class Dim extends \yii\db\ActiveRecord ...@@ -465,7 +419,7 @@ class Dim extends \yii\db\ActiveRecord
*/ */
public function getUser() public function getUser()
{ {
return $this->hasOne(User::className(), ['user_id' => 'user_id']); return $this->hasOne(SysxUser::className(), ['user_id' => 'user_id']);
} }
/** /**
...@@ -660,11 +614,7 @@ class Dim extends \yii\db\ActiveRecord ...@@ -660,11 +614,7 @@ class Dim extends \yii\db\ActiveRecord
return $this->hasMany(PrklKrsMhs::className(), ['dim_id' => 'dim_id']); return $this->hasMany(PrklKrsMhs::className(), ['dim_id' => 'dim_id']);
} }
/** // public function getMahasiswa(){
* @return \yii\db\ActiveQuery // return $this->hasMany(PemakaianKendaraanMhs::className(), ['dim_id' => 'dim_id']);
*/ // }
public function getUbuxDataPakets()
{
return $this->hasMany(UbuxDataPaket::className(), ['dim_id' => 'dim_id']);
}
} }
...@@ -15,7 +15,6 @@ use common\behaviors\DeleteBehavior; ...@@ -15,7 +15,6 @@ use common\behaviors\DeleteBehavior;
* @property string $kendaraan * @property string $kendaraan
* @property integer $daya_tampung_kendaraan * @property integer $daya_tampung_kendaraan
* @property integer $plat_nomor * @property integer $plat_nomor
* @property integer $status
* @property integer $deleted * @property integer $deleted
* @property string $deleted_at * @property string $deleted_at
* @property string $deleted_by * @property string $deleted_by
...@@ -64,7 +63,7 @@ class Kendaraan extends \yii\db\ActiveRecord ...@@ -64,7 +63,7 @@ class Kendaraan extends \yii\db\ActiveRecord
{ {
return [ return [
[['kendaraan', 'daya_tampung_kendaraan'], 'required'], [['kendaraan', 'daya_tampung_kendaraan'], 'required'],
[['daya_tampung_kendaraan', 'deleted', 'status'], 'integer'], [['daya_tampung_kendaraan', 'deleted'], 'integer'],
[['deleted_at', 'created_at', 'updated_at'], 'safe'], [['deleted_at', 'created_at', 'updated_at'], 'safe'],
[['kendaraan', 'plat_nomor'], 'string', 'max' => 100], [['kendaraan', 'plat_nomor'], 'string', 'max' => 100],
[['deleted_by', 'created_by', 'updated_by', 'plat_nomor'], 'string', 'max' => 32] [['deleted_by', 'created_by', 'updated_by', 'plat_nomor'], 'string', 'max' => 32]
...@@ -81,7 +80,6 @@ class Kendaraan extends \yii\db\ActiveRecord ...@@ -81,7 +80,6 @@ class Kendaraan extends \yii\db\ActiveRecord
'kendaraan' => 'Kendaraan', 'kendaraan' => 'Kendaraan',
'daya_tampung_kendaraan' => 'Daya Tampung Kendaraan', 'daya_tampung_kendaraan' => 'Daya Tampung Kendaraan',
'plat_nomor' => 'Plat Nomor', 'plat_nomor' => 'Plat Nomor',
'status' => 'Ketersediaan',
'deleted' => 'Deleted', 'deleted' => 'Deleted',
'deleted_at' => 'Deleted At', 'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By', 'deleted_by' => 'Deleted By',
...@@ -130,9 +128,6 @@ class Kendaraan extends \yii\db\ActiveRecord ...@@ -130,9 +128,6 @@ class Kendaraan extends \yii\db\ActiveRecord
} }
public function getKeteranganKendaraan(){ public function getKeteranganKendaraan(){
$status = null; return $this->kendaraan.' '.$this->plat_nomor;
if($this->status == 1) $status = 'Terpakai';
elseif($this->status == 0) $status = 'Tersedia';
return $this->kendaraan.' '.$this->plat_nomor.' ('.$status.')';
} }
} }
...@@ -27,11 +27,9 @@ use common\behaviors\DeleteBehavior; ...@@ -27,11 +27,9 @@ use common\behaviors\DeleteBehavior;
* @property string $updated_by * @property string $updated_by
* @property integer $kendaraan_id * @property integer $kendaraan_id
* @property integer $supir_id * @property integer $supir_id
* @property integer $pemakaian_kendaraan_id
* *
* @property Kendaraan $kendaraan * @property Kendaraan $kendaraan
* @property Supir $supir * @property Supir $supir
* @property PemakaianKendaraan $pemakaianKendaraan
*/ */
class LaporanPemakaianKendaraan extends \yii\db\ActiveRecord class LaporanPemakaianKendaraan extends \yii\db\ActiveRecord
{ {
...@@ -69,7 +67,7 @@ class LaporanPemakaianKendaraan extends \yii\db\ActiveRecord ...@@ -69,7 +67,7 @@ class LaporanPemakaianKendaraan extends \yii\db\ActiveRecord
{ {
return [ return [
[['tujuan', 'desc', 'jumlah_penumpang', 'keperluan', 'waktu_keberangkatan', 'waktu_tiba'], 'required'], [['tujuan', 'desc', 'jumlah_penumpang', 'keperluan', 'waktu_keberangkatan', 'waktu_tiba'], 'required'],
[['jumlah_penumpang', 'deleted', 'kendaraan_id', 'supir_id', 'pemakaian_kendaraan_id'], 'integer'], [['jumlah_penumpang', 'deleted', 'kendaraan_id', 'supir_id'], 'integer'],
[['waktu_keberangkatan', 'waktu_tiba', 'deleted_at', 'created_at', 'updated_at'], 'safe'], [['waktu_keberangkatan', 'waktu_tiba', 'deleted_at', 'created_at', 'updated_at'], 'safe'],
[['tujuan', 'desc', 'keperluan'], 'string'], [['tujuan', 'desc', 'keperluan'], 'string'],
[['deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32], [['deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32],
...@@ -100,7 +98,6 @@ class LaporanPemakaianKendaraan extends \yii\db\ActiveRecord ...@@ -100,7 +98,6 @@ class LaporanPemakaianKendaraan extends \yii\db\ActiveRecord
'updated_by' => 'Updated By', 'updated_by' => 'Updated By',
'kendaraan_id' => 'Kendaraan', 'kendaraan_id' => 'Kendaraan',
'supir_id' => 'Supir', 'supir_id' => 'Supir',
'pemakaian_kendaraan_id' => 'Pemakaian Kendaraan Id'
]; ];
} }
...@@ -119,9 +116,4 @@ class LaporanPemakaianKendaraan extends \yii\db\ActiveRecord ...@@ -119,9 +116,4 @@ class LaporanPemakaianKendaraan extends \yii\db\ActiveRecord
{ {
return $this->hasOne(Supir::className(), ['supir_id' => 'supir_id']); return $this->hasOne(Supir::className(), ['supir_id' => 'supir_id']);
} }
public function getPemakaianKendaraan()
{
return $this->hasOne(PemakaianKendaraan::className(), ['pemakaian_kendaraan_id' => 'pemakaian_kendaraan_id']);
}
} }
...@@ -67,7 +67,6 @@ use common\behaviors\DeleteBehavior; ...@@ -67,7 +67,6 @@ use common\behaviors\DeleteBehavior;
* *
* @property AdakPenugasanPengajaran[] $adakPenugasanPengajarans * @property AdakPenugasanPengajaran[] $adakPenugasanPengajarans
* @property AdakRegistrasi[] $adakRegistrasis * @property AdakRegistrasi[] $adakRegistrasis
* @property AskmKeasramaan[] $askmKeasramaans
* @property HrdxDosen[] $hrdxDosens * @property HrdxDosen[] $hrdxDosens
* @property MrefRJenisKelamin $jenisKelamin * @property MrefRJenisKelamin $jenisKelamin
* @property MrefRAgama $agama * @property MrefRAgama $agama
...@@ -88,7 +87,6 @@ use common\behaviors\DeleteBehavior; ...@@ -88,7 +87,6 @@ use common\behaviors\DeleteBehavior;
* @property LppmTPublikasi[] $lppmTPublikasis * @property LppmTPublikasi[] $lppmTPublikasis
* @property PrklCourseUnit[] $prklCourseUnits * @property PrklCourseUnit[] $prklCourseUnits
* @property PrklKrsMhs[] $prklKrsMhs * @property PrklKrsMhs[] $prklKrsMhs
* @property UbuxDataPaket[] $ubuxDataPakets
*/ */
class Pegawai extends \yii\db\ActiveRecord class Pegawai extends \yii\db\ActiveRecord
{ {
...@@ -236,14 +234,6 @@ class Pegawai extends \yii\db\ActiveRecord ...@@ -236,14 +234,6 @@ class Pegawai extends \yii\db\ActiveRecord
/** /**
* @return \yii\db\ActiveQuery * @return \yii\db\ActiveQuery
*/ */
public function getAskmKeasramaans()
{
return $this->hasMany(AskmKeasramaan::className(), ['pegawai_id' => 'pegawai_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getHrdxDosens() public function getHrdxDosens()
{ {
return $this->hasMany(HrdxDosen::className(), ['pegawai_id' => 'pegawai_id']); return $this->hasMany(HrdxDosen::className(), ['pegawai_id' => 'pegawai_id']);
...@@ -326,7 +316,7 @@ class Pegawai extends \yii\db\ActiveRecord ...@@ -326,7 +316,7 @@ class Pegawai extends \yii\db\ActiveRecord
*/ */
public function getUser() public function getUser()
{ {
return $this->hasOne(User::className(), ['user_id' => 'user_id']); return $this->hasOne(SysxUser::className(), ['user_id' => 'user_id']);
} }
/** /**
...@@ -400,12 +390,4 @@ class Pegawai extends \yii\db\ActiveRecord ...@@ -400,12 +390,4 @@ class Pegawai extends \yii\db\ActiveRecord
{ {
return $this->hasMany(PrklKrsMhs::className(), ['approved_by' => 'pegawai_id']); 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']);
}
} }
...@@ -19,7 +19,7 @@ use common\behaviors\DeleteBehavior; ...@@ -19,7 +19,7 @@ use common\behaviors\DeleteBehavior;
* @property integer $jumlah_penumpang_kendaraan * @property integer $jumlah_penumpang_kendaraan
* @property string $rencana_waktu_keberangkatan * @property string $rencana_waktu_keberangkatan
* @property string $rencana_waktu_kembali * @property string $rencana_waktu_kembali
* @property int $status_req_sekretaris_rektorat * @property string $status_req_sekretaris_rektorat
* @property string $status_request_kemahasiswaan * @property string $status_request_kemahasiswaan
* @property string $jenis_keperluan_id * @property string $jenis_keperluan_id
* @property string $no_telepon * @property string $no_telepon
...@@ -35,17 +35,15 @@ use common\behaviors\DeleteBehavior; ...@@ -35,17 +35,15 @@ use common\behaviors\DeleteBehavior;
* @property integer $supir_id * @property integer $supir_id
* @property string $no_hp_supir * @property string $no_hp_supir
* @property integer $status_request_kabiro_KSD * @property integer $status_request_kabiro_KSD
* @property integer $status_request_hrd * @property integer $biaya
* @property integer $status_request_keuangan * @property integer $konfirmasi_keuangan
* @property integer $status_request_wr2 * @property integer $status_request_wr2
* @property integer $laporan
* *
* @property Supir $supir * @property Supir $supir
* @property Kendaraan $kendaraan * @property Kendaraan $kendaraan
* @property StatusRequest $statusRequestSekretarisRektorat * @property StatusRequest $statusRequestSekretarisRektorat
* @property StatusRequest $statusRequestKemahasiswaan * @property StatusRequest $statusRequestKemahasiswaan
* @property StatusRequest $statusRequestKabiroKSD * @property StatusRequest $statusRequestKabiroKSD
* @property StatusRequest $statusRequestHRD
* @property StatusRequest $statusRequestKeuangan * @property StatusRequest $statusRequestKeuangan
* @property StatusRequest $statusRequestWr2 * @property StatusRequest $statusRequestWr2
* @property JenisKeperluan $jenisKeperluan * @property JenisKeperluan $jenisKeperluan
...@@ -87,7 +85,7 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord ...@@ -87,7 +85,7 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord
{ {
return [ return [
[['desc', 'tujuan', 'rencana_waktu_keberangkatan', 'rencana_waktu_kembali', 'no_telepon'], 'required'], [['desc', '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', 'pemakaian_kendaraan_mhs_id', 'status_request_kabiro_KSD', 'status_request_hrd', 'status_request_keuangan', 'status_request_wr2', 'jenis_keperluan_id', 'pegawai_id', 'laporan'], 'integer'], [['status_req_sekretaris_rektorat', 'status_request_kemahasiswaan', 'jumlah_penumpang_kendaraan', 'deleted', 'kendaraan_id', 'supir_id', 'pemakaian_kendaraan_mhs_id', 'status_request_kabiro_KSD', 'biaya', 'konfirmasi_keuangan', 'status_request_wr2', 'jenis_keperluan_id', 'pegawai_id'], 'integer'],
[['rencana_waktu_keberangkatan', 'rencana_waktu_kembali', 'deleted_at', 'created_at', 'updated_at'], 'safe'], [['rencana_waktu_keberangkatan', 'rencana_waktu_kembali', 'deleted_at', 'created_at', 'updated_at'], 'safe'],
[['file'], 'file'], [['file'], 'file'],
[['no_hp_supir'], 'string', 'max' => 300], [['no_hp_supir'], 'string', 'max' => 300],
...@@ -115,7 +113,7 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord ...@@ -115,7 +113,7 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord
'rencana_waktu_keberangkatan' => 'Waktu Keberangkatan', 'rencana_waktu_keberangkatan' => 'Waktu Keberangkatan',
'rencana_waktu_kembali' => 'Waktu Tiba', 'rencana_waktu_kembali' => 'Waktu Tiba',
'status_req_sekretaris_rektorat' => 'Status', 'status_req_sekretaris_rektorat' => 'Status',
'status_request_kemahasiswaan' => 'Status Persetujuan Kemahasiswaan', 'status_request_kemahasiswaan' => 'Status Pemintaan Kemahasiswaan',
'no_telepon' => 'No Telepon', 'no_telepon' => 'No Telepon',
'jenis_keperluan_id' => 'Jenis Permintaan', 'jenis_keperluan_id' => 'Jenis Permintaan',
'proposal' => 'Proposal', 'proposal' => 'Proposal',
...@@ -130,18 +128,19 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord ...@@ -130,18 +128,19 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord
'supir_id' => 'Supir', 'supir_id' => 'Supir',
'no_hp_supir' => 'No Hp Supir', 'no_hp_supir' => 'No Hp Supir',
'file' => 'Proposal', 'file' => 'Proposal',
'status_request_kabiro_KSD' => 'Status Persetujuan Kabiro Ksd', 'status_request_kabiro_KSD' => 'Status Permintaan Kabiro Ksd',
'status_request_hrd' => 'Status Persetujuan Hrd', 'biaya' => 'Biaya',
'status_request_keuangan' => 'Status Persetujuan Keuangan', 'konfirmasi_keuangan' => 'Konfirmasi Keuangan',
'status_request_wr2' => 'Status Persetujuan Wr2', 'status_request_wr2' => 'Status Permintaan Wr2',
'pemakaian_kendaraan_mhs_id' => 'Transaksi Kendaraan Mahasiswa ID', 'pemakaian_kendaraan_mhs_id' => 'Transaksi Kendaraan Mahasiswa ID'
'laporan' => 'Laporan Pemakaian',
]; ];
} }
/** /**
* @return \yii\db\ActiveQuery * @return \yii\db\ActiveQuery
*/ */
public function getSupir() public function getSupir()
{ {
return $this->hasOne(Supir::className(), ['supir_id' => 'supir_id']); return $this->hasOne(Supir::className(), ['supir_id' => 'supir_id']);
...@@ -175,16 +174,6 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord ...@@ -175,16 +174,6 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord
return $this->hasOne(StatusRequest::className(), ['status_request_id' => 'status_request_kabiro_KSD']); return $this->hasOne(StatusRequest::className(), ['status_request_id' => 'status_request_kabiro_KSD']);
} }
public function getStatusRequestHRD()
{
return $this->hasOne(StatusRequest::className(), ['status_request_id' => 'status_request_hrd']);
}
public function getStatusRequestKeuangan()
{
return $this->hasOne(StatusRequest::className(), ['status_request_id' => 'status_request_keuangan']);
}
public function getStatusRequestWr2() public function getStatusRequestWr2()
{ {
return $this->hasOne(StatusRequest::className(), ['status_request_id' => 'status_request_wr2']); return $this->hasOne(StatusRequest::className(), ['status_request_id' => 'status_request_wr2']);
......
...@@ -100,8 +100,8 @@ class PemakaianKendaraanMhs extends \yii\db\ActiveRecord ...@@ -100,8 +100,8 @@ class PemakaianKendaraanMhs extends \yii\db\ActiveRecord
'jumlah_penumpang_kendaraan' => 'Jumlah Penumpang', 'jumlah_penumpang_kendaraan' => 'Jumlah Penumpang',
'rencana_waktu_keberangkatan' => 'Waktu Keberangkatan', 'rencana_waktu_keberangkatan' => 'Waktu Keberangkatan',
'rencana_waktu_kembali' => 'Waktu Tiba', 'rencana_waktu_kembali' => 'Waktu Tiba',
'status_req_sekretaris_rektorat' => 'Status', 'status_req_sekretaris_rektorat' => 'Status Permintaan',
'status_request_kemahasiswaan' => 'Status Persetujuan Kemahasiswaan', 'status_request_kemahasiswaan' => 'Status Permintaan Kemahasiswaan',
'proposal' => 'Proposal', 'proposal' => 'Proposal',
'no_telepon' => 'No Telepon', 'no_telepon' => 'No Telepon',
'deleted' => 'Deleted', 'deleted' => 'Deleted',
...@@ -114,8 +114,7 @@ class PemakaianKendaraanMhs extends \yii\db\ActiveRecord ...@@ -114,8 +114,7 @@ class PemakaianKendaraanMhs extends \yii\db\ActiveRecord
'kendaraan_id' => 'Kendaraan', 'kendaraan_id' => 'Kendaraan',
'supir_id' => 'Supir', 'supir_id' => 'Supir',
'no_hp_supir' => 'No Hp Supir', 'no_hp_supir' => 'No Hp Supir',
'kode_proposal' => 'Kode Proposal', 'file' => 'Proposal',
'file' => 'File Proposal',
]; ];
} }
......
...@@ -14,7 +14,6 @@ use common\behaviors\DeleteBehavior; ...@@ -14,7 +14,6 @@ use common\behaviors\DeleteBehavior;
* @property integer $supir_id * @property integer $supir_id
* @property integer $pegawai_id * @property integer $pegawai_id
* @property string $no_telepon_supir * @property string $no_telepon_supir
* @property integer $status
* @property integer $deleted * @property integer $deleted
* @property string $deleted_at * @property string $deleted_at
* @property string $deleted_by * @property string $deleted_by
...@@ -62,7 +61,7 @@ class Supir extends \yii\db\ActiveRecord ...@@ -62,7 +61,7 @@ class Supir extends \yii\db\ActiveRecord
public function rules() public function rules()
{ {
return [ return [
[['pegawai_id', 'deleted', 'status'], 'integer'], [['pegawai_id', 'deleted'], 'integer'],
[['deleted_at', 'created_at', 'updated_at'], 'safe'], [['deleted_at', 'created_at', 'updated_at'], 'safe'],
[['no_telepon_supir', 'deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32] [['no_telepon_supir', 'deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32]
]; ];
...@@ -77,7 +76,6 @@ class Supir extends \yii\db\ActiveRecord ...@@ -77,7 +76,6 @@ class Supir extends \yii\db\ActiveRecord
'supir_id' => 'Supir ID', 'supir_id' => 'Supir ID',
'pegawai_id' => 'Nama', 'pegawai_id' => 'Nama',
'no_telepon_supir' => 'No Telepon Supir', 'no_telepon_supir' => 'No Telepon Supir',
'status' => 'Ketersediaan',
'deleted' => 'Deleted', 'deleted' => 'Deleted',
'deleted_at' => 'Deleted At', 'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By', 'deleted_by' => 'Deleted By',
...@@ -115,9 +113,6 @@ class Supir extends \yii\db\ActiveRecord ...@@ -115,9 +113,6 @@ class Supir extends \yii\db\ActiveRecord
} }
public function getNamaSupir(){ public function getNamaSupir(){
$status = null; return $this->pegawai->nama;
if($this->status == 1) $status = 'Di Perjalanan';
elseif($this->status == 0) $status = 'Tersedia';
return $this->pegawai->nama.' ('.$status.')';
} }
} }
...@@ -50,7 +50,7 @@ class DataPaketSearch extends DataPaket ...@@ -50,7 +50,7 @@ class DataPaketSearch extends DataPaket
$dataProvider = new ActiveDataProvider([ $dataProvider = new ActiveDataProvider([
'query' => $query, 'query' => $query,
'pagination'=>['pageSize'=>10], 'pagination'=>['pageSize'=>10],
'sort' => ['defaultOrder' => ['status_paket_id'=>SORT_ASC,'data_paket_id' => SORT_DESC, 'updated_at' => SORT_DESC, 'created_at' => SORT_DESC]], 'sort' => ['defaultOrder' => ['data_paket_id' => SORT_ASC, 'updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
]); ]);
$this->load($params); $this->load($params);
...@@ -66,6 +66,7 @@ class DataPaketSearch extends DataPaket ...@@ -66,6 +66,7 @@ class DataPaketSearch extends DataPaket
'tag' => $this->tag, 'tag' => $this->tag,
'dim_id' => $this->dim_id, 'dim_id' => $this->dim_id,
'pegawai_id' => $this->pegawai_id, 'pegawai_id' => $this->pegawai_id,
'tanggal_kedatangan' => $this->tanggal_kedatangan,
'tanggal_diambil' => $this->tanggal_diambil, 'tanggal_diambil' => $this->tanggal_diambil,
'posisi_paket_id' => $this->posisi_paket_id, 'posisi_paket_id' => $this->posisi_paket_id,
'status_paket_id' => $this->status_paket_id, 'status_paket_id' => $this->status_paket_id,
...@@ -79,8 +80,6 @@ class DataPaketSearch extends DataPaket ...@@ -79,8 +80,6 @@ class DataPaketSearch extends DataPaket
->andFilterWhere(['like', 'hrdx_pegawai.nama', $this->pegawai_nama]) ->andFilterWhere(['like', 'hrdx_pegawai.nama', $this->pegawai_nama])
->andFilterWhere(['like', 'pengirim', $this->pengirim]) ->andFilterWhere(['like', 'pengirim', $this->pengirim])
->andFilterWhere(['like', 'diambil_oleh', $this->diambil_oleh]) ->andFilterWhere(['like', 'diambil_oleh', $this->diambil_oleh])
->andFilterWhere(['like', 'tanggal_kedatangan',SUBSTR($this->tanggal_kedatangan,1,10)])
->andFilterWhere(['like', 'hrdx_pegawai.nama', $this->pegawai_nama])
->andFilterWhere(['like', 'desc', $this->desc]) ->andFilterWhere(['like', 'desc', $this->desc])
->andFilterWhere(['like', 'deleted_by', $this->deleted_by]) ->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'created_by', $this->created_by]) ->andFilterWhere(['like', 'created_by', $this->created_by])
...@@ -96,13 +95,14 @@ class DataPaketSearch extends DataPaket ...@@ -96,13 +95,14 @@ class DataPaketSearch extends DataPaket
* Search Untuk Paket Mahasiswa * Search Untuk Paket Mahasiswa
*/ */
public function searchUserMahasiswa($params){ public function searchUserMahasiswa($params){
$dim = Dim::find('dim_id')->where('deleted!=1')->andWhere(['user_id'=>Yii::$app->user->identity->user_id])->one(); $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->dim_id])
->orWhere(['dim_id'=>NULL,'pegawai_id'=>NULL,'status_paket_id'=>1]); $query = DataPaket::find()->where('deleted!=1')->andWhere(['dim_id'=>$dim])->orWhere(['dim_id'=>NULL])->andWhere(['pegawai_id'=>NULL]);
$dataProvider = new ActiveDataProvider([ $dataProvider = new ActiveDataProvider([
'query' => $query, 'query' => $query,
'pagination'=>['pageSize'=>10], 'pagination'=>['pageSize'=>10],
'sort' => ['defaultOrder' => ['dim_id' => SORT_DESC, 'status_paket_id'=>SORT_ASC, 'updated_at' => SORT_DESC, 'created_at' => SORT_DESC]], 'sort' => ['defaultOrder' => ['data_paket_id' => SORT_ASC, 'updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
]); ]);
$this->load($params); $this->load($params);
...@@ -117,6 +117,7 @@ class DataPaketSearch extends DataPaket ...@@ -117,6 +117,7 @@ class DataPaketSearch extends DataPaket
'data_paket_id' => $this->data_paket_id, 'data_paket_id' => $this->data_paket_id,
'tag' => $this->tag, 'tag' => $this->tag,
'dim_id' => $this->dim_id, 'dim_id' => $this->dim_id,
'tanggal_kedatangan' => $this->tanggal_kedatangan,
'tanggal_diambil' => $this->tanggal_diambil, 'tanggal_diambil' => $this->tanggal_diambil,
'posisi_paket_id' => $this->posisi_paket_id, 'posisi_paket_id' => $this->posisi_paket_id,
'status_paket_id' => $this->status_paket_id, 'status_paket_id' => $this->status_paket_id,
...@@ -132,7 +133,6 @@ class DataPaketSearch extends DataPaket ...@@ -132,7 +133,6 @@ class DataPaketSearch extends DataPaket
->andFilterWhere(['like', 'deleted_by', $this->deleted_by]) ->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'created_by', $this->created_by]) ->andFilterWhere(['like', 'created_by', $this->created_by])
->andFilterWhere(['like', 'updated_by', $this->updated_by]) ->andFilterWhere(['like', 'updated_by', $this->updated_by])
->andFilterWhere(['like', 'tanggal_kedatangan',SUBSTR($this->tanggal_kedatangan,1,10)])
->andFilterWhere(['not', ['deleted' => 1]]); ->andFilterWhere(['not', ['deleted' => 1]]);
return $dataProvider; return $dataProvider;
...@@ -142,15 +142,14 @@ class DataPaketSearch extends DataPaket ...@@ -142,15 +142,14 @@ class DataPaketSearch extends DataPaket
* Search untuk paket Pegawai * Search untuk paket Pegawai
*/ */
public function searchUserPegawai($params){ public function searchUserPegawai($params){
$pegawai = Pegawai::find()->where('deleted!=1')->andWhere(['user_id'=>(Yii::$app->user->identity->user_id)])->one(); $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->pegawai_id]) $query = DataPaket::find()->where('deleted!=1')->andWhere(['pegawai_id'=>$pegawai])->orWhere(['pegawai_id'=>NULL])->andWhere(['dim_id'=>NULL]);
->orWhere(['dim_id'=>NULL,'pegawai_id'=>NULL,'status_paket_id'=>1]);
$dataProvider = new ActiveDataProvider([ $dataProvider = new ActiveDataProvider([
'query' => $query, 'query' => $query,
'pagination'=>['pageSize'=>10], 'pagination'=>['pageSize'=>10],
'sort' => ['defaultOrder' => ['pegawai_id' => SORT_DESC, 'status_paket_id'=>SORT_ASC, 'updated_at' => SORT_DESC, 'created_at' => SORT_DESC]], 'sort' => ['defaultOrder' => ['data_paket_id' => SORT_ASC, 'updated_at' => SORT_DESC, 'created_at' => SORT_DESC]],
]); ]);
$this->load($params); $this->load($params);
...@@ -165,6 +164,7 @@ class DataPaketSearch extends DataPaket ...@@ -165,6 +164,7 @@ class DataPaketSearch extends DataPaket
'data_paket_id' => $this->data_paket_id, 'data_paket_id' => $this->data_paket_id,
'tag' => $this->tag, 'tag' => $this->tag,
'pegawai_id' => $this->pegawai_id, 'pegawai_id' => $this->pegawai_id,
'tanggal_kedatangan' => $this->tanggal_kedatangan,
'tanggal_diambil' => $this->tanggal_diambil, 'tanggal_diambil' => $this->tanggal_diambil,
'posisi_paket_id' => $this->posisi_paket_id, 'posisi_paket_id' => $this->posisi_paket_id,
'status_paket_id' => $this->status_paket_id, 'status_paket_id' => $this->status_paket_id,
...@@ -178,7 +178,6 @@ class DataPaketSearch extends DataPaket ...@@ -178,7 +178,6 @@ class DataPaketSearch extends DataPaket
->andFilterWhere(['like', 'diambil_oleh', $this->diambil_oleh]) ->andFilterWhere(['like', 'diambil_oleh', $this->diambil_oleh])
->andFilterWhere(['like', 'desc', $this->desc]) ->andFilterWhere(['like', 'desc', $this->desc])
->andFilterWhere(['like', 'deleted_by', $this->deleted_by]) ->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'tanggal_kedatangan',SUBSTR($this->tanggal_kedatangan,1,10)])
->andFilterWhere(['like', 'created_by', $this->created_by]) ->andFilterWhere(['like', 'created_by', $this->created_by])
->andFilterWhere(['like', 'updated_by', $this->updated_by]) ->andFilterWhere(['like', 'updated_by', $this->updated_by])
->andFilterWhere(['not', ['deleted' => 1]]); ->andFilterWhere(['not', ['deleted' => 1]]);
......
...@@ -19,7 +19,7 @@ class DataTamuSearch extends DataTamu ...@@ -19,7 +19,7 @@ class DataTamuSearch extends DataTamu
{ {
return [ return [
[['data_tamu_id', 'deleted'], 'integer'], [['data_tamu_id', 'deleted'], 'integer'],
[['nik', 'nama', 'waktu_kedatangan','kendaraan', 'desc', 'waktu_kembali', 'deleted_at', 'deleted_by', 'created_by', 'created_at', 'updated_at', 'updated_by'], 'safe'], [['nik', 'nama', 'waktu_kedatangan', 'desc', 'waktu_kembali', 'deleted_at', 'deleted_by', 'created_by', 'created_at', 'updated_at', 'updated_by'], 'safe'],
]; ];
} }
...@@ -58,6 +58,7 @@ class DataTamuSearch extends DataTamu ...@@ -58,6 +58,7 @@ class DataTamuSearch extends DataTamu
$query->andFilterWhere([ $query->andFilterWhere([
'data_tamu_id' => $this->data_tamu_id, 'data_tamu_id' => $this->data_tamu_id,
'waktu_kedatangan' => $this->waktu_kedatangan,
'waktu_kembali' => $this->waktu_kembali, 'waktu_kembali' => $this->waktu_kembali,
'deleted' => $this->deleted, 'deleted' => $this->deleted,
'deleted_at' => $this->deleted_at, 'deleted_at' => $this->deleted_at,
...@@ -68,8 +69,6 @@ class DataTamuSearch extends DataTamu ...@@ -68,8 +69,6 @@ class DataTamuSearch extends DataTamu
$query->andFilterWhere(['like', 'nik', $this->nik]) $query->andFilterWhere(['like', 'nik', $this->nik])
->andFilterWhere(['like', 'nama', $this->nama]) ->andFilterWhere(['like', 'nama', $this->nama])
->andFilterWhere(['like', 'desc', $this->desc]) ->andFilterWhere(['like', 'desc', $this->desc])
->andFilterWhere(['like', 'kendaraan', $this->kendaraan])
->andFilterWhere(['like', 'waktu_kedatangan',SUBSTR($this->waktu_kedatangan,1,10)])
->andFilterWhere(['like', 'deleted_by', $this->deleted_by]) ->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'created_by', $this->created_by]) ->andFilterWhere(['like', 'created_by', $this->created_by])
->andFilterWhere(['like', 'updated_by', $this->updated_by]) ->andFilterWhere(['like', 'updated_by', $this->updated_by])
......
...@@ -19,7 +19,7 @@ class PemakaianKendaraanSearch extends PemakaianKendaraan ...@@ -19,7 +19,7 @@ class PemakaianKendaraanSearch extends PemakaianKendaraan
{ {
return [ return [
[['pemakaian_kendaraan_id', 'jumlah_penumpang_kendaraan', 'deleted', 'kendaraan_id', 'supir_id', 'jenis_keperluan_id', 'pegawai_id'], 'integer'], [['pemakaian_kendaraan_id', 'jumlah_penumpang_kendaraan', 'deleted', 'kendaraan_id', 'supir_id', 'jenis_keperluan_id', 'pegawai_id'], 'integer'],
[['jenis_keperluan_id', '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'], [['jenis_keperluan_id', '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', 'biaya', 'konfirmasi_keuangan', 'status_request_wr2'], 'safe'],
]; ];
} }
...@@ -82,8 +82,8 @@ class PemakaianKendaraanSearch extends PemakaianKendaraan ...@@ -82,8 +82,8 @@ class PemakaianKendaraanSearch extends PemakaianKendaraan
->andFilterWhere(['like', 'updated_by', $this->updated_by]) ->andFilterWhere(['like', 'updated_by', $this->updated_by])
->andFilterWhere(['like', 'no_hp_supir', $this->no_hp_supir]) ->andFilterWhere(['like', 'no_hp_supir', $this->no_hp_supir])
->andFilterWhere(['like', 'status_request_kabiro_KSD', $this->status_request_kabiro_KSD]) ->andFilterWhere(['like', 'status_request_kabiro_KSD', $this->status_request_kabiro_KSD])
->andFilterWhere(['like', 'status_request_hrd', $this->status_request_hrd]) ->andFilterWhere(['like', 'biaya', $this->biaya])
->andFilterWhere(['like', 'status_request_keuangan', $this->status_request_keuangan]) ->andFilterWhere(['like', 'konfirmasi_keuangan', $this->konfirmasi_keuangan])
->andFilterWhere(['like', 'status_request_wr2', $this->status_request_wr2]); ->andFilterWhere(['like', 'status_request_wr2', $this->status_request_wr2]);
$query->andFilterWhere(['not', ['deleted' => 1]]); $query->andFilterWhere(['not', ['deleted' => 1]]);
......
...@@ -15,9 +15,8 @@ else if($model->pegawai_id!=null){ ...@@ -15,9 +15,8 @@ else if($model->pegawai_id!=null){
else{ else{
$this->title = "Paket tidak diketahui"; $this->title = "Paket tidak diketahui";
} }
$this->params['breadcrumbs'][] = ['label' => 'Data Paket', 'url' => ['index-by-admin']]; $this->params['breadcrumbs'][] = ['label' => 'Data Paket', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
Yii::$app->timeZone = 'UTC';
?> ?>
<div class="data-paket-view"> <div class="data-paket-view">
...@@ -25,17 +24,8 @@ Yii::$app->timeZone = 'UTC'; ...@@ -25,17 +24,8 @@ Yii::$app->timeZone = 'UTC';
<?= DetailView::widget([ <?= DetailView::widget([
'model' => $model, 'model' => $model,
'attributes' => [ 'attributes' => [
[
'attribute'=>'tag',
'value'=>function($model){
if($model->tag!=NULL){
return $model->tag;
}
return '-';
}
],
'pengirim', 'pengirim',
[ [
'attribute'=>'tanggal_kedatangan', 'attribute'=>'tanggal_kedatangan',
'label' => 'Tanggal kedatangan', 'label' => 'Tanggal kedatangan',
......
<?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{
$this->title = "Paket tidak diketahui";
}
$this->params['breadcrumbs'][] = ['label' => 'Data Paket', 'url' => ['index-by-mahasiswa']];
$this->params['breadcrumbs'][] = $this->title;
Yii::$app->timeZone = 'UTC';
?>
<div class="data-paket-view">
<h1><?= Html::encode($this->title) ?></h1>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
[
'attribute'=>'tag',
'value'=>function($model){
if($model->tag!=NULL){
return $model->tag;
}
return '-';
}
],
'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\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\DataPaket */
if($model->pegawai_id!=null){
$this->title = $model->pegawai->nama;
}
else{
$this->title = "Paket tidak diketahui";
}
$this->params['breadcrumbs'][] = ['label' => 'Data Paket', 'url' => ['index-by-pegawai']];
$this->params['breadcrumbs'][] = $this->title;
Yii::$app->timeZone = 'UTC';
?>
<div class="data-paket-view">
<h1><?= Html::encode($this->title) ?></h1>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
[
'attribute'=>'tag',
'value'=>function($model){
if($model->tag!=NULL){
return $model->tag;
}
return '-';
}
],
'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>
...@@ -3,47 +3,25 @@ ...@@ -3,47 +3,25 @@
use yii\helpers\Html; use yii\helpers\Html;
use yii\grid\GridView; use yii\grid\GridView;
use yii\helpers\Url; use yii\helpers\Url;
use yii\helpers\ArrayHelper;
use yii\jui\DatePicker;
use backend\modules\ubux\models\PosisiPaket;
use backend\modules\ubux\models\StatusPaket;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\DataPaketSearch */ /* @var $searchModel backend\modules\ubux\models\search\DataPaketSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Data Paket'; $this->title = 'Data Paket';
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
Yii::$app->timeZone = 'UTC';
?> ?>
<div class="data-paket-index"> <div class="data-paket-index">
<h1><?= Html::encode($this->title) ?></h1> <h1><?= Html::encode($this->title) ?></h1>
<?php <?php echo $this->render('_search', ['model' => $searchModel]); ?>
$toolbarItemStatusRequest =
"<a href='".Url::to(['index-by-admin'])."' class='btn btn-info '><i class='fa fa-refresh'></i> <span class='toolbar-label'>Refresh</span></a>";
?>
<?=Yii::$app->uiHelper->renderToolbar([
'pull-right' => true,
'groupTemplate' => ['groupStatusExpired'],
'groups' => [
'groupStatusExpired' => [
'template' => ['filterStatus'],
'buttons' => [
'filterStatus' => $toolbarItemStatusRequest,
]
],
],
]) ?>
<?= GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel'=>$searchModel,
'columns' => [ 'columns' => [
['class' => 'yii\grid\SerialColumn'], ['class' => 'yii\grid\SerialColumn'],
[ [
'attribute'=>'dim_nama', 'attribute'=>'dim_id',
'headerOptions' => ['style' => 'color:#3c8dbc'],
'format'=>'raw', 'format'=>'raw',
'label'=>'Nama Mahasiswa', 'label'=>'Nama Mahasiswa',
'value'=>function($model,$key,$index){ 'value'=>function($model,$key,$index){
...@@ -57,8 +35,7 @@ Yii::$app->timeZone = 'UTC'; ...@@ -57,8 +35,7 @@ Yii::$app->timeZone = 'UTC';
], ],
[ [
'attribute'=>'pegawai_nama', 'attribute'=>'pegawai_id',
'headerOptions' => ['style' => 'color:#3c8dbc'],
'format'=>'raw', 'format'=>'raw',
'label'=>'Nama Pegawai', 'label'=>'Nama Pegawai',
'value'=>function($model,$key,$index){ 'value'=>function($model,$key,$index){
...@@ -68,24 +45,17 @@ Yii::$app->timeZone = 'UTC'; ...@@ -68,24 +45,17 @@ Yii::$app->timeZone = 'UTC';
else{ else{
return '-'; return '-';
} }
}, }
], ],
'pengirim', 'pengirim',
[ [
'attribute'=>'tanggal_kedatangan', 'attribute'=>'tanggal_kedatangan',
'format'=>['Date','php: d M y H:i'], 'format'=>['Date','php: d M y H:i']
'filter'=>DatePicker::widget([
'model'=>$searchModel,
'attribute'=>'tanggal_kedatangan',
'dateFormat' => 'yyyy-MM-dd'
])
], ],
[ [
'attribute'=>'posisi_paket_id', 'attribute'=>'posisi_paket_id',
'label'=>'Posisi', 'label'=>'Posisi',
'value'=>'posisiPaket.name', 'value'=>'posisiPaket.name'
'filter'=>ArrayHelper::map(PosisiPaket::find()->where('deleted!=1')->asArray()->all(),'posisi_paket_id','name'),
], ],
[ [
'attribute'=>'status_paket_id', 'attribute'=>'status_paket_id',
...@@ -98,14 +68,14 @@ Yii::$app->timeZone = 'UTC'; ...@@ -98,14 +68,14 @@ Yii::$app->timeZone = 'UTC';
else{ else{
return '<b class="text-success">'.$model->statusPaket->status.'</b>'; return '<b class="text-success">'.$model->statusPaket->status.'</b>';
} }
}, }
'filter'=>ArrayHelper::map(StatusPaket::find()->where('deleted!=1')->asArray()->all(),'status_paket_id','status')
], ],
['class' => 'common\components\ToolsColumn', ['class' => 'common\components\ToolsColumn',
'template' => '{view}', 'template' => '{view}',
'urlCreator' => function ($action, $model, $key, $index){ 'urlCreator' => function ($action, $model, $key, $index){
if ($action === 'view') { if ($action === 'view') {
return Url::toRoute(['data-paket-view-admin', 'id' => $key]); return Url::toRoute(['data-paket-view', 'id' => $key]);
} }
} }
] ]
......
...@@ -3,57 +3,25 @@ ...@@ -3,57 +3,25 @@
use yii\helpers\Html; use yii\helpers\Html;
use yii\grid\GridView; use yii\grid\GridView;
use yii\helpers\Url; use yii\helpers\Url;
use yii\helpers\ArrayHelper;
use yii\jui\DatePicker;
use backend\modules\ubux\models\PosisiPaket;
use backend\modules\ubux\models\StatusPaket;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\DataPaketSearch */ /* @var $searchModel backend\modules\ubux\models\search\DataPaketSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Data Paket'; $this->title = 'Data Paket';
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
Yii::$app->timeZone = 'UTC';
?> ?>
<div class="data-paket-index"> <div class="data-paket-index">
<h1><?= Html::encode($this->title) ?></h1> <h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?> <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<?php
$toolbarItemStatusRequest =
"<a href='".Url::to(['index-by-mahasiswa'])."' class='btn btn-info '><i class='fa fa-refresh'></i> <span class='toolbar-label'>Refresh</span></a>";
?>
<?=Yii::$app->uiHelper->renderToolbar([
'pull-right' => true,
'groupTemplate' => ['groupStatusExpired'],
'groups' => [
'groupStatusExpired' => [
'template' => ['filterStatus'],
'buttons' => [
'filterStatus' => $toolbarItemStatusRequest,
]
],
],
]) ?>
<?= GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel'=>$searchModel,
'columns' => [ 'columns' => [
['class' => 'yii\grid\SerialColumn'], ['class' => 'yii\grid\SerialColumn'],
[ [
'headerOptions' => ['style' => 'color:#3c8dbc'], 'attribute'=>'dim_id',
'label'=>'Tag',
'value'=>function($model,$key,$index){
if($model->tag!=null){
return $model->tag;
}
return '-';
}
],
[
'headerOptions' => ['style' => 'color:#3c8dbc'],
'format'=>'raw', 'format'=>'raw',
'label'=>'Nama', 'label'=>'Nama',
'value'=>function($model,$key,$index){ 'value'=>function($model,$key,$index){
...@@ -69,40 +37,32 @@ Yii::$app->timeZone = 'UTC'; ...@@ -69,40 +37,32 @@ Yii::$app->timeZone = 'UTC';
'pengirim', 'pengirim',
[ [
'attribute'=>'tanggal_kedatangan', 'attribute'=>'tanggal_kedatangan',
'format'=>['Date','php: d M y H:i'], 'format'=>['Date','php: d M y H:i']
'filter'=>DatePicker::widget([
'model'=>$searchModel,
'attribute'=>'tanggal_kedatangan',
'dateFormat' => 'yyyy-MM-dd'
])
], ],
[ [
'attribute'=>'posisi_paket_id', 'attribute'=>'posisi_paket_id',
'label'=>'Posisi', 'label'=>'Posisi',
'value'=>'posisiPaket.name', 'value'=>'posisiPaket.name'
'filter'=>ArrayHelper::map(PosisiPaket::find()->where('deleted!=1')->asArray()->all(),'posisi_paket_id','name'), ],
], [
'attribute'=>'status_paket_id',
[ 'format'=>'raw',
'attribute'=>'status_paket_id', 'label'=>'Status Paket',
'format'=>'raw', 'value'=>function($model,$key,$index){
'label'=>'Status Paket', if($model->status_paket_id==1){
'value'=>function($model,$key,$index){ return '<b class="text-danger">'.$model->statusPaket->status.'</b>';
if($model->status_paket_id==1){ }
return '<b class="text-danger">'.$model->statusPaket->status.'</b>'; else{
}
else{
return '<b class="text-success">'.$model->statusPaket->status.'</b>'; return '<b class="text-success">'.$model->statusPaket->status.'</b>';
} }
}, }
'filter'=>ArrayHelper::map(StatusPaket::find()->where('deleted!=1')->asArray()->all(),'status_paket_id','status'),
], ],
['class' => 'common\components\ToolsColumn', ['class' => 'common\components\ToolsColumn',
'template' => '{view}', 'template' => '{view}',
'urlCreator' => function ($action, $model, $key, $index){ 'urlCreator' => function ($action, $model, $key, $index){
if ($action === 'view') { if ($action === 'view') {
return Url::toRoute(['data-paket-view-mahasiswa', 'id' => $key]); return Url::toRoute(['data-paket-view', 'id' => $key]);
} }
} }
] ]
......
...@@ -3,62 +3,29 @@ ...@@ -3,62 +3,29 @@
use yii\helpers\Html; use yii\helpers\Html;
use yii\grid\GridView; use yii\grid\GridView;
use yii\helpers\Url; use yii\helpers\Url;
use yii\helpers\ArrayHelper;
use yii\jui\DatePicker;
use backend\modules\ubux\models\PosisiPaket;
use backend\modules\ubux\models\StatusPaket;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\DataPaketSearch */ /* @var $searchModel backend\modules\ubux\models\search\DataPaketSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Data Paket'; $this->title = 'Data Paket';
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
Yii::$app->timeZone = 'UTC';
?> ?>
<div class="data-paket-index"> <div class="data-paket-index">
<h1><?= Html::encode($this->title) ?></h1> <h1><?= Html::encode($this->title) ?></h1>
<?php <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
$toolbarItemStatusRequest =
"<a href='".Url::to(['index-by-pegawai'])."' class='btn btn-info '><i class='fa fa-refresh'></i> <span class='toolbar-label'>Refresh</span></a>";
?>
<?=Yii::$app->uiHelper->renderToolbar([
'pull-right' => true,
'groupTemplate' => ['groupStatusExpired'],
'groups' => [
'groupStatusExpired' => [
'template' => ['filterStatus'],
'buttons' => [
'filterStatus' => $toolbarItemStatusRequest,
]
],
],
]) ?>
<?= GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel'=>$searchModel,
'columns' => [ 'columns' => [
['class' => 'yii\grid\SerialColumn'], ['class' => 'yii\grid\SerialColumn'],
[ [
'headerOptions' => ['style' => 'color:#3c8dbc'], 'attribute'=>'pegawai_id',
'label'=>'Tag',
'value'=>function($model,$key,$index){
if($model->tag!=null){
return $model->tag;
}
return '-';
}
],
[
'headerOptions' => ['style' => 'color:#3c8dbc'],
'format'=>'raw', 'format'=>'raw',
'label'=>'Nama', 'label'=>'Nama',
'value'=>function($model,$key,$index){ 'value'=>function($model,$key,$index){
if($model->pegawai_id!=NULL){ if($model->pegawai!=NULL){
return $model->pegawai->nama; return $model->pegawai->nama;
} }
else { else {
...@@ -70,39 +37,32 @@ Yii::$app->timeZone = 'UTC'; ...@@ -70,39 +37,32 @@ Yii::$app->timeZone = 'UTC';
'pengirim', 'pengirim',
[ [
'attribute'=>'tanggal_kedatangan', 'attribute'=>'tanggal_kedatangan',
'format'=>['Date','php: d M y H:i'], 'format'=>['Date','php: d M y H:i']
'filter'=>DatePicker::widget([
'model'=>$searchModel,
'attribute'=>'tanggal_kedatangan',
'dateFormat' => 'yyyy-MM-dd'
])
], ],
[ [
'attribute'=>'posisi_paket_id', 'attribute'=>'posisi_paket_id',
'label'=>'Posisi', 'label'=>'Posisi',
'value'=>'posisiPaket.name', 'value'=>'posisiPaket.name'
'filter'=>ArrayHelper::map(PosisiPaket::find()->where('deleted!=1')->asArray()->all(),'posisi_paket_id','name'), ],
], [
'attribute'=>'status_paket_id',
[ 'format'=>'raw',
'attribute'=>'status_paket_id', 'label'=>'Status Paket',
'format'=>'raw', 'value'=>function($model,$key,$index){
'label'=>'Status Paket', if($model->status_paket_id==1){
'value'=>function($model,$key,$index){ return '<b class="text-danger">'.$model->statusPaket->status.'</b>';
if($model->status_paket_id==1){ }
return '<b class="text-danger">'.$model->statusPaket->status.'</b>'; else{
}
else{
return '<b class="text-success">'.$model->statusPaket->status.'</b>'; return '<b class="text-success">'.$model->statusPaket->status.'</b>';
} }
}, }
'filter'=>ArrayHelper::map(StatusPaket::find()->where('deleted!=1')->asArray()->all(),'status_paket_id','status'),
], ],
['class' => 'common\components\ToolsColumn', ['class' => 'common\components\ToolsColumn',
'template' => '{view}', 'template' => '{view}',
'urlCreator' => function ($action, $model, $key, $index){ 'urlCreator' => function ($action, $model, $key, $index){
if ($action === 'view') { if ($action === 'view') {
return Url::toRoute(['data-paket-view-pegawai', 'id' => $key]); return Url::toRoute(['data-paket-view', 'id' => $key]);
} }
} }
] ]
......
...@@ -9,7 +9,6 @@ use yii\widgets\DetailView; ...@@ -9,7 +9,6 @@ use yii\widgets\DetailView;
$this->title = $model->nama; $this->title = $model->nama;
$this->params['breadcrumbs'][] = ['label' => 'Data Tamu', 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => 'Data Tamu', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
Yii::$app->timeZone = 'UTC';
?> ?>
<div class="data-tamu-view"> <div class="data-tamu-view">
...@@ -17,17 +16,7 @@ Yii::$app->timeZone = 'UTC'; ...@@ -17,17 +16,7 @@ Yii::$app->timeZone = 'UTC';
<?= DetailView::widget([ <?= DetailView::widget([
'model' => $model, 'model' => $model,
'attributes' => [ 'attributes' => [
[ 'nik',
'attribute'=>'nik',
'value'=>function($model){
if($model->nik==NULL){
return '-';
}
else{
return $model->nik;
}
}
],
'nama', 'nama',
[ [
'attribute'=>'waktu_kedatangan', 'attribute'=>'waktu_kedatangan',
......
...@@ -4,102 +4,58 @@ use yii\helpers\Html; ...@@ -4,102 +4,58 @@ use yii\helpers\Html;
use yii\grid\GridView; use yii\grid\GridView;
use common\components\ToolsColumn; use common\components\ToolsColumn;
use yii\helpers\Url; use yii\helpers\Url;
use yii\jui \DatePicker;
use yii\helpers\ArrayHelper;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\DataTamuSearch */ /* @var $searchModel backend\modules\ubux\models\search\DataTamuSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Data Tamu'; $this->title = 'Data Tamu';
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
Yii::$app->timeZone = 'UTC';
?> ?>
<div class="data-tamu-index"> <div class="data-tamu-index">
<h1><?= Html::encode($this->title) ?></h1> <h1><?= Html::encode($this->title) ?></h1>
<?php <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
$toolbarItemStatusRequest =
"<a href='".Url::to(['index'])."' class='btn btn-info '><i class='fa fa-refresh'></i> <span class='toolbar-label'>Refresh</span></a>";
?>
<?=Yii::$app->uiHelper->renderToolbar([
'pull-right' => true,
'groupTemplate' => ['groupStatusExpired'],
'groups' => [
'groupStatusExpired' => [
'template' => ['filterStatus'],
'buttons' => [
'filterStatus' => $toolbarItemStatusRequest,
]
],
],
]) ?>
<?= GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'tableOptions' => ['class' => 'table table-bordered table-responsive-xl'],
'filterModel' => $searchModel, 'filterModel' => $searchModel,
'columns' => [ 'columns' => [
['class' => 'yii\grid\SerialColumn'], ['class' => 'yii\grid\SerialColumn'],
'nik',
//'data_tamu_id',
[
'attribute'=>'nik',
'value'=>function($model,$key,$index){
if($model->nik==NULL){
return '-';
}
else{
return $model->nik;
}
}
],
'nama', 'nama',
[ [
'label'=>'Keperluan', 'attribute'=>'waktu_kedatangan',
'format' => ['date', 'php:d M Y H:i:s'],
],
[
'attribute'=>'desc', 'attribute'=>'desc',
'label'=>'Deskripsi',
'value'=>'desc', 'value'=>'desc',
], ],
[ [
'attribute'=>'waktu_kedatangan', 'attribute'=>'waktu_kembali',
'label'=>'Masuk Kampus', 'label' => 'Waktu Kembali',
'format'=>['Date','php: d M y H:i'],
'filter'=>DatePicker::widget([
'model'=>$searchModel,
'attribute'=>'waktu_kedatangan',
'dateFormat' => 'yyyy-MM-dd'
])
],
[
'label'=>'Keluar Kampus',
'format'=> 'raw', 'format'=> 'raw',
'headerOptions' => ['style' => 'color:#337ab7'], 'headerOptions' => ['style' => 'color:#337ab7'],
'value'=>function($model,$key,$index){ 'value'=>function($model,$index,$key){
if($model->waktu_kembali==NULL){ if($model->waktu_kembali==NULL){
return '-'; return '-';
} }
else{ else{
return Yii::$app->formatter->asDateTime($model->waktu_kembali, 'php:d M Y H:i'); return Yii::$app->formatter->asDateTime($model->waktu_kembali, 'php:d M Y H:i:s');
} }
} }
], ],
[ // 'deleted',
'attribute'=>'kendaraan', // 'deleted_at',
'value'=>function($model,$key,$index){ // 'deleted_by',
if($model->kendaraan==NULL){ // 'created_by',
return '-'; // 'created_at',
} // 'updated_at',
else{ // 'updated_by',
return $model->kendaraan;
}
},
'filter'=>array('Tidak Berkendara'=>'Tidak Berkendara',
'Kendaraan Roda 2'=>'Kendaraan Roda 2',
'Kendaraan Roda 4'=>'Kendaraan Roda 4'),
],
['class' => 'common\components\ToolsColumn', ['class' => 'common\components\ToolsColumn',
'template' => '{view} {delete}', 'template' => '{view} {delete}',
......
<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; ...@@ -7,7 +7,7 @@ use yii\helpers\Html;
/* @var $model backend\modules\ubux\models\Kendaraan */ /* @var $model backend\modules\ubux\models\Kendaraan */
$this->title = 'Tambah Kendaraan'; $this->title = 'Tambah Kendaraan';
$this->params['breadcrumbs'][] = ['label' => 'Manajemen Kendaraan', 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => 'Tambah Kendaraan', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="ubux-kendaraan-create"> <div class="ubux-kendaraan-create">
......
...@@ -6,8 +6,8 @@ use yii\helpers\Html; ...@@ -6,8 +6,8 @@ use yii\helpers\Html;
/* @var $model backend\modules\ubux\models\Kendaraan */ /* @var $model backend\modules\ubux\models\Kendaraan */
$this->title = 'Ubah Kendaraan : ' . ' ' . $model->kendaraan; $this->title = 'Ubah Kendaraan : ' . ' ' . $model->kendaraan;
$this->params['breadcrumbs'][] = ['label' => 'Manajemen Kendaraan', 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => 'Ubah Kendaraan', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->kendaraan, 'url' => ['view', 'id' => $model->kendaraan_id]]; $this->params['breadcrumbs'][] = ['label' => $model->kendaraan_id, 'url' => ['view', 'id' => $model->kendaraan_id]];
$this->params['breadcrumbs'][] = 'Ubah'; $this->params['breadcrumbs'][] = 'Ubah';
?> ?>
<div class="ubux-kendaraan-update"> <div class="ubux-kendaraan-update">
......
...@@ -4,13 +4,12 @@ use yii\helpers\Html; ...@@ -4,13 +4,12 @@ use yii\helpers\Html;
use yii\grid\GridView; use yii\grid\GridView;
use yii\helpers\Url; use yii\helpers\Url;
use common\components\ToolsColumn; use common\components\ToolsColumn;
use yii\base\Model;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\KendaraanSearch */ /* @var $searchModel backend\modules\ubux\models\KendaraanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Manajemen Kendaraan'; $this->title = 'Kendaraan';
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="ubux-kendaraan-index"> <div class="ubux-kendaraan-index">
...@@ -25,11 +24,6 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -25,11 +24,6 @@ $this->params['breadcrumbs'][] = $this->title;
<?= GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, 'filterModel' => $searchModel,
'rowOptions' => function($model){
if($model->status == 0)
return ['class' => 'pasif'];
else return ['class' => 'danger'];
},
'columns' => [ 'columns' => [
['class' => 'yii\grid\SerialColumn'], ['class' => 'yii\grid\SerialColumn'],
...@@ -37,13 +31,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -37,13 +31,7 @@ $this->params['breadcrumbs'][] = $this->title;
'kendaraan', 'kendaraan',
'plat_nomor', 'plat_nomor',
'daya_tampung_kendaraan', 'daya_tampung_kendaraan',
[
'attribute' => 'Ketersediaan',
'value' => function(Model $model){
if($model->status == 0) return 'Tersedia';
else return 'Terpakai';
}
],
// 'deleted', // 'deleted',
// 'deleted_at', // 'deleted_at',
// 'deleted_by', // 'deleted_by',
......
...@@ -2,13 +2,12 @@ ...@@ -2,13 +2,12 @@
use yii\helpers\Html; use yii\helpers\Html;
use yii\widgets\DetailView; use yii\widgets\DetailView;
use yii\base\Model;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Kendaraan */ /* @var $model backend\modules\ubux\models\Kendaraan */
$this->title = $model->kendaraan; $this->title = $model->kendaraan;
$this->params['breadcrumbs'][] = ['label' => 'Manajemen Kendaraan', 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => 'Ubux Kendaraan', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="ubux-kendaraan-view"> <div class="ubux-kendaraan-view">
...@@ -33,13 +32,6 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -33,13 +32,6 @@ $this->params['breadcrumbs'][] = $this->title;
'kendaraan', 'kendaraan',
'plat_nomor', 'plat_nomor',
'daya_tampung_kendaraan', 'daya_tampung_kendaraan',
[
'attribute' => 'Ketersediaan',
'value' => function(Model $model){
if($model->status == 0) return 'Tersedia';
else return 'Terpakai';
}
],
// 'deleted', // 'deleted',
// 'deleted_at', // 'deleted_at',
// 'deleted_by', // 'deleted_by',
......
...@@ -7,7 +7,6 @@ use yii\helpers\ArrayHelper; ...@@ -7,7 +7,6 @@ use yii\helpers\ArrayHelper;
use backend\modules\ubux\models\Kendaraan; use backend\modules\ubux\models\Kendaraan;
use backend\modules\ubux\models\Supir; use backend\modules\ubux\models\Supir;
use yii\bootstrap\ActiveForm; use yii\bootstrap\ActiveForm;
use backend\modules\ubux\models\PemakaianKendaraan;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\LaporanPemakaianKendaraan */ /* @var $model backend\modules\ubux\models\LaporanPemakaianKendaraan */
...@@ -45,7 +44,7 @@ use backend\modules\ubux\models\PemakaianKendaraan; ...@@ -45,7 +44,7 @@ use backend\modules\ubux\models\PemakaianKendaraan;
'autoClose' => true, 'autoClose' => true,
'format' => 'yyyy-mm-dd HH:ii:ss', 'format' => 'yyyy-mm-dd HH:ii:ss',
'todayBtn' => true, 'todayBtn' => true,
], ]
]); ?> ]); ?>
<?= $form->field($model, 'waktu_tiba')->widget(DateTimePicker::className(),[ <?= $form->field($model, 'waktu_tiba')->widget(DateTimePicker::className(),[
...@@ -75,19 +74,15 @@ use backend\modules\ubux\models\PemakaianKendaraan; ...@@ -75,19 +74,15 @@ use backend\modules\ubux\models\PemakaianKendaraan;
--> -->
<?= $form->field($model, 'kendaraan_id')->dropDownList( <?= $form->field($model, 'kendaraan_id')->dropDownList(
ArrayHelper::map(Kendaraan::find()->select([ ArrayHelper::map(Kendaraan::find()->select([
'kendaraan_id', 'kendaraan', 'plat_nomor', 'status', 'kendaraan_id', 'kendaraan', 'plat_nomor'
])->where(['deleted' => 0])->all(), 'kendaraan_id', 'KeteranganKendaraan'), ])->where(['deleted' => 0])->all(), 'kendaraan_id', 'KeteranganKendaraan'),
['prompt' => 'Pilih Kendaraan'] ['prompt' => 'Pilih Kendaraan']
) ?> ) ?>
<?= $form->field($model, 'supir_id')->dropDownList( <?= $form->field($model, 'supir_id')->dropDownList(
ArrayHelper::map(Supir::find()->select([ ArrayHelper::map(Supir::find()->select([
'ubux_supir.supir_id', 'ubux_supir.pegawai_id', 'supir_id', 'pegawai_id',
])->where('ubux_supir.deleted!=1')->joinWith([ ])->where(['deleted' => 0])->all(), 'supir_id', 'NamaSupir'),
'pegawai' => function($query){
$query->where('hrdx_pegawai.deleted!=1')->orderBy(['hrdx_pegawai.nama' => SORT_ASC]);
}
])->all(), 'supir_id', 'NamaSupir'),
['prompt' => 'Pilih Supir'] ['prompt' => 'Pilih Supir']
) ?> ) ?>
......
...@@ -17,9 +17,9 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -17,9 +17,9 @@ $this->params['breadcrumbs'][] = $this->title;
<h1><?= Html::encode($this->title) ?></h1> <h1><?= Html::encode($this->title) ?></h1>
<!-- <p> <p>
<?= Html::a('Tambah Laporan Pemakaian Kendaraan', ['add'], ['class' => 'btn btn-success']) ?> <?= Html::a('Tambah Laporan Pemakaian Kendaraan', ['add'], ['class' => 'btn btn-success']) ?>
</p> --> </p>
<?= GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
......
...@@ -18,9 +18,6 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -18,9 +18,6 @@ $this->params['breadcrumbs'][] = $this->title;
.tengah{ .tengah{
text-align: center; text-align: center;
} }
.kanan{
text-align: right;
}
table, th, td{ table, th, td{
border-collapse: collapse; border-collapse: collapse;
} }
...@@ -156,5 +153,5 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -156,5 +153,5 @@ $this->params['breadcrumbs'][] = $this->title;
<td>www.del.ac.id</td> <td>www.del.ac.id</td>
</tr> </tr>
</table> </table>
</div> </div>
...@@ -54,7 +54,7 @@ use dosamigos\datetimepicker\DateTimePicker; ...@@ -54,7 +54,7 @@ use dosamigos\datetimepicker\DateTimePicker;
] ]
]); ?> ]); ?>
<?= $form->field($model, 'file')->fileInput()->hint('File Type : PDF / DOC/ DOCX') ?> <?= $form->field($model, 'file')->fileInput() ?>
<?= $form->field($model, 'no_telepon')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'no_telepon')->textInput(['maxlength' => true]) ?>
<!-- <!--
......
...@@ -6,8 +6,8 @@ use yii\helpers\Html; ...@@ -6,8 +6,8 @@ use yii\helpers\Html;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraanMhs */ /* @var $model backend\modules\ubux\models\PemakaianKendaraanMhs */
$this->title = 'Buat Permohonan Pemakaian Mahasiswa'; $this->title = 'Buat Permintaan Kendaraan Mahasiswa';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian', 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => 'Buat Permintaan Kendaraan Mahasiswa', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="ubux-transaksi-kendaraan-mahasiswa-baru-create"> <div class="ubux-transaksi-kendaraan-mahasiswa-baru-create">
......
...@@ -5,10 +5,10 @@ use yii\helpers\Html; ...@@ -5,10 +5,10 @@ use yii\helpers\Html;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraanMhs */ /* @var $model backend\modules\ubux\models\PemakaianKendaraanMhs */
$this->title = 'Ubah Permohonan Pemakaian Mahasiswa'; $this->title = 'Ubah Permintaan Kendaraan Mahasiswa';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian', 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => 'Ubah Permitaan Kendaraan Mahasiswa', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->pemakaian_kendaraan_mhs_id, 'url' => ['view', 'id' => $model->pemakaian_kendaraan_mhs_id]]; $this->params['breadcrumbs'][] = ['label' => $model->pemakaian_kendaraan_mhs_id, 'url' => ['view', 'id' => $model->pemakaian_kendaraan_mhs_id]];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = 'Ubah';
?> ?>
<div class="ubux-transaksi-kendaraan-mahasiswa-baru-update"> <div class="ubux-transaksi-kendaraan-mahasiswa-baru-update">
......
...@@ -8,26 +8,23 @@ use yii\helpers\Url; ...@@ -8,26 +8,23 @@ use yii\helpers\Url;
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanMahasiswaSearch */ /* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanMahasiswaSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Permohonan Pemakaian Mahasiswa'; $this->title = 'Permintaan Kendaraan Mahasiswa';
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="ubux-transaksi-kendaraan-mahasiswa-baru-index"> <div class="ubux-transaksi-kendaraan-mahasiswa-baru-index">
<h1><?= Html::encode($this->title) ?></h1> <h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?> <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p><?= Html::a('Buat Permohonan Pemakaian', ['add'], ['class' => 'btn btn-success']) ?></p> <div class="col-md-9">
<!-- <div class="col-md-3"> <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> <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([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, // 'filterModel' => $searchModel,
'rowOptions' => function($model){
if($model->status_req_sekretaris_rektorat == 3) return ['class' => 'danger'];
elseif($model->status_req_sekretaris_rektorat == 2) return ['class' => 'success'];
else return [];
},
'columns' => [ 'columns' => [
['class' => 'yii\grid\SerialColumn'], ['class' => 'yii\grid\SerialColumn'],
...@@ -40,14 +37,13 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -40,14 +37,13 @@ $this->params['breadcrumbs'][] = $this->title;
'rencana_waktu_keberangkatan', 'rencana_waktu_keberangkatan',
'rencana_waktu_kembali', 'rencana_waktu_kembali',
[ [
'attribute' => 'status_req_sekretaris_rektorat',
'value' => 'statusRequestSekretarisRektorat.status'
],
[
'attribute' => 'status_request_kemahasiswaan', 'attribute' => 'status_request_kemahasiswaan',
'value' => 'statusRequestKemahasiswaan.status' 'value' => 'statusRequestKemahasiswaan.status'
], ],
[
'attribute' => 'status_req_sekretaris_rektorat',
'value' => 'statusRequestSekretarisRektorat.status',
'label' => 'Status Akhir'
],
// 'proposal', // 'proposal',
// 'no_telepon', // 'no_telepon',
// 'deleted', // 'deleted',
......
...@@ -8,24 +8,21 @@ use yii\helpers\Url; ...@@ -8,24 +8,21 @@ use yii\helpers\Url;
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanMahasiswaSearch */ /* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanMahasiswaSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Permohonan Pemakaian oleh Mahasiswa'; $this->title = 'Permintaan Kendaraan Mahasiswa';
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="ubux-transaksi-kendaraan-mahasiswa-baru-index"> <div class="ubux-transaksi-kendaraan-mahasiswa-baru-index">
<div class="col-md-9">
<h1><?= Html::encode($this->title) ?></h1> <h1><?= Html::encode($this->title) ?></h1>
<!-- <div class="col-md-3"> </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> <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([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, 'filterModel' => $searchModel,
'rowOptions' => function($model){
if($model->status_request_kemahasiswaan == 3) return ['class' => 'danger'];
elseif($model->status_request_kemahasiswaan == 2) return ['class' => 'success'];
else return [];
},
'columns' => [ 'columns' => [
['class' => 'yii\grid\SerialColumn'], ['class' => 'yii\grid\SerialColumn'],
...@@ -43,15 +40,13 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -43,15 +40,13 @@ $this->params['breadcrumbs'][] = $this->title;
'jumlah_penumpang_kendaraan', 'jumlah_penumpang_kendaraan',
// 'rencana_waktu_keberangkatan', // 'rencana_waktu_keberangkatan',
// 'rencana_waktu_kembali', // 'rencana_waktu_kembali',
[ [
'attribute' => 'status_request_kemahasiswaan', 'attribute' => 'status_req_sekretaris_rektorat',
'value' => 'statusRequestKemahasiswaan.status' 'value' => 'statusRequestSekretarisRektorat.status'
], ],
[ [
'attribute' => 'status_req_sekretaris_rektorat', 'attribute' => 'status_request_kemahasiswaan',
'value' => 'statusRequestSekretarisRektorat.status', 'value' => 'statusRequestKemahasiswaan.status'
'label' => 'Status Akhir'
], ],
// 'proposal', // 'proposal',
// 'no_telepon', // 'no_telepon',
......
...@@ -7,8 +7,8 @@ use yii\base\Model; ...@@ -7,8 +7,8 @@ use yii\base\Model;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraanMhs */ /* @var $model backend\modules\ubux\models\PemakaianKendaraanMhs */
$this->title = 'Rincian Permohonan Pemakaian Kendaraan'; $this->title = 'Rincian Permintaan Kendaraan';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian', 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => 'Permintaan Kendaraan Mahasiswa', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="ubux-transaksi-kendaraan-mahasiswa-baru-view"> <div class="ubux-transaksi-kendaraan-mahasiswa-baru-view">
...@@ -39,14 +39,14 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -39,14 +39,14 @@ $this->params['breadcrumbs'][] = $this->title;
'attributes' => [ 'attributes' => [
// 'pemakaian_kendaraan_mhs_id', // 'pemakaian_kendaraan_mhs_id',
// 'dim_id', // 'dim_id',
// [ [
// 'attribute' => 'NIM', 'attribute' => 'NIM',
// 'value' => $model->mahasiswa->nim, 'value' => $model->mahasiswa->nim,
// ], ],
// [ [
// 'attribute' => 'Nama', 'attribute' => 'Nama',
// 'value' => $model->mahasiswa->nama, 'value' => $model->mahasiswa->nama,
// ], ],
'desc', 'desc',
'tujuan', 'tujuan',
'jumlah_penumpang_kendaraan', 'jumlah_penumpang_kendaraan',
...@@ -103,15 +103,9 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -103,15 +103,9 @@ $this->params['breadcrumbs'][] = $this->title;
} }
}, },
], ],
[
'attribute' => 'proposal',
'format' => 'html',
'value' => $model->proposal,
// '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> </div>
...@@ -3,13 +3,12 @@ ...@@ -3,13 +3,12 @@
use yii\helpers\Html; use yii\helpers\Html;
use yii\widgets\DetailView; use yii\widgets\DetailView;
use yii\base\Model; use yii\base\Model;
use common\helpers\LinkHelper;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraanMhs */ /* @var $model backend\modules\ubux\models\PemakaianKendaraanMhs */
$this->title = 'Rincian Permohonan Pemakaian'; $this->title = 'Rincian Permintaan Kendaraan';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian oleh Mahasiswa', 'url' => ['index-by-kemahasiswaan']]; $this->params['breadcrumbs'][] = ['label' => 'Permintaan Kendaraan Mahasiswa', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="ubux-transaksi-kendaraan-mahasiswa-baru-view"> <div class="ubux-transaksi-kendaraan-mahasiswa-baru-view">
...@@ -36,7 +35,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -36,7 +35,7 @@ $this->params['breadcrumbs'][] = $this->title;
'attributes' => [ 'attributes' => [
// 'dim_id', // 'dim_id',
[ [
'label' => 'NIM', 'attribute' => 'NIM',
'value' => $model->mahasiswa->nim, 'value' => $model->mahasiswa->nim,
], ],
[ [
...@@ -98,14 +97,9 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -98,14 +97,9 @@ $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> </div>
...@@ -89,17 +89,29 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -89,17 +89,29 @@ $this->params['breadcrumbs'][] = $this->title;
<tr> <tr>
<td class="kolom">Kendaraan</td> <td class="kolom">Kendaraan</td>
<td>:</td> <td>:</td>
<td><?= $model->kendaraan->kendaraan ?></td> <td><?php if($model->kendaraan_id != null) {
echo $model->kendaraan->kendaraan;
} else {
echo '-';
} ?></td>
</tr> </tr>
<tr> <tr>
<td class="kolom">Supir</td> <td class="kolom">Supir</td>
<td>:</td> <td>:</td>
<td><?= $model->supir->pegawai->nama ?></td> <td><?php if($model->supir_id != null){
echo $model->supir->pegawai->nama;
}else{
echo '-';
} ?></td>
</tr> </tr>
<tr> <tr>
<td class="kolom">No Hp Supir</td> <td class="kolom">No Hp Supir</td>
<td>:</td> <td>:</td>
<td><?= $model->no_hp_supir ?></td> <td><?php if($model->supir_id != null){
echo $model->supir->no_telepon_supir;
}else{
echo '-';
} ?></td>
</tr> </tr>
</table> </table>
......
<?php
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use dosamigos\datetimepicker\DateTimePicker;
use common\helpers\ArrayHelper;
use backend\modules\ubux\models\Kendaraan;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="ubux-transaksi-kendaraan-mahasiswa-form">
<h1>Biaya</h1>
<?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, 'biaya')->textInput() ?>
<div class="form-group">
<div class="col-md-1 col-md-offset-2">
<?= Html::submitButton('Submit Biaya', ['class' => 'btn btn-primary']) ?>
</div>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php <?php
use yii\helpers\Html; use yii\helpers\Html;
use yii\bootstrap\ActiveForm; use yii\bootstrap\ActiveForm;
...@@ -9,21 +9,11 @@ use backend\modules\ubux\models\Kendaraan; ...@@ -9,21 +9,11 @@ use backend\modules\ubux\models\Kendaraan;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */ /* @var $model backend\modules\ubux\models\PemakaianKendaraan */
/* @var $form yii\widgets\ActiveForm */ /* @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"> <div class="ubux-transaksi-kendaraan-mahasiswa-form">
<h1>Request Kendaraan by Pegawai</h1> <h1>Buat Permintaan Kendaraan</h1>
<?php $form = ActiveForm::begin(['options' => [ <?php $form = ActiveForm::begin(['options' => [
'enctype' => 'multipart/form-data'], 'enctype' => 'multipart/form-data'],
......
...@@ -9,16 +9,6 @@ use backend\modules\ubux\models\Kendaraan; ...@@ -9,16 +9,6 @@ use backend\modules\ubux\models\Kendaraan;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */ /* @var $model backend\modules\ubux\models\PemakaianKendaraan */
/* @var $form yii\widgets\ActiveForm */ /* @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"> <div class="ubux-transaksi-kendaraan-mahasiswa-form">
......
...@@ -9,8 +9,6 @@ use backend\modules\ubux\models\Supir; ...@@ -9,8 +9,6 @@ use backend\modules\ubux\models\Supir;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */ /* @var $model backend\modules\ubux\models\PemakaianKendaraan */
/* @var $form yii\widgets\ActiveForm */ /* @var $form yii\widgets\ActiveForm */
$this->title = 'Persetujuan Permohonan Pemakaian';
?> ?>
<div class="ubux-transaksi-kendaraan-mahasiswa-form"> <div class="ubux-transaksi-kendaraan-mahasiswa-form">
...@@ -32,15 +30,15 @@ $this->title = 'Persetujuan Permohonan Pemakaian'; ...@@ -32,15 +30,15 @@ $this->title = 'Persetujuan Permohonan Pemakaian';
<?= $form->field($model, 'kendaraan_id')->dropDownList( <?= $form->field($model, 'kendaraan_id')->dropDownList(
ArrayHelper::map(Kendaraan::find()->select([ ArrayHelper::map(Kendaraan::find()->select([
'kendaraan_id', 'kendaraan', 'plat_nomor', 'status', 'kendaraan_id', 'kendaraan', 'plat_nomor'
])->where(['deleted' => 0, 'status' => 0])->all(), 'kendaraan_id', 'KeteranganKendaraan'), ])->where(['deleted' => 0])->all(), 'kendaraan_id', 'KeteranganKendaraan'),
['prompt' => 'Pilih Kendaraan'] ['prompt' => 'Pilih Kendaraan']
) ?> ) ?>
<?= $form->field($model, 'supir_id')->dropDownList( <?= $form->field($model, 'supir_id')->dropDownList(
ArrayHelper::map(Supir::find()->select([ ArrayHelper::map(Supir::find()->select([
'supir_id', 'pegawai_id', 'status', 'supir_id', 'pegawai_id',
])->where(['deleted' => 0, 'status' => 0])->all(), 'supir_id', 'NamaSupir'), ])->where(['deleted' => 0])->all(), 'supir_id', 'NamaSupir'),
['prompt' => 'Pilih Supir'] ['prompt' => 'Pilih Supir']
) ?> ) ?>
<!-- <!--
......
...@@ -14,7 +14,7 @@ use yii\widgets\ActiveForm; ...@@ -14,7 +14,7 @@ use yii\widgets\ActiveForm;
'action' => ['index'], 'action' => ['index'],
'method' => 'get', 'method' => 'get',
]); ?> ]); ?>
<?= $form->field($model, 'pemakaian_kendaraan_id') ?> <?= $form->field($model, 'pemakaian_kendaraan_id') ?>
<?= $form->field($model, 'desc') ?> <?= $form->field($model, 'desc') ?>
......
...@@ -5,9 +5,9 @@ use yii\helpers\Html; ...@@ -5,9 +5,9 @@ use yii\helpers\Html;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */ /* @var $model backend\modules\ubux\models\PemakaianKendaraan */
$this->title = 'Ubah Permohonan Pemakaian'; $this->title = 'Ubah Permintaan Kendaraan Mahasiswa';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian', 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => 'Permintaan Kendaraan Mahasiswa', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->kendaraan->kendaraan, 'url' => ['view', 'id' => $model->pemakaian_kendaraan_id]]; $this->params['breadcrumbs'][] = ['label' => $model->pemakaian_kendaraan_id, 'url' => ['view', 'id' => $model->pemakaian_kendaraan_id]];
$this->params['breadcrumbs'][] = 'Ubah'; $this->params['breadcrumbs'][] = 'Ubah';
?> ?>
<div class="ubux-transaksi-kendaraan-mahasiswa-update"> <div class="ubux-transaksi-kendaraan-mahasiswa-update">
......
...@@ -4,12 +4,13 @@ use yii\helpers\Html; ...@@ -4,12 +4,13 @@ use yii\helpers\Html;
use yii\grid\GridView; use yii\grid\GridView;
use yii\helpers\Url; use yii\helpers\Url;
use yii\bootstrap\Alert; use yii\bootstrap\Alert;
use yii\base\Model;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */ /* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Permohonan Pemakaian untuk Keperluan Pribadi'; $this->title = 'Data Permintaan Kendaraan Pribadi';
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="ubux-transaksi-kendaraan-mahasiswa-index"> <div class="ubux-transaksi-kendaraan-mahasiswa-index">
...@@ -19,7 +20,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -19,7 +20,7 @@ $this->params['breadcrumbs'][] = $this->title;
<?= GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, // 'filterModel' => $searchModel,
'columns' => [ 'columns' => [
['class' => 'yii\grid\SerialColumn'], ['class' => 'yii\grid\SerialColumn'],
...@@ -53,33 +54,31 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -53,33 +54,31 @@ $this->params['breadcrumbs'][] = $this->title;
'value' => 'statusRequestKabiroKSD.status', 'value' => 'statusRequestKabiroKSD.status',
], ],
[ [
'attribute' => 'status_request_hrd',
'value' => 'statusRequestHRD.status',
],
[
'attribute' => 'status_request_keuangan',
'value' => 'statusRequestKeuangan.status',
],
[
'attribute' => 'status_request_wr2', 'attribute' => 'status_request_wr2',
'value' => 'statusRequestWr2.status', 'value' => 'statusRequestWr2.status',
], ],
[
'attribute' => 'biaya',
'value' => function(Model $model){
if($model->biaya == null){
return '-';
}else{
return $model->biaya;
}
}
],
// 'status_request_kabiro_KSD', // 'status_request_kabiro_KSD',
// 'status_request_hrd', // 'status_request_hrd',
// 'status_request_keuangan',
// 'status_request_wr2', // 'status_request_wr2',
[ [
'class' => 'common\components\ToolsColumn', 'class' => 'common\components\ToolsColumn',
'template' => '{view}{acc}{rej}', 'template' => '{view}{add}',
'urlCreator' => function($action, $model, $key, $index){ 'urlCreator' => function($action, $model, $key, $index){
if($action === 'view'){ if($action === 'view'){
return Url::toRoute(['view-by-hrd', 'id' => $key]); return Url::toRoute(['view-by-hrd', 'id' => $key]);
} }
if($action === 'acc'){ if($action === 'add'){
return Url::toRoute(['accept-by-hrd', 'id' => $key]); return Url::toRoute(['add-biaya', 'id' => $key]);
}
if($action === 'rej'){
return Url::toRoute(['reject-by-hrd', 'id' => $key]);
} }
} }
], ],
......
...@@ -9,17 +9,17 @@ use yii\bootstrap\Alert; ...@@ -9,17 +9,17 @@ use yii\bootstrap\Alert;
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */ /* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Permohonan Pemakaian untuk Keperluan Pribadi'; $this->title = 'Data Permintaan Kendaraan Pribadi (Kabiro KSD)';
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="ubux-transaksi-kendaraan-mahasiswa-index"> <div class="ubux-transaksi-kendaraan-mahasiswa-index">
<h1><?= Html::encode($this->title) ?></h1> <h1>Data Permintaan Kendaraan Pribadi</h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?> <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<?= GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, // 'filterModel' => $searchModel,
'columns' => [ 'columns' => [
['class' => 'yii\grid\SerialColumn'], ['class' => 'yii\grid\SerialColumn'],
...@@ -53,20 +53,10 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -53,20 +53,10 @@ $this->params['breadcrumbs'][] = $this->title;
'value' => 'statusRequestKabiroKSD.status', 'value' => 'statusRequestKabiroKSD.status',
], ],
[ [
'attribute' => 'status_request_hrd',
'value' => 'statusRequestHRD.status',
],
[
'attribute' => 'status_request_keuangan',
'value' => 'statusRequestKeuangan.status',
],
[
'attribute' => 'status_request_wr2', 'attribute' => 'status_request_wr2',
'value' => 'statusRequestWr2.status', 'value' => 'statusRequestWr2.status',
], ],
// 'status_request_kabiro_KSD', // 'status_request_kabiro_KSD',
// 'status_request_hrd',
// 'status_request_keuangan',
// 'status_request_wr2', // 'status_request_wr2',
[ [
'class' => 'common\components\ToolsColumn', 'class' => 'common\components\ToolsColumn',
......
...@@ -4,12 +4,13 @@ use yii\helpers\Html; ...@@ -4,12 +4,13 @@ use yii\helpers\Html;
use yii\grid\GridView; use yii\grid\GridView;
use yii\helpers\Url; use yii\helpers\Url;
use yii\bootstrap\Alert; use yii\bootstrap\Alert;
use yii\base\Model;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */ /* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Permohonan Pemakaian untuk Keperluan Pribadi'; $this->title = 'Data Permintaan Kendaraan Pribadi';
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="ubux-transaksi-kendaraan-mahasiswa-index"> <div class="ubux-transaksi-kendaraan-mahasiswa-index">
...@@ -19,7 +20,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -19,7 +20,7 @@ $this->params['breadcrumbs'][] = $this->title;
<?= GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, // 'filterModel' => $searchModel,
'columns' => [ 'columns' => [
['class' => 'yii\grid\SerialColumn'], ['class' => 'yii\grid\SerialColumn'],
...@@ -53,33 +54,36 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -53,33 +54,36 @@ $this->params['breadcrumbs'][] = $this->title;
'value' => 'statusRequestKabiroKSD.status', 'value' => 'statusRequestKabiroKSD.status',
], ],
[ [
'attribute' => 'status_request_hrd', 'attribute' => 'status_request_wr2',
'value' => 'statusRequestHRD.status', 'value' => 'statusRequestWr2.status',
], ],
[ [
'attribute' => 'status_request_keuangan', 'attribute' => 'konfirmasi_keuangan',
'value' => 'statusRequestKeuangan.status', 'value' => function(Model $model){
if($model->konfirmasi_keuangan == 1){
return 'Sudah';
}else return 'Belum';
}
], ],
[ [
'attribute' => 'status_request_wr2', 'attribute' => 'Biaya',
'value' => 'statusRequestWr2.status', 'value' => function(Model $model){
if($model->biaya == null) return '-';
else return $model->biaya;
}
], ],
// 'status_request_kabiro_KSD',
// 'status_request_hrd',
// 'status_request_keuangan',
// 'status_request_wr2',
[ [
'class' => 'common\components\ToolsColumn', 'class' => 'common\components\ToolsColumn',
'template' => '{view}{acc}{rej}', 'template' => '{view}{confirm}{noconfirm}',
'urlCreator' => function($action, $model, $key, $index){ 'urlCreator' => function($action, $model, $key, $index){
if($action === 'view'){ if($action === 'view'){
return Url::toRoute(['view-by-keuangan', 'id' => $key]); return Url::toRoute(['view-by-keuangan', 'id' => $key]);
} }
if($action === 'acc'){ if($action === 'confirm'){
return Url::toRoute(['accept-by-keuangan', 'id' => $key]); return Url::toRoute(['konfirmasi-by-keuangan', 'id' => $key]);
} }
if($action === 'rej'){ if($action === 'noconfirm'){
return Url::toRoute(['reject-by-keuangan', 'id' => $key]); return Url::toRoute(['belum-konfirmasi-by-keuangan', 'id' => $key]);
} }
} }
], ],
......
...@@ -9,7 +9,7 @@ use yii\base\Model; ...@@ -9,7 +9,7 @@ use yii\base\Model;
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */ /* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Permohonan Pemakaian untuk Keperluan Dinas'; $this->title = 'Semua Permintaan Kendaraan Pegawai';
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="ubux-transaksi-kendaraan-mahasiswa-index"> <div class="ubux-transaksi-kendaraan-mahasiswa-index">
...@@ -18,30 +18,26 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -18,30 +18,26 @@ $this->params['breadcrumbs'][] = $this->title;
<?php // echo $this->render('_search', ['model' => $searchModel]); ?> <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p> <p>
<?= Html::a('Buat Permohonan Pemakaian', ['add-by-pegawai'], ['class' => 'btn btn-success']) ?> <?= Html::a('Permintaan Kendaraan Pegawai', ['add-by-pegawai'], ['class' => 'btn btn-success']) ?>
</p> </p>
<?= GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, // 'filterModel' => $searchModel,
'rowOptions' => function($model){
if($model->status_req_sekretaris_rektorat == 3) return ['class' => 'danger'];
else return ['class' => 'Pasif'];
},
'columns' => [ 'columns' => [
['class' => 'yii\grid\SerialColumn'], ['class' => 'yii\grid\SerialColumn'],
// 'pemakaian_kendaraan_id', // 'pemakaian_kendaraan_id',
// [ [
// 'attribute' => 'Nama', 'attribute' => 'Nama',
// 'value' => function(Model $model){ 'value' => function(Model $model){
// if($model->pegawai_id == null){ if($model->pegawai_id == null){
// return 'Kemahasiswaan'; return 'Kemahasiswaan';
// }else{ }else{
// return $model->pegawai->nama; return $model->pegawai->nama;
// } }
// } }
// ], ],
'desc', 'desc',
'tujuan', 'tujuan',
'jumlah_penumpang_kendaraan', 'jumlah_penumpang_kendaraan',
...@@ -69,7 +65,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -69,7 +65,7 @@ $this->params['breadcrumbs'][] = $this->title;
], ],
// 'status_req_sekretaris_rektorat', // 'status_req_sekretaris_rektorat',
[ [
'attribute' => 'status_req_sekretaris_rektorat', 'attribute' => 'Status Request',
'value' => 'statusRequestSekretarisRektorat.status', 'value' => 'statusRequestSekretarisRektorat.status',
], ],
[ [
......
...@@ -4,12 +4,13 @@ use yii\helpers\Html; ...@@ -4,12 +4,13 @@ use yii\helpers\Html;
use yii\grid\GridView; use yii\grid\GridView;
use yii\helpers\Url; use yii\helpers\Url;
use yii\bootstrap\Alert; use yii\bootstrap\Alert;
use yii\base\Model;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */ /* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Permohonan Pemakaian untuk Keperluan Pribadi'; $this->title = 'Data Permintaan Kendaraan Pribadi';
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="ubux-transaksi-kendaraan-mahasiswa-index"> <div class="ubux-transaksi-kendaraan-mahasiswa-index">
...@@ -18,7 +19,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -18,7 +19,7 @@ $this->params['breadcrumbs'][] = $this->title;
<?php // echo $this->render('_search', ['model' => $searchModel]); ?> <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<div class="col-md-9"> <div class="col-md-9">
<?= Html::a('Buat Permohonan Pemakaian', ['add-by-pribadi'], ['class' => 'btn btn-success']) ?> <?= Html::a('Permintaan Kendaraan Pribadi', ['add-by-pribadi'], ['class' => 'btn btn-success']) ?>
</div> </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> <p style="color: red;"><b>Nomor yang dapat dihubungi: Ibu Cori : 0822 7335 4777 (WA) atau 0812 6219 9995 (HP)</b></p>
...@@ -26,11 +27,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -26,11 +27,7 @@ $this->params['breadcrumbs'][] = $this->title;
<?= GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, // 'filterModel' => $searchModel,
'rowOptions' => function($model){
if($model->status_req_sekretaris_rektorat == 3) return ['class' => 'danger'];
else return ['class' => 'Pasif'];
},
'columns' => [ 'columns' => [
['class' => 'yii\grid\SerialColumn'], ['class' => 'yii\grid\SerialColumn'],
...@@ -56,8 +53,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -56,8 +53,7 @@ $this->params['breadcrumbs'][] = $this->title;
// 'value' => 'kendaraan.kendaraan', // 'value' => 'kendaraan.kendaraan',
// ], // ],
[ [
'attribute' => 'status_req_sekretaris_rektorat', 'attribute' => 'Status Request Sekretaris Rektorat',
'label' => 'Status Persetujuan Sekretaris Rektorat',
'value' => 'statusRequestSekretarisRektorat.status', 'value' => 'statusRequestSekretarisRektorat.status',
], ],
[ [
...@@ -65,21 +61,30 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -65,21 +61,30 @@ $this->params['breadcrumbs'][] = $this->title;
'value' => 'statusRequestKabiroKSD.status', 'value' => 'statusRequestKabiroKSD.status',
], ],
[ [
'attribute' => 'status_request_hrd',
'value' => 'statusRequestHRD.status',
],
[
'attribute' => 'status_request_keuangan',
'value' => 'statusRequestKeuangan.status',
],
[
'attribute' => 'status_request_wr2', 'attribute' => 'status_request_wr2',
'value' => 'statusRequestWr2.status', 'value' => 'statusRequestWr2.status',
], ],
// 'status_request_kabiro_KSD', // 'status_request_kabiro_KSD',
// 'status_request_hrd',
// 'status_request_keuangan',
// 'status_request_wr2', // 'status_request_wr2',
// 'biaya',
[
'attribute' => 'biaya',
'value' => function(Model $model){
if($model->biaya == null){
return '-';
}else{
return $model->biaya;
}
}
],
[
'attribute' => 'konfirmasi_keuangan',
'value' => function(Model $model){
if($model->konfirmasi_keuangan == 1){
return 'Sudah';
}else return 'Belum';
}
],
[ [
'class' => 'common\components\ToolsColumn', 'class' => 'common\components\ToolsColumn',
'template' => '{view}{edit}{del}', 'template' => '{view}{edit}{del}',
...@@ -87,7 +92,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -87,7 +92,7 @@ $this->params['breadcrumbs'][] = $this->title;
if($action === 'view'){ if($action === 'view'){
return Url::toRoute(['view-by-pribadi', 'id' => $key]); return Url::toRoute(['view-by-pribadi', 'id' => $key]);
} }
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($model->status_req_sekretaris_rektorat == 1 && $model->status_request_kemahasiswaan == 1 && $model->status_request_kabiro_KSD == 1 && $model->status_request_wr2 == 1){
if($action == 'edit'){ if($action == 'edit'){
return Url::toRoute(['edit-by-pribadi', 'id' => $key]); return Url::toRoute(['edit-by-pribadi', 'id' => $key]);
} }
......
...@@ -4,13 +4,15 @@ use yii\helpers\Html; ...@@ -4,13 +4,15 @@ use yii\helpers\Html;
use yii\grid\GridView; use yii\grid\GridView;
use yii\helpers\Url; use yii\helpers\Url;
use yii\base\Model; use yii\base\Model;
use yii\helpers\ArrayHelper;
use backend\modules\ubux\models\StatusRequest;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */ /* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Semua Permohonan Pemakaian'; $this->title = 'Semua Permintaan Kendaraan';
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
$datalist = ['' => 'Pilih'] + ArrayHelper::map(StatusRequest::find()->all(), 'status_request_id', 'status');
?> ?>
<div class="ubux-transaksi-kendaraan-mahasiswa-index"> <div class="ubux-transaksi-kendaraan-mahasiswa-index">
...@@ -23,12 +25,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -23,12 +25,7 @@ $this->params['breadcrumbs'][] = $this->title;
--> -->
<?= GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, 'filterModel' => $searchModel,
'rowOptions' => function($model){
if($model->status_req_sekretaris_rektorat == 3) return ['class' => 'danger'];
elseif($model->status_req_sekretaris_rektorat == 2) return ['class' => 'success'];
else return [];
},
'columns' => [ 'columns' => [
['class' => 'yii\grid\SerialColumn'], ['class' => 'yii\grid\SerialColumn'],
// 'pegawai_id', // 'pegawai_id',
...@@ -44,8 +41,8 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -44,8 +41,8 @@ $this->params['breadcrumbs'][] = $this->title;
], ],
'desc', 'desc',
'tujuan', 'tujuan',
// 'jumlah_penumpang_kendaraan', 'jumlah_penumpang_kendaraan',
// 'rencana_waktu_keberangkatan', 'rencana_waktu_keberangkatan',
// 'rencana_waktu_kembali', // 'rencana_waktu_kembali',
// 'status_request_kemahasiswaan', // 'status_request_kemahasiswaan',
// 'jenis_keperluan_id', // 'jenis_keperluan_id',
...@@ -72,21 +69,21 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -72,21 +69,21 @@ $this->params['breadcrumbs'][] = $this->title;
} }
} }
], ],
// 'status_req_sekretaris_rektorat', // 'status_req_sekretaris_rektorat',\
[ [
'attribute' => 'Status', 'headerOptions' => ['class' => 'text-center'],
'value' => 'statusRequestSekretarisRektorat.status' 'attribute' => 'statusRequestSekretarisRektorat.status',
], 'filter' => Html::activeDropDownList($searchModel, 'status_req_sekretaris_rektorat', $datalist, ['class' => 'form-control']),
[
'attribute' => 'Laporan Pemakaian',
'value' => function(Model $model){
if($model->laporan == 0) return 'Belum Ada';
else return 'Sudah Dibuat';
}
], ],
// [
// 'attribute' => 'Status',
// 'value' => 'statusRequestSekretarisRektorat.status'
// ],
[ [
'class' => 'common\components\ToolsColumn', 'class' => 'common\components\ToolsColumn',
'template' => '{view}{acc}{edit}{rej}{laporan}', 'template' => '{view}{acc}{rej}',
'urlCreator' => function($action, $model, $key, $index){ 'urlCreator' => function($action, $model, $key, $index){
if($action === 'view'){ if($action === 'view'){
return Url::toRoute(['view-by-sekretaris-rektorat', 'id' => $key]); return Url::toRoute(['view-by-sekretaris-rektorat', 'id' => $key]);
...@@ -94,15 +91,9 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -94,15 +91,9 @@ $this->params['breadcrumbs'][] = $this->title;
if($action === 'acc'){ if($action === 'acc'){
return Url::toRoute(['accept-by-sekretaris-rektorat', 'id' => $key]); return Url::toRoute(['accept-by-sekretaris-rektorat', 'id' => $key]);
} }
if($action === 'edit'){
return Url::toRoute(['edit-by-sekretaris-rektorat', 'id' => $key]);
}
if($action === 'rej'){ if($action === 'rej'){
return Url::toRoute(['reject-by-sekretaris-rektorat', 'id' => $key]); return Url::toRoute(['reject-by-sekretaris-rektorat', 'id' => $key]);
} }
if($action === 'laporan'){
return Url::toRoute(['laporan-pemakaian-kendaraan/add-laporan-pemakaian', 'id' => $key]);
}
} }
], ],
], ],
......
...@@ -9,7 +9,7 @@ use yii\bootstrap\Alert; ...@@ -9,7 +9,7 @@ use yii\bootstrap\Alert;
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */ /* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Permohonan Pemakaian untuk Keperluan Pribadi'; $this->title = 'Data Permintaan Kendaraan Pribadi';
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="ubux-transaksi-kendaraan-mahasiswa-index"> <div class="ubux-transaksi-kendaraan-mahasiswa-index">
...@@ -19,7 +19,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -19,7 +19,7 @@ $this->params['breadcrumbs'][] = $this->title;
<?= GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, // 'filterModel' => $searchModel,
'columns' => [ 'columns' => [
['class' => 'yii\grid\SerialColumn'], ['class' => 'yii\grid\SerialColumn'],
...@@ -53,20 +53,10 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -53,20 +53,10 @@ $this->params['breadcrumbs'][] = $this->title;
'value' => 'statusRequestKabiroKSD.status', 'value' => 'statusRequestKabiroKSD.status',
], ],
[ [
'attribute' => 'status_request_hrd',
'value' => 'statusRequestHRD.status',
],
[
'attribute' => 'status_request_keuangan',
'value' => 'statusRequestKeuangan.status',
],
[
'attribute' => 'status_request_wr2', 'attribute' => 'status_request_wr2',
'value' => 'statusRequestWr2.status', 'value' => 'statusRequestWr2.status',
], ],
// 'status_request_kabiro_KSD', // 'status_request_kabiro_KSD',
// 'status_request_hrd',
// 'status_request_keuangan',
// 'status_request_wr2', // 'status_request_wr2',
[ [
'class' => 'common\components\ToolsColumn', 'class' => 'common\components\ToolsColumn',
......
...@@ -7,16 +7,19 @@ use yii\base\Model; ...@@ -7,16 +7,19 @@ use yii\base\Model;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */ /* @var $model backend\modules\ubux\models\PemakaianKendaraan */
$this->title = 'Permohonan Pemakaian'; $this->title = 'Permintaan Kendaraan Pribadi';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian untuk Keperluan Pribadi', 'url' => ['index-by-hrd']]; $this->params['breadcrumbs'][] = ['label' => 'Permintaan Kendaraan Pribadi', 'url' => ['index-by-hrd']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="ubux-transaksi-kendaraan-mahasiswa-view"> <div class="ubux-transaksi-kendaraan-mahasiswa-view">
<h1><?= Html::encode($this->title) ?></h1> <h1><?= Html::encode($this->title) ?></h1>
<?php <?php
echo Html::a('Setuju', ['accept-by-hrd', 'id' => $model->pemakaian_kendaraan_id], ['class' => 'btn btn-success']); if($model->biaya == null){
echo Html::a('Tolak', ['reject-by-hrd', 'id' => $model->pemakaian_kendaraan_id], ['class' => 'btn btn-danger']); echo Html::a('Biaya', ['add-biaya', 'id' => $model->pemakaian_kendaraan_id], ['class' => 'btn btn-primary']);
}else{
echo Html::a('Ubah Biaya', ['add-biaya', 'id' => $model->pemakaian_kendaraan_id], ['class' => 'btn btn-primary']);
}
?> ?>
<?= DetailView::widget([ <?= DetailView::widget([
...@@ -66,8 +69,6 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -66,8 +69,6 @@ $this->params['breadcrumbs'][] = $this->title;
], ],
'no_hp_supir', 'no_hp_supir',
// 'status_request_kabiro_KSD', // 'status_request_kabiro_KSD',
// 'status_request_hrd',
// 'status_request_keuangan',
// 'status_request_wr2', // 'status_request_wr2',
[ [
'attribute' => 'Status Request Sekretaris Rektorat', 'attribute' => 'Status Request Sekretaris Rektorat',
...@@ -78,17 +79,19 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -78,17 +79,19 @@ $this->params['breadcrumbs'][] = $this->title;
'value' => $model->statusRequestKabiroKSD->status, 'value' => $model->statusRequestKabiroKSD->status,
], ],
[ [
'attribute' => 'status_request_hrd',
'value' => $model->statusRequestHRD->status,
],
[
'attribute' => 'status_request_keuangan',
'value' => $model->statusRequestKeuangan->status,
],
[
'attribute' => 'status_request_wr2', 'attribute' => 'status_request_wr2',
'value' => $model->statusRequestWr2->status, 'value' => $model->statusRequestWr2->status,
], ],
[
'attribute' => 'biaya',
'value' => function(Model $model){
if($model->biaya == null){
return '-';
}else{
return $model->biaya;
}
}
],
], ],
]) ?> ]) ?>
......
...@@ -7,8 +7,8 @@ use yii\base\Model; ...@@ -7,8 +7,8 @@ use yii\base\Model;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */ /* @var $model backend\modules\ubux\models\PemakaianKendaraan */
$this->title = 'Permohonan Pemakaian'; $this->title = 'Permintaan Kendaraan Pribadi';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian untuk Keperluan Pribadi', 'url' => ['index-by-kabiro-ksd']]; $this->params['breadcrumbs'][] = ['label' => 'Permintaan Kendaraan Pribadi', 'url' => ['index-by-kabiro-ksd']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="ubux-transaksi-kendaraan-mahasiswa-view"> <div class="ubux-transaksi-kendaraan-mahasiswa-view">
...@@ -64,17 +64,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -64,17 +64,7 @@ $this->params['breadcrumbs'][] = $this->title;
} }
}, },
], ],
// 'no_hp_supir', 'no_hp_supir',
[
'attribute' => 'no_hp_supir',
'value' => function(Model $model){
if($model->supir_id != null){
return $model->supir->no_telepon_supir;
}else{
return '-';
}
},
],
[ [
'attribute' => 'Status Request Sekretaris Rektorat', 'attribute' => 'Status Request Sekretaris Rektorat',
'value' => $model->statusRequestSekretarisRektorat->status, 'value' => $model->statusRequestSekretarisRektorat->status,
...@@ -84,14 +74,6 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -84,14 +74,6 @@ $this->params['breadcrumbs'][] = $this->title;
'value' => $model->statusRequestKabiroKSD->status, 'value' => $model->statusRequestKabiroKSD->status,
], ],
[ [
'attribute' => 'status_request_hrd',
'value' => $model->statusRequestHRD->status,
],
[
'attribute' => 'status_request_keuangan',
'value' => $model->statusRequestKeuangan->status,
],
[
'attribute' => 'status_request_wr2', 'attribute' => 'status_request_wr2',
'value' => $model->statusRequestWr2->status, 'value' => $model->statusRequestWr2->status,
], ],
......
...@@ -7,16 +7,19 @@ use yii\base\Model; ...@@ -7,16 +7,19 @@ use yii\base\Model;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */ /* @var $model backend\modules\ubux\models\PemakaianKendaraan */
$this->title = 'Permohonan Pemakaian'; $this->title = 'Permintaan Kendaraan Pribadi';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian untuk Keperluan Pribadi', 'url' => ['index-by-keuangan']]; $this->params['breadcrumbs'][] = ['label' => 'Permintaan Kendaraan Pribadi', 'url' => ['index-by-keuangan']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="ubux-transaksi-kendaraan-mahasiswa-view"> <div class="ubux-transaksi-kendaraan-mahasiswa-view">
<h1><?= Html::encode($this->title) ?></h1> <h1><?= Html::encode($this->title) ?></h1>
<?php <?php
echo Html::a('Setuju', ['accept-by-keuangan', 'id' => $model->pemakaian_kendaraan_id], ['class' => 'btn btn-success']); if($model->konfirmasi_keuangan == 0){
echo Html::a('Tolak', ['reject-by-keuangan', 'id' => $model->pemakaian_kendaraan_id], ['class' => 'btn btn-danger']); echo Html::a('Konfirmasi', ['konfirmasi-by-keuangan', 'id' => $model->pemakaian_kendaraan_id], ['class' => 'btn btn-success']);
}else{
echo Html::a('Belum Konfirmasi', ['belum-konfirmasi-by-keuangan', 'id' => $model->pemakaian_kendaraan_id], ['class' => 'btn btn-danger']);
}
?> ?>
<?= DetailView::widget([ <?= DetailView::widget([
...@@ -64,17 +67,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -64,17 +67,7 @@ $this->params['breadcrumbs'][] = $this->title;
} }
}, },
], ],
// 'no_hp_supir', 'no_hp_supir',
[
'attribute' => 'no_hp_supir',
'value' => function(Model $model){
if($model->supir_id != null){
return $model->supir->no_telepon_supir;
}else{
return '-';
}
},
],
[ [
'attribute' => 'Status Request Sekretaris Rektorat', 'attribute' => 'Status Request Sekretaris Rektorat',
'value' => $model->statusRequestSekretarisRektorat->status, 'value' => $model->statusRequestSekretarisRektorat->status,
...@@ -84,16 +77,23 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -84,16 +77,23 @@ $this->params['breadcrumbs'][] = $this->title;
'value' => $model->statusRequestKabiroKSD->status, 'value' => $model->statusRequestKabiroKSD->status,
], ],
[ [
'attribute' => 'status_request_hrd', 'attribute' => 'status_request_wr2',
'value' => $model->statusRequestHRD->status, 'value' => $model->statusRequestWr2->status,
], ],
[ [
'attribute' => 'status_request_keuangan', 'attribute' => 'konfimasi_keuangan',
'value' => $model->statusRequestKeuangan->status, 'value' => function(Model $model){
if($model->konfirmasi_keuangan == 0){
return 'Belum';
}else return 'Sudah';
}
], ],
[ [
'attribute' => 'status_request_wr2', 'attribute' => 'Biaya',
'value' => $model->statusRequestWr2->status, 'value' => function(Model $model){
if($model->biaya == null) return '-';
else return $model->biaya;
}
], ],
], ],
]) ?> ]) ?>
......
...@@ -7,8 +7,8 @@ use yii\base\Model; ...@@ -7,8 +7,8 @@ use yii\base\Model;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */ /* @var $model backend\modules\ubux\models\PemakaianKendaraan */
$this->title = 'Permohonan Pemakaian'; $this->title = 'Permintaan Kendaraan Pegawai';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian untuk Keperluan Pribadi', 'url' => ['index-by-pegawai']]; $this->params['breadcrumbs'][] = ['label' => 'Semua Permintaan Kendaraan Pegawai', 'url' => ['index-by-pegawai']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="ubux-transaksi-kendaraan-mahasiswa-view"> <div class="ubux-transaksi-kendaraan-mahasiswa-view">
...@@ -34,10 +34,10 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -34,10 +34,10 @@ $this->params['breadcrumbs'][] = $this->title;
'model' => $model, 'model' => $model,
'attributes' => [ 'attributes' => [
// 'pemakaian_kendaraan_id', // 'pemakaian_kendaraan_id',
// [ [
// 'attribute' => 'Nama', 'attribute' => 'Nama',
// 'value' => $model->pegawai->nama, 'value' => $model->pegawai->nama,
// ], ],
'desc', 'desc',
'tujuan', 'tujuan',
'jumlah_penumpang_kendaraan', 'jumlah_penumpang_kendaraan',
...@@ -85,7 +85,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -85,7 +85,7 @@ $this->params['breadcrumbs'][] = $this->title;
], ],
// 'no_hp_supir', // 'no_hp_supir',
[ [
'attribute' => 'no_hp_supir', 'attribute' => 'No Hp Supir',
'value' => function(Model $model){ 'value' => function(Model $model){
if($model->supir_id != null){ if($model->supir_id != null){
return $model->supir->no_telepon_supir; return $model->supir->no_telepon_supir;
......
...@@ -84,17 +84,29 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -84,17 +84,29 @@ $this->params['breadcrumbs'][] = $this->title;
<tr> <tr>
<td class="kolom">Mobil</td> <td class="kolom">Mobil</td>
<td class="kolom">:</td> <td class="kolom">:</td>
<td class="kolom"><?= $model->kendaraan->kendaraan ?></td> <td class="kolom"><?php if($model->kendaraan_id != null) {
echo $model->kendaraan->kendaraan;
} else {
echo '-';
} ?></td>
</tr> </tr>
<tr> <tr>
<td class="kolom">Supir</td> <td class="kolom">Supir</td>
<td class="kolom">:</td> <td class="kolom">:</td>
<td class="kolom"><?= $model->supir->pegawai->nama ?></td> <td class="kolom"><?php if($model->supir_id != null){
echo $model->supir->pegawai->nama;
}else{
echo '-';
}?></td>
</tr> </tr>
<tr> <tr>
<td class="kolom">No Hp Supir</td> <td class="kolom">No Hp Supir</td>
<td class="kolom">:</td> <td class="kolom">:</td>
<td class="kolom"><?= $model->no_hp_supir ?></td> <td class="kolom"><?php if($model->supir_id != null){
echo $model->supir->no_telepon_supir;
}else{
echo '-';
}?></td>
</tr> </tr>
</table> </table>
......
...@@ -7,8 +7,8 @@ use yii\base\Model; ...@@ -7,8 +7,8 @@ use yii\base\Model;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */ /* @var $model backend\modules\ubux\models\PemakaianKendaraan */
$this->title = 'Permohonan Pemakaian'; $this->title = 'Permintaan Kendaraan Pribadi';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian untuk Keperluan Pribadi', 'url' => ['index-by-pribadi']]; $this->params['breadcrumbs'][] = ['label' => 'Permintaan Kendaraan Pribadi', 'url' => ['index-by-pribadi']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="ubux-transaksi-kendaraan-mahasiswa-view"> <div class="ubux-transaksi-kendaraan-mahasiswa-view">
...@@ -16,7 +16,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -16,7 +16,7 @@ $this->params['breadcrumbs'][] = $this->title;
<p> <p>
<?php <?php
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($model->status_req_sekretaris_rektorat == 1 && $model->status_request_kemahasiswaan == 1 && $model->status_request_kabiro_KSD == 1 && $model->status_request_wr2 == 1) {
echo Html::a('Ubah', ['edit-by-pribadi', 'id' => $model->pemakaian_kendaraan_id], ['class' => 'btn btn-primary']); echo Html::a('Ubah', ['edit-by-pribadi', 'id' => $model->pemakaian_kendaraan_id], ['class' => 'btn btn-primary']);
echo Html::a('Hapus', ['del', 'id' => $model->pemakaian_kendaraan_id], [ echo Html::a('Hapus', ['del', 'id' => $model->pemakaian_kendaraan_id], [
'class' => 'btn btn-danger', 'class' => 'btn btn-danger',
...@@ -25,7 +25,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -25,7 +25,7 @@ $this->params['breadcrumbs'][] = $this->title;
'method' => 'post', 'method' => 'post',
], ],
]); ]);
}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) { }else if($model->status_req_sekretaris_rektorat == 2 && $model->status_request_kemahasiswaan == 2 && $model->status_request_kabiro_KSD == 2 && $model->status_request_wr2 == 2) {
echo Html::a('Cetak', ['pribadi-pdf', 'id' => $model->pemakaian_kendaraan_id], ['class' => 'btn btn-warning']); echo Html::a('Cetak', ['pribadi-pdf', 'id' => $model->pemakaian_kendaraan_id], ['class' => 'btn btn-warning']);
} }
?> ?>
...@@ -35,10 +35,10 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -35,10 +35,10 @@ $this->params['breadcrumbs'][] = $this->title;
'model' => $model, 'model' => $model,
'attributes' => [ 'attributes' => [
// 'pemakaian_kendaraan_id', // 'pemakaian_kendaraan_id',
// [ [
// 'attribute' => 'Nama', 'attribute' => 'Nama',
// 'value' => $model->pegawai->nama, 'value' => $model->pegawai->nama,
// ], ],
'desc', 'desc',
'tujuan', 'tujuan',
'jumlah_penumpang_kendaraan', 'jumlah_penumpang_kendaraan',
...@@ -78,7 +78,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -78,7 +78,7 @@ $this->params['breadcrumbs'][] = $this->title;
], ],
// 'no_hp_supir', // 'no_hp_supir',
[ [
'attribute' => 'no_hp_supir', 'attribute' => 'No Hp Supir',
'value' => function(Model $model){ 'value' => function(Model $model){
if($model->supir_id != null){ if($model->supir_id != null){
return $model->supir->no_telepon_supir; return $model->supir->no_telepon_supir;
...@@ -96,17 +96,19 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -96,17 +96,19 @@ $this->params['breadcrumbs'][] = $this->title;
'value' => $model->statusRequestKabiroKSD->status, 'value' => $model->statusRequestKabiroKSD->status,
], ],
[ [
'attribute' => 'status_request_hrd',
'value' => $model->statusRequestHRD->status,
],
[
'attribute' => 'status_request_keuangan',
'value' => $model->statusRequestKeuangan->status,
],
[
'attribute' => 'status_request_wr2', 'attribute' => 'status_request_wr2',
'value' => $model->statusRequestWr2->status, 'value' => $model->statusRequestWr2->status,
], ],
[
'attribute' => 'biaya',
'value' => function(Model $model){
if($model->biaya != null){
return $model->biaya;
}else{
return '-';
}
},
],
], ],
]) ?> ]) ?>
......
...@@ -78,27 +78,39 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -78,27 +78,39 @@ $this->params['breadcrumbs'][] = $this->title;
<tr> <tr>
<td class="kolom">Mobil</td> <td class="kolom">Mobil</td>
<td class="kolom">:</td> <td class="kolom">:</td>
<td class="kolom"><?= $model->kendaraan->kendaraan ?></td> <td class="kolom"><?php if($model->kendaraan_id != null) {
echo $model->kendaraan->kendaraan;
} else {
echo '-';
} ?></td>
</tr> </tr>
<tr> <tr>
<td class="kolom">Status Request Seketaris Rektorat</td> <td class="kolom">Supir</td>
<td class="kolom">:</td> <td class="kolom">:</td>
<td class="kolom"><?= $model->statusRequestSekretarisRektorat->status ?></td> <td class="kolom"><?php if($model->supir_id != null){
echo $model->supir->pegawai->nama;
}else{
echo '-';
}?></td>
</tr> </tr>
<tr> <tr>
<td class="kolom">Status Request Kabiro KSD</td> <td class="kolom">No Hp Supir</td>
<td class="kolom">:</td> <td class="kolom">:</td>
<td class="kolom"><?= $model->statusRequestKabiroKSD->status ?></td> <td class="kolom"><?php if($model->supir_id != null){
echo $model->supir->no_telepon_supir;
}else{
echo '-';
}?></td>
</tr> </tr>
<tr> <tr>
<td class="kolom">Status Request HRD</td> <td class="kolom">Status Request Seketaris Rektorat</td>
<td class="kolom">:</td> <td class="kolom">:</td>
<td class="kolom"><?= $model->statusRequestHRD->status ?></td> <td class="kolom"><?= $model->statusRequestSekretarisRektorat->status ?></td>
</tr> </tr>
<tr> <tr>
<td class="kolom">Status Request Keuangan</td> <td class="kolom">Status Request Kabiro KSD</td>
<td class="kolom">:</td> <td class="kolom">:</td>
<td class="kolom"><?= $model->statusRequestKeuangan->status ?></td> <td class="kolom"><?= $model->statusRequestKabiroKSD->status ?></td>
</tr> </tr>
<tr> <tr>
<td class="kolom">Status Request WR2</td> <td class="kolom">Status Request WR2</td>
...@@ -108,7 +120,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -108,7 +120,7 @@ $this->params['breadcrumbs'][] = $this->title;
</table> </table>
<br><br><br><br><br><br><br><br><br><br> <br><br><br><br><br><br>
<hr> <hr>
<table> <table>
<tr> <tr>
......
...@@ -7,8 +7,8 @@ use yii\base\Model; ...@@ -7,8 +7,8 @@ use yii\base\Model;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */ /* @var $model backend\modules\ubux\models\PemakaianKendaraan */
$this->title = 'Permohonan Pemakaian'; $this->title = 'Pemintaan Kendaraan';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian', 'url' => ['index-all']]; $this->params['breadcrumbs'][] = ['label' => 'Permintaan Kendaraan', 'url' => ['index-all']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="ubux-transaksi-kendaraan-mahasiswa-view"> <div class="ubux-transaksi-kendaraan-mahasiswa-view">
...@@ -16,18 +16,24 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -16,18 +16,24 @@ $this->params['breadcrumbs'][] = $this->title;
<h1><?= Html::encode($this->title) ?></h1> <h1><?= Html::encode($this->title) ?></h1>
<?php <?php
if($model->status_req_sekretaris_rektorat == 2){ echo Html::a('Terima', ['accept-by-sekretaris-rektorat', 'id' => $model->pemakaian_kendaraan_id], ['class' => 'btn btn-success']);
echo Html::a('Ubah', ['edit-by-sekretaris-rektorat', 'id' => $model->pemakaian_kendaraan_id], ['class' => 'btn btn-warning']); echo '&nbsp'; echo Html::a('Tolak', ['reject-by-sekretaris-rektorat', 'id' => $model->pemakaian_kendaraan_id], ['class' => 'btn btn-danger']);
echo Html::a('Buat Laporan Pemakaian', ['laporan-pemakaian-kendaraan/add-laporan-pemakaian', 'id' => $model->pemakaian_kendaraan_id], ['class' => 'btn btn-primary']);
}else
echo Html::a('Terima', ['accept-by-sekretaris-rektorat', 'id' => $model->pemakaian_kendaraan_id], ['class' => 'btn btn-success']); echo '&nbsp';
echo Html::a('Tolak', ['reject-by-sekretaris-rektorat', 'id' => $model->pemakaian_kendaraan_id], ['class' => 'btn btn-danger']); echo '&nbsp';
?> ?>
<?= DetailView::widget([ <?= DetailView::widget([
'model' => $model, 'model' => $model,
'attributes' => [ 'attributes' => [
// 'pemakaian_kendaraan_id', // 'pemakaian_kendaraan_id',
[
'attribute' => 'Nama',
'value' => function(Model $model){
if($model->pegawai_id == null){
return 'Kemahasiswaan';
}else{
return $model->pegawai->nama;
}
}
],
'desc', 'desc',
'tujuan', 'tujuan',
'jumlah_penumpang_kendaraan', 'jumlah_penumpang_kendaraan',
...@@ -39,10 +45,6 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -39,10 +45,6 @@ $this->params['breadcrumbs'][] = $this->title;
'attribute' => 'status_req_sekretaris_rektorat', 'attribute' => 'status_req_sekretaris_rektorat',
'value' => $model->statusRequestSekretarisRektorat->status, 'value' => $model->statusRequestSekretarisRektorat->status,
], ],
[
'attribute' => 'status_request_kemahasiswaan',
'value' => $model->statusRequestKemahasiswaan->status,
],
'no_telepon', 'no_telepon',
// 'jenis_keperluan_id', // 'jenis_keperluan_id',
[ [
......
...@@ -7,8 +7,8 @@ use yii\base\Model; ...@@ -7,8 +7,8 @@ use yii\base\Model;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */ /* @var $model backend\modules\ubux\models\PemakaianKendaraan */
$this->title = 'Permohonan Pemakaian'; $this->title = 'Permintaan Kendaraan Pribadi';
$this->params['breadcrumbs'][] = ['label' => 'Permohonan Pemakaian untuk Keperluan Pribadi', 'url' => ['index-by-wr2']]; $this->params['breadcrumbs'][] = ['label' => 'Ubux Transaksi Kendaraan Pribadi', 'url' => ['index-by-wr2']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="ubux-transaksi-kendaraan-mahasiswa-view"> <div class="ubux-transaksi-kendaraan-mahasiswa-view">
...@@ -74,14 +74,6 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -74,14 +74,6 @@ $this->params['breadcrumbs'][] = $this->title;
'value' => $model->statusRequestKabiroKSD->status, 'value' => $model->statusRequestKabiroKSD->status,
], ],
[ [
'attribute' => 'status_request_hrd',
'value' => $model->statusRequestHRD->status,
],
[
'attribute' => 'status_request_keuangan',
'value' => $model->statusRequestKeuangan->status,
],
[
'attribute' => 'status_request_wr2', 'attribute' => 'status_request_wr2',
'value' => $model->statusRequestWr2->status, 'value' => $model->statusRequestWr2->status,
], ],
......
...@@ -24,8 +24,8 @@ use yii\bootstrap\ActiveForm; ...@@ -24,8 +24,8 @@ use yii\bootstrap\ActiveForm;
], ],
]) ])
?> ?>
<?= $form->field($model, 'name')->textInput() ?> <?= $form->field($model, 'name') ?>
<div class="form-group"> <div class="form-group">
<div class="col-md-1 col-md-offset-2"> <div class="col-md-1 col-md-offset-2">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
......
...@@ -28,7 +28,7 @@ use yii\helpers\ArrayHelper; ...@@ -28,7 +28,7 @@ use yii\helpers\ArrayHelper;
<?= $form->field($model, 'pegawai_id')->dropDownList( <?= $form->field($model, 'pegawai_id')->dropDownList(
ArrayHelper::map(Pegawai::find()->select([ ArrayHelper::map(Pegawai::find()->select([
'pegawai_id', 'nama', 'pegawai_id', 'nama',
])->where('deleted != 1')->andWhere(['in', 'status_aktif_pegawai_id', [1,2]])->orderBy(['nama' => SORT_ASC])->all(), 'pegawai_id', 'nama'), ])->all(), 'pegawai_id', 'nama'),
['prompt' => 'Pilih Pegawai'] ['prompt' => 'Pilih Pegawai']
) ?> ) ?>
<!-- <!--
......
...@@ -7,7 +7,7 @@ use yii\helpers\Html; ...@@ -7,7 +7,7 @@ use yii\helpers\Html;
/* @var $model backend\modules\ubux\models\Supir */ /* @var $model backend\modules\ubux\models\Supir */
$this->title = 'Tambah Supir'; $this->title = 'Tambah Supir';
$this->params['breadcrumbs'][] = ['label' => 'Manajemen Supir', 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => 'Supir', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="supir-create"> <div class="supir-create">
......
...@@ -6,8 +6,8 @@ use yii\helpers\Html; ...@@ -6,8 +6,8 @@ use yii\helpers\Html;
/* @var $model backend\modules\ubux\models\Supir */ /* @var $model backend\modules\ubux\models\Supir */
$this->title = 'Ubah Supir : ' . ' ' . $model->pegawai->nama; $this->title = 'Ubah Supir : ' . ' ' . $model->pegawai->nama;
$this->params['breadcrumbs'][] = ['label' => 'Manajemen Supir', 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => 'Supir', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->pegawai->nama, 'url' => ['view', 'id' => $model->supir_id]]; $this->params['breadcrumbs'][] = ['label' => $model->supir_id, 'url' => ['view', 'id' => $model->supir_id]];
$this->params['breadcrumbs'][] = 'Edit'; $this->params['breadcrumbs'][] = 'Edit';
?> ?>
<div class="supir-update"> <div class="supir-update">
......
...@@ -3,13 +3,12 @@ ...@@ -3,13 +3,12 @@
use yii\helpers\Html; use yii\helpers\Html;
use yii\grid\GridView; use yii\grid\GridView;
use yii\helpers\Url; use yii\helpers\Url;
use yii\base\Model;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\SupirSearch */ /* @var $searchModel backend\modules\ubux\models\SupirSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Manajemen Supir'; $this->title = 'Supir';
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="supir-index"> <div class="supir-index">
...@@ -24,11 +23,6 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -24,11 +23,6 @@ $this->params['breadcrumbs'][] = $this->title;
<?= GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, 'filterModel' => $searchModel,
'rowOptions' => function($model){
if($model->status == 0)
return ['class' => 'pasif'];
else return ['class' => 'danger'];
},
'columns' => [ 'columns' => [
['class' => 'yii\grid\SerialColumn'], ['class' => 'yii\grid\SerialColumn'],
...@@ -39,13 +33,6 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -39,13 +33,6 @@ $this->params['breadcrumbs'][] = $this->title;
'value' => 'pegawai.nama', 'value' => 'pegawai.nama',
], ],
'no_telepon_supir', 'no_telepon_supir',
[
'attribute' => 'Ketersediaan',
'value' => function(Model $model){
if($model->status == 0) return 'Tersedia';
else return 'Terpakai';
}
],
// 'deleted', // 'deleted',
// 'deleted_at', // 'deleted_at',
// 'deleted_by', // 'deleted_by',
......
...@@ -2,13 +2,12 @@ ...@@ -2,13 +2,12 @@
use yii\helpers\Html; use yii\helpers\Html;
use yii\widgets\DetailView; use yii\widgets\DetailView;
use yii\base\Model;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Supir */ /* @var $model backend\modules\ubux\models\Supir */
$this->title = $model->pegawai->nama; $this->title = $model->pegawai->nama;
$this->params['breadcrumbs'][] = ['label' => 'Manajemen Supir', 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => 'Supir', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="supir-view"> <div class="supir-view">
...@@ -20,7 +19,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -20,7 +19,7 @@ $this->params['breadcrumbs'][] = $this->title;
<?= Html::a('Hapus', ['del', 'id' => $model->supir_id], [ <?= Html::a('Hapus', ['del', 'id' => $model->supir_id], [
'class' => 'btn btn-danger', 'class' => 'btn btn-danger',
'data' => [ 'data' => [
'confirm' => 'Apakan anda yakin ingin menghapus ?', 'confirm' => 'Are you sure you want to delete this item?',
'method' => 'post', 'method' => 'post',
], ],
]) ?> ]) ?>
...@@ -36,13 +35,6 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -36,13 +35,6 @@ $this->params['breadcrumbs'][] = $this->title;
'value' => $model->pegawai->nama, 'value' => $model->pegawai->nama,
], ],
'no_telepon_supir', 'no_telepon_supir',
[
'attribute' => 'Ketersediaan',
'value' => function(Model $model){
if($model->status == 0) return 'On';
else return 'Off';
}
],
// 'deleted', // 'deleted',
// 'deleted_at', // 'deleted_at',
// 'deleted_by', // 'deleted_by',
......
...@@ -50,7 +50,7 @@ $this->beginPage(); ...@@ -50,7 +50,7 @@ $this->beginPage();
<div class="wrapper"> <div class="wrapper">
<header class="main-header"> <header class="main-header">
<!-- Logo --> <!-- Logo -->
<a href="/ManajemenKendaraan/backend/web/index.php/ubux/pemakaian-kendaraan/index-all" class="logo"> <a href="#" class="logo">
<span class="logo-mini">CLT</span> <span class="logo-mini">CLT</span>
<span class="logo-lg">CIS LITE</span> <span class="logo-lg">CIS LITE</span>
</a> </a>
...@@ -227,35 +227,35 @@ $this->beginPage(); ...@@ -227,35 +227,35 @@ $this->beginPage();
] ]
], ],
[ [
'label' => 'HRD', 'label' => 'WR 2',
'icon' => 'fa fa-users', 'icon' => 'fa fa-users',
'childs' => [ 'childs' => [
[ [
'label' => 'Data Permintaan Kendaraan Pribadi', 'label' => 'Data Permintaan Kendaraan Pribadi',
'icon' => 'fa fa-star', 'icon' => 'fa fa-star',
'url' => '/ubux/pemakaian-kendaraan/index-by-hrd', 'url' => '/ubux/pemakaian-kendaraan/index-by-wr2',
], ],
] ]
], ],
[ [
'label' => 'Keuangan', 'label' => 'HRD Biaya',
'icon' => 'fa fa-users', 'icon' => 'fa fa-users',
'childs' => [ 'childs' => [
[ [
'label' => 'Data Permintaan Kendaraan Pribadi', 'label' => 'Data Permintaan Kendaraan Pribadi',
'icon' => 'fa fa-star', 'icon' => 'fa fa-star',
'url' => '/ubux/pemakaian-kendaraan/index-by-keuangan', 'url' => '/ubux/pemakaian-kendaraan/index-by-hrd',
], ],
] ]
], ],
[ [
'label' => 'WR 2', 'label' => 'Konfirmasi Pembayaran',
'icon' => 'fa fa-users', 'icon' => 'fa fa-users',
'childs' => [ 'childs' => [
[ [
'label' => 'Data Permintaan Kendaraan Pribadi', 'label' => 'Data Konfirmasi Pembayaran',
'icon' => 'fa fa-star', 'icon' => 'fa fa-star',
'url' => '/ubux/pemakaian-kendaraan/index-by-wr2', 'url' => '/ubux/pemakaian-kendaraan/index-by-keuangan',
], ],
] ]
], ],
......
...@@ -67,6 +67,14 @@ class ToolsColumn extends \yii\grid\ActionColumn ...@@ -67,6 +67,14 @@ class ToolsColumn extends \yii\grid\ActionColumn
])."</li>"; ])."</li>";
}; };
} }
if (!isset($this->buttons['add'])) {
$this->buttons['add'] = function ($url, $model) {
return "<li>".Html::a('<span class="glyphicon glyphicon-ok"></span> Biaya', $url, [
'title' => Yii::t('yii', 'Biaya'),
'data-pjax' => '0',
])."</li>";
};
}
if (!isset($this->buttons['rej'])) { if (!isset($this->buttons['rej'])) {
$this->buttons['rej'] = function ($url, $model) { $this->buttons['rej'] = function ($url, $model) {
return "<li>".Html::a('<span class="glyphicon glyphicon-remove"></span> Tolak', $url, [ return "<li>".Html::a('<span class="glyphicon glyphicon-remove"></span> Tolak', $url, [
...@@ -75,7 +83,22 @@ class ToolsColumn extends \yii\grid\ActionColumn ...@@ -75,7 +83,22 @@ class ToolsColumn extends \yii\grid\ActionColumn
])."</li>"; ])."</li>";
}; };
} }
if (!isset($this->buttons['confirm'])) {
$this->buttons['confirm'] = function ($url, $model) {
return "<li>".Html::a('<span class="glyphicon glyphicon-ok"></span> Konfirmasi', $url, [
'title' => Yii::t('yii', 'Konfimasi'),
'data-pjax' => '0',
])."</li>";
};
}
if (!isset($this->buttons['noconfirm'])) {
$this->buttons['noconfirm'] = function ($url, $model) {
return "<li>".Html::a('<span class="glyphicon glyphicon-remove"></span> Belum Konfirmasi', $url, [
'title' => Yii::t('yii', 'Belum Konfirmasi'),
'data-pjax' => '0',
])."</li>";
};
}
} }
......
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