Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
ubux-kendaraan
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jonathan Borisman Tambun
ubux-kendaraan
Commits
e03b9a18
Commit
e03b9a18
authored
Jul 20, 2018
by
Jonathan Borisman Tambun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
After Integration 1
parent
40ab749e
Hide whitespace changes
Inline
Side-by-side
Showing
50 changed files
with
1140 additions
and
216 deletions
+1140
-216
DataPaketApiController.php
backend/modules/ubux/controllers/DataPaketApiController.php
+35
-0
DataPaketController.php
backend/modules/ubux/controllers/DataPaketController.php
+35
-7
KendaraanController.php
backend/modules/ubux/controllers/KendaraanController.php
+4
-5
LaporanPemakaianKendaraanController.php
.../ubux/controllers/LaporanPemakaianKendaraanController.php
+48
-7
PemakaianKendaraanController.php
...modules/ubux/controllers/PemakaianKendaraanController.php
+91
-6
PemakaianKendaraanMhsController.php
...ules/ubux/controllers/PemakaianKendaraanMhsController.php
+42
-46
PosisiPaketController.php
backend/modules/ubux/controllers/PosisiPaketController.php
+19
-8
SupirController.php
backend/modules/ubux/controllers/SupirController.php
+4
-5
DataTamu.php
backend/modules/ubux/models/DataTamu.php
+2
-1
Kendaraan.php
backend/modules/ubux/models/Kendaraan.php
+7
-2
LaporanPemakaianKendaraan.php
backend/modules/ubux/models/LaporanPemakaianKendaraan.php
+9
-1
PemakaianKendaraan.php
backend/modules/ubux/models/PemakaianKendaraan.php
+5
-3
PemakaianKendaraanMhs.php
backend/modules/ubux/models/PemakaianKendaraanMhs.php
+2
-1
Supir.php
backend/modules/ubux/models/Supir.php
+7
-2
DataPaketSearch.php
backend/modules/ubux/models/search/DataPaketSearch.php
+13
-12
DataTamuSearch.php
backend/modules/ubux/models/search/DataTamuSearch.php
+3
-2
DataPaketViewAdmin.php
backend/modules/ubux/views/data-paket/DataPaketViewAdmin.php
+12
-2
DataPaketViewMahasiswa.php
.../modules/ubux/views/data-paket/DataPaketViewMahasiswa.php
+110
-0
DataPaketViewPegawai.php
...nd/modules/ubux/views/data-paket/DataPaketViewPegawai.php
+110
-0
indexByAdmin.php
backend/modules/ubux/views/data-paket/indexByAdmin.php
+40
-10
indexByMahasiswa.php
backend/modules/ubux/views/data-paket/indexByMahasiswa.php
+62
-22
indexByPegawai.php
backend/modules/ubux/views/data-paket/indexByPegawai.php
+63
-23
TamuView.php
backend/modules/ubux/views/data-tamu/TamuView.php
+12
-1
index.php
backend/modules/ubux/views/data-tamu/index.php
+65
-21
index.php
backend/modules/ubux/views/kendaraan/index.php
+13
-1
view.php
backend/modules/ubux/views/kendaraan/view.php
+8
-0
_form.php
.../modules/ubux/views/laporan-pemakaian-kendaraan/_form.php
+4
-3
_formLaporanPemakaianKendaraan.php
...an-pemakaian-kendaraan/_formLaporanPemakaianKendaraan.php
+125
-0
index.php
.../modules/ubux/views/laporan-pemakaian-kendaraan/index.php
+2
-2
viewPdf.php
...odules/ubux/views/laporan-pemakaian-kendaraan/viewPdf.php
+4
-1
_form.php
backend/modules/ubux/views/pemakaian-kendaraan-mhs/_form.php
+1
-1
add.php
backend/modules/ubux/views/pemakaian-kendaraan-mhs/add.php
+1
-1
edit.php
backend/modules/ubux/views/pemakaian-kendaraan-mhs/edit.php
+1
-1
index.php
backend/modules/ubux/views/pemakaian-kendaraan-mhs/index.php
+6
-1
indexByKemahasiswaan.php
...ux/views/pemakaian-kendaraan-mhs/indexByKemahasiswaan.php
+5
-0
view.php
backend/modules/ubux/views/pemakaian-kendaraan-mhs/view.php
+2
-1
viewByKemahasiswaan.php
...bux/views/pemakaian-kendaraan-mhs/viewByKemahasiswaan.php
+1
-0
_formBySekretarisRektorat.php
...x/views/pemakaian-kendaraan/_formBySekretarisRektorat.php
+6
-4
_formEditBySekretarisRektorat.php
...ews/pemakaian-kendaraan/_formEditBySekretarisRektorat.php
+57
-0
indexByPegawai.php
...modules/ubux/views/pemakaian-kendaraan/indexByPegawai.php
+4
-0
indexByPribadi.php
...modules/ubux/views/pemakaian-kendaraan/indexByPribadi.php
+4
-0
indexBySekretarisRektorat.php
...x/views/pemakaian-kendaraan/indexBySekretarisRektorat.php
+22
-4
viewByKabiroKsd.php
...odules/ubux/views/pemakaian-kendaraan/viewByKabiroKsd.php
+11
-1
viewByKeuangan.php
...modules/ubux/views/pemakaian-kendaraan/viewByKeuangan.php
+11
-1
viewByPegawai.php
.../modules/ubux/views/pemakaian-kendaraan/viewByPegawai.php
+11
-1
viewByPribadi.php
.../modules/ubux/views/pemakaian-kendaraan/viewByPribadi.php
+11
-1
viewBySekretarisRektorat.php
...ux/views/pemakaian-kendaraan/viewBySekretarisRektorat.php
+6
-2
_form.php
backend/modules/ubux/views/posisi-paket/_form.php
+2
-2
index.php
backend/modules/ubux/views/supir/index.php
+13
-0
view.php
backend/modules/ubux/views/supir/view.php
+9
-1
No files found.
backend/modules/ubux/controllers/DataPaketApiController.php
0 → 100644
View file @
e03b9a18
<?php
namespace
backend\modules\ubux\controllers
;
use
Yii
;
use
yii\rest\ActiveController
;
use
yii\helpers\Json
;
use
yii\data\ArrayDataProvider
;
/*
*/
class
DataPaketApiController
extends
ActiveController
{
public
$modelClass
=
'backend\modules\ubux\models\DataPaket'
;
/**
*/
public
function
actionSendNotif
(
$user_id
){
\Yii
::
$app
->
response
->
format
=
\yii\web\Response
::
FORMAT_JSON
;
$subject
=
"Notifikasi Paket"
;
$body
=
"Anda Memiliki Paket di Pos Satpam"
;
if
(
\Yii
::
$app
->
messenger
->
sendNotificationToUser
((
int
)
$user_id
,
$body
)){
// if(\Yii::$app->messenger->sendEmailToUser((int)$user_id, $subject, $body)){
// return "Berhasil";
// }
// return "Email Gagal Dikirim";
echo
Json
::
encode
([
"status"
=>
"berhasil"
]);
return
;
}
else
{
echo
Json
::
encode
([
"status"
=>
"gagal"
]);
return
;
}
}
}
?>
backend/modules/ubux/controllers/DataPaketController.php
View file @
e03b9a18
...
@@ -8,7 +8,7 @@ use backend\modules\ubux\models\search\DataPaketSearch;
...
@@ -8,7 +8,7 @@ use backend\modules\ubux\models\search\DataPaketSearch;
use
yii\web\Controller
;
use
yii\web\Controller
;
use
yii\web\NotFoundHttpException
;
use
yii\web\NotFoundHttpException
;
use
yii\filters\VerbFilter
;
use
yii\filters\VerbFilter
;
use
yii\web\Response
;
/**
/**
* DataPaketController implements the CRUD actions for DataPaket model.
* DataPaketController implements the CRUD actions for DataPaket model.
* controller-id: data-paket
* controller-id: data-paket
...
@@ -19,7 +19,7 @@ class DataPaketController extends Controller
...
@@ -19,7 +19,7 @@ class DataPaketController extends Controller
public
function
behaviors
()
public
function
behaviors
()
{
{
return
[
return
[
//TODO: crud controller actions are bypassed by default, set the appropriate privilege
//
TODO: crud controller actions are bypassed by default, set the appropriate privilege
'privilege'
=>
[
'privilege'
=>
[
'class'
=>
\Yii
::
$app
->
privilegeControl
->
getAppPrivilegeControlClass
(),
'class'
=>
\Yii
::
$app
->
privilegeControl
->
getAppPrivilegeControlClass
(),
'skipActions'
=>
[],
'skipActions'
=>
[],
...
@@ -85,20 +85,47 @@ class DataPaketController extends Controller
...
@@ -85,20 +85,47 @@ class DataPaketController extends Controller
}
}
/**
/**
* action-id: data-paket-view
* action-id: data-paket-view-admin
* action-desc: Display a package data
* action-desc: Display a package data by admin
* Displays a single DataPaket model.
* Displays a single DataPaket model by admin.
* @param integer $id
* @return mixed
*/
public
function
actionDataPaketViewAdmin
(
$id
)
{
return
$this
->
render
(
'DataPaketViewAdmin'
,
[
'model'
=>
$this
->
findModel
(
$id
),
]);
}
/**
* action-id: data-paket-view-mahasiswa
* action-desc: Display a package data by mahasiswa
* Displays a single DataPaket model by mahasiswa.
* @param integer $id
* @param integer $id
* @return mixed
* @return mixed
*/
*/
public
function
actionDataPaketView
(
$id
)
public
function
actionDataPaketView
Mahasiswa
(
$id
)
{
{
return
$this
->
render
(
'DataPaketView'
,
[
return
$this
->
render
(
'DataPaketView
Mahasiswa
'
,
[
'model'
=>
$this
->
findModel
(
$id
),
'model'
=>
$this
->
findModel
(
$id
),
]);
]);
}
}
/**
/**
* action-id: data-paket-view-pegawai
* action-desc: Display a package data by pegawai
* Displays a single DataPaket model by pegawai.
* @param integer $id
* @return mixed
*/
public
function
actionDataPaketViewPegawai
(
$id
)
{
return
$this
->
render
(
'DataPaketViewPegawai'
,
[
'model'
=>
$this
->
findModel
(
$id
),
]);
}
/**
* action-id: data-paket-add
* action-id: data-paket-add
* action-desc: Menambahkan data paket yang datang
* action-desc: Menambahkan data paket yang datang
* Creates a new DataPaket model.
* Creates a new DataPaket model.
...
@@ -169,4 +196,5 @@ class DataPaketController extends Controller
...
@@ -169,4 +196,5 @@ class DataPaketController extends Controller
throw
new
NotFoundHttpException
(
'The requested page does not exist.'
);
throw
new
NotFoundHttpException
(
'The requested page does not exist.'
);
}
}
}
}
}
}
backend/modules/ubux/controllers/KendaraanController.php
View file @
e03b9a18
...
@@ -21,11 +21,10 @@ class KendaraanController extends Controller
...
@@ -21,11 +21,10 @@ class KendaraanController extends Controller
{
{
return
[
return
[
// //TODO: crud controller actions are bypassed by default, set the appropriate privilege
// //TODO: crud controller actions are bypassed by default, set the appropriate privilege
'privilege'
=>
[
'privilege'
=>
[
'class'
=>
\Yii
::
$app
->
privilegeControl
->
getAppPrivilegeControlClass
(),
'class'
=>
\Yii
::
$app
->
privilegeControl
->
getAppPrivilegeControlClass
(),
'skipActions'
=>
[],
'skipActions'
=>
[],
],
],
'verbs'
=>
[
'verbs'
=>
[
'class'
=>
VerbFilter
::
className
(),
'class'
=>
VerbFilter
::
className
(),
'actions'
=>
[
'actions'
=>
[
...
...
backend/modules/ubux/controllers/LaporanPemakaianKendaraanController.php
View file @
e03b9a18
...
@@ -2,6 +2,9 @@
...
@@ -2,6 +2,9 @@
namespace
backend\modules\ubux\controllers
;
namespace
backend\modules\ubux\controllers
;
use
backend\modules\ubux\models\Kendaraan
;
use
backend\modules\ubux\models\PemakaianKendaraan
;
use
backend\modules\ubux\models\Supir
;
use
Yii
;
use
Yii
;
use
backend\modules\ubux\models\LaporanPemakaianKendaraan
;
use
backend\modules\ubux\models\LaporanPemakaianKendaraan
;
use
backend\modules\ubux\models\search\LaporanPemakaianKendaraanSearch
;
use
backend\modules\ubux\models\search\LaporanPemakaianKendaraanSearch
;
...
@@ -9,6 +12,7 @@ use yii\web\Controller;
...
@@ -9,6 +12,7 @@ use yii\web\Controller;
use
yii\web\NotFoundHttpException
;
use
yii\web\NotFoundHttpException
;
use
yii\filters\VerbFilter
;
use
yii\filters\VerbFilter
;
use
mPDF
;
use
mPDF
;
use
yii\helpers\Url
;
/**
/**
* LaporanPemakaianKendaraanController implements the CRUD actions for LaporanPemakaianKendaraan model.
* LaporanPemakaianKendaraanController implements the CRUD actions for LaporanPemakaianKendaraan model.
...
@@ -21,11 +25,10 @@ class LaporanPemakaianKendaraanController extends Controller
...
@@ -21,11 +25,10 @@ class LaporanPemakaianKendaraanController extends Controller
{
{
return
[
return
[
//TODO: crud controller actions are bypassed by default, set the appropriate privilege
//TODO: crud controller actions are bypassed by default, set the appropriate privilege
'privilege'
=>
[
'privilege'
=>
[
'class'
=>
\Yii
::
$app
->
privilegeControl
->
getAppPrivilegeControlClass
(),
'class'
=>
\Yii
::
$app
->
privilegeControl
->
getAppPrivilegeControlClass
(),
'skipActions'
=>
[],
'skipActions'
=>
[],
],
],
'verbs'
=>
[
'verbs'
=>
[
'class'
=>
VerbFilter
::
className
(),
'class'
=>
VerbFilter
::
className
(),
'actions'
=>
[
'actions'
=>
[
...
@@ -77,8 +80,10 @@ class LaporanPemakaianKendaraanController extends Controller
...
@@ -77,8 +80,10 @@ class LaporanPemakaianKendaraanController extends Controller
{
{
$model
=
new
LaporanPemakaianKendaraan
();
$model
=
new
LaporanPemakaianKendaraan
();
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
()))
{
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
laporan_pemakaian_kendaraan_id
]);
if
(
$model
->
save
()){
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
laporan_pemakaian_kendaraan_id
]);
}
}
else
{
}
else
{
return
$this
->
render
(
'add'
,
[
return
$this
->
render
(
'add'
,
[
'model'
=>
$model
,
'model'
=>
$model
,
...
@@ -86,6 +91,42 @@ class LaporanPemakaianKendaraanController extends Controller
...
@@ -86,6 +91,42 @@ class LaporanPemakaianKendaraanController extends Controller
}
}
}
}
public
function
actionAddLaporanPemakaian
(
$id
)
{
$model
=
new
LaporanPemakaianKendaraan
();
$pemakaian_kendaraan
=
PemakaianKendaraan
::
findOne
(
$id
);
if
(
$pemakaian_kendaraan
->
laporan
==
1
){
Yii
::
$app
->
messenger
->
addErrorFlash
(
"Laporan Sudah Dibuat"
);
return
$this
->
redirect
(
Url
::
toRoute
([
'pemakaian-kendaraan/index'
,
'id'
=>
$id
]));
}
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
()))
{
if
(
$pemakaian_kendaraan
->
supir_id
!=
null
){
$supir
=
Supir
::
findOne
(
$pemakaian_kendaraan
->
supir_id
);
$supir
->
status
=
0
;
$supir
->
save
();
}
if
(
$pemakaian_kendaraan
->
kendaraan_id
!=
null
){
$kendaraan
=
Kendaraan
::
findOne
(
$pemakaian_kendaraan
->
kendaraan_id
);
$kendaraan
->
status
=
0
;
$kendaraan
->
save
();
}
$pemakaian_kendaraan
->
laporan
=
1
;
$pemakaian_kendaraan
->
save
();
if
(
$model
->
save
()){
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
laporan_pemakaian_kendaraan_id
]);
}
}
else
{
return
$this
->
render
(
'_formLaporanPemakaianKendaraan'
,
[
'model'
=>
$model
,
]);
}
}
/**
/**
* action-id: edit
* action-id: edit
* action-desc: Memperbaharui data laporan
* action-desc: Memperbaharui data laporan
...
...
backend/modules/ubux/controllers/PemakaianKendaraanController.php
View file @
e03b9a18
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
namespace
backend\modules\ubux\controllers
;
namespace
backend\modules\ubux\controllers
;
use
backend\modules\ubux\models\Kendaraan
;
use
backend\modules\ubux\models\Supir
;
use
Yii
;
use
Yii
;
use
backend\modules\ubux\models\PemakaianKendaraan
;
use
backend\modules\ubux\models\PemakaianKendaraan
;
use
backend\modules\ubux\models\search\PemakaianKendaraanSearch
;
use
backend\modules\ubux\models\search\PemakaianKendaraanSearch
;
...
@@ -29,11 +31,10 @@ class PemakaianKendaraanController extends Controller
...
@@ -29,11 +31,10 @@ class PemakaianKendaraanController extends Controller
{
{
return
[
return
[
//TODO: crud controller actions are bypassed by default, set the appropriate privilege
//TODO: crud controller actions are bypassed by default, set the appropriate privilege
'privilege'
=>
[
'privilege'
=>
[
'class'
=>
\Yii
::
$app
->
privilegeControl
->
getAppPrivilegeControlClass
(),
'class'
=>
\Yii
::
$app
->
privilegeControl
->
getAppPrivilegeControlClass
(),
'skipActions'
=>
[],
'skipActions'
=>
[],
],
],
'verbs'
=>
[
'verbs'
=>
[
'class'
=>
VerbFilter
::
className
(),
'class'
=>
VerbFilter
::
className
(),
'actions'
=>
[
'actions'
=>
[
...
@@ -289,7 +290,19 @@ class PemakaianKendaraanController extends Controller
...
@@ -289,7 +290,19 @@ class PemakaianKendaraanController extends Controller
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
()))
{
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
()))
{
$model
->
status_request_kemahasiswaan
=
2
;
$model
->
status_request_kemahasiswaan
=
2
;
$model
->
status_req_sekretaris_rektorat
=
2
;
$model
->
status_req_sekretaris_rektorat
=
2
;
$model
->
no_hp_supir
=
$model
->
supir
->
no_telepon_supir
;
// $model->no_hp_supir = $model->supir->no_telepon_supir;
if
(
$model
->
supir
!=
null
){
$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
){
if
(
$model
->
jenis_keperluan_id
==
1
){
$mahasiswa
=
PemakaianKendaraanMhs
::
findOne
([
'pemakaian_kendaraan_mhs_id'
=>
$model
->
pemakaian_kendaraan_mhs_id
]);
$mahasiswa
=
PemakaianKendaraanMhs
::
findOne
([
'pemakaian_kendaraan_mhs_id'
=>
$model
->
pemakaian_kendaraan_mhs_id
]);
...
@@ -315,6 +328,62 @@ class PemakaianKendaraanController extends Controller
...
@@ -315,6 +328,62 @@ class PemakaianKendaraanController extends Controller
}
}
}
}
public
function
actionEditBySekretarisRektorat
(
$id
){
$model
=
$this
->
findModel
(
$id
);
$supirLama
=
Supir
::
findOne
(
$model
->
supir_id
);
$kendaraanLama
=
Kendaraan
::
findOne
(
$model
->
kendaraan_id
);
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
()))
{
$model
->
status_request_kemahasiswaan
=
2
;
$model
->
status_req_sekretaris_rektorat
=
2
;
// $model->no_hp_supir = $model->supir->no_telepon_supir;
if
(
$model
->
supir_id
!=
null
){
if
(
$supirLama
!=
null
){
$supirLama
->
status
=
0
;
$supirLama
->
save
();
}
$supir
=
Supir
::
findOne
(
$model
->
supir_id
);
$supir
->
status
=
1
;
$supir
->
save
();
}
if
(
$model
->
kendaraan_id
!=
null
){
if
(
$kendaraanLama
!=
null
){
$kendaraanLama
->
status
=
0
;
$kendaraanLama
->
save
();
}
$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
]);
$mahasiswa
->
status_req_sekretaris_rektorat
=
2
;
$mahasiswa
->
kendaraan_id
=
$model
->
kendaraan_id
;
$mahasiswa
->
supir_id
=
$model
->
supir_id
;
$mahasiswa
->
no_hp_supir
=
$model
->
no_hp_supir
;
$mahasiswa
->
save
();
}
if
(
$model
->
save
()){
$searchModel
=
new
PemakaianKendaraanSearch
();
$dataProvider
=
$searchModel
->
search
(
Yii
::
$app
->
request
->
queryParams
);
return
$this
->
render
(
'viewBySekretarisRektorat'
,
[
'model'
=>
$this
->
findModel
(
$id
),
]);
}
}
else
{
return
$this
->
render
(
'_formEditBySekretarisRektorat'
,
[
'model'
=>
$model
,
]);
}
}
/*
/*
* action-id: reject-by-sekretaris-rektorat
* action-id: reject-by-sekretaris-rektorat
* action-desc: Menolak request oleh sekretaris rektorat
* action-desc: Menolak request oleh sekretaris rektorat
...
@@ -324,6 +393,22 @@ class PemakaianKendaraanController extends Controller
...
@@ -324,6 +393,22 @@ class PemakaianKendaraanController extends Controller
$model
->
status_request_kemahasiswaan
=
3
;
$model
->
status_request_kemahasiswaan
=
3
;
$model
->
status_req_sekretaris_rektorat
=
3
;
$model
->
status_req_sekretaris_rektorat
=
3
;
if
(
$model
->
supir_id
!=
null
){
$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
){
if
(
$model
->
jenis_keperluan_id
==
1
){
$mahasiswa
=
PemakaianKendaraanMhs
::
findOne
([
'pemakaian_kendaraan_mhs_id'
=>
$model
->
pemakaian_kendaraan_mhs_id
]);
$mahasiswa
=
PemakaianKendaraanMhs
::
findOne
([
'pemakaian_kendaraan_mhs_id'
=>
$model
->
pemakaian_kendaraan_mhs_id
]);
$mahasiswa
->
status_req_sekretaris_rektorat
=
3
;
$mahasiswa
->
status_req_sekretaris_rektorat
=
3
;
...
...
backend/modules/ubux/controllers/PemakaianKendaraanMhsController.php
View file @
e03b9a18
...
@@ -28,11 +28,10 @@ class PemakaianKendaraanMhsController extends Controller
...
@@ -28,11 +28,10 @@ class PemakaianKendaraanMhsController extends Controller
{
{
return
[
return
[
//TODO: crud controller actions are bypassed by default, set the appropriate privilege
//TODO: crud controller actions are bypassed by default, set the appropriate privilege
'privilege'
=>
[
'privilege'
=>
[
'class'
=>
\Yii
::
$app
->
privilegeControl
->
getAppPrivilegeControlClass
(),
'class'
=>
\Yii
::
$app
->
privilegeControl
->
getAppPrivilegeControlClass
(),
'skipActions'
=>
[],
'skipActions'
=>
[],
],
],
'verbs'
=>
[
'verbs'
=>
[
'class'
=>
VerbFilter
::
className
(),
'class'
=>
VerbFilter
::
className
(),
'actions'
=>
[
'actions'
=>
[
...
@@ -111,50 +110,50 @@ class PemakaianKendaraanMhsController extends Controller
...
@@ -111,50 +110,50 @@ class PemakaianKendaraanMhsController extends Controller
$dimModel
=
Dim
::
findOne
(
$this
->
dim_id
);
$dimModel
=
Dim
::
findOne
(
$this
->
dim_id
);
$model
->
dim_id
=
$dimModel
->
dim_id
;
$model
->
dim_id
=
$dimModel
->
dim_id
;
//
$model->save();
$model
->
save
();
//
get the instance of the uploaded file
//
get the instance of the uploaded file
//
$id = $model->pemakaian_kendaraan_mhs_id;
$id
=
$model
->
pemakaian_kendaraan_mhs_id
;
$proposalName
=
$model
->
mahasiswa
->
nama
;
$proposalName
=
$model
->
mahasiswa
->
nama
;
// $model->file = UploadedFile::getInstance($model, 'file');
$model
->
file
=
UploadedFile
::
getInstance
(
$model
,
'file'
);
// $model->file->saveAs('proposal/'.$id.'. Proposal '.$proposalName.'.'.$model->file->extension);
$model
->
file
->
saveAs
(
'proposal/'
.
$id
.
' Proposal '
.
$proposalName
.
'.'
.
$model
->
file
->
extension
);
// save the path in the db column
// save the path in the db column
//$model->proposal = 'proposal/'.$id.'. Proposal '.$proposalName.'.'.$model->file->extension;
$model
->
proposal
=
'proposal/'
.
$id
.
'. Proposal '
.
$proposalName
.
'.'
.
$model
->
file
->
extension
;
if
(
isset
(
$_FILES
[
'PemakaianKendaraanMhs'
][
'name'
])){
// if(isset($_FILES['PemakaianKendaraanMhs']['name'])){
//
$result
=
\Yii
::
$app
->
fileManager
->
saveUploadedFiles
();
// $result = \Yii::$app->fileManager->saveUploadedFiles();
if
(
isset
(
$result
)){
// if(isset($result)){
if
(
$result
->
status
==
'success'
){
// if($result->status == 'success'){
$model
->
kode_proposal
=
$result
->
fileinfo
[
0
]
->
id
;
// $model->kode_proposal = $result->fileinfo[0]->id;
$model
->
proposal
=
$result
->
fileinfo
[
0
]
->
name
;
// $model->proposal = $result->fileinfo[0]->name;
}
// }
else
{
// else{
\Yii
::
$app
->
messenger
->
addErrorFlash
(
'Error while uploading file !'
);
// \Yii::$app->messenger->addErrorFlash('Error while uploading file !');
return
$this
->
redirect
(
\Yii
::
$app
->
request
->
referrer
);
// return $this->redirect(\Yii::$app->request->referrer);
}
// }
}
//else{
// }else{
// \Yii::$app->messenger->addErrorFlash('Error while uploading file !');
// \Yii::$app->messenger->addErrorFlash('Error while uploading file !');
// return $this->redirect(\Yii::$app->request->referrer);
// return $this->redirect(\Yii::$app->request->referrer);
// }
// }
}
// }
$model
->
save
();
// ==================== Variabel Hard Code ==========================//
// ==================== Variabel Hard Code ==========================//
$userId
=
$model
->
dim_id
;
//
$userId = $model->dim_id;
$subject
=
"Permohonan Pemakaian Kendaraan"
;
//
$subject = "Permohonan Pemakaian Kendaraan";
$body
=
"Permohonan Pemakaian Kendaraan"
;
//
$body = "Permohonan Pemakaian Kendaraan";
// ==================== Email ==========================//
// ==================== Email ==========================//
Yii
::
$app
->
messenger
->
sendEmailToUser
(
$userId
,
$subject
,
$body
);
//
Yii::$app->messenger->sendEmailToUser($userId, $subject, $body);
Yii
::
$app
->
messenger
->
addSuccessFlash
(
"Permohonan Pemakaian Kendaraan Berhasil Dibuat"
);
//
Yii::$app->messenger->addSuccessFlash("Permohonan Pemakaian Kendaraan Berhasil Dibuat");
Yii
::
$app
->
messenger
->
addSuccessFlash
(
"Email Terkirim"
);
//
Yii::$app->messenger->addSuccessFlash("Email Terkirim");
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
pemakaian_kendaraan_mhs_id
]);
if
(
$model
->
save
()){
Yii
::
$app
->
messenger
->
addSuccessFlash
(
"Permohonan Pemakaian Kendaraan Berhasil Dibuat"
);
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
pemakaian_kendaraan_mhs_id
]);
}
}
else
{
}
else
{
return
$this
->
render
(
'add'
,
[
return
$this
->
render
(
'add'
,
[
'model'
=>
$model
,
'model'
=>
$model
,
...
@@ -319,11 +318,8 @@ class PemakaianKendaraanMhsController extends Controller
...
@@ -319,11 +318,8 @@ class PemakaianKendaraanMhsController extends Controller
$model
->
status_request_kemahasiswaan
=
2
;
$model
->
status_request_kemahasiswaan
=
2
;
$model
->
save
();
$model
->
save
();
$searchModel
=
new
PemakaianKendaraanMhsSearch
();
$dataProvider
=
$searchModel
->
search
(
Yii
::
$app
->
request
->
queryParams
);
Yii
::
$app
->
messenger
->
addSuccessFlash
(
"Berhasil"
);
Yii
::
$app
->
messenger
->
addSuccessFlash
(
"Berhasil"
);
return
$this
->
redirect
(
'index
ByK
emahasiswaan'
);
return
$this
->
redirect
(
'index
-by-k
emahasiswaan'
);
}
}
}
else
{
}
else
{
$searchModel
=
new
PemakaianKendaraanMhsSearch
();
$searchModel
=
new
PemakaianKendaraanMhsSearch
();
...
@@ -350,7 +346,7 @@ class PemakaianKendaraanMhsController extends Controller
...
@@ -350,7 +346,7 @@ class PemakaianKendaraanMhsController extends Controller
$searchModel
=
new
PemakaianKendaraanMhsSearch
();
$searchModel
=
new
PemakaianKendaraanMhsSearch
();
$dataProvider
=
$searchModel
->
search
(
Yii
::
$app
->
request
->
queryParams
);
$dataProvider
=
$searchModel
->
search
(
Yii
::
$app
->
request
->
queryParams
);
return
$this
->
redirect
(
'index
ByK
emahasiswaan'
);
return
$this
->
redirect
(
'index
-by-k
emahasiswaan'
);
}
}
}
}
backend/modules/ubux/controllers/PosisiPaketController.php
View file @
e03b9a18
...
@@ -20,10 +20,11 @@ class PosisiPaketController extends Controller
...
@@ -20,10 +20,11 @@ class PosisiPaketController extends Controller
{
{
return
[
return
[
//TODO: crud controller actions are bypassed by default, set the appropriate privilege
//TODO: crud controller actions are bypassed by default, set the appropriate privilege
'privilege'
=>
[
'privilege'
=>
[
'class'
=>
\Yii
::
$app
->
privilegeControl
->
getAppPrivilegeControlClass
(),
'class'
=>
\Yii
::
$app
->
privilegeControl
->
getAppPrivilegeControlClass
(),
'skipActions'
=>
[],
'skipActions'
=>
[],
],
],
'verbs'
=>
[
'verbs'
=>
[
'class'
=>
VerbFilter
::
className
(),
'class'
=>
VerbFilter
::
className
(),
'actions'
=>
[
'actions'
=>
[
...
@@ -50,6 +51,7 @@ class PosisiPaketController extends Controller
...
@@ -50,6 +51,7 @@ class PosisiPaketController extends Controller
]);
]);
}
}
/**
/**
* action-id: posisi-paket-add
* action-id: posisi-paket-add
* action-desc: Menambahkan data posisi paket
* action-desc: Menambahkan data posisi paket
...
@@ -60,9 +62,14 @@ class PosisiPaketController extends Controller
...
@@ -60,9 +62,14 @@ class PosisiPaketController extends Controller
public
function
actionPosisiPaketAdd
()
public
function
actionPosisiPaketAdd
()
{
{
$model
=
new
PosisiPaket
();
$model
=
new
PosisiPaket
();
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
\Yii
::
$app
->
messenger
->
addSuccessFlash
(
"Posisi Paket Berhasil ditambahkan"
);
return
$this
->
redirect
([
'index'
]);
}
else
{
return
$this
->
render
(
'PosisiPaketAdd'
,
[
return
$this
->
render
(
'PosisiPaketAdd'
,
[
'model'
=>
$model
,
'model'
=>
$model
,
]);
]);
}
}
}
/**
/**
...
@@ -75,11 +82,15 @@ class PosisiPaketController extends Controller
...
@@ -75,11 +82,15 @@ class PosisiPaketController extends Controller
*/
*/
public
function
actionPosisiPaketEdit
(
$id
)
public
function
actionPosisiPaketEdit
(
$id
)
{
{
$model
=
$this
->
findModel
(
$id
);
$model
=
$this
->
findModel
(
$id
);
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
return
$this
->
render
(
'PosisiPaketEdit'
,
[
\Yii
::
$app
->
messenger
->
addSuccessFlash
(
"Posisi Paket Berhasil diedit"
);
return
$this
->
redirect
([
'index'
]);
}
else
{
return
$this
->
render
(
'PosisiPaketAdd'
,
[
'model'
=>
$model
,
'model'
=>
$model
,
]);
]);
}
}
}
/**
/**
...
@@ -93,7 +104,7 @@ class PosisiPaketController extends Controller
...
@@ -93,7 +104,7 @@ class PosisiPaketController extends Controller
public
function
actionPosisiPaketDel
(
$id
)
public
function
actionPosisiPaketDel
(
$id
)
{
{
$this
->
findModel
(
$id
)
->
softDelete
();
$this
->
findModel
(
$id
)
->
softDelete
();
\Yii
::
$app
->
messenger
->
addSuccessFlash
(
"Posisi Paket Berhasil dihapus"
);
return
$this
->
redirect
([
'index'
]);
return
$this
->
redirect
([
'index'
]);
}
}
...
...
backend/modules/ubux/controllers/SupirController.php
View file @
e03b9a18
...
@@ -20,11 +20,10 @@ class SupirController extends Controller
...
@@ -20,11 +20,10 @@ class SupirController extends Controller
{
{
return
[
return
[
//TODO: crud controller actions are bypassed by default, set the appropriate privilege
//TODO: crud controller actions are bypassed by default, set the appropriate privilege
'privilege'
=>
[
'privilege'
=>
[
'class'
=>
\Yii
::
$app
->
privilegeControl
->
getAppPrivilegeControlClass
(),
'class'
=>
\Yii
::
$app
->
privilegeControl
->
getAppPrivilegeControlClass
(),
'skipActions'
=>
[],
'skipActions'
=>
[],
],
],
'verbs'
=>
[
'verbs'
=>
[
'class'
=>
VerbFilter
::
className
(),
'class'
=>
VerbFilter
::
className
(),
'actions'
=>
[
'actions'
=>
[
...
...
backend/modules/ubux/models/DataTamu.php
View file @
e03b9a18
...
@@ -75,11 +75,12 @@ class DataTamu extends \yii\db\ActiveRecord
...
@@ -75,11 +75,12 @@ class DataTamu extends \yii\db\ActiveRecord
{
{
return
[
return
[
'data_tamu_id'
=>
'Data Tamu ID'
,
'data_tamu_id'
=>
'Data Tamu ID'
,
'nik'
=>
'N
IK
'
,
'nik'
=>
'N
ik
'
,
'nama'
=>
'Nama'
,
'nama'
=>
'Nama'
,
'waktu_kedatangan'
=>
'Waktu Kedatangan'
,
'waktu_kedatangan'
=>
'Waktu Kedatangan'
,
'desc'
=>
'Desc'
,
'desc'
=>
'Desc'
,
'waktu_kembali'
=>
'Waktu Kembali'
,
'waktu_kembali'
=>
'Waktu Kembali'
,
'kendaraan'
=>
'Kendaraan'
,
'deleted'
=>
'Deleted'
,
'deleted'
=>
'Deleted'
,
'deleted_at'
=>
'Deleted At'
,
'deleted_at'
=>
'Deleted At'
,
'deleted_by'
=>
'Deleted By'
,
'deleted_by'
=>
'Deleted By'
,
...
...
backend/modules/ubux/models/Kendaraan.php
View file @
e03b9a18
...
@@ -15,6 +15,7 @@ use common\behaviors\DeleteBehavior;
...
@@ -15,6 +15,7 @@ use common\behaviors\DeleteBehavior;
* @property string $kendaraan
* @property string $kendaraan
* @property integer $daya_tampung_kendaraan
* @property integer $daya_tampung_kendaraan
* @property integer $plat_nomor
* @property integer $plat_nomor
* @property integer $status
* @property integer $deleted
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_at
* @property string $deleted_by
* @property string $deleted_by
...
@@ -63,7 +64,7 @@ class Kendaraan extends \yii\db\ActiveRecord
...
@@ -63,7 +64,7 @@ class Kendaraan extends \yii\db\ActiveRecord
{
{
return
[
return
[
[[
'kendaraan'
,
'daya_tampung_kendaraan'
],
'required'
],
[[
'kendaraan'
,
'daya_tampung_kendaraan'
],
'required'
],
[[
'daya_tampung_kendaraan'
,
'
jumlah_kilometer_pemakaian'
,
'deleted
'
],
'integer'
],
[[
'daya_tampung_kendaraan'
,
'
deleted'
,
'status
'
],
'integer'
],
[[
'deleted_at'
,
'created_at'
,
'updated_at'
],
'safe'
],
[[
'deleted_at'
,
'created_at'
,
'updated_at'
],
'safe'
],
[[
'kendaraan'
,
'plat_nomor'
],
'string'
,
'max'
=>
100
],
[[
'kendaraan'
,
'plat_nomor'
],
'string'
,
'max'
=>
100
],
[[
'deleted_by'
,
'created_by'
,
'updated_by'
,
'plat_nomor'
],
'string'
,
'max'
=>
32
]
[[
'deleted_by'
,
'created_by'
,
'updated_by'
,
'plat_nomor'
],
'string'
,
'max'
=>
32
]
...
@@ -80,6 +81,7 @@ class Kendaraan extends \yii\db\ActiveRecord
...
@@ -80,6 +81,7 @@ class Kendaraan extends \yii\db\ActiveRecord
'kendaraan'
=>
'Kendaraan'
,
'kendaraan'
=>
'Kendaraan'
,
'daya_tampung_kendaraan'
=>
'Daya Tampung Kendaraan'
,
'daya_tampung_kendaraan'
=>
'Daya Tampung Kendaraan'
,
'plat_nomor'
=>
'Plat Nomor'
,
'plat_nomor'
=>
'Plat Nomor'
,
'status'
=>
'Ketersediaan'
,
'deleted'
=>
'Deleted'
,
'deleted'
=>
'Deleted'
,
'deleted_at'
=>
'Deleted At'
,
'deleted_at'
=>
'Deleted At'
,
'deleted_by'
=>
'Deleted By'
,
'deleted_by'
=>
'Deleted By'
,
...
@@ -128,6 +130,9 @@ class Kendaraan extends \yii\db\ActiveRecord
...
@@ -128,6 +130,9 @@ class Kendaraan extends \yii\db\ActiveRecord
}
}
public
function
getKeteranganKendaraan
(){
public
function
getKeteranganKendaraan
(){
return
$this
->
kendaraan
.
' '
.
$this
->
plat_nomor
;
$status
=
null
;
if
(
$this
->
status
==
1
)
$status
=
'Terpakai'
;
elseif
(
$this
->
status
==
0
)
$status
=
'Tersedia'
;
return
$this
->
kendaraan
.
' '
.
$this
->
plat_nomor
.
' ('
.
$status
.
')'
;
}
}
}
}
backend/modules/ubux/models/LaporanPemakaianKendaraan.php
View file @
e03b9a18
...
@@ -27,9 +27,11 @@ use common\behaviors\DeleteBehavior;
...
@@ -27,9 +27,11 @@ use common\behaviors\DeleteBehavior;
* @property string $updated_by
* @property string $updated_by
* @property integer $kendaraan_id
* @property integer $kendaraan_id
* @property integer $supir_id
* @property integer $supir_id
* @property integer $pemakaian_kendaraan_id
*
*
* @property Kendaraan $kendaraan
* @property Kendaraan $kendaraan
* @property Supir $supir
* @property Supir $supir
* @property PemakaianKendaraan $pemakaianKendaraan
*/
*/
class
LaporanPemakaianKendaraan
extends
\yii\db\ActiveRecord
class
LaporanPemakaianKendaraan
extends
\yii\db\ActiveRecord
{
{
...
@@ -67,7 +69,7 @@ class LaporanPemakaianKendaraan extends \yii\db\ActiveRecord
...
@@ -67,7 +69,7 @@ class LaporanPemakaianKendaraan extends \yii\db\ActiveRecord
{
{
return
[
return
[
[[
'tujuan'
,
'desc'
,
'jumlah_penumpang'
,
'keperluan'
,
'waktu_keberangkatan'
,
'waktu_tiba'
],
'required'
],
[[
'tujuan'
,
'desc'
,
'jumlah_penumpang'
,
'keperluan'
,
'waktu_keberangkatan'
,
'waktu_tiba'
],
'required'
],
[[
'jumlah_penumpang'
,
'deleted'
,
'kendaraan_id'
,
'supir_id'
],
'integer'
],
[[
'jumlah_penumpang'
,
'deleted'
,
'kendaraan_id'
,
'supir_id'
,
'pemakaian_kendaraan_id'
],
'integer'
],
[[
'waktu_keberangkatan'
,
'waktu_tiba'
,
'deleted_at'
,
'created_at'
,
'updated_at'
],
'safe'
],
[[
'waktu_keberangkatan'
,
'waktu_tiba'
,
'deleted_at'
,
'created_at'
,
'updated_at'
],
'safe'
],
[[
'tujuan'
,
'desc'
,
'keperluan'
],
'string'
],
[[
'tujuan'
,
'desc'
,
'keperluan'
],
'string'
],
[[
'deleted_by'
,
'created_by'
,
'updated_by'
],
'string'
,
'max'
=>
32
],
[[
'deleted_by'
,
'created_by'
,
'updated_by'
],
'string'
,
'max'
=>
32
],
...
@@ -98,6 +100,7 @@ class LaporanPemakaianKendaraan extends \yii\db\ActiveRecord
...
@@ -98,6 +100,7 @@ class LaporanPemakaianKendaraan extends \yii\db\ActiveRecord
'updated_by'
=>
'Updated By'
,
'updated_by'
=>
'Updated By'
,
'kendaraan_id'
=>
'Kendaraan'
,
'kendaraan_id'
=>
'Kendaraan'
,
'supir_id'
=>
'Supir'
,
'supir_id'
=>
'Supir'
,
'pemakaian_kendaraan_id'
=>
'Pemakaian Kendaraan Id'
];
];
}
}
...
@@ -116,4 +119,9 @@ class LaporanPemakaianKendaraan extends \yii\db\ActiveRecord
...
@@ -116,4 +119,9 @@ class LaporanPemakaianKendaraan extends \yii\db\ActiveRecord
{
{
return
$this
->
hasOne
(
Supir
::
className
(),
[
'supir_id'
=>
'supir_id'
]);
return
$this
->
hasOne
(
Supir
::
className
(),
[
'supir_id'
=>
'supir_id'
]);
}
}
public
function
getPemakaianKendaraan
()
{
return
$this
->
hasOne
(
PemakaianKendaraan
::
className
(),
[
'pemakaian_kendaraan_id'
=>
'pemakaian_kendaraan_id'
]);
}
}
}
backend/modules/ubux/models/PemakaianKendaraan.php
View file @
e03b9a18
...
@@ -19,7 +19,7 @@ use common\behaviors\DeleteBehavior;
...
@@ -19,7 +19,7 @@ use common\behaviors\DeleteBehavior;
* @property integer $jumlah_penumpang_kendaraan
* @property integer $jumlah_penumpang_kendaraan
* @property string $rencana_waktu_keberangkatan
* @property string $rencana_waktu_keberangkatan
* @property string $rencana_waktu_kembali
* @property string $rencana_waktu_kembali
* @property
string
$status_req_sekretaris_rektorat
* @property
int
$status_req_sekretaris_rektorat
* @property string $status_request_kemahasiswaan
* @property string $status_request_kemahasiswaan
* @property string $jenis_keperluan_id
* @property string $jenis_keperluan_id
* @property string $no_telepon
* @property string $no_telepon
...
@@ -38,6 +38,7 @@ use common\behaviors\DeleteBehavior;
...
@@ -38,6 +38,7 @@ use common\behaviors\DeleteBehavior;
* @property integer $status_request_hrd
* @property integer $status_request_hrd
* @property integer $status_request_keuangan
* @property integer $status_request_keuangan
* @property integer $status_request_wr2
* @property integer $status_request_wr2
* @property integer $laporan
*
*
* @property Supir $supir
* @property Supir $supir
* @property Kendaraan $kendaraan
* @property Kendaraan $kendaraan
...
@@ -86,7 +87,7 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord
...
@@ -86,7 +87,7 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord
{
{
return
[
return
[
[[
'desc'
,
'tujuan'
,
'rencana_waktu_keberangkatan'
,
'rencana_waktu_kembali'
,
'no_telepon'
],
'required'
],
[[
'desc'
,
'tujuan'
,
'rencana_waktu_keberangkatan'
,
'rencana_waktu_kembali'
,
'no_telepon'
],
'required'
],
[[
'status_req_sekretaris_rektorat'
,
'status_request_kemahasiswaan'
,
'jumlah_penumpang_kendaraan'
,
'deleted'
,
'kendaraan_id'
,
'supir_id'
,
'pemakaian_kendaraan_mhs_id'
,
'status_request_kabiro_KSD'
,
'status_request_hrd'
,
'status_request_keuangan'
,
'status_request_wr2'
,
'jenis_keperluan_id'
,
'pegawai_id'
],
'integer'
],
[[
'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'
],
[[
'rencana_waktu_keberangkatan'
,
'rencana_waktu_kembali'
,
'deleted_at'
,
'created_at'
,
'updated_at'
],
'safe'
],
[[
'rencana_waktu_keberangkatan'
,
'rencana_waktu_kembali'
,
'deleted_at'
,
'created_at'
,
'updated_at'
],
'safe'
],
[[
'file'
],
'file'
],
[[
'file'
],
'file'
],
[[
'no_hp_supir'
],
'string'
,
'max'
=>
300
],
[[
'no_hp_supir'
],
'string'
,
'max'
=>
300
],
...
@@ -133,7 +134,8 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord
...
@@ -133,7 +134,8 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord
'status_request_hrd'
=>
'Status Persetujuan Hrd'
,
'status_request_hrd'
=>
'Status Persetujuan Hrd'
,
'status_request_keuangan'
=>
'Status Persetujuan Keuangan'
,
'status_request_keuangan'
=>
'Status Persetujuan Keuangan'
,
'status_request_wr2'
=>
'Status Persetujuan Wr2'
,
'status_request_wr2'
=>
'Status Persetujuan Wr2'
,
'pemakaian_kendaraan_mhs_id'
=>
'Transaksi Kendaraan Mahasiswa ID'
'pemakaian_kendaraan_mhs_id'
=>
'Transaksi Kendaraan Mahasiswa ID'
,
'laporan'
=>
'Laporan Pemakaian'
,
];
];
}
}
...
...
backend/modules/ubux/models/PemakaianKendaraanMhs.php
View file @
e03b9a18
...
@@ -114,7 +114,8 @@ class PemakaianKendaraanMhs extends \yii\db\ActiveRecord
...
@@ -114,7 +114,8 @@ class PemakaianKendaraanMhs extends \yii\db\ActiveRecord
'kendaraan_id'
=>
'Kendaraan'
,
'kendaraan_id'
=>
'Kendaraan'
,
'supir_id'
=>
'Supir'
,
'supir_id'
=>
'Supir'
,
'no_hp_supir'
=>
'No Hp Supir'
,
'no_hp_supir'
=>
'No Hp Supir'
,
'kode_proposal'
=>
'Proposal'
,
'kode_proposal'
=>
'Kode Proposal'
,
'file'
=>
'File Proposal'
,
];
];
}
}
...
...
backend/modules/ubux/models/Supir.php
View file @
e03b9a18
...
@@ -14,6 +14,7 @@ use common\behaviors\DeleteBehavior;
...
@@ -14,6 +14,7 @@ use common\behaviors\DeleteBehavior;
* @property integer $supir_id
* @property integer $supir_id
* @property integer $pegawai_id
* @property integer $pegawai_id
* @property string $no_telepon_supir
* @property string $no_telepon_supir
* @property integer $status
* @property integer $deleted
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_at
* @property string $deleted_by
* @property string $deleted_by
...
@@ -61,7 +62,7 @@ class Supir extends \yii\db\ActiveRecord
...
@@ -61,7 +62,7 @@ class Supir extends \yii\db\ActiveRecord
public
function
rules
()
public
function
rules
()
{
{
return
[
return
[
[[
'pegawai_id'
,
'deleted'
],
'integer'
],
[[
'pegawai_id'
,
'deleted'
,
'status'
],
'integer'
],
[[
'deleted_at'
,
'created_at'
,
'updated_at'
],
'safe'
],
[[
'deleted_at'
,
'created_at'
,
'updated_at'
],
'safe'
],
[[
'no_telepon_supir'
,
'deleted_by'
,
'created_by'
,
'updated_by'
],
'string'
,
'max'
=>
32
]
[[
'no_telepon_supir'
,
'deleted_by'
,
'created_by'
,
'updated_by'
],
'string'
,
'max'
=>
32
]
];
];
...
@@ -76,6 +77,7 @@ class Supir extends \yii\db\ActiveRecord
...
@@ -76,6 +77,7 @@ class Supir extends \yii\db\ActiveRecord
'supir_id'
=>
'Supir ID'
,
'supir_id'
=>
'Supir ID'
,
'pegawai_id'
=>
'Nama'
,
'pegawai_id'
=>
'Nama'
,
'no_telepon_supir'
=>
'No Telepon Supir'
,
'no_telepon_supir'
=>
'No Telepon Supir'
,
'status'
=>
'Ketersediaan'
,
'deleted'
=>
'Deleted'
,
'deleted'
=>
'Deleted'
,
'deleted_at'
=>
'Deleted At'
,
'deleted_at'
=>
'Deleted At'
,
'deleted_by'
=>
'Deleted By'
,
'deleted_by'
=>
'Deleted By'
,
...
@@ -113,6 +115,9 @@ class Supir extends \yii\db\ActiveRecord
...
@@ -113,6 +115,9 @@ class Supir extends \yii\db\ActiveRecord
}
}
public
function
getNamaSupir
(){
public
function
getNamaSupir
(){
return
$this
->
pegawai
->
nama
;
$status
=
null
;
if
(
$this
->
status
==
1
)
$status
=
'Di Perjalanan'
;
elseif
(
$this
->
status
==
0
)
$status
=
'Tersedia'
;
return
$this
->
pegawai
->
nama
.
' ('
.
$status
.
')'
;
}
}
}
}
backend/modules/ubux/models/search/DataPaketSearch.php
View file @
e03b9a18
...
@@ -50,7 +50,7 @@ class DataPaketSearch extends DataPaket
...
@@ -50,7 +50,7 @@ class DataPaketSearch extends DataPaket
$dataProvider
=
new
ActiveDataProvider
([
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
$query
,
'query'
=>
$query
,
'pagination'
=>
[
'pageSize'
=>
10
],
'pagination'
=>
[
'pageSize'
=>
10
],
'sort'
=>
[
'defaultOrder'
=>
[
'
data_paket_id'
=>
SORT_A
SC
,
'updated_at'
=>
SORT_DESC
,
'created_at'
=>
SORT_DESC
]],
'sort'
=>
[
'defaultOrder'
=>
[
'
status_paket_id'
=>
SORT_ASC
,
'data_paket_id'
=>
SORT_DE
SC
,
'updated_at'
=>
SORT_DESC
,
'created_at'
=>
SORT_DESC
]],
]);
]);
$this
->
load
(
$params
);
$this
->
load
(
$params
);
...
@@ -66,7 +66,6 @@ class DataPaketSearch extends DataPaket
...
@@ -66,7 +66,6 @@ class DataPaketSearch extends DataPaket
'tag'
=>
$this
->
tag
,
'tag'
=>
$this
->
tag
,
'dim_id'
=>
$this
->
dim_id
,
'dim_id'
=>
$this
->
dim_id
,
'pegawai_id'
=>
$this
->
pegawai_id
,
'pegawai_id'
=>
$this
->
pegawai_id
,
'tanggal_kedatangan'
=>
$this
->
tanggal_kedatangan
,
'tanggal_diambil'
=>
$this
->
tanggal_diambil
,
'tanggal_diambil'
=>
$this
->
tanggal_diambil
,
'posisi_paket_id'
=>
$this
->
posisi_paket_id
,
'posisi_paket_id'
=>
$this
->
posisi_paket_id
,
'status_paket_id'
=>
$this
->
status_paket_id
,
'status_paket_id'
=>
$this
->
status_paket_id
,
...
@@ -80,6 +79,8 @@ class DataPaketSearch extends DataPaket
...
@@ -80,6 +79,8 @@ class DataPaketSearch extends DataPaket
->
andFilterWhere
([
'like'
,
'hrdx_pegawai.nama'
,
$this
->
pegawai_nama
])
->
andFilterWhere
([
'like'
,
'hrdx_pegawai.nama'
,
$this
->
pegawai_nama
])
->
andFilterWhere
([
'like'
,
'pengirim'
,
$this
->
pengirim
])
->
andFilterWhere
([
'like'
,
'pengirim'
,
$this
->
pengirim
])
->
andFilterWhere
([
'like'
,
'diambil_oleh'
,
$this
->
diambil_oleh
])
->
andFilterWhere
([
'like'
,
'diambil_oleh'
,
$this
->
diambil_oleh
])
->
andFilterWhere
([
'like'
,
'tanggal_kedatangan'
,
SUBSTR
(
$this
->
tanggal_kedatangan
,
1
,
10
)])
->
andFilterWhere
([
'like'
,
'hrdx_pegawai.nama'
,
$this
->
pegawai_nama
])
->
andFilterWhere
([
'like'
,
'desc'
,
$this
->
desc
])
->
andFilterWhere
([
'like'
,
'desc'
,
$this
->
desc
])
->
andFilterWhere
([
'like'
,
'deleted_by'
,
$this
->
deleted_by
])
->
andFilterWhere
([
'like'
,
'deleted_by'
,
$this
->
deleted_by
])
->
andFilterWhere
([
'like'
,
'created_by'
,
$this
->
created_by
])
->
andFilterWhere
([
'like'
,
'created_by'
,
$this
->
created_by
])
...
@@ -95,14 +96,13 @@ class DataPaketSearch extends DataPaket
...
@@ -95,14 +96,13 @@ class DataPaketSearch extends DataPaket
* Search Untuk Paket Mahasiswa
* Search Untuk Paket Mahasiswa
*/
*/
public
function
searchUserMahasiswa
(
$params
){
public
function
searchUserMahasiswa
(
$params
){
$dim
=
Dim
::
find
(
'dim_id'
)
->
where
(
'deleted!=1'
)
->
andWhere
([
'user_id'
=>
(
Yii
::
$app
->
user
->
identity
->
user_id
)])
->
one
();
$dim
=
Dim
::
find
(
'dim_id'
)
->
where
(
'deleted!=1'
)
->
andWhere
([
'user_id'
=>
Yii
::
$app
->
user
->
identity
->
user_id
])
->
one
();
$query
=
DataPaket
::
find
()
->
where
(
'deleted!=1'
)
->
andWhere
([
'dim_id'
=>
$dim
->
dim_id
])
$query
=
DataPaket
::
find
()
->
where
(
'deleted!=1'
)
->
andWhere
([
'dim_id'
=>
$dim
])
->
orWhere
([
'dim_id'
=>
NULL
])
->
andWhere
([
'pegawai_id'
=>
NULL
]);
->
orWhere
([
'dim_id'
=>
NULL
,
'pegawai_id'
=>
NULL
,
'status_paket_id'
=>
1
]);
$dataProvider
=
new
ActiveDataProvider
([
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
$query
,
'query'
=>
$query
,
'pagination'
=>
[
'pageSize'
=>
10
],
'pagination'
=>
[
'pageSize'
=>
10
],
'sort'
=>
[
'defaultOrder'
=>
[
'd
ata_paket_id'
=>
SORT_ASC
,
'updated_at'
=>
SORT_DESC
,
'created_at'
=>
SORT_DESC
]],
'sort'
=>
[
'defaultOrder'
=>
[
'd
im_id'
=>
SORT_DESC
,
'status_paket_id'
=>
SORT_ASC
,
'updated_at'
=>
SORT_DESC
,
'created_at'
=>
SORT_DESC
]],
]);
]);
$this
->
load
(
$params
);
$this
->
load
(
$params
);
...
@@ -117,7 +117,6 @@ class DataPaketSearch extends DataPaket
...
@@ -117,7 +117,6 @@ class DataPaketSearch extends DataPaket
'data_paket_id'
=>
$this
->
data_paket_id
,
'data_paket_id'
=>
$this
->
data_paket_id
,
'tag'
=>
$this
->
tag
,
'tag'
=>
$this
->
tag
,
'dim_id'
=>
$this
->
dim_id
,
'dim_id'
=>
$this
->
dim_id
,
'tanggal_kedatangan'
=>
$this
->
tanggal_kedatangan
,
'tanggal_diambil'
=>
$this
->
tanggal_diambil
,
'tanggal_diambil'
=>
$this
->
tanggal_diambil
,
'posisi_paket_id'
=>
$this
->
posisi_paket_id
,
'posisi_paket_id'
=>
$this
->
posisi_paket_id
,
'status_paket_id'
=>
$this
->
status_paket_id
,
'status_paket_id'
=>
$this
->
status_paket_id
,
...
@@ -133,6 +132,7 @@ class DataPaketSearch extends DataPaket
...
@@ -133,6 +132,7 @@ class DataPaketSearch extends DataPaket
->
andFilterWhere
([
'like'
,
'deleted_by'
,
$this
->
deleted_by
])
->
andFilterWhere
([
'like'
,
'deleted_by'
,
$this
->
deleted_by
])
->
andFilterWhere
([
'like'
,
'created_by'
,
$this
->
created_by
])
->
andFilterWhere
([
'like'
,
'created_by'
,
$this
->
created_by
])
->
andFilterWhere
([
'like'
,
'updated_by'
,
$this
->
updated_by
])
->
andFilterWhere
([
'like'
,
'updated_by'
,
$this
->
updated_by
])
->
andFilterWhere
([
'like'
,
'tanggal_kedatangan'
,
SUBSTR
(
$this
->
tanggal_kedatangan
,
1
,
10
)])
->
andFilterWhere
([
'not'
,
[
'deleted'
=>
1
]]);
->
andFilterWhere
([
'not'
,
[
'deleted'
=>
1
]]);
return
$dataProvider
;
return
$dataProvider
;
...
@@ -142,14 +142,15 @@ class DataPaketSearch extends DataPaket
...
@@ -142,14 +142,15 @@ class DataPaketSearch extends DataPaket
* Search untuk paket Pegawai
* Search untuk paket Pegawai
*/
*/
public
function
searchUserPegawai
(
$params
){
public
function
searchUserPegawai
(
$params
){
$pegawai
=
Pegawai
::
find
(
'pegawai_id'
)
->
where
(
'deleted!=1'
)
->
andWhere
([
'user_id'
=>
(
Yii
::
$app
->
user
->
identity
->
user_id
)])
->
one
();
$pegawai
=
Pegawai
::
find
()
->
where
(
'deleted!=1'
)
->
andWhere
([
'user_id'
=>
(
Yii
::
$app
->
user
->
identity
->
user_id
)])
->
one
();
$query
=
DataPaket
::
find
()
->
where
(
'deleted!=1'
)
->
andWhere
([
'pegawai_id'
=>
$pegawai
])
->
orWhere
([
'pegawai_id'
=>
NULL
])
->
andWhere
([
'dim_id'
=>
NULL
]);
$query
=
DataPaket
::
find
()
->
where
(
'deleted!=1'
)
->
andWhere
([
'pegawai_id'
=>
$pegawai
->
pegawai_id
])
->
orWhere
([
'dim_id'
=>
NULL
,
'pegawai_id'
=>
NULL
,
'status_paket_id'
=>
1
]);
$dataProvider
=
new
ActiveDataProvider
([
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
$query
,
'query'
=>
$query
,
'pagination'
=>
[
'pageSize'
=>
10
],
'pagination'
=>
[
'pageSize'
=>
10
],
'sort'
=>
[
'defaultOrder'
=>
[
'
data_paket_id'
=>
SORT_ASC
,
'updated_at'
=>
SORT_DESC
,
'created_at'
=>
SORT_DESC
]],
'sort'
=>
[
'defaultOrder'
=>
[
'
pegawai_id'
=>
SORT_DESC
,
'status_paket_id'
=>
SORT_ASC
,
'updated_at'
=>
SORT_DESC
,
'created_at'
=>
SORT_DESC
]],
]);
]);
$this
->
load
(
$params
);
$this
->
load
(
$params
);
...
@@ -164,7 +165,6 @@ class DataPaketSearch extends DataPaket
...
@@ -164,7 +165,6 @@ class DataPaketSearch extends DataPaket
'data_paket_id'
=>
$this
->
data_paket_id
,
'data_paket_id'
=>
$this
->
data_paket_id
,
'tag'
=>
$this
->
tag
,
'tag'
=>
$this
->
tag
,
'pegawai_id'
=>
$this
->
pegawai_id
,
'pegawai_id'
=>
$this
->
pegawai_id
,
'tanggal_kedatangan'
=>
$this
->
tanggal_kedatangan
,
'tanggal_diambil'
=>
$this
->
tanggal_diambil
,
'tanggal_diambil'
=>
$this
->
tanggal_diambil
,
'posisi_paket_id'
=>
$this
->
posisi_paket_id
,
'posisi_paket_id'
=>
$this
->
posisi_paket_id
,
'status_paket_id'
=>
$this
->
status_paket_id
,
'status_paket_id'
=>
$this
->
status_paket_id
,
...
@@ -178,6 +178,7 @@ class DataPaketSearch extends DataPaket
...
@@ -178,6 +178,7 @@ class DataPaketSearch extends DataPaket
->
andFilterWhere
([
'like'
,
'diambil_oleh'
,
$this
->
diambil_oleh
])
->
andFilterWhere
([
'like'
,
'diambil_oleh'
,
$this
->
diambil_oleh
])
->
andFilterWhere
([
'like'
,
'desc'
,
$this
->
desc
])
->
andFilterWhere
([
'like'
,
'desc'
,
$this
->
desc
])
->
andFilterWhere
([
'like'
,
'deleted_by'
,
$this
->
deleted_by
])
->
andFilterWhere
([
'like'
,
'deleted_by'
,
$this
->
deleted_by
])
->
andFilterWhere
([
'like'
,
'tanggal_kedatangan'
,
SUBSTR
(
$this
->
tanggal_kedatangan
,
1
,
10
)])
->
andFilterWhere
([
'like'
,
'created_by'
,
$this
->
created_by
])
->
andFilterWhere
([
'like'
,
'created_by'
,
$this
->
created_by
])
->
andFilterWhere
([
'like'
,
'updated_by'
,
$this
->
updated_by
])
->
andFilterWhere
([
'like'
,
'updated_by'
,
$this
->
updated_by
])
->
andFilterWhere
([
'not'
,
[
'deleted'
=>
1
]]);
->
andFilterWhere
([
'not'
,
[
'deleted'
=>
1
]]);
...
...
backend/modules/ubux/models/search/DataTamuSearch.php
View file @
e03b9a18
...
@@ -19,7 +19,7 @@ class DataTamuSearch extends DataTamu
...
@@ -19,7 +19,7 @@ class DataTamuSearch extends DataTamu
{
{
return
[
return
[
[[
'data_tamu_id'
,
'deleted'
],
'integer'
],
[[
'data_tamu_id'
,
'deleted'
],
'integer'
],
[[
'nik'
,
'nama'
,
'waktu_kedatangan'
,
'desc'
,
'waktu_kembali'
,
'deleted_at'
,
'deleted_by'
,
'created_by'
,
'created_at'
,
'updated_at'
,
'updated_by'
],
'safe'
],
[[
'nik'
,
'nama'
,
'waktu_kedatangan'
,
'kendaraan'
,
'desc'
,
'waktu_kembali'
,
'deleted_at'
,
'deleted_by'
,
'created_by'
,
'created_at'
,
'updated_at'
,
'updated_by'
],
'safe'
],
];
];
}
}
...
@@ -58,7 +58,6 @@ class DataTamuSearch extends DataTamu
...
@@ -58,7 +58,6 @@ class DataTamuSearch extends DataTamu
$query
->
andFilterWhere
([
$query
->
andFilterWhere
([
'data_tamu_id'
=>
$this
->
data_tamu_id
,
'data_tamu_id'
=>
$this
->
data_tamu_id
,
'waktu_kedatangan'
=>
$this
->
waktu_kedatangan
,
'waktu_kembali'
=>
$this
->
waktu_kembali
,
'waktu_kembali'
=>
$this
->
waktu_kembali
,
'deleted'
=>
$this
->
deleted
,
'deleted'
=>
$this
->
deleted
,
'deleted_at'
=>
$this
->
deleted_at
,
'deleted_at'
=>
$this
->
deleted_at
,
...
@@ -69,6 +68,8 @@ class DataTamuSearch extends DataTamu
...
@@ -69,6 +68,8 @@ class DataTamuSearch extends DataTamu
$query
->
andFilterWhere
([
'like'
,
'nik'
,
$this
->
nik
])
$query
->
andFilterWhere
([
'like'
,
'nik'
,
$this
->
nik
])
->
andFilterWhere
([
'like'
,
'nama'
,
$this
->
nama
])
->
andFilterWhere
([
'like'
,
'nama'
,
$this
->
nama
])
->
andFilterWhere
([
'like'
,
'desc'
,
$this
->
desc
])
->
andFilterWhere
([
'like'
,
'desc'
,
$this
->
desc
])
->
andFilterWhere
([
'like'
,
'kendaraan'
,
$this
->
kendaraan
])
->
andFilterWhere
([
'like'
,
'waktu_kedatangan'
,
SUBSTR
(
$this
->
waktu_kedatangan
,
1
,
10
)])
->
andFilterWhere
([
'like'
,
'deleted_by'
,
$this
->
deleted_by
])
->
andFilterWhere
([
'like'
,
'deleted_by'
,
$this
->
deleted_by
])
->
andFilterWhere
([
'like'
,
'created_by'
,
$this
->
created_by
])
->
andFilterWhere
([
'like'
,
'created_by'
,
$this
->
created_by
])
->
andFilterWhere
([
'like'
,
'updated_by'
,
$this
->
updated_by
])
->
andFilterWhere
([
'like'
,
'updated_by'
,
$this
->
updated_by
])
...
...
backend/modules/ubux/views/data-paket/DataPaketView.php
→
backend/modules/ubux/views/data-paket/DataPaketView
Admin
.php
View file @
e03b9a18
...
@@ -15,8 +15,9 @@ else if($model->pegawai_id!=null){
...
@@ -15,8 +15,9 @@ else if($model->pegawai_id!=null){
else
{
else
{
$this
->
title
=
"Paket tidak diketahui"
;
$this
->
title
=
"Paket tidak diketahui"
;
}
}
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Data Paket'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Data Paket'
,
'url'
=>
[
'index
-by-admin
'
]];
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
Yii
::
$app
->
timeZone
=
'UTC'
;
?>
?>
<div
class=
"data-paket-view"
>
<div
class=
"data-paket-view"
>
...
@@ -24,8 +25,17 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -24,8 +25,17 @@ $this->params['breadcrumbs'][] = $this->title;
<?=
DetailView
::
widget
([
<?=
DetailView
::
widget
([
'model'
=>
$model
,
'model'
=>
$model
,
'attributes'
=>
[
'attributes'
=>
[
[
'attribute'
=>
'tag'
,
'value'
=>
function
(
$model
){
if
(
$model
->
tag
!=
NULL
){
return
$model
->
tag
;
}
return
'-'
;
}
],
'pengirim'
,
'pengirim'
,
[
[
'attribute'
=>
'tanggal_kedatangan'
,
'attribute'
=>
'tanggal_kedatangan'
,
'label'
=>
'Tanggal kedatangan'
,
'label'
=>
'Tanggal kedatangan'
,
...
...
backend/modules/ubux/views/data-paket/DataPaketViewMahasiswa.php
0 → 100644
View file @
e03b9a18
<?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>
backend/modules/ubux/views/data-paket/DataPaketViewPegawai.php
0 → 100644
View file @
e03b9a18
<?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>
backend/modules/ubux/views/data-paket/indexByAdmin.php
View file @
e03b9a18
...
@@ -3,25 +3,47 @@
...
@@ -3,25 +3,47 @@
use
yii\helpers\Html
;
use
yii\helpers\Html
;
use
yii\grid\GridView
;
use
yii\grid\GridView
;
use
yii\helpers\Url
;
use
yii\helpers\Url
;
use
yii\helpers\ArrayHelper
;
use
yii\jui\DatePicker
;
use
backend\modules\ubux\models\PosisiPaket
;
use
backend\modules\ubux\models\StatusPaket
;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\DataPaketSearch */
/* @var $searchModel backend\modules\ubux\models\search\DataPaketSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this
->
title
=
'Data Paket'
;
$this
->
title
=
'Data Paket'
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
Yii
::
$app
->
timeZone
=
'UTC'
;
?>
?>
<div
class=
"data-paket-index"
>
<div
class=
"data-paket-index"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?php
echo
$this
->
render
(
'_search'
,
[
'model'
=>
$searchModel
]);
?>
<?php
$toolbarItemStatusRequest
=
"<a href='"
.
Url
::
to
([
'index-by-admin'
])
.
"' class='btn btn-info '><i class='fa fa-refresh'></i> <span class='toolbar-label'>Refresh</span></a>"
;
?>
<?=
Yii
::
$app
->
uiHelper
->
renderToolbar
([
'pull-right'
=>
true
,
'groupTemplate'
=>
[
'groupStatusExpired'
],
'groups'
=>
[
'groupStatusExpired'
=>
[
'template'
=>
[
'filterStatus'
],
'buttons'
=>
[
'filterStatus'
=>
$toolbarItemStatusRequest
,
]
],
],
])
?>
<?=
GridView
::
widget
([
<?=
GridView
::
widget
([
'dataProvider'
=>
$dataProvider
,
'dataProvider'
=>
$dataProvider
,
'filterModel'
=>
$searchModel
,
'columns'
=>
[
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
[
'class'
=>
'yii\grid\SerialColumn'
],
[
[
'attribute'
=>
'dim_id'
,
'attribute'
=>
'dim_nama'
,
'headerOptions'
=>
[
'style'
=>
'color:#3c8dbc'
],
'format'
=>
'raw'
,
'format'
=>
'raw'
,
'label'
=>
'Nama Mahasiswa'
,
'label'
=>
'Nama Mahasiswa'
,
'value'
=>
function
(
$model
,
$key
,
$index
){
'value'
=>
function
(
$model
,
$key
,
$index
){
...
@@ -35,7 +57,8 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -35,7 +57,8 @@ $this->params['breadcrumbs'][] = $this->title;
],
],
[
[
'attribute'
=>
'pegawai_id'
,
'attribute'
=>
'pegawai_nama'
,
'headerOptions'
=>
[
'style'
=>
'color:#3c8dbc'
],
'format'
=>
'raw'
,
'format'
=>
'raw'
,
'label'
=>
'Nama Pegawai'
,
'label'
=>
'Nama Pegawai'
,
'value'
=>
function
(
$model
,
$key
,
$index
){
'value'
=>
function
(
$model
,
$key
,
$index
){
...
@@ -45,17 +68,24 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -45,17 +68,24 @@ $this->params['breadcrumbs'][] = $this->title;
else
{
else
{
return
'-'
;
return
'-'
;
}
}
}
}
,
],
],
'pengirim'
,
'pengirim'
,
[
[
'attribute'
=>
'tanggal_kedatangan'
,
'attribute'
=>
'tanggal_kedatangan'
,
'format'
=>
[
'Date'
,
'php: d M y H:i'
]
'format'
=>
[
'Date'
,
'php: d M y H:i'
],
'filter'
=>
DatePicker
::
widget
([
'model'
=>
$searchModel
,
'attribute'
=>
'tanggal_kedatangan'
,
'dateFormat'
=>
'yyyy-MM-dd'
])
],
],
[
[
'attribute'
=>
'posisi_paket_id'
,
'attribute'
=>
'posisi_paket_id'
,
'label'
=>
'Posisi'
,
'label'
=>
'Posisi'
,
'value'
=>
'posisiPaket.name'
'value'
=>
'posisiPaket.name'
,
'filter'
=>
ArrayHelper
::
map
(
PosisiPaket
::
find
()
->
where
(
'deleted!=1'
)
->
asArray
()
->
all
(),
'posisi_paket_id'
,
'name'
),
],
],
[
[
'attribute'
=>
'status_paket_id'
,
'attribute'
=>
'status_paket_id'
,
...
@@ -68,14 +98,14 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -68,14 +98,14 @@ $this->params['breadcrumbs'][] = $this->title;
else
{
else
{
return
'<b class="text-success">'
.
$model
->
statusPaket
->
status
.
'</b>'
;
return
'<b class="text-success">'
.
$model
->
statusPaket
->
status
.
'</b>'
;
}
}
}
}
,
'filter'
=>
ArrayHelper
::
map
(
StatusPaket
::
find
()
->
where
(
'deleted!=1'
)
->
asArray
()
->
all
(),
'status_paket_id'
,
'status'
)
],
],
[
'class'
=>
'common\components\ToolsColumn'
,
[
'class'
=>
'common\components\ToolsColumn'
,
'template'
=>
'{view}'
,
'template'
=>
'{view}'
,
'urlCreator'
=>
function
(
$action
,
$model
,
$key
,
$index
){
'urlCreator'
=>
function
(
$action
,
$model
,
$key
,
$index
){
if
(
$action
===
'view'
)
{
if
(
$action
===
'view'
)
{
return
Url
::
toRoute
([
'data-paket-view'
,
'id'
=>
$key
]);
return
Url
::
toRoute
([
'data-paket-view
-admin
'
,
'id'
=>
$key
]);
}
}
}
}
]
]
...
...
backend/modules/ubux/views/data-paket/indexByMahasiswa.php
View file @
e03b9a18
...
@@ -3,25 +3,57 @@
...
@@ -3,25 +3,57 @@
use
yii\helpers\Html
;
use
yii\helpers\Html
;
use
yii\grid\GridView
;
use
yii\grid\GridView
;
use
yii\helpers\Url
;
use
yii\helpers\Url
;
use
yii\helpers\ArrayHelper
;
use
yii\jui\DatePicker
;
use
backend\modules\ubux\models\PosisiPaket
;
use
backend\modules\ubux\models\StatusPaket
;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\DataPaketSearch */
/* @var $searchModel backend\modules\ubux\models\search\DataPaketSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this
->
title
=
'Data Paket'
;
$this
->
title
=
'Data Paket'
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
Yii
::
$app
->
timeZone
=
'UTC'
;
?>
?>
<div
class=
"data-paket-index"
>
<div
class=
"data-paket-index"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?php
// echo $this->render('_search', ['model' => $searchModel]); ?>
<?php
// echo $this->render('_search', ['model' => $searchModel]); ?>
<?
php
$toolbarItemStatusRequest
=
"<a href='"
.
Url
::
to
([
'index-by-mahasiswa'
])
.
"' class='btn btn-info '><i class='fa fa-refresh'></i> <span class='toolbar-label'>Refresh</span></a>"
;
?>
<?=
Yii
::
$app
->
uiHelper
->
renderToolbar
([
'pull-right'
=>
true
,
'groupTemplate'
=>
[
'groupStatusExpired'
],
'groups'
=>
[
'groupStatusExpired'
=>
[
'template'
=>
[
'filterStatus'
],
'buttons'
=>
[
'filterStatus'
=>
$toolbarItemStatusRequest
,
]
],
],
])
?>
<?=
GridView
::
widget
([
<?=
GridView
::
widget
([
'dataProvider'
=>
$dataProvider
,
'dataProvider'
=>
$dataProvider
,
'filterModel'
=>
$searchModel
,
'columns'
=>
[
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
[
'class'
=>
'yii\grid\SerialColumn'
],
[
[
'attribute'
=>
'dim_id'
,
'headerOptions'
=>
[
'style'
=>
'color:#3c8dbc'
],
'label'
=>
'Tag'
,
'value'
=>
function
(
$model
,
$key
,
$index
){
if
(
$model
->
tag
!=
null
){
return
$model
->
tag
;
}
return
'-'
;
}
],
[
'headerOptions'
=>
[
'style'
=>
'color:#3c8dbc'
],
'format'
=>
'raw'
,
'format'
=>
'raw'
,
'label'
=>
'Nama'
,
'label'
=>
'Nama'
,
'value'
=>
function
(
$model
,
$key
,
$index
){
'value'
=>
function
(
$model
,
$key
,
$index
){
...
@@ -37,32 +69,40 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -37,32 +69,40 @@ $this->params['breadcrumbs'][] = $this->title;
'pengirim'
,
'pengirim'
,
[
[
'attribute'
=>
'tanggal_kedatangan'
,
'attribute'
=>
'tanggal_kedatangan'
,
'format'
=>
[
'Date'
,
'php: d M y H:i'
]
'format'
=>
[
'Date'
,
'php: d M y H:i'
],
'filter'
=>
DatePicker
::
widget
([
'model'
=>
$searchModel
,
'attribute'
=>
'tanggal_kedatangan'
,
'dateFormat'
=>
'yyyy-MM-dd'
])
],
],
[
[
'attribute'
=>
'posisi_paket_id'
,
'attribute'
=>
'posisi_paket_id'
,
'label'
=>
'Posisi'
,
'label'
=>
'Posisi'
,
'value'
=>
'posisiPaket.name'
'value'
=>
'posisiPaket.name'
,
],
'filter'
=>
ArrayHelper
::
map
(
PosisiPaket
::
find
()
->
where
(
'deleted!=1'
)
->
asArray
()
->
all
(),
'posisi_paket_id'
,
'name'
),
[
],
'attribute'
=>
'status_paket_id'
,
'format'
=>
'raw'
,
[
'label'
=>
'Status Paket'
,
'attribute'
=>
'status_paket_id'
,
'value'
=>
function
(
$model
,
$key
,
$index
){
'format'
=>
'raw'
,
if
(
$model
->
status_paket_id
==
1
){
'label'
=>
'Status Paket'
,
return
'<b class="text-danger">'
.
$model
->
statusPaket
->
status
.
'</b>'
;
'value'
=>
function
(
$model
,
$key
,
$index
){
}
if
(
$model
->
status_paket_id
==
1
){
else
{
return
'<b class="text-danger">'
.
$model
->
statusPaket
->
status
.
'</b>'
;
}
else
{
return
'<b class="text-success">'
.
$model
->
statusPaket
->
status
.
'</b>'
;
return
'<b class="text-success">'
.
$model
->
statusPaket
->
status
.
'</b>'
;
}
}
}
},
'filter'
=>
ArrayHelper
::
map
(
StatusPaket
::
find
()
->
where
(
'deleted!=1'
)
->
asArray
()
->
all
(),
'status_paket_id'
,
'status'
),
],
],
[
'class'
=>
'common\components\ToolsColumn'
,
[
'class'
=>
'common\components\ToolsColumn'
,
'template'
=>
'{view}'
,
'template'
=>
'{view}'
,
'urlCreator'
=>
function
(
$action
,
$model
,
$key
,
$index
){
'urlCreator'
=>
function
(
$action
,
$model
,
$key
,
$index
){
if
(
$action
===
'view'
)
{
if
(
$action
===
'view'
)
{
return
Url
::
toRoute
([
'data-paket-view'
,
'id'
=>
$key
]);
return
Url
::
toRoute
([
'data-paket-view
-mahasiswa
'
,
'id'
=>
$key
]);
}
}
}
}
]
]
...
...
backend/modules/ubux/views/data-paket/indexByPegawai.php
View file @
e03b9a18
...
@@ -3,29 +3,62 @@
...
@@ -3,29 +3,62 @@
use
yii\helpers\Html
;
use
yii\helpers\Html
;
use
yii\grid\GridView
;
use
yii\grid\GridView
;
use
yii\helpers\Url
;
use
yii\helpers\Url
;
use
yii\helpers\ArrayHelper
;
use
yii\jui\DatePicker
;
use
backend\modules\ubux\models\PosisiPaket
;
use
backend\modules\ubux\models\StatusPaket
;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\DataPaketSearch */
/* @var $searchModel backend\modules\ubux\models\search\DataPaketSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this
->
title
=
'Data Paket'
;
$this
->
title
=
'Data Paket'
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
Yii
::
$app
->
timeZone
=
'UTC'
;
?>
?>
<div
class=
"data-paket-index"
>
<div
class=
"data-paket-index"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?php
// echo $this->render('_search', ['model' => $searchModel]); ?>
<?php
$toolbarItemStatusRequest
=
"<a href='"
.
Url
::
to
([
'index-by-pegawai'
])
.
"' class='btn btn-info '><i class='fa fa-refresh'></i> <span class='toolbar-label'>Refresh</span></a>"
;
?>
<?=
Yii
::
$app
->
uiHelper
->
renderToolbar
([
'pull-right'
=>
true
,
'groupTemplate'
=>
[
'groupStatusExpired'
],
'groups'
=>
[
'groupStatusExpired'
=>
[
'template'
=>
[
'filterStatus'
],
'buttons'
=>
[
'filterStatus'
=>
$toolbarItemStatusRequest
,
]
],
],
])
?>
<?=
GridView
::
widget
([
<?=
GridView
::
widget
([
'dataProvider'
=>
$dataProvider
,
'dataProvider'
=>
$dataProvider
,
'filterModel'
=>
$searchModel
,
'columns'
=>
[
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
[
'class'
=>
'yii\grid\SerialColumn'
],
[
[
'attribute'
=>
'pegawai_id'
,
'headerOptions'
=>
[
'style'
=>
'color:#3c8dbc'
],
'label'
=>
'Tag'
,
'value'
=>
function
(
$model
,
$key
,
$index
){
if
(
$model
->
tag
!=
null
){
return
$model
->
tag
;
}
return
'-'
;
}
],
[
'headerOptions'
=>
[
'style'
=>
'color:#3c8dbc'
],
'format'
=>
'raw'
,
'format'
=>
'raw'
,
'label'
=>
'Nama'
,
'label'
=>
'Nama'
,
'value'
=>
function
(
$model
,
$key
,
$index
){
'value'
=>
function
(
$model
,
$key
,
$index
){
if
(
$model
->
pegawai
!=
NULL
){
if
(
$model
->
pegawai
_id
!=
NULL
){
return
$model
->
pegawai
->
nama
;
return
$model
->
pegawai
->
nama
;
}
}
else
{
else
{
...
@@ -37,32 +70,39 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -37,32 +70,39 @@ $this->params['breadcrumbs'][] = $this->title;
'pengirim'
,
'pengirim'
,
[
[
'attribute'
=>
'tanggal_kedatangan'
,
'attribute'
=>
'tanggal_kedatangan'
,
'format'
=>
[
'Date'
,
'php: d M y H:i'
]
'format'
=>
[
'Date'
,
'php: d M y H:i'
],
'filter'
=>
DatePicker
::
widget
([
'model'
=>
$searchModel
,
'attribute'
=>
'tanggal_kedatangan'
,
'dateFormat'
=>
'yyyy-MM-dd'
])
],
],
[
[
'attribute'
=>
'posisi_paket_id'
,
'attribute'
=>
'posisi_paket_id'
,
'label'
=>
'Posisi'
,
'label'
=>
'Posisi'
,
'value'
=>
'posisiPaket.name'
'value'
=>
'posisiPaket.name'
,
],
'filter'
=>
ArrayHelper
::
map
(
PosisiPaket
::
find
()
->
where
(
'deleted!=1'
)
->
asArray
()
->
all
(),
'posisi_paket_id'
,
'name'
),
[
],
'attribute'
=>
'status_paket_id'
,
'format'
=>
'raw'
,
[
'label'
=>
'Status Paket'
,
'attribute'
=>
'status_paket_id'
,
'value'
=>
function
(
$model
,
$key
,
$index
){
'format'
=>
'raw'
,
if
(
$model
->
status_paket_id
==
1
){
'label'
=>
'Status Paket'
,
return
'<b class="text-danger">'
.
$model
->
statusPaket
->
status
.
'</b>'
;
'value'
=>
function
(
$model
,
$key
,
$index
){
}
if
(
$model
->
status_paket_id
==
1
){
else
{
return
'<b class="text-danger">'
.
$model
->
statusPaket
->
status
.
'</b>'
;
}
else
{
return
'<b class="text-success">'
.
$model
->
statusPaket
->
status
.
'</b>'
;
return
'<b class="text-success">'
.
$model
->
statusPaket
->
status
.
'</b>'
;
}
}
}
},
'filter'
=>
ArrayHelper
::
map
(
StatusPaket
::
find
()
->
where
(
'deleted!=1'
)
->
asArray
()
->
all
(),
'status_paket_id'
,
'status'
),
],
],
[
'class'
=>
'common\components\ToolsColumn'
,
[
'class'
=>
'common\components\ToolsColumn'
,
'template'
=>
'{view}'
,
'template'
=>
'{view}'
,
'urlCreator'
=>
function
(
$action
,
$model
,
$key
,
$index
){
'urlCreator'
=>
function
(
$action
,
$model
,
$key
,
$index
){
if
(
$action
===
'view'
)
{
if
(
$action
===
'view'
)
{
return
Url
::
toRoute
([
'data-paket-view'
,
'id'
=>
$key
]);
return
Url
::
toRoute
([
'data-paket-view
-pegawai
'
,
'id'
=>
$key
]);
}
}
}
}
]
]
...
...
backend/modules/ubux/views/data-tamu/TamuView.php
View file @
e03b9a18
...
@@ -9,6 +9,7 @@ use yii\widgets\DetailView;
...
@@ -9,6 +9,7 @@ use yii\widgets\DetailView;
$this
->
title
=
$model
->
nama
;
$this
->
title
=
$model
->
nama
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Data Tamu'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Data Tamu'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
Yii
::
$app
->
timeZone
=
'UTC'
;
?>
?>
<div
class=
"data-tamu-view"
>
<div
class=
"data-tamu-view"
>
...
@@ -16,7 +17,17 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -16,7 +17,17 @@ $this->params['breadcrumbs'][] = $this->title;
<?=
DetailView
::
widget
([
<?=
DetailView
::
widget
([
'model'
=>
$model
,
'model'
=>
$model
,
'attributes'
=>
[
'attributes'
=>
[
'nik'
,
[
'attribute'
=>
'nik'
,
'value'
=>
function
(
$model
){
if
(
$model
->
nik
==
NULL
){
return
'-'
;
}
else
{
return
$model
->
nik
;
}
}
],
'nama'
,
'nama'
,
[
[
'attribute'
=>
'waktu_kedatangan'
,
'attribute'
=>
'waktu_kedatangan'
,
...
...
backend/modules/ubux/views/data-tamu/index.php
View file @
e03b9a18
...
@@ -4,58 +4,102 @@ use yii\helpers\Html;
...
@@ -4,58 +4,102 @@ use yii\helpers\Html;
use
yii\grid\GridView
;
use
yii\grid\GridView
;
use
common\components\ToolsColumn
;
use
common\components\ToolsColumn
;
use
yii\helpers\Url
;
use
yii\helpers\Url
;
use
yii\jui
\DatePicker
;
use
yii\helpers\ArrayHelper
;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\DataTamuSearch */
/* @var $searchModel backend\modules\ubux\models\search\DataTamuSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this
->
title
=
'Data Tamu'
;
$this
->
title
=
'Data Tamu'
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
Yii
::
$app
->
timeZone
=
'UTC'
;
?>
?>
<div
class=
"data-tamu-index"
>
<div
class=
"data-tamu-index"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?php
// echo $this->render('_search', ['model' => $searchModel]); ?>
<?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
,
]
],
],
])
?>
<?=
GridView
::
widget
([
<?=
GridView
::
widget
([
'dataProvider'
=>
$dataProvider
,
'dataProvider'
=>
$dataProvider
,
'tableOptions'
=>
[
'class'
=>
'table table-bordered table-responsive-xl'
],
'filterModel'
=>
$searchModel
,
'filterModel'
=>
$searchModel
,
'columns'
=>
[
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
[
'class'
=>
'yii\grid\SerialColumn'
],
'nik'
,
'nama
'
,
//'data_tamu_id
',
[
[
'attribute'
=>
'waktu_kedatangan'
,
'attribute'
=>
'nik'
,
'format'
=>
[
'date'
,
'php:d M Y H:i:s'
],
'value'
=>
function
(
$model
,
$key
,
$index
){
],
if
(
$model
->
nik
==
NULL
){
return
'-'
;
}
else
{
return
$model
->
nik
;
}
}
],
'nama'
,
[
[
'label'
=>
'Keperluan'
,
'attribute'
=>
'desc'
,
'attribute'
=>
'desc'
,
'label'
=>
'Deskripsi'
,
'value'
=>
'desc'
,
'value'
=>
'desc'
,
],
],
[
[
'attribute'
=>
'waktu_kembali'
,
'attribute'
=>
'waktu_kedatangan'
,
'label'
=>
'Waktu Kembali'
,
'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'
,
'format'
=>
'raw'
,
'format'
=>
'raw'
,
'headerOptions'
=>
[
'style'
=>
'color:#337ab7'
],
'headerOptions'
=>
[
'style'
=>
'color:#337ab7'
],
'value'
=>
function
(
$model
,
$
index
,
$key
){
'value'
=>
function
(
$model
,
$
key
,
$index
){
if
(
$model
->
waktu_kembali
==
NULL
){
if
(
$model
->
waktu_kembali
==
NULL
){
return
'-'
;
return
'-'
;
}
}
else
{
else
{
return
Yii
::
$app
->
formatter
->
asDateTime
(
$model
->
waktu_kembali
,
'php:d M Y H:i
:s
'
);
return
Yii
::
$app
->
formatter
->
asDateTime
(
$model
->
waktu_kembali
,
'php:d M Y H:i'
);
}
}
}
}
],
],
// 'deleted',
[
// 'deleted_at',
'attribute'
=>
'kendaraan'
,
// 'deleted_by',
'value'
=>
function
(
$model
,
$key
,
$index
){
// 'created_by',
if
(
$model
->
kendaraan
==
NULL
){
// 'created_at',
return
'-'
;
// 'updated_at',
}
// 'updated_by',
else
{
return
$model
->
kendaraan
;
}
},
'filter'
=>
array
(
'Tidak Berkendara'
=>
'Tidak Berkendara'
,
'Kendaraan Roda 2'
=>
'Kendaraan Roda 2'
,
'Kendaraan Roda 4'
=>
'Kendaraan Roda 4'
),
],
[
'class'
=>
'common\components\ToolsColumn'
,
[
'class'
=>
'common\components\ToolsColumn'
,
'template'
=>
'{view} {delete}'
,
'template'
=>
'{view} {delete}'
,
...
...
backend/modules/ubux/views/kendaraan/index.php
View file @
e03b9a18
...
@@ -4,6 +4,7 @@ use yii\helpers\Html;
...
@@ -4,6 +4,7 @@ use yii\helpers\Html;
use
yii\grid\GridView
;
use
yii\grid\GridView
;
use
yii\helpers\Url
;
use
yii\helpers\Url
;
use
common\components\ToolsColumn
;
use
common\components\ToolsColumn
;
use
yii\base\Model
;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\KendaraanSearch */
/* @var $searchModel backend\modules\ubux\models\KendaraanSearch */
...
@@ -24,6 +25,11 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -24,6 +25,11 @@ $this->params['breadcrumbs'][] = $this->title;
<?=
GridView
::
widget
([
<?=
GridView
::
widget
([
'dataProvider'
=>
$dataProvider
,
'dataProvider'
=>
$dataProvider
,
'filterModel'
=>
$searchModel
,
'filterModel'
=>
$searchModel
,
'rowOptions'
=>
function
(
$model
){
if
(
$model
->
status
==
0
)
return
[
'class'
=>
'pasif'
];
else
return
[
'class'
=>
'danger'
];
},
'columns'
=>
[
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
[
'class'
=>
'yii\grid\SerialColumn'
],
...
@@ -31,7 +37,13 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -31,7 +37,13 @@ $this->params['breadcrumbs'][] = $this->title;
'kendaraan'
,
'kendaraan'
,
'plat_nomor'
,
'plat_nomor'
,
'daya_tampung_kendaraan'
,
'daya_tampung_kendaraan'
,
[
'attribute'
=>
'Ketersediaan'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
status
==
0
)
return
'Tersedia'
;
else
return
'Terpakai'
;
}
],
// 'deleted',
// 'deleted',
// 'deleted_at',
// 'deleted_at',
// 'deleted_by',
// 'deleted_by',
...
...
backend/modules/ubux/views/kendaraan/view.php
View file @
e03b9a18
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
use
yii\helpers\Html
;
use
yii\helpers\Html
;
use
yii\widgets\DetailView
;
use
yii\widgets\DetailView
;
use
yii\base\Model
;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Kendaraan */
/* @var $model backend\modules\ubux\models\Kendaraan */
...
@@ -32,6 +33,13 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -32,6 +33,13 @@ $this->params['breadcrumbs'][] = $this->title;
'kendaraan'
,
'kendaraan'
,
'plat_nomor'
,
'plat_nomor'
,
'daya_tampung_kendaraan'
,
'daya_tampung_kendaraan'
,
[
'attribute'
=>
'Ketersediaan'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
status
==
0
)
return
'Tersedia'
;
else
return
'Terpakai'
;
}
],
// 'deleted',
// 'deleted',
// 'deleted_at',
// 'deleted_at',
// 'deleted_by',
// 'deleted_by',
...
...
backend/modules/ubux/views/laporan-pemakaian-kendaraan/_form.php
View file @
e03b9a18
...
@@ -7,6 +7,7 @@ use yii\helpers\ArrayHelper;
...
@@ -7,6 +7,7 @@ use yii\helpers\ArrayHelper;
use
backend\modules\ubux\models\Kendaraan
;
use
backend\modules\ubux\models\Kendaraan
;
use
backend\modules\ubux\models\Supir
;
use
backend\modules\ubux\models\Supir
;
use
yii\bootstrap\ActiveForm
;
use
yii\bootstrap\ActiveForm
;
use
backend\modules\ubux\models\PemakaianKendaraan
;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\LaporanPemakaianKendaraan */
/* @var $model backend\modules\ubux\models\LaporanPemakaianKendaraan */
...
@@ -44,7 +45,7 @@ use yii\bootstrap\ActiveForm;
...
@@ -44,7 +45,7 @@ use yii\bootstrap\ActiveForm;
'autoClose'
=>
true
,
'autoClose'
=>
true
,
'format'
=>
'yyyy-mm-dd HH:ii:ss'
,
'format'
=>
'yyyy-mm-dd HH:ii:ss'
,
'todayBtn'
=>
true
,
'todayBtn'
=>
true
,
]
]
,
]);
?>
]);
?>
<?=
$form
->
field
(
$model
,
'waktu_tiba'
)
->
widget
(
DateTimePicker
::
className
(),[
<?=
$form
->
field
(
$model
,
'waktu_tiba'
)
->
widget
(
DateTimePicker
::
className
(),[
...
@@ -74,8 +75,8 @@ use yii\bootstrap\ActiveForm;
...
@@ -74,8 +75,8 @@ use yii\bootstrap\ActiveForm;
-->
-->
<?=
$form
->
field
(
$model
,
'kendaraan_id'
)
->
dropDownList
(
<?=
$form
->
field
(
$model
,
'kendaraan_id'
)
->
dropDownList
(
ArrayHelper
::
map
(
Kendaraan
::
find
()
->
select
([
ArrayHelper
::
map
(
Kendaraan
::
find
()
->
select
([
'kendaraan_id'
,
'kendaraan'
,
'plat_nomor'
'kendaraan_id'
,
'kendaraan'
,
'plat_nomor'
,
'status'
,
])
->
where
(
'deleted!=1'
)
->
orderBy
([
'kendaraan'
=>
SORT_ASC
])
->
all
(),
'kendaraan_id'
,
'KeteranganKendaraan'
),
])
->
where
(
[
'deleted'
=>
0
])
->
all
(),
'kendaraan_id'
,
'KeteranganKendaraan'
),
[
'prompt'
=>
'Pilih Kendaraan'
]
[
'prompt'
=>
'Pilih Kendaraan'
]
)
?>
)
?>
...
...
backend/modules/ubux/views/laporan-pemakaian-kendaraan/_formLaporanPemakaianKendaraan.php
0 → 100644
View file @
e03b9a18
<?php
use
yii\helpers\Html
;
//use yii\widgets\ActiveForm;
use
dosamigos\datetimepicker\DateTimePicker
;
use
yii\helpers\ArrayHelper
;
use
backend\modules\ubux\models\Kendaraan
;
use
backend\modules\ubux\models\Supir
;
use
yii\bootstrap\ActiveForm
;
use
backend\modules\ubux\models\PemakaianKendaraan
;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\LaporanPemakaianKendaraan */
/* @var $form yii\widgets\ActiveForm */
$this
->
title
=
'Tambah Laporan Pemakaian Kendaraan'
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Laporan Pemakaian Kendaraan'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$id
=
Yii
::
$app
->
request
->
get
(
'id'
);
if
(
$id
!=
null
){
$pemakaian_kendaraan
=
PemakaianKendaraan
::
findOne
(
$id
);
$tujuan
=
$pemakaian_kendaraan
->
tujuan
;
$jumlah_penumpang
=
$pemakaian_kendaraan
->
jumlah_penumpang_kendaraan
;
$keperluan
=
$pemakaian_kendaraan
->
desc
;
}
?>
<div
class=
"ubux-laporan-pemakaian-kendaraan-form"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?php
$form
=
ActiveForm
::
begin
([
'layout'
=>
'horizontal'
,
'fieldConfig'
=>
[
'template'
=>
"
{
label}\n{beginWrapper}\n{input}\n{error}\n{endWrapper}\n{hint
}
"
,
'horizontalCssClasses'
=>
[
'label'
=>
'col-sm-2'
,
'wrapper'
=>
'col-sm-8'
,
'error'
=>
''
,
'hint'
=>
''
,
],
],
]);
?>
<?=
$form
->
field
(
$model
,
'tujuan'
)
->
textarea
([
'value'
=>
$tujuan
,
])
?>
<?=
$form
->
field
(
$model
,
'desc'
)
->
textarea
()
?>
<?=
$form
->
field
(
$model
,
'jumlah_penumpang'
)
->
textInput
([
'value'
=>
$jumlah_penumpang
,
])
?>
<?=
$form
->
field
(
$model
,
'keperluan'
)
->
textarea
([
'value'
=>
$keperluan
,
])
?>
<?=
$form
->
field
(
$model
,
'waktu_keberangkatan'
)
->
widget
(
DateTimePicker
::
className
(),[
'inline'
=>
false
,
'pickButtonIcon'
=>
'glyphicon glyphicon-time'
,
'size'
=>
'ms'
,
'clientOptions'
=>
[
'autoClose'
=>
true
,
'format'
=>
'yyyy-mm-dd HH:ii:ss'
,
'todayBtn'
=>
true
,
],
]);
?>
<?=
$form
->
field
(
$model
,
'waktu_tiba'
)
->
widget
(
DateTimePicker
::
className
(),[
'inline'
=>
false
,
'pickButtonIcon'
=>
'glyphicon glyphicon-time'
,
'size'
=>
'ms'
,
'clientOptions'
=>
[
'autoClose'
=>
true
,
'format'
=>
'yyyy-mm-dd HH:ii:ss'
,
'todayBtn'
=>
true
,
]
]);
?>
<!--
<?=
$form
->
field
(
$model
,
'deleted'
)
->
textInput
()
?>
<?=
$form
->
field
(
$model
,
'deleted_at'
)
->
textInput
()
?>
<?=
$form
->
field
(
$model
,
'deleted_by'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'created_at'
)
->
textInput
()
?>
<?=
$form
->
field
(
$model
,
'created_by'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'updated_at'
)
->
textInput
()
?>
<?=
$form
->
field
(
$model
,
'updated_by'
)
->
textInput
([
'maxlength'
=>
true
])
?>
-->
<?=
$form
->
field
(
$model
,
'kendaraan_id'
)
->
dropDownList
(
ArrayHelper
::
map
(
Kendaraan
::
find
()
->
select
([
'kendaraan_id'
,
'kendaraan'
,
'plat_nomor'
,
'status'
,
])
->
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'
),
[
'prompt'
=>
'Pilih Supir'
]
)
?>
<?=
$form
->
field
(
$model
,
'pemakaian_kendaraan_id'
)
->
textInput
([
'value'
=>
$id
,
])
?>
<div
class=
"form-group"
>
<div
class=
"col-md-1 col-md-offset-2"
>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
'Buat'
:
'Ubah'
,
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
</div></div>
<?php
ActiveForm
::
end
();
?>
</div>
backend/modules/ubux/views/laporan-pemakaian-kendaraan/index.php
View file @
e03b9a18
...
@@ -17,9 +17,9 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -17,9 +17,9 @@ $this->params['breadcrumbs'][] = $this->title;
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<p>
<
!-- <
p>
<?=
Html
::
a
(
'Tambah Laporan Pemakaian Kendaraan'
,
[
'add'
],
[
'class'
=>
'btn btn-success'
])
?>
<?=
Html
::
a
(
'Tambah Laporan Pemakaian Kendaraan'
,
[
'add'
],
[
'class'
=>
'btn btn-success'
])
?>
</p>
</p>
-->
<?=
GridView
::
widget
([
<?=
GridView
::
widget
([
'dataProvider'
=>
$dataProvider
,
'dataProvider'
=>
$dataProvider
,
...
...
backend/modules/ubux/views/laporan-pemakaian-kendaraan/viewPdf.php
View file @
e03b9a18
...
@@ -18,6 +18,9 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -18,6 +18,9 @@ $this->params['breadcrumbs'][] = $this->title;
.tengah
{
.tengah
{
text-align
:
center
;
text-align
:
center
;
}
}
.kanan
{
text-align
:
right
;
}
table
,
th
,
td
{
table
,
th
,
td
{
border-collapse
:
collapse
;
border-collapse
:
collapse
;
}
}
...
@@ -153,5 +156,5 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -153,5 +156,5 @@ $this->params['breadcrumbs'][] = $this->title;
<td>www.del.ac.id</td>
<td>www.del.ac.id</td>
</tr>
</tr>
</table>
</table>
</div>
</div>
backend/modules/ubux/views/pemakaian-kendaraan-mhs/_form.php
View file @
e03b9a18
...
@@ -54,7 +54,7 @@ use dosamigos\datetimepicker\DateTimePicker;
...
@@ -54,7 +54,7 @@ use dosamigos\datetimepicker\DateTimePicker;
]
]
]);
?>
]);
?>
<?=
$form
->
field
(
$model
,
'
proposal'
)
->
fileInput
(
)
?>
<?=
$form
->
field
(
$model
,
'
file'
)
->
fileInput
()
->
hint
(
'File Type : PDF / DOC/ DOCX'
)
?>
<?=
$form
->
field
(
$model
,
'no_telepon'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'no_telepon'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<!--
<!--
...
...
backend/modules/ubux/views/pemakaian-kendaraan-mhs/add.php
View file @
e03b9a18
...
@@ -6,7 +6,7 @@ use yii\helpers\Html;
...
@@ -6,7 +6,7 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraanMhs */
/* @var $model backend\modules\ubux\models\PemakaianKendaraanMhs */
$this
->
title
=
'Buat Permohonan Pemakaian'
;
$this
->
title
=
'Buat Permohonan Pemakaian
Mahasiswa
'
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Permohonan Pemakaian'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Permohonan Pemakaian'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
?>
?>
...
...
backend/modules/ubux/views/pemakaian-kendaraan-mhs/edit.php
View file @
e03b9a18
...
@@ -5,7 +5,7 @@ use yii\helpers\Html;
...
@@ -5,7 +5,7 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraanMhs */
/* @var $model backend\modules\ubux\models\PemakaianKendaraanMhs */
$this
->
title
=
'Ubah Permohonan Pemakaian'
;
$this
->
title
=
'Ubah Permohonan Pemakaian
Mahasiswa
'
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Permohonan Pemakaian'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Permohonan Pemakaian'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
pemakaian_kendaraan_mhs_id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
pemakaian_kendaraan_mhs_id
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
pemakaian_kendaraan_mhs_id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
pemakaian_kendaraan_mhs_id
]];
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
...
...
backend/modules/ubux/views/pemakaian-kendaraan-mhs/index.php
View file @
e03b9a18
...
@@ -8,7 +8,7 @@ use yii\helpers\Url;
...
@@ -8,7 +8,7 @@ use yii\helpers\Url;
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanMahasiswaSearch */
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanMahasiswaSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this
->
title
=
'Permohonan Pemakaian'
;
$this
->
title
=
'Permohonan Pemakaian
Mahasiswa
'
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
?>
?>
<div
class=
"ubux-transaksi-kendaraan-mahasiswa-baru-index"
>
<div
class=
"ubux-transaksi-kendaraan-mahasiswa-baru-index"
>
...
@@ -23,6 +23,11 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -23,6 +23,11 @@ $this->params['breadcrumbs'][] = $this->title;
<?=
GridView
::
widget
([
<?=
GridView
::
widget
([
'dataProvider'
=>
$dataProvider
,
'dataProvider'
=>
$dataProvider
,
'filterModel'
=>
$searchModel
,
'filterModel'
=>
$searchModel
,
'rowOptions'
=>
function
(
$model
){
if
(
$model
->
status_req_sekretaris_rektorat
==
3
)
return
[
'class'
=>
'danger'
];
elseif
(
$model
->
status_req_sekretaris_rektorat
==
2
)
return
[
'class'
=>
'success'
];
else
return
[];
},
'columns'
=>
[
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
[
'class'
=>
'yii\grid\SerialColumn'
],
...
...
backend/modules/ubux/views/pemakaian-kendaraan-mhs/indexByKemahasiswaan.php
View file @
e03b9a18
...
@@ -21,6 +21,11 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -21,6 +21,11 @@ $this->params['breadcrumbs'][] = $this->title;
<?=
GridView
::
widget
([
<?=
GridView
::
widget
([
'dataProvider'
=>
$dataProvider
,
'dataProvider'
=>
$dataProvider
,
'filterModel'
=>
$searchModel
,
'filterModel'
=>
$searchModel
,
'rowOptions'
=>
function
(
$model
){
if
(
$model
->
status_request_kemahasiswaan
==
3
)
return
[
'class'
=>
'danger'
];
elseif
(
$model
->
status_request_kemahasiswaan
==
2
)
return
[
'class'
=>
'success'
];
else
return
[];
},
'columns'
=>
[
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
[
'class'
=>
'yii\grid\SerialColumn'
],
...
...
backend/modules/ubux/views/pemakaian-kendaraan-mhs/view.php
View file @
e03b9a18
...
@@ -106,7 +106,8 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -106,7 +106,8 @@ $this->params['breadcrumbs'][] = $this->title;
[
[
'attribute'
=>
'proposal'
,
'attribute'
=>
'proposal'
,
'format'
=>
'html'
,
'format'
=>
'html'
,
'value'
=>
isset
(
$model
->
proposal
)
&&
$model
->
proposal
!==
''
?
LinkHelper
::
renderLink
([
'options'
=>
'target = _blank'
,
'label'
=>
$model
->
proposal
,
'url'
=>
\Yii
::
$app
->
fileManager
->
generateUri
(
$model
->
kode_proposal
)])
:
'-'
,
'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)]):'-',
],
],
],
],
])
?>
])
?>
...
...
backend/modules/ubux/views/pemakaian-kendaraan-mhs/viewByKemahasiswaan.php
View file @
e03b9a18
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
use
yii\helpers\Html
;
use
yii\helpers\Html
;
use
yii\widgets\DetailView
;
use
yii\widgets\DetailView
;
use
yii\base\Model
;
use
yii\base\Model
;
use
common\helpers\LinkHelper
;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraanMhs */
/* @var $model backend\modules\ubux\models\PemakaianKendaraanMhs */
...
...
backend/modules/ubux/views/pemakaian-kendaraan/_formBySekretarisRektorat.php
View file @
e03b9a18
...
@@ -9,6 +9,8 @@ use backend\modules\ubux\models\Supir;
...
@@ -9,6 +9,8 @@ use backend\modules\ubux\models\Supir;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */
/* @var $form yii\widgets\ActiveForm */
/* @var $form yii\widgets\ActiveForm */
$this
->
title
=
'Persetujuan Permohonan Pemakaian'
;
?>
?>
<div
class=
"ubux-transaksi-kendaraan-mahasiswa-form"
>
<div
class=
"ubux-transaksi-kendaraan-mahasiswa-form"
>
...
@@ -30,15 +32,15 @@ use backend\modules\ubux\models\Supir;
...
@@ -30,15 +32,15 @@ use backend\modules\ubux\models\Supir;
<?=
$form
->
field
(
$model
,
'kendaraan_id'
)
->
dropDownList
(
<?=
$form
->
field
(
$model
,
'kendaraan_id'
)
->
dropDownList
(
ArrayHelper
::
map
(
Kendaraan
::
find
()
->
select
([
ArrayHelper
::
map
(
Kendaraan
::
find
()
->
select
([
'kendaraan_id'
,
'kendaraan'
,
'plat_nomor'
'kendaraan_id'
,
'kendaraan'
,
'plat_nomor'
,
'status'
,
])
->
where
([
'deleted'
=>
0
])
->
all
(),
'kendaraan_id'
,
'KeteranganKendaraan'
),
])
->
where
([
'deleted'
=>
0
,
'status'
=>
0
])
->
all
(),
'kendaraan_id'
,
'KeteranganKendaraan'
),
[
'prompt'
=>
'Pilih Kendaraan'
]
[
'prompt'
=>
'Pilih Kendaraan'
]
)
?>
)
?>
<?=
$form
->
field
(
$model
,
'supir_id'
)
->
dropDownList
(
<?=
$form
->
field
(
$model
,
'supir_id'
)
->
dropDownList
(
ArrayHelper
::
map
(
Supir
::
find
()
->
select
([
ArrayHelper
::
map
(
Supir
::
find
()
->
select
([
'supir_id'
,
'pegawai_id'
,
'supir_id'
,
'pegawai_id'
,
'status'
,
])
->
where
([
'deleted'
=>
0
])
->
all
(),
'supir_id'
,
'NamaSupir'
),
])
->
where
([
'deleted'
=>
0
,
'status'
=>
0
])
->
all
(),
'supir_id'
,
'NamaSupir'
),
[
'prompt'
=>
'Pilih Supir'
]
[
'prompt'
=>
'Pilih Supir'
]
)
?>
)
?>
<!--
<!--
...
...
backend/modules/ubux/views/pemakaian-kendaraan/_formEditBySekretarisRektorat.php
0 → 100644
View file @
e03b9a18
<?php
use
yii\helpers\Html
;
use
yii\bootstrap\ActiveForm
;
use
common\helpers\ArrayHelper
;
use
backend\modules\ubux\models\Kendaraan
;
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
=
'Ubah Permohonan Pemakaian'
;
?>
<div
class=
"ubux-transaksi-kendaraan-mahasiswa-form"
>
<h1>
Catatan :
</h1>
<?php
$form
=
ActiveForm
::
begin
([
'layout'
=>
'horizontal'
,
'fieldConfig'
=>
[
'template'
=>
"
{
label}\n{beginWrapper}\n{input}\n{error}\n{endWrapper}\n{hint
}
"
,
'horizontalCssClasses'
=>
[
'label'
=>
'col-sm-2'
,
'wrapper'
=>
'col-sm-8'
,
'error'
=>
''
,
'hint'
=>
''
,
],
],
]);
?>
<?=
$form
->
field
(
$model
,
'kendaraan_id'
)
->
dropDownList
(
ArrayHelper
::
map
(
Kendaraan
::
find
()
->
select
([
'kendaraan_id'
,
'kendaraan'
,
'plat_nomor'
,
'status'
,
])
->
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
])
->
all
(),
'supir_id'
,
'NamaSupir'
),
[
'prompt'
=>
'Pilih Supir'
]
)
?>
<!--
<?=
$form
->
field
(
$model
,
'no_hp_supir'
)
->
textInput
()
?>
-->
<div
class=
"form-group"
>
<div
class=
"col-md-1 col-md-offset-2"
>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
'Buat'
:
'Tambah'
,
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-success'
])
?>
</div>
</div>
<?php
ActiveForm
::
end
();
?>
</div>
backend/modules/ubux/views/pemakaian-kendaraan/indexByPegawai.php
View file @
e03b9a18
...
@@ -24,6 +24,10 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -24,6 +24,10 @@ $this->params['breadcrumbs'][] = $this->title;
<?=
GridView
::
widget
([
<?=
GridView
::
widget
([
'dataProvider'
=>
$dataProvider
,
'dataProvider'
=>
$dataProvider
,
'filterModel'
=>
$searchModel
,
'filterModel'
=>
$searchModel
,
'rowOptions'
=>
function
(
$model
){
if
(
$model
->
status_req_sekretaris_rektorat
==
3
)
return
[
'class'
=>
'danger'
];
else
return
[
'class'
=>
'Pasif'
];
},
'columns'
=>
[
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
[
'class'
=>
'yii\grid\SerialColumn'
],
...
...
backend/modules/ubux/views/pemakaian-kendaraan/indexByPribadi.php
View file @
e03b9a18
...
@@ -27,6 +27,10 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -27,6 +27,10 @@ $this->params['breadcrumbs'][] = $this->title;
<?= GridView::widget([
<?= GridView::widget([
'dataProvider' =>
$dataProvider
,
'dataProvider' =>
$dataProvider
,
'filterModel' =>
$searchModel
,
'filterModel' =>
$searchModel
,
'rowOptions' => function(
$model
){
if(
$model->status_req_sekretaris_rektorat
== 3) return ['class' => 'danger'];
else return ['class' => 'Pasif'];
},
'columns' => [
'columns' => [
['class' => 'yii\grid\SerialColumn'],
['class' => 'yii\grid\SerialColumn'],
...
...
backend/modules/ubux/views/pemakaian-kendaraan/indexBySekretarisRektorat.php
View file @
e03b9a18
...
@@ -9,7 +9,7 @@ use yii\base\Model;
...
@@ -9,7 +9,7 @@ use yii\base\Model;
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this
->
title
=
'Permohonan Pemakaian'
;
$this
->
title
=
'
Semua
Permohonan Pemakaian'
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
?>
?>
<div
class=
"ubux-transaksi-kendaraan-mahasiswa-index"
>
<div
class=
"ubux-transaksi-kendaraan-mahasiswa-index"
>
...
@@ -24,6 +24,11 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -24,6 +24,11 @@ $this->params['breadcrumbs'][] = $this->title;
<?=
GridView
::
widget
([
<?=
GridView
::
widget
([
'dataProvider'
=>
$dataProvider
,
'dataProvider'
=>
$dataProvider
,
'filterModel'
=>
$searchModel
,
'filterModel'
=>
$searchModel
,
'rowOptions'
=>
function
(
$model
){
if
(
$model
->
status_req_sekretaris_rektorat
==
3
)
return
[
'class'
=>
'danger'
];
elseif
(
$model
->
status_req_sekretaris_rektorat
==
2
)
return
[
'class'
=>
'success'
];
else
return
[];
},
'columns'
=>
[
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
[
'class'
=>
'yii\grid\SerialColumn'
],
// 'pegawai_id',
// 'pegawai_id',
...
@@ -39,8 +44,8 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -39,8 +44,8 @@ $this->params['breadcrumbs'][] = $this->title;
],
],
'desc'
,
'desc'
,
'tujuan'
,
'tujuan'
,
'jumlah_penumpang_kendaraan'
,
//
'jumlah_penumpang_kendaraan',
'rencana_waktu_keberangkatan'
,
//
'rencana_waktu_keberangkatan',
// 'rencana_waktu_kembali',
// 'rencana_waktu_kembali',
// 'status_request_kemahasiswaan',
// 'status_request_kemahasiswaan',
// 'jenis_keperluan_id',
// 'jenis_keperluan_id',
...
@@ -73,8 +78,15 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -73,8 +78,15 @@ $this->params['breadcrumbs'][] = $this->title;
'value'
=>
'statusRequestSekretarisRektorat.status'
'value'
=>
'statusRequestSekretarisRektorat.status'
],
],
[
[
'attribute'
=>
'Laporan Pemakaian'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
laporan
==
0
)
return
'Belum Ada'
;
else
return
'Sudah Dibuat'
;
}
],
[
'class'
=>
'common\components\ToolsColumn'
,
'class'
=>
'common\components\ToolsColumn'
,
'template'
=>
'{view}{acc}{
rej
}'
,
'template'
=>
'{view}{acc}{
edit}{rej}{laporan
}'
,
'urlCreator'
=>
function
(
$action
,
$model
,
$key
,
$index
){
'urlCreator'
=>
function
(
$action
,
$model
,
$key
,
$index
){
if
(
$action
===
'view'
){
if
(
$action
===
'view'
){
return
Url
::
toRoute
([
'view-by-sekretaris-rektorat'
,
'id'
=>
$key
]);
return
Url
::
toRoute
([
'view-by-sekretaris-rektorat'
,
'id'
=>
$key
]);
...
@@ -82,9 +94,15 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -82,9 +94,15 @@ $this->params['breadcrumbs'][] = $this->title;
if
(
$action
===
'acc'
){
if
(
$action
===
'acc'
){
return
Url
::
toRoute
([
'accept-by-sekretaris-rektorat'
,
'id'
=>
$key
]);
return
Url
::
toRoute
([
'accept-by-sekretaris-rektorat'
,
'id'
=>
$key
]);
}
}
if
(
$action
===
'edit'
){
return
Url
::
toRoute
([
'edit-by-sekretaris-rektorat'
,
'id'
=>
$key
]);
}
if
(
$action
===
'rej'
){
if
(
$action
===
'rej'
){
return
Url
::
toRoute
([
'reject-by-sekretaris-rektorat'
,
'id'
=>
$key
]);
return
Url
::
toRoute
([
'reject-by-sekretaris-rektorat'
,
'id'
=>
$key
]);
}
}
if
(
$action
===
'laporan'
){
return
Url
::
toRoute
([
'laporan-pemakaian-kendaraan/add-laporan-pemakaian'
,
'id'
=>
$key
]);
}
}
}
],
],
],
],
...
...
backend/modules/ubux/views/pemakaian-kendaraan/viewByKabiroKsd.php
View file @
e03b9a18
...
@@ -64,7 +64,17 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -64,7 +64,17 @@ $this->params['breadcrumbs'][] = $this->title;
}
}
},
},
],
],
'no_hp_supir'
,
// 'no_hp_supir',
[
'attribute'
=>
'no_hp_supir'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
supir_id
!=
null
){
return
$model
->
supir
->
no_telepon_supir
;
}
else
{
return
'-'
;
}
},
],
[
[
'attribute'
=>
'Status Request Sekretaris Rektorat'
,
'attribute'
=>
'Status Request Sekretaris Rektorat'
,
'value'
=>
$model
->
statusRequestSekretarisRektorat
->
status
,
'value'
=>
$model
->
statusRequestSekretarisRektorat
->
status
,
...
...
backend/modules/ubux/views/pemakaian-kendaraan/viewByKeuangan.php
View file @
e03b9a18
...
@@ -64,7 +64,17 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -64,7 +64,17 @@ $this->params['breadcrumbs'][] = $this->title;
}
}
},
},
],
],
'no_hp_supir'
,
// 'no_hp_supir',
[
'attribute'
=>
'no_hp_supir'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
supir_id
!=
null
){
return
$model
->
supir
->
no_telepon_supir
;
}
else
{
return
'-'
;
}
},
],
[
[
'attribute'
=>
'Status Request Sekretaris Rektorat'
,
'attribute'
=>
'Status Request Sekretaris Rektorat'
,
'value'
=>
$model
->
statusRequestSekretarisRektorat
->
status
,
'value'
=>
$model
->
statusRequestSekretarisRektorat
->
status
,
...
...
backend/modules/ubux/views/pemakaian-kendaraan/viewByPegawai.php
View file @
e03b9a18
...
@@ -83,7 +83,17 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -83,7 +83,17 @@ $this->params['breadcrumbs'][] = $this->title;
}
}
},
},
],
],
'no_hp_supir'
,
// 'no_hp_supir',
[
'attribute'
=>
'no_hp_supir'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
supir_id
!=
null
){
return
$model
->
supir
->
no_telepon_supir
;
}
else
{
return
'-'
;
}
},
],
],
],
])
?>
])
?>
...
...
backend/modules/ubux/views/pemakaian-kendaraan/viewByPribadi.php
View file @
e03b9a18
...
@@ -76,7 +76,17 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -76,7 +76,17 @@ $this->params['breadcrumbs'][] = $this->title;
}
}
},
},
],
],
'no_hp_supir'
,
// 'no_hp_supir',
[
'attribute'
=>
'no_hp_supir'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
supir_id
!=
null
){
return
$model
->
supir
->
no_telepon_supir
;
}
else
{
return
'-'
;
}
},
],
[
[
'attribute'
=>
'Status Request Sekretaris Rektorat'
,
'attribute'
=>
'Status Request Sekretaris Rektorat'
,
'value'
=>
$model
->
statusRequestSekretarisRektorat
->
status
,
'value'
=>
$model
->
statusRequestSekretarisRektorat
->
status
,
...
...
backend/modules/ubux/views/pemakaian-kendaraan/viewBySekretarisRektorat.php
View file @
e03b9a18
...
@@ -16,8 +16,12 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -16,8 +16,12 @@ $this->params['breadcrumbs'][] = $this->title;
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?php
<?php
echo
Html
::
a
(
'Terima'
,
[
'accept-by-sekretaris-rektorat'
,
'id'
=>
$model
->
pemakaian_kendaraan_id
],
[
'class'
=>
'btn btn-success'
]);
if
(
$model
->
status_req_sekretaris_rektorat
==
2
){
echo
Html
::
a
(
'Tolak'
,
[
'reject-by-sekretaris-rektorat'
,
'id'
=>
$model
->
pemakaian_kendaraan_id
],
[
'class'
=>
'btn btn-danger'
]);
echo
Html
::
a
(
'Ubah'
,
[
'edit-by-sekretaris-rektorat'
,
'id'
=>
$model
->
pemakaian_kendaraan_id
],
[
'class'
=>
'btn btn-warning'
]);
echo
' '
;
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
' '
;
echo
Html
::
a
(
'Tolak'
,
[
'reject-by-sekretaris-rektorat'
,
'id'
=>
$model
->
pemakaian_kendaraan_id
],
[
'class'
=>
'btn btn-danger'
]);
echo
' '
;
?>
?>
<?=
DetailView
::
widget
([
<?=
DetailView
::
widget
([
...
...
backend/modules/ubux/views/posisi-paket/_form.php
View file @
e03b9a18
...
@@ -24,8 +24,8 @@ use yii\bootstrap\ActiveForm;
...
@@ -24,8 +24,8 @@ use yii\bootstrap\ActiveForm;
],
],
])
])
?>
?>
<?=
$form
->
field
(
$model
,
'name'
)
?>
<?=
$form
->
field
(
$model
,
'name'
)
->
textInput
(
)
?>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<div
class=
"col-md-1 col-md-offset-2"
>
<div
class=
"col-md-1 col-md-offset-2"
>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
'Create'
:
'Update'
,
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
'Create'
:
'Update'
,
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
...
...
backend/modules/ubux/views/supir/index.php
View file @
e03b9a18
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
use
yii\helpers\Html
;
use
yii\helpers\Html
;
use
yii\grid\GridView
;
use
yii\grid\GridView
;
use
yii\helpers\Url
;
use
yii\helpers\Url
;
use
yii\base\Model
;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\SupirSearch */
/* @var $searchModel backend\modules\ubux\models\SupirSearch */
...
@@ -23,6 +24,11 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -23,6 +24,11 @@ $this->params['breadcrumbs'][] = $this->title;
<?=
GridView
::
widget
([
<?=
GridView
::
widget
([
'dataProvider'
=>
$dataProvider
,
'dataProvider'
=>
$dataProvider
,
'filterModel'
=>
$searchModel
,
'filterModel'
=>
$searchModel
,
'rowOptions'
=>
function
(
$model
){
if
(
$model
->
status
==
0
)
return
[
'class'
=>
'pasif'
];
else
return
[
'class'
=>
'danger'
];
},
'columns'
=>
[
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
[
'class'
=>
'yii\grid\SerialColumn'
],
...
@@ -33,6 +39,13 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -33,6 +39,13 @@ $this->params['breadcrumbs'][] = $this->title;
'value'
=>
'pegawai.nama'
,
'value'
=>
'pegawai.nama'
,
],
],
'no_telepon_supir'
,
'no_telepon_supir'
,
[
'attribute'
=>
'Ketersediaan'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
status
==
0
)
return
'Tersedia'
;
else
return
'Terpakai'
;
}
],
// 'deleted',
// 'deleted',
// 'deleted_at',
// 'deleted_at',
// 'deleted_by',
// 'deleted_by',
...
...
backend/modules/ubux/views/supir/view.php
View file @
e03b9a18
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
use
yii\helpers\Html
;
use
yii\helpers\Html
;
use
yii\widgets\DetailView
;
use
yii\widgets\DetailView
;
use
yii\base\Model
;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Supir */
/* @var $model backend\modules\ubux\models\Supir */
...
@@ -19,7 +20,7 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -19,7 +20,7 @@ $this->params['breadcrumbs'][] = $this->title;
<?=
Html
::
a
(
'Hapus'
,
[
'del'
,
'id'
=>
$model
->
supir_id
],
[
<?=
Html
::
a
(
'Hapus'
,
[
'del'
,
'id'
=>
$model
->
supir_id
],
[
'class'
=>
'btn btn-danger'
,
'class'
=>
'btn btn-danger'
,
'data'
=>
[
'data'
=>
[
'confirm'
=>
'A
re you sure you want to delete this item
?'
,
'confirm'
=>
'A
pakan anda yakin ingin menghapus
?'
,
'method'
=>
'post'
,
'method'
=>
'post'
,
],
],
])
?>
])
?>
...
@@ -35,6 +36,13 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -35,6 +36,13 @@ $this->params['breadcrumbs'][] = $this->title;
'value'
=>
$model
->
pegawai
->
nama
,
'value'
=>
$model
->
pegawai
->
nama
,
],
],
'no_telepon_supir'
,
'no_telepon_supir'
,
[
'attribute'
=>
'Ketersediaan'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
status
==
0
)
return
'On'
;
else
return
'Off'
;
}
],
// 'deleted',
// 'deleted',
// 'deleted_at',
// 'deleted_at',
// 'deleted_by',
// 'deleted_by',
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment