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
ef1e1b0b
Commit
ef1e1b0b
authored
May 31, 2018
by
Hendro Prabowo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revisi Integrasi 2
parent
0a7c2d1d
Show whitespace changes
Inline
Side-by-side
Showing
58 changed files
with
596 additions
and
402 deletions
+596
-402
PemakaianKendaraanController.php
...modules/ubux/controllers/PemakaianKendaraanController.php
+46
-45
PemakaianKendaraanMhsController.php
...ules/ubux/controllers/PemakaianKendaraanMhsController.php
+32
-33
SupirController.php
backend/modules/ubux/controllers/SupirController.php
+3
-7
Dim.php
backend/modules/ubux/models/Dim.php
+1
-1
JenisKeperluan.php
backend/modules/ubux/models/JenisKeperluan.php
+1
-1
Kendaraan.php
backend/modules/ubux/models/Kendaraan.php
+1
-1
LaporanPemakaianKendaraan.php
backend/modules/ubux/models/LaporanPemakaianKendaraan.php
+4
-4
PemakaianKendaraan.php
backend/modules/ubux/models/PemakaianKendaraan.php
+19
-22
PemakaianKendaraanMhs.php
backend/modules/ubux/models/PemakaianKendaraanMhs.php
+10
-10
StatusRequest.php
backend/modules/ubux/models/StatusRequest.php
+5
-5
Supir.php
backend/modules/ubux/models/Supir.php
+5
-6
LaporanPemakaianKendaraanSearch.php
...es/ubux/models/search/LaporanPemakaianKendaraanSearch.php
+2
-2
PemakaianKendaraanMhsSearch.php
...odules/ubux/models/search/PemakaianKendaraanMhsSearch.php
+8
-8
PemakaianKendaraanSearch.php
...d/modules/ubux/models/search/PemakaianKendaraanSearch.php
+5
-6
SupirSearch.php
backend/modules/ubux/models/search/SupirSearch.php
+7
-4
_form.php
.../modules/ubux/views/laporan-pemakaian-kendaraan/_form.php
+5
-5
_search.php
...odules/ubux/views/laporan-pemakaian-kendaraan/_search.php
+1
-1
index.php
.../modules/ubux/views/laporan-pemakaian-kendaraan/index.php
+18
-6
view.php
...d/modules/ubux/views/laporan-pemakaian-kendaraan/view.php
+18
-6
viewPdf.php
...odules/ubux/views/laporan-pemakaian-kendaraan/viewPdf.php
+3
-3
PopUp.php
backend/modules/ubux/views/pemakaian-kendaraan-mhs/PopUp.php
+0
-0
_form.php
backend/modules/ubux/views/pemakaian-kendaraan-mhs/_form.php
+2
-2
_search.php
...nd/modules/ubux/views/pemakaian-kendaraan-mhs/_search.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
+2
-2
index.php
backend/modules/ubux/views/pemakaian-kendaraan-mhs/index.php
+1
-1
indexByKemahasiswaan.php
...ux/views/pemakaian-kendaraan-mhs/indexByKemahasiswaan.php
+1
-2
view.php
backend/modules/ubux/views/pemakaian-kendaraan-mhs/view.php
+35
-11
viewByKemahasiswaan.php
...bux/views/pemakaian-kendaraan-mhs/viewByKemahasiswaan.php
+34
-12
viewPdf.php
...nd/modules/ubux/views/pemakaian-kendaraan-mhs/viewPdf.php
+5
-5
_formByPegawai.php
...modules/ubux/views/pemakaian-kendaraan/_formByPegawai.php
+3
-5
_formByPribadi.php
...modules/ubux/views/pemakaian-kendaraan/_formByPribadi.php
+3
-5
_formBySekretarisRektorat.php
...x/views/pemakaian-kendaraan/_formBySekretarisRektorat.php
+3
-3
_search.php
backend/modules/ubux/views/pemakaian-kendaraan/_search.php
+3
-5
edit.php
backend/modules/ubux/views/pemakaian-kendaraan/edit.php
+1
-1
indexByHrd.php
...end/modules/ubux/views/pemakaian-kendaraan/indexByHrd.php
+3
-4
indexByKabiroKsd.php
...dules/ubux/views/pemakaian-kendaraan/indexByKabiroKsd.php
+3
-4
indexByKeuangan.php
...odules/ubux/views/pemakaian-kendaraan/indexByKeuangan.php
+3
-4
indexByPegawai.php
...modules/ubux/views/pemakaian-kendaraan/indexByPegawai.php
+23
-7
indexByPribadi.php
...modules/ubux/views/pemakaian-kendaraan/indexByPribadi.php
+3
-4
indexBySekretarisRektorat.php
...x/views/pemakaian-kendaraan/indexBySekretarisRektorat.php
+27
-10
indexByWr2.php
...end/modules/ubux/views/pemakaian-kendaraan/indexByWr2.php
+3
-4
viewByHrd.php
backend/modules/ubux/views/pemakaian-kendaraan/viewByHrd.php
+25
-9
viewByKabiroKsd.php
...odules/ubux/views/pemakaian-kendaraan/viewByKabiroKsd.php
+25
-9
viewByKeuangan.php
...modules/ubux/views/pemakaian-kendaraan/viewByKeuangan.php
+25
-9
viewByPegawai.php
.../modules/ubux/views/pemakaian-kendaraan/viewByPegawai.php
+26
-10
viewByPegawaiPdf.php
...dules/ubux/views/pemakaian-kendaraan/viewByPegawaiPdf.php
+3
-3
viewByPribadi.php
.../modules/ubux/views/pemakaian-kendaraan/viewByPribadi.php
+26
-10
viewByPribadiPdf.php
...dules/ubux/views/pemakaian-kendaraan/viewByPribadiPdf.php
+2
-2
viewBySekretarisRektorat.php
...ux/views/pemakaian-kendaraan/viewBySekretarisRektorat.php
+38
-12
viewByWr2.php
backend/modules/ubux/views/pemakaian-kendaraan/viewByWr2.php
+24
-8
_form.php
backend/modules/ubux/views/supir/_form.php
+5
-9
_search.php
backend/modules/ubux/views/supir/_search.php
+2
-4
add.php
backend/modules/ubux/views/supir/add.php
+2
-2
edit.php
backend/modules/ubux/views/supir/edit.php
+4
-4
index.php
backend/modules/ubux/views/supir/index.php
+21
-32
view.php
backend/modules/ubux/views/supir/view.php
+9
-5
main.php
backend/themes/v2/layouts/main.php
+5
-5
No files found.
backend/modules/ubux/controllers/PemakaianKendaraanController.php
View file @
ef1e1b0b
...
...
@@ -12,7 +12,7 @@ use yii\web\UploadedFile;
use
yii\data\ActiveDataProvider
;
use
yii\bootstrap\Alert
;
use
mPDF
;
use
backend\modules\ubux\models\PemakaianKendaraanM
ahasiswa
;
use
backend\modules\ubux\models\PemakaianKendaraanM
hs
;
use
backend\modules\ubux\models\Pegawai
;
/**
...
...
@@ -20,6 +20,9 @@ use backend\modules\ubux\models\Pegawai;
*/
class
PemakaianKendaraanController
extends
Controller
{
// ====================== FILTER =======================
public
$pegawai_id
=
10
;
public
function
behaviors
()
{
return
[
...
...
@@ -78,8 +81,8 @@ class PemakaianKendaraanController extends Controller
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
()))
{
// get the instance of the uploaded file
$id
=
$model
->
transaksi
_kendaraan_id
;
$proposalName
=
$model
->
nama_perequest_kendaraan
;
$id
=
$model
->
pemakaian
_kendaraan_id
;
$proposalName
=
$model
->
pegawai
->
nama
;
$model
->
file
=
UploadedFile
::
getInstance
(
$model
,
'file'
);
$model
->
file
->
saveAs
(
'proposal/'
.
$id
.
'. Proposal '
.
$proposalName
.
'.'
.
$model
->
file
->
extension
);
...
...
@@ -87,7 +90,7 @@ class PemakaianKendaraanController extends Controller
$model
->
proposal
=
'proposal/'
.
$id
.
'. Proposal '
.
$proposalName
.
'.'
.
$model
->
file
->
extension
;
$model
->
save
();
Yii
::
$app
->
messenger
->
addSuccessFlash
(
"Message flash berhasil dibuat!!"
);
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
]);
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
]);
}
else
{
return
$this
->
render
(
'add'
,
[
'model'
=>
$model
,
...
...
@@ -106,7 +109,7 @@ class PemakaianKendaraanController extends Controller
$model
=
$this
->
findModel
(
$id
);
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
]);
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
]);
}
else
{
return
$this
->
render
(
'edit'
,
[
'model'
=>
$model
,
...
...
@@ -125,9 +128,9 @@ class PemakaianKendaraanController extends Controller
$model
=
$this
->
findModel
(
$id
);
$this
->
findModel
(
$id
)
->
softDelete
();
if
(
$model
->
role
==
2
){
if
(
$model
->
jenis_keperluan_id
==
2
){
return
$this
->
actionIndexByPegawai
();
}
elseif
(
$model
->
role
==
3
){
}
elseif
(
$model
->
jenis_keperluan_id
==
3
){
return
$this
->
actionIndexByPribadi
();
}
}
...
...
@@ -158,7 +161,7 @@ class PemakaianKendaraanController extends Controller
{
$searchModel
=
new
PemakaianKendaraanSearch
();
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
role
'
=>
1
])
->
andWhere
(
'deleted!=1'
),
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
jenis_keperluan_id
'
=>
1
])
->
andWhere
(
'deleted!=1'
),
]);
return
$this
->
render
(
'indexByKemahasiswaan'
,
[
...
...
@@ -175,7 +178,7 @@ class PemakaianKendaraanController extends Controller
$searchModel
=
new
PemakaianKendaraanSearch
();
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
role
'
=>
1
])
->
andWhere
(
'deleted!=1'
),
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
jenis_keperluan_id
'
=>
1
])
->
andWhere
(
'deleted!=1'
),
]);
return
$this
->
render
(
'indexByKemahasiswaan'
,
[
...
...
@@ -192,7 +195,7 @@ class PemakaianKendaraanController extends Controller
$searchModel
=
new
PemakaianKendaraanSearch
();
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
role
'
=>
1
])
->
andWhere
(
'deleted!=1'
),
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
jenis_keperluan_id
'
=>
1
])
->
andWhere
(
'deleted!=1'
),
'sort'
=>
[
'defaultOrder'
=>
[
'updated_at'
=>
SORT_DESC
,
'created_at'
=>
SORT_DESC
]],
]);
...
...
@@ -232,13 +235,13 @@ class PemakaianKendaraanController extends Controller
public
function
actionAcceptBySekretarisRektorat
(
$id
){
$model
=
$this
->
findModel
(
$id
);
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
()
)
{
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
->
role
==
1
){
$mahasiswa
=
PemakaianKendaraanM
ahasiswa
::
findOne
([
'transaksi_kendaraan_id'
=>
$model
->
transaksi
_kendaraan_mhs_id
]);
if
(
$model
->
jenis_keperluan_id
==
1
){
$mahasiswa
=
PemakaianKendaraanM
hs
::
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
;
...
...
@@ -246,14 +249,14 @@ class PemakaianKendaraanController extends Controller
$mahasiswa
->
save
();
}
$model
->
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
(
'_formBySekretarisRektorat'
,
[
'model'
=>
$model
,
...
...
@@ -266,8 +269,8 @@ class PemakaianKendaraanController extends Controller
$model
->
status_request_kemahasiswaan
=
3
;
$model
->
status_req_sekretaris_rektorat
=
3
;
if
(
$model
->
role
==
1
){
$mahasiswa
=
PemakaianKendaraanM
ahasiswa
::
findOne
([
'transaksi_kendaraan_id'
=>
$model
->
transaksi
_kendaraan_mhs_id
]);
if
(
$model
->
jenis_keperluan_id
==
1
){
$mahasiswa
=
PemakaianKendaraanM
hs
::
findOne
([
'pemakaian_kendaraan_mhs_id'
=>
$model
->
pemakaian
_kendaraan_mhs_id
]);
$mahasiswa
->
status_req_sekretaris_rektorat
=
3
;
$mahasiswa
->
status_request_kemahasiswaan
=
3
;
$mahasiswa
->
kendaraan_id
=
$model
->
kendaraan_id
;
...
...
@@ -276,8 +279,7 @@ class PemakaianKendaraanController extends Controller
$mahasiswa
->
save
();
}
$model
->
save
();
if
(
$model
->
save
()){
$searchModel
=
new
PemakaianKendaraanSearch
();
$dataProvider
=
$searchModel
->
search
(
Yii
::
$app
->
request
->
queryParams
);
...
...
@@ -286,16 +288,15 @@ class PemakaianKendaraanController extends Controller
'dataProvider'
=>
$dataProvider
,
]);
}
}
// Untuk Pegawai !!---------------------------------------------------------------!!
public
$pegawai_id
=
10
;
public
function
actionIndexByPegawai
()
{
$searchModel
=
new
PemakaianKendaraanSearch
();
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
role
'
=>
2
,
'pegawai_id'
=>
$this
->
pegawai_id
])
->
andWhere
(
'deleted!=1'
),
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
jenis_keperluan_id
'
=>
2
,
'pegawai_id'
=>
$this
->
pegawai_id
])
->
andWhere
(
'deleted!=1'
),
'sort'
=>
[
'defaultOrder'
=>
[
'updated_at'
=>
SORT_DESC
,
'created_at'
=>
SORT_DESC
]],
]);
...
...
@@ -311,11 +312,10 @@ class PemakaianKendaraanController extends Controller
$modelPegawai
=
Pegawai
::
findOne
(
$this
->
pegawai_id
);
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
()))
{
$model
->
pegawai_id
=
$this
->
pegawai_id
;
$model
->
nama_perequest_kendaraan
=
$modelPegawai
->
nama
;
$model
->
role
=
2
;
$model
->
jenis_keperluan_id
=
2
;
$model
->
save
();
Yii
::
$app
->
messenger
->
addSuccessFlash
(
"Message flash berhasil dibuat!!"
);
return
$this
->
redirect
([
'view-by-pegawai'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
]);
return
$this
->
redirect
([
'view-by-pegawai'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
]);
}
else
{
return
$this
->
render
(
'_formByPegawai'
,
[
'model'
=>
$model
,
...
...
@@ -335,7 +335,7 @@ class PemakaianKendaraanController extends Controller
$model
=
$this
->
findModel
(
$id
);
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
return
$this
->
redirect
([
'view-by-pegawai'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
]);
return
$this
->
redirect
([
'view-by-pegawai'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
]);
}
else
{
return
$this
->
render
(
'_formByPegawai'
,
[
'model'
=>
$model
,
...
...
@@ -346,7 +346,7 @@ class PemakaianKendaraanController extends Controller
public
function
actionPopUpPegawai
(){
$searchModel
=
new
PemakaianKendaraanSearch
();
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
role
'
=>
2
])
->
andWhere
(
'deleted!=1'
),
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
jenis_keperluan_id
'
=>
2
])
->
andWhere
(
'deleted!=1'
),
]);
Yii
::
$app
->
messenger
->
addErrorFlash
(
"Tidak bisa diubah"
);
return
$this
->
render
(
'indexByPegawai'
,
[
...
...
@@ -362,7 +362,7 @@ class PemakaianKendaraanController extends Controller
{
$searchModel
=
new
PemakaianKendaraanSearch
();
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
role
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
jenis_keperluan_id
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
]);
return
$this
->
render
(
'indexByPribadi'
,
[
...
...
@@ -376,10 +376,11 @@ class PemakaianKendaraanController extends Controller
$model
=
new
PemakaianKendaraan
();
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
()))
{
$model
->
role
=
3
;
$model
->
pegawai_id
=
$this
->
pegawai_id
;
$model
->
jenis_keperluan_id
=
3
;
$model
->
save
();
Yii
::
$app
->
messenger
->
addSuccessFlash
(
"Message flash berhasil dibuat!!"
);
return
$this
->
redirect
([
'view-by-pribadi'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
]);
return
$this
->
redirect
([
'view-by-pribadi'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
]);
}
else
{
return
$this
->
render
(
'_formByPribadi'
,
[
'model'
=>
$model
,
...
...
@@ -399,7 +400,7 @@ class PemakaianKendaraanController extends Controller
$model
=
$this
->
findModel
(
$id
);
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
return
$this
->
redirect
([
'view-by-pribadi'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
]);
return
$this
->
redirect
([
'view-by-pribadi'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
]);
}
else
{
return
$this
->
render
(
'_formByPribadi'
,
[
'model'
=>
$model
,
...
...
@@ -410,10 +411,10 @@ class PemakaianKendaraanController extends Controller
public
function
actionPopUpPribadi
(){
$searchModel
=
new
PemakaianKendaraanSearch
();
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
role
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
jenis_keperluan_id
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
]);
Yii
::
$app
->
messenger
->
addErrorFlash
(
"Tidak bisa diubah"
);
return
$this
->
render
(
'indexByP
ribad
i'
,
[
return
$this
->
render
(
'indexByP
egawa
i'
,
[
'searchModel'
=>
$searchModel
,
'dataProvider'
=>
$dataProvider
,
]);
...
...
@@ -425,7 +426,7 @@ class PemakaianKendaraanController extends Controller
{
$searchModel
=
new
PemakaianKendaraanSearch
();
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
role
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
jenis_keperluan_id
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
]);
return
$this
->
render
(
'indexByKabiroKsd'
,
[
...
...
@@ -448,7 +449,7 @@ class PemakaianKendaraanController extends Controller
$searchModel
=
new
PemakaianKendaraanSearch
();
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
role
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
jenis_keperluan_id
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
]);
return
$this
->
render
(
'indexByKabiroKsd'
,
[
...
...
@@ -464,7 +465,7 @@ class PemakaianKendaraanController extends Controller
$searchModel
=
new
PemakaianKendaraanSearch
();
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
role
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
jenis_keperluan_id
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
]);
return
$this
->
render
(
'indexByKabiroKsd'
,
[
...
...
@@ -479,7 +480,7 @@ class PemakaianKendaraanController extends Controller
{
$searchModel
=
new
PemakaianKendaraanSearch
();
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
role
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
jenis_keperluan_id
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
]);
return
$this
->
render
(
'indexByHrd'
,
[
...
...
@@ -502,7 +503,7 @@ class PemakaianKendaraanController extends Controller
$searchModel
=
new
PemakaianKendaraanSearch
();
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
role
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
jenis_keperluan_id
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
]);
return
$this
->
render
(
'indexByHrd'
,
[
...
...
@@ -518,7 +519,7 @@ class PemakaianKendaraanController extends Controller
$searchModel
=
new
PemakaianKendaraanSearch
();
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
role
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
jenis_keperluan_id
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
]);
return
$this
->
render
(
'indexByHrd'
,
[
...
...
@@ -533,7 +534,7 @@ class PemakaianKendaraanController extends Controller
{
$searchModel
=
new
PemakaianKendaraanSearch
();
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
role
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
jenis_keperluan_id
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
]);
return
$this
->
render
(
'indexByKeuangan'
,
[
...
...
@@ -556,7 +557,7 @@ class PemakaianKendaraanController extends Controller
$searchModel
=
new
PemakaianKendaraanSearch
();
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
role
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
jenis_keperluan_id
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
]);
return
$this
->
render
(
'indexByKeuangan'
,
[
...
...
@@ -572,7 +573,7 @@ class PemakaianKendaraanController extends Controller
$searchModel
=
new
PemakaianKendaraanSearch
();
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
role
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
jenis_keperluan_id
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
]);
return
$this
->
render
(
'indexByKeuangan'
,
[
...
...
@@ -587,7 +588,7 @@ class PemakaianKendaraanController extends Controller
{
$searchModel
=
new
PemakaianKendaraanSearch
();
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
role
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
jenis_keperluan_id
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
]);
return
$this
->
render
(
'indexByWr2'
,
[
...
...
@@ -610,7 +611,7 @@ class PemakaianKendaraanController extends Controller
$searchModel
=
new
PemakaianKendaraanSearch
();
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
role
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
jenis_keperluan_id
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
]);
return
$this
->
render
(
'indexByWr2'
,
[
...
...
@@ -626,7 +627,7 @@ class PemakaianKendaraanController extends Controller
$searchModel
=
new
PemakaianKendaraanSearch
();
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
role
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
'query'
=>
PemakaianKendaraan
::
find
()
->
where
([
'
jenis_keperluan_id
'
=>
3
])
->
andWhere
(
'deleted!=1'
),
]);
return
$this
->
render
(
'indexByWr2'
,
[
...
...
backend/modules/ubux/controllers/PemakaianKendaraanM
ahasiswa
Controller.php
→
backend/modules/ubux/controllers/PemakaianKendaraanM
hs
Controller.php
View file @
ef1e1b0b
...
...
@@ -3,8 +3,8 @@
namespace
backend\modules\ubux\controllers
;
use
Yii
;
use
backend\modules\ubux\models\PemakaianKendaraanM
ahasiswa
;
use
backend\modules\ubux\models\search\PemakaianKendaraanM
ahasiswa
Search
;
use
backend\modules\ubux\models\PemakaianKendaraanM
hs
;
use
backend\modules\ubux\models\search\PemakaianKendaraanM
hs
Search
;
use
yii\web\Controller
;
use
yii\web\NotFoundHttpException
;
use
yii\filters\VerbFilter
;
...
...
@@ -15,10 +15,13 @@ use mPDF;
use
backend\modules\ubux\models\PemakaianKendaraan
;
/**
* PemakaianKendaraanM
ahasiswaController implements the CRUD actions for PemakaianKendaraanMahasiswa
model.
* PemakaianKendaraanM
hsController implements the CRUD actions for PemakaianKendaraanMhs
model.
*/
class
PemakaianKendaraanM
ahasiswa
Controller
extends
Controller
class
PemakaianKendaraanM
hs
Controller
extends
Controller
{
// ================= FILTER ==================
public
$dim_id
=
1
;
public
function
behaviors
()
{
return
[
...
...
@@ -38,18 +41,15 @@ class PemakaianKendaraanMahasiswaController extends Controller
}
/**
* Lists all PemakaianKendaraanM
ahasiswa
models.
* Lists all PemakaianKendaraanM
hs
models.
* @return mixed
*/
// Untuk Filter Dimnya
public
$dim_id
=
1
;
public
function
actionIndex
()
{
$searchModel
=
new
PemakaianKendaraanM
ahasiswa
Search
();
$searchModel
=
new
PemakaianKendaraanM
hs
Search
();
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
PemakaianKendaraanM
ahasiswa
::
find
()
->
where
([
'dim_id'
=>
$this
->
dim_id
])
->
andWhere
(
'deleted!=1'
),
'query'
=>
PemakaianKendaraanM
hs
::
find
()
->
where
([
'dim_id'
=>
$this
->
dim_id
])
->
andWhere
(
'deleted!=1'
),
'sort'
=>
[
'defaultOrder'
=>
[
'updated_at'
=>
SORT_DESC
,
'created_at'
=>
SORT_DESC
]],
]);
...
...
@@ -60,7 +60,7 @@ class PemakaianKendaraanMahasiswaController extends Controller
}
/**
* Displays a single PemakaianKendaraanM
ahasiswa
model.
* Displays a single PemakaianKendaraanM
hs
model.
* @param integer $id
* @return mixed
*/
...
...
@@ -79,13 +79,13 @@ class PemakaianKendaraanMahasiswaController extends Controller
}
/**
* Creates a new PemakaianKendaraanM
ahasiswa
model.
* Creates a new PemakaianKendaraanM
hs
model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public
function
actionAdd
()
{
$model
=
new
PemakaianKendaraanM
ahasiswa
();
$model
=
new
PemakaianKendaraanM
hs
();
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
()))
{
...
...
@@ -95,7 +95,7 @@ class PemakaianKendaraanMahasiswaController extends Controller
$model
->
save
();
// get the instance of the uploaded file
$id
=
$model
->
transaksi_kendaraan
_id
;
$id
=
$model
->
pemakaian_kendaraan_mhs
_id
;
$proposalName
=
$model
->
mahasiswa
->
nama
;
$model
->
file
=
UploadedFile
::
getInstance
(
$model
,
'file'
);
...
...
@@ -116,7 +116,7 @@ class PemakaianKendaraanMahasiswaController extends Controller
Yii
::
$app
->
messenger
->
addSuccessFlash
(
"Permintaan Kendaraan Berhasil Dibuat"
);
Yii
::
$app
->
messenger
->
addSuccessFlash
(
"Email Terkirim"
);
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
transaksi_kendaraan
_id
]);
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
pemakaian_kendaraan_mhs
_id
]);
}
else
{
return
$this
->
render
(
'add'
,
[
'model'
=>
$model
,
...
...
@@ -125,7 +125,7 @@ class PemakaianKendaraanMahasiswaController extends Controller
}
/**
* Updates an existing PemakaianKendaraanM
ahasiswa
model.
* Updates an existing PemakaianKendaraanM
hs
model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id
* @return mixed
...
...
@@ -134,9 +134,9 @@ class PemakaianKendaraanMahasiswaController extends Controller
{
$model
=
$this
->
findModel
(
$id
);
if
(
$model
->
status_request_kemahasiswaan
==
2
||
$model
->
status_request_kemahasiswaan
==
3
){
$searchModel
=
new
PemakaianKendaraanM
ahasiswa
Search
();
$searchModel
=
new
PemakaianKendaraanM
hs
Search
();
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
PemakaianKendaraanM
ahasiswa
::
find
()
->
where
([
'dim_id'
=>
$this
->
dim_id
])
->
andWhere
(
'deleted!=1'
),
'query'
=>
PemakaianKendaraanM
hs
::
find
()
->
where
([
'dim_id'
=>
$this
->
dim_id
])
->
andWhere
(
'deleted!=1'
),
'sort'
=>
[
'defaultOrder'
=>
[
'updated_at'
=>
SORT_DESC
,
'created_at'
=>
SORT_DESC
]],
]);
Yii
::
$app
->
messenger
->
addErrorFlash
(
"Tidak bisa mengubah, Sudah di setujui/ditolak Kemahasiswaan"
);
...
...
@@ -146,7 +146,7 @@ class PemakaianKendaraanMahasiswaController extends Controller
]);
}
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
transaksi_kendaraan
_id
]);
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
pemakaian_kendaraan_mhs
_id
]);
}
else
{
return
$this
->
render
(
'edit'
,
[
'model'
=>
$model
,
...
...
@@ -155,7 +155,7 @@ class PemakaianKendaraanMahasiswaController extends Controller
}
/**
* Deletes an existing PemakaianKendaraanM
ahasiswa
model.
* Deletes an existing PemakaianKendaraanM
hs
model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
* @return mixed
...
...
@@ -164,9 +164,9 @@ class PemakaianKendaraanMahasiswaController extends Controller
{
$model
=
$this
->
findModel
(
$id
);
if
(
$model
->
status_request_kemahasiswaan
==
2
||
$model
->
status_request_kemahasiswaan
==
3
){
$searchModel
=
new
PemakaianKendaraanM
ahasiswa
Search
();
$searchModel
=
new
PemakaianKendaraanM
hs
Search
();
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
PemakaianKendaraanM
ahasiswa
::
find
()
->
where
([
'dim_id'
=>
$this
->
dim_id
])
->
andWhere
(
'deleted!=1'
),
'query'
=>
PemakaianKendaraanM
hs
::
find
()
->
where
([
'dim_id'
=>
$this
->
dim_id
])
->
andWhere
(
'deleted!=1'
),
'sort'
=>
[
'defaultOrder'
=>
[
'updated_at'
=>
SORT_DESC
,
'created_at'
=>
SORT_DESC
]],
]);
Yii
::
$app
->
messenger
->
addErrorFlash
(
"Tidak bisa menghapus, Sudah di setujui Kemahasiswaan"
);
...
...
@@ -181,15 +181,15 @@ class PemakaianKendaraanMahasiswaController extends Controller
}
/**
* Finds the PemakaianKendaraanM
ahasiswa
model based on its primary key value.
* Finds the PemakaianKendaraanM
hs
model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param integer $id
* @return PemakaianKendaraanM
ahasiswa
the loaded model
* @return PemakaianKendaraanM
hs
the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected
function
findModel
(
$id
)
{
if
((
$model
=
PemakaianKendaraanM
ahasiswa
::
findOne
(
$id
))
!==
null
)
{
if
((
$model
=
PemakaianKendaraanM
hs
::
findOne
(
$id
))
!==
null
)
{
return
$model
;
}
else
{
throw
new
NotFoundHttpException
(
'The requested page does not exist.'
);
...
...
@@ -227,7 +227,7 @@ class PemakaianKendaraanMahasiswaController extends Controller
// Kemahasiswaan -----------------------------------------------------------------
public
function
actionIndexByKemahasiswaan
()
{
$searchModel
=
new
PemakaianKendaraanM
ahasiswa
Search
();
$searchModel
=
new
PemakaianKendaraanM
hs
Search
();
$dataProvider
=
$searchModel
->
search
(
Yii
::
$app
->
request
->
queryParams
);
return
$this
->
render
(
'indexByKemahasiswaan'
,
[
...
...
@@ -241,16 +241,15 @@ class PemakaianKendaraanMahasiswaController extends Controller
$model
=
$this
->
findModel
(
$id
);
if
(
$model
->
status_request_kemahasiswaan
==
1
){
$modelBaru
=
new
PemakaianKendaraan
();
$modelBaru
->
transaksi_kendaraan_mhs_id
=
$model
->
transaksi_kendaraan_id
;
$modelBaru
->
nama_perequest_kendaraan
=
$model
->
mahasiswa
->
nama
;
$modelBaru
->
desc_penggunaan_kendaraan
=
$model
->
desc_penggunaan_kendaraan
;
$modelBaru
->
pemakaian_kendaraan_mhs_id
=
$model
->
pemakaian_kendaraan_mhs_id
;
$modelBaru
->
desc
=
$model
->
desc
;
$modelBaru
->
tujuan
=
$model
->
tujuan
;
$modelBaru
->
jumlah_penumpang_kendaraan
=
$model
->
jumlah_penumpang_kendaraan
;
$modelBaru
->
rencana_waktu_keberangkatan
=
$model
->
rencana_waktu_keberangkatan
;
$modelBaru
->
rencana_waktu_kembali
=
$model
->
rencana_waktu_kembali
;
$modelBaru
->
status_req_sekretaris_rektorat
=
1
;
$modelBaru
->
status_request_kemahasiswaan
=
$model
->
status_request_kemahasiswaan
;
$modelBaru
->
role
=
1
;
$modelBaru
->
jenis_keperluan_id
=
1
;
$modelBaru
->
proposal
=
$model
->
proposal
;
$modelBaru
->
no_telepon
=
$model
->
no_telepon
;
...
...
@@ -258,7 +257,7 @@ class PemakaianKendaraanMahasiswaController extends Controller
$model
->
status_request_kemahasiswaan
=
2
;
$model
->
save
();
$searchModel
=
new
PemakaianKendaraanM
ahasiswa
Search
();
$searchModel
=
new
PemakaianKendaraanM
hs
Search
();
$dataProvider
=
$searchModel
->
search
(
Yii
::
$app
->
request
->
queryParams
);
Yii
::
$app
->
messenger
->
addSuccessFlash
(
"Berhasil"
);
...
...
@@ -268,7 +267,7 @@ class PemakaianKendaraanMahasiswaController extends Controller
]);
}
}
else
{
$searchModel
=
new
PemakaianKendaraanM
ahasiswa
Search
();
$searchModel
=
new
PemakaianKendaraanM
hs
Search
();
$dataProvider
=
$searchModel
->
search
(
Yii
::
$app
->
request
->
queryParams
);
Yii
::
$app
->
messenger
->
addErrorFlash
(
"Sudah disetujui/ditolak"
);
...
...
@@ -285,7 +284,7 @@ class PemakaianKendaraanMahasiswaController extends Controller
$model
->
status_request_kemahasiswaan
=
3
;
$model
->
save
();
$searchModel
=
new
PemakaianKendaraanM
ahasiswa
Search
();
$searchModel
=
new
PemakaianKendaraanM
hs
Search
();
$dataProvider
=
$searchModel
->
search
(
Yii
::
$app
->
request
->
queryParams
);
return
$this
->
render
(
'indexByKemahasiswaan'
,
[
...
...
backend/modules/ubux/controllers/SupirController.php
View file @
ef1e1b0b
...
...
@@ -2,7 +2,6 @@
namespace
backend\modules\ubux\controllers
;
use
backend\modules\ubux\models\Pegawai
;
use
Yii
;
use
backend\modules\ubux\models\Supir
;
use
backend\modules\ubux\models\search\SupirSearch
;
...
...
@@ -70,10 +69,7 @@ class SupirController extends Controller
$model
=
new
Supir
();
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
()))
{
$pegawai
=
Pegawai
::
findOne
([
'pegawai_id'
=>
$model
->
pegawai_id
]);
$model
->
name_supir
=
$pegawai
->
nama
;
$model
->
no_telepon_supir
=
$pegawai
->
hp
;
$model
->
pegawai_id
=
$pegawai
->
pegawai_id
;
$model
->
no_telepon_supir
=
$model
->
pegawai
->
hp
;
$model
->
save
();
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
supir_id
]);
}
else
{
...
...
@@ -96,7 +92,7 @@ class SupirController extends Controller
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
supir_id
]);
}
else
{
return
$this
->
render
(
'
update
'
,
[
return
$this
->
render
(
'
edit
'
,
[
'model'
=>
$model
,
]);
}
...
...
@@ -124,7 +120,7 @@ class SupirController extends Controller
*/
protected
function
findModel
(
$id
)
{
if
(
$model
=
Supir
::
findOne
(
$id
)
)
{
if
(
(
$model
=
Supir
::
findOne
(
$id
))
!==
null
)
{
return
$model
;
}
else
{
throw
new
NotFoundHttpException
(
'The requested page does not exist.'
);
...
...
backend/modules/ubux/models/Dim.php
View file @
ef1e1b0b
...
...
@@ -615,6 +615,6 @@ class Dim extends \yii\db\ActiveRecord
}
// public function getMahasiswa(){
// return $this->hasMany(PemakaianKendaraanM
ahasiswa
::className(), ['dim_id' => 'dim_id']);
// return $this->hasMany(PemakaianKendaraanM
hs
::className(), ['dim_id' => 'dim_id']);
// }
}
backend/modules/ubux/models/JenisKeperluan.php
View file @
ef1e1b0b
...
...
@@ -40,7 +40,7 @@ class JenisKeperluan extends \yii\db\ActiveRecord
*/
public
static
function
tableName
()
{
return
'ubux_jenis_keperluan'
;
return
'ubux_
r_
jenis_keperluan'
;
}
/**
...
...
backend/modules/ubux/models/Kendaraan.php
View file @
ef1e1b0b
...
...
@@ -124,7 +124,7 @@ class Kendaraan extends \yii\db\ActiveRecord
public
function
getTransaksiKendaraanMahasiswaBarus
()
{
return
$this
->
hasMany
(
PemakaianKendaraanM
ahasiswa
::
className
(),
[
'kendaraan_id'
=>
'kendaraan_id'
]);
return
$this
->
hasMany
(
PemakaianKendaraanM
hs
::
className
(),
[
'kendaraan_id'
=>
'kendaraan_id'
]);
}
public
function
getKeteranganKendaraan
(){
...
...
backend/modules/ubux/models/LaporanPemakaianKendaraan.php
View file @
ef1e1b0b
...
...
@@ -13,7 +13,7 @@ use common\behaviors\DeleteBehavior;
*
* @property integer $laporan_pemakaian_kendaraan_id
* @property string $tujuan
* @property string $desc
_penumpang
* @property string $desc
* @property integer $jumlah_penumpang
* @property string $keperluan
* @property string $waktu_keberangkatan
...
...
@@ -66,10 +66,10 @@ class LaporanPemakaianKendaraan extends \yii\db\ActiveRecord
public
function
rules
()
{
return
[
[[
'tujuan'
,
'desc
_penumpang
'
,
'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'
],
[[
'waktu_keberangkatan'
,
'waktu_tiba'
,
'deleted_at'
,
'created_at'
,
'updated_at'
],
'safe'
],
[[
'tujuan'
,
'desc
_penumpang
'
,
'keperluan'
],
'string'
],
[[
'tujuan'
,
'desc'
,
'keperluan'
],
'string'
],
[[
'deleted_by'
,
'created_by'
,
'updated_by'
],
'string'
,
'max'
=>
32
],
[[
'kendaraan_id'
],
'exist'
,
'skipOnError'
=>
true
,
'targetClass'
=>
Kendaraan
::
className
(),
'targetAttribute'
=>
[
'kendaraan_id'
=>
'kendaraan_id'
]],
[[
'supir_id'
],
'exist'
,
'skipOnError'
=>
true
,
'targetClass'
=>
Supir
::
className
(),
'targetAttribute'
=>
[
'supir_id'
=>
'supir_id'
]]
...
...
@@ -84,7 +84,7 @@ class LaporanPemakaianKendaraan extends \yii\db\ActiveRecord
return
[
'laporan_pemakaian_kendaraan_id'
=>
'Laporan Pemakaian Kendaraan ID'
,
'tujuan'
=>
'Tujuan'
,
'desc
_penumpang
'
=>
'Deskripsi Penumpang'
,
'desc'
=>
'Deskripsi Penumpang'
,
'jumlah_penumpang'
=>
'Jumlah Penumpang'
,
'keperluan'
=>
'Keperluan'
,
'waktu_keberangkatan'
=>
'Waktu Keberangkatan'
,
...
...
backend/modules/ubux/models/PemakaianKendaraan.php
View file @
ef1e1b0b
...
...
@@ -11,18 +11,17 @@ use common\behaviors\DeleteBehavior;
/**
* This is the model class for table "ubux_pemakaian_kendaraan".
*
* @property integer $
transaksi
_kendaraan_id
* @property integer $
transaksi
_kendaraan_mhs_id
* @property integer $
pemakaian
_kendaraan_id
* @property integer $
pemakaian
_kendaraan_mhs_id
* @property integer $pegawai_id
* @property string $nama_perequest_kendaraan
* @property string $desc_penggunaan_kendaraan
* @property string $desc
* @property string $tujuan
* @property integer $jumlah_penumpang_kendaraan
* @property string $rencana_waktu_keberangkatan
* @property string $rencana_waktu_kembali
* @property string $status_req_sekretaris_rektorat
* @property string $status_request_kemahasiswaan
* @property string $
role
* @property string $
jenis_keperluan_id
* @property string $no_telepon
* @property string $proposal
* @property integer $deleted
...
...
@@ -49,7 +48,7 @@ use common\behaviors\DeleteBehavior;
* @property StatusRequest $statusRequestKeuangan
* @property StatusRequest $statusRequestWr2
* @property JenisKeperluan $jenisKeperluan
* @property
Hrdx
Pegawai $pegawai
* @property Pegawai $pegawai
*/
class
PemakaianKendaraan
extends
\yii\db\ActiveRecord
{
...
...
@@ -86,13 +85,12 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord
public
function
rules
()
{
return
[
[[
'desc
_penggunaan_kendaraan
'
,
'tujuan'
,
'rencana_waktu_keberangkatan'
,
'rencana_waktu_kembali'
,
'no_telepon'
],
'required'
],
[[
'status_req_sekretaris_rektorat'
,
'status_request_kemahasiswaan'
,
'jumlah_penumpang_kendaraan'
,
'deleted'
,
'kendaraan_id'
,
'supir_id'
,
'
transaksi_kendaraan_mhs_id'
,
'status_request_kabiro_KSD'
,
'status_request_hrd'
,
'status_request_keuangan'
,
'status_request_wr2'
,
'role
'
,
'pegawai_id'
],
'integer'
],
[[
'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'
],
[[
'rencana_waktu_keberangkatan'
,
'rencana_waktu_kembali'
,
'deleted_at'
,
'created_at'
,
'updated_at'
],
'safe'
],
[[
'file'
],
'file'
],
[[
'nama_perequest_kendaraan'
,],
'string'
,
'max'
=>
45
],
[[
'no_hp_supir'
],
'string'
,
'max'
=>
300
],
[[
'desc
_penggunaan_kendaraan
'
,
'tujuan'
],
'string'
],
[[
'desc'
,
'tujuan'
],
'string'
],
[[
'proposal'
],
'string'
,
'max'
=>
100
],
[[
'no_telepon'
,
'deleted_by'
,
'created_by'
,
'updated_by'
],
'string'
,
'max'
=>
32
],
[[
'no_hp_supir'
],
'string'
,
'max'
=>
300
],
...
...
@@ -108,10 +106,9 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord
public
function
attributeLabels
()
{
return
[
'
transaksi
_kendaraan_id'
=>
'Transaksi Kendaraan ID'
,
'
pemakaian
_kendaraan_id'
=>
'Transaksi Kendaraan ID'
,
'pegawai_id'
=>
'Pegawai ID'
,
'nama_perequest_kendaraan'
=>
'Nama'
,
'desc_penggunaan_kendaraan'
=>
'Keperluan'
,
'desc'
=>
'Keperluan'
,
'tujuan'
=>
'Tujuan'
,
'jumlah_penumpang_kendaraan'
=>
'Jumlah Penumpang'
,
'rencana_waktu_keberangkatan'
=>
'Waktu Keberangkatan'
,
...
...
@@ -119,7 +116,7 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord
'status_req_sekretaris_rektorat'
=>
'Status'
,
'status_request_kemahasiswaan'
=>
'Status Pemintaan Kemahasiswaan'
,
'no_telepon'
=>
'No Telepon'
,
'
role
'
=>
'Jenis Permintaan'
,
'
jenis_keperluan_id
'
=>
'Jenis Permintaan'
,
'proposal'
=>
'Proposal'
,
'deleted'
=>
'Deleted'
,
'deleted_at'
=>
'Deleted At'
,
...
...
@@ -136,7 +133,7 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord
'status_request_hrd'
=>
'Status Permintaan Hrd'
,
'status_request_keuangan'
=>
'Status Permintaan Keuangan'
,
'status_request_wr2'
=>
'Status Permintaan Wr2'
,
'
transaksi
_kendaraan_mhs_id'
=>
'Transaksi Kendaraan Mahasiswa ID'
'
pemakaian
_kendaraan_mhs_id'
=>
'Transaksi Kendaraan Mahasiswa ID'
];
}
...
...
@@ -161,38 +158,38 @@ class PemakaianKendaraan extends \yii\db\ActiveRecord
*/
public
function
getStatusRequestSekretarisRektorat
()
{
return
$this
->
hasOne
(
StatusRequest
::
className
(),
[
'id'
=>
'status_req_sekretaris_rektorat'
]);
return
$this
->
hasOne
(
StatusRequest
::
className
(),
[
'
status_request_
id'
=>
'status_req_sekretaris_rektorat'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getStatusRequestKemahasiswaan
()
{
return
$this
->
hasOne
(
StatusRequest
::
className
(),
[
'id'
=>
'status_request_kemahasiswaan'
]);
return
$this
->
hasOne
(
StatusRequest
::
className
(),
[
'
status_request_
id'
=>
'status_request_kemahasiswaan'
]);
}
public
function
getStatusRequestKabiroKSD
()
{
return
$this
->
hasOne
(
StatusRequest
::
className
(),
[
'id'
=>
'status_request_kabiro_KSD'
]);
return
$this
->
hasOne
(
StatusRequest
::
className
(),
[
'
status_request_
id'
=>
'status_request_kabiro_KSD'
]);
}
public
function
getStatusRequestHRD
()
{
return
$this
->
hasOne
(
StatusRequest
::
className
(),
[
'id'
=>
'status_request_hrd'
]);
return
$this
->
hasOne
(
StatusRequest
::
className
(),
[
'
status_request_
id'
=>
'status_request_hrd'
]);
}
public
function
getStatusRequestKeuangan
()
{
return
$this
->
hasOne
(
StatusRequest
::
className
(),
[
'id'
=>
'status_request_keuangan'
]);
return
$this
->
hasOne
(
StatusRequest
::
className
(),
[
'
status_request_
id'
=>
'status_request_keuangan'
]);
}
public
function
getStatusRequestWr2
()
{
return
$this
->
hasOne
(
StatusRequest
::
className
(),
[
'id'
=>
'status_request_wr2'
]);
return
$this
->
hasOne
(
StatusRequest
::
className
(),
[
'
status_request_
id'
=>
'status_request_wr2'
]);
}
public
function
getJenisKeperluan
(){
return
$this
->
hasOne
(
JenisKeperluan
::
className
(),
[
'
id'
=>
'role
'
]);
return
$this
->
hasOne
(
JenisKeperluan
::
className
(),
[
'
jenis_keperluan_id'
=>
'jenis_keperluan_id
'
]);
}
public
function
getPegawai
(){
...
...
backend/modules/ubux/models/PemakaianKendaraanM
ahasiswa
.php
→
backend/modules/ubux/models/PemakaianKendaraanM
hs
.php
View file @
ef1e1b0b
...
...
@@ -11,9 +11,9 @@ use common\behaviors\DeleteBehavior;
/**
* This is the model class for table "ubux_pemakaian_kendaraan_mahasiswa".
*
* @property integer $
transaksi_kendaraan
_id
* @property integer $
pemakaian_kendaraan_mhs
_id
* @property integer $dim_id
* @property string $desc
_penggunaan_kendaraan
* @property string $desc
* @property string $tujuan
* @property integer $jumlah_penumpang_kendaraan
* @property string $rencana_waktu_keberangkatan
...
...
@@ -40,7 +40,7 @@ use common\behaviors\DeleteBehavior;
* @property StatusRequest $statusRequestSekretarisRektorat
* @property StatusRequest $statusRequestKemahasiswaan
*/
class
PemakaianKendaraanM
ahasiswa
extends
\yii\db\ActiveRecord
class
PemakaianKendaraanM
hs
extends
\yii\db\ActiveRecord
{
public
$file
;
/**
...
...
@@ -66,7 +66,7 @@ class PemakaianKendaraanMahasiswa extends \yii\db\ActiveRecord
*/
public
static
function
tableName
()
{
return
'ubux_pemakaian_kendaraan_m
ahasiswa
'
;
return
'ubux_pemakaian_kendaraan_m
hs
'
;
}
/**
...
...
@@ -75,11 +75,11 @@ class PemakaianKendaraanMahasiswa extends \yii\db\ActiveRecord
public
function
rules
()
{
return
[
[[
'desc
_penggunaan_kendaraan
'
,
'tujuan'
,
'rencana_waktu_keberangkatan'
,
'rencana_waktu_kembali'
,
'no_telepon'
],
'required'
],
[[
'desc'
,
'tujuan'
,
'rencana_waktu_keberangkatan'
,
'rencana_waktu_kembali'
,
'no_telepon'
],
'required'
],
[[
'dim_id'
,
'jumlah_penumpang_kendaraan'
,
'deleted'
,
'kendaraan_id'
,
'supir_id'
,
'status_req_sekretaris_rektorat'
,
'status_request_kemahasiswaan'
],
'integer'
],
[[
'rencana_waktu_keberangkatan'
,
'rencana_waktu_kembali'
,
'deleted_at'
,
'created_at'
,
'updated_at'
],
'safe'
],
[[
'file'
],
'file'
],
[[
'desc
_penggunaan_kendaraan
'
,
'tujuan'
],
'string'
],
[[
'desc'
,
'tujuan'
],
'string'
],
[[
'no_hp_supir'
],
'string'
,
'max'
=>
300
],
[[
'proposal'
],
'string'
,
'max'
=>
100
],
[[
'no_telepon'
,
'deleted_by'
,
'created_by'
,
'updated_by'
],
'string'
,
'max'
=>
32
],
...
...
@@ -93,9 +93,9 @@ class PemakaianKendaraanMahasiswa extends \yii\db\ActiveRecord
public
function
attributeLabels
()
{
return
[
'
transaksi_kendaraan
_id'
=>
'Transaksi Kendaraan ID'
,
'
pemakaian_kendaraan_mhs
_id'
=>
'Transaksi Kendaraan ID'
,
'dim_id'
=>
'Dim ID'
,
'desc
_penggunaan_kendaraan
'
=>
'Keperluan'
,
'desc'
=>
'Keperluan'
,
'tujuan'
=>
'Tujuan'
,
'jumlah_penumpang_kendaraan'
=>
'Jumlah Penumpang'
,
'rencana_waktu_keberangkatan'
=>
'Waktu Keberangkatan'
,
...
...
@@ -137,13 +137,13 @@ class PemakaianKendaraanMahasiswa extends \yii\db\ActiveRecord
*/
public
function
getStatusRequestSekretarisRektorat
()
{
return
$this
->
hasOne
(
StatusRequest
::
className
(),
[
'id'
=>
'status_req_sekretaris_rektorat'
]);
return
$this
->
hasOne
(
StatusRequest
::
className
(),
[
'
status_request_
id'
=>
'status_req_sekretaris_rektorat'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getStatusRequestKemahasiswaan
()
{
return
$this
->
hasOne
(
StatusRequest
::
className
(),
[
'id'
=>
'status_request_kemahasiswaan'
]);
return
$this
->
hasOne
(
StatusRequest
::
className
(),
[
'
status_request_
id'
=>
'status_request_kemahasiswaan'
]);
}
}
backend/modules/ubux/models/StatusRequest.php
View file @
ef1e1b0b
...
...
@@ -14,8 +14,8 @@ use common\behaviors\DeleteBehavior;
* @property integer $id
* @property string $status
*
* @property PemakaianKendaraanM
ahasiswa
[] $pemakaianKendaraanMahasiswas
* @property PemakaianKendaraanM
ahasiswa
[] $pemakaianKendaraanMahasiswas0
* @property PemakaianKendaraanM
hs
[] $pemakaianKendaraanMahasiswas
* @property PemakaianKendaraanM
hs
[] $pemakaianKendaraanMahasiswas0
*/
class
StatusRequest
extends
\yii\db\ActiveRecord
{
...
...
@@ -43,7 +43,7 @@ class StatusRequest extends \yii\db\ActiveRecord
*/
public
static
function
tableName
()
{
return
'ubux_status_request'
;
return
'ubux_
r_
status_request'
;
}
/**
...
...
@@ -73,7 +73,7 @@ class StatusRequest extends \yii\db\ActiveRecord
*/
public
function
getPemakaianKendaraanMahasiswas
()
{
return
$this
->
hasMany
(
PemakaianKendaraanM
ahasiswa
::
className
(),
[
'status_request_sekertaris_rektorat'
=>
'id'
]);
return
$this
->
hasMany
(
PemakaianKendaraanM
hs
::
className
(),
[
'status_request_sekertaris_rektorat'
=>
'id'
]);
}
/**
...
...
@@ -81,6 +81,6 @@ class StatusRequest extends \yii\db\ActiveRecord
*/
public
function
getPemakaianKendaraanMahasiswas0
()
{
return
$this
->
hasMany
(
PemakaianKendaraanM
ahasiswa
::
className
(),
[
'status_request_kemahasiswaan'
=>
'id'
]);
return
$this
->
hasMany
(
PemakaianKendaraanM
hs
::
className
(),
[
'status_request_kemahasiswaan'
=>
'id'
]);
}
}
backend/modules/ubux/models/Supir.php
View file @
ef1e1b0b
...
...
@@ -13,7 +13,6 @@ use common\behaviors\DeleteBehavior;
*
* @property integer $supir_id
* @property integer $pegawai_id
* @property string $name_supir
* @property string $no_telepon_supir
* @property integer $deleted
* @property string $deleted_at
...
...
@@ -64,7 +63,6 @@ class Supir extends \yii\db\ActiveRecord
return
[
[[
'pegawai_id'
,
'deleted'
],
'integer'
],
[[
'deleted_at'
,
'created_at'
,
'updated_at'
],
'safe'
],
[[
'name_supir'
],
'string'
,
'max'
=>
45
],
[[
'no_telepon_supir'
,
'deleted_by'
,
'created_by'
,
'updated_by'
],
'string'
,
'max'
=>
32
]
];
}
...
...
@@ -76,8 +74,7 @@ class Supir extends \yii\db\ActiveRecord
{
return
[
'supir_id'
=>
'Supir ID'
,
'pegawai_id'
=>
'Hrdx Pegawai ID'
,
'name_supir'
=>
'Nama Supir'
,
'pegawai_id'
=>
'Nama'
,
'no_telepon_supir'
=>
'No Telepon Supir'
,
'deleted'
=>
'Deleted'
,
'deleted_at'
=>
'Deleted At'
,
...
...
@@ -86,7 +83,6 @@ class Supir extends \yii\db\ActiveRecord
'created_by'
=>
'Created By'
,
'updated_at'
=>
'Updated At'
,
'updated_by'
=>
'Updated By'
,
'pegawai_id'
=>
'Pegawai'
,
];
}
...
...
@@ -108,7 +104,7 @@ class Supir extends \yii\db\ActiveRecord
public
function
getTransaksiKendaraanBarus
()
{
return
$this
->
hasMany
(
PemakaianKendaraanM
ahasiswa
::
className
(),
[
'supir_id'
=>
'supir_id'
]);
return
$this
->
hasMany
(
PemakaianKendaraanM
hs
::
className
(),
[
'supir_id'
=>
'supir_id'
]);
}
public
function
getPegawai
()
...
...
@@ -116,4 +112,7 @@ class Supir extends \yii\db\ActiveRecord
return
$this
->
hasOne
(
Pegawai
::
className
(),
[
'pegawai_id'
=>
'pegawai_id'
]);
}
public
function
getNamaSupir
(){
return
$this
->
pegawai
->
nama
;
}
}
backend/modules/ubux/models/search/LaporanPemakaianKendaraanSearch.php
View file @
ef1e1b0b
...
...
@@ -19,7 +19,7 @@ class LaporanPemakaianKendaraanSearch extends LaporanPemakaianKendaraan
{
return
[
[[
'laporan_pemakaian_kendaraan_id'
,
'jumlah_penumpang'
,
'deleted'
,
'kendaraan_id'
,
'supir_id'
],
'integer'
],
[[
'tujuan'
,
'desc
_penumpang
'
,
'keperluan'
,
'waktu_keberangkatan'
,
'waktu_tiba'
,
'deleted_at'
,
'deleted_by'
,
'created_at'
,
'created_by'
,
'updated_at'
,
'updated_by'
],
'safe'
],
[[
'tujuan'
,
'desc'
,
'keperluan'
,
'waktu_keberangkatan'
,
'waktu_tiba'
,
'deleted_at'
,
'deleted_by'
,
'created_at'
,
'created_by'
,
'updated_at'
,
'updated_by'
],
'safe'
],
];
}
...
...
@@ -70,7 +70,7 @@ class LaporanPemakaianKendaraanSearch extends LaporanPemakaianKendaraan
]);
$query
->
andFilterWhere
([
'like'
,
'tujuan'
,
$this
->
tujuan
])
->
andFilterWhere
([
'like'
,
'desc
_penumpang'
,
$this
->
desc_penumpang
])
->
andFilterWhere
([
'like'
,
'desc
'
,
$this
->
desc
])
->
andFilterWhere
([
'like'
,
'keperluan'
,
$this
->
keperluan
])
->
andFilterWhere
([
'like'
,
'deleted_by'
,
$this
->
deleted_by
])
->
andFilterWhere
([
'like'
,
'created_by'
,
$this
->
created_by
])
...
...
backend/modules/ubux/models/search/PemakaianKendaraanM
ahasiswa
Search.php
→
backend/modules/ubux/models/search/PemakaianKendaraanM
hs
Search.php
View file @
ef1e1b0b
...
...
@@ -5,12 +5,12 @@ namespace backend\modules\ubux\models\search;
use
Yii
;
use
yii\base\Model
;
use
yii\data\ActiveDataProvider
;
use
backend\modules\ubux\models\PemakaianKendaraanM
ahasiswa
;
use
backend\modules\ubux\models\PemakaianKendaraanM
hs
;
/**
* PemakaianKendaraanM
ahasiswaSearch represents the model behind the search form about `backend\modules\ubux\models\PemakaianKendaraanMahasiswa
`.
* PemakaianKendaraanM
hsSearch represents the model behind the search form about `backend\modules\ubux\models\PemakaianKendaraanMhs
`.
*/
class
PemakaianKendaraanM
ahasiswaSearch
extends
PemakaianKendaraanMahasiswa
class
PemakaianKendaraanM
hsSearch
extends
PemakaianKendaraanMhs
{
/**
* @inheritdoc
...
...
@@ -18,8 +18,8 @@ class PemakaianKendaraanMahasiswaSearch extends PemakaianKendaraanMahasiswa
public
function
rules
()
{
return
[
[[
'status_req_sekretaris_rektorat'
,
'status_request_kemahasiswaan'
,
'
transaksi_kendaraan
_id'
,
'dim_id'
,
'jumlah_penumpang_kendaraan'
,
'deleted'
,
'kendaraan_id'
,
'supir_id'
],
'integer'
],
[[
'desc
_penggunaan_kendaraan
'
,
'tujuan'
,
'rencana_waktu_keberangkatan'
,
'rencana_waktu_kembali'
,
'proposal'
,
'no_telepon'
,
'deleted_at'
,
'deleted_by'
,
'created_at'
,
'created_by'
,
'updated_at'
,
'updated_by'
,
'no_hp_supir'
],
'safe'
],
[[
'status_req_sekretaris_rektorat'
,
'status_request_kemahasiswaan'
,
'
pemakaian_kendaraan_mhs
_id'
,
'dim_id'
,
'jumlah_penumpang_kendaraan'
,
'deleted'
,
'kendaraan_id'
,
'supir_id'
],
'integer'
],
[[
'desc'
,
'tujuan'
,
'rencana_waktu_keberangkatan'
,
'rencana_waktu_kembali'
,
'proposal'
,
'no_telepon'
,
'deleted_at'
,
'deleted_by'
,
'created_at'
,
'created_by'
,
'updated_at'
,
'updated_by'
,
'no_hp_supir'
],
'safe'
],
];
}
...
...
@@ -41,7 +41,7 @@ class PemakaianKendaraanMahasiswaSearch extends PemakaianKendaraanMahasiswa
*/
public
function
search
(
$params
)
{
$query
=
PemakaianKendaraanM
ahasiswa
::
find
()
->
where
([
'deleted'
=>
0
]);
$query
=
PemakaianKendaraanM
hs
::
find
()
->
where
([
'deleted'
=>
0
]);
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
$query
,
...
...
@@ -57,7 +57,7 @@ class PemakaianKendaraanMahasiswaSearch extends PemakaianKendaraanMahasiswa
}
$query
->
andFilterWhere
([
'
transaksi_kendaraan_id'
=>
$this
->
transaksi_kendaraan
_id
,
'
pemakaian_kendaraan_mhs_id'
=>
$this
->
pemakaian_kendaraan_mhs
_id
,
'dim_id'
=>
$this
->
dim_id
,
'jumlah_penumpang_kendaraan'
=>
$this
->
jumlah_penumpang_kendaraan
,
'rencana_waktu_keberangkatan'
=>
$this
->
rencana_waktu_keberangkatan
,
...
...
@@ -70,7 +70,7 @@ class PemakaianKendaraanMahasiswaSearch extends PemakaianKendaraanMahasiswa
'supir_id'
=>
$this
->
supir_id
,
]);
$query
->
andFilterWhere
([
'like'
,
'desc
_penggunaan_kendaraan'
,
$this
->
desc_penggunaan_kendaraan
])
$query
->
andFilterWhere
([
'like'
,
'desc
'
,
$this
->
desc
])
->
andFilterWhere
([
'like'
,
'tujuan'
,
$this
->
tujuan
])
->
andFilterWhere
([
'like'
,
'status_req_sekretaris_rektorat'
,
$this
->
status_req_sekretaris_rektorat
])
->
andFilterWhere
([
'like'
,
'status_request_kemahasiswaan'
,
$this
->
status_request_kemahasiswaan
])
...
...
backend/modules/ubux/models/search/PemakaianKendaraanSearch.php
View file @
ef1e1b0b
...
...
@@ -18,8 +18,8 @@ class PemakaianKendaraanSearch extends PemakaianKendaraan
public
function
rules
()
{
return
[
[[
'
transaksi_kendaraan_id'
,
'jumlah_penumpang_kendaraan'
,
'deleted'
,
'kendaraan_id'
,
'supir_id'
,
'role
'
,
'pegawai_id'
],
'integer'
],
[[
'
nama_perequest_kendaraan'
,
'desc_penggunaan_kendaraan
'
,
'rencana_waktu_keberangkatan'
,
'rencana_waktu_kembali'
,
'status_req_sekretaris_rektorat'
,
'status_request_kemahasiswaan'
,
'proposal'
,
'no_telepon'
,
'deleted_at'
,
'deleted_by'
,
'created_at'
,
'created_by'
,
'updated_at'
,
'updated_by'
,
'no_hp_supir'
,
'status_request_kabiro_KSD'
,
'status_request_hrd'
,
'status_request_keuangan'
,
'status_request_wr2'
],
'safe'
],
[[
'
pemakaian_kendaraan_id'
,
'jumlah_penumpang_kendaraan'
,
'deleted'
,
'kendaraan_id'
,
'supir_id'
,
'jenis_keperluan_id
'
,
'pegawai_id'
],
'integer'
],
[[
'
jenis_keperluan_id
'
,
'rencana_waktu_keberangkatan'
,
'rencana_waktu_kembali'
,
'status_req_sekretaris_rektorat'
,
'status_request_kemahasiswaan'
,
'proposal'
,
'no_telepon'
,
'deleted_at'
,
'deleted_by'
,
'created_at'
,
'created_by'
,
'updated_at'
,
'updated_by'
,
'no_hp_supir'
,
'status_request_kabiro_KSD'
,
'status_request_hrd'
,
'status_request_keuangan'
,
'status_request_wr2'
],
'safe'
],
];
}
...
...
@@ -57,7 +57,7 @@ class PemakaianKendaraanSearch extends PemakaianKendaraan
}
$query
->
andFilterWhere
([
'
transaksi_kendaraan_id'
=>
$this
->
transaksi
_kendaraan_id
,
'
pemakaian_kendaraan_id'
=>
$this
->
pemakaian
_kendaraan_id
,
'pegawai_id'
=>
$this
->
pegawai_id
,
'jumlah_penumpang_kendaraan'
=>
$this
->
jumlah_penumpang_kendaraan
,
'rencana_waktu_keberangkatan'
=>
$this
->
rencana_waktu_keberangkatan
,
...
...
@@ -70,12 +70,11 @@ class PemakaianKendaraanSearch extends PemakaianKendaraan
'supir_id'
=>
$this
->
supir_id
,
]);
$query
->
andFilterWhere
([
'like'
,
'nama_perequest_kendaraan'
,
$this
->
nama_perequest_kendaraan
])
->
andFilterWhere
([
'like'
,
'desc_penggunaan_kendaraan'
,
$this
->
desc_penggunaan_kendaraan
])
$query
->
andFilterWhere
([
'like'
,
'jenis_keperluan_id'
,
$this
->
jenis_keperluan_id
])
->
andFilterWhere
([
'like'
,
'pegawai_id'
,
$this
->
pegawai_id
])
->
andFilterWhere
([
'like'
,
'status_req_sekretaris_rektorat'
,
$this
->
status_req_sekretaris_rektorat
])
->
andFilterWhere
([
'like'
,
'status_request_kemahasiswaan'
,
$this
->
status_request_kemahasiswaan
])
->
andFilterWhere
([
'like'
,
'
role'
,
$this
->
role
])
->
andFilterWhere
([
'like'
,
'
jenis_keperluan_id'
,
$this
->
jenis_keperluan_id
])
->
andFilterWhere
([
'like'
,
'proposal'
,
$this
->
proposal
])
->
andFilterWhere
([
'like'
,
'no_telepon'
,
$this
->
no_telepon
])
->
andFilterWhere
([
'like'
,
'deleted_by'
,
$this
->
deleted_by
])
...
...
backend/modules/ubux/models/search/SupirSearch.php
View file @
ef1e1b0b
...
...
@@ -18,8 +18,8 @@ class SupirSearch extends Supir
public
function
rules
()
{
return
[
[[
'supir_id'
,
'deleted'
],
'integer'
],
[[
'n
ame_supir'
,
'n
o_telepon_supir'
,
'deleted_at'
,
'deleted_by'
,
'created_at'
,
'created_by'
,
'updated_at'
,
'updated_by'
],
'safe'
],
[[
'supir_id'
,
'
pegawai_id'
,
'
deleted'
],
'integer'
],
[[
'no_telepon_supir'
,
'deleted_at'
,
'deleted_by'
,
'created_at'
,
'created_by'
,
'updated_at'
,
'updated_by'
],
'safe'
],
];
}
...
...
@@ -45,6 +45,9 @@ class SupirSearch extends Supir
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
$query
,
'pagination'
=>
[
'pageSize'
=>
10
,
],
'sort'
=>
[
'defaultOrder'
=>
[
'updated_at'
=>
SORT_DESC
,
'created_at'
=>
SORT_DESC
]],
]);
...
...
@@ -58,14 +61,14 @@ class SupirSearch extends Supir
$query
->
andFilterWhere
([
'supir_id'
=>
$this
->
supir_id
,
'pegawai_id'
=>
$this
->
pegawai_id
,
'deleted'
=>
$this
->
deleted
,
'deleted_at'
=>
$this
->
deleted_at
,
'created_at'
=>
$this
->
created_at
,
'updated_at'
=>
$this
->
updated_at
,
]);
$query
->
andFilterWhere
([
'like'
,
'name_supir'
,
$this
->
name_supir
])
->
andFilterWhere
([
'like'
,
'no_telepon_supir'
,
$this
->
no_telepon_supir
])
$query
->
andFilterWhere
([
'like'
,
'no_telepon_supir'
,
$this
->
no_telepon_supir
])
->
andFilterWhere
([
'like'
,
'deleted_by'
,
$this
->
deleted_by
])
->
andFilterWhere
([
'like'
,
'created_by'
,
$this
->
created_by
])
->
andFilterWhere
([
'like'
,
'updated_by'
,
$this
->
updated_by
]);
...
...
backend/modules/ubux/views/laporan-pemakaian-kendaraan/_form.php
View file @
ef1e1b0b
...
...
@@ -30,7 +30,7 @@ use yii\bootstrap\ActiveForm;
<?=
$form
->
field
(
$model
,
'tujuan'
)
->
textarea
()
?>
<?=
$form
->
field
(
$model
,
'desc
_penumpang
'
)
->
textarea
()
?>
<?=
$form
->
field
(
$model
,
'desc'
)
->
textarea
()
?>
<?=
$form
->
field
(
$model
,
'jumlah_penumpang'
)
->
textInput
()
?>
...
...
@@ -74,15 +74,15 @@ use yii\bootstrap\ActiveForm;
-->
<?=
$form
->
field
(
$model
,
'kendaraan_id'
)
->
dropDownList
(
ArrayHelper
::
map
(
Kendaraan
::
find
()
->
select
([
'kendaraan_id'
,
'kendaraan'
])
->
all
(),
'kendaraan_id'
,
'k
endaraan'
),
'kendaraan_id'
,
'kendaraan'
,
'plat_nomor'
])
->
where
([
'deleted'
=>
0
])
->
all
(),
'kendaraan_id'
,
'KeteranganK
endaraan'
),
[
'prompt'
=>
'Pilih Kendaraan'
]
)
?>
<?=
$form
->
field
(
$model
,
'supir_id'
)
->
dropDownList
(
ArrayHelper
::
map
(
Supir
::
find
()
->
select
([
'supir_id'
,
'
name_supir'
])
->
all
(),
'supir_id'
,
'name_s
upir'
),
'supir_id'
,
'
pegawai_id'
,
])
->
where
([
'deleted'
=>
0
])
->
all
(),
'supir_id'
,
'NamaS
upir'
),
[
'prompt'
=>
'Pilih Supir'
]
)
?>
...
...
backend/modules/ubux/views/laporan-pemakaian-kendaraan/_search.php
View file @
ef1e1b0b
...
...
@@ -19,7 +19,7 @@ use yii\widgets\ActiveForm;
<?=
$form
->
field
(
$model
,
'tujuan'
)
?>
<?=
$form
->
field
(
$model
,
'desc
_penumpang
'
)
?>
<?=
$form
->
field
(
$model
,
'desc'
)
?>
<?=
$form
->
field
(
$model
,
'jumlah_penumpang'
)
?>
...
...
backend/modules/ubux/views/laporan-pemakaian-kendaraan/index.php
View file @
ef1e1b0b
...
...
@@ -4,6 +4,7 @@ use yii\helpers\Html;
use
yii\grid\GridView
;
use
yii\helpers\Url
;
use
common\components\ToolsColumn
;
use
yii\base\Model
;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\LaporanPemakaianKendaraanSearch */
...
...
@@ -28,7 +29,7 @@ $this->params['breadcrumbs'][] = $this->title;
// 'laporan_pemakaian_kendaraan_id',
'tujuan'
,
'desc
_penumpang
'
,
'desc'
,
'jumlah_penumpang'
,
'keperluan'
,
'waktu_keberangkatan'
,
...
...
@@ -42,13 +43,24 @@ $this->params['breadcrumbs'][] = $this->title;
// 'updated_by',
// 'kendaraan_id',
[
'attribute'
=>
'Kendaraan'
,
'value'
=>
'kendaraan.kendaraan'
,
'attribute'
=>
'Supir'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
supir_id
!=
null
){
return
$model
->
supir
->
pegawai
->
nama
;
}
else
{
return
'-'
;
}
},
],
// 'supir_id',
[
'attribute'
=>
'Supir'
,
'value'
=>
'supir.name_supir'
'attribute'
=>
'Kendaraan'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
kendaraan_id
!=
null
)
{
return
$model
->
kendaraan
->
kendaraan
;
}
else
{
return
'-'
;
}
},
],
[
'class'
=>
'common\components\ToolsColumn'
,
...
...
backend/modules/ubux/views/laporan-pemakaian-kendaraan/view.php
View file @
ef1e1b0b
...
...
@@ -2,6 +2,7 @@
use
yii\helpers\Html
;
use
yii\widgets\DetailView
;
use
yii\base\Model
;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\LaporanPemakaianKendaraan */
...
...
@@ -31,7 +32,7 @@ $this->params['breadcrumbs'][] = $this->title;
'attributes'
=>
[
// 'laporan_pemakaian_kendaraan_id',
'tujuan'
,
'desc
_penumpang
'
,
'desc'
,
'jumlah_penumpang'
,
'keperluan'
,
'waktu_keberangkatan'
,
...
...
@@ -45,13 +46,24 @@ $this->params['breadcrumbs'][] = $this->title;
// 'updated_by',
// 'kendaraan_id',
[
'attribute'
=>
'Kendaraan'
,
'value'
=>
$model
->
kendaraan
->
kendaraan
'attribute'
=>
'Supir'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
supir_id
!=
null
){
return
$model
->
supir
->
pegawai
->
nama
;
}
else
{
return
'-'
;
}
},
],
// 'supir_id',
[
'attribute'
=>
'Supir'
,
'value'
=>
$model
->
supir
->
name_supir
,
'attribute'
=>
'Kendaraan'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
kendaraan_id
!=
null
)
{
return
$model
->
kendaraan
->
kendaraan
;
}
else
{
return
'-'
;
}
},
],
],
])
?>
...
...
backend/modules/ubux/views/laporan-pemakaian-kendaraan/viewPdf.php
View file @
ef1e1b0b
...
...
@@ -49,7 +49,7 @@ $this->params['breadcrumbs'][] = $this->title;
<tr>
<td
class=
"kolom"
>
Deskripsi Penumpang
</td>
<td
class=
"kolom"
>
:
</td>
<td
class=
"kolom"
>
<?=
$model
->
desc
_penumpang
?>
</td>
<td
class=
"kolom"
>
<?=
$model
->
desc
?>
</td>
</tr>
<tr>
<td
class=
"kolom"
>
Jumlah Penumpang
</td>
...
...
@@ -79,7 +79,7 @@ $this->params['breadcrumbs'][] = $this->title;
<tr>
<td
class=
"kolom"
>
Supir
</td>
<td>
:
</td>
<td>
<?=
$model
->
supir
->
name_supir
?>
</td>
<td>
<?=
$model
->
supir
->
pegawai
->
nama
?>
</td>
</tr>
</table>
...
...
@@ -89,7 +89,7 @@ $this->params['breadcrumbs'][] = $this->title;
// 'attributes' => [
// 'laporan_pemakaian_kendaraan_id',
// 'tujuan',
// 'desc
_penumpang
',
// 'desc',
// 'jumlah_penumpang',
// 'keperluan',
// 'waktu_keberangkatan',
...
...
backend/modules/ubux/views/pemakaian-kendaraan-m
ahasiswa
/PopUp.php
→
backend/modules/ubux/views/pemakaian-kendaraan-m
hs
/PopUp.php
View file @
ef1e1b0b
File moved
backend/modules/ubux/views/pemakaian-kendaraan-m
ahasiswa
/_form.php
→
backend/modules/ubux/views/pemakaian-kendaraan-m
hs
/_form.php
View file @
ef1e1b0b
...
...
@@ -5,7 +5,7 @@ use yii\bootstrap\ActiveForm;
use
dosamigos\datetimepicker\DateTimePicker
;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraanM
ahasiswa
*/
/* @var $model backend\modules\ubux\models\PemakaianKendaraanM
hs
*/
/* @var $form yii\widgets\ActiveForm */
?>
...
...
@@ -26,7 +26,7 @@ use dosamigos\datetimepicker\DateTimePicker;
<!--
<?=
$form
->
field
(
$model
,
'dim_id'
)
->
textInput
()
?>
-->
<?=
$form
->
field
(
$model
,
'desc
_penggunaan_kendaraan
'
)
->
textarea
()
?>
<?=
$form
->
field
(
$model
,
'desc'
)
->
textarea
()
?>
<?=
$form
->
field
(
$model
,
'tujuan'
)
->
textarea
()
?>
...
...
backend/modules/ubux/views/pemakaian-kendaraan-m
ahasiswa
/_search.php
→
backend/modules/ubux/views/pemakaian-kendaraan-m
hs
/_search.php
View file @
ef1e1b0b
...
...
@@ -21,7 +21,7 @@ use yii\widgets\ActiveForm;
<?=
$form
->
field
(
$model
,
'nama_perequest_kendaraan'
)
?>
<?=
$form
->
field
(
$model
,
'desc
_penggunaan_kendaraan
'
)
?>
<?=
$form
->
field
(
$model
,
'desc'
)
?>
<?=
$form
->
field
(
$model
,
'tujuan'
)
?>
...
...
backend/modules/ubux/views/pemakaian-kendaraan-m
ahasiswa
/add.php
→
backend/modules/ubux/views/pemakaian-kendaraan-m
hs
/add.php
View file @
ef1e1b0b
...
...
@@ -4,7 +4,7 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraanM
ahasiswa
*/
/* @var $model backend\modules\ubux\models\PemakaianKendaraanM
hs
*/
$this
->
title
=
'Buat Permintaan Kendaraan Mahasiswa'
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Buat Permintaan Kendaraan Mahasiswa'
,
'url'
=>
[
'index'
]];
...
...
backend/modules/ubux/views/pemakaian-kendaraan-m
ahasiswa
/edit.php
→
backend/modules/ubux/views/pemakaian-kendaraan-m
hs
/edit.php
View file @
ef1e1b0b
...
...
@@ -3,11 +3,11 @@
use
yii\helpers\Html
;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraanM
ahasiswa
*/
/* @var $model backend\modules\ubux\models\PemakaianKendaraanM
hs
*/
$this
->
title
=
'Ubah Permintaan Kendaraan Mahasiswa'
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Ubah Permitaan Kendaraan Mahasiswa'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
transaksi_kendaraan_id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
transaksi_kendaraan
_id
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
pemakaian_kendaraan_mhs_id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
pemakaian_kendaraan_mhs
_id
]];
$this
->
params
[
'breadcrumbs'
][]
=
'Ubah'
;
?>
<div
class=
"ubux-transaksi-kendaraan-mahasiswa-baru-update"
>
...
...
backend/modules/ubux/views/pemakaian-kendaraan-m
ahasiswa
/index.php
→
backend/modules/ubux/views/pemakaian-kendaraan-m
hs
/index.php
View file @
ef1e1b0b
...
...
@@ -31,7 +31,7 @@ $this->params['breadcrumbs'][] = $this->title;
// 'transaksi_kendaraan_id',
// 'dim_id',
// 'nama_perequest_kendaraan',
'desc
_penggunaan_kendaraan
',
'desc',
'tujuan',
'jumlah_penumpang_kendaraan',
'rencana_waktu_keberangkatan',
...
...
backend/modules/ubux/views/pemakaian-kendaraan-m
ahasiswa
/indexByKemahasiswaan.php
→
backend/modules/ubux/views/pemakaian-kendaraan-m
hs
/indexByKemahasiswaan.php
View file @
ef1e1b0b
...
...
@@ -26,7 +26,6 @@ $this->params['breadcrumbs'][] = $this->title;
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
// 'transaksi_kendaraan_id',
// 'dim_id',
[
'attribute'
=>
'NIM'
,
...
...
@@ -36,7 +35,7 @@ $this->params['breadcrumbs'][] = $this->title;
'attribute'
=>
'Nama'
,
'value'
=>
'mahasiswa.nama'
,
],
'desc
_penggunaan_kendaraan
'
,
'desc'
,
'tujuan'
,
'jumlah_penumpang_kendaraan'
,
// 'rencana_waktu_keberangkatan',
...
...
backend/modules/ubux/views/pemakaian-kendaraan-m
ahasiswa
/view.php
→
backend/modules/ubux/views/pemakaian-kendaraan-m
hs
/view.php
View file @
ef1e1b0b
...
...
@@ -2,9 +2,10 @@
use
yii\helpers\Html
;
use
yii\widgets\DetailView
;
use
yii\base\Model
;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraanM
ahasiswa
*/
/* @var $model backend\modules\ubux\models\PemakaianKendaraanM
hs
*/
$this
->
title
=
'Rincian Permintaan Kendaraan'
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Permintaan Kendaraan Mahasiswa'
,
'url'
=>
[
'index'
]];
...
...
@@ -17,9 +18,9 @@ $this->params['breadcrumbs'][] = $this->title;
<p>
<?php
if
(
$model
->
status_request_kemahasiswaan
==
1
){
echo
Html
::
a
(
'Ubah'
,
[
'edit'
,
'id'
=>
$model
->
transaksi_kendaraan
_id
],
[
'class'
=>
'btn btn-primary'
]);
echo
Html
::
a
(
'Ubah'
,
[
'edit'
,
'id'
=>
$model
->
pemakaian_kendaraan_mhs
_id
],
[
'class'
=>
'btn btn-primary'
]);
echo
' '
;
echo
Html
::
a
(
'Hapus'
,
[
'del'
,
'id'
=>
$model
->
transaksi_kendaraan
_id
],
[
echo
Html
::
a
(
'Hapus'
,
[
'del'
,
'id'
=>
$model
->
pemakaian_kendaraan_mhs
_id
],
[
'class'
=>
'btn btn-danger'
,
'data'
=>
[
'confirm'
=>
'Apakah anda yakin ingin menhapus ?'
,
...
...
@@ -27,7 +28,7 @@ $this->params['breadcrumbs'][] = $this->title;
],
]);
}
else
if
(
$model
->
status_req_sekretaris_rektorat
==
2
){
echo
Html
::
a
(
'Cetak'
,
[
'cetak'
,
'id'
=>
$model
->
transaksi_kendaraan
_id
],
[
'class'
=>
'btn btn-warning'
]);
echo
Html
::
a
(
'Cetak'
,
[
'cetak'
,
'id'
=>
$model
->
pemakaian_kendaraan_mhs
_id
],
[
'class'
=>
'btn btn-warning'
]);
}
?>
...
...
@@ -36,7 +37,7 @@ $this->params['breadcrumbs'][] = $this->title;
<?=
DetailView
::
widget
([
'model'
=>
$model
,
'attributes'
=>
[
// '
transaksi_kendaraan
_id',
// '
pemakaian_kendaraan_mhs
_id',
// 'dim_id',
[
'attribute'
=>
'NIM'
,
...
...
@@ -46,7 +47,7 @@ $this->params['breadcrumbs'][] = $this->title;
'attribute'
=>
'Nama'
,
'value'
=>
$model
->
mahasiswa
->
nama
,
],
'desc
_penggunaan_kendaraan
'
,
'desc'
,
'tujuan'
,
'jumlah_penumpang_kendaraan'
,
'rencana_waktu_keberangkatan'
,
...
...
@@ -71,17 +72,40 @@ $this->params['breadcrumbs'][] = $this->title;
// 'kendaraan_id',
[
'attribute'
=>
'Kendaraan'
,
'value'
=>
$model
->
kendaraan
->
kendaraan
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
kendaraan_id
!=
null
)
{
return
$model
->
kendaraan
->
kendaraan
;
//or: return Html::encode($model->some_attribute)
}
else
{
return
'-'
;
}
},
],
// 'supir_id'
,
// 'supir_id'
[
'attribute'
=>
'Supir'
,
'value'
=>
$model
->
supir
->
name_supir
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
supir_id
!=
null
){
return
$model
->
supir
->
pegawai
->
nama
;
}
else
{
return
'-'
;
}
},
],
// 'no_hp_supir',
[
'attribute'
=>
'no_hp_supir'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
supir_id
!=
null
){
return
$model
->
supir
->
no_telepon_supir
;
}
else
{
return
'-'
;
}
},
],
'no_hp_supir'
,
],
])
?>
<?=
Html
::
a
(
'Download Proposal'
,
[
'pemakaian-kendaraan-m
ahasiswa/download'
,
'id'
=>
$model
->
transaksi_kendaraan
_id
],
[
'class'
=>
'btn btn-success'
])
?>
<?=
Html
::
a
(
'Download Proposal'
,
[
'pemakaian-kendaraan-m
hs/download'
,
'id'
=>
$model
->
pemakaian_kendaraan_mhs
_id
],
[
'class'
=>
'btn btn-success'
])
?>
</div>
backend/modules/ubux/views/pemakaian-kendaraan-m
ahasiswa
/viewByKemahasiswaan.php
→
backend/modules/ubux/views/pemakaian-kendaraan-m
hs
/viewByKemahasiswaan.php
View file @
ef1e1b0b
...
...
@@ -2,9 +2,10 @@
use
yii\helpers\Html
;
use
yii\widgets\DetailView
;
use
yii\base\Model
;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraanM
ahasiswa
*/
/* @var $model backend\modules\ubux\models\PemakaianKendaraanM
hs
*/
$this
->
title
=
'Rincian Permintaan Kendaraan'
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Permintaan Kendaraan Mahasiswa'
,
'url'
=>
[
'index'
]];
...
...
@@ -17,11 +18,11 @@ $this->params['breadcrumbs'][] = $this->title;
<p>
<?php
if
(
$model
->
status_req_sekretaris_rektorat
==
2
){
echo
Html
::
a
(
'Cetak'
,
[
'cetak'
,
'id'
=>
$model
->
transaksi_kendaraan
_id
],
[
'class'
=>
'btn btn-warning'
]);
echo
Html
::
a
(
'Cetak'
,
[
'cetak'
,
'id'
=>
$model
->
pemakaian_kendaraan_mhs
_id
],
[
'class'
=>
'btn btn-warning'
]);
}
if
(
$model
->
status_request_kemahasiswaan
==
1
){
echo
Html
::
a
(
'Terima'
,
[
'accept'
,
'id'
=>
$model
->
transaksi_kendaraan
_id
],
[
'class'
=>
'btn btn-success'
]);
echo
Html
::
a
(
'Terima'
,
[
'accept'
,
'id'
=>
$model
->
pemakaian_kendaraan_mhs
_id
],
[
'class'
=>
'btn btn-success'
]);
echo
' '
;
echo
Html
::
a
(
'Tolak'
,
[
'reject'
,
'id'
=>
$model
->
transaksi_kendaraan
_id
],
[
'class'
=>
'btn btn-danger'
]);
echo
Html
::
a
(
'Tolak'
,
[
'reject'
,
'id'
=>
$model
->
pemakaian_kendaraan_mhs
_id
],
[
'class'
=>
'btn btn-danger'
]);
}
if
(
$model
->
status_request_kemahasiswaan
==
2
&&
$model
->
status_req_sekretaris_rektorat
==
1
){
echo
'<p style="color:red;">Permintaan Telah disetuju. Menunggu persetujuan Sekretaris Rektorat</p>'
;
}
...
...
@@ -32,7 +33,6 @@ $this->params['breadcrumbs'][] = $this->title;
<?=
DetailView
::
widget
([
'model'
=>
$model
,
'attributes'
=>
[
// 'transaksi_kendaraan_id',
// 'dim_id',
[
'attribute'
=>
'NIM'
,
...
...
@@ -42,7 +42,7 @@ $this->params['breadcrumbs'][] = $this->title;
'attribute'
=>
'Nama'
,
'value'
=>
$model
->
mahasiswa
->
nama
,
],
'desc
_penggunaan_kendaraan
'
,
'desc'
,
'tujuan'
,
'jumlah_penumpang_kendaraan'
,
'rencana_waktu_keberangkatan'
,
...
...
@@ -64,20 +64,42 @@ $this->params['breadcrumbs'][] = $this->title;
// 'created_by',
// 'updated_at',
// 'updated_by',
// 'kendaraan_id',
[
'attribute'
=>
'Kendaraan'
,
'value'
=>
$model
->
kendaraan
->
kendaraan
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
kendaraan_id
!=
null
)
{
return
$model
->
kendaraan
->
kendaraan
;
//or: return Html::encode($model->some_attribute)
}
else
{
return
'-'
;
}
},
],
// 'supir_id'
,
// 'supir_id'
[
'attribute'
=>
'Supir'
,
'value'
=>
$model
->
supir
->
name_supir
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
supir_id
!=
null
){
return
$model
->
supir
->
pegawai
->
nama
;
}
else
{
return
'-'
;
}
},
],
// 'no_hp_supir',
[
'attribute'
=>
'no_hp_supir'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
supir_id
!=
null
){
return
$model
->
supir
->
no_telepon_supir
;
}
else
{
return
'-'
;
}
},
],
'no_hp_supir'
,
],
])
?>
<?=
Html
::
a
(
'Download Proposal'
,
[
'pemakaian-kendaraan-m
ahasiswa/download'
,
'id'
=>
$model
->
transaksi_kendaraan
_id
],
[
'class'
=>
'btn btn-success'
])
?>
<?=
Html
::
a
(
'Download Proposal'
,
[
'pemakaian-kendaraan-m
hs/download'
,
'id'
=>
$model
->
pemakaian_kendaraan_mhs
_id
],
[
'class'
=>
'btn btn-success'
])
?>
</div>
backend/modules/ubux/views/pemakaian-kendaraan-m
ahasiswa
/viewPdf.php
→
backend/modules/ubux/views/pemakaian-kendaraan-m
hs
/viewPdf.php
View file @
ef1e1b0b
...
...
@@ -4,7 +4,7 @@ use yii\helpers\Html;
use
yii\widgets\DetailView
;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraanM
ahasiswa
*/
/* @var $model backend\modules\ubux\models\PemakaianKendaraanM
hs
*/
$this
->
title
=
'Request Kendaraan Mahasiswa'
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Request Kendaraan Mahasiswa'
,
'url'
=>
[
'index'
]];
...
...
@@ -54,7 +54,7 @@ $this->params['breadcrumbs'][] = $this->title;
<tr>
<td
class=
"kolom"
>
Keperluan
</td>
<td>
:
</td>
<td>
<?=
$model
->
desc
_penggunaan_kendaraan
?>
</td>
<td>
<?=
$model
->
desc
?>
</td>
</tr>
<tr>
<td
class=
"kolom"
>
Tujuan
</td>
...
...
@@ -79,7 +79,7 @@ $this->params['breadcrumbs'][] = $this->title;
<tr>
<td
class=
"kolom"
>
Status
</td>
<td>
:
</td>
<td>
<?=
$model
->
status
_req_sekretaris_rektorat
?>
</td>
<td>
<?=
$model
->
status
RequestSekretarisRektorat
->
status
?>
</td>
</tr>
<tr>
<td
class=
"kolom"
>
No Telepon
</td>
...
...
@@ -94,7 +94,7 @@ $this->params['breadcrumbs'][] = $this->title;
<tr>
<td
class=
"kolom"
>
Supir
</td>
<td>
:
</td>
<td>
<?=
$model
->
supir
->
name_supir
?>
</td>
<td>
<?=
$model
->
supir
->
pegawai
->
nama
?>
</td>
</tr>
<tr>
<td
class=
"kolom"
>
No Hp Supir
</td>
...
...
@@ -109,7 +109,7 @@ $this->params['breadcrumbs'][] = $this->title;
// 'attributes' => [
// 'transaksi_kendaraan_id',
// 'nama_perequest_kendaraan',
// 'desc
_penggunaan_kendaraan
',
// 'desc',
// 'tujuan',
// 'jumlah_penumpang_kendaraan',
// 'rencana_waktu_keberangkatan',
...
...
backend/modules/ubux/views/pemakaian-kendaraan/_formByPegawai.php
View file @
ef1e1b0b
...
...
@@ -28,10 +28,8 @@ use backend\modules\ubux\models\Kendaraan;
],
],
]);
?>
<!--
<?=
$form
->
field
(
$model
,
'nama_perequest_kendaraan'
)
->
textInput
([
'maxlength'
=>
true
])
?>
-->
<?=
$form
->
field
(
$model
,
'desc_penggunaan_kendaraan'
)
->
textarea
()
?>
<?=
$form
->
field
(
$model
,
'desc'
)
->
textarea
()
?>
<?=
$form
->
field
(
$model
,
'tujuan'
)
->
textarea
()
?>
...
...
@@ -64,7 +62,7 @@ use backend\modules\ubux\models\Kendaraan;
<?=
$form
->
field
(
$model
,
'status_request_kemahasiswaan'
)
->
dropDownList
([
'Menunggu'
=>
'Menunggu'
,
'Diterima'
=>
'Diterima'
,
'Ditolak'
=>
'Ditolak'
,
],
[
'prompt'
=>
''
])
?>
<?=
$form
->
field
(
$model
,
'
role
'
)
->
dropDownList
([
'Mahasiswa'
=>
'Mahasiswa'
,
'Pegawai'
=>
'Pegawai'
,
],
[
'prompt'
=>
''
])
?>
<?=
$form
->
field
(
$model
,
'
jenis_keperluan_id
'
)
->
dropDownList
([
'Mahasiswa'
=>
'Mahasiswa'
,
'Pegawai'
=>
'Pegawai'
,
],
[
'prompt'
=>
''
])
?>
<?=
$form
->
field
(
$model
,
'proposal'
)
->
textInput
([
'maxlength'
=>
true
])
?>
...
...
backend/modules/ubux/views/pemakaian-kendaraan/_formByPribadi.php
View file @
ef1e1b0b
...
...
@@ -29,9 +29,7 @@ use backend\modules\ubux\models\Kendaraan;
],
]);
?>
<?=
$form
->
field
(
$model
,
'nama_perequest_kendaraan'
)
->
textInput
()
?>
<?=
$form
->
field
(
$model
,
'desc_penggunaan_kendaraan'
)
->
textarea
()
?>
<?=
$form
->
field
(
$model
,
'desc'
)
->
textarea
()
?>
<?=
$form
->
field
(
$model
,
'tujuan'
)
->
textarea
()
?>
...
...
@@ -64,7 +62,7 @@ use backend\modules\ubux\models\Kendaraan;
<?=
$form
->
field
(
$model
,
'status_request_kemahasiswaan'
)
->
dropDownList
([
'Menunggu'
=>
'Menunggu'
,
'Diterima'
=>
'Diterima'
,
'Ditolak'
=>
'Ditolak'
,
],
[
'prompt'
=>
''
])
?>
<?=
$form
->
field
(
$model
,
'
role
'
)
->
dropDownList
([
'Mahasiswa'
=>
'Mahasiswa'
,
'Pegawai'
=>
'Pegawai'
,
],
[
'prompt'
=>
''
])
?>
<?=
$form
->
field
(
$model
,
'
jenis_keperluan_id
'
)
->
dropDownList
([
'Mahasiswa'
=>
'Mahasiswa'
,
'Pegawai'
=>
'Pegawai'
,
],
[
'prompt'
=>
''
])
?>
<?=
$form
->
field
(
$model
,
'proposal'
)
->
textInput
()
?>
...
...
@@ -89,7 +87,7 @@ use backend\modules\ubux\models\Kendaraan;
<?=
$form
->
field
(
$model
,
'kendaraan_id'
)
->
dropDownList
(
ArrayHelper
::
map
(
Kendaraan
::
find
()
->
select
([
'kendaraan_id'
,
'kendaraan'
])
->
all
(),
'kendaraan_id'
,
'kendaraan'
),
])
->
where
([
'deleted'
=>
0
])
->
all
(),
'kendaraan_id'
,
'kendaraan'
),
[
'prompt'
=>
'Pilih Kendaraan'
]
)
?>
-->
...
...
backend/modules/ubux/views/pemakaian-kendaraan/_formBySekretarisRektorat.php
View file @
ef1e1b0b
...
...
@@ -31,14 +31,14 @@ use backend\modules\ubux\models\Supir;
<?=
$form
->
field
(
$model
,
'kendaraan_id'
)
->
dropDownList
(
ArrayHelper
::
map
(
Kendaraan
::
find
()
->
select
([
'kendaraan_id'
,
'kendaraan'
,
'plat_nomor'
])
->
all
(),
'kendaraan_id'
,
'KeteranganKendaraan'
),
])
->
where
([
'deleted'
=>
0
])
->
all
(),
'kendaraan_id'
,
'KeteranganKendaraan'
),
[
'prompt'
=>
'Pilih Kendaraan'
]
)
?>
<?=
$form
->
field
(
$model
,
'supir_id'
)
->
dropDownList
(
ArrayHelper
::
map
(
Supir
::
find
()
->
select
([
'supir_id'
,
'
name_supir'
])
->
all
(),
'supir_id'
,
'name_s
upir'
),
'supir_id'
,
'
pegawai_id'
,
])
->
where
([
'deleted'
=>
0
])
->
all
(),
'supir_id'
,
'NamaS
upir'
),
[
'prompt'
=>
'Pilih Supir'
]
)
?>
<!--
...
...
backend/modules/ubux/views/pemakaian-kendaraan/_search.php
View file @
ef1e1b0b
...
...
@@ -15,11 +15,9 @@ use yii\widgets\ActiveForm;
'method'
=>
'get'
,
]);
?>
<?=
$form
->
field
(
$model
,
'
transaksi
_kendaraan_id'
)
?>
<?=
$form
->
field
(
$model
,
'
pemakaian
_kendaraan_id'
)
?>
<?=
$form
->
field
(
$model
,
'nama_perequest_kendaraan'
)
?>
<?=
$form
->
field
(
$model
,
'desc_penggunaan_kendaraan'
)
?>
<?=
$form
->
field
(
$model
,
'desc'
)
?>
<?=
$form
->
field
(
$model
,
'jumlah_penumpang_kendaraan'
)
?>
...
...
@@ -31,7 +29,7 @@ use yii\widgets\ActiveForm;
<?
php
// echo $form->field($model, 'status_request_kemahasiswaan') ?>
<?
php
// echo $form->field($model, '
role
') ?>
<?
php
// echo $form->field($model, '
jenis_keperluan_id
') ?>
<?
php
// echo $form->field($model, 'proposal') ?>
...
...
backend/modules/ubux/views/pemakaian-kendaraan/edit.php
View file @
ef1e1b0b
...
...
@@ -7,7 +7,7 @@ use yii\helpers\Html;
$this
->
title
=
'Ubah Permintaan Kendaraan Mahasiswa'
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Permintaan Kendaraan Mahasiswa'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
transaksi_kendaraan_id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
pemakaian_kendaraan_id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
]];
$this
->
params
[
'breadcrumbs'
][]
=
'Ubah'
;
?>
<div
class=
"ubux-transaksi-kendaraan-mahasiswa-update"
>
...
...
backend/modules/ubux/views/pemakaian-kendaraan/indexByHrd.php
View file @
ef1e1b0b
...
...
@@ -23,15 +23,14 @@ $this->params['breadcrumbs'][] = $this->title;
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
// 'transaksi_kendaraan_id',
'nama_perequest_kendaraan'
,
'desc_penggunaan_kendaraan'
,
// 'pemakaian_kendaraan_id',
'desc'
,
'tujuan'
,
// 'jumlah_penumpang_kendaraan',
// 'rencana_waktu_keberangkatan',
// 'rencana_waktu_kembali',
// 'status_request_kemahasiswaan',
// '
role
',
// '
jenis_keperluan_id
',
// 'proposal',
// 'deleted',
// 'deleted_at',
...
...
backend/modules/ubux/views/pemakaian-kendaraan/indexByKabiroKsd.php
View file @
ef1e1b0b
...
...
@@ -23,15 +23,14 @@ $this->params['breadcrumbs'][] = $this->title;
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
// 'transaksi_kendaraan_id',
'nama_perequest_kendaraan'
,
'desc_penggunaan_kendaraan'
,
// 'pemakaian_kendaraan_id',
'desc'
,
'tujuan'
,
// 'jumlah_penumpang_kendaraan',
// 'rencana_waktu_keberangkatan',
// 'rencana_waktu_kembali',
// 'status_request_kemahasiswaan',
// '
role
',
// '
jenis_keperluan_id
',
// 'proposal',
// 'deleted',
// 'deleted_at',
...
...
backend/modules/ubux/views/pemakaian-kendaraan/indexByKeuangan.php
View file @
ef1e1b0b
...
...
@@ -23,15 +23,14 @@ $this->params['breadcrumbs'][] = $this->title;
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
// 'transaksi_kendaraan_id',
'nama_perequest_kendaraan'
,
'desc_penggunaan_kendaraan'
,
// 'pemakaian_kendaraan_id',
'desc'
,
'tujuan'
,
// 'jumlah_penumpang_kendaraan',
// 'rencana_waktu_keberangkatan',
// 'rencana_waktu_kembali',
// 'status_request_kemahasiswaan',
// '
role
',
// '
jenis_keperluan_id
',
// 'proposal',
// 'deleted',
// 'deleted_at',
...
...
backend/modules/ubux/views/pemakaian-kendaraan/indexByPegawai.php
View file @
ef1e1b0b
...
...
@@ -3,6 +3,7 @@
use
yii\helpers\Html
;
use
yii\grid\GridView
;
use
yii\helpers\Url
;
use
yii\base\Model
;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */
...
...
@@ -26,14 +27,23 @@ $this->params['breadcrumbs'][] = $this->title;
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
// 'transaksi_kendaraan_id',
'nama_perequest_kendaraan'
,
'desc_penggunaan_kendaraan'
,
// 'pemakaian_kendaraan_id',
[
'attribute'
=>
'Nama'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
pegawai_id
==
null
){
return
'Kemahasiswaan'
;
}
else
{
return
$model
->
pegawai
->
nama
;
}
}
],
'desc'
,
'tujuan'
,
'jumlah_penumpang_kendaraan'
,
'rencana_waktu_keberangkatan'
,
'rencana_waktu_kembali'
,
// '
role
',
//
'rencana_waktu_kembali',
// '
jenis_keperluan_id
',
// 'proposal',
// 'deleted',
// 'deleted_at',
...
...
@@ -45,11 +55,17 @@ $this->params['breadcrumbs'][] = $this->title;
// 'kendaraan_id',
[
'attribute'
=>
'Kendaraan'
,
'value'
=>
'kendaraan.kendaraan'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
kendaraan_id
!=
null
){
return
$model
->
kendaraan
->
kendaraan
;
}
else
{
return
'-'
;
}
}
],
// 'status_req_sekretaris_rektorat',
[
'attribute'
=>
'Status Request
Sekretaris Rektorat
'
,
'attribute'
=>
'Status Request'
,
'value'
=>
'statusRequestSekretarisRektorat.status'
,
],
[
...
...
backend/modules/ubux/views/pemakaian-kendaraan/indexByPribadi.php
View file @
ef1e1b0b
...
...
@@ -30,15 +30,14 @@ $this->params['breadcrumbs'][] = $this->title;
'columns' => [
['class' => 'yii\grid\SerialColumn'],
// 'transaksi_kendaraan_id',
'nama_perequest_kendaraan',
'desc_penggunaan_kendaraan',
// 'pemakaian_kendaraan_id',
'desc',
'tujuan',
// 'jumlah_penumpang_kendaraan',
// 'rencana_waktu_keberangkatan',
// 'rencana_waktu_kembali',
// 'status_request_kemahasiswaan',
// '
role
',
// '
jenis_keperluan_id
',
// 'proposal',
// 'deleted',
// 'deleted_at',
...
...
backend/modules/ubux/views/pemakaian-kendaraan/indexBySekretarisRektorat.php
View file @
ef1e1b0b
...
...
@@ -3,6 +3,7 @@
use
yii\helpers\Html
;
use
yii\grid\GridView
;
use
yii\helpers\Url
;
use
yii\base\Model
;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\PemakaianKendaraanSearch */
...
...
@@ -25,19 +26,27 @@ $this->params['breadcrumbs'][] = $this->title;
'filterModel'
=>
$searchModel
,
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
// 'transaksi_kendaraan_id',
'nama_perequest_kendaraan'
,
'desc_penggunaan_kendaraan'
,
// 'pegawai_id',
[
'attribute'
=>
'Nama'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
pegawai_id
==
null
){
return
'Kemahasiswaan'
;
}
else
{
return
$model
->
pegawai
->
nama
;
}
}
],
'desc'
,
'tujuan'
,
'jumlah_penumpang_kendaraan'
,
'rencana_waktu_keberangkatan'
,
'rencana_waktu_kembali'
,
//
'rencana_waktu_kembali',
// 'status_request_kemahasiswaan',
//
'role
',
//
'jenis_keperluan_id
',
[
'attribute'
=>
'Jenis Permintaan'
,
'value'
=>
'jenisKeperluan.jenis_keperluan'
'value'
=>
'jenisKeperluan.jenis_keperluan'
,
],
// 'proposal',
// 'deleted',
...
...
@@ -47,13 +56,21 @@ $this->params['breadcrumbs'][] = $this->title;
// 'created_by',
// 'updated_at',
// 'updated_by',
// 'kendaraan_id',
[
'attribute'
=>
'Kendaraan'
,
'value'
=>
'kendaraan.kendaraan'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
kendaraan_id
!=
null
){
return
$model
->
kendaraan
->
kendaraan
;
}
else
{
return
'-'
;
}
}
],
// 'status_req_sekretaris_rektorat',
[
'attribute'
=>
'
status_req_sekretaris_rektorat
'
,
'value'
=>
'statusRequestSekretarisRektorat.status'
,
'attribute'
=>
'
Status
'
,
'value'
=>
'statusRequestSekretarisRektorat.status'
],
[
'class'
=>
'common\components\ToolsColumn'
,
...
...
backend/modules/ubux/views/pemakaian-kendaraan/indexByWr2.php
View file @
ef1e1b0b
...
...
@@ -23,15 +23,14 @@ $this->params['breadcrumbs'][] = $this->title;
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
// 'transaksi_kendaraan_id',
'nama_perequest_kendaraan'
,
'desc_penggunaan_kendaraan'
,
// 'pemakaian_kendaraan_id',
'desc'
,
'tujuan'
,
// 'jumlah_penumpang_kendaraan',
// 'rencana_waktu_keberangkatan',
// 'rencana_waktu_kembali',
// 'status_request_kemahasiswaan',
// '
role
',
// '
jenis_keperluan_id
',
// 'proposal',
// 'deleted',
// 'deleted_at',
...
...
backend/modules/ubux/views/pemakaian-kendaraan/viewByHrd.php
View file @
ef1e1b0b
...
...
@@ -2,6 +2,7 @@
use
yii\helpers\Html
;
use
yii\widgets\DetailView
;
use
yii\base\Model
;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */
...
...
@@ -14,22 +15,25 @@ $this->params['breadcrumbs'][] = $this->title;
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?php
echo
Html
::
a
(
'Setuju'
,
[
'accept-by-hrd'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
],
[
'class'
=>
'btn btn-success'
]);
echo
Html
::
a
(
'Tolak'
,
[
'reject-by-hrd'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
],
[
'class'
=>
'btn btn-danger'
]);
echo
Html
::
a
(
'Setuju'
,
[
'accept-by-hrd'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
],
[
'class'
=>
'btn btn-success'
]);
echo
Html
::
a
(
'Tolak'
,
[
'reject-by-hrd'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
],
[
'class'
=>
'btn btn-danger'
]);
?>
<?=
DetailView
::
widget
([
'model'
=>
$model
,
'attributes'
=>
[
// 'transaksi_kendaraan_id',
'nama_perequest_kendaraan'
,
'desc_penggunaan_kendaraan'
,
// 'pemakaian_kendaraan_id',
[
'attribute'
=>
'Nama'
,
'value'
=>
$model
->
pegawai
->
nama
,
],
'desc'
,
'tujuan'
,
'jumlah_penumpang_kendaraan'
,
'rencana_waktu_keberangkatan'
,
'rencana_waktu_kembali'
,
// 'status_request_kemahasiswaan',
// '
role
',
// '
jenis_keperluan_id
',
'no_telepon'
,
// 'proposal',
// 'deleted',
...
...
@@ -41,12 +45,24 @@ $this->params['breadcrumbs'][] = $this->title;
// 'updated_by',
// 'kendaraan_id',
[
'attribute'
=>
'Jenis Mobil'
,
'value'
=>
$model
->
kendaraan
->
kendaraan
,
'attribute'
=>
'Kendaraan'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
kendaraan_id
!=
null
)
{
return
$model
->
kendaraan
->
kendaraan
;
}
else
{
return
'-'
;
}
},
],
[
'attribute'
=>
'Supir'
,
'value'
=>
$model
->
supir
->
name_supir
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
supir_id
!=
null
){
return
$model
->
supir
->
pegawai
->
nama
;
}
else
{
return
'-'
;
}
},
],
'no_hp_supir'
,
// 'status_request_kabiro_KSD',
...
...
backend/modules/ubux/views/pemakaian-kendaraan/viewByKabiroKsd.php
View file @
ef1e1b0b
...
...
@@ -2,6 +2,7 @@
use
yii\helpers\Html
;
use
yii\widgets\DetailView
;
use
yii\base\Model
;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */
...
...
@@ -14,22 +15,25 @@ $this->params['breadcrumbs'][] = $this->title;
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?php
echo
Html
::
a
(
'Setuju'
,
[
'accept-by-kabiro-ksd'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
],
[
'class'
=>
'btn btn-success'
]);
echo
Html
::
a
(
'Tolak'
,
[
'reject-by-kabiro-ksd'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
],
[
'class'
=>
'btn btn-danger'
]);
echo
Html
::
a
(
'Setuju'
,
[
'accept-by-kabiro-ksd'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
],
[
'class'
=>
'btn btn-success'
]);
echo
Html
::
a
(
'Tolak'
,
[
'reject-by-kabiro-ksd'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
],
[
'class'
=>
'btn btn-danger'
]);
?>
<?=
DetailView
::
widget
([
'model'
=>
$model
,
'attributes'
=>
[
// 'transaksi_kendaraan_id',
'nama_perequest_kendaraan'
,
'desc_penggunaan_kendaraan'
,
// 'pemakaian_kendaraan_id',
[
'attribute'
=>
'Nama'
,
'value'
=>
$model
->
pegawai
->
nama
,
],
'desc'
,
'tujuan'
,
'jumlah_penumpang_kendaraan'
,
'rencana_waktu_keberangkatan'
,
'rencana_waktu_kembali'
,
// 'status_request_kemahasiswaan',
// '
role
',
// '
jenis_keperluan_id
',
'no_telepon'
,
// 'proposal',
// 'deleted',
...
...
@@ -41,12 +45,24 @@ $this->params['breadcrumbs'][] = $this->title;
// 'updated_by',
// 'kendaraan_id',
[
'attribute'
=>
'Jenis Mobil'
,
'value'
=>
$model
->
kendaraan
->
kendaraan
,
'attribute'
=>
'Kendaraan'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
kendaraan_id
!=
null
)
{
return
$model
->
kendaraan
->
kendaraan
;
}
else
{
return
'-'
;
}
},
],
[
'attribute'
=>
'Supir'
,
'value'
=>
$model
->
supir
->
name_supir
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
supir_id
!=
null
){
return
$model
->
supir
->
pegawai
->
nama
;
}
else
{
return
'-'
;
}
},
],
'no_hp_supir'
,
[
...
...
backend/modules/ubux/views/pemakaian-kendaraan/viewByKeuangan.php
View file @
ef1e1b0b
...
...
@@ -2,6 +2,7 @@
use
yii\helpers\Html
;
use
yii\widgets\DetailView
;
use
yii\base\Model
;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */
...
...
@@ -14,22 +15,25 @@ $this->params['breadcrumbs'][] = $this->title;
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?php
echo
Html
::
a
(
'Setuju'
,
[
'accept-by-keuangan'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
],
[
'class'
=>
'btn btn-success'
]);
echo
Html
::
a
(
'Tolak'
,
[
'reject-by-keuangan'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
],
[
'class'
=>
'btn btn-danger'
]);
echo
Html
::
a
(
'Setuju'
,
[
'accept-by-keuangan'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
],
[
'class'
=>
'btn btn-success'
]);
echo
Html
::
a
(
'Tolak'
,
[
'reject-by-keuangan'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
],
[
'class'
=>
'btn btn-danger'
]);
?>
<?=
DetailView
::
widget
([
'model'
=>
$model
,
'attributes'
=>
[
// 'transaksi_kendaraan_id',
'nama_perequest_kendaraan'
,
'desc_penggunaan_kendaraan'
,
// 'pemakaian_kendaraan_id',
[
'attribute'
=>
'Nama'
,
'value'
=>
$model
->
pegawai
->
nama
,
],
'desc'
,
'tujuan'
,
'jumlah_penumpang_kendaraan'
,
'rencana_waktu_keberangkatan'
,
'rencana_waktu_kembali'
,
// 'status_request_kemahasiswaan',
// '
role
',
// '
jenis_keperluan_id
',
'no_telepon'
,
// 'proposal',
// 'deleted',
...
...
@@ -41,12 +45,24 @@ $this->params['breadcrumbs'][] = $this->title;
// 'updated_by',
// 'kendaraan_id',
[
'attribute'
=>
'Jenis Mobil'
,
'value'
=>
$model
->
kendaraan
->
kendaraan
,
'attribute'
=>
'Kendaraan'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
kendaraan_id
!=
null
)
{
return
$model
->
kendaraan
->
kendaraan
;
}
else
{
return
'-'
;
}
},
],
[
'attribute'
=>
'Supir'
,
'value'
=>
$model
->
supir
->
name_supir
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
supir_id
!=
null
){
return
$model
->
supir
->
pegawai
->
nama
;
}
else
{
return
'-'
;
}
},
],
'no_hp_supir'
,
[
...
...
backend/modules/ubux/views/pemakaian-kendaraan/viewByPegawai.php
View file @
ef1e1b0b
...
...
@@ -2,6 +2,7 @@
use
yii\helpers\Html
;
use
yii\widgets\DetailView
;
use
yii\base\Model
;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */
...
...
@@ -16,8 +17,8 @@ $this->params['breadcrumbs'][] = $this->title;
<?php
if
(
$model
->
status_req_sekretaris_rektorat
==
1
)
{
echo
Html
::
a
(
'Ubah'
,
[
'edit-by-pegawai'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
],
[
'class'
=>
'btn btn-primary'
]);
echo
Html
::
a
(
'Hapus'
,
[
'del'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
],
[
echo
Html
::
a
(
'Ubah'
,
[
'edit-by-pegawai'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
],
[
'class'
=>
'btn btn-primary'
]);
echo
Html
::
a
(
'Hapus'
,
[
'del'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
],
[
'class'
=>
'btn btn-danger'
,
'data'
=>
[
'confirm'
=>
'Are you sure you want to delete this item?'
,
...
...
@@ -25,16 +26,19 @@ $this->params['breadcrumbs'][] = $this->title;
],
]);
}
else
if
(
$model
->
status_req_sekretaris_rektorat
==
2
){
echo
Html
::
a
(
'Cetak'
,
[
'pegawai-pdf'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
],
[
'class'
=>
'btn btn-warning'
]);
echo
Html
::
a
(
'Cetak'
,
[
'pegawai-pdf'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
],
[
'class'
=>
'btn btn-warning'
]);
}
?>
<?=
DetailView
::
widget
([
'model'
=>
$model
,
'attributes'
=>
[
// 'transaksi_kendaraan_id',
'nama_perequest_kendaraan'
,
'desc_penggunaan_kendaraan'
,
// 'pemakaian_kendaraan_id',
[
'attribute'
=>
'Nama'
,
'value'
=>
$model
->
pegawai
->
nama
,
],
'desc'
,
'tujuan'
,
'jumlah_penumpang_kendaraan'
,
'rencana_waktu_keberangkatan'
,
...
...
@@ -46,7 +50,7 @@ $this->params['breadcrumbs'][] = $this->title;
],
// 'status_request_kemahasiswaan',
'no_telepon'
,
// '
role
',
// '
jenis_keperluan_id
',
[
'attribute'
=>
'Jenis Permintaan'
,
'value'
=>
$model
->
jenisKeperluan
->
jenis_keperluan
,
...
...
@@ -60,12 +64,24 @@ $this->params['breadcrumbs'][] = $this->title;
// 'updated_at',
// 'updated_by',
[
'attribute'
=>
'Jenis Mobil'
,
'value'
=>
$model
->
kendaraan
->
kendaraan
,
'attribute'
=>
'Kendaraan'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
kendaraan_id
!=
null
)
{
return
$model
->
kendaraan
->
kendaraan
;
}
else
{
return
'-'
;
}
},
],
[
'attribute'
=>
'Supir'
,
'value'
=>
$model
->
supir
->
name_supir
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
supir_id
!=
null
){
return
$model
->
supir
->
pegawai
->
nama
;
}
else
{
return
'-'
;
}
},
],
'no_hp_supir'
,
],
...
...
backend/modules/ubux/views/pemakaian-kendaraan/viewByPegawaiPdf.php
View file @
ef1e1b0b
...
...
@@ -44,12 +44,12 @@ $this->params['breadcrumbs'][] = $this->title;
<tr>
<td
class=
"kolom"
>
Nama
</td>
<td
class=
"kolom"
>
:
</td>
<td
class=
"kolom"
>
<?=
$model
->
nama_perequest_kendaraan
?>
</td>
<td
class=
"kolom"
>
<?=
$model
->
pegawai
->
nama
?>
</td>
</tr>
<tr>
<td
class=
"kolom"
>
Deskripsi Penggunaan
</td>
<td
class=
"kolom"
>
:
</td>
<td
class=
"kolom"
>
<?=
$model
->
desc
_penggunaan_kendaraan
?>
</td>
<td
class=
"kolom"
>
<?=
$model
->
desc
?>
</td>
</tr>
<tr>
<td
class=
"kolom"
>
Tujuan
</td>
...
...
@@ -89,7 +89,7 @@ $this->params['breadcrumbs'][] = $this->title;
<tr>
<td
class=
"kolom"
>
Supir
</td>
<td
class=
"kolom"
>
:
</td>
<td
class=
"kolom"
>
<?=
$model
->
supir
->
name_supir
?>
</td>
<td
class=
"kolom"
>
<?=
$model
->
supir
->
pegawai
->
nama
?>
</td>
</tr>
<tr>
<td
class=
"kolom"
>
No Hp Supir
</td>
...
...
backend/modules/ubux/views/pemakaian-kendaraan/viewByPribadi.php
View file @
ef1e1b0b
...
...
@@ -2,6 +2,7 @@
use
yii\helpers\Html
;
use
yii\widgets\DetailView
;
use
yii\base\Model
;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */
...
...
@@ -16,8 +17,8 @@ $this->params['breadcrumbs'][] = $this->title;
<p>
<?php
if
(
$model
->
status_req_sekretaris_rektorat
==
1
&&
$model
->
status_request_kemahasiswaan
==
1
&&
$model
->
status_request_hrd
==
1
&&
$model
->
status_request_kabiro_KSD
==
1
&&
$model
->
status_request_keuangan
==
1
&&
$model
->
status_request_wr2
==
1
)
{
echo
Html
::
a
(
'Ubah'
,
[
'edit-by-pribadi'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
],
[
'class'
=>
'btn btn-primary'
]);
echo
Html
::
a
(
'Hapus'
,
[
'del'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
],
[
echo
Html
::
a
(
'Ubah'
,
[
'edit-by-pribadi'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
],
[
'class'
=>
'btn btn-primary'
]);
echo
Html
::
a
(
'Hapus'
,
[
'del'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
],
[
'class'
=>
'btn btn-danger'
,
'data'
=>
[
'confirm'
=>
'Are you sure you want to delete this item?'
,
...
...
@@ -25,7 +26,7 @@ $this->params['breadcrumbs'][] = $this->title;
],
]);
}
else
if
(
$model
->
status_req_sekretaris_rektorat
==
2
&&
$model
->
status_request_kemahasiswaan
==
2
&&
$model
->
status_request_hrd
==
2
&&
$model
->
status_request_kabiro_KSD
==
2
&&
$model
->
status_request_keuangan
==
2
&&
$model
->
status_request_wr2
==
2
)
{
echo
Html
::
a
(
'Cetak'
,
[
'pribadi-pdf'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
],
[
'class'
=>
'btn btn-warning'
]);
echo
Html
::
a
(
'Cetak'
,
[
'pribadi-pdf'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
],
[
'class'
=>
'btn btn-warning'
]);
}
?>
</p>
...
...
@@ -33,15 +34,18 @@ $this->params['breadcrumbs'][] = $this->title;
<?=
DetailView
::
widget
([
'model'
=>
$model
,
'attributes'
=>
[
// 'transaksi_kendaraan_id',
'nama_perequest_kendaraan'
,
'desc_penggunaan_kendaraan'
,
// 'pemakaian_kendaraan_id',
[
'attribute'
=>
'Nama'
,
'value'
=>
$model
->
pegawai
->
nama
,
],
'desc'
,
'tujuan'
,
'jumlah_penumpang_kendaraan'
,
'rencana_waktu_keberangkatan'
,
'rencana_waktu_kembali'
,
// 'status_request_kemahasiswaan',
// '
role
',
// '
jenis_keperluan_id
',
'no_telepon'
,
// 'proposal',
// 'deleted',
...
...
@@ -53,12 +57,24 @@ $this->params['breadcrumbs'][] = $this->title;
// 'updated_by',
// 'kendaraan_id',
[
'attribute'
=>
'Jenis Mobil'
,
'value'
=>
$model
->
kendaraan
->
kendaraan
,
'attribute'
=>
'Kendaraan'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
kendaraan_id
!=
null
)
{
return
$model
->
kendaraan
->
kendaraan
;
}
else
{
return
'-'
;
}
},
],
[
'attribute'
=>
'Supir'
,
'value'
=>
$model
->
supir
->
name_supir
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
supir_id
!=
null
){
return
$model
->
supir
->
pegawai
->
nama
;
}
else
{
return
'-'
;
}
},
],
'no_hp_supir'
,
[
...
...
backend/modules/ubux/views/pemakaian-kendaraan/viewByPribadiPdf.php
View file @
ef1e1b0b
...
...
@@ -43,12 +43,12 @@ $this->params['breadcrumbs'][] = $this->title;
<tr>
<td
class=
"kolom"
>
Nama
</td>
<td
class=
"kolom"
>
:
</td>
<td
class=
"kolom"
>
<?=
$model
->
nama_perequest_kendaraan
?>
</td>
<td
class=
"kolom"
>
<?=
$model
->
pegawai
->
nama
?>
</td>
</tr>
<tr>
<td
class=
"kolom"
>
Keperluan
</td>
<td
class=
"kolom"
>
:
</td>
<td
class=
"kolom"
>
<?=
$model
->
desc
_penggunaan_kendaraan
?>
</td>
<td
class=
"kolom"
>
<?=
$model
->
desc
?>
</td>
</tr>
<tr>
<td
class=
"kolom"
>
Tujuan
</td>
...
...
backend/modules/ubux/views/pemakaian-kendaraan/viewBySekretarisRektorat.php
View file @
ef1e1b0b
...
...
@@ -2,6 +2,7 @@
use
yii\helpers\Html
;
use
yii\widgets\DetailView
;
use
yii\base\Model
;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */
...
...
@@ -15,30 +16,33 @@ $this->params['breadcrumbs'][] = $this->title;
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?php
echo
Html
::
a
(
'Terima'
,
[
'accept-by-sekretaris-rektorat'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
],
[
'class'
=>
'btn btn-success'
]);
echo
Html
::
a
(
'Tolak'
,
[
'reject-by-sekretaris-rektorat'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
],
[
'class'
=>
'btn btn-danger'
]);
echo
Html
::
a
(
'Terima'
,
[
'accept-by-sekretaris-rektorat'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
],
[
'class'
=>
'btn btn-success'
]);
echo
Html
::
a
(
'Tolak'
,
[
'reject-by-sekretaris-rektorat'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
],
[
'class'
=>
'btn btn-danger'
]);
?>
<?=
DetailView
::
widget
([
'model'
=>
$model
,
'attributes'
=>
[
// 'transaksi_kendaraan_id',
'nama_perequest_kendaraan'
,
'desc_penggunaan_kendaraan'
,
// 'pemakaian_kendaraan_id',
'desc'
,
'tujuan'
,
'jumlah_penumpang_kendaraan'
,
'rencana_waktu_keberangkatan'
,
'rencana_waktu_kembali'
,
// 'status_req_sekretaris_rektorat',
// 'status_request_kemahasiswaan',
[
'attribute'
=>
'status_req_sekretaris_rektorat'
,
'value'
=>
$model
->
statusRequestSekretarisRektorat
->
status
,
],
// 'status_request_kemahasiswaan',
[
'attribute'
=>
'status_request_kemahasiswaan'
,
'value'
=>
$model
->
statusRequestKemahasiswaan
->
status
,
],
'no_telepon'
,
// '
role
',
// '
jenis_keperluan_id
',
[
'attribute'
=>
'role
'
,
'attribute'
=>
'Jenis Permintaan
'
,
'value'
=>
$model
->
jenisKeperluan
->
jenis_keperluan
,
],
// 'proposal',
...
...
@@ -50,14 +54,36 @@ $this->params['breadcrumbs'][] = $this->title;
// 'updated_at',
// 'updated_by',
[
'attribute'
=>
'Jenis Mobil'
,
'value'
=>
$model
->
kendaraan
->
kendaraan
,
'attribute'
=>
'Kendaraan'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
kendaraan_id
!=
null
)
{
return
$model
->
kendaraan
->
kendaraan
;
}
else
{
return
'-'
;
}
},
],
[
'attribute'
=>
'Supir'
,
'value'
=>
$model
->
supir
->
name_supir
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
supir_id
!=
null
){
return
$model
->
supir
->
pegawai
->
nama
;
}
else
{
return
'-'
;
}
},
],
// 'no_hp_supir',
[
'attribute'
=>
'no_hp_supir'
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
supir_id
!=
null
){
return
$model
->
supir
->
no_telepon_supir
;
}
else
{
return
'-'
;
}
},
],
'no_hp_supir'
,
],
])
?>
...
...
backend/modules/ubux/views/pemakaian-kendaraan/viewByWr2.php
View file @
ef1e1b0b
...
...
@@ -2,6 +2,7 @@
use
yii\helpers\Html
;
use
yii\widgets\DetailView
;
use
yii\base\Model
;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\PemakaianKendaraan */
...
...
@@ -14,22 +15,25 @@ $this->params['breadcrumbs'][] = $this->title;
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?php
echo
Html
::
a
(
'
Ubah'
,
[
'accept-by-wr2'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
],
[
'class'
=>
'btn btn-success'
]);
echo
Html
::
a
(
'Tolak'
,
[
'reject-by-wr2'
,
'id'
=>
$model
->
transaksi
_kendaraan_id
],
[
'class'
=>
'btn btn-danger'
]);
echo
Html
::
a
(
'
Setuju'
,
[
'accept-by-wr2'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
],
[
'class'
=>
'btn btn-success'
]);
echo
Html
::
a
(
'Tolak'
,
[
'reject-by-wr2'
,
'id'
=>
$model
->
pemakaian
_kendaraan_id
],
[
'class'
=>
'btn btn-danger'
]);
?>
<?=
DetailView
::
widget
([
'model'
=>
$model
,
'attributes'
=>
[
// 'transaksi_kendaraan_id',
'nama_perequest_kendaraan'
,
'desc_penggunaan_kendaraan'
,
// 'pemakaian_kendaraan_id',
[
'attribute'
=>
'Nama'
,
'value'
=>
$model
->
pegawai
->
nama
,
],
'desc'
,
'tujuan'
,
'jumlah_penumpang_kendaraan'
,
'rencana_waktu_keberangkatan'
,
'rencana_waktu_kembali'
,
// 'status_request_kemahasiswaan',
// '
role
',
// '
jenis_keperluan_id
',
'no_telepon'
,
// 'proposal',
// 'deleted',
...
...
@@ -42,11 +46,23 @@ $this->params['breadcrumbs'][] = $this->title;
// 'kendaraan_id',
[
'attribute'
=>
'Kendaraan'
,
'value'
=>
$model
->
kendaraan
->
kendaraan
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
kendaraan_id
!=
null
)
{
return
$model
->
kendaraan
->
kendaraan
;
}
else
{
return
'-'
;
}
},
],
[
'attribute'
=>
'Supir'
,
'value'
=>
$model
->
supir
->
name_supir
,
'value'
=>
function
(
Model
$model
){
if
(
$model
->
supir_id
!=
null
){
return
$model
->
supir
->
pegawai
->
nama
;
}
else
{
return
'-'
;
}
},
],
'no_hp_supir'
,
[
...
...
backend/modules/ubux/views/supir/_form.php
View file @
ef1e1b0b
...
...
@@ -2,16 +2,15 @@
use
yii\helpers\Html
;
use
yii\bootstrap\ActiveForm
;
use
yii\helpers\ArrayHelper
;
use
backend\modules\ubux\models\Pegawai
;
use
common\widgets\Redacto
r
;
use
yii\helpers\ArrayHelpe
r
;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Supir */
/* @var $form yii\widgets\ActiveForm */
?>
<div
class=
"
ubux-
supir-form"
>
<div
class=
"supir-form"
>
<?php
$form
=
ActiveForm
::
begin
([
'layout'
=>
'horizontal'
,
...
...
@@ -28,15 +27,12 @@ use common\widgets\Redactor;
<?=
$form
->
field
(
$model
,
'pegawai_id'
)
->
dropDownList
(
ArrayHelper
::
map
(
Pegawai
::
find
()
->
select
([
'pegawai_id'
,
'nama'
'pegawai_id'
,
'nama'
,
])
->
all
(),
'pegawai_id'
,
'nama'
),
[
'prompt'
=>
'Pilih Pegawai'
]
)
?>
<!--
<?=
$form
->
field
(
$model
,
'name_supir'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'no_telepon_supir'
)
->
textInput
()
?>
<?=
$form
->
field
(
$model
,
'no_telepon_supir'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'deleted'
)
->
textInput
()
?>
...
...
@@ -54,7 +50,7 @@ use common\widgets\Redactor;
-->
<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'
])
?>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
'Buat'
:
'
Edit
'
,
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
</div>
</div>
...
...
backend/modules/ubux/views/supir/_search.php
View file @
ef1e1b0b
...
...
@@ -8,7 +8,7 @@ use yii\widgets\ActiveForm;
/* @var $form yii\widgets\ActiveForm */
?>
<div
class=
"
ubux-
supir-search"
>
<div
class=
"supir-search"
>
<?php
$form
=
ActiveForm
::
begin
([
'action'
=>
[
'index'
],
...
...
@@ -17,7 +17,7 @@ use yii\widgets\ActiveForm;
<?=
$form
->
field
(
$model
,
'supir_id'
)
?>
<?=
$form
->
field
(
$model
,
'
name_supir
'
)
?>
<?=
$form
->
field
(
$model
,
'
pegawai_id
'
)
?>
<?=
$form
->
field
(
$model
,
'no_telepon_supir'
)
?>
...
...
@@ -35,8 +35,6 @@ use yii\widgets\ActiveForm;
<?
php
// echo $form->field($model, 'updated_by') ?>
<?
php
// echo $form->field($model, 'pegawai_id') ?>
<
div
class
="
form
-
group
">
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
...
...
backend/modules/ubux/views/supir/add.php
View file @
ef1e1b0b
...
...
@@ -7,10 +7,10 @@ use yii\helpers\Html;
/* @var $model backend\modules\ubux\models\Supir */
$this
->
title
=
'Tambah Supir'
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'
Tambah
Supir'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Supir'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
?>
<div
class=
"
ubux-
supir-create"
>
<div
class=
"supir-create"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
...
...
backend/modules/ubux/views/supir/edit.php
View file @
ef1e1b0b
...
...
@@ -5,12 +5,12 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Supir */
$this
->
title
=
'Ubah Supir : '
.
' '
.
$model
->
name_supir
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'
Ubah
Supir'
,
'url'
=>
[
'index'
]];
$this
->
title
=
'Ubah Supir : '
.
' '
.
$model
->
pegawai
->
nama
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Supir'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
supir_id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
supir_id
]];
$this
->
params
[
'breadcrumbs'
][]
=
'
Ubah
'
;
$this
->
params
[
'breadcrumbs'
][]
=
'
Edit
'
;
?>
<div
class=
"
ubux-
supir-update"
>
<div
class=
"supir-update"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
...
...
backend/modules/ubux/views/supir/index.php
View file @
ef1e1b0b
...
...
@@ -3,17 +3,15 @@
use
yii\helpers\Html
;
use
yii\grid\GridView
;
use
yii\helpers\Url
;
use
common\components\ToolsColumn
;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\SupirSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this
->
title
=
'
Data Semua
Supir'
;
$this
->
title
=
'Supir'
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
?>
<div
class=
"
ubux-
supir-index"
>
<div
class=
"supir-index"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?php
// echo $this->render('_search', ['model' => $searchModel]); ?>
...
...
@@ -29,7 +27,11 @@ $this->params['breadcrumbs'][] = $this->title;
[
'class'
=>
'yii\grid\SerialColumn'
],
// 'supir_id',
'name_supir'
,
// 'pegawai_id',
[
'attribute'
=>
'Nama'
,
'value'
=>
'pegawai.nama'
,
],
'no_telepon_supir'
,
// 'deleted',
// 'deleted_at',
...
...
@@ -39,36 +41,23 @@ $this->params['breadcrumbs'][] = $this->title;
// 'updated_at',
// 'updated_by',
[
'class'
=>
'common\components\ToolsColumn'
,
'template'
=>
'{view} {update} {delete}'
,
// {edit} {cancel}',
'header'
=>
'Aksi'
,
'buttons'
=>
[
'view'
=>
function
(
$url
,
$model
){
return
ToolsColumn
::
renderCustomButton
(
$url
,
$model
,
'Lihat Rincian'
,
'fa fa-eye'
);
},
'update'
=>
function
(
$url
,
$model
){
return
ToolsColumn
::
renderCustomButton
(
$url
,
$model
,
'Ubah'
,
'fa fa-pencil'
);
},
'delete'
=>
function
(
$url
,
$model
){
return
"<li>"
.
Html
::
a
(
'<span class="fa fa-trash"></span> Hapus'
,
$url
,
[
'title'
=>
Yii
::
t
(
'yii'
,
'Legitimate'
),
'data-confirm'
=>
Yii
::
t
(
'yii'
,
'Apakah anda yakin ingin menghapus ?'
),
'data-method'
=>
'post'
,
'data-pjax'
=>
'0'
,
])
.
"</li>"
;
},
],
'urlCreator'
=>
function
(
$action
,
$model
,
$key
,
$index
){
if
(
$action
===
'view'
)
{
[
'class'
=>
'common\components\ToolsColumn'
,
'template'
=>
'{view}{edit}{del}'
,
'urlCreator'
=>
function
(
$action
,
$model
,
$key
,
$index
){
if
(
$action
===
'view'
){
return
Url
::
toRoute
([
'view'
,
'id'
=>
$key
]);
}
else
if
(
$action
===
'edit'
)
{
return
Url
::
toRoute
([
'update'
,
'id'
=>
$key
]);
}
else
if
(
$action
===
'del'
)
{
return
Url
::
toRoute
([
'delete'
,
'id'
=>
$key
]);
}
if
(
$action
==
'edit'
){
return
Url
::
toRoute
([
'edit'
,
'id'
=>
$key
]);
}
if
(
$action
==
'del'
){
return
Url
::
toRoute
([
'del'
,
'id'
=>
$key
]);
}
else
{
return
Url
::
toRoute
([
'pop-up'
,
'id'
=>
$key
]);
}
}
],
],
]);
?>
...
...
backend/modules/ubux/views/supir/view.php
View file @
ef1e1b0b
...
...
@@ -6,11 +6,11 @@ use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Supir */
$this
->
title
=
'Data Supir'
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'
Data
Supir'
,
'url'
=>
[
'index'
]];
$this
->
title
=
$model
->
pegawai
->
nama
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Supir'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
?>
<div
class=
"
ubux-
supir-view"
>
<div
class=
"supir-view"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
...
...
@@ -19,7 +19,7 @@ $this->params['breadcrumbs'][] = $this->title;
<?=
Html
::
a
(
'Hapus'
,
[
'del'
,
'id'
=>
$model
->
supir_id
],
[
'class'
=>
'btn btn-danger'
,
'data'
=>
[
'confirm'
=>
'A
pakah anda yakin
?'
,
'confirm'
=>
'A
re you sure you want to delete this item
?'
,
'method'
=>
'post'
,
],
])
?>
...
...
@@ -29,7 +29,11 @@ $this->params['breadcrumbs'][] = $this->title;
'model'
=>
$model
,
'attributes'
=>
[
// 'supir_id',
'name_supir'
,
// 'pegawai_id',
[
'attribute'
=>
'Nama'
,
'value'
=>
$model
->
pegawai
->
nama
,
],
'no_telepon_supir'
,
// 'deleted',
// 'deleted_at',
...
...
backend/themes/v2/layouts/main.php
View file @
ef1e1b0b
...
...
@@ -163,7 +163,7 @@ $this->beginPage();
[
'label'
=>
'Lihat Permintaan Mahasiswa'
,
'icon'
=>
'fa fa-star'
,
'url'
=>
'/ubux/pemakaian-kendaraan-m
ahasiswa
/index-by-kemahasiswaan'
,
'url'
=>
'/ubux/pemakaian-kendaraan-m
hs
/index-by-kemahasiswaan'
,
],
]
],
...
...
@@ -179,7 +179,7 @@ $this->beginPage();
[
'label'
=>
'Permintaan Kendaraan Pegawai'
,
'icon'
=>
'fa fa-star'
,
'url'
=>
'/ubux/pemakaian-kendaraan/
create
-by-pegawai'
,
'url'
=>
'/ubux/pemakaian-kendaraan/
add
-by-pegawai'
,
],
]
],
...
...
@@ -190,12 +190,12 @@ $this->beginPage();
[
'label'
=>
'Data Permintaan Kendaraan'
,
'icon'
=>
'fa fa-star'
,
'url'
=>
'/ubux/pemakaian-kendaraan-m
ahasiswa
/index'
,
'url'
=>
'/ubux/pemakaian-kendaraan-m
hs
/index'
,
],
[
'label'
=>
'Permintaan Kendaraan'
,
'icon'
=>
'fa fa-star'
,
'url'
=>
'/ubux/pemakaian-kendaraan-m
ahasiswa/create
'
,
'url'
=>
'/ubux/pemakaian-kendaraan-m
hs/add
'
,
],
]
],
...
...
@@ -211,7 +211,7 @@ $this->beginPage();
[
'label'
=>
'Permintaan Kendaraan Pribadi'
,
'icon'
=>
'fa fa-star'
,
'url'
=>
'/ubux/pemakaian-kendaraan/
create
-by-pribadi'
,
'url'
=>
'/ubux/pemakaian-kendaraan/
add
-by-pribadi'
,
],
]
],
...
...
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