Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -16,12 +16,12 @@
}
</script>-->

<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- <link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet"> -->

<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
<link href="css/ionic.app.css" rel="stylesheet">
-->
<link href="css/ionic.app.css" rel="stylesheet">

<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js"></script>
@@ -39,7 +39,7 @@
<script src="js/services.js"></script>
</head>
<body ng-app="ionicApp">
<ion-nav-bar class="bar-positive">
<ion-nav-bar class="bar-balanced">
<ion-nav-back-button class="button-icon ion-arrow-left-c">
</ion-nav-back-button>
</ion-nav-bar>
@@ -67,72 +67,8 @@





<script id="templates/facts.html" type="text/ng-template">
<ion-view view-title="Facts">
<ion-content padding="true">
<p>Banging your head against a wall uses 150 calories an hour.</p>
<p>Dogs have four toes on their hind feet, and five on their front feet.</p>
<p>The ant can lift 50 times its own weight, can pull 30 times its own weight and always falls over on its right side when intoxicated.</p>
<p>A cockroach will live nine days without it's head, before it starves to death.</p>
<p>Polar bears are left handed.</p>
<p>
<a class="button icon ion-home" href="#/tab/home"> Home</a>
<a class="button icon icon-right ion-chevron-right" href="#/tab/facts2">More Facts</a>
</p>
</ion-content>
</ion-view>
</script>

<script id="templates/facts2.html" type="text/ng-template">
<ion-view view-title="Also Factual">
<ion-content padding="true">
<p>111,111,111 x 111,111,111 = 12,345,678,987,654,321</p>
<p>1 in every 4 Americans has appeared on T.V.</p>
<p>11% of the world is left-handed.</p>
<p>1 in 8 Americans has worked at a McDonalds restaurant.</p>
<p>$283,200 is the absolute highest amount of money you can win on Jeopardy.</p>
<p>101 Dalmatians, Peter Pan, Lady and the Tramp, and Mulan are the only Disney cartoons where both parents are present and don't die throughout the movie.</p>
<p>
<a class="button icon ion-home" href="#/tab/home"> Home</a>
<a class="button icon ion-chevron-left" href="#/tab/facts"> Scientific Facts</a>
</p>
</ion-content>
</ion-view>
</script>

<script id="templates/about.html" type="text/ng-template">
<ion-view view-title="About">
<ion-content padding="true">
<h3>Create hybrid mobile apps with the web technologies you love.</h3>
<p>Free and open source, Ionic offers a library of mobile-optimized HTML, CSS and JS components for building highly interactive apps.</p>
<p>Built with Sass and optimized for AngularJS.</p>
<p>
<a class="button icon icon-right ion-chevron-right" href="#/tab/navstack">Tabs Nav Stack</a>
</p>
</ion-content>
</ion-view>
</script>
<script id="templates/contact.html" type="text/ng-template">
<ion-view view-title="About">
<ion-content padding="true">
<h3>Contact</h3>
<p>Free and open source, Ionic offers a library of mobile-optimized HTML, CSS and JS components for building highly interactive apps.</p>
<p>Built with Sass and optimized for AngularJS.</p>
<p>
<a class="button icon icon-right ion-chevron-right" href="#/tab/navstack">Tabs Nav Stack</a>
</p>
</ion-content>
</ion-view>
</script>
<script id="templates/nav-stack.html" type="text/ng-template">
<ion-view view-title="Tab Nav Stack">
<ion-content padding="true">
<p><img src="https://ionicframework.com/img/diagrams/tabs-nav-stack.png" style="width:100%"></p>
</ion-content>
</ion-view>
</script>

</body>
</html>
@@ -1,6 +1,6 @@
angular.module('ionicApp', ['ionic','ionicApp.controllers','firebase'])
angular.module('ionicApp', ['ionic','ionicApp.controllers','firebase','ionicApp.services'])

