Commit 3af54720 by Andre Sihombing

Memperbaiki semua fungsi

parent 9fbaa1d3
...@@ -59,14 +59,14 @@ class JamKerjaController extends Controller ...@@ -59,14 +59,14 @@ class JamKerjaController extends Controller
* If creation is successful, the browser will be redirected to the 'view' page. * If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed * @return mixed
*/ */
public function actionCreate() public function actionAdd()
{ {
$model = new JamKerja(); $model = new JamKerja();
if ($model->load(Yii::$app->request->post()) && $model->save()) { if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->jam_kerja_id]); return $this->redirect(['view', 'id' => $model->jam_kerja_id]);
} else { } else {
return $this->render('create', [ return $this->render('add', [
'model' => $model, 'model' => $model,
]); ]);
} }
...@@ -78,14 +78,14 @@ class JamKerjaController extends Controller ...@@ -78,14 +78,14 @@ class JamKerjaController extends Controller
* @param integer $id * @param integer $id
* @return mixed * @return mixed
*/ */
public function actionUpdate($id) public function actionEdit($id)
{ {
$model = $this->findModel($id); $model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) { if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->jam_kerja_id]); return $this->redirect(['view', 'id' => $model->jam_kerja_id]);
} else { } else {
return $this->render('update', [ return $this->render('edit', [
'model' => $model, 'model' => $model,
]); ]);
} }
...@@ -97,7 +97,7 @@ class JamKerjaController extends Controller ...@@ -97,7 +97,7 @@ class JamKerjaController extends Controller
* @param integer $id * @param integer $id
* @return mixed * @return mixed
*/ */
public function actionDelete($id) public function actionDel($id)
{ {
$this->findModel($id)->delete(); $this->findModel($id)->delete();
...@@ -166,8 +166,6 @@ class JamKerjaController extends Controller ...@@ -166,8 +166,6 @@ class JamKerjaController extends Controller
$model2->status = 'Tetap'; $model2->status = 'Tetap';
$idSatpam; $idSatpam;
//if(!($sheetData[$baseRow]['F'] == $sheetData[$baseRow-1]['F'])){
//if($)
if(!Satpam::find()->where(['nip'=>$model->nip])->andWhere(['laporan_id'=>$id])->exists()){ if(!Satpam::find()->where(['nip'=>$model->nip])->andWhere(['laporan_id'=>$id])->exists()){
$model2->laporan_id = $id; $model2->laporan_id = $id;
$model2->save(); $model2->save();
...@@ -177,7 +175,6 @@ class JamKerjaController extends Controller ...@@ -177,7 +175,6 @@ class JamKerjaController extends Controller
$satpam=Satpam::find()->where(['nip'=>$model->nip])->andWhere(['laporan_id' => $id])->one(); $satpam=Satpam::find()->where(['nip'=>$model->nip])->andWhere(['laporan_id' => $id])->one();
$idSatpam = $satpam->satpam_id; $idSatpam = $satpam->satpam_id;
} }
//}
$model->satpam_id = $idSatpam; $model->satpam_id = $idSatpam;
$model->save(); $model->save();
...@@ -185,7 +182,7 @@ class JamKerjaController extends Controller ...@@ -185,7 +182,7 @@ class JamKerjaController extends Controller
$baseRow++; $baseRow++;
} }
Yii::$app->getSession()->setFlash('success','Success'); Yii::$app->getSession()->setFlash('success','Success');
return $this->redirect(['/ubux/laporan/index']); return $this->redirect(['/ubux/laporan/view', 'id' => $id]);
}else{ }else{
Yii::$app->getSession()->setFlash('error','Error'); Yii::$app->getSession()->setFlash('error','Error');
return $this->redirect(['import']); return $this->redirect(['import']);
...@@ -197,51 +194,4 @@ class JamKerjaController extends Controller ...@@ -197,51 +194,4 @@ class JamKerjaController extends Controller
]); ]);
} }
// 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,
// ]);
// }
} }
...@@ -74,14 +74,14 @@ class LaporanController extends Controller ...@@ -74,14 +74,14 @@ class LaporanController extends Controller
* If creation is successful, the browser will be redirected to the 'view' page. * If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed * @return mixed
*/ */
public function actionCreate() public function actionAdd()
{ {
$model = new Laporan(); $model = new Laporan();
if ($model->load(Yii::$app->request->post()) && $model->save()) { if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->laporan_id]); return $this->redirect(['view', 'id' => $model->laporan_id]);
} else { } else {
return $this->render('create', [ return $this->render('add', [
'model' => $model, 'model' => $model,
]); ]);
} }
...@@ -93,14 +93,14 @@ class LaporanController extends Controller ...@@ -93,14 +93,14 @@ class LaporanController extends Controller
* @param integer $id * @param integer $id
* @return mixed * @return mixed
*/ */
public function actionUpdate($id) public function actionEdit($id)
{ {
$model = $this->findModel($id); $model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) { if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->laporan_id]); return $this->redirect(['view', 'id' => $model->laporan_id]);
} else { } else {
return $this->render('update', [ return $this->render('edit', [
'model' => $model, 'model' => $model,
]); ]);
} }
...@@ -112,7 +112,7 @@ class LaporanController extends Controller ...@@ -112,7 +112,7 @@ class LaporanController extends Controller
* @param integer $id * @param integer $id
* @return mixed * @return mixed
*/ */
public function actionDelete($id) public function actionDel($id)
{ {
$this->findModel($id)->softdelete(); $this->findModel($id)->softdelete();
......
...@@ -60,15 +60,11 @@ class LemburController extends Controller ...@@ -60,15 +60,11 @@ class LemburController extends Controller
* If creation is successful, the browser will be redirected to the 'view' page. * If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed * @return mixed
*/ */
public function actionCreate($id) public function actionAdd($id)
{ {
$model = new Lembur(); $model = new Lembur();
if ($model->load(Yii::$app->request->post())) { if ($model->load(Yii::$app->request->post())) {
// $models = explode(",", $model->tanggal);
// print_r($models);die();
$model->laporan_id = $id; $model->laporan_id = $id;
if($model->validate()){ if($model->validate()){
$model->save(); $model->save();
...@@ -76,7 +72,7 @@ class LemburController extends Controller ...@@ -76,7 +72,7 @@ class LemburController extends Controller
} }
} else { } else {
return $this->render('create', [ return $this->render('add', [
'model' => $model, 'model' => $model,
]); ]);
} }
...@@ -88,14 +84,14 @@ class LemburController extends Controller ...@@ -88,14 +84,14 @@ class LemburController extends Controller
* @param integer $id * @param integer $id
* @return mixed * @return mixed
*/ */
public function actionUpdate($id) public function actionEdit($id)
{ {
$model = $this->findModel($id); $model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) { if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->tanggal_lembur_id]); return $this->redirect(['view', 'id' => $model->tanggal_lembur_id]);
} else { } else {
return $this->render('update', [ return $this->render('edit', [
'model' => $model, 'model' => $model,
]); ]);
} }
...@@ -107,7 +103,7 @@ class LemburController extends Controller ...@@ -107,7 +103,7 @@ class LemburController extends Controller
* @param integer $id * @param integer $id
* @return mixed * @return mixed
*/ */
public function actionDelete($id) public function actionDel($id)
{ {
$this->findModel($id)->softdelete(); $this->findModel($id)->softdelete();
......
...@@ -74,7 +74,7 @@ class SatpamController extends Controller ...@@ -74,7 +74,7 @@ class SatpamController extends Controller
* If creation is successful, the browser will be redirected to the 'view' page. * If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed * @return mixed
*/ */
public function actionCreate() public function actionAdd()
{ {
$model = new Satpam(); $model = new Satpam();
...@@ -93,7 +93,7 @@ class SatpamController extends Controller ...@@ -93,7 +93,7 @@ class SatpamController extends Controller
* @param integer $id * @param integer $id
* @return mixed * @return mixed
*/ */
public function actionUpdate($id) public function actionEdit($id)
{ {
$model = $this->findModel($id); $model = $this->findModel($id);
...@@ -112,7 +112,7 @@ class SatpamController extends Controller ...@@ -112,7 +112,7 @@ class SatpamController extends Controller
* @param integer $id * @param integer $id
* @return mixed * @return mixed
*/ */
public function actionDelete($id) public function actionDel($id)
{ {
$this->findModel($id)->softdelete(); $this->findModel($id)->softdelete();
...@@ -187,36 +187,59 @@ class SatpamController extends Controller ...@@ -187,36 +187,59 @@ class SatpamController extends Controller
} }
} }
public function actionAddLembur($id, $satpam_id){ public function actionEditGaji($id, $satpam_id)
{
$model = $this->findModel($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(); $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(); $models = JamKerja::find()->where(['laporan_id'=>$id])->andWhere(['satpam_id'=>$satpam_id])->All();
// $models2 = Lembur::find()->where(['laporan_id'=>$id])->All();
$cek = $modelCek->tanggal; $cek = $modelCek->tanggal;
$jlh=0; $jlh = 1;
$lembur = Lembur::find()->where(['laporan_id' => $id])->one();
$mod = explode(",", $lembur->tanggal);
// print_r($mod);die();
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,
]);
}
}
}
// foreach ($models as $data ) { public function actionAddLembur($id, $satpam_id){
// if($cek != $data->tanggal){ $model = $this->findModel($satpam_id);
// $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();
$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(); $data = array();
foreach ($models as $obj) { foreach ($models as $obj) {
...@@ -230,20 +253,6 @@ class SatpamController extends Controller ...@@ -230,20 +253,6 @@ class SatpamController extends Controller
} }
} }
} }
// echo $jlh;die();
// echo "<br>";
// foreach ($models2 as $key) {
// echo $key->tanggal."<br>";
// }
// die();
if($model->gaji_lembur==NULL){ if($model->gaji_lembur==NULL){
if($model->load(Yii::$app->request->post())){ if($model->load(Yii::$app->request->post())){
$model->gaji_lembur *= $jlh; $model->gaji_lembur *= $jlh;
...@@ -260,10 +269,49 @@ class SatpamController extends Controller ...@@ -260,10 +269,49 @@ class SatpamController extends Controller
]); ]);
} }
}else{ }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]); 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,
]);
}
}
} }
...@@ -6,7 +6,7 @@ use yii\helpers\Html; ...@@ -6,7 +6,7 @@ use yii\helpers\Html;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\JamKerja */ /* @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'][] = ['label' => 'Jam Kerjas', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
......
...@@ -5,7 +5,7 @@ use yii\helpers\Html; ...@@ -5,7 +5,7 @@ use yii\helpers\Html;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\JamKerja */ /* @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' => 'Jam Kerjas', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->jam_kerja_id, 'url' => ['view', 'id' => $model->jam_kerja_id]]; $this->params['breadcrumbs'][] = ['label' => $model->jam_kerja_id, 'url' => ['view', 'id' => $model->jam_kerja_id]];
$this->params['breadcrumbs'][] = 'Update'; $this->params['breadcrumbs'][] = 'Update';
......
...@@ -22,31 +22,8 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -22,31 +22,8 @@ $this->params['breadcrumbs'][] = $this->title;
'filterModel' => $searchModel, 'filterModel' => $searchModel,
'columns' => [ 'columns' => [
['class' => 'yii\grid\SerialColumn'], ['class' => 'yii\grid\SerialColumn'],
//'jam_kerja_id',
//'laporan_id',
//'satpam_id',
//'tanggal_scan',
'nama', 'nama',
'tanggal', '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'], ['class' => 'yii\grid\ActionColumn'],
], ],
......
...@@ -8,25 +8,36 @@ use yii\widgets\ActiveForm; ...@@ -8,25 +8,36 @@ use yii\widgets\ActiveForm;
/* @var $form yii\widgets\ActiveForm */ /* @var $form yii\widgets\ActiveForm */
?> ?>
<div class="laporan-form"> <div class="laporan-form" >
<?php $form = ActiveForm::begin(); ?> <?php $form = ActiveForm::begin(); ?>
<?php <?php
$thn = date('Y'); $thn = date('Y');
foreach(range(2002-2, $thn) as $i) { foreach(range(2000, $thn) as $i) {
$array[] = $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( <?= $form->field($model, 'tahun')->dropDownList(
$array, ['prompt' => 'Pilih Tahun'] $array,
[
'prompt' => 'Pilih Tahun',
'required' => true,
]
); ?> ); ?>
<div class="form-group"> <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> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -15,29 +15,38 @@ use yii\widgets\ActiveForm; ...@@ -15,29 +15,38 @@ use yii\widgets\ActiveForm;
'method' => 'get', 'method' => 'get',
]); ?> ]); ?>
<?= $form->field($model, 'laporan_id') ?> <?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',
]
)?>
<?= $form->field($model, 'bulan') ?> </div>
<div class="col-md-4">
<?= $form->field($model, 'tahun') ?> <?= $form->field($model, 'tahun')->dropDownList(
$array,
<?= $form->field($model, 'deleted') ?> [
'prompt' => 'Pilih Tahun',
<?= $form->field($model, 'deleted_at') ?> ]
); ?>
<?php // echo $form->field($model, 'deleted_by') ?> </div>
</div>
<?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') ?>
<div class="form-group"> <div class="form-group">
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?> <?= Html::submitButton('Cari', ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?> <!-- <?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?> -->
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -6,7 +6,7 @@ use yii\helpers\Html; ...@@ -6,7 +6,7 @@ use yii\helpers\Html;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Laporan */ /* @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'][] = ['label' => 'Laporans', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
......
...@@ -5,12 +5,12 @@ use yii\helpers\Html; ...@@ -5,12 +5,12 @@ use yii\helpers\Html;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Laporan */ /* @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' => 'Laporans', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->laporan_id, 'url' => ['view', 'id' => $model->laporan_id]]; $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> <h1><?= Html::encode($this->title) ?></h1>
......
...@@ -9,21 +9,23 @@ use common\components\ToolsColumn; ...@@ -9,21 +9,23 @@ use common\components\ToolsColumn;
/* @var $searchModel backend\modules\ubux\models\search\LaporanSearch */ /* @var $searchModel backend\modules\ubux\models\search\LaporanSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Laporan';
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
$this->params['header'] = 'Laporan';
?> ?>
<div class="laporan-index"> <div class="laporan-index">
<h1><?= Html::encode($this->title) ?></h1> <h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?> <?php echo $this->render('_search', ['model' => $searchModel]); ?>
<h2 style="margin-top: 40px"><i class="fa fa-list"> List Laporan</i></h2>
<div class="page-line"></div>
<p> <p>
<?= Html::a('Tambah Bulan', ['create'], ['class' => 'btn btn-success']) ?> <?= Html::a('Tambah Bulan', ['add'], ['class' => 'btn btn-success']) ?>
</p> </p>
<?= GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, // 'filterModel' => $searchModel,
'columns' => [ 'columns' => [
['class' => 'yii\grid\SerialColumn'], ['class' => 'yii\grid\SerialColumn'],
...@@ -54,7 +56,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -54,7 +56,7 @@ $this->params['breadcrumbs'][] = $this->title;
if ($action === 'view') { if ($action === 'view') {
return Url::toRoute(['view', 'id' => $key]); return Url::toRoute(['view', 'id' => $key]);
}else if ($action === 'update') { }else if ($action === 'update') {
return Url::toRoute(['update', 'id' => $key]); return Url::toRoute(['edit', 'id' => $key]);
}else if ($action === 'delete') { }else if ($action === 'delete') {
return Url::toRoute(['delete', 'id' => $key]); return Url::toRoute(['delete', 'id' => $key]);
} }
......
...@@ -13,9 +13,11 @@ use common\components\ToolsColumn; ...@@ -13,9 +13,11 @@ use common\components\ToolsColumn;
//$this->title = $model->laporan_id; //$this->title = $model->laporan_id;
$this->params['breadcrumbs'][] = ['label' => 'Laporans', 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => 'Laporans', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
$this->params['header'] = 'Detail Laporan';
?> ?>
<div class="laporan-view"> <div class="laporan-view">
<h2><i class="fa fa-list"> List Detail </i></
<div class="page-line"></div>
<h1><?= Html::encode($this->title) ?></h1> <h1><?= Html::encode($this->title) ?></h1>
<?php <?php
...@@ -30,15 +32,11 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -30,15 +32,11 @@ $this->params['breadcrumbs'][] = $this->title;
[ [
'attribute' => 'tanggal', 'attribute' => 'tanggal',
'label' => 'Tanggal', 'label' => 'Tanggal',
//'format' => ['date', 'php:d M Y'],
'filter' => '', 'filter' => '',
], ],
'jam', 'jam',
] ]
]); ]);
// echo $dataProvider->getTotalCount();
?> ?>
......
...@@ -29,6 +29,7 @@ $dataProvider = new ActiveDataProvider([ ...@@ -29,6 +29,7 @@ $dataProvider = new ActiveDataProvider([
$sat2 = $model->tahun; $sat2 = $model->tahun;
$model = Satpam::find()->where(['laporan_id' => $sat])->andwhere(['satpam_id' => $_GET['nip']])->one(); $model = Satpam::find()->where(['laporan_id' => $sat])->andwhere(['satpam_id' => $_GET['nip']])->one();
//$models = gaji::find()->where(['laporan_id' => $_GET['id']])->one(); //$models = gaji::find()->where(['laporan_id' => $_GET['id']])->one();
$total = $model['total_gaji']+$model['gaji_lembur'];
?> ?>
<div> <div>
...@@ -72,47 +73,46 @@ $dataProvider = new ActiveDataProvider([ ...@@ -72,47 +73,46 @@ $dataProvider = new ActiveDataProvider([
<td></td> <td></td>
<td></td> <td></td>
<td></td> <td></td>
<td><br><br><b> POTONGAN<b></td> <td><br><br><b><b></td>
</tr> </tr>
<tr> <tr>
<td>Gaji Pokok</td> <td>Gaji Pokok</td>
<td>=</td> <td>=</td>
<td>&nbsp; &nbsp; &nbsp;Rp. <?php echo $model['total_gaji']?>,-</td> <td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Rp. <?php echo $model['total_gaji']?>,-</td>
<td></td>
<td></td>
<td></td> <td></td>
<td></td> <td></td>
<td></td> <td></td>
<td>Pajak</td>
<td>=</td>
<td></td> <td></td>
<td>&nbsp; &nbsp; &nbsp;-</td> <td>&nbsp; &nbsp; &nbsp;</td>
</tr> </tr>
<tr> <tr>
<td>Gaji Lembur</td> <td>Gaji Lembur</td>
<td>=</td> <td>=</td>
<td>&nbsp; &nbsp; &nbsp;Rp. <?php echo $model['gaji_lembur'];?>,-</td> <td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Rp. <?php echo $model['gaji_lembur'];?>,-</td>
<hr> <hr>
<td></td> <td></td>
<td></td> <td></td>
<td></td> <td></td>
<td>Asuransi</td>
<td>=</td>
<td></td> <td></td>
<td>&nbsp; &nbsp; &nbsp;-</td> <td></td>
<hr> <td></td>
<td>&nbsp; &nbsp; &nbsp;</td>
</tr> </tr>
<tr> <tr>
<td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<b>Total(A)<b></td> <td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<b>Total<b></td>
<td>=</td> <td>=</td>
<td><b>&nbsp;&nbsp;&nbsp;&nbsp;Rp. <?php echo $model['total_gaji']+$model['gaji_lembur']?>,-</b></td> <td><b>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Rp. <?php echo $model['total_gaji']+$model['gaji_lembur']?>,-</b></td>
<td></td> <td></td>
<td></td> <td></td>
<td></td> <td></td>
<td><b>Total(B)<b></td> <td><b><b></td>
<td>=</td> <td></td>
</tr> </tr>
<tr> <tr>
<td><br><br><br><b>Penerimaan Bersih (A - B)</b></td> <td><br><br><br><b>Penerimaan Bersih</b></td>
<td><br><br><br>=</td> <td><br><br><br></td>
<td><br><br><br><b>&nbsp;&nbsp;&nbsp;&nbsp;Rp. <?php echo $model['total_gaji']+$model['gaji_lembur']?>,-</b> </td> <td><br><br><br><b>&nbsp;&nbsp;&nbsp;&nbsp;Rp. <?php echo $model['total_gaji']+$model['gaji_lembur']?>,-</b> </td>
</tr> </tr>
<tr> <tr>
......
...@@ -15,21 +15,18 @@ use backend\modules\ubux\models\Lembur; ...@@ -15,21 +15,18 @@ use backend\modules\ubux\models\Lembur;
//$this->title = $model->laporan_id; //$this->title = $model->laporan_id;
$this->params['breadcrumbs'][] = ['label' => 'Laporans', 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => 'Laporans', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
$this->params['header'] = 'Laporan';
?> ?>
<div class="laporan-view"> <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><?= Html::encode($this->title) ?></h1>
<h1><strong><?php echo $model['bulan']?> <?php echo $model['tahun']?></strong></h1>
<?php <?php
if(!Lembur::find()->where(['laporan_id'=>$model->laporan_id])->exists()){ if(!Lembur::find()->where(['laporan_id'=>$model->laporan_id])->exists()){
\Yii::$app->messenger->addWarningFlash("Masukkan tanggal libur pada ".$model['bulan']." ".$model['tahun']); \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()){ if(!Satpam::find()->where(['laporan_id'=>$model->laporan_id])->exists()){
...@@ -54,14 +51,6 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -54,14 +51,6 @@ $this->params['breadcrumbs'][] = $this->title;
'allModels' => $data, 'allModels' => $data,
]); ]);
// echo GridView::widget([
// 'dataProvider' => $dataProvider,
// 'columns' => [
// 'nama',
// 'nip',
// ]
// ]);
echo GridView::widget([ echo GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'columns' => [ 'columns' => [
...@@ -79,10 +68,18 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -79,10 +68,18 @@ $this->params['breadcrumbs'][] = $this->title;
return ToolsColumn::renderCustomButton($url, $model, 'View Detail', 'fa fa-eye'); return ToolsColumn::renderCustomButton($url, $model, 'View Detail', 'fa fa-eye');
}, },
'total' => function ($url, $model){ '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){ 'lembur' => function ($url, $model){
if ($model->gaji_lembur == null) {
return ToolsColumn::renderCustomButton($url, $model, 'Add Gaji Lembur', 'fa fa-eye'); 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){ 'delete' => function ($url, $model){
return "<li>".Html::a('<span class="fa fa-trash"></span> Hapus', $url, [ return "<li>".Html::a('<span class="fa fa-trash"></span> Hapus', $url, [
...@@ -100,20 +97,27 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -100,20 +97,27 @@ $this->params['breadcrumbs'][] = $this->title;
if ($action === 'view') { if ($action === 'view') {
return Url::toRoute(['view-detail', 'id' => $_GET['id'], 'satpam_id' => $key]); return Url::toRoute(['view-detail', 'id' => $_GET['id'], 'satpam_id' => $key]);
}else if ($action === 'total') { }else if ($action === 'total') {
if ($model->total_gaji == null) {
return Url::toRoute(['satpam/add-gaji', 'id'=> $_GET['id'],'satpam_id' => $key]); 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') { }else if ($action === 'delete') {
return Url::toRoute(['delete', 'id' => $key]); return Url::toRoute(['delete', 'id' => $key]);
}else if ($action === 'print') { }else if ($action === 'print') {
return Url::toRoute(['print', 'id' => $_GET['id'], 'nip' => $key]); return Url::toRoute(['print', 'id' => $_GET['id'], 'nip' => $key]);
}else if ($action === 'lembur'){ }else if ($action === 'lembur'){
if ($model->total_gaji==null) {
return Url::toRoute(['satpam/add-lembur', 'id' => $_GET['id'], 'satpam_id' => $key]); 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;
?> ?>
......
...@@ -15,10 +15,6 @@ $uiHelper = \Yii::$app->uiHelper; ...@@ -15,10 +15,6 @@ $uiHelper = \Yii::$app->uiHelper;
<?php $form = ActiveForm::begin(); ?> <?php $form = ActiveForm::begin(); ?>
<!-- <?= $form->field($model, 'tanggal')->textInput() ?> -->
<?= $form->field($model, 'tanggal')->textarea([ <?= $form->field($model, 'tanggal')->textarea([
'maxlength' => true, 'maxlength' => true,
'id' => 'multidate', 'id' => 'multidate',
......
...@@ -5,7 +5,7 @@ use yii\helpers\Html; ...@@ -5,7 +5,7 @@ use yii\helpers\Html;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Lembur */ /* @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' => 'Lembur', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->tanggal_lembur_id, 'url' => ['view', 'id' => $model->tanggal_lembur_id]]; $this->params['breadcrumbs'][] = ['label' => $model->tanggal_lembur_id, 'url' => ['view', 'id' => $model->tanggal_lembur_id]];
$this->params['breadcrumbs'][] = 'Update'; $this->params['breadcrumbs'][] = 'Update';
......
...@@ -30,11 +30,6 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -30,11 +30,6 @@ $this->params['breadcrumbs'][] = $this->title;
'tanggal', 'tanggal',
'deleted', 'deleted',
'deleted_at', 'deleted_at',
// 'deleted_by',
// 'created_at',
// 'created_by',
// 'updated_at',
// 'updated_by',
['class' => 'yii\grid\ActionColumn'], ['class' => 'yii\grid\ActionColumn'],
], ],
......
...@@ -3,18 +3,18 @@ ...@@ -3,18 +3,18 @@
use yii\helpers\Html; use yii\helpers\Html;
use yii\widgets\ActiveForm; use yii\widgets\ActiveForm;
$gaji=80000;
?> ?>
<div class="laporan-form"> <div class="laporan-form">
<?php $form = ActiveForm::begin(); ?> <?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'total_gaji')->textInput(
[
'maxlength' => true,
<?= $form->field($model, 'total_gaji')->textInput(['maxlength' => true, 'value' => $gaji]); ?> 'placeholder' => "Masukkan Gaji Pokok",
'required' => true,
]); ?>
<div class="form-group"> <div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Add Gaji', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Add Gaji', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
......
...@@ -3,15 +3,18 @@ ...@@ -3,15 +3,18 @@
use yii\helpers\Html; use yii\helpers\Html;
use yii\widgets\ActiveForm; use yii\widgets\ActiveForm;
$gaji=80000;
?> ?>
<div class="laporan-form"> <div class="laporan-form">
<?php $form = ActiveForm::begin(); ?> <?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"> <div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Add Gaji', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Add Gaji', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
......
...@@ -15,35 +15,37 @@ use yii\widgets\ActiveForm; ...@@ -15,35 +15,37 @@ use yii\widgets\ActiveForm;
'method' => 'get', 'method' => 'get',
]); ?> ]); ?>
<?= $form->field($model, 'satpam_id') ?> <?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',
]
)?>
<?= $form->field($model, 'laporan_id') ?> </div>
<div class="col-md-4">
<?= $form->field($model, 'total_gaji') ?> <?= $form->field($model, 'tahun')->dropDownList(
$array,
<?= $form->field($model, 'nip') ?> [
'prompt' => 'Pilih Tahun',
<?= $form->field($model, 'nama') ?> ]
); ?>
<?php // echo $form->field($model, 'status') ?> </div>
</div>
<?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') ?>
<div class="form-group"> <div class="form-group">
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?> <?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -5,7 +5,7 @@ use yii\helpers\Html; ...@@ -5,7 +5,7 @@ use yii\helpers\Html;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Satpam */ /* @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' => 'Satpams', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->satpam_id, 'url' => ['view', 'id' => $model->satpam_id]]; $this->params['breadcrumbs'][] = ['label' => $model->satpam_id, 'url' => ['view', 'id' => $model->satpam_id]];
$this->params['breadcrumbs'][] = 'Update'; $this->params['breadcrumbs'][] = 'Update';
......
...@@ -9,19 +9,20 @@ use common\components\ToolsColumn; ...@@ -9,19 +9,20 @@ use common\components\ToolsColumn;
/* @var $searchModel backend\modules\ubux\models\search\SatpamSearch */ /* @var $searchModel backend\modules\ubux\models\search\SatpamSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Data Satpam Per Bulan dan Tahun';
$this->params['breadcrumbs'][] = $this->title; $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> <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([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, // 'filterModel' => $searchModel,
'columns' => [ 'columns' => [
['class' => 'yii\grid\SerialColumn'], ['class' => 'yii\grid\SerialColumn'],
......
...@@ -37,14 +37,6 @@ $model2 = Laporan::find()->where(['laporan_id' => $id])->one(); ...@@ -37,14 +37,6 @@ $model2 = Laporan::find()->where(['laporan_id' => $id])->one();
'allModels' => $data, 'allModels' => $data,
]); ]);
// echo GridView::widget([
// 'dataProvider' => $dataProvider,
// 'columns' => [
// 'nama',
// 'nip',
// ]
// ]);
echo GridView::widget([ echo GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'columns' => [ 'columns' => [
......
...@@ -129,8 +129,8 @@ $this->beginPage(); ...@@ -129,8 +129,8 @@ $this->beginPage();
<?php <?php
MenuRenderer::renderSidebarMenu(\Yii::$app->params['sidebarMenu']); 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="/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="/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/satpam"><i class="fa fa-circle-o text-red"></i> <span>Data Satpam</span></a></li>
<!-- <li class="header">LABELS</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-red"></i> <span>Important</span></a></li>
<li><a href="#"><i class="fa fa-circle-o text-yellow"></i> <span>Warning</span></a></li> <li><a href="#"><i class="fa fa-circle-o text-yellow"></i> <span>Warning</span></a></li>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment