Skip to content

Commit 0ef6bb5

Browse files
pbatchupbatchu
authored andcommitted
modifier service bills json to remove complex jodatime date
1 parent d5c4207 commit 0ef6bb5

File tree

4 files changed

+8
-95
lines changed

4 files changed

+8
-95
lines changed

billrive-client/app/js/controllers.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ billRive.controller('billController', function($scope, billService) {
33
$scope.groups = billService.getGroups();
44
$scope.payers = billService.getPayers();
55
$scope.simpleUserCostMap=[];
6-
$scope.bills= [];
6+
$scope.bills= billService.getBills();
77
// $scope.bill = billService.getBill();
88
$scope.bill =[];//= billService.getBill();
99

@@ -75,6 +75,7 @@ billRive.controller('BillAddCtrl', function($scope, billService, $location) {
7575
});
7676
billRive.controller('BillEditCtrl', function($scope, billService, $location,$routeParams) {
7777
$scope.bill = $scope.bills[$routeParams.id];
78+
console.log("in billedit ctrl");
7879
$scope.edit = function() {
7980
$scope.bills[$routeParams.id] = $scope.bill;
8081
$scope.bill = [];

billrive-client/app/js/services.js

Lines changed: 2 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -26,50 +26,7 @@ var bills = [
2626
{
2727
"id": 1,
2828
"title": "Walmart",
29-
"date": {
30-
"year": 2013,
31-
"dayOfMonth": 3,
32-
"dayOfWeek": 7,
33-
"era": 1,
34-
"dayOfYear": 34,
35-
"weekOfWeekyear": 5,
36-
"minuteOfDay": 61,
37-
"minuteOfHour": 1,
38-
"monthOfYear": 2,
39-
"millisOfSecond": 0,
40-
"yearOfCentury": 13,
41-
"secondOfDay": 3660,
42-
"centuryOfEra": 20,
43-
"millisOfDay": 3660000,
44-
"secondOfMinute": 0,
45-
"weekyear": 2013,
46-
"hourOfDay": 1,
47-
"yearOfEra": 2013,
48-
"zone": {
49-
"uncachedZone": {
50-
"fixed": false,
51-
"cachable": true,
52-
"id": "America/Denver"
53-
},
54-
"fixed": false,
55-
"id": "America/Denver"
56-
},
57-
"millis": 1359878460000,
58-
"chronology": {
59-
"zone": {
60-
"uncachedZone": {
61-
"fixed": false,
62-
"cachable": true,
63-
"id": "America/Denver"
64-
},
65-
"fixed": false,
66-
"id": "America/Denver"
67-
}
68-
},
69-
"beforeNow": true,
70-
"afterNow": false,
71-
"equalNow": false
72-
},
29+
"date":"05/01/2013",
7330
"billPayerId": 2,
7431
"notes": "Sample Notes",
7532
"billFinances": {
@@ -111,50 +68,7 @@ var bills = [
11168
{
11269
"id": 2,
11370
"title": "Costco",
114-
"date": {
115-
"year": 2014,
116-
"dayOfMonth": 3,
117-
"dayOfWeek": 1,
118-
"era": 1,
119-
"dayOfYear": 34,
120-
"weekOfWeekyear": 6,
121-
"minuteOfDay": 61,
122-
"minuteOfHour": 1,
123-
"monthOfYear": 2,
124-
"millisOfSecond": 0,
125-
"yearOfCentury": 14,
126-
"secondOfDay": 3660,
127-
"centuryOfEra": 20,
128-
"millisOfDay": 3660000,
129-
"secondOfMinute": 0,
130-
"weekyear": 2014,
131-
"hourOfDay": 1,
132-
"yearOfEra": 2014,
133-
"zone": {
134-
"uncachedZone": {
135-
"fixed": false,
136-
"cachable": true,
137-
"id": "America/Denver"
138-
},
139-
"fixed": false,
140-
"id": "America/Denver"
141-
},
142-
"millis": 1391414460000,
143-
"chronology": {
144-
"zone": {
145-
"uncachedZone": {
146-
"fixed": false,
147-
"cachable": true,
148-
"id": "America/Denver"
149-
},
150-
"fixed": false,
151-
"id": "America/Denver"
152-
}
153-
},
154-
"beforeNow": false,
155-
"afterNow": true,
156-
"equalNow": false
157-
},
71+
"date":"04/28/2013",
15872
"billPayerId": 2,
15973
"notes": "Second sample Notes",
16074
"billFinances": {

billrive-client/app/partials/bills/edit.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11

2-
<!--<a class="btn btn-success" href="#/listBills"><i class="icon-th-list icon-white"></i>&nbsp;List Bills</a>-->
3-
42
<div><h4>Edit Bill</h4></div>
53
<div class="row">
64
<div class="span12">

billrive-client/app/partials/bills/list.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="row">
44
<div class="span8 offset2">-->
55
<div><h4>Bills</h4></div>
6-
<a class="btn btn-success" href="#/bills/add" ng-click="addBill()"><i class="icon-plus-sign icon-white"></i>&nbsp;Add a Bill</a>
6+
<a class="btn btn-success" href="#/bills/add"><i class="icon-plus-sign icon-white"></i>&nbsp;Add a Bill</a>
77
<div class="input-append pull-right">
88
<input type="search" ng-model="query" class="span2" name="q" autocomplete="off" placeholder="Search" tabindex="1">
99
<button class="btn"><i class="icon-search icon-large"></i> </button>
@@ -36,9 +36,9 @@
3636
<td>{{ ibill.title }}</td>
3737
<td>${{ ibill.billFinances.billTotal }}</td>
3838
<td>
39-
<button class="btn btn-small" href="#bills/edit/{{$index}}">
40-
<i class="icon-edit"></i>&nbsp;Edit
41-
</button>
39+
40+
<a href="#/bills/delete/{{$index}}"><i class="icon-trash "></i></a>
41+
<a href="#/bills/edit/{{$index}}"><i class="icon-edit "></i></a>
4242
</td>
4343
</tr>
4444
</tbody>

0 commit comments

Comments
 (0)