censis-obrand/dev-archive/censis/obrand/obrand-admin/app/models/company.js

28 lines
667 B
JavaScript
Raw Normal View History

2016-03-29 11:15:56 +00:00
import DS from 'ember-data';
const { attr } = DS;
export default DS.Model.extend({
cid: DS.attr('string'),
company_name: DS.attr('string'),
address1: DS.attr('string'),
address2: DS.attr('string'),
address3: DS.attr('string'),
town: DS.attr('string'),
county: DS.attr('string'),
postcode: DS.attr('string'),
country: DS.attr('string'),
pcontact: DS.attr('string'),
ocontact: DS.attr('string'),
mobile: DS.attr('string'),
email: DS.attr('string'),
needCompany: function() {
console.log('NeedCompany');
if (typeof this.get('cid') !== 'undefined') {
return true;
} else {
return false;
}
}.property('cid')
});