Basic fullcalendar integration
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
attr = DS.attr
|
||||
App.EmployeeShift = DS.Model.extend
|
||||
start_on: attr('date')
|
||||
end_on: attr('date')
|
||||
employee: DS.belongsTo 'employee'
|
||||
calendar_event: (->
|
||||
id: @id
|
||||
title: @get('employee.name')
|
||||
start: @get('start_on')
|
||||
end: @get('end_on')
|
||||
color: @get('employee.color')
|
||||
).property('start_on', 'end_on')
|
||||
@@ -4,6 +4,8 @@ App.Employee= DS.Model.extend Ember.Validations.Mixin,
|
||||
email: attr 'string'
|
||||
manager: attr 'boolean', defaultValue: false
|
||||
active: attr 'boolean', defaultValue: true
|
||||
color: attr 'string', defaultValue: '#3a87ad'
|
||||
employee_shifts: DS.hasMany('employee-shift')
|
||||
|
||||
validations:
|
||||
name: {presence: true}
|
||||
|
||||
Reference in New Issue
Block a user