.config(function($stateProvider, $urlRouterProvider) {
.config(function($stateProvider, $urlRouterProvider,$ionicConfigProvider) {

var config = {
apiKey: "AIzaSyA7fi06i9Yga8aR5VmqVQqeCgo-gX98pdw",
@@ -12,7 +12,7 @@ angular.module('ionicApp', ['ionic','ionicApp.controllers','firebase'])
};
firebase.initializeApp(config);
var defaultAuth = firebase.auth();

$ionicConfigProvider.views.maxCache(0);
$stateProvider
.state('signin', {
url: '/sign-in',
@@ -33,52 +33,67 @@ angular.module('ionicApp', ['ionic','ionicApp.controllers','firebase'])
views: {
'home-tab': {
templateUrl: 'templates/tabscontent/home.html',
controller: 'HomeTabCtrl'
}
}
})
.state('tabs.facts', {
url: '/facts',
views: {
'home-tab': {
templateUrl: 'templates/facts.html'
controller: 'HomeTabCtrl',
resolve: {
// controller will not be loaded until $requireSignIn resolves
// Auth refers to our $firebaseAuth wrapper in the factory below
"currentAuth": ["Auth", function(Auth) {
// $requireSignIn returns a promise so the resolve waits for it to complete
// If the promise is rejected, it will throw a $stateChangeError (see above)
return Auth.$requireSignIn();
}]
}
}
}
})
.state('tabs.facts2', {
url: '/facts2',
.state('tabs.pemasukan', {
url: '/pemasukan',
views: {
'home-tab': {
templateUrl: 'templates/facts2.html'
'pemasukan-tab': {
templateUrl: 'templates/tabscontent/pemasukan.html',
controller:"pemasukanCtrl",
resolve: {
// controller will not be loaded until $requireSignIn resolves
// Auth refers to our $firebaseAuth wrapper in the factory below
"currentAuth": ["Auth", function(Auth) {
// $requireSignIn returns a promise so the resolve waits for it to complete
// If the promise is rejected, it will throw a $stateChangeError (see above)
return Auth.$requireSignIn();
}]
}
}
}
})
.state('tabs.about', {
url: '/about',
.state('tabs.setting', {
url: '/setting',
views: {
'about-tab': {
templateUrl: 'templates/about.html'
'setting-tab': {
templateUrl: 'templates/tabscontent/setting.html',
controller:"settingCtrl",
resolve: {
// controller will not be loaded until $requireSignIn resolves
// Auth refers to our $firebaseAuth wrapper in the factory below
"currentAuth": ["Auth", function(Auth) {
// $requireSignIn returns a promise so the resolve waits for it to complete
// If the promise is rejected, it will throw a $stateChangeError (see above)
return Auth.$requireSignIn();
}]
}
}
}
})
.state('tabs.navstack', {
url: '/navstack',
views: {
'about-tab': {
templateUrl: 'templates/nav-stack.html'
}
}
})
.state('tabs.contact', {
url: '/contact',
views: {
'contact-tab': {
templateUrl: 'templates/contact.html'
}
}
});


$urlRouterProvider.otherwise('/sign-in');

});
$urlRouterProvider.otherwise('/tab/home');

})
.run(["$rootScope", "$state", function($rootScope, $state) {
$rootScope.$on("$stateChangeError", function(event, toState, toParams, fromState, fromParams, error) {
// We can catch the error thrown when the $requireSignIn promise is rejected
// and redirect the user back to the home page
if (error === "AUTH_REQUIRED") {
$state.go("signin");
}
});
}]);
@@ -1,21 +1,21 @@
angular.module('ionicApp.controllers', [])


.controller('SignInCtrl', function($scope, $state,$firebaseAuth) {
.controller('SignInCtrl', function($scope, $state,$firebaseAuth,Auth) {
checklogin($scope, $state,$firebaseAuth);

$scope.user = {};
var auth = $firebaseAuth();
$scope.signIn = function(user) {
console.log('Sign-In', user);
// $state.go('tabs.home');
console.log($firebaseAuth);

var username = $scope.user.username;
var password = $scope.user.password;
auth.$signInWithEmailAndPassword(username,password).then(function(user){
Auth.$signInWithEmailAndPassword(username,password).then(function(user){
console.log(user);
console.log(user.uid);
checklogin($scope, $state,$firebaseAuth);
},function(err){
console.log(err);
alert("Failed: "+err.message);
})
};
$scope.register = function(user) {
@@ -24,61 +24,275 @@ angular.module('ionicApp.controllers', [])
console.log($firebaseAuth);
var username = $scope.user.username;
var password = $scope.user.password;
auth.$createUserWithEmailAndPassword(username,password).then(function(user){
Auth.$createUserWithEmailAndPassword(username,password).then(function(user){
console.log(user);
var kasRef = firebase.database().ref().child("users").child(user.uid).child("kassekarang");
kasRef.set(0).then(function(scalbck){
console.log(scalbck);
},function(err){
console.log(err);
})
checklogin($scope, $state,$firebaseAuth);
},function(err){
console.log(err);
alert("Failed: "+err.message);
})
};

})

.controller('HomeTabCtrl', function($scope,$firebaseAuth,$firebaseArray) {
$scope.isnew = false;
.controller('pemasukanCtrl', function($scope,$firebaseAuth,$firebaseArray,Auth,$state) {
$scope.isNew = false;
$scope.totalPengeluaranHariIni = 0;
$scope.totalPengeluaranBulanIni = 0;
$scope.totalPengeluaranTahunIni = 0;
$scope.kasSekarang = 0;

$scope.signOut = function(){
Auth.$signOut();
checklogin($scope, $state,$firebaseAuth);
$state.go("signin");
}



var date = new Date();
var keluarharian = date.getDate()+""+(date.getMonth()+1)+""+date.getFullYear();
var keluarbulanan = (date.getMonth()+1)+""+date.getFullYear();
var keluartahunan = date.getFullYear();

$scope.pengeluaran = {};

$scope.showDetailHarian = false;
$scope.showDetailBulanan = false;
$scope.showDetailTahunan = false;
var uid= firebase.auth().currentUser.uid;
var kasRef = firebase.database().ref().child("users").child(uid).child("kassekarang");
kasRef.on("value",function(snapshot){
console.log(snapshot.val());
$scope.kasSekarang = snapshot.val();
$scope.$apply();
});
var pengeluaranharianRef = firebase.database().ref().child("users").child(uid).child("masuk/harian/"+keluarharian);
var pengeluaranharianObj = $firebaseArray(pengeluaranharianRef);
$scope.pengeluaranharianObj = pengeluaranharianObj;

var pengeluaranbulananRef = firebase.database().ref().child("users").child(uid).child("masuk/bulanan/"+keluarbulanan);
var pengeluaranbulananObj = $firebaseArray(pengeluaranbulananRef);
$scope.pengeluaranbulananObj = pengeluaranbulananObj;

var pengeluarantahunanRef = firebase.database().ref().child("users").child(uid).child("masuk/tahunan/"+keluartahunan);
var pengeluarantahunanObj = $firebaseArray(pengeluarantahunanRef);
$scope.pengeluarantahunanObj = pengeluarantahunanObj;

$scope.newPengeluaran = function(){
pengeluaranharianObj.$add($scope.pengeluaran);
pengeluaranbulananObj.$add($scope.pengeluaran);
pengeluarantahunanObj.$add($scope.pengeluaran);

$scope.totalPengeluaranHariIni = parseInt($scope.totalPengeluaranHariIni) + parseInt($scope.pengeluaran.jumlah);
$scope.totalPengeluaranBulanIni = parseInt($scope.totalPengeluaranBulanIni) + parseInt($scope.pengeluaran.jumlah);
$scope.totalPengeluaranTahunIni = parseInt($scope.totalPengeluaranTahunIni) + parseInt($scope.pengeluaran.jumlah);

var pengeluaranharianRef = firebase.database().ref().child("users").child(uid).child("keluar/harian/"+keluarharian);
var pengeluaranharianObj = $firebaseArray(pengeluaranharianRef);

var pengeluaranbulananRef = firebase.database().ref().child("users").child(uid).child("keluar/bulanan/"+keluarbulanan);
var pengeluaranbulananObj = $firebaseArray(pengeluaranbulananRef);

var pengeluarantahunanRef = firebase.database().ref().child("users").child(uid).child("keluar/tahunan/"+keluartahunan);
var pengeluarantahunanObj = $firebaseArray(pengeluarantahunanRef);
var ks = parseInt($scope.kasSekarang) + parseInt($scope.pengeluaran.jumlah);
kasRef.set(ks);
$scope.pengeluaran = {};
$scope.isNew=!$scope.isNew;

}

$scope.newPengeluaran = function(){
pengeluaranharianObj.$loaded()
.then(function(x) {
// x === list; // true
console.log(x);
angular.forEach(pengeluaranharianObj, function(value, key) {
console.log(value.jumlah)
$scope.totalPengeluaranHariIni = $scope.totalPengeluaranHariIni + parseInt(value.jumlah);
});
})
.catch(function(error) {
console.log("Error:", error);
});

pengeluaranbulananObj.$loaded()
.then(function(x) {
// x === list; // true
console.log(x);
angular.forEach(pengeluaranbulananObj, function(value, key) {
console.log(value.jumlah)
$scope.totalPengeluaranBulanIni = $scope.totalPengeluaranBulanIni + parseInt(value.jumlah);
});
})
.catch(function(error) {
console.log("Error:", error);
});

pengeluarantahunanObj.$loaded()
.then(function(x) {
// x === list; // true
console.log(x);
angular.forEach(pengeluarantahunanObj, function(value, key) {
console.log(value.jumlah)
$scope.totalPengeluaranTahunIni = $scope.totalPengeluaranTahunIni + parseInt(value.jumlah);
});
})
.catch(function(error) {
console.log("Error:", error);
});

// var bulanantotal = parseInt(total) + $scope.pengeluaran.jumlah;
// var tahunantotal = parseInt(total) + $scope.pengeluaran.jumlah;
if(pengeluaranharianObj.$resolved){
var totalhariansekarang = 0;
if(typeof pengeluaranharianObj["total"]!='undefined'){
totalhariansekarang = pengeluaranharianObj["total"];
}
console.log(pengeluaranharianObj.total);
pengeluaranharianObj.$add($scope.pengeluaran);
var hariantotal = parseInt(totalhariansekarang) + $scope.pengeluaran.jumlah;
pengeluaranharianRef.update({total:hariantotal});
console.log(pengeluaranharianObj);
}
$scope.listpengeluaranhariini = pengeluaranharianObj;
$scope.listpengeluaranbulanini = pengeluaranbulananObj;
$scope.listpengeluarantahunini = pengeluarantahunanObj;
$scope.detailHarian = function(){
$scope.showDetailHarian = !$scope.showDetailHarian;
console.log("kadalll");
}
})
.controller('HomeTabCtrl', function($scope,$firebaseAuth,$firebaseArray,Auth,$state) {
$scope.$on("$ionicView.beforeEnter", function(event) {

$scope.isNew = false;
$scope.totalPengeluaranHariIni = 0;
$scope.totalPengeluaranBulanIni = 0;
$scope.totalPengeluaranTahunIni = 0;
$scope.kasSekarang = 0
$scope.isloadingtotaltaharian = true;
$scope.isloadingtotaltabulanan = true;
$scope.isloadingtotaltahunan = true;
$scope.signOut = function(){
Auth.$signOut();
checklogin($scope, $state,$firebaseAuth);
$state.go("signin");
}



var date = new Date();
var keluarharian = date.getDate()+""+(date.getMonth()+1)+""+date.getFullYear();
var keluarbulanan = (date.getMonth()+1)+""+date.getFullYear();
var keluartahunan = date.getFullYear();

$scope.pengeluaran = {};
$scope.showDetailHarian = false;
$scope.showDetailBulanan = false;
$scope.showDetailTahunan = false;
var uid= firebase.auth().currentUser.uid;
var kasRef = firebase.database().ref().child("users").child(uid).child("kassekarang");
kasRef.on("value",function(snapshot){
console.log(snapshot.val());
$scope.kasSekarang = snapshot.val();
$scope.$apply();
});

var pengeluaranharianRef = firebase.database().ref().child("users").child(uid).child("keluar/harian/"+keluarharian);
var pengeluaranharianObj = $firebaseArray(pengeluaranharianRef);
$scope.pengeluaranharianObj = pengeluaranharianObj;

var pengeluaranbulananRef = firebase.database().ref().child("users").child(uid).child("keluar/bulanan/"+keluarbulanan);
var pengeluaranbulananObj = $firebaseArray(pengeluaranbulananRef);
$scope.pengeluaranbulananObj = pengeluaranbulananObj;

var pengeluarantahunanRef = firebase.database().ref().child("users").child(uid).child("keluar/tahunan/"+keluartahunan);
var pengeluarantahunanObj = $firebaseArray(pengeluarantahunanRef);
$scope.pengeluarantahunanObj = pengeluarantahunanObj;

$scope.newPengeluaran = function(){
pengeluaranharianObj.$add($scope.pengeluaran);
pengeluaranbulananObj.$add($scope.pengeluaran);
pengeluarantahunanObj.$add($scope.pengeluaran);

$scope.totalPengeluaranHariIni = $scope.totalPengeluaranHariIni + parseInt($scope.pengeluaran.jumlah);
$scope.totalPengeluaranBulanIni = $scope.totalPengeluaranBulanIni + parseInt($scope.pengeluaran.jumlah);
$scope.totalPengeluaranTahunIni = $scope.totalPengeluaranTahunIni + parseInt($scope.pengeluaran.jumlah);


var ks = $scope.kasSekarang - parseInt($scope.pengeluaran.jumlah);
kasRef.set(ks);

pengeluaranbulananObj.$add($scope.pengeluaran);
pengeluarantahunanObj.$add($scope.pengeluaran);

$scope.pengeluaran = {};
$scope.isNew=!$scope.isNew;

}

pengeluaranharianObj.$loaded()
.then(function(x) {
// x === list; // true
console.log(x);
angular.forEach(pengeluaranharianObj, function(value, key) {
console.log(value.jumlah)
$scope.totalPengeluaranHariIni = $scope.totalPengeluaranHariIni + parseInt(value.jumlah);
$scope.isloadingtotaltaharian = false;
});
})
.catch(function(error) {
console.log("Error:", error);
});

pengeluaranbulananObj.$loaded()
.then(function(x) {
// x === list; // true
console.log(x);
angular.forEach(pengeluaranbulananObj, function(value, key) {
console.log(value.jumlah)
$scope.totalPengeluaranBulanIni = $scope.totalPengeluaranBulanIni + parseInt(value.jumlah);
$scope.isloadingtotaltabulanan = false;
});
})
.catch(function(error) {
console.log("Error:", error);
});

pengeluarantahunanObj.$loaded()
.then(function(x) {
// x === list; // true
console.log(x);
angular.forEach(pengeluarantahunanObj, function(value, key) {
console.log(value.jumlah)
$scope.totalPengeluaranTahunIni = $scope.totalPengeluaranTahunIni + parseInt(value.jumlah);
$scope.isloadingtotaltahunan = false;
});
})
.catch(function(error) {
console.log("Error:", error);
});

$scope.listpengeluaranhariini = pengeluaranharianObj;
$scope.listpengeluaranbulanini = pengeluaranbulananObj;
$scope.listpengeluarantahunini = pengeluarantahunanObj;
$scope.detailHarian = function(){
$scope.showDetailHarian = !$scope.showDetailHarian;
console.log("kadalll");
}
});
})
.controller("settingCtrl",function($scope,$state,Auth,$firebaseArray,$firebaseAuth){
var uid=firebase.auth().currentUser.uid;
var kasRef = firebase.database().ref().child("users").child(uid).child("kassekarang");
$scope.kas = {};
kasRef.on("value",function(snapshot){
console.log(snapshot.val());
$scope.kasSekarang = snapshot.val();
if(!$scope.$$phase) {
$scope.$apply();
//$digest or $apply
}
$scope.kas = {};
});

$scope.setKas = function(kas){
kasRef.set($scope.kas.kassekarang).then(function(snapshot){
console.log("Berhasil Diubah");
});
}

$scope.signOut = function(){
Auth.$signOut();
checklogin($scope, $state,$firebaseAuth);
$state.go("signin");
}


});

function checklogin($scope,$state,$firebaseAuth){
@@ -88,7 +302,6 @@ function checklogin($scope,$state,$firebaseAuth){
console.log(user);
$state.go('tabs.home');
} else {
$state.go('/sign-in');
console.log("gagal kadal");
}
});
@@ -1,5 +1,7 @@
angular.module('starter.services', [])

angular.module('ionicApp.services', [])
.factory("Auth",function($firebaseAuth){
return $firebaseAuth();
})
.factory('Chats', function() {
// Might use a resource here that returns a JSON array

@@ -0,0 +1,27 @@
<ion-view view-title="Login">
<ion-content>
<div class="list">
<label class="item item-input">
<span class="input-label">Username</span>
<input type="text" ng-model="user.username">
</label>
<label class="item item-input">
<span class="input-label">Password</span>
<input type="password" ng-model="user.password">
</label>
</div>
<div class="padding">
<div class="button-group">
<button class="button button-block button-positive" ng-click="signIn(user)">
Login
</button>
<button class="button button-block button-positive" ng-click="register(user)">
Daftar
</button>
</div>
<p class="text-center">
<a href="#/forgot-password">Forgot password</a>
</p>
</div>
</ion-content>
</ion-view>
@@ -1,15 +1,16 @@
<ion-view>
<ion-tabs class="tabs-icon-top tabs-positive">
<ion-tabs class="tabs-icon-top tabs-balanced">

<ion-tab title="Home" icon="ion-home" href="#/tab/home">
<ion-tab title="Pengeluaran" icon="ion-log-out" href="#/tab/home">
<ion-nav-view name="home-tab"></ion-nav-view>
</ion-tab>

<ion-tab title="About" icon="ion-ios-information" href="#/tab/about">
<ion-nav-view name="about-tab"></ion-nav-view>
<ion-tab title="Pemasukan" icon="ion-log-in" href="#/tab/pemasukan">
<ion-nav-view name="pemasukan-tab"></ion-nav-view>
</ion-tab>

<ion-tab title="Sign-Out" icon="ion-log-out" href="#/sign-in">
<ion-tab title="Setting" icon="ion-ios-gear" href="#/tab/setting">
<ion-nav-view name="setting-tab"></ion-nav-view>
</ion-tab>

</ion-tabs>
@@ -0,0 +1,96 @@

<ion-view view-title="Pengeluaran">
<ion-content padding="true">
<h3>Kas Sekarang {{kasSekarang | currency : "Rp."}}</h3>
<button class="button button-balanced button-block" ng-click="isNew=!isNew">Tambah</button>






<div class="list card padding" ng-show="isNew">
<label class="item item-input">
<span class="input-label">Nama Pengeluaran</span>
<input type="text" ng-model="pengeluaran.judulpengeluaran">
</label>
<label class="item item-input">
<span class="input-label">Jumlah</span>
<input type="number" ng-model="pengeluaran.jumlah" value="0">
</label>
<div class="button-group">
<button class="button button-calm" ng-click="isNew = !isNew">Selesai</button>
<button class="item button button-balanced" ng-click="newPengeluaran()">
Simpan
</button>
</div>
</div>

<div class="card" ng-click="detailHarian()">
<div class="item item-divider">
Hari Ini
</div>
<div class="item item-text-wrap">
<span ng-if="!pengeluaranharianObj.$resolved">Loading...</span>
<span ng-if="pengeluaranharianObj.$resolved">{{totalPengeluaranHariIni | currency : "Rp."}}</span>
</div>
</div>
<div class="card" ng-if="showDetailHarian">
<div class="item item-divider">
Pengeluaran Hari Ini
</div>
<div class="item item-text-wrap" ng-repeat="hari in listpengeluaranhariini track by $index">
{{hari.judulpengeluaran}}

<span class="item-note">
Rp.{{hari.jumlah}}
</span>
</div>
</div>

<div class="card" ng-click="showDetailBulanan = !showDetailBulanan">
<div class="item item-divider">
Bulan Ini
</div>
<div class="item item-text-wrap">
<span ng-if="!pengeluaranbulananObj.$resolved">Loading...</span>
<span ng-if="pengeluaranbulananObj.$resolved">{{totalPengeluaranBulanIni | currency : "Rp."}}</span>
</div>
</div>
<div class="card" ng-if="showDetailBulanan">
<div class="item item-divider">
Pengeluaran Bulan Ini
</div>
<div class="item item-text-wrap" ng-repeat="hari in listpengeluaranbulanini track by $index">
{{hari.judulpengeluaran}}

<span class="item-note">
Rp.{{hari.jumlah}}
</span>
</div>
</div>

<div class="card" ng-click="showDetailTahunan = !showDetailTahunan">
<div class="item item-divider">
Tahun Ini
</div>
<div class="item item-text-wrap">
<span ng-if="!pengeluarantahunanObj.$resolved">Loading...</span>
<span ng-if="pengeluarantahunanObj.$resolved">{{totalPengeluaranTahunIni | currency : "Rp."}}</span>
</div>
</div>
<div class="card" ng-if="showDetailTahunan">
<div class="item item-divider">
Pengeluaran Tahun Ini
</div>
<div class="item item-text-wrap" ng-repeat="hari in totalPengeluaranTahunIni track by $index">
{{hari.judulpengeluaran}}

<span class="item-note">
Rp.{{hari.jumlah}}
</span>
</div>
</div>

</ion-content>
</ion-view>
@@ -0,0 +1,94 @@
<ion-view view-title="Pemasukan">
<ion-content padding="true">
<h3>Kas Sekarang {{kasSekarang | currency : "Rp."}}</h3>
<button class="button button-balanced button-block" ng-click="isNew=!isNew">Tambah</button>






<div class="list card padding" ng-show="isNew">
<label class="item item-input">
<span class="input-label">Asal Pemasukan</span>
<input type="text" ng-model="pengeluaran.judulpengeluaran">
</label>
<label class="item item-input">
<span class="input-label">Jumlah</span>
<input type="number" ng-model="pengeluaran.jumlah" value="0">
</label>
<div class="button-group">
<button class="button button-calm" ng-click="isNew = !isNew">Selesai</button>
<button class="item button button-positive" ng-click="newPengeluaran()">
Simpan
</button>
</div>
</div>

<div class="card" ng-click="detailHarian()">
<div class="item item-divider">
Hari Ini
</div>
<div class="item item-text-wrap">
<span ng-if="!pengeluaranharianObj.$resolved">Loading...</span>
<span ng-if="pengeluaranharianObj.$resolved">{{totalPengeluaranHariIni | currency : "Rp."}}</span>
</div>
</div>
<div class="card" ng-if="showDetailHarian">

<div class="item item-divider">
Pemasukan Hari Ini
</div>
<div class="item item-text-wrap" ng-repeat="hari in listpengeluaranhariini track by $index">
{{hari.judulpengeluaran}}
<span class="item-note">
Rp.{{hari.jumlah}}
</span>
</div>
</div>

<div class="card" ng-click="showDetailBulanan = !showDetailBulanan">
<div class="item item-divider">
Bulan Ini
</div>
<div class="item item-text-wrap">
<span ng-if="!pengeluaranbulananObj.$resolved">Loading...</span>
<span ng-if="pengeluaranbulananObj.$resolved">{{totalPengeluaranBulanIni | currency : "Rp."}}</span>
</div>
</div>
<div class="card" ng-if="showDetailBulanan">

<div class="item item-divider">
Pemasukan Bulan Ini
</div>
<div class="item item-text-wrap" ng-repeat="hari in listpengeluaranbulanini track by $index">
{{hari.judulpengeluaran}}
<span class="item-note">
Rp.{{hari.jumlah}}
</span>
</div>
</div>

<div class="card" ng-click="showDetailTahunan = !showDetailTahunan">
<div class="item item-divider">
Tahun Ini
</div>
<div class="item item-text-wrap">
<span ng-if="!pengeluarantahunanObj.$resolved">Loading...</span>
<span ng-if="pengeluarantahunanObj.$resolved">{{totalPengeluaranTahunIni | currency : "Rp."}}</span>
</div>
</div>
<div class="card" ng-if="showDetailTahunan">
<div class="item item-divider">
Pemasukan Tahun Ini
</div>
<div class="item item-text-wrap" ng-repeat="hari in listpengeluarantahunini track by $index">
{{hari.judulpengeluaran}}
<span class="item-note">
Rp.{{hari.jumlah}}
</span>
</div>
</div>

</ion-content>
</ion-view>
@@ -0,0 +1,32 @@
<ion-view view-title="Pengaturan">
<ion-content padding="true">

<h3>Kas Sekarang {{kasSekarang | currency : "Rp."}}</h3>


<div class="list">
<label class="item item-input">
<span class="input-label">Set Kas</span>
<input type="text" ng-model="kas.kassekarang">
</label>

</div>
<div>
<button class="button button-block button-balanced" ng-click="setKas(kas)">
Simpan
</button>

<button class="button button-block button-energized" ng-click="signOut()">Logout</button>
</div>


<div class="card padding">
<center>
Developed By Chalax@NashStudio<br>
Aplikasi simpel untuk melihat catatan pengeluaran dan pemasukan pribadi.<br>
Kritik dan saran yang membangun dapat anda kirimkan ke chalax77@gmail.com
</center>
</div>

</ion-content>
</ion-view>