Skip to content

Instantly share code, notes, and snippets.

View haifahrul's full-sized avatar
💭
Open to work

Ahmad Fakhrurozi S haifahrul

💭
Open to work
View GitHub Profile
@haifahrul
haifahrul / Yii2 Grid Jeasyui - Controller
Created August 23, 2019 03:40
Yii2 Grid Jeasyui - Controller
public function actionGetData()
{
$request = Yii::$app->request;
Yii::$app->getResponse()->format = 'json';
$query = (new \yii\db\Query())
->select('m_unit.*, m_people.*')
->from("m_people")
->leftJoin('m_unit', 'm_unit.id = unit_id');
// searching
if (($q = $request->post('q'))) {
@haifahrul
haifahrul / Yii2 Grid Jeasyui - View
Created August 23, 2019 03:40
Yii2 Grid Jeasyui - View
<table id="dg" class="" toolbar="#dg-toolbar">
<thead data-options="frozen:true">
<th field="ktp" sortable="true" fixed="true" width="120">KTP</th>
<th field="people_name" sortable="true" fixed="true" width="180">Name</th>
<th field="people_gender" sortable="true" fixed="true" width="80" align="center">Gender</th>
</thead>
<thead>
<tr>
<th field="ktp" sortable="true" fixed="true" width="120">KTP</th>
<th field="people_name" sortable="true" fixed="true" width="180">Name</th>
sudo bucardo install
# ADD DATABASE
sudo bucardo add db kitaon_master dbname=kitaon host=localhost
sudo bucardo add db kitaon_slave dbname=kitaon_replica host=localhost
# ADD TABLES
sudo bucardo add all tables db=kitaon_master -T history --herd=master --verbose
sudo bucardo add all tables db=kitaon_master -t history --herd=slave --verbose
@haifahrul
haifahrul / ngx-datatable.scss
Last active February 7, 2019 07:17
ngx-datatable SCSS
@import "../../../shared/styles/colors";
@import "../../../shared/styles/constants";
/**
* Ngx-Datatable
*/
:host /deep/ .ngx-datatable.bootstrap {
margin-bottom: 50px;
box-shadow: none;
font-size: 13px;
@haifahrul
haifahrul / Modal Angular 6.js
Last active February 7, 2019 04:47
Modal Angular 6
# Modal In Angular 6
## Component.ts
// Modal
private id: number;
public action: string;
public title: string;
public modalTitle: string;
public modalReference: NgbModalRef;