From d93833e38f70c460eea997a0ecbdf834c26466b5 Mon Sep 17 00:00:00 2001
From: elvanowen <vanzz_95@hotmail.com>
Date: Mon, 16 May 2016 18:14:37 +0700
Subject: [PATCH] Everything

---
 salaryman/app/views/statistics/index.volt   |  2 +-
 salaryman/public/js/salaryman/statistics.js | 11 +++++++----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/salaryman/app/views/statistics/index.volt b/salaryman/app/views/statistics/index.volt
index c93be79..eac459b 100644
--- a/salaryman/app/views/statistics/index.volt
+++ b/salaryman/app/views/statistics/index.volt
@@ -14,7 +14,7 @@
       <div class="col-xs-12">
         <div class="panel panel-default">
           <div class="panel-heading font-bold" style="color:#009688 !important; font-size:1.3em">
-            Tunjangan Performansi Per Golongan
+            Tunjangan Performansi Per Golongan Bulan 
           </div>
           <div style="padding:30px 50px">
             <canvas id="canvas" height="100"></canvas>
diff --git a/salaryman/public/js/salaryman/statistics.js b/salaryman/public/js/salaryman/statistics.js
index 34ca3df..59852d1 100644
--- a/salaryman/public/js/salaryman/statistics.js
+++ b/salaryman/public/js/salaryman/statistics.js
@@ -35,18 +35,15 @@ $(function () {
     var randomScalingFactor = function(){ return Math.round(Math.random()*100)};
 
     function generateGraph(month, year){
-    	alert("kampret")
-
   		$.ajax({
         type: "GET",
         url: window.location.origin + "/k2/kepegawaian/salaryman/Statistics/y/" + year + "/m/" + month,
         dataType: "json",
         success: function(response){
         	console.log(response)
-        	alert("kampret2")
 
           var barChartData = {
-            labels : ["Golongan 1", "Golongan 2", "Golongan 3", "Golongan 4",],
+            labels : ["Golongan 1", "Golongan 2", "Golongan 3", "Golongan 4"],
             datasets : [
               {
                 fillColor : ColorLuminance("#009688", -0.1),
@@ -62,6 +59,12 @@ $(function () {
           window.myBar = new Chart(ctx).Bar(barChartData, {
             responsive : true
           });
+
+          var month = $("#datepicker1").data('datepicker').getFormattedDate('MM');
+
+          if (month == "") month = "May"
+
+          $('.panel-heading').text("Tunjangan Performansi Per Golongan Bulan " + month);
         }
       })
     }
-- 
GitLab