Class: EmailParams::EmployeesWithoutTimesheetsEmailParams
- Inherits:
-
BaseEmailParams
show all
- Defined in:
- app/notifications/email_params/employees_without_timesheets_email_params.rb
Instance Attribute Summary
#event_notification_configuration, #recipient, #reference_event
Instance Method Summary
collapse
#from, #initialize, #template_name, #to
Instance Method Details
#company_name ⇒ Object
11
12
13
|
# File 'app/notifications/email_params/employees_without_timesheets_email_params.rb', line 11
def company_name
company.company_name_e
end
|
#days_remaining_in_payroll_period ⇒ Object
35
36
37
|
# File 'app/notifications/email_params/employees_without_timesheets_email_params.rb', line 35
def days_remaining_in_payroll_period
company.payroll_periods.find(payroll_period_id).remaining_days_count
end
|
#dear ⇒ Object
7
8
9
|
# File 'app/notifications/email_params/employees_without_timesheets_email_params.rb', line 7
def dear
recipient.user_name
end
|
#employees_url ⇒ Object
15
16
17
|
# File 'app/notifications/email_params/employees_without_timesheets_email_params.rb', line 15
def employees_url
"#{AppMode.payroll.web_uri}/app/payroll/employees"
end
|
#employees_without_timesheets ⇒ Object
23
24
25
26
27
28
29
30
31
32
33
|
# File 'app/notifications/email_params/employees_without_timesheets_email_params.rb', line 23
def employees_without_timesheets
company.employees.without_timesheets_for_period(payroll_period_id).as_json(
only: [
:employee_name,
:employee_id
],
methods: [
:url
]
)
end
|
#employees_without_timesheets_count ⇒ Object
19
20
21
|
# File 'app/notifications/email_params/employees_without_timesheets_email_params.rb', line 19
def employees_without_timesheets_count
company.employees.without_timesheets_for_period(payroll_period_id).count
end
|
39
40
41
|
# File 'app/notifications/email_params/employees_without_timesheets_email_params.rb', line 39
def formatted_event_start_date
reference_event.formatted_created_date
end
|
47
48
49
|
# File 'app/notifications/email_params/employees_without_timesheets_email_params.rb', line 47
def formatted_payroll_period_end_date
payroll_period.formatted_end_date
end
|
43
44
45
|
# File 'app/notifications/email_params/employees_without_timesheets_email_params.rb', line 43
def formatted_payroll_period_start_date
payroll_period.formatted_start_date
end
|
#subject ⇒ Object
3
4
5
|
# File 'app/notifications/email_params/employees_without_timesheets_email_params.rb', line 3
def subject
I18n.t('emails.employees_without_timesheets.subject')
end
|