diff --git a/app/components/add-reimbursement/template.hbs b/app/components/add-reimbursement/template.hbs new file mode 100644 index 0000000..fb5c4b1 --- /dev/null +++ b/app/components/add-reimbursement/template.hbs @@ -0,0 +1 @@ +{{yield}} \ No newline at end of file diff --git a/app/router.js b/app/router.js index 52d8cf8..b0941de 100644 --- a/app/router.js +++ b/app/router.js @@ -31,5 +31,11 @@ Router.map(function() { }); this.route('budget', function() { this.route('expenses'); + + this.route('reimbursements', function() {}); + }); + + this.route('reimbursements', function() { + this.route('new'); }); }); diff --git a/app/routes/reimbursements/new.js b/app/routes/reimbursements/new.js new file mode 100644 index 0000000..0e3509d --- /dev/null +++ b/app/routes/reimbursements/new.js @@ -0,0 +1,9 @@ +import Route from '@ember/routing/route'; + +export default class ReimbursementsNewRoute extends Route { + + model (params) { + return { params }; + } + +} diff --git a/app/styles/components/_reimbursement-list.scss b/app/styles/components/_reimbursement-list.scss index e7b0167..c5f6458 100644 --- a/app/styles/components/_reimbursement-list.scss +++ b/app/styles/components/_reimbursement-list.scss @@ -3,7 +3,7 @@ ul.reimbursement-list { li { display: grid; - grid-template-columns: auto auto; + grid-template-columns: auto 10rem; grid-row-gap: 0.5rem; padding-top: 1.6rem; diff --git a/app/templates/budget.hbs b/app/templates/budget.hbs index 20d4546..066cd82 100644 --- a/app/templates/budget.hbs +++ b/app/templates/budget.hbs @@ -50,8 +50,11 @@
{{#if this.reimbursementsUnconfirmed}}
-
+

Proposed Reimbursements

+
@@ -61,8 +64,11 @@ {{#if this.reimbursementsConfirmed}}
-
+

Confirmed Expenses

+
diff --git a/app/templates/reimbursements/new.hbs b/app/templates/reimbursements/new.hbs new file mode 100644 index 0000000..1596085 --- /dev/null +++ b/app/templates/reimbursements/new.hbs @@ -0,0 +1,13 @@ +
+ +
+
+

Submit a reimbursement

+
+ +
+ +
+
+ +
\ No newline at end of file diff --git a/tests/integration/components/add-reimbursement/component-test.js b/tests/integration/components/add-reimbursement/component-test.js new file mode 100644 index 0000000..da9bed2 --- /dev/null +++ b/tests/integration/components/add-reimbursement/component-test.js @@ -0,0 +1,26 @@ +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; +import { render } from '@ember/test-helpers'; +import { hbs } from 'ember-cli-htmlbars'; + +module('Integration | Component | add-reimbursement', function(hooks) { + setupRenderingTest(hooks); + + test('it renders', async function(assert) { + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.set('myAction', function(val) { ... }); + + await render(hbs``); + + assert.equal(this.element.textContent.trim(), ''); + + // Template block usage: + await render(hbs` + + template block text + + `); + + assert.equal(this.element.textContent.trim(), 'template block text'); + }); +}); diff --git a/tests/unit/routes/reimbursements/new-test.js b/tests/unit/routes/reimbursements/new-test.js new file mode 100644 index 0000000..e98d799 --- /dev/null +++ b/tests/unit/routes/reimbursements/new-test.js @@ -0,0 +1,11 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module('Unit | Route | reimbursements/new', function(hooks) { + setupTest(hooks); + + test('it exists', function(assert) { + let route = this.owner.lookup('route:reimbursements/new'); + assert.ok(route); + }); +});