class Responses::UserTimeSummary

Included Modules

Defined in:

responses/user_time_summary.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(user : User, entries : Array(Entry), work_days : Int32, default_work_hours_per_day : Float64, show_extra = false, is_admin = false) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def admin : Responses::Admin #

[View source]
def email : String #

[View source]
def extra : Responses::Extra #

[View source]
def first_name : String #

[View source]
def full_name : String #

[View source]
def hours : Float64 #

Hours registered.


[View source]
def hours_goal : Float64 #

Work hour goal for user.


[View source]
def hours_registered : Float64 #

Hours registered, rounded to two decimals.


[View source]
def id : Int64 #

[View source]
def last_name : String #

[View source]
def process_entry(entry : Entry) #

[View source]
def round #

Round off numbers for display.

to_json shows the numbers with maximum precision, which includes floating point rounding errors. The old PHP version used two decimals, as it rounds per default. So stick to the legacy behaviour.


[View source]
def rounded_hours : Float64 #

Hours registered, rounded to 15 minutes, as used in billing.


[View source]
def rounded_hours_registered : Float64 #

Hours rounded to 15 minutes, as used in billing.


[View source]
def working_hours_per_day : Float64 #

[View source]