Basic fullcalendar integration
This commit is contained in:
@@ -3,7 +3,8 @@ class Employee
|
||||
include ActiveModel::SerializerSupport
|
||||
DEFAULT_SETTINGS = {
|
||||
'manager' => false,
|
||||
'active' => true
|
||||
'active' => true,
|
||||
'color' => '#3a87ad'
|
||||
}
|
||||
attr_accessor *DEFAULT_SETTINGS.keys
|
||||
attr_reader :settings
|
||||
@@ -15,6 +16,7 @@ class Employee
|
||||
property :name
|
||||
#property :email
|
||||
|
||||
has_many :employee_shifts
|
||||
view :by_email, key: :email
|
||||
|
||||
class << self
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
class EmployeeShift
|
||||
include SimplyStored::Couch
|
||||
include ActiveModel::SerializerSupport
|
||||
|
||||
property :start_on, type: Time
|
||||
property :end_on, type: Time
|
||||
belongs_to :supplier
|
||||
belongs_to :employee
|
||||
end
|
||||
@@ -41,6 +41,7 @@ class Supplier
|
||||
has_many :orders, dependent: :destroy
|
||||
has_many :sections, dependent: :destroy
|
||||
has_and_belongs_to_many :employees, storing_keys: true
|
||||
has_many :employee_shifts
|
||||
|
||||
alias_method :non_enriced_employees, :employees
|
||||
def employees
|
||||
|
||||
Reference in New Issue
Block a user