Skip to content

Commit

Permalink
feat: integrate complex form fields in speaker, sessions, attendee (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavk96 authored Sep 4, 2019
1 parent f58911e commit 6c3cc66
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 37 deletions.
53 changes: 27 additions & 26 deletions app/models/attendee.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,33 @@ export default ModelBase.extend({
/**
* Attributes
*/
city : attr('string'),
firstname : attr('string'),
lastname : attr('string'),
isCheckedIn : attr('boolean', { defaultValue: false }),
checkinTimes : attr('string'),
state : attr('string'),
address : attr('string'),
pdfUrl : attr('string'),
country : attr('string'),
email : attr('string'),
jobTitle : attr('string'),
phone : attr('string'),
company : attr('string'),
taxBusinessInfo : attr('string'),
billingAddress : attr('string'),
homeAddress : attr('string'),
shippingAddress : attr('string'),
workAddress : attr('string'),
workPhone : attr('string'),
website : attr('string'),
blog : attr('string'),
twitter : attr('string'),
facebook : attr('string'),
github : attr('string'),
gender : attr('string'),
birthDate : attr('moment'),
city : attr('string'),
firstname : attr('string'),
lastname : attr('string'),
isCheckedIn : attr('boolean', { defaultValue: false }),
checkinTimes : attr('string'),
state : attr('string'),
address : attr('string'),
pdfUrl : attr('string'),
country : attr('string'),
email : attr('string'),
jobTitle : attr('string'),
phone : attr('string'),
company : attr('string'),
taxBusinessInfo : attr('string'),
billingAddress : attr('string'),
homeAddress : attr('string'),
shippingAddress : attr('string'),
workAddress : attr('string'),
workPhone : attr('string'),
website : attr('string'),
blog : attr('string'),
twitter : attr('string'),
facebook : attr('string'),
github : attr('string'),
gender : attr('string'),
birthDate : attr('moment'),
complexFieldValues : attr(),

/**
* Relationships
Expand Down
23 changes: 12 additions & 11 deletions app/models/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,18 @@ export default ModelBase.extend({
isLocked : attr('boolean', { defaultValue: false }),
isMailSent : attr('boolean', { defaultValue: false }),

createdAt : attr('string'),
deletedAt : attr('string'),
submittedAt : attr('moment', { defaultValue: () => moment.tz(detectedTimezone) }),
lastModifiedAt : attr('string'),
sessionType : belongsTo('session-type'),
microlocation : belongsTo('microlocation'),
track : belongsTo('track'),
speakers : hasMany('speaker'),
feedbacks : hasMany('feedback'),
event : belongsTo('event'), // temporary
creator : belongsTo('user'),
createdAt : attr('string'),
deletedAt : attr('string'),
submittedAt : attr('moment', { defaultValue: () => moment.tz(detectedTimezone) }),
lastModifiedAt : attr('string'),
complexFieldValues : attr(),
sessionType : belongsTo('session-type'),
microlocation : belongsTo('microlocation'),
track : belongsTo('track'),
speakers : hasMany('speaker'),
feedbacks : hasMany('feedback'),
event : belongsTo('event'), // temporary
creator : belongsTo('user'),

status: computed('state', 'deletedAt', function() {
if (this.deletedAt !== null) {
Expand Down
2 changes: 2 additions & 0 deletions app/models/speaker.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ export default ModelBase.extend({
city : attr('string'),
gender : attr('string'),
heardFrom : attr('string'),
complexFieldValues : attr(),

segmentedLinkWebsite : computedSegmentedLink.bind(this)('website'),
segmentedLinkTwitter : computedSegmentedLink.bind(this)('twitter'),
segmentedLinkGithub : computedSegmentedLink.bind(this)('github'),
segmentedLinkFacebook : computedSegmentedLink.bind(this)('facebook'),
segmentedLinkLinkedIn : computedSegmentedLink.bind(this)('linkedin'),

/**
* Relationships
*/
Expand Down

0 comments on commit 6c3cc66

Please sign in to comment.