Commit 7ec3f309 by Hendro Prabowo

After Integration 2

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