This repository has been archived by the owner on Oct 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
start work on billing, batch payments in particular
- Loading branch information
Showing
25 changed files
with
325 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import DS from 'ember-data'; | ||
|
||
export default DS.Model.extend({ | ||
paymentMethod: DS.attr('string'), | ||
status: DS.attr('string'), | ||
amountFailed: DS.attr('number'), | ||
amountProcessed: DS.attr('number'), | ||
failCount: DS.attr('number'), | ||
successCount: DS.attr('number'), | ||
createdOn: DS.attr('date'), | ||
processedOn: DS.attr('date'), | ||
|
||
createdBy: DS.belongsTo('user', { async: true }), | ||
payments: DS.hasMany('request', { | ||
async: false | ||
}) | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import Ember from 'ember'; | ||
|
||
export default Ember.Controller.extend({ | ||
breadCrumb: 'New Batch' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import Ember from 'ember'; | ||
|
||
export default Ember.Route.extend({ | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h1>Add Batch</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import Ember from 'ember'; | ||
|
||
export default Ember.Controller.extend({ | ||
breadCrumb: 'Batch Info' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import Ember from 'ember'; | ||
|
||
export default Ember.Route.extend({ | ||
model: function (params) { | ||
return this.store.find('payment-batch', {id: params.payment_batch_id, with: 'all'}); | ||
}, | ||
|
||
setupController(controller, resolved) { | ||
var model = resolved.get('firstObject'); | ||
this._super(controller, model); | ||
} | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<h1>Show Batch</h1> | ||
<div class="row"> | ||
<div class="col-md-5"> | ||
<!-- Default box --> | ||
<div class="box box-primary"> | ||
<div class="box-header"> | ||
<h3 class="box-title"></h3> | ||
|
||
<div class="box-tools"> | ||
<div class="btn-group pull-right"> | ||
<button class="btn btn-default btn-sm">{{fa-icon "trash"}} Delete</button> | ||
<button class="btn btn-default btn-sm">{{fa-icon "trash"}} Print?</button> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="box-body"> | ||
<dl class="dl-horizontal"> | ||
<dt>Created By</dt> | ||
<dd>{{model.createdBy.firstName}} {{model.createdBy.lastName}}</dd> | ||
<dt>Processed On</dt> | ||
<dd>{{moment model.processedOn 'MM-DD-YYYY'}}</dd> | ||
<dt>Status</dt> | ||
<dd>{{model.status}}</dd> | ||
<dt>Payment Method</dt> | ||
<dd>{{model.paymentMethod}}</dd> | ||
<dt>Amount Processed</dt> | ||
<dd> | ||
<span class="pull-left badge bg-green" | ||
style="margin-left: 5px;">{{format-money model.amountProcessed}}</span> | ||
<span class="pull-right badge bg-red" | ||
style="margin-right: 10px;">{{format-money model.amountFailed}}</span> | ||
</dd> | ||
<dt>Transactions Processed</dt> | ||
<dd> | ||
<span class="pull-left badge bg-green" style="margin-left: 5px;">{{model.successCount}}</span> | ||
<span class="pull-right badge bg-red" style="margin-right: 10px;">{{model.failCount}}</span> | ||
</dd> | ||
</dl> | ||
</div> | ||
<div class="box-footer"></div> | ||
</div> | ||
<!-- /.box --> | ||
</div> | ||
|
||
|
||
<div class="col-md-7"> | ||
<div class="box box-success box-solid"> | ||
<div class="box-header with-border"> | ||
<h3 class="box-title">Removable</h3> | ||
|
||
<div class="box-tools pull-right"> | ||
<button type="button" class="btn btn-box-tool"> | ||
{{fa-icon "plus"}} | ||
</button> | ||
</div> | ||
<!-- /.box-tools --> | ||
</div> | ||
<!-- /.box-header --> | ||
<div class="box-body"> | ||
The body of the box | ||
</div> | ||
<!-- /.box-body --> | ||
</div> | ||
</div> | ||
|
||
<div class="col-md-7"> | ||
<div class="box box-success box-solid"> | ||
<div class="box-header with-border"> | ||
<h3 class="box-title">Removable</h3> | ||
|
||
<div class="box-tools pull-right"> | ||
<button type="button" class="btn btn-box-tool"> | ||
{{fa-icon "plus"}} | ||
</button> | ||
</div> | ||
<!-- /.box-tools --> | ||
</div> | ||
<!-- /.box-header --> | ||
<div class="box-body"> | ||
The body of the box | ||
</div> | ||
<!-- /.box-body --> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import Ember from 'ember'; | ||
|
||
export default Ember.Controller.extend({ | ||
breadCrumb: 'Billing Dashboard', | ||
breadCrumbPath: 'billing.dash' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import Ember from 'ember'; | ||
|
||
export default Ember.Controller.extend({ | ||
breadCrumb: "Billing Dashboard" | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Ember from 'ember'; | ||
|
||
export default Ember.Route.extend({ | ||
model: function (params) { | ||
return this.store.findAll('payment-batch'); | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<div class="row"> | ||
<div class="col-md-4"> | ||
<div class="box box-widget widget-user-2"> | ||
<!-- Add the bg color to the header using any of the bg-* classes --> | ||
<div class="widget-user-header bg-yellow"> | ||
<h3 class="widget-user-username">Batch Billing | ||
{{#link-to 'billing.batch.add' class="btn btn-default btn-sm pull-right"}}Add{{/link-to}} | ||
</h3> | ||
<h5 class="widget-user-desc">Bill multiple accounts based on common rules</h5> | ||
</div> | ||
<div class="box-footer no-padding"> | ||
<ul class="nav nav-stacked"> | ||
{{#each model as |record| }} | ||
<li> | ||
{{#link-to 'billing.batch.info' record.id}} | ||
{{record.status}} - {{moment record.processedOn 'MM-DD-YYYY'}} | ||
<span class="pull-right badge bg-green">{{format-money record.amountProcessed}}</span> | ||
<span class="pull-right badge bg-red" | ||
style="margin-right: 5px;;">{{format-money record.amountFailed}}</span> | ||
{{/link-to}} | ||
</li> | ||
{{/each}} | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-md-4"> | ||
<h3>Invoices</h3> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import Ember from 'ember'; | ||
|
||
export default Ember.Route.extend({ | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<div class="wrapper"> | ||
{{partial "navigation/setup-header"}} | ||
{{partial "navigation/main-sidebar"}} | ||
<!-- Content Wrapper. Contains page content --> | ||
<div class="content-wrapper" style="min-height: 1068px;"> | ||
<!-- Content Header (Page header) --> | ||
<section class="content-header"> | ||
<h1> | ||
Billing & Payments | ||
</h1> | ||
{{partial "navigation/main-breadcrumb"}} | ||
</section> | ||
<!-- Main content --> | ||
<section class="content"> | ||
{{outlet}} | ||
</section> | ||
<!-- /.content --> | ||
</div> | ||
<!-- /.content-wrapper --> | ||
{{partial "navigation/main-footer"}} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { moduleForModel, test } from 'ember-qunit'; | ||
|
||
moduleForModel('payment-batch', 'Unit | Model | payment batch', { | ||
// Specify the other units that are required for this test. | ||
needs: [] | ||
}); | ||
|
||
test('it exists', function(assert) { | ||
var model = this.subject(); | ||
// var store = this.store(); | ||
assert.ok(!!model); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { moduleFor, test } from 'ember-qunit'; | ||
|
||
moduleFor('controller:billing/batch/add', { | ||
// Specify the other units that are required for this test. | ||
// needs: ['controller:foo'] | ||
}); | ||
|
||
// Replace this with your real tests. | ||
test('it exists', function(assert) { | ||
var controller = this.subject(); | ||
assert.ok(controller); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { moduleFor, test } from 'ember-qunit'; | ||
|
||
moduleFor('route:billing/batch/add', 'Unit | Route | billing/batch/add', { | ||
// Specify the other units that are required for this test. | ||
// needs: ['controller:foo'] | ||
}); | ||
|
||
test('it exists', function(assert) { | ||
var route = this.subject(); | ||
assert.ok(route); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { moduleFor, test } from 'ember-qunit'; | ||
|
||
moduleFor('controller:billing/batch/info', { | ||
// Specify the other units that are required for this test. | ||
// needs: ['controller:foo'] | ||
}); | ||
|
||
// Replace this with your real tests. | ||
test('it exists', function(assert) { | ||
var controller = this.subject(); | ||
assert.ok(controller); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { moduleFor, test } from 'ember-qunit'; | ||
|
||
moduleFor('route:billing/batch/info', 'Unit | Route | billing/batch/info', { | ||
// Specify the other units that are required for this test. | ||
// needs: ['controller:foo'] | ||
}); | ||
|
||
test('it exists', function(assert) { | ||
var route = this.subject(); | ||
assert.ok(route); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { moduleFor, test } from 'ember-qunit'; | ||
|
||
moduleFor('controller:billing', { | ||
// Specify the other units that are required for this test. | ||
// needs: ['controller:foo'] | ||
}); | ||
|
||
// Replace this with your real tests. | ||
test('it exists', function(assert) { | ||
var controller = this.subject(); | ||
assert.ok(controller); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { moduleFor, test } from 'ember-qunit'; | ||
|
||
moduleFor('controller:billing/dash', { | ||
// Specify the other units that are required for this test. | ||
// needs: ['controller:foo'] | ||
}); | ||
|
||
// Replace this with your real tests. | ||
test('it exists', function(assert) { | ||
var controller = this.subject(); | ||
assert.ok(controller); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { moduleFor, test } from 'ember-qunit'; | ||
|
||
moduleFor('route:billing/dash', 'Unit | Route | billing/dash', { | ||
// Specify the other units that are required for this test. | ||
// needs: ['controller:foo'] | ||
}); | ||
|
||
test('it exists', function(assert) { | ||
var route = this.subject(); | ||
assert.ok(route); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { moduleFor, test } from 'ember-qunit'; | ||
|
||
moduleFor('route:billing', 'Unit | Route | billing', { | ||
// Specify the other units that are required for this test. | ||
// needs: ['controller:foo'] | ||
}); | ||
|
||
test('it exists', function(assert) { | ||
var route = this.subject(); | ||
assert.ok(route); | ||
}); |