Commit 53dbc9a3 by Andre Sihombing

Membuat perhitungan gaji dan laporan

parent 61d58f25
<?php
namespace backend\modules\ubux\controllers;
use Yii;
use backend\modules\ubux\models\Satpam;
use backend\modules\ubux\models\Hrdxpegawai;
use backend\modules\ubux\models\search\SatpamSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use yii\data\ActiveDataProvider;
/**
* SatpamController implements the CRUD actions for Satpam model.
*/
class DataSatpamController extends Controller
{
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
],
],
];
}
/**
* Lists all Satpam models.
* @return mixed
*/
public function actionIndex()
{
$searchModel = new SatpamSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
public function actionViewSatpam()
{
$searchModel = new SatpamSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('view_satpam', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single Satpam model.
* @param integer $id
* @return mixed
*/
public function actionView($id)
{
return $this->render('view', [
'model' => $this->findModel($id),
]);
}
/**
* Creates a new Satpam model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public function actionCreate()
{
$model = new Satpam();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->satpam_id]);
} else {
return $this->render('create', [
'model' => $model,
]);
}
}
/**
* Updates an existing Satpam model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id
* @return mixed
*/
public function actionUpdate($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->satpam_id]);
} else {
return $this->render('update', [
'model' => $model,
]);
}
}
/**
* Deletes an existing Satpam model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
* @return mixed
*/
public function actionDelete($id)
{
$this->findModel($id)->softDelete();
return $this->redirect(['index']);
}
/**
* Finds the Satpam model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param integer $id
* @return Satpam the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id)
{
if (($model = Satpam::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
}
public function showSatpam(){
$id = "satpam";
$dataProvider = new ActiveDataProvider([
'query' => Hrdxpegawai::find()->where("posisi = 'satpam'"),
'pagination' => [
'pageSize' => 20,
],
]);
return $dataProvider;
}
}
......@@ -63,8 +63,14 @@ class GajiController extends Controller
{
$model = new Gaji();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->gaji_id]);
if ($model->load(Yii::$app->request->post())) {
if ($model->validate()) {
$model->save();
return $this->redirect(['view', 'id' => $model->gaji_id]);
}else{
$errors = $model->$errors;
print_r(array_values($errors));
}
} else {
return $this->render('create', [
'model' => $model,
......@@ -185,9 +191,11 @@ class GajiController extends Controller
$model->save();
$baseRow++;
}
Yii::$app->getSession()->setFlash('success','Success');
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']);
}
}
......@@ -195,4 +203,15 @@ class GajiController extends Controller
'modelImport' => $modelImport,
]);
}
public function actionPrint($id)
{
$pdf_content = $this->renderPartial('view-pdf',[
'model' => $this->findModel($id),
]);
$mpdf = new mPDF();
$mpdf->writeHTML($pdf_content);
$mpdf->Output();
exit();
}
}
<?php
namespace backend\modules\ubux\controllers;
use Yii;
use backend\modules\ubux\models\Haha;
use backend\modules\ubux\models\search\HahaSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
/**
* HahaController implements the CRUD actions for Haha model.
*/
class HahaController extends Controller
{
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
],
],
];
}
/**
* Lists all Haha models.
* @return mixed
*/
public function actionIndex()
{
$searchModel = new HahaSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single Haha model.
* @param integer $id
* @return mixed
*/
public function actionView($id)
{
return $this->render('view', [
'model' => $this->findModel($id),
]);
}
/**
* Creates a new Haha model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public function actionCreate()
{
$model = new Haha();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]);
} else {
return $this->render('create', [
'model' => $model,
]);
}
}
/**
* Updates an existing Haha model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id
* @return mixed
*/
public function actionUpdate($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]);
} else {
return $this->render('update', [
'model' => $model,
]);
}
}
/**
* Deletes an existing Haha model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
* @return mixed
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
return $this->redirect(['index']);
}
/**
* Finds the Haha model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param integer $id
* @return Haha the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id)
{
if (($model = Haha::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
}
}
......@@ -4,10 +4,13 @@ namespace backend\modules\ubux\controllers;
use Yii;
use backend\modules\ubux\models\JamKerja;
use backend\modules\ubux\models\Hrdxpegawai;
use backend\modules\ubux\models\search\JamKerjaSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use yii\data\ActiveDataProvider;
/**
* JamKerjaController implements the CRUD actions for JamKerja model.
......@@ -15,7 +18,7 @@ use yii\filters\VerbFilter;
class JamKerjaController extends Controller
{
public function behaviors()
{
{
return [
'verbs' => [
'class' => VerbFilter::className(),
......@@ -98,7 +101,7 @@ class JamKerjaController extends Controller
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
$this->findModel($id)->softDelete();
return $this->redirect(['index']);
}
......@@ -118,4 +121,16 @@ class JamKerjaController extends Controller
throw new NotFoundHttpException('The requested page does not exist.');
}
}
public function showSatpam(){
$id = "satpam";
$dataProvider = new ActiveDataProvider([
'query' => Hrdxpegawai::find()->where("posisi = 'satpam'"),
'pagination' => [
'pageSize' => 20,
],
]);
return $dataProvider;
}
}
......@@ -9,6 +9,7 @@ use backend\modules\ubux\models\search\LaporanSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use mPDF;
/**
* LaporanController implements the CRUD actions for Laporan model.
......@@ -49,8 +50,24 @@ class LaporanController extends Controller
*/
public function actionView($id)
{
return $this->render('view', [
'model' => $this->findModel($id),
$model = Gaji::find()->where(['laporan_id' => $id])->All();
// foreach($model as $data){
// echo $data->laporan_id;
// echo $data->nama;
// }
return $this->render('view',
array('model' => $this->findModel($id), 'gajiModel' => $model)
);
}
public function actionViewDetail($id, $nip)
{
$model = Gaji::find()->where(['laporan_id' => $id])->andWhere(['nip' => $nip])->All();
return $this->render('view-detail',[
'model' => $model,
]);
}
......@@ -99,7 +116,7 @@ class LaporanController extends Controller
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
$this->findModel($id)->softDelete();
return $this->redirect(['index']);
}
......@@ -119,5 +136,27 @@ class LaporanController extends Controller
throw new NotFoundHttpException('The requested page does not exist.');
}
}
public function showAbsen(){
//$id = "satpam";
$dataProvider = new ActiveDataProvider([
'query' => Gaji::find()->where("laporan_id = laporan_id"),
'pagination' => [
'pageSize' => 20,
],
]);
return $dataProvider;
}
public function actionPrint($id)
{
$pdf_content = $this->renderPartial('view-pdf',[
'model' => $this->findModel($id),
]);
$mpdf = new mPDF();
$mpdf->writeHTML($pdf_content);
$mpdf->Output();
exit();
}
}
......@@ -4,11 +4,12 @@ namespace backend\modules\ubux\controllers;
use Yii;
use backend\modules\ubux\models\Satpam;
use backend\modules\ubux\models\Pegawai;
use backend\modules\ubux\models\Hrdxpegawai;
use backend\modules\ubux\models\search\SatpamSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use yii\data\ActiveDataProvider;
/**
* SatpamController implements the CRUD actions for Satpam model.
......@@ -16,7 +17,7 @@ use yii\filters\VerbFilter;
class SatpamController extends Controller
{
public function behaviors()
{
{
return [
'verbs' => [
'class' => VerbFilter::className(),
......@@ -42,6 +43,17 @@ class SatpamController extends Controller
]);
}
public function actionViewSatpam()
{
$searchModel = new SatpamSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('view_satpam', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single Satpam model.
* @param integer $id
......@@ -63,31 +75,8 @@ class SatpamController extends Controller
{
$model = new Satpam();
if ($model->load(Yii::$app->request->post())) {
$Pmodel = new Pegawai();
$Pmodel->nama = $model->nama;
$Pmodel->nip = $model->nip;
$Pmodel->tgl_lahir = $model->tanggalLahir;
$Pmodel->alamat = $model->alamat;
if($Pmodel->save()){
$model->pegawai_id = $Pmodel->pegawai_id;
$model->aktif_star = Yii::$app->formatter->asDate($_POST['Satpam']['aktif_star'], 'yyyy-MM-dd');
$model->aktif_end = Yii::$app->formatter->asDate($_POST['Satpam']['aktif_end'], 'yyyy-MM-dd');
$model->tanggalLahir = Yii::$app->formatter->asDate($_POST['Satpam']['tanggalLahir'], 'yyyy-MM-dd');
if($model->validate()){
// echo $model->aktif_star . " " . $model->aktif_end . " " . $Pmodel->tgl_lahir . " " . $Pmodel->alamat;
$model->save();
return $this->redirect(['view', 'id' => $model->satpam_id]);
}else{
$errors = $model->errors;
print_r(array_values($errors));
}
}else{
$errors = $Pmodel->errors;
print_r(array_values($errors));
}
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->satpam_id]);
} else {
return $this->render('create', [
'model' => $model,
......@@ -122,7 +111,7 @@ class SatpamController extends Controller
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
$this->findModel($id)->softDelete();
return $this->redirect(['index']);
}
......@@ -142,4 +131,16 @@ class SatpamController extends Controller
throw new NotFoundHttpException('The requested page does not exist.');
}
}
public function showSatpam(){
$id = "satpam";
$dataProvider = new ActiveDataProvider([
'query' => Hrdxpegawai::find()->where("posisi = 'satpam'"),
'pagination' => [
'pageSize' => 20,
],
]);
return $dataProvider;
}
}
<?php
namespace backend\modules\ubux\controllers;
use Yii;
use backend\modules\ubux\models\Satpam;
use backend\modules\ubux\models\Hrdxpegawai;
use backend\modules\ubux\models\search\SatpamSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use yii\data\ActiveDataProvider;
/**
* SatpamController implements the CRUD actions for Satpam model.
*/
class SatpamController extends Controller
{
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
],
],
];
}
/**
* Lists all Satpam models.
* @return mixed
*/
public function actionIndex()
{
$searchModel = new SatpamSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('view', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single Satpam model.
* @param integer $id
* @return mixed
*/
public function actionView($id)
{
return $this->render('view', [
'model' => $this->findModel($id),
]);
}
/**
* Creates a new Satpam model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public function actionCreate()
{
$model = new Satpam();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]);
} else {
return $this->render('create', [
'model' => $model,
]);
}
}
/**
* Updates an existing Satpam model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id
* @return mixed
*/
public function actionUpdate($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]);
} else {
return $this->render('update', [
'model' => $model,
]);
}
}
/**
* Deletes an existing Satpam model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
* @return mixed
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
return $this->redirect(['index']);
}
/**
* Finds the Satpam model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param integer $id
* @return Satpam the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id)
{
if (($model = Satpam::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
}
public function showSatpam(){
$id = "satpam";
$dataProvider = new ActiveDataProvider([
'query' => Hrdxpegawai::find()->where("posisi = 'satpam'"),
'pagination' => [
'pageSize' => 20,
],
]);
return $dataProvider;
}
}
<?php
namespace backend\modules\ubux\controllers;
use Yii;
use backend\modules\ubux\models\TotalGaji;
use backend\modules\ubux\models\Laporan;
use backend\modules\ubux\models\Gaji;
use backend\modules\ubux\models\search\TotalGajiSearch;
use yii\data\ArrayDataProvider;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
/**
* TotalGajiController implements the CRUD actions for TotalGaji model.
*/
class TotalGajiController extends Controller
{
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
],
],
];
}
/**
* Lists all TotalGaji models.
* @return mixed
*/
public function actionIndex()
{
$searchModel = new TotalGajiSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single TotalGaji model.
* @param integer $id
* @return mixed
*/
public function actionView($id)
{
// return $this->render('view', [
// 'model' => $this->findModel($id),
// ]);
return $this->redirect(['/ubux/laporan/view', 'id' => $id]);
}
/**
* Creates a new TotalGaji model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public function actionCreate($id, $nip)
{
$model = new TotalGaji();
// $modelSearch = $model->find()->where('nip = '.$id)->one();
$gaji = new Gaji();
$modelCount = $gaji->find()->where('laporan_id = '.$id)->andWhere(['nip' => $nip])->All();
$count = count($modelCount);
if ($model->load(Yii::$app->request->post())) {
$model->laporan_id = $id;
$total_gaji = $count * $model['total_gaji'];
$gajiku = 'Rp.'.$total_gaji;
$model->satpam_id = $nip;
$model->total_gaji = $gajiku;
if ($model->validate()) {
$model->save();
// $modelSearch->save();
return $this->redirect(['view', 'id' => $model->laporan_id]);
} else {
$errors = $model->$errors;
print_r(array_values($errors));
}
} else {
return $this->render('create', [
'model' => $model,
]);
}
}
/**
* Updates an existing TotalGaji model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id
* @return mixed
*/
public function actionUpdate($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->total_id]);
} else {
return $this->render('update', [
'model' => $model,
]);
}
}
/**
* Deletes an existing TotalGaji model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
* @return mixed
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
return $this->redirect(['index']);
}
/**
* Finds the TotalGaji model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param integer $id
* @return TotalGaji the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id)
{
if (($model = TotalGaji::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
}
}
<?php
namespace backend\modules\ubux\controllers;
use Yii;
use backend\modules\ubux\models\Uang;
use backend\modules\ubux\models\search\UangSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
/**
* UangController implements the CRUD actions for Uang model.
*/
class UangController extends Controller
{
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
],
],
];
}
/**
* Lists all Uang models.
* @return mixed
*/
public function actionIndex()
{
$searchModel = new UangSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single Uang model.
* @param string $id
* @return mixed
*/
public function actionView($id)
{
return $this->render('view', [
'model' => $this->findModel($id),
]);
}
/**
* Creates a new Uang model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public function actionCreate()
{
$model = new Uang();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->nip]);
} else {
return $this->render('create', [
'model' => $model,
]);
}
}
/**
* Updates an existing Uang model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param string $id
* @return mixed
*/
public function actionUpdate($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->nip]);
} else {
return $this->render('update', [
'model' => $model,
]);
}
}
/**
* Deletes an existing Uang model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param string $id
* @return mixed
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
return $this->redirect(['index']);
}
/**
* Finds the Uang model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param string $id
* @return Uang the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id)
{
if (($model = Uang::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
}
}
......@@ -15,15 +15,15 @@ use common\behaviors\DeleteBehavior;
* @property string $tanggal_scan
* @property string $tanggal
* @property string $jam
* @property integer $pin
* @property integer $nip
* @property string $pin
* @property string $nip
* @property string $nama
* @property string $jabatan
* @property string $departemen
* @property string $kantor
* @property integer $verifikasi
* @property integer $i_o
* @property integer $workcode
* @property string $verifikasi
* @property string $i_o
* @property string $workcode
* @property string $mesin
* @property integer $deleted
* @property string $deleted_at
......@@ -38,7 +38,7 @@ use common\behaviors\DeleteBehavior;
*/
class Gaji extends \yii\db\ActiveRecord
{
//public $bulanLaporan;
/**
* 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)
......@@ -73,8 +73,8 @@ class Gaji extends \yii\db\ActiveRecord
return [
[['tanggal_scan'], 'required'],
[['tanggal_scan', 'tanggal', 'jam', 'deleted_at', 'created_at', 'updated_at'], 'safe'],
[['pin', 'nip', 'verifikasi', 'i_o', 'workcode', 'deleted', 'laporan_id'], 'integer'],
[['nama', 'jabatan', 'departemen', 'kantor', 'mesin'], 'string', 'max' => 45],
[['deleted', 'laporan_id'], 'integer'],
[['pin', 'nip', 'nama', 'jabatan', 'departemen', 'kantor', 'verifikasi', 'i_o', 'workcode', 'mesin'], 'string', 'max' => 45],
[['deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32],
[['laporan_id'], 'exist', 'skipOnError' => true, 'targetClass' => Laporan::className(), 'targetAttribute' => ['laporan_id' => 'laporan_id']]
];
......
<?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 "ubux_gaji".
*
* @property integer $gaji_id
* @property string $tanggal_scan
* @property string $tanggal
* @property string $jam
* @property integer $pin
* @property integer $nip
* @property string $nama
* @property string $jabatan
* @property string $departemen
* @property string $kantor
* @property integer $verifikasi
* @property integer $i_o
* @property integer $workcode
* @property string $mesin
* @property integer $deleted
* @property string $deleted_at
* @property string $created_at
* @property string $updated_at
* @property string $deleted_by
* @property string $created_by
* @property string $updated_by
* @property integer $laporan_id
*
* @property UbuxLaporan $laporan
*/
class Gaji extends \yii\db\ActiveRecord
{
//public $bulanLaporan;
/**
* 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 'ubux_gaji';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['tanggal_scan'], 'required'],
[['tanggal_scan', 'tanggal', 'jam', 'deleted_at', 'created_at', 'updated_at'], 'safe'],
[['pin', 'nip', 'verifikasi', 'i_o', 'workcode', 'deleted', 'laporan_id'], 'integer'],
[['nama', 'jabatan', 'departemen', 'kantor', 'mesin'], 'string', 'max' => 45],
[['deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32],
[['laporan_id'], 'exist', 'skipOnError' => true, 'targetClass' => Laporan::className(), 'targetAttribute' => ['laporan_id' => 'laporan_id']]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'gaji_id' => 'Gaji ID',
'tanggal_scan' => 'Tanggal Scan',
'tanggal' => 'Tanggal',
'jam' => 'Jam',
'pin' => 'Pin',
'nip' => 'Nip',
'nama' => 'Nama',
'jabatan' => 'Jabatan',
'departemen' => 'Departemen',
'kantor' => 'Kantor',
'verifikasi' => 'Verifikasi',
'i_o' => 'I O',
'workcode' => 'Workcode',
'mesin' => 'Mesin',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
'deleted_by' => 'Deleted By',
'created_by' => 'Created By',
'updated_by' => 'Updated By',
'laporan_id' => 'Laporan ID',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getLaporan()
{
return $this->hasOne(Laporan::className(), ['laporan_id' => 'laporan_id']);
}
}
<?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 "haha".
*
* @property integer $id
* @property string $nip
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_by
* @property string $created_at
* @property string $created_by
* @property string $updated_at
* @property string $updated_by
* @property integer $pegawai_id
*
* @property HrdxPegawai $pegawai
*/
class Haha 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 'haha';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['deleted', 'pegawai_id'], 'integer'],
[['deleted_at', 'created_at', 'updated_at'], 'safe'],
[['nip'], 'string', 'max' => 45],
[['deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32],
[['pegawai_id'], 'exist', 'skipOnError' => true, 'targetClass' => Pegawai::className(), 'targetAttribute' => ['pegawai_id' => 'pegawai_id']]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'nip' => 'Nip',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By',
'created_at' => 'Created At',
'created_by' => 'Created By',
'updated_at' => 'Updated At',
'updated_by' => 'Updated By',
'pegawai_id' => 'Pegawai ID',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getPegawai()
{
return $this->hasOne(HrdxPegawai::className(), ['pegawai_id' => 'pegawai_id']);
}
}
......@@ -88,8 +88,9 @@ use common\behaviors\DeleteBehavior;
* @property PrklCourseUnit[] $prklCourseUnits
* @property PrklKrsMhs[] $prklKrsMhs
* @property UbuxSatpam[] $ubuxSatpams
* @property UbuxSatpamn[] $ubuxSatpamns
*/
class Pegawai extends \yii\db\ActiveRecord
class HrdxPegawai extends \yii\db\ActiveRecord
{
/**
......@@ -141,16 +142,16 @@ class Pegawai extends \yii\db\ActiveRecord
[['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' => User::className(), 'targetAttribute' => ['user_id' => 'user_id']]
/*[['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']]*/
];
}
......@@ -397,6 +398,14 @@ class Pegawai extends \yii\db\ActiveRecord
*/
public function getUbuxSatpams()
{
return $this->hasMany(Satpam::className(), ['pegawai_id' => 'pegawai_id']);
return $this->hasMany(UbuxSatpam::className(), ['pegawai_id' => 'pegawai_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getUbuxSatpamns()
{
return $this->hasMany(UbuxSatpamn::className(), ['pegawai_id' => 'pegawai_id']);
}
}
......@@ -32,7 +32,7 @@ class JamKerja 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(){
public function behaviors(){
return [
'timestamp' => [
'class' => TimestampBehavior::className(),
......@@ -44,7 +44,7 @@ class JamKerja extends \yii\db\ActiveRecord
'class' => DeleteBehavior::className(),
]
];
}*/
}
/**
* @inheritdoc
......@@ -93,7 +93,7 @@ class JamKerja extends \yii\db\ActiveRecord
*/
public function getUbuxGajis()
{
return $this->hasMany(UbuxGaji::className(), ['jam_kerja_id' => 'jam_kerja_id']);
return $this->hasMany(Gaji::className(), ['jam_kerja_id' => 'jam_kerja_id']);
}
/**
......@@ -101,6 +101,6 @@ class JamKerja extends \yii\db\ActiveRecord
*/
public function getSatpam()
{
return $this->hasOne(UbuxSatpam::className(), ['satpam_id' => 'satpam_id']);
return $this->hasOne(Satpam::className(), ['satpam_id' => 'satpam_id']);
}
}
......@@ -13,6 +13,7 @@ use common\behaviors\DeleteBehavior;
*
* @property integer $laporan_id
* @property string $bulan_laporan
* @property string $tahun_laporan
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_by
......@@ -24,6 +25,7 @@ use common\behaviors\DeleteBehavior;
*
* @property UbuxGaji[] $ubuxGajis
* @property UbuxJamKerja $jamKerja
* @property UbuxTotalGaji[] $ubuxTotalGajis
*/
class Laporan extends \yii\db\ActiveRecord
{
......@@ -60,8 +62,8 @@ class Laporan extends \yii\db\ActiveRecord
public function rules()
{
return [
[['laporan_id', 'deleted', 'jam_kerja_id'], 'integer'],
[['laporan_id', 'deleted_at', 'created_at', 'updated_at'], 'safe'],
[['tahun_laporan', 'deleted_at', 'created_at', 'updated_at'], 'safe'],
[['deleted', 'jam_kerja_id'], 'integer'],
[['bulan_laporan'], 'string', 'max' => 45],
[['deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32],
[['jam_kerja_id'], 'exist', 'skipOnError' => true, 'targetClass' => JamKerja::className(), 'targetAttribute' => ['jam_kerja_id' => 'jam_kerja_id']]
......@@ -76,6 +78,7 @@ class Laporan extends \yii\db\ActiveRecord
return [
'laporan_id' => 'Laporan ID',
'bulan_laporan' => 'Bulan Laporan',
'tahun_laporan' => 'Tahun Laporan',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By',
......@@ -90,8 +93,9 @@ class Laporan extends \yii\db\ActiveRecord
/**
* @return \yii\db\ActiveQuery
*/
public function getGaji(){
return $this->hasOne(Gaji::className(), ['laporan_id' => 'laporan_id']);
public function getGaji()
{
return $this->hasMany(Gaji::className(), ['laporan_id' => 'laporan_id']);
}
/**
......@@ -99,6 +103,14 @@ class Laporan extends \yii\db\ActiveRecord
*/
public function getJamKerja()
{
return $this->hasOne(UbuxJamKerja::className(), ['jam_kerja_id' => 'jam_kerja_id']);
return $this->hasOne(JamKerja::className(), ['jam_kerja_id' => 'jam_kerja_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getTotalGaji()
{
return $this->hasMany(TotalGaji::className(), ['laporan_id' => 'laporan_id']);
}
}
<?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 "ubux_laporan".
*
* @property integer $laporan_id
* @property string $bulan_laporan
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_by
* @property string $created_at
* @property string $created_by
* @property string $updated_at
* @property string $updated_by
* @property integer $jam_kerja_id
*
* @property UbuxGaji[] $ubuxGajis
* @property UbuxJamKerja $jamKerja
*/
class Laporan 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 'ubux_laporan';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['laporan_id', 'deleted', 'satpam_id'], 'integer'],
[['laporan_id', 'deleted_at', 'created_at', 'updated_at'], 'safe'],
[['bulan_laporan', 'tahun_laporan'], 'string', 'max' => 45],
[['deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32],
[['satpam_id'], 'exist', 'skipOnError' => true, 'targetClass' => Satpam::className(), 'targetAttribute' => ['satpam_id' => 'satpam_id']]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'laporan_id' => 'Laporan ID',
'bulan_laporan' => 'Bulan Laporan',
'tahun_laporan' => 'Tahun Laporan',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By',
'created_at' => 'Created At',
'created_by' => 'Created By',
'updated_at' => 'Updated At',
'updated_by' => 'Updated By',
'satpam_id' => 'Satpam ID',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getGaji(){
return $this->hasOne(Gaji::className(), ['laporan_id' => 'laporan_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getJamKerja()
{
return $this->hasOne(jamKerja::className(), ['jam_kerja_id' => 'jam_kerja_id']);
}
}
......@@ -12,23 +12,23 @@ use common\behaviors\DeleteBehavior;
* This is the model class for table "ubux_satpam".
*
* @property integer $satpam_id
* @property string $aktif_star
* @property string $aktif_end
* @property integer $pegawai_id
* @property string $nama
* @property string $tgl_lahir
* @property string $alamat
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_by
* @property string $created_at
* @property string $created_by
* @property string $update_at
* @property string $update_by
* @property string $updated_at
* @property string $updated_by
* @property integer $pegawai_id
*
* @property UbuxJamKerja[] $ubuxJamKerjas
* @property HrdxPegawai $pegawai
*/
class Satpam extends \yii\db\ActiveRecord
{
public $nama, $nip, $tanggalLahir, $alamat;
/**
* behaviour to add created_at and updatet_at field with current datetime (timestamp)
......@@ -62,11 +62,11 @@ class Satpam extends \yii\db\ActiveRecord
public function rules()
{
return [
[['aktif_star', 'aktif_end', 'deleted_at', 'created_at', 'updated_at', 'tanggalLahir'], 'safe'],
[['pegawai_id', 'deleted'], 'integer'],
[['deleted_by', 'created_by', 'updated_by', 'nama', 'nip', 'alamat'], 'string', 'max' => 32],
[['tanggalLahir', 'aktif_star', 'aktif_end'], 'date', 'format' => 'yyyy-MM-dd'],
[['pegawai_id'], 'exist', 'skipOnError' => true, 'targetClass' => Pegawai::className(), 'targetAttribute' => ['pegawai_id' => 'pegawai_id']]
[['deleted', 'pegawai_id'], 'integer'],
[['deleted_at', 'created_at', 'updated_at'], 'safe'],
[['nama', 'tgl_lahir', 'alamat'], 'string', 'max' => 45],
[['deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32],
[['pegawai_id'], 'exist', 'skipOnError' => true, 'targetClass' => HrdxPegawai::className(), 'targetAttribute' => ['pegawai_id' => 'pegawai_id']]
];
}
......@@ -77,16 +77,17 @@ class Satpam extends \yii\db\ActiveRecord
{
return [
'satpam_id' => 'Satpam ID',
'aktif_star' => 'Aktif Star',
'aktif_end' => 'Aktif End',
'pegawai_id' => 'Pegawai ID',
'nama' => 'Nama',
'tgl_lahir' => 'Tgl Lahir',
'alamat' => 'Alamat',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By',
'created_at' => 'Created At',
'created_by' => 'Created By',
'updated_at' => 'Update At',
'updated_by' => 'Update By',
'updated_at' => 'Updated At',
'updated_by' => 'Updated By',
'pegawai_id' => 'Pegawai ID',
];
}
......@@ -95,7 +96,7 @@ class Satpam extends \yii\db\ActiveRecord
*/
public function getUbuxJamKerjas()
{
return $this->hasMany(JamKerja::className(), ['satpam_id' => 'satpam_id']);
return $this->hasMany(UbuxJamKerja::className(), ['satpam_id' => 'satpam_id']);
}
/**
......@@ -103,6 +104,6 @@ class Satpam extends \yii\db\ActiveRecord
*/
public function getPegawai()
{
return $this->hasOne(Pegawai::className(), ['pegawai_id' => 'pegawai_id']);
return $this->hasOne(HrdxPegawai::className(), ['pegawai_id' => 'pegawai_id']);
}
}
<?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 "ubux_satpam".
*
* @property integer $id
* @property string $aktif_start
* @property string $aktif_end
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_by
* @property string $created_at
* @property string $created_by
* @property string $updated_at
* @property string $updated_by
* @property integer $pegawai_id
*
* @property HrdxPegawai $pegawai
*/
class Satpam 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 'ubux_satpam';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['aktif_start', 'aktif_end', 'deleted_at', 'created_at', 'updated_at'], 'safe'],
[['deleted', 'pegawai_id'], 'integer'],
[['deleted_by', 'created_by', 'updated_by'], 'string', 'max' => 32],
[['pegawai_id'], 'exist', 'skipOnError' => true, 'targetClass' => HrdxPegawai::className(), 'targetAttribute' => ['pegawai_id' => 'pegawai_id']]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'aktif_start' => 'Aktif Start',
'aktif_end' => 'Aktif End',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By',
'created_at' => 'Created At',
'created_by' => 'Created By',
'updated_at' => 'Updated At',
'updated_by' => 'Updated By',
'pegawai_id' => 'Pegawai ID',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getPegawai()
{
return $this->hasOne(HrdxPegawai::className(), ['pegawai_id' => 'pegawai_id']);
}
}
<?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 "ubux_total_gaji".
*
* @property integer $total_id
* @property string $satpam_id
* @property string $total_gaji
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_by
* @property string $updated_at
* @property string $updated_by
* @property string $created_at
* @property string $created_by
* @property integer $laporan_id
*
* @property UbuxLaporan $laporan
*/
class TotalGaji 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 'ubux_total_gaji';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['deleted', 'laporan_id'], 'integer'],
[['deleted_at', 'updated_at', 'created_at'], 'safe'],
[['satpam_id', 'total_gaji'], 'string', 'max' => 45],
[['deleted_by', 'updated_by', 'created_by'], 'string', 'max' => 32],
[['laporan_id'], 'exist', 'skipOnError' => true, 'targetClass' => Laporan::className(), 'targetAttribute' => ['laporan_id' => 'laporan_id']]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'total_id' => 'Total ID',
'satpam_id' => 'Satpam ID',
'total_gaji' => 'Total Gaji',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By',
'updated_at' => 'Updated At',
'updated_by' => 'Updated By',
'created_at' => 'Created At',
'created_by' => 'Created By',
'laporan_id' => 'Laporan ID',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getLaporan()
{
return $this->hasOne(Laporan::className(), ['laporan_id' => 'laporan_id']);
}
}
<?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 "ubux_total_gaji".
*
* @property integer $total_id
* @property string $total_gaji
* @property integer $deleted
* @property string $deleted_at
* @property string $deleted_by
* @property string $updated_at
* @property string $updated_by
* @property string $created_at
* @property string $created_by
* @property integer $laporan_id
*
* @property UbuxLaporan $laporan
*/
class TotalGaji 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 'ubux_total_gaji';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['deleted', 'laporan_id'], 'integer'],
[['deleted_at', 'updated_at', 'created_at'], 'safe'],
[['total_gaji'], 'string', 'max' => 45],
[['deleted_by', 'updated_by', 'created_by'], 'string', 'max' => 32],
[['laporan_id'], 'exist', 'skipOnError' => true, 'targetClass' => Laporan::className(), 'targetAttribute' => ['laporan_id' => 'laporan_id']]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'total_id' => 'Total ID',
'total_gaji' => 'Total Gaji',
'deleted' => 'Deleted',
'deleted_at' => 'Deleted At',
'deleted_by' => 'Deleted By',
'updated_at' => 'Updated At',
'updated_by' => 'Updated By',
'created_at' => 'Created At',
'created_by' => 'Created By',
'laporan_id' => 'Laporan ID',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getLaporan()
{
return $this->hasOne(Laporan::className(), ['laporan_id' => 'laporan_id']);
}
}
<?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 "gaji".
*
* @property string $nip
* @property string $nama
* @property string $gaji_pokok
* @property string $tunjangan
*/
class Uang 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 'gaji';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['nip'], 'required'],
[['gaji_pokok', 'tunjangan'], 'number'],
[['nip'], 'string', 'max' => 5],
[['nama'], 'string', 'max' => 20]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'nip' => 'Nip',
'nama' => 'Nama',
'gaji_pokok' => 'Gaji Pokok',
'tunjangan' => 'Tunjangan',
];
}
public function totalGaji()
{
$total=$this->gaji_pokok + $this->tunjangan;
return $total;
}
public function pajak()
{
$total=$this->gaji_pokok + $this->tunjangan;
$pajak=$total * 5/100;
return $pajak;
}
public function gajiBersih()
{
return $this->totalGaji() - $this->pajak();
}
}
<?php
namespace backend\modules\ubux\models\search;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\modules\ubux\models\Haha;
/**
* HahaSearch represents the model behind the search form about `backend\modules\ubux\models\Haha`.
*/
class HahaSearch extends Haha
{
/**
* @inheritdoc
*/
public function rules()
{
return [
[['id', 'deleted', 'pegawai_id'], 'integer'],
[['nip', 'deleted_at', 'deleted_by', 'created_at', 'created_by', 'updated_at', 'updated_by'], 'safe'],
];
}
/**
* @inheritdoc
*/
public function scenarios()
{
// bypass scenarios() implementation in the parent class
return Model::scenarios();
}
/**
* Creates data provider instance with search query applied
*
* @param array $params
*
* @return ActiveDataProvider
*/
public function search($params)
{
$query = Haha::find();
$dataProvider = new ActiveDataProvider([
'query' => $query,
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
$query->andFilterWhere([
'id' => $this->id,
'deleted' => $this->deleted,
'deleted_at' => $this->deleted_at,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
'pegawai_id' => $this->pegawai_id,
]);
$query->andFilterWhere(['like', 'nip', $this->nip])
->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'created_by', $this->created_by])
->andFilterWhere(['like', 'updated_by', $this->updated_by]);
return $dataProvider;
}
}
......@@ -41,7 +41,7 @@ class JamKerjaSearch extends JamKerja
*/
public function search($params)
{
$query = JamKerja::find();
$query = JamKerja::find()->where(['deleted' => NULL]);
$dataProvider = new ActiveDataProvider([
'query' => $query,
......
......@@ -19,7 +19,7 @@ class LaporanSearch extends Laporan
{
return [
[['laporan_id', 'deleted', 'jam_kerja_id'], 'integer'],
[['bulan_laporan', 'deleted_at', 'deleted_by', 'created_at', 'created_by', 'updated_at', 'updated_by'], 'safe'],
[['bulan_laporan', 'tahun_laporan', 'deleted_at', 'deleted_by', 'created_at', 'created_by', 'updated_at', 'updated_by'], 'safe'],
];
}
......@@ -41,7 +41,7 @@ class LaporanSearch extends Laporan
*/
public function search($params)
{
$query = Laporan::find();
$query = Laporan::find()->where(['deleted' => NULL]);
$dataProvider = new ActiveDataProvider([
'query' => $query,
......@@ -65,6 +65,7 @@ class LaporanSearch extends Laporan
]);
$query->andFilterWhere(['like', 'bulan_laporan', $this->bulan_laporan])
->andFilterWhere(['like', 'tahun_laporan', $this->tahun_laporan])
->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'created_by', $this->created_by])
->andFilterWhere(['like', 'updated_by', $this->updated_by]);
......
......@@ -18,8 +18,8 @@ class SatpamSearch extends Satpam
public function rules()
{
return [
[['satpam_id', 'pegawai_id', 'deleted'], 'integer'],
[['aktif_star', 'aktif_end', 'deleted_at', 'deleted_by', 'created_at', 'created_by', 'updated_at', 'updated_by'], 'safe'],
[['satpam_id', 'deleted', 'pegawai_id'], 'integer'],
[['nama', 'tgl_lahir', 'alamat', 'deleted_at', 'deleted_by', 'created_at', 'created_by', 'updated_at', 'updated_by'], 'safe'],
];
}
......@@ -41,7 +41,7 @@ class SatpamSearch extends Satpam
*/
public function search($params)
{
$query = Satpam::find();
$query = Satpam::find()->where(['deleted' => NULL]);
$dataProvider = new ActiveDataProvider([
'query' => $query,
......@@ -57,16 +57,17 @@ class SatpamSearch extends Satpam
$query->andFilterWhere([
'satpam_id' => $this->satpam_id,
'aktif_star' => $this->aktif_star,
'aktif_end' => $this->aktif_end,
'pegawai_id' => $this->pegawai_id,
'deleted' => $this->deleted,
'deleted_at' => $this->deleted_at,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
'pegawai_id' => $this->pegawai_id,
]);
$query->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
$query->andFilterWhere(['like', 'nama', $this->nama])
->andFilterWhere(['like', 'tgl_lahir', $this->tgl_lahir])
->andFilterWhere(['like', 'alamat', $this->alamat])
->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'created_by', $this->created_by])
->andFilterWhere(['like', 'updated_by', $this->updated_by]);
......
<?php
namespace backend\modules\ubux\models\search;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\modules\ubux\models\Satpam;
/**
* SatpamSearch represents the model behind the search form about `backend\modules\ubux\models\Satpam`.
*/
class SatpamSearch extends Satpam
{
/**
* @inheritdoc
*/
public function rules()
{
return [
[['satpam_id', 'deleted', 'pegawai_id'], 'integer'],
[['aktif_start', 'aktif_end', 'deleted_at', 'deleted_by', 'created_at', 'created_by', 'updated_at', 'updated_by'], 'safe'],
];
}
/**
* @inheritdoc
*/
public function scenarios()
{
// bypass scenarios() implementation in the parent class
return Model::scenarios();
}
/**
* Creates data provider instance with search query applied
*
* @param array $params
*
* @return ActiveDataProvider
*/
public function search($params)
{
$query = Satpam::find();
$dataProvider = new ActiveDataProvider([
'query' => $query,
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
$query->andFilterWhere([
'id' => $this->id,
'aktif_start' => $this->aktif_start,
'aktif_end' => $this->aktif_end,
'deleted' => $this->deleted,
'deleted_at' => $this->deleted_at,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
'pegawai_id' => $this->pegawai_id,
]);
$query->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'created_by', $this->created_by])
->andFilterWhere(['like', 'updated_by', $this->updated_by]);
return $dataProvider;
}
}
<?php
namespace backend\modules\ubux\models\search;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\modules\ubux\models\TotalGaji;
/**
* TotalGajiSearch represents the model behind the search form about `backend\modules\ubux\models\TotalGaji`.
*/
class TotalGajiSearch extends TotalGaji
{
/**
* @inheritdoc
*/
public function rules()
{
return [
[['total_id', 'deleted', 'laporan_id'], 'integer'],
[['total_gaji', 'deleted_at', 'deleted_by', 'updated_at', 'updated_by', 'created_at', 'created_by'], 'safe'],
];
}
/**
* @inheritdoc
*/
public function scenarios()
{
// bypass scenarios() implementation in the parent class
return Model::scenarios();
}
/**
* Creates data provider instance with search query applied
*
* @param array $params
*
* @return ActiveDataProvider
*/
public function search($params)
{
$query = TotalGaji::find();
$dataProvider = new ActiveDataProvider([
'query' => $query,
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
$query->andFilterWhere([
'total_id' => $this->total_id,
'deleted' => $this->deleted,
'deleted_at' => $this->deleted_at,
'updated_at' => $this->updated_at,
'created_at' => $this->created_at,
'laporan_id' => $this->laporan_id,
]);
$query->andFilterWhere(['like', 'total_gaji', $this->total_gaji])
->andFilterWhere(['like', 'deleted_by', $this->deleted_by])
->andFilterWhere(['like', 'updated_by', $this->updated_by])
->andFilterWhere(['like', 'created_by', $this->created_by]);
return $dataProvider;
}
}
<?php
namespace backend\modules\ubux\models\search;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\modules\ubux\models\Uang;
/**
* UangSearch represents the model behind the search form about `backend\modules\ubux\models\Uang`.
*/
class UangSearch extends Uang
{
/**
* @inheritdoc
*/
public function rules()
{
return [
[['nip', 'nama'], 'safe'],
[['gaji_pokok', 'tunjangan'], 'number'],
];
}
/**
* @inheritdoc
*/
public function scenarios()
{
// bypass scenarios() implementation in the parent class
return Model::scenarios();
}
/**
* Creates data provider instance with search query applied
*
* @param array $params
*
* @return ActiveDataProvider
*/
public function search($params)
{
$query = Uang::find();
$dataProvider = new ActiveDataProvider([
'query' => $query,
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
$query->andFilterWhere([
'gaji_pokok' => $this->gaji_pokok,
'tunjangan' => $this->tunjangan,
]);
$query->andFilterWhere(['like', 'nip', $this->nip])
->andFilterWhere(['like', 'nama', $this->nama]);
return $dataProvider;
}
}
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Satpam */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="satpam-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'nama')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'tgl_lahir')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'alamat')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'deleted')->textInput() ?>
<?= $form->field($model, 'deleted_at')->textInput() ?>
<?= $form->field($model, 'deleted_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'created_at')->textInput() ?>
<?= $form->field($model, 'created_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'updated_at')->textInput() ?>
<?= $form->field($model, 'updated_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'pegawai_id')->textInput() ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\search\SatpamSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="satpam-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
'method' => 'get',
]); ?>
<?= $form->field($model, 'satpam_id') ?>
<?= $form->field($model, 'nama') ?>
<?= $form->field($model, 'tgl_lahir') ?>
<?= $form->field($model, 'alamat') ?>
<?= $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 // echo $form->field($model, 'pegawai_id') ?>
<div class="form-group">
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Satpam */
$this->title = 'Create Satpam';
$this->params['breadcrumbs'][] = ['label' => 'Satpams', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="satpam-create">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
<?php
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\SatpamSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Satpams';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="satpam-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a('Create Satpam', ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'satpam_id',
'nama',
'tgl_lahir',
'alamat',
'deleted',
// 'deleted_at',
// 'deleted_by',
// 'created_at',
// 'created_by',
// 'updated_at',
// 'updated_by',
// 'pegawai_id',
['class' => 'yii\grid\ActionColumn'],
],
]); ?>
</div>
<?php
use yii\helpers\Html;
use backend\modules\ubux\models\HrdxPegawai;
?>
<div class="col-md-12">
<div class="row">
<div class="col-md-4">
<h4><b>Nama</b></h4>
</div>
<div class="col-md-4">
<h4><b>Posisi</b></h4>
</div>
<div class="col-md-4">
<h4><b>Nip</b></h4>
</div>
</div>
<div class="row">
<div class="col-md-4">
<h3><?=$model->nama;?></h3>
</div>
<div class="col-md-4">
<h4><?=$model->posisi;?></h4>
</div>
<div class="col-md-4">
<h4><?=$model->nip;?></h4>
</div>
</div>
</div>
\ No newline at end of file
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Satpam */
$this->title = 'Update 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';
?>
<div class="satpam-update">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Satpam */
$this->title = $model->satpam_id;
$this->params['breadcrumbs'][] = ['label' => 'Satpams', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="satpam-view">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a('Update', ['update', 'id' => $model->satpam_id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Delete', ['delete', 'id' => $model->satpam_id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Are you sure you want to delete this item?',
'method' => 'post',
],
]) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'satpam_id',
'nama',
'tgl_lahir',
'alamat',
'deleted',
'deleted_at',
'deleted_by',
'created_at',
'created_by',
'updated_at',
'updated_by',
'pegawai_id',
],
]) ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
use yii\widgets\listView;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Satpam */
$this->title = 'Data Satpam';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="satpam-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<!-- <p>
<?= Html::a('Create Satpam', ['create'], ['class' => 'btn btn-success']) ?>
</p>
-->
<p>
<?php
echo listView::widget([
'dataProvider'=>$this->context->showSatpam(),
'itemView' => 'list',
]);
?>
</p>
</div>
\ No newline at end of file
......@@ -2,6 +2,8 @@
use yii\helpers\Html;
use yii\grid\GridView;
use yii\helpers\Url;
use common\components\ToolsColumn;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\GajiSearch */
......@@ -48,8 +50,49 @@ $this->params['breadcrumbs'][] = $this->title;
// 'updated_at',
// 'updated_by',
['class' => 'yii\grid\ActionColumn'],
],
['class' => 'common\components\ToolsColumn',
'template' => '{view} {update} {delete}',// {edit} {cancel}',
'header' => 'Aksi',
'buttons' => [
'view' => function ($url, $model){
return ToolsColumn::renderCustomButton($url, $model, 'View Detail', 'fa fa-eye');
},
'update' => function ($url, $model){
return ToolsColumn::renderCustomButton($url, $model, 'Update', 'fa fa-gear');
// if($model->status_oleh_hrd == "Accepted" || $model->status_oleh_hrd == "Rejected")
// return "";
// //return ToolsColumn::renderCustomButton($url, $model, 'Accepts', 'fa fa-check');
// else
// return ToolsColumn::renderCustomButton($url, $model, 'Accept', 'fa fa-check');
},
'delete' => function ($url, $model){
return ToolsColumn::renderCustomButton($url, $model, 'Delete', 'fa fa-trash');
// if($model->status_oleh_hrd == "Rejected" || $model->status_oleh_hrd == "Accepted")
// return "";
// else
// return ToolsColumn::renderCustomButton($url, $model, 'Reject', 'fa fa-close');
},
// 'print' => function ($url, $model){
// return ToolsColumn::renderCustomButton($url, $model, 'Print Form IB', 'fa fa-print');
// }
],
'urlCreator' => function ($action, $model, $key, $index){
if ($action === 'view') {
return Url::toRoute(['view', 'id' => $key]);
}else if ($action === 'update') {
return Url::toRoute(['update', 'id' => $key]);
}else if ($action === 'delete') {
return Url::toRoute(['delete', 'id' => $key]);
}
// else if ($action === 'print') {
// return Url::toRoute(['print-by-mahasiswa', 'id' => $key]);
// }
}
],
],
]); ?>
</div>
<?php
use yii\helpers\Html;
use backend\modules\ubux\models\HrdxPegawai;
?>
<div class="col-md-12">
<!-- <div class="row">
<div class="col-md-4">
<h4><b>Nama</b></h4>
</div>
<div class="col-md-4">
<h4><b>Posisi</b></h4>
</div>
<div class="col-md-4">
<h4><b>Nip</b></h4>
</div>
</div> -->
<div class="row">
<div class="col-md-4">
<h3><?=$model->nama;?></h3>
</div>
<div class="col-md-4">
<h4><?=$model->jabatan;?></h4>
</div>
<div class="col-md-4">
<h4><?=$model->kantor;?></h4>
</div>
</div>
</div>
\ No newline at end of file
<?php
1<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
......
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Haha */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="haha-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'nip')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'deleted')->textInput() ?>
<?= $form->field($model, 'deleted_at')->textInput() ?>
<?= $form->field($model, 'deleted_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'created_at')->textInput() ?>
<?= $form->field($model, 'created_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'updated_at')->textInput() ?>
<?= $form->field($model, 'updated_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'pegawai_id')->textInput() ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\search\HahaSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="haha-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
'method' => 'get',
]); ?>
<?= $form->field($model, 'id') ?>
<?= $form->field($model, 'nip') ?>
<?= $form->field($model, 'deleted') ?>
<?= $form->field($model, 'deleted_at') ?>
<?= $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 // echo $form->field($model, 'pegawai_id') ?>
<div class="form-group">
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Haha */
$this->title = 'Create Haha';
$this->params['breadcrumbs'][] = ['label' => 'Hahas', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="haha-create">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
<?php
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\HahaSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Hahas';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="haha-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a('Create Haha', ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'id',
'nip',
'deleted',
'deleted_at',
'deleted_by',
// 'created_at',
// 'created_by',
// 'updated_at',
// 'updated_by',
// 'pegawai_id',
['class' => 'yii\grid\ActionColumn'],
],
]); ?>
</div>
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Haha */
$this->title = 'Update Haha: ' . ' ' . $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Hahas', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->id, 'url' => ['view', 'id' => $model->id]];
$this->params['breadcrumbs'][] = 'Update';
?>
<div class="haha-update">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Haha */
$this->title = $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Hahas', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="haha-view">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Delete', ['delete', 'id' => $model->id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Are you sure you want to delete this item?',
'method' => 'post',
],
]) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'id',
'nip',
'deleted',
'deleted_at',
'deleted_by',
'created_at',
'created_by',
'updated_at',
'updated_by',
'pegawai_id',
],
]) ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
use yii\widgets\listView;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\JamKerjaSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
/* @var $model backend\modules\ubux\models\Satpam */
$this->title = 'Jam Kerjas';
$this->title = 'Data Satpam';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="jam-kerja-index">
<div class="satpam-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a('Create Jam Kerja', ['create'], ['class' => 'btn btn-success']) ?>
<?= Html::a('Create Satpam', ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
......@@ -25,19 +27,60 @@ $this->params['breadcrumbs'][] = $this->title;
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'jam_kerja_id',
'total_absen',
'satpam_id',
'deleted',
'deleted_at',
//'satpam_id',
'total_absen',
//'deleted',
// 'deleted_at',
// 'deleted_by',
// 'created_at',
// 'updated_at',
// 'created_by',
// 'updated_at',
// 'updated_by',
// 'pegawai_id',
['class' => 'common\components\ToolsColumn',
'template' => '{view} {update} {delete}',// {edit} {cancel}',
'header' => 'Aksi',
'buttons' => [
'view' => function ($url, $model){
return ToolsColumn::renderCustomButton($url, $model, 'View Detail', 'fa fa-eye');
},
'update' => function ($url, $model){
return ToolsColumn::renderCustomButton($url, $model, 'Update', 'fa fa-gear');
// if($model->status_oleh_hrd == "Accepted" || $model->status_oleh_hrd == "Rejected")
// return "";
// //return ToolsColumn::renderCustomButton($url, $model, 'Accepts', 'fa fa-check');
// else
// return ToolsColumn::renderCustomButton($url, $model, 'Accept', 'fa fa-check');
},
// 'delete' => function ($url, $model){
// return ToolsColumn::renderCustomButton($url, $model, 'Delete', 'fa fa-trash');
// // if($model->status_oleh_hrd == "Rejected" || $model->status_oleh_hrd == "Accepted")
// return "";
// else
// return ToolsColumn::renderCustomButton($url, $model, 'Reject', 'fa fa-close');
//},
// 'print' => function ($url, $model){
// return ToolsColumn::renderCustomButton($url, $model, 'Print Form IB', 'fa fa-print');
// }
],
'urlCreator' => function ($action, $model, $key, $index){
if ($action === 'view') {
return Url::toRoute(['view', 'id' => $key]);
}else if ($action === 'update') {
return Url::toRoute(['update', 'id' => $key]);
}else if ($action === 'delete') {
return Url::toRoute(['delete', 'id' => $key]);
}
// else if ($action === 'print') {
// return Url::toRoute(['print-by-mahasiswa', 'id' => $key]);
// }
}
['class' => 'yii\grid\ActionColumn'],
],
],
],
]); ?>
</div>
</div>
\ No newline at end of file
<?php
use yii\helpers\Html;
use backend\modules\ubux\models\HrdxPegawai;
?>
<div class="col-md-12">
<div class="row">
<div class="col-md-4">
<h3><?=$model->nama;?></h3>
</div>
<div class="col-md-4">
<h4><?=$model->tempat_lahir;?></h4>
</div>
<div class="col-md-4">
<h4><?=$model->nip;?></h4>
</div>
</div>
</div>
\ No newline at end of file
......@@ -2,6 +2,7 @@
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\jui\DatePicker;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Laporan */
......@@ -12,10 +13,22 @@ use yii\widgets\ActiveForm;
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'bulan_laporan')->textInput(['maxlength' => true]) ?>
<?php
$thn = date('Y');
foreach(range(2002-2, $thn) as $i) {
$array[] = $i;
}
?>
<?= $form->field($model, 'bulan_laporan')->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, 'tahun_laporan')->dropDownList(
$array, ['prompt' => 'Pilih Tahun']
); ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
......
......@@ -2,6 +2,8 @@
use yii\helpers\Html;
use yii\grid\GridView;
use yii\helpers\Url;
use common\components\ToolsColumn;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\LaporanSearch */
......@@ -27,6 +29,7 @@ $this->params['breadcrumbs'][] = $this->title;
// 'laporan_id',
'bulan_laporan',
'tahun_laporan',
// 'deleted',
// 'deleted_at',
// 'deleted_by',
......@@ -36,8 +39,51 @@ $this->params['breadcrumbs'][] = $this->title;
// 'updated_by',
// 'jam_kerja_id',
['class' => 'yii\grid\ActionColumn'],
],
//['class' => 'yii\grid\ActionColumn'],
['class' => 'common\components\ToolsColumn',
'template' => '{view} {update} {delete}',// {edit} {cancel}',
'header' => 'Aksi',
'buttons' => [
'view' => function ($url, $model){
return ToolsColumn::renderCustomButton($url, $model, 'View Detail', 'fa fa-eye');
},
'update' => function ($url, $model){
return ToolsColumn::renderCustomButton($url, $model, 'Update', 'fa fa-gear');
// if($model->status_oleh_hrd == "Accepted" || $model->status_oleh_hrd == "Rejected")
// return "";
// //return ToolsColumn::renderCustomButton($url, $model, 'Accepts', 'fa fa-check');
// else
// return ToolsColumn::renderCustomButton($url, $model, 'Accept', 'fa fa-check');
},
'delete' => function ($url, $model){
return "<li>".Html::a('<span class="fa fa-trash"></span> Hapus', $url, [
'title' => Yii::t('yii', 'Hapus'),
'data-confirm' => Yii::t('yii', 'Apakah anda ingin menghapus ?'),
'data-method' => 'post',
'data-pjax' => '0',
])."</li>";
},
// 'print' => function ($url, $model){
// return ToolsColumn::renderCustomButton($url, $model, 'Print Form IB', 'fa fa-print');
// }
],
'urlCreator' => function ($action, $model, $key, $index){
if ($action === 'view') {
return Url::toRoute(['view', 'id' => $key]);
}else if ($action === 'update') {
return Url::toRoute(['update', 'id' => $key]);
}else if ($action === 'delete') {
return Url::toRoute(['delete', 'id' => $key]);
}
// else if ($action === 'print') {
// return Url::toRoute(['print-by-mahasiswa', 'id' => $key]);
// }
}
],
],
]); ?>
</div>
<?php
use yii\helpers\Html;
use backend\modules\ubux\models\Gaji;
?>
<div class="col-md-12">
<!-- <div class="row">
<div class="col-md-4">
<h4><b>Nama</b></h4>
</div>
<div class="col-md-4">
<h4><b>Posisi</b></h4>
</div>
<div class="col-md-4">
<h4><b>Nip</b></h4>
</div>
</div> -->
<div class="row">
<div class="col-md-4">
<h3><?=$model->nama;?></h3>
</div>
<div class="col-md-4">
<h4><?=$model->nip;?></h4>
</div>
</div>
</div>
\ No newline at end of file
......@@ -5,7 +5,7 @@ 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 = 'Update Laporan: ' . ' ' . $model->laporan_id;
$this->params['breadcrumbs'][] = ['label' => 'Laporans', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->laporan_id, 'url' => ['view', 'id' => $model->laporan_id]];
$this->params['breadcrumbs'][] = 'Update';
......
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
use yii\grid\GridView;
use yii\data\ArrayDataProvider;
use yii\helpers\Url;
use common\components\ToolsColumn;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Laporan */
//$this->title = $model->laporan_id;
$this->params['breadcrumbs'][] = ['label' => 'Laporans', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="laporan-view">
<h1><?= Html::encode($this->title) ?></h1>
<?php
$dataProvider = new ArrayDataProvider([
'allModels' => $model,
]);
echo GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
'nama',
[
'attribute' => 'tanggal',
'label' => 'Tanggal',
'format' => ['date', 'php:d M Y'],
'filter' => '',
],
'jam',
'laporan.totalGaji.total_gaji',
]
]);
echo $dataProvider->getTotalCount();
?>
</div>
\ No newline at end of file
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
use yii\data\ActiveDataProvider;
use backend\modules\ubux\models\Laporan;
use yii\grid\GridView;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $model backend\modules\rppx\models\RppxRencanaPengajaran */
$uiHelper=\Yii::$app->uiHelper;
$this->title = 'kontrak kerja';
$this->params['breadcrumbs'][] = $this->title;
$dataProvider = new ActiveDataProvider([
'query' => laporan::find()->where("laporan_id = " . $model->laporan_id),
'pagination' => [
'pageSize' => 20,
],
]);
?>
<div class="rppx-rencana-pengajaran-view">
<table style="width: 100%">
<tr>
<th></th>
<td style="text-align: center">
<div>
<h3>INSTITUT TEKNOLOGI DEL</h3>
<p>
Jl. Sisingamangaraja, Laguboti 22381<br>
Toba Samosir, Sumatera Utara, Laguboti, 22381<br>
Telp : (0634) 331234, Fax : (0632) 331116<br>
<u>info@del.ac.id, www.del.ac.id</u>
</p>
</div>
</td>
</tr>
</table>
<hr>
<h2 style="text-align: center;"><?= Html::encode($this->title) ?></h2>
<table style="margin-left: 10px">
<tr>
<td>Saya yang bertanda tangan dibawah ini</td>
</tr>
<tr>
<td>Nama</td>
<td>:</td>
<td></td>
</tr>
<tr>
<td>Email</td>
<td>:</td>
</tr>
<tr>
<td>NIP</td>
<td>:</td>
</tr>
<br>
<tr>
<td colspan="6">Dengan ini menyetujui pengalokasian pengajaran sebagai berikut : </td>
</tr>
<br>
<tr>
<td>
<?= GridView::widget([
'dataProvider' => $dataProvider,
//'filterModel' => $searchModel,
'summary' => '',
'columns' => [
// ['class' => 'yii\grid\SerialColumn'],
['label'=>'Kode',
'value'=>'bulan_laporan'
],
],
]); ?>
</td>
</tr>
<br>
<tr>
<td>Demikian surat ini dibuat untuk dipergunakan sepenuhnya.</td>
</tr>
<br><Br>
<tr>
<td colspan="6" style="text-align: center">Diketahui</td>
</tr>
<br>
<tr>
<td>Kaprodi</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>Dosen</td>
<td></td>
</tr>
<br><br><br><Br><br><br>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</div>
......@@ -2,11 +2,16 @@
use yii\helpers\Html;
use yii\widgets\DetailView;
use yii\grid\GridView;
use yii\data\ArrayDataProvider;
use yii\helpers\Url;
use common\components\ToolsColumn;
use backend\modules\ubux\models\Gaji;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Laporan */
$this->title = $model->laporan_id;
//$this->title = $model->laporan_id;
$this->params['breadcrumbs'][] = ['label' => 'Laporans', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
......@@ -15,31 +20,109 @@ $this->params['breadcrumbs'][] = $this->title;
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a('Update', ['update', 'id' => $model->laporan_id], ['class' => 'btn btn-primary']) ?>
<!-- <?= Html::a('Update', ['update', 'id' => $model->laporan_id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Delete', ['delete', 'id' => $model->laporan_id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Are you sure you want to delete this item?',
'method' => 'post',
],
]) ?>
]) ?> -->
<?= Html::a('Import', ['gaji/import', 'id' => $model->laporan_id], ['class' => 'btn btn-info']) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
//'laporan_id',
'bulan_laporan',
/*'deleted',
'deleted_at',
'deleted_by',
'created_at',
'created_by',
'updated_at',
'updated_by',
'jam_kerja_id',*/
],
]) ?>
<?php
$count = 0;
$data = array();
foreach ($gajiModel as $obj) {
$data[$obj->nip] = $obj;
}
foreach ($data as $key) {
$count++;
}
$dataProvider = new ArrayDataProvider([
'allModels' => $data,
]);
// echo GridView::widget([
// 'dataProvider' => $dataProvider,
// 'columns' => [
// 'nama',
// 'nip',
// ]
// ]);
echo GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'nama',
'laporan.totalGaji.total_gaji',
// [
// 'attribute' => 'laporan.totalGaji.total_id',
// 'value' => 'laporan.totalGaji.total_id',
// ],
['class' => 'common\components\ToolsColumn',
'template' => '{view} {update} {total} {print} ',// {edit} {cancel}',
'header' => 'Aksi',
'buttons' => [
'view' => function ($url, $model){
return ToolsColumn::renderCustomButton($url, $model, 'View Detail', 'fa fa-eye');
},
'total' => function ($url, $model){
return ToolsColumn::renderCustomButton($url, $model, 'Total', 'fa fa-eye');
},
'delete' => function ($url, $model){
return "<li>".Html::a('<span class="fa fa-trash"></span> Hapus', $url, [
'title' => Yii::t('yii', 'Legitimate'),
'data-confirm' => Yii::t('yii', 'Are you sure to legitimate the program ?'),
'data-method' => 'post',
'data-pjax' => '0',
])."</li>";
},
// 'update' => function ($url, $model){
// return ToolsColumn::renderCustomButton($url, $model, 'Update', 'fa fa-gear');
// if($model->status_oleh_hrd == "Accepted" || $model->status_oleh_hrd == "Rejected")
// return "";
// //return ToolsColumn::renderCustomButton($url, $model, 'Accepts', 'fa fa-check');
// else
// return ToolsColumn::renderCustomButton($url, $model, 'Accept', 'fa fa-check');
// },
// 'delete' => function ($url, $model){
// return ToolsColumn::renderCustomButton($url, $model, 'Delete', 'fa fa-trash');
// if($model->status_oleh_hrd == "Rejected" || $model->status_oleh_hrd == "Accepted")
// return "";
// else
// return ToolsColumn::renderCustomButton($url, $model, 'Reject', 'fa fa-close');
//},
'print' => function ($url, $model){
return ToolsColumn::renderCustomButton($url, $model, 'Print Gaji', 'fa fa-print');
},
],
'urlCreator' => function ($action, $model, $key, $index){
if ($action === 'view') {
return Url::toRoute(['view-detail', 'id' => $_GET['id'], 'nip' => $key]);
}else if ($action === 'total') {
return Url::toRoute(['total-gaji/create', 'id' => $_GET['id'], 'nip' => $key]);
}else if ($action === 'delete') {
return Url::toRoute(['delete', 'id' => $key]);
}
else if ($action === 'print') {
return Url::toRoute(['print', 'id' => $_GET['id']]);
}
}
],
],
]);
echo "<br>" . $count;
?>
</div>
......@@ -2,7 +2,6 @@
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\jui\DatePicker;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Satpam */
......@@ -13,29 +12,27 @@ use yii\jui\DatePicker;
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'nama')->textInput() ?>
<?= $form->field($model, 'nama')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'aktif_star')->widget(\yii\jui\DatePicker::classname(), [
'language' => 'id',
'dateFormat' => 'yyyy-MM-dd',
]) ?>
<?= $form->field($model, 'tgl_lahir')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'aktif_end')->widget(\yii\jui\DatePicker::classname(), [
'language' => 'id',
'dateFormat' => 'yyyy-MM-dd',
]) ?>
<?= $form->field($model, 'alamat')->textInput(['maxlength' => true]) ?>
<!-- <?= $form->field($model, 'deleted')->textInput() ?>
<?= $form->field($model, 'nip')->textInput() ?>
<?= $form->field($model, 'deleted_at')->textInput() ?>
<?= $form->field($model, 'alamat')->textInput() ?>
<?= $form->field($model, 'deleted_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'tanggalLahir')->widget(\yii\jui\DatePicker::classname(), [
'language' => 'id',
'dateFormat' => 'yyyy-MM-dd',
])
?>
<?= $form->field($model, 'created_at')->textInput() ?>
<?= $form->field($model, 'created_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'updated_at')->textInput() ?>
<?= $form->field($model, 'updated_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'pegawai_id')->textInput() ?> -->
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
......
......@@ -17,11 +17,11 @@ use yii\widgets\ActiveForm;
<?= $form->field($model, 'satpam_id') ?>
<?= $form->field($model, 'aktif_star') ?>
<?= $form->field($model, 'nama') ?>
<?= $form->field($model, 'aktif_end') ?>
<?= $form->field($model, 'tgl_lahir') ?>
<?= $form->field($model, 'pegawai_id') ?>
<?= $form->field($model, 'alamat') ?>
<?= $form->field($model, 'deleted') ?>
......@@ -33,9 +33,11 @@ use yii\widgets\ActiveForm;
<?php // echo $form->field($model, 'created_by') ?>
<?php // echo $form->field($model, 'update_at') ?>
<?php // echo $form->field($model, 'updated_at') ?>
<?php // echo $form->field($model, 'update_by') ?>
<?php // echo $form->field($model, 'updated_by') ?>
<?php // echo $form->field($model, 'pegawai_id') ?>
<div class="form-group">
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
......
......@@ -2,6 +2,8 @@
use yii\helpers\Html;
use yii\grid\GridView;
use yii\helpers\Url;
use common\components\ToolsColumn;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\SatpamSearch */
......@@ -23,17 +25,64 @@ $this->params['breadcrumbs'][] = $this->title;
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
// /['class' => 'yii\grid\SerialColumn'],
['class' => 'yii\grid\SerialColumn'],
'pegawai.nama',
'pegawai.nip',
'pegawai.alamat',
'aktif_star',
'aktif_end',
//'satpam_id',
'nama',
'tgl_lahir',
'alamat',
//'deleted',
// 'deleted_at',
// 'deleted_by',
// 'created_at',
// 'created_by',
// 'updated_at',
// 'updated_by',
// 'pegawai_id',
['class' => 'yii\grid\ActionColumn'],
],
['class' => 'common\components\ToolsColumn',
'template' => '{view} {update} {delete}',// {edit} {cancel}',
'header' => 'Aksi',
'buttons' => [
'view' => function ($url, $model){
return ToolsColumn::renderCustomButton($url, $model, 'View Detail', 'fa fa-eye');
},
'update' => function ($url, $model){
return ToolsColumn::renderCustomButton($url, $model, 'Update', 'fa fa-gear');
// if($model->status_oleh_hrd == "Accepted" || $model->status_oleh_hrd == "Rejected")
// return "";
// //return ToolsColumn::renderCustomButton($url, $model, 'Accepts', 'fa fa-check');
// else
// return ToolsColumn::renderCustomButton($url, $model, 'Accept', 'fa fa-check');
},
// 'delete' => function ($url, $model){
// return ToolsColumn::renderCustomButton($url, $model, 'Delete', 'fa fa-trash');
// // if($model->status_oleh_hrd == "Rejected" || $model->status_oleh_hrd == "Accepted")
// return "";
// else
// return ToolsColumn::renderCustomButton($url, $model, 'Reject', 'fa fa-close');
//},
// 'print' => function ($url, $model){
// return ToolsColumn::renderCustomButton($url, $model, 'Print Form IB', 'fa fa-print');
// }
],
'urlCreator' => function ($action, $model, $key, $index){
if ($action === 'view') {
return Url::toRoute(['view', 'id' => $key]);
}else if ($action === 'update') {
return Url::toRoute(['update', 'id' => $key]);
}else if ($action === 'delete') {
return Url::toRoute(['delete', 'id' => $key]);
}
// else if ($action === 'print') {
// return Url::toRoute(['print-by-mahasiswa', 'id' => $key]);
// }
}
],
],
]); ?>
</div>
<?php
use yii\helpers\Html;
use backend\modules\ubux\models\HrdxPegawai;
?>
<div class="col-md-12">
<div class="row">
<div class="col-md-4">
<h3><?=$model->nama;?></h3>
</div>
<div class="col-md-4">
<h4><?=$model->tempat_lahir;?></h4>
</div>
<div class="col-md-4">
<h4><?=$model->nip;?></h4>
</div>
</div>
</div>
\ No newline at end of file
......@@ -29,13 +29,9 @@ $this->params['breadcrumbs'][] = $this->title;
'model' => $model,
'attributes' => [
//'satpam_id',
'pegawai.nama',
'pegawai.nip',
'pegawai.tgl_lahir',
'pegawai.alamat',
'aktif_star',
'aktif_end',
//'pegawai_id',
'nama',
'tgl_lahir',
'alamat',
// 'deleted',
// 'deleted_at',
// 'deleted_by',
......@@ -43,6 +39,7 @@ $this->params['breadcrumbs'][] = $this->title;
// 'created_by',
// 'updated_at',
// 'updated_by',
// 'pegawai_id',
],
]) ?>
......
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
use yii\widgets\listView;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Satpam */
$this->title = 'Data Satpam';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="satpam-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<!-- <p>
<?= Html::a('Create Satpam', ['create'], ['class' => 'btn btn-success']) ?>
</p>
-->
<p>
<?php
echo listView::widget([
'dataProvider'=>$this->context->showSatpam(),
'itemView' => 'list',
]);
?>
</p>
</div>
\ No newline at end of file
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Satpam */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="satpam-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'aktif_start')->textInput() ?>
<?= $form->field($model, 'aktif_end')->textInput() ?>
<?= $form->field($model, 'deleted')->textInput() ?>
<?= $form->field($model, 'deleted_at')->textInput() ?>
<?= $form->field($model, 'deleted_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'created_at')->textInput() ?>
<?= $form->field($model, 'created_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'updated_at')->textInput() ?>
<?= $form->field($model, 'updated_by')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'pegawai_id')->textInput() ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\search\SatpamSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="satpam-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
'method' => 'get',
]); ?>
<?= $form->field($model, 'id') ?>
<?= $form->field($model, 'aktif_start') ?>
<?= $form->field($model, 'aktif_end') ?>
<?= $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 // echo $form->field($model, 'pegawai_id') ?>
<div class="form-group">
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Satpam */
$this->title = 'Create Satpam';
$this->params['breadcrumbs'][] = ['label' => 'Satpams', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="satpam-create">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
<?php
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\SatpamSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Satpams';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="satpam-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a('Create Satpam', ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'id',
'aktif_start',
'aktif_end',
'deleted',
'deleted_at',
// 'deleted_by',
// 'created_at',
// 'created_by',
// 'updated_at',
// 'updated_by',
// 'pegawai_id',
['class' => 'yii\grid\ActionColumn'],
],
]); ?>
</div>
<?php
use yii\helpers\Html;
use backend\modules\ubux\models\HrdxPegawai;
?>
<div class="col-md-12">
<div class="row">
<div class="col-md-4">
<h4><b>Nama</b></h4>
</div>
<div class="col-md-4">
<h4><b>Posisi</b></h4>
</div>
<div class="col-md-4">
<h4><b>Nip</b></h4>
</div>
</div>
<div class="row">
<div class="col-md-4">
<h3><?=$model->nama;?></h3>
</div>
<div class="col-md-4">
<h4><?=$model->posisi;?></h4>
</div>
<div class="col-md-4">
<h4><?=$model->nip;?></h4>
</div>
</div>
</div>
\ No newline at end of file
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Satpam */
$this->title = 'Update Satpam: ' . ' ' . $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Satpams', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->id, 'url' => ['view', 'id' => $model->id]];
$this->params['breadcrumbs'][] = 'Update';
?>
<div class="satpam-update">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
use yii\widgets\listView;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Satpam */
$this->title = 'Data Satpam';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="satpam-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<!-- <p>
<?= Html::a('Create Satpam', ['create'], ['class' => 'btn btn-success']) ?>
</p>
-->
<p>
<?php
echo listView::widget([
'dataProvider'=>$this->context->showSatpam(),
'itemView' => 'list',
]);
?>
</p>
</div>
\ No newline at end of file
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\TotalGaji */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="total-gaji-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'total_gaji')->textInput(['maxlength' => true]) ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\search\TotalGajiSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="total-gaji-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
'method' => 'get',
]); ?>
<?= $form->field($model, 'total_id') ?>
<?= $form->field($model, 'total_gaji') ?>
<?= $form->field($model, 'deleted') ?>
<?= $form->field($model, 'deleted_at') ?>
<?= $form->field($model, 'deleted_by') ?>
<?php // echo $form->field($model, 'updated_at') ?>
<?php // echo $form->field($model, 'updated_by') ?>
<?php // echo $form->field($model, 'created_at') ?>
<?php // echo $form->field($model, 'created_by') ?>
<?php // echo $form->field($model, 'laporan_id') ?>
<div class="form-group">
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\TotalGaji */
$this->title = 'Create Total Gaji';
$this->params['breadcrumbs'][] = ['label' => 'Total Gajis', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="total-gaji-create">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
<?php
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\TotalGajiSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Total Gajis';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="total-gaji-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a('Create Total Gaji', ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
// 'total_id',
'total_gaji',
// 'deleted',
// 'deleted_at',
// 'deleted_by',
// 'updated_at',
// 'updated_by',
// 'created_at',
// 'created_by',
// 'laporan_id',
['class' => 'yii\grid\ActionColumn'],
],
]); ?>
</div>
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\TotalGaji */
$this->title = 'Update Total Gaji: ' . ' ' . $model->total_id;
$this->params['breadcrumbs'][] = ['label' => 'Total Gajis', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->total_id, 'url' => ['view', 'id' => $model->total_id]];
$this->params['breadcrumbs'][] = 'Update';
?>
<div class="total-gaji-update">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\TotalGaji */
$this->title = $model->total_id;
$this->params['breadcrumbs'][] = ['label' => 'Total Gajis', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="total-gaji-view">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a('Update', ['update', 'id' => $model->total_id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Delete', ['delete', 'id' => $model->total_id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Are you sure you want to delete this item?',
'method' => 'post',
],
]) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
//'total_id',
'total_gaji',
/*'deleted',
'deleted_at',
'deleted_by',
'updated_at',
'updated_by',
'created_at',
'created_by',
'laporan_id',*/
],
]) ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Uang */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="uang-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'nip')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'nama')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'gaji_pokok')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'tunjangan')->textInput(['maxlength' => true]) ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\search\UangSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="uang-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
'method' => 'get',
]); ?>
<?= $form->field($model, 'nip') ?>
<?= $form->field($model, 'nama') ?>
<?= $form->field($model, 'gaji_pokok') ?>
<?= $form->field($model, 'tunjangan') ?>
<div class="form-group">
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Uang */
$this->title = 'Create Uang';
$this->params['breadcrumbs'][] = ['label' => 'Uangs', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="uang-create">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
<?php
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\ubux\models\search\UangSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Uangs';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="uang-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a('Create Uang', ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'nip',
'nama',
'gaji_pokok',
'tunjangan',
['class' => 'yii\grid\ActionColumn'],
],
]); ?>
</div>
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Uang */
$this->title = 'Update Uang: ' . ' ' . $model->nip;
$this->params['breadcrumbs'][] = ['label' => 'Uangs', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->nip, 'url' => ['view', 'id' => $model->nip]];
$this->params['breadcrumbs'][] = 'Update';
?>
<div class="uang-update">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model backend\modules\ubux\models\Uang */
$this->title = $model->nip;
$this->params['breadcrumbs'][] = ['label' => 'Uangs', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="uang-view">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a('Update', ['update', 'id' => $model->nip], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Delete', ['delete', 'id' => $model->nip], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Are you sure you want to delete this item?',
'method' => 'post',
],
]) ?>
</p>
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'gaji-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
'nip',
'nama',
array(
'name'=>'nip',
'type'=>'raw',
'header'=>'Gaji Pokok',
'value'=>'CHtml::encode(number_format($data->gaji_pokok,2))',
'htmlOptions'=>array('width'=>'','style'=>'text-align:right'),
),
array(
'name'=>'nip',
'type'=>'raw',
'header'=>'Tunjangan',
'value'=>'CHtml::encode(number_format($data->tunjangan,2))',
'htmlOptions'=>array('width'=>'','style'=>'text-align:right'),
),
array(
'name'=>'nip',
'type'=>'raw',
'header'=>'Jumlah Gaji',
'value'=>'CHtml::encode(number_format($data->totalGaji(),2))',
'htmlOptions'=>array('width'=>'','style'=>'text-align:right'),
),
array(
'name'=>'nip',
'type'=>'raw',
'header'=>'Pajak',
'value'=>'CHtml::encode(number_format($data->pajak(),2))',
'htmlOptions'=>array('width'=>'','style'=>'text-align:right'),
),
array(
'name'=>'nip',
'type'=>'raw',
'header'=>'gaji Bersih',
'value'=>'CHtml::encode(number_format($data->gajiBersih(),2))',
'htmlOptions'=>array('width'=>'','style'=>'text-align:right'),
),
array(
'class'=>'CButtonColumn',
),
),
)); ?>
</div>
......@@ -129,8 +129,9 @@ $this->beginPage();
<?php
MenuRenderer::renderSidebarMenu(\Yii::$app->params['sidebarMenu']);
?>
<li><a href="/cis-lite/backend/web/index.php/ubux/laporan"><i class="fa fa-circle-o text-red"></i> <span>Buat Laporan</span></a></li>
<li><a href="/cis-lite/backend/web/index.php/ubux/satpam"><i class="fa fa-circle-o text-red"></i> <span>Olah 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>Satpam Training</span></a></li>
<li><a href="/cis-lite/backend/web/index.php/ubux/jam-kerja"><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>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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