Skip to content

Commit c3c435c

Browse files
author
Prashanth Batchu
committed
added bill template json vars. Ready to implement AddBill, Edit/Delete etc.
1 parent 993e5e8 commit c3c435c

File tree

6 files changed

+85
-6
lines changed

6 files changed

+85
-6
lines changed

billrive-client/app/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
<div class="row clearfix">
9393
<div class="span8">
9494
<div class="clearfix">
95-
<div ng-view>
95+
<div class="" ng-view>
9696
</div>
9797
</div>
9898
</div>

billrive-client/app/js/controllers.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ billRive.controller('billController', function($scope, billService) {
55
$scope.friends=billService.getFriends();
66
$scope.groups=billService.getGroups();
77
$scope.payers=billService.getPayers();
8+
$scope.newBill=billService.getBill();
9+
810
// billService.getBills(function(data) {
911
// $scope.bills = data;
1012
// $scope.username ="Prashanth";

billrive-client/app/js/services.js

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,60 @@ var bills = {
167167
}
168168
]
169169
};
170+
//Bill Object Structure
171+
//var bill=[{
172+
// "id": null,
173+
// "title": "",
174+
// "date": null,
175+
// "billPayerId": null,
176+
// "notes": "Sample Notes",
177+
// "billFinances": billFinances,
178+
// "groupId": null
179+
// }];
180+
var bill=[{
181+
"id": null,
182+
"title": "",
183+
"date": null,
184+
"billPayerId": null,
185+
"notes": "Sample Notes",
186+
"billFinances": {
187+
"billPayerId": null,
188+
"billItemEntry": [
189+
{
190+
"itemDescriptionId": null,
191+
"itemDescription": "",
192+
"userIdAndLiableCost": [
193+
{userId:null,liableCost:null}
194+
]
195+
}
196+
],
197+
"billTotal": null
198+
},
199+
"groupId": null
200+
}];
201+
202+
//billFinances Object Structure
203+
var billFinances={
204+
"billPayerId": null,
205+
"billItemEntry": billItemEntry,
206+
"billTotal": null
207+
};
208+
209+
//billItemEntry Object Structure
210+
var billItemEntry=[
211+
{
212+
"itemDescriptionId": null,
213+
"itemDescription": "",
214+
"userIdAndLiableCost": userAndLiableCost
215+
}
216+
];
217+
218+
//userAndLiableCost Object Structure
219+
var userAndLiableCost=[
220+
{userId:null,liableCost:null}
221+
];
222+
223+
170224

171225
var payers= [
172226
{id:'1',name:'John Doe'},
@@ -209,6 +263,23 @@ var groups= [
209263
return groups;
210264
};
211265

266+
267+
factory.getBill=function(){
268+
return bill;
269+
};
270+
271+
factory.getBillItemEntry=function(){
272+
return billItemEntry;
273+
};
274+
275+
factory.getUserAndLiableCost=function(){
276+
return userAndLiableCost;
277+
};
278+
279+
factory.getBillFinances=function(){
280+
return billFinances;
281+
};
282+
212283

213284
return factory;
214285
});

billrive-client/app/partials/addBill.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<div class="row">
66
<div class="span12">
77
<div class="row-fluid">
8+
<form ng-submit="addBill()">
89
<div class="span4" style="padding-right:10px; border-right: 1px solid #ccc;">
910

1011
<label>Bill Total</label>
@@ -39,7 +40,7 @@
3940
<ul class="dropdown-menu">
4041
<!-- dropdown menu links -->
4142
</ul>
42-
<button class="btn btn-small"><i class="icon-book"></i>&nbsp;Simple</button><button class="btn btn-small dropdown-toggle" data-toggle="dropdown">
43+
<button class="btn btn-small"><i class="icon-book"></i>&nbsp;simple</button><button class="btn btn-small dropdown-toggle" data-toggle="dropdown">
4344
<span class="caret"></span>
4445
</button>
4546
<ul class="dropdown-menu">
@@ -48,13 +49,18 @@
4849
<li class="divider"></li>
4950
<li><a href="#">Custom</a></li>
5051
</ul>
51-
<button class="btn btn-small"><i class="icon-list-alt"></i>&nbsp;Advanced</button>
52+
<button class="btn btn-small"><i class="icon-list-alt"></i>&nbsp;advanced</button>
53+
5254
</div>
5355

5456
<div class="" ng-include="'partials/addBill/simple.html'" id="editModal"></div>
55-
57+
<div class="span4">
58+
<input class=" btn btn-primary pull-right pagination-centered" type="submit" value="add bill">
59+
</div>
5660
</div>
61+
</form>
5762
</div>
5863
</div>
5964
</div>
65+
{{newBill}}
6066

billrive-client/app/partials/addBill/simple.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
Total
3030
</div>
3131
<div class="span3">
32-
$<input type="text" class="span6" placeholder="5.00" />
32+
<input type="text" class="span6" placeholder="5.00" />
3333
</div>
3434
</div>
3535
</li></ul>

billrive-client/app/partials/listBills.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@
4747
</div>
4848
</div>-->
4949
<!--<div class="modal hide fade" ng-include="'partials/addBill.html'" id="editModal"></div>-->
50-
<!--{{bills[0].data[0]}}-->
50+
<!--{{bills.data}}-->

0 commit comments

Comments
 (0)