Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial work on customers #10

Merged
merged 1 commit into from Jul 5, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -0,0 +1,7 @@
import DS from 'ember-data';

export default DS.JSONAPIAdapter.extend({
namespace: 'v1',
// host: 'https://api.artisanassistant.com'
host: 'http://localhost:8080'
});
@@ -0,0 +1,14 @@
import DS from 'ember-data';

export default DS.Model.extend({
name: DS.attr('string'),
phone: DS.attr('string'),
email: DS.attr('string'),
dateOnWaitingList: DS.attr('date'),
status: DS.attr('number'),
local: DS.attr('boolean'),
location: DS.attr('string'),
credit: DS.attr('string'),
want: DS.attr('string'),
notes: DS.attr('string'),
});
@@ -6,6 +6,7 @@ var Router = Ember.Router.extend({
});

Router.map(function() {
this.route('customers');
});

export default Router;
@@ -0,0 +1,7 @@
import Ember from 'ember';

export default Ember.Route.extend({
model: function() {
return this.store.findAll('customer');
}
});
@@ -1,3 +1,3 @@
<h2 id="title">Welcome to Ember.js</h2>
<h1>Artisan Assitant</h1>

{{outlet}}
@@ -0,0 +1,7 @@
<h2>Customers</h2>

<ul>
{{#each model as |customer|}}
<li>{{customer.email}}</li>
{{/each}}
</ul>
@@ -4,7 +4,7 @@
"ember": "1.13.2",
"ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
"ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
"ember-data": "1.13.0",
"ember-data": "^1.13.4",
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.4",
"ember-qunit": "0.3.3",
"ember-qunit-notifications": "0.0.7",
@@ -12,7 +12,15 @@ module.exports = function(environment) {
// e.g. 'with-controller': true
}
},

contentSecurityPolicy: {
'default-src': "'none'",
'script-src': "'self'",
'font-src': "'self'",
'connect-src': "'self' http://localhost:8080",
'img-src': "'self'",
'style-src': "'self'",
'media-src': "'self'"
},
APP: {
// Here you can pass flags/options to your application instance
// when it is created
@@ -39,7 +39,7 @@
"ember-cli-inject-live-reload": "^1.3.0",
"ember-cli-qunit": "0.3.13",
"ember-cli-uglify": "^1.0.1",
"ember-data": "1.0.0-beta.18",
"ember-data": "1.13.0",
"ember-disable-proxy-controllers": "^1.0.0",
"ember-export-application-global": "^1.0.2"
}
@@ -0,0 +1,12 @@
import { moduleFor, test } from 'ember-qunit';

moduleFor('adapter:application', 'Unit | Adapter | application', {
// Specify the other units that are required for this test.
// needs: ['serializer:foo']
});

// Replace this with your real tests.
test('it exists', function(assert) {
var adapter = this.subject();
assert.ok(adapter);
});
@@ -0,0 +1,12 @@
import { moduleForModel, test } from 'ember-qunit';

moduleForModel('customer', 'Unit | Model | customer', {
// 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);
});
@@ -0,0 +1,11 @@
import { moduleFor, test } from 'ember-qunit';

moduleFor('route:customers', 'Unit | Route | customers', {
// 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);
});