Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
Satpam
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
Andre Sihombing
Satpam
Commits
3af54720
Commit
3af54720
authored
May 25, 2018
by
Andre Sihombing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Memperbaiki semua fungsi
parent
9fbaa1d3
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
267 additions
and
685 deletions
+267
-685
JamKerjaController.php
backend/modules/ubux/controllers/JamKerjaController.php
+9
-59
LaporanController.php
backend/modules/ubux/controllers/LaporanController.php
+5
-5
LemburController.php
backend/modules/ubux/controllers/LemburController.php
+6
-10
SatpamController.php
backend/modules/ubux/controllers/SatpamController.php
+87
-39
Pegawai.php
backend/modules/ubux/models/Pegawai.php
+0
-402
add.php
backend/modules/ubux/views/jam-kerja/add.php
+1
-1
edit.php
backend/modules/ubux/views/jam-kerja/edit.php
+1
-1
index.php
backend/modules/ubux/views/jam-kerja/index.php
+1
-24
_form.php
backend/modules/ubux/views/laporan/_form.php
+16
-5
_search.php
backend/modules/ubux/views/laporan/_search.php
+32
-23
add.php
backend/modules/ubux/views/laporan/add.php
+1
-1
edit.php
backend/modules/ubux/views/laporan/edit.php
+3
-3
index.php
backend/modules/ubux/views/laporan/index.php
+7
-5
view-detail.php
backend/modules/ubux/views/laporan/view-detail.php
+5
-7
view-pdf.php
backend/modules/ubux/views/laporan/view-pdf.php
+16
-16
view.php
backend/modules/ubux/views/laporan/view.php
+25
-21
_form.php
backend/modules/ubux/views/lembur/_form.php
+1
-5
add.php
backend/modules/ubux/views/lembur/add.php
+0
-0
edit.php
backend/modules/ubux/views/lembur/edit.php
+1
-1
index.php
backend/modules/ubux/views/lembur/index.php
+0
-5
_form-add-gaji.php
backend/modules/ubux/views/satpam/_form-add-gaji.php
+6
-6
_form-add-lembur.php
backend/modules/ubux/views/satpam/_form-add-lembur.php
+6
-3
_search.php
backend/modules/ubux/views/satpam/_search.php
+29
-27
add.php
backend/modules/ubux/views/satpam/add.php
+0
-0
edit.php
backend/modules/ubux/views/satpam/edit.php
+1
-1
index.php
backend/modules/ubux/views/satpam/index.php
+6
-5
view.php
backend/modules/ubux/views/satpam/view.php
+0
-8
main.php
backend/themes/v2/layouts/main.php
+2
-2
No files found.
backend/modules/ubux/controllers/JamKerjaController.php
View file @
3af54720
...
...
@@ -59,14 +59,14 @@ class JamKerjaController extends Controller
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public
function
action
Create
()
public
function
action
Add
()
{
$model
=
new
JamKerja
();
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
jam_kerja_id
]);
}
else
{
return
$this
->
render
(
'
create
'
,
[
return
$this
->
render
(
'
add
'
,
[
'model'
=>
$model
,
]);
}
...
...
@@ -78,14 +78,14 @@ class JamKerjaController extends Controller
* @param integer $id
* @return mixed
*/
public
function
action
Update
(
$id
)
public
function
action
Edit
(
$id
)
{
$model
=
$this
->
findModel
(
$id
);
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
jam_kerja_id
]);
}
else
{
return
$this
->
render
(
'
update
'
,
[
return
$this
->
render
(
'
edit
'
,
[
'model'
=>
$model
,
]);
}
...
...
@@ -97,7 +97,7 @@ class JamKerjaController extends Controller
* @param integer $id
* @return mixed
*/
public
function
actionDel
ete
(
$id
)
public
function
actionDel
(
$id
)
{
$this
->
findModel
(
$id
)
->
delete
();
...
...
@@ -165,9 +165,7 @@ class JamKerjaController extends Controller
}
else
$model2
->
status
=
'Tetap'
;
$idSatpam
;
//if(!($sheetData[$baseRow]['F'] == $sheetData[$baseRow-1]['F'])){
//if($)
$idSatpam
;
if
(
!
Satpam
::
find
()
->
where
([
'nip'
=>
$model
->
nip
])
->
andWhere
([
'laporan_id'
=>
$id
])
->
exists
()){
$model2
->
laporan_id
=
$id
;
$model2
->
save
();
...
...
@@ -176,8 +174,7 @@ class JamKerjaController extends Controller
else
{
$satpam
=
Satpam
::
find
()
->
where
([
'nip'
=>
$model
->
nip
])
->
andWhere
([
'laporan_id'
=>
$id
])
->
one
();
$idSatpam
=
$satpam
->
satpam_id
;
}
//}
}
$model
->
satpam_id
=
$idSatpam
;
$model
->
save
();
...
...
@@ -185,7 +182,7 @@ class JamKerjaController extends Controller
$baseRow
++
;
}
Yii
::
$app
->
getSession
()
->
setFlash
(
'success'
,
'Success'
);
return
$this
->
redirect
([
'/ubux/laporan/
index'
]);
return
$this
->
redirect
([
'/ubux/laporan/
view'
,
'id'
=>
$id
]);
}
else
{
Yii
::
$app
->
getSession
()
->
setFlash
(
'error'
,
'Error'
);
return
$this
->
redirect
([
'import'
]);
...
...
@@ -196,52 +193,5 @@ class JamKerjaController extends Controller
'modelImport'
=>
$modelImport
,
]);
}
// public function actionImport($id){
// $searchModel = new JamKerjaSearch();
// $modelImport = new \yii\base\DynamicModel([
// 'fileImport'=>'File Import',
// ]);
// $modelImport->addRule(['fileImport'],'required');
// $modelImport->addRule(['fileImport'],'file',['extensions'=>'ods,xls,xlsx'],['maxSize'=>1024*1024]);
// if(Yii::$app->request->post()){
// $modelImport->fileImport = \yii\web\UploadedFile::getInstance($modelImport,'fileImport');
// if($modelImport->fileImport && $modelImport->validate()){
// $inputFileType = \PHPExcel_IOFactory::identify($modelImport->fileImport->tempName);
// $objReader = \PHPExcel_IOFactory::createReader($inputFileType);
// $objPHPExcel = $objReader->load($modelImport->fileImport->tempName);
// $sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);
// $baseRow = 3;
// while(!empty($sheetData[$baseRow]['A'])){
// $model = new \backend\modules\ubux\models\JamKerja;
// $model->tanggal_scan = (string)$sheetData[$baseRow]['A'];
// $model->tanggal = (string)$sheetData[$baseRow]['B'];
// $model->jam = (string)$sheetData[$baseRow]['C'];
// $model->pin = (string)$sheetData[$baseRow]['D'];
// $model->nip = (string)$sheetData[$baseRow]['E'];
// $model->nama = (string)$sheetData[$baseRow]['F'];
// $model->jabatan = (string)$sheetData[$baseRow]['G'];
// $model->departemen = (string)$sheetData[$baseRow]['H'];
// $model->kantor = (string)$sheetData[$baseRow]['I'];
// $model->verifikasi = (string)$sheetData[$baseRow]['J'];
// $model->i_o = (string)$sheetData[$baseRow]['K'];
// $model->workcode = (string)$sheetData[$baseRow]['L'];
// $model->mesin = (string)$sheetData[$baseRow]['M'];
// $model->laporan_id = $id;
// $model->save();
// $baseRow++;
// }
// Yii::$app->getSession()->setFlash('success','Success');
// return $this->redirect(['/ubux/laporan/view', 'id' => $id]);
// }else{
// Yii::$app->getSession()->setFlash('error','Error');
// return $this->redirect(['import']);
// }
// }
// return $this->render('import',[
// 'modelImport' => $modelImport,
// ]);
// }
}
backend/modules/ubux/controllers/LaporanController.php
View file @
3af54720
...
...
@@ -74,14 +74,14 @@ class LaporanController extends Controller
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public
function
action
Create
()
public
function
action
Add
()
{
$model
=
new
Laporan
();
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
laporan_id
]);
}
else
{
return
$this
->
render
(
'
create
'
,
[
return
$this
->
render
(
'
add
'
,
[
'model'
=>
$model
,
]);
}
...
...
@@ -93,14 +93,14 @@ class LaporanController extends Controller
* @param integer $id
* @return mixed
*/
public
function
action
Update
(
$id
)
public
function
action
Edit
(
$id
)
{
$model
=
$this
->
findModel
(
$id
);
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
laporan_id
]);
}
else
{
return
$this
->
render
(
'
update
'
,
[
return
$this
->
render
(
'
edit
'
,
[
'model'
=>
$model
,
]);
}
...
...
@@ -112,7 +112,7 @@ class LaporanController extends Controller
* @param integer $id
* @return mixed
*/
public
function
actionDel
ete
(
$id
)
public
function
actionDel
(
$id
)
{
$this
->
findModel
(
$id
)
->
softdelete
();
...
...
backend/modules/ubux/controllers/LemburController.php
View file @
3af54720
...
...
@@ -60,15 +60,11 @@ class LemburController extends Controller
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public
function
action
Create
(
$id
)
public
function
action
Add
(
$id
)
{
$model
=
new
Lembur
();
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
()))
{
// $models = explode(",", $model->tanggal);
// print_r($models);die();
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
()))
{
$model
->
laporan_id
=
$id
;
if
(
$model
->
validate
()){
$model
->
save
();
...
...
@@ -76,7 +72,7 @@ class LemburController extends Controller
}
}
else
{
return
$this
->
render
(
'
create
'
,
[
return
$this
->
render
(
'
add
'
,
[
'model'
=>
$model
,
]);
}
...
...
@@ -88,14 +84,14 @@ class LemburController extends Controller
* @param integer $id
* @return mixed
*/
public
function
action
Update
(
$id
)
public
function
action
Edit
(
$id
)
{
$model
=
$this
->
findModel
(
$id
);
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
return
$this
->
redirect
([
'view'
,
'id'
=>
$model
->
tanggal_lembur_id
]);
}
else
{
return
$this
->
render
(
'
update
'
,
[
return
$this
->
render
(
'
edit
'
,
[
'model'
=>
$model
,
]);
}
...
...
@@ -107,7 +103,7 @@ class LemburController extends Controller
* @param integer $id
* @return mixed
*/
public
function
actionDel
ete
(
$id
)
public
function
actionDel
(
$id
)
{
$this
->
findModel
(
$id
)
->
softdelete
();
...
...
backend/modules/ubux/controllers/SatpamController.php
View file @
3af54720
...
...
@@ -74,7 +74,7 @@ class SatpamController extends Controller
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public
function
action
Create
()
public
function
action
Add
()
{
$model
=
new
Satpam
();
...
...
@@ -93,7 +93,7 @@ class SatpamController extends Controller
* @param integer $id
* @return mixed
*/
public
function
action
Update
(
$id
)
public
function
action
Edit
(
$id
)
{
$model
=
$this
->
findModel
(
$id
);
...
...
@@ -112,7 +112,7 @@ class SatpamController extends Controller
* @param integer $id
* @return mixed
*/
public
function
actionDel
ete
(
$id
)
public
function
actionDel
(
$id
)
{
$this
->
findModel
(
$id
)
->
softdelete
();
...
...
@@ -187,36 +187,59 @@ class SatpamController extends Controller
}
}
public
function
actionEditGaji
(
$id
,
$satpam_id
)
{
$model
=
$this
->
findModel
(
$satpam_id
);
if
(
$model
->
status
==
'Tetap'
){
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
save
())
{
\Yii
::
$app
->
messenger
->
addSuccessFlash
(
"Gaji "
.
$model
[
'nama'
]
.
" pada bulan ini berhasil diupdate"
);
return
$this
->
redirect
([
'laporan/view'
,
'id'
=>
$model
->
laporan_id
]);
}
else
{
return
$this
->
render
(
'add-gaji'
,
[
'model'
=>
$model
,
]);
}
}
else
{
$modelCek
=
JamKerja
::
find
()
->
where
([
'laporan_id'
=>
$id
])
->
andWhere
([
'satpam_id'
=>
$satpam_id
])
->
one
();
$models
=
JamKerja
::
find
()
->
where
([
'laporan_id'
=>
$id
])
->
andWhere
([
'satpam_id'
=>
$satpam_id
])
->
All
();
$cek
=
$modelCek
->
tanggal
;
$jlh
=
1
;
foreach
(
$models
as
$data
)
{
if
(
$cek
!=
$data
->
tanggal
){
$jlh
++
;
$cek
=
$data
->
tanggal
;
}
}
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())){
$model
->
total_gaji
*=
$jlh
;
if
(
$model
->
save
(
false
)){
\Yii
::
$app
->
messenger
->
addSuccessFlash
(
"Gaji "
.
$model
[
'nama'
]
.
" pada bulan ini berhasil diupdate"
);
return
$this
->
redirect
([
'laporan/view'
,
'id'
=>
$model
->
laporan_id
]);
}
}
else
{
return
$this
->
render
(
'add-gaji'
,
[
'model'
=>
$model
,
'jumlah'
=>
$jlh
,
]);
}
}
}
public
function
actionAddLembur
(
$id
,
$satpam_id
){
$model
=
$this
->
findModel
(
$satpam_id
);
$modelCek
=
JamKerja
::
find
()
->
where
([
'laporan_id'
=>
$id
])
->
andWhere
([
'satpam_id'
=>
$satpam_id
])
->
one
();
$models
=
JamKerja
::
find
()
->
where
([
'laporan_id'
=>
$id
])
->
andWhere
([
'satpam_id'
=>
$satpam_id
])
->
All
();
// $models2 = Lembur::find()->where(['laporan_id'=>$id])->All();
$cek
=
$modelCek
->
tanggal
;
$jlh
=
0
;
$lembur
=
Lembur
::
find
()
->
where
([
'laporan_id'
=>
$id
])
->
one
();
$mod
=
explode
(
","
,
$lembur
->
tanggal
);
// print_r($mod);die();
// foreach ($models as $data ) {
// if($cek != $data->tanggal){
// $cek = $data->tanggal;h
// echo $data->tanggal.'1<br>';
// foreach ($models2 as $data2) {
// echo $data2->tanggal.'2<br>';
// if ($data->tanggal == $data2->tanggal) {
// $jlh++;
// }
// }
// }
// }echo $jlh;die();
$data
=
array
();
foreach
(
$models
as
$obj
)
{
...
...
@@ -229,21 +252,7 @@ class SatpamController extends Controller
$jlh
++
;
}
}
}
// echo $jlh;die();
// echo "<br>";
// foreach ($models2 as $key) {
// echo $key->tanggal."<br>";
// }
// die();
}
if
(
$model
->
gaji_lembur
==
NULL
){
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())){
$model
->
gaji_lembur
*=
$jlh
;
...
...
@@ -260,10 +269,49 @@ class SatpamController extends Controller
]);
}
}
else
{
\Yii
::
$app
->
messenger
->
addWarningFlash
(
"Gaji lembur"
.
$model
->
nama
.
" pada bulan ini sudah ada"
);
\Yii
::
$app
->
messenger
->
addWarningFlash
(
"Gaji lembur
"
.
$model
->
nama
.
" pada bulan ini sudah ada"
);
return
$this
->
redirect
([
'laporan/view'
,
'id'
=>
$model
->
laporan_id
]);
}
}
public
function
actionEditLembur
(
$id
,
$satpam_id
){
$model
=
$this
->
findModel
(
$satpam_id
);
$modelCek
=
JamKerja
::
find
()
->
where
([
'laporan_id'
=>
$id
])
->
andWhere
([
'satpam_id'
=>
$satpam_id
])
->
one
();
$models
=
JamKerja
::
find
()
->
where
([
'laporan_id'
=>
$id
])
->
andWhere
([
'satpam_id'
=>
$satpam_id
])
->
All
();
$cek
=
$modelCek
->
tanggal
;
$jlh
=
0
;
$lembur
=
Lembur
::
find
()
->
where
([
'laporan_id'
=>
$id
])
->
one
();
$mod
=
explode
(
","
,
$lembur
->
tanggal
);
$data
=
array
();
foreach
(
$models
as
$obj
)
{
$data
[
$obj
->
tanggal
]
=
$obj
;
}
foreach
(
$data
as
$val
){
foreach
(
$mod
as
$val2
)
{
if
(
$val
->
tanggal
==
$val2
){
$jlh
++
;
}
}
}
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())){
$model
->
gaji_lembur
*=
$jlh
;
if
(
$model
->
save
(
false
)){
\Yii
::
$app
->
messenger
->
addSuccessFlash
(
"Gaji lembur "
.
$model
[
'nama'
]
.
" pada bulan ini berhasil diupdate"
);
return
$this
->
redirect
([
'laporan/view'
,
'id'
=>
$model
->
laporan_id
]);
}
}
else
{
return
$this
->
render
(
'add-lembur'
,
[
'model'
=>
$model
,
]);
}
}
}
backend/modules/ubux/models/Pegawai.php
deleted
100644 → 0
View file @
9fbaa1d3
<?php
namespace
backend\modules\ubux\models
;
use
Yii
;
use
common\behaviors\TimestampBehavior
;
use
common\behaviors\BlameableBehavior
;
use
common\behaviors\DeleteBehavior
;
/**
* This is the model class for table "hrdx_pegawai".
*
* @property integer $pegawai_id
* @property string $profile_old_id
* @property string $nama
* @property string $user_name
* @property string $nip
* @property string $kpt_no
* @property string $kbk_id
* @property integer $ref_kbk_id
* @property string $alias
* @property string $posisi
* @property string $tempat_lahir
* @property string $tgl_lahir
* @property integer $agama_id
* @property integer $jenis_kelamin_id
* @property integer $golongan_darah_id
* @property string $hp
* @property string $telepon
* @property resource $alamat
* @property string $alamat_libur
* @property string $kecamatan
* @property string $kota
* @property integer $kabupaten_id
* @property string $kode_pos
* @property string $no_ktp
* @property string $email
* @property string $ext_num
* @property string $study_area_1
* @property string $study_area_2
* @property string $jabatan
* @property integer $jabatan_akademik_id
* @property integer $gbk_1
* @property integer $gbk_2
* @property integer $status_ikatan_kerja_pegawai_id
* @property string $status_akhir
* @property integer $status_aktif_pegawai_id
* @property string $tanggal_masuk
* @property string $tanggal_keluar
* @property string $nama_bapak
* @property string $nama_ibu
* @property string $status
* @property integer $status_marital_id
* @property string $nama_p
* @property string $tgl_lahir_p
* @property string $tmp_lahir_p
* @property string $pekerjaan_ortu
* @property integer $user_id
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_by
* @property string $created_by
* @property string $created_at
* @property string $updated_by
* @property string $updated_at
*
* @property AdakPenugasanPengajaran[] $adakPenugasanPengajarans
* @property AdakRegistrasi[] $adakRegistrasis
* @property HrdxDosen[] $hrdxDosens
* @property MrefRJenisKelamin $jenisKelamin
* @property MrefRAgama $agama
* @property MrefRGolonganDarah $golonganDarah
* @property MrefRJabatanAkademik $jabatanAkademik
* @property MrefRKabupaten $kabupaten
* @property InstProdi $refKbk
* @property MrefRStatusAktifPegawai $statusAktifPegawai
* @property MrefRStatusIkatanKerjaPegawai $statusIkatanKerjaPegawai
* @property MrefRStatusMarital $statusMarital
* @property SysxUser $user
* @property HrdxPengajar[] $hrdxPengajars
* @property HrdxRiwayatPendidikan[] $hrdxRiwayatPendidikans
* @property HrdxStaf[] $hrdxStafs
* @property InstPejabat[] $instPejabats
* @property InvtPicBarang[] $invtPicBarangs
* @property LppmTLogreview[] $lppmTLogreviews
* @property LppmTPublikasi[] $lppmTPublikasis
* @property PrklCourseUnit[] $prklCourseUnits
* @property PrklKrsMhs[] $prklKrsMhs
* @property UbuxSatpam[] $ubuxSatpams
*/
class
Pegawai
extends
\yii\db\ActiveRecord
{
/**
* behaviour to add created_at and updatet_at field with current datetime (timestamp)
* and created_by and updated_by field with current user id (blameable)
*/
public
function
behaviors
(){
return
[
'timestamp'
=>
[
'class'
=>
TimestampBehavior
::
className
(),
],
'blameable'
=>
[
'class'
=>
BlameableBehavior
::
className
(),
],
'delete'
=>
[
'class'
=>
DeleteBehavior
::
className
(),
]
];
}
/**
* @inheritdoc
*/
public
static
function
tableName
()
{
return
'hrdx_pegawai'
;
}
/**
* @inheritdoc
*/
public
function
rules
()
{
return
[
[[
'ref_kbk_id'
,
'agama_id'
,
'jenis_kelamin_id'
,
'golongan_darah_id'
,
'kabupaten_id'
,
'jabatan_akademik_id'
,
'gbk_1'
,
'gbk_2'
,
'status_ikatan_kerja_pegawai_id'
,
'status_aktif_pegawai_id'
,
'status_marital_id'
,
'user_id'
,
'deleted'
],
'integer'
],
[[
'tgl_lahir'
,
'tanggal_masuk'
,
'tanggal_keluar'
,
'tgl_lahir_p'
,
'deleted_at'
,
'created_at'
,
'updated_at'
],
'safe'
],
[[
'alamat'
,
'email'
],
'string'
],
[[
'profile_old_id'
,
'kbk_id'
,
'hp'
],
'string'
,
'max'
=>
20
],
[[
'nama'
],
'string'
,
'max'
=>
135
],
[[
'user_name'
,
'posisi'
,
'alamat_libur'
,
'pekerjaan_ortu'
],
'string'
,
'max'
=>
100
],
[[
'nip'
,
'telepon'
],
'string'
,
'max'
=>
45
],
[[
'kpt_no'
],
'string'
,
'max'
=>
10
],
[[
'alias'
],
'string'
,
'max'
=>
9
],
[[
'tempat_lahir'
],
'string'
,
'max'
=>
60
],
[[
'kecamatan'
],
'string'
,
'max'
=>
150
],
[[
'kota'
,
'study_area_1'
,
'study_area_2'
,
'nama_bapak'
,
'nama_ibu'
,
'nama_p'
,
'tmp_lahir_p'
],
'string'
,
'max'
=>
50
],
[[
'kode_pos'
],
'string'
,
'max'
=>
15
],
[[
'no_ktp'
],
'string'
,
'max'
=>
255
],
[[
'ext_num'
],
'string'
,
'max'
=>
3
],
[[
'jabatan'
,
'status_akhir'
,
'status'
],
'string'
,
'max'
=>
1
],
[[
'deleted_by'
,
'created_by'
,
'updated_by'
],
'string'
,
'max'
=>
32
],
[[
'jenis_kelamin_id'
],
'exist'
,
'skipOnError'
=>
true
,
'targetClass'
=>
MrefRJenisKelamin
::
className
(),
'targetAttribute'
=>
[
'jenis_kelamin_id'
=>
'jenis_kelamin_id'
]],
[[
'agama_id'
],
'exist'
,
'skipOnError'
=>
true
,
'targetClass'
=>
MrefRAgama
::
className
(),
'targetAttribute'
=>
[
'agama_id'
=>
'agama_id'
]],
[[
'golongan_darah_id'
],
'exist'
,
'skipOnError'
=>
true
,
'targetClass'
=>
MrefRGolonganDarah
::
className
(),
'targetAttribute'
=>
[
'golongan_darah_id'
=>
'golongan_darah_id'
]],
[[
'jabatan_akademik_id'
],
'exist'
,
'skipOnError'
=>
true
,
'targetClass'
=>
MrefRJabatanAkademik
::
className
(),
'targetAttribute'
=>
[
'jabatan_akademik_id'
=>
'jabatan_akademik_id'
]],
[[
'kabupaten_id'
],
'exist'
,
'skipOnError'
=>
true
,
'targetClass'
=>
MrefRKabupaten
::
className
(),
'targetAttribute'
=>
[
'kabupaten_id'
=>
'kabupaten_id'
]],
[[
'ref_kbk_id'
],
'exist'
,
'skipOnError'
=>
true
,
'targetClass'
=>
InstProdi
::
className
(),
'targetAttribute'
=>
[
'ref_kbk_id'
=>
'ref_kbk_id'
]],
[[
'status_aktif_pegawai_id'
],
'exist'
,
'skipOnError'
=>
true
,
'targetClass'
=>
MrefRStatusAktifPegawai
::
className
(),
'targetAttribute'
=>
[
'status_aktif_pegawai_id'
=>
'status_aktif_pegawai_id'
]],
[[
'status_ikatan_kerja_pegawai_id'
],
'exist'
,
'skipOnError'
=>
true
,
'targetClass'
=>
MrefRStatusIkatanKerjaPegawai
::
className
(),
'targetAttribute'
=>
[
'status_ikatan_kerja_pegawai_id'
=>
'status_ikatan_kerja_pegawai_id'
]],
[[
'status_marital_id'
],
'exist'
,
'skipOnError'
=>
true
,
'targetClass'
=>
MrefRStatusMarital
::
className
(),
'targetAttribute'
=>
[
'status_marital_id'
=>
'status_marital_id'
]],
[[
'user_id'
],
'exist'
,
'skipOnError'
=>
true
,
'targetClass'
=>
SysxUser
::
className
(),
'targetAttribute'
=>
[
'user_id'
=>
'user_id'
]]
];
}
/**
* @inheritdoc
*/
public
function
attributeLabels
()
{
return
[
'pegawai_id'
=>
'Pegawai ID'
,
'profile_old_id'
=>
'Profile Old ID'
,
'nama'
=>
'Nama'
,
'user_name'
=>
'User Name'
,
'nip'
=>
'Nip'
,
'kpt_no'
=>
'Kpt No'
,
'kbk_id'
=>
'Kbk ID'
,
'ref_kbk_id'
=>
'Ref Kbk ID'
,
'alias'
=>
'Alias'
,
'posisi'
=>
'Posisi'
,
'tempat_lahir'
=>
'Tempat Lahir'
,
'tgl_lahir'
=>
'Tgl Lahir'
,
'agama_id'
=>
'Agama ID'
,
'jenis_kelamin_id'
=>
'Jenis Kelamin ID'
,
'golongan_darah_id'
=>
'Golongan Darah ID'
,
'hp'
=>
'Hp'
,
'telepon'
=>
'Telepon'
,
'alamat'
=>
'Alamat'
,
'alamat_libur'
=>
'Alamat Libur'
,
'kecamatan'
=>
'Kecamatan'
,
'kota'
=>
'Kota'
,
'kabupaten_id'
=>
'Kabupaten ID'
,
'kode_pos'
=>
'Kode Pos'
,
'no_ktp'
=>
'No Ktp'
,
'email'
=>
'Email'
,
'ext_num'
=>
'Ext Num'
,
'study_area_1'
=>
'Study Area 1'
,
'study_area_2'
=>
'Study Area 2'
,
'jabatan'
=>
'Jabatan'
,
'jabatan_akademik_id'
=>
'Jabatan Akademik ID'
,
'gbk_1'
=>
'Gbk 1'
,
'gbk_2'
=>
'Gbk 2'
,
'status_ikatan_kerja_pegawai_id'
=>
'Status Ikatan Kerja Pegawai ID'
,
'status_akhir'
=>
'Status Akhir'
,
'status_aktif_pegawai_id'
=>
'Status Aktif Pegawai ID'
,
'tanggal_masuk'
=>
'Tanggal Masuk'
,
'tanggal_keluar'
=>
'Tanggal Keluar'
,
'nama_bapak'
=>
'Nama Bapak'
,
'nama_ibu'
=>
'Nama Ibu'
,
'status'
=>
'Status'
,
'status_marital_id'
=>
'Status Marital ID'
,
'nama_p'
=>
'Nama P'
,
'tgl_lahir_p'
=>
'Tgl Lahir P'
,
'tmp_lahir_p'
=>
'Tmp Lahir P'
,
'pekerjaan_ortu'
=>
'Pekerjaan Ortu'
,
'user_id'
=>
'User ID'
,
'deleted'
=>
'Deleted'
,
'deleted_at'
=>
'Deleted At'
,
'deleted_by'
=>
'Deleted By'
,
'created_by'
=>
'Created By'
,
'created_at'
=>
'Created At'
,
'updated_by'
=>
'Updated By'
,
'updated_at'
=>
'Updated At'
,
];
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getAdakPenugasanPengajarans
()
{
return
$this
->
hasMany
(
AdakPenugasanPengajaran
::
className
(),
[
'pegawai_id'
=>
'pegawai_id'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getAdakRegistrasis
()
{
return
$this
->
hasMany
(
AdakRegistrasi
::
className
(),
[
'dosen_wali_id'
=>
'pegawai_id'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getHrdxDosens
()
{
return
$this
->
hasMany
(
HrdxDosen
::
className
(),
[
'pegawai_id'
=>
'pegawai_id'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getJenisKelamin
()
{
return
$this
->
hasOne
(
MrefRJenisKelamin
::
className
(),
[
'jenis_kelamin_id'
=>
'jenis_kelamin_id'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getAgama
()
{
return
$this
->
hasOne
(
MrefRAgama
::
className
(),
[
'agama_id'
=>
'agama_id'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getGolonganDarah
()
{
return
$this
->
hasOne
(
MrefRGolonganDarah
::
className
(),
[
'golongan_darah_id'
=>
'golongan_darah_id'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getJabatanAkademik
()
{
return
$this
->
hasOne
(
MrefRJabatanAkademik
::
className
(),
[
'jabatan_akademik_id'
=>
'jabatan_akademik_id'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getKabupaten
()
{
return
$this
->
hasOne
(
MrefRKabupaten
::
className
(),
[
'kabupaten_id'
=>
'kabupaten_id'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getRefKbk
()
{
return
$this
->
hasOne
(
InstProdi
::
className
(),
[
'ref_kbk_id'
=>
'ref_kbk_id'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getStatusAktifPegawai
()
{
return
$this
->
hasOne
(
MrefRStatusAktifPegawai
::
className
(),
[
'status_aktif_pegawai_id'
=>
'status_aktif_pegawai_id'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getStatusIkatanKerjaPegawai
()
{
return
$this
->
hasOne
(
MrefRStatusIkatanKerjaPegawai
::
className
(),
[
'status_ikatan_kerja_pegawai_id'
=>
'status_ikatan_kerja_pegawai_id'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getStatusMarital
()
{
return
$this
->
hasOne
(
MrefRStatusMarital
::
className
(),
[
'status_marital_id'
=>
'status_marital_id'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getUser
()
{
return
$this
->
hasOne
(
SysxUser
::
className
(),
[
'user_id'
=>
'user_id'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getHrdxPengajars
()
{
return
$this
->
hasMany
(
HrdxPengajar
::
className
(),
[
'pegawai_id'
=>
'pegawai_id'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getHrdxRiwayatPendidikans
()
{
return
$this
->
hasMany
(
HrdxRiwayatPendidikan
::
className
(),
[
'pegawai_id'
=>
'pegawai_id'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getHrdxStafs
()
{
return
$this
->
hasMany
(
HrdxStaf
::
className
(),
[
'pegawai_id'
=>
'pegawai_id'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getInstPejabats
()
{
return
$this
->
hasMany
(
InstPejabat
::
className
(),
[
'pegawai_id'
=>
'pegawai_id'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getInvtPicBarangs
()
{
return
$this
->
hasMany
(
InvtPicBarang
::
className
(),
[
'pegawai_id'
=>
'pegawai_id'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getLppmTLogreviews
()
{
return
$this
->
hasMany
(
LppmTLogreview
::
className
(),
[
'pegawai_id'
=>
'pegawai_id'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getLppmTPublikasis
()
{
return
$this
->
hasMany
(
LppmTPublikasi
::
className
(),
[
'pegawai_id'
=>
'pegawai_id'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getPrklCourseUnits
()
{
return
$this
->
hasMany
(
PrklCourseUnit
::
className
(),
[
'pegawai_id'
=>
'pegawai_id'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getPrklKrsMhs
()
{
return
$this
->
hasMany
(
PrklKrsMhs
::
className
(),
[
'approved_by'
=>
'pegawai_id'
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getUbuxSatpams
()
{
return
$this
->
hasMany
(
UbuxSatpam
::
className
(),
[
'pegawai_id'
=>
'pegawai_id'
]);
}
}
backend/modules/ubux/views/jam-kerja/
create
.php
→
backend/modules/ubux/views/jam-kerja/
add
.php
View file @
3af54720
...
...
@@ -6,7 +6,7 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\JamKerja */
$this
->
title
=
'
Create
Jam Kerja'
;
$this
->
title
=
'
Add
Jam Kerja'
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Jam Kerjas'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
?>
...
...
backend/modules/ubux/views/jam-kerja/
update
.php
→
backend/modules/ubux/views/jam-kerja/
edit
.php
View file @
3af54720
...
...
@@ -5,7 +5,7 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\JamKerja */
$this
->
title
=
'
Update
Jam Kerja: '
.
' '
.
$model
->
jam_kerja_id
;
$this
->
title
=
'
Edit
Jam Kerja: '
.
' '
.
$model
->
jam_kerja_id
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Jam Kerjas'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
jam_kerja_id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
jam_kerja_id
]];
$this
->
params
[
'breadcrumbs'
][]
=
'Update'
;
...
...
backend/modules/ubux/views/jam-kerja/index.php
View file @
3af54720
...
...
@@ -21,32 +21,9 @@ $this->params['breadcrumbs'][] = $this->title;
'dataProvider'
=>
$dataProvider
,
'filterModel'
=>
$searchModel
,
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
//'jam_kerja_id',
//'laporan_id',
//'satpam_id',
//'tanggal_scan',
[
'class'
=>
'yii\grid\SerialColumn'
],
'nama'
,
'tanggal'
,
// 'jam',
// 'pin',
// 'nip',
// 'jabatan',
// 'departemen',
// 'kantor',
// 'verifikasi',
// 'i_o',
// 'workcode',
// 'mesin',
// 'deleted',
// 'deleted_at',
// 'deleted_by',
// 'created_at',
// 'created_by',
// 'updated_at',
// 'updated_by',
[
'class'
=>
'yii\grid\ActionColumn'
],
],
...
...
backend/modules/ubux/views/laporan/_form.php
View file @
3af54720
...
...
@@ -8,25 +8,36 @@ use yii\widgets\ActiveForm;
/* @var $form yii\widgets\ActiveForm */
?>
<div
class=
"laporan-form"
>
<div
class=
"laporan-form"
>
<?php
$form
=
ActiveForm
::
begin
();
?>
<?php
$thn
=
date
(
'Y'
);
foreach
(
range
(
200
2
-
2
,
$thn
)
as
$i
)
{
foreach
(
range
(
200
0
,
$thn
)
as
$i
)
{
$array
[]
=
$i
;
}
?>
<?=
$form
->
field
(
$model
,
'bulan'
)
->
dropDownlist
([
'Januari'
=>
'Januari'
,
'Februari'
=>
'Februari'
,
'Maret'
=>
'Maret'
,
'April'
=>
'April'
,
'Mei'
=>
'Mei'
,
'Juni'
=>
'Juni'
,
'Juli'
=>
'Juli'
,
'Agustus'
=>
'Agustus'
,
'September'
=>
'September'
,
'Oktober'
=>
'Oktober'
,
'November'
=>
'November'
,
'Desember'
=>
'Desember'
],
[
'prompt'
=>
'Pilih Bulan'
])
?>
<?=
$form
->
field
(
$model
,
'bulan'
)
->
dropDownlist
(
[
'Januari'
=>
'Januari'
,
'Februari'
=>
'Februari'
,
'Maret'
=>
'Maret'
,
'April'
=>
'April'
,
'Mei'
=>
'Mei'
,
'Juni'
=>
'Juni'
,
'Juli'
=>
'Juli'
,
'Agustus'
=>
'Agustus'
,
'September'
=>
'September'
,
'Oktober'
=>
'Oktober'
,
'November'
=>
'November'
,
'Desember'
=>
'Desember'
],
[
'prompt'
=>
'Pilih Bulan'
,
'required'
=>
true
,
]
)
?>
<?=
$form
->
field
(
$model
,
'tahun'
)
->
dropDownList
(
$array
,
[
'prompt'
=>
'Pilih Tahun'
]
$array
,
[
'prompt'
=>
'Pilih Tahun'
,
'required'
=>
true
,
]
);
?>
<div
class=
"form-group"
>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
'
Create'
:
'Update
'
,
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
'
Add'
:
'Edit
'
,
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
</div>
<?php
ActiveForm
::
end
();
?>
...
...
backend/modules/ubux/views/laporan/_search.php
View file @
3af54720
...
...
@@ -13,31 +13,40 @@ use yii\widgets\ActiveForm;
<?php
$form
=
ActiveForm
::
begin
([
'action'
=>
[
'index'
],
'method'
=>
'get'
,
]);
?>
<?=
$form
->
field
(
$model
,
'laporan_id'
)
?>
<?=
$form
->
field
(
$model
,
'bulan'
)
?>
<?=
$form
->
field
(
$model
,
'tahun'
)
?>
<?=
$form
->
field
(
$model
,
'deleted'
)
?>
<?=
$form
->
field
(
$model
,
'deleted_at'
)
?>
<?php
// echo $form->field($model, 'deleted_by') ?>
<?
php
// echo $form->field($model, 'created_at') ?>
<?
php
// echo $form->field($model, 'created_by') ?>
<?
php
// echo $form->field($model, 'updated_at') ?>
<?
php
// echo $form->field($model, 'updated_by') ?>
]);
?>
<?php
$thn
=
date
(
'Y'
);
foreach
(
range
(
2000
,
$thn
)
as
$i
)
{
$array
[]
=
$i
;
}
?>
<h2><i
class=
"fa fa-search"
>
Cari Bulan Laporan
</i></h2>
<div
class=
"page-line"
></div>
<div
class=
"row"
>
<div
class=
"col-md-4"
>
<?=
$form
->
field
(
$model
,
'bulan'
)
->
dropDownlist
(
[
'Januari'
=>
'Januari'
,
'Februari'
=>
'Februari'
,
'Maret'
=>
'Maret'
,
'April'
=>
'April'
,
'Mei'
=>
'Mei'
,
'Juni'
=>
'Juni'
,
'Juli'
=>
'Juli'
,
'Agustus'
=>
'Agustus'
,
'September'
=>
'September'
,
'Oktober'
=>
'Oktober'
,
'November'
=>
'November'
,
'Desember'
=>
'Desember'
],
[
'prompt'
=>
'Pilih Bulan'
,
]
)
?>
</div>
<div
class=
"col-md-4"
>
<?=
$form
->
field
(
$model
,
'tahun'
)
->
dropDownList
(
$array
,
[
'prompt'
=>
'Pilih Tahun'
,
]
);
?>
</div>
</div>
<div
class=
"form-group"
>
<?= Html::submitButton('
Search
', ['class' => 'btn btn-primary']) ?>
<
?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?
>
<?=
Html
::
submitButton
(
'
Cari
'
,
[
'class'
=>
'btn btn-primary'
])
?>
<
!--
<?=
Html
::
resetButton
(
'Reset'
,
[
'class'
=>
'btn btn-default'
])
?>
--
>
</div>
<?php
ActiveForm
::
end
();
?>
...
...
backend/modules/ubux/views/laporan/
create
.php
→
backend/modules/ubux/views/laporan/
add
.php
View file @
3af54720
...
...
@@ -6,7 +6,7 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Laporan */
$this
->
title
=
'
Create
Laporan'
;
$this
->
title
=
'
Add
Laporan'
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Laporans'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
?>
...
...
backend/modules/ubux/views/laporan/
update
.php
→
backend/modules/ubux/views/laporan/
edit
.php
View file @
3af54720
...
...
@@ -5,12 +5,12 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Laporan */
$this
->
title
=
'
Update Laporan: '
.
' '
.
$model
->
laporan_id
;
$this
->
title
=
'
Edit Laporan '
.
' '
.
$model
->
bulan
.
' '
.
$model
->
tahun
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Laporans'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
laporan_id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
laporan_id
]];
$this
->
params
[
'breadcrumbs'
][]
=
'
Update
'
;
$this
->
params
[
'breadcrumbs'
][]
=
'
Edit
'
;
?>
<div
class=
"laporan-
update
"
>
<div
class=
"laporan-
edit
"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
...
...
backend/modules/ubux/views/laporan/index.php
View file @
3af54720
...
...
@@ -9,21 +9,23 @@ use common\components\ToolsColumn;
/* @var $searchModel backend\modules\ubux\models\search\LaporanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this
->
title
=
'Laporan'
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'header'
]
=
'Laporan'
;
?>
<div
class=
"laporan-index"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?php
//
echo $this->render('_search', ['model' => $searchModel]); ?>
<?php
echo
$this
->
render
(
'_search'
,
[
'model'
=>
$searchModel
]);
?>
<h2
style=
"margin-top: 40px"
><i
class=
"fa fa-list"
>
List Laporan
</i></h2>
<div
class=
"page-line"
></div>
<p>
<?=
Html
::
a
(
'Tambah Bulan'
,
[
'
create
'
],
[
'class'
=>
'btn btn-success'
])
?>
<?=
Html
::
a
(
'Tambah Bulan'
,
[
'
add
'
],
[
'class'
=>
'btn btn-success'
])
?>
</p>
<?=
GridView
::
widget
([
'dataProvider'
=>
$dataProvider
,
'filterModel'
=>
$searchModel
,
//
'filterModel' => $searchModel,
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
...
...
@@ -54,7 +56,7 @@ $this->params['breadcrumbs'][] = $this->title;
if
(
$action
===
'view'
)
{
return
Url
::
toRoute
([
'view'
,
'id'
=>
$key
]);
}
else
if
(
$action
===
'update'
)
{
return
Url
::
toRoute
([
'
update
'
,
'id'
=>
$key
]);
return
Url
::
toRoute
([
'
edit
'
,
'id'
=>
$key
]);
}
else
if
(
$action
===
'delete'
)
{
return
Url
::
toRoute
([
'delete'
,
'id'
=>
$key
]);
}
...
...
backend/modules/ubux/views/laporan/view-detail.php
View file @
3af54720
...
...
@@ -13,9 +13,11 @@ use common\components\ToolsColumn;
//$this->title = $model->laporan_id;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Laporans'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'header'
]
=
'Detail Laporan'
;
?>
<div
class=
"laporan-view"
>
<h2><i
class=
"fa fa-list"
>
List Detail
</i></
<
div
class="page-line"
></div>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?php
...
...
@@ -29,16 +31,12 @@ $this->params['breadcrumbs'][] = $this->title;
'nama'
,
[
'attribute'
=>
'tanggal'
,
'label'
=>
'Tanggal'
,
//'format' => ['date', 'php:d M Y'],
'label'
=>
'Tanggal'
,
'filter'
=>
''
,
],
'jam'
,
]
]);
// echo $dataProvider->getTotalCount();
]);
?>
...
...
backend/modules/ubux/views/laporan/view-pdf.php
View file @
3af54720
...
...
@@ -29,6 +29,7 @@ $dataProvider = new ActiveDataProvider([
$sat2
=
$model
->
tahun
;
$model
=
Satpam
::
find
()
->
where
([
'laporan_id'
=>
$sat
])
->
andwhere
([
'satpam_id'
=>
$_GET
[
'nip'
]])
->
one
();
//$models = gaji::find()->where(['laporan_id' => $_GET['id']])->one();
$total
=
$model
[
'total_gaji'
]
+
$model
[
'gaji_lembur'
];
?>
<div>
...
...
@@ -72,47 +73,46 @@ $dataProvider = new ActiveDataProvider([
<td></td>
<td></td>
<td></td>
<td><br><br><b>
POTONGAN
<b></td>
<td><br><br><b><b></td>
</tr>
<tr>
<td>
Gaji Pokok
</td>
<td>
=
</td>
<td>
Rp.
<?php
echo
$model
[
'total_gaji'
]
?>
,-
</td>
<td>
Rp.
<?php
echo
$model
[
'total_gaji'
]
?>
,-
</td>
<td></td>
<td></td>
<td></td>
<td>
Pajak
</td>
<td>
=
</td>
<td></td>
<td>
-
</td>
<td></td>
<td></td>
<td>
</td>
</tr>
<tr>
<td>
Gaji Lembur
</td>
<td>
=
</td>
<td>
Rp.
<?php
echo
$model
[
'gaji_lembur'
];
?>
,-
</td>
<td>
Rp.
<?php
echo
$model
[
'gaji_lembur'
];
?>
,-
</td>
<hr>
<td></td>
<td></td>
<td></td>
<td>
Asuransi
</td>
<td>
=
</td>
<td></td>
<td>
-
</td>
<hr>
<td></td>
<td></td>
<td>
</td>
</tr>
<tr>
<td>
<b>
Total(A)
<b></td>
<td>
<b>
Total
<b></td>
<td>
=
</td>
<td><b>
Rp.
<?php
echo
$model
[
'total_gaji'
]
+
$model
[
'gaji_lembur'
]
?>
,-
</b></td>
<td><b>
Rp.
<?php
echo
$model
[
'total_gaji'
]
+
$model
[
'gaji_lembur'
]
?>
,-
</b></td>
<td></td>
<td></td>
<td></td>
<td><b>
Total(B)
<b></td>
<td>
=
</td>
<td><b><b></td>
<td></td>
</tr>
<tr>
<td><br><br><br><b>
Penerimaan Bersih
(A - B)
</b></td>
<td><br><br><br>
=
</td>
<td><br><br><br><b>
Penerimaan Bersih
</b></td>
<td><br><br><br></td>
<td><br><br><br><b>
Rp.
<?php
echo
$model
[
'total_gaji'
]
+
$model
[
'gaji_lembur'
]
?>
,-
</b>
</td>
</tr>
<tr>
...
...
backend/modules/ubux/views/laporan/view.php
View file @
3af54720
...
...
@@ -15,21 +15,18 @@ use backend\modules\ubux\models\Lembur;
//$this->title = $model->laporan_id;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Laporans'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'header'
]
=
'Laporan'
;
?>
<div
class=
"laporan-view"
>
<h2><i
class=
"fa fa-list"
>
List Laporan
<?php
echo
$model
[
'bulan'
]
?>
<?php
echo
$model
[
'tahun'
]
?>
</i></h2>
<div
class=
"page-line"
></div>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<h1><strong>
<?php
echo
$model
[
'bulan'
]
?>
<?php
echo
$model
[
'tahun'
]
?>
</strong></h1>
<?php
if
(
!
Lembur
::
find
()
->
where
([
'laporan_id'
=>
$model
->
laporan_id
])
->
exists
()){
\Yii
::
$app
->
messenger
->
addWarningFlash
(
"Masukkan tanggal libur pada "
.
$model
[
'bulan'
]
.
" "
.
$model
[
'tahun'
]);
echo
Html
::
a
(
'Tambah Tanggal Libur'
,
[
'lembur/
create
'
,
'id'
=>
$model
->
laporan_id
],
[
'class'
=>
'btn btn-info'
]);
echo
Html
::
a
(
'Tambah Tanggal Libur'
,
[
'lembur/
add
'
,
'id'
=>
$model
->
laporan_id
],
[
'class'
=>
'btn btn-info'
]);
}
// else{
// echo Html::a('Tambah Tanggal Libur', ['lembur/create', 'id' => $model->laporan_id], ['class' => 'btn btn-info']);
// }
if
(
!
Satpam
::
find
()
->
where
([
'laporan_id'
=>
$model
->
laporan_id
])
->
exists
()){
...
...
@@ -54,14 +51,6 @@ $this->params['breadcrumbs'][] = $this->title;
'allModels'
=>
$data
,
]);
// echo GridView::widget([
// 'dataProvider' => $dataProvider,
// 'columns' => [
// 'nama',
// 'nip',
// ]
// ]);
echo
GridView
::
widget
([
'dataProvider'
=>
$dataProvider
,
'columns'
=>
[
...
...
@@ -79,10 +68,18 @@ $this->params['breadcrumbs'][] = $this->title;
return
ToolsColumn
::
renderCustomButton
(
$url
,
$model
,
'View Detail'
,
'fa fa-eye'
);
},
'total'
=>
function
(
$url
,
$model
){
return
ToolsColumn
::
renderCustomButton
(
$url
,
$model
,
'Add Gaji'
,
'fa fa-eye'
);
if
(
$model
->
total_gaji
==
null
)
{
return
ToolsColumn
::
renderCustomButton
(
$url
,
$model
,
'Add Gaji Pokok'
,
'fa fa-eye'
);
}
else
{
return
ToolsColumn
::
renderCustomButton
(
$url
,
$model
,
'Update Gaji Pokok'
,
'fa fa-eye'
);
}
},
'lembur'
=>
function
(
$url
,
$model
){
return
ToolsColumn
::
renderCustomButton
(
$url
,
$model
,
'Add Gaji Lembur'
,
'fa fa-eye'
);
if
(
$model
->
gaji_lembur
==
null
)
{
return
ToolsColumn
::
renderCustomButton
(
$url
,
$model
,
'Add Gaji Lembur'
,
'fa fa-eye'
);
}
else
{
return
ToolsColumn
::
renderCustomButton
(
$url
,
$model
,
'Update Gaji Lembur'
,
'fa fa-eye'
);
}
},
'delete'
=>
function
(
$url
,
$model
){
return
"<li>"
.
Html
::
a
(
'<span class="fa fa-trash"></span> Hapus'
,
$url
,
[
...
...
@@ -100,20 +97,27 @@ $this->params['breadcrumbs'][] = $this->title;
if
(
$action
===
'view'
)
{
return
Url
::
toRoute
([
'view-detail'
,
'id'
=>
$_GET
[
'id'
],
'satpam_id'
=>
$key
]);
}
else
if
(
$action
===
'total'
)
{
return
Url
::
toRoute
([
'satpam/add-gaji'
,
'id'
=>
$_GET
[
'id'
],
'satpam_id'
=>
$key
]);
if
(
$model
->
total_gaji
==
null
)
{
return
Url
::
toRoute
([
'satpam/add-gaji'
,
'id'
=>
$_GET
[
'id'
],
'satpam_id'
=>
$key
]);
}
else
{
return
Url
::
toRoute
([
'satpam/edit-gaji'
,
'id'
=>
$_GET
[
'id'
],
'satpam_id'
=>
$key
]);
}
}
else
if
(
$action
===
'delete'
)
{
return
Url
::
toRoute
([
'delete'
,
'id'
=>
$key
]);
}
else
if
(
$action
===
'print'
)
{
return
Url
::
toRoute
([
'print'
,
'id'
=>
$_GET
[
'id'
],
'nip'
=>
$key
]);
}
else
if
(
$action
===
'lembur'
){
return
Url
::
toRoute
([
'satpam/add-lembur'
,
'id'
=>
$_GET
[
'id'
],
'satpam_id'
=>
$key
]);
if
(
$model
->
total_gaji
==
null
)
{
return
Url
::
toRoute
([
'satpam/add-lembur'
,
'id'
=>
$_GET
[
'id'
],
'satpam_id'
=>
$key
]);
}
else
{
return
Url
::
toRoute
([
'satpam/edit-lembur'
,
'id'
=>
$_GET
[
'id'
],
'satpam_id'
=>
$key
]);
}
}
}
],
],
]);
// echo "<br>" . $count;
]);
?>
...
...
backend/modules/ubux/views/lembur/_form.php
View file @
3af54720
...
...
@@ -13,11 +13,7 @@ $uiHelper = \Yii::$app->uiHelper;
<div
class=
"lembur-form"
>
<?php
$form
=
ActiveForm
::
begin
();
?>
<!--
<?=
$form
->
field
(
$model
,
'tanggal'
)
->
textInput
()
?>
-->
<?php
$form
=
ActiveForm
::
begin
();
?>
<?=
$form
->
field
(
$model
,
'tanggal'
)
->
textarea
([
'maxlength'
=>
true
,
...
...
backend/modules/ubux/views/lembur/
create
.php
→
backend/modules/ubux/views/lembur/
add
.php
View file @
3af54720
File moved
backend/modules/ubux/views/lembur/
update
.php
→
backend/modules/ubux/views/lembur/
edit
.php
View file @
3af54720
...
...
@@ -5,7 +5,7 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Lembur */
$this
->
title
=
'
Update
Lembur: '
.
' '
.
$model
->
tanggal_lembur_id
;
$this
->
title
=
'
Edit
Lembur: '
.
' '
.
$model
->
tanggal_lembur_id
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Lembur'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
tanggal_lembur_id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
tanggal_lembur_id
]];
$this
->
params
[
'breadcrumbs'
][]
=
'Update'
;
...
...
backend/modules/ubux/views/lembur/index.php
View file @
3af54720
...
...
@@ -30,11 +30,6 @@ $this->params['breadcrumbs'][] = $this->title;
'tanggal'
,
'deleted'
,
'deleted_at'
,
// 'deleted_by',
// 'created_at',
// 'created_by',
// 'updated_at',
// 'updated_by',
[
'class'
=>
'yii\grid\ActionColumn'
],
],
...
...
backend/modules/ubux/views/satpam/_form-add-gaji.php
View file @
3af54720
...
...
@@ -3,18 +3,18 @@
use
yii\helpers\Html
;
use
yii\widgets\ActiveForm
;
$gaji
=
80000
;
?>
<div
class=
"laporan-form"
>
<?php
$form
=
ActiveForm
::
begin
();
?>
<?=
$form
->
field
(
$model
,
'total_gaji'
)
->
textInput
([
'maxlength'
=>
true
,
'value'
=>
$gaji
]);
?>
<?=
$form
->
field
(
$model
,
'total_gaji'
)
->
textInput
(
[
'maxlength'
=>
true
,
'placeholder'
=>
"Masukkan Gaji Pokok"
,
'required'
=>
true
,
]);
?>
<div
class=
"form-group"
>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
'Create'
:
'Add Gaji'
,
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
...
...
backend/modules/ubux/views/satpam/_form-add-lembur.php
View file @
3af54720
...
...
@@ -3,15 +3,18 @@
use
yii\helpers\Html
;
use
yii\widgets\ActiveForm
;
$gaji
=
80000
;
?>
<div
class=
"laporan-form"
>
<?php
$form
=
ActiveForm
::
begin
();
?>
<?=
$form
->
field
(
$model
,
'gaji_lembur'
)
->
textInput
([
'maxlength'
=>
true
,
'value'
=>
$gaji
]);
?>
<?=
$form
->
field
(
$model
,
'gaji_lembur'
)
->
textInput
(
[
'maxlength'
=>
true
,
'placeholder'
=>
"Masukkan Gaji Lembur"
,
'required'
=>
true
,
]);
?>
<div
class=
"form-group"
>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
'Create'
:
'Add Gaji'
,
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
...
...
backend/modules/ubux/views/satpam/_search.php
View file @
3af54720
...
...
@@ -15,35 +15,37 @@ use yii\widgets\ActiveForm;
'method'
=>
'get'
,
]);
?>
<?=
$form
->
field
(
$model
,
'satpam_id'
)
?>
<?=
$form
->
field
(
$model
,
'laporan_id'
)
?>
<?=
$form
->
field
(
$model
,
'total_gaji'
)
?>
<?=
$form
->
field
(
$model
,
'nip'
)
?>
<?=
$form
->
field
(
$model
,
'nama'
)
?>
<?php
// echo $form->field($model, 'status') ?>
<?
php
// echo $form->field($model, 'deleted') ?>
<?
php
// echo $form->field($model, 'deleted_at') ?>
<?
php
// echo $form->field($model, 'deleted_by') ?>
<?
php
// echo $form->field($model, 'created_at') ?>
<?
php
// echo $form->field($model, 'created_by') ?>
<?
php
// echo $form->field($model, 'updated_at') ?>
<?
php
// echo $form->field($model, 'updated_by') ?>
<?php
$thn
=
date
(
'Y'
);
foreach
(
range
(
2000
,
$thn
)
as
$i
)
{
$array
[]
=
$i
;
}
?>
<h2><i
class=
"fa fa-search"
>
Cari Data Satpam
</i></h2>
<div
class=
"page-line"
></div>
<div
class=
"row"
>
<div
class=
"col-md-4"
>
<?=
$form
->
field
(
$model
,
'bulan'
)
->
dropDownlist
(
[
'Januari'
=>
'Januari'
,
'Februari'
=>
'Februari'
,
'Maret'
=>
'Maret'
,
'April'
=>
'April'
,
'Mei'
=>
'Mei'
,
'Juni'
=>
'Juni'
,
'Juli'
=>
'Juli'
,
'Agustus'
=>
'Agustus'
,
'September'
=>
'September'
,
'Oktober'
=>
'Oktober'
,
'November'
=>
'November'
,
'Desember'
=>
'Desember'
],
[
'prompt'
=>
'Pilih Bulan'
,
]
)
?>
</div>
<div
class=
"col-md-4"
>
<?=
$form
->
field
(
$model
,
'tahun'
)
->
dropDownList
(
$array
,
[
'prompt'
=>
'Pilih Tahun'
,
]
);
?>
</div>
</div>
<div
class=
"form-group"
>
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
<?=
Html
::
submitButton
(
'Search'
,
[
'class'
=>
'btn btn-primary'
])
?>
</div>
<?php
ActiveForm
::
end
();
?>
...
...
backend/modules/ubux/views/satpam/
create
.php
→
backend/modules/ubux/views/satpam/
add
.php
View file @
3af54720
File moved
backend/modules/ubux/views/satpam/
update
.php
→
backend/modules/ubux/views/satpam/
edit
.php
View file @
3af54720
...
...
@@ -5,7 +5,7 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Satpam */
$this
->
title
=
'
Update
Satpam: '
.
' '
.
$model
->
satpam_id
;
$this
->
title
=
'
Edit
Satpam: '
.
' '
.
$model
->
satpam_id
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
'Satpams'
,
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
satpam_id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
satpam_id
]];
$this
->
params
[
'breadcrumbs'
][]
=
'Update'
;
...
...
backend/modules/ubux/views/satpam/index.php
View file @
3af54720
...
...
@@ -9,19 +9,20 @@ use common\components\ToolsColumn;
/* @var $searchModel backend\modules\ubux\models\search\SatpamSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this
->
title
=
'Data Satpam Per Bulan dan Tahun'
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
$this
->
params
[
'header'
]
=
'Data Satpam Per Bulan dan Tahun'
;
?>
<div
class=
"satpam-index"
>
<div
class=
"satpam-index"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?php
//
echo $this->render('_search', ['model' => $searchModel]); ?>
<?php
echo
$this
->
render
(
'_search'
,
[
'model'
=>
$searchModel
]);
?>
<h2><i
class=
"fa fa-list"
>
List Data Satpam Perbulan
</i></h2>
<div
class=
"page-line"
></div>
<?=
GridView
::
widget
([
'dataProvider'
=>
$dataProvider
,
'filterModel'
=>
$searchModel
,
//
'filterModel' => $searchModel,
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
...
...
backend/modules/ubux/views/satpam/view.php
View file @
3af54720
...
...
@@ -37,14 +37,6 @@ $model2 = Laporan::find()->where(['laporan_id' => $id])->one();
'allModels'
=>
$data
,
]);
// echo GridView::widget([
// 'dataProvider' => $dataProvider,
// 'columns' => [
// 'nama',
// 'nip',
// ]
// ]);
echo
GridView
::
widget
([
'dataProvider'
=>
$dataProvider
,
'columns'
=>
[
...
...
backend/themes/v2/layouts/main.php
View file @
3af54720
...
...
@@ -129,8 +129,8 @@ $this->beginPage();
<?php
MenuRenderer
::
renderSidebarMenu
(
\Yii
::
$app
->
params
[
'sidebarMenu'
]);
?>
<li><a
href=
"/
ulang2
/backend/web/index.php/ubux/laporan"
><i
class=
"fa fa-circle-o text-red"
></i>
<span>
Laporan Satpam
</span></a></li>
<li><a
href=
"/
ulang2
/backend/web/index.php/ubux/satpam"
><i
class=
"fa fa-circle-o text-red"
></i>
<span>
Data Satpam
</span></a></li>
<li><a
href=
"/
cis-lite
/backend/web/index.php/ubux/laporan"
><i
class=
"fa fa-circle-o text-red"
></i>
<span>
Laporan Satpam
</span></a></li>
<li><a
href=
"/
cis-lite
/backend/web/index.php/ubux/satpam"
><i
class=
"fa fa-circle-o text-red"
></i>
<span>
Data Satpam
</span></a></li>
<!-- <li class="header">LABELS</li>
<li><a href="#"><i class="fa fa-circle-o text-red"></i> <span>Important</span></a></li>
<li><a href="#"><i class="fa fa-circle-o text-yellow"></i> <span>Warning</span></a></li>
...
...
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