mirror of
https://github.com/rickbarrette/redmine_qbo_calendar.git
synced 2026-10-03 20:40:43 -04:00
Only show appointments if thye exist
This commit is contained in:
1 parent
3c65700b52
commit
4c93e19c19
1 file changed
+1
-1
@@ -22,7 +22,7 @@ module RedmineQboCalendar
|
|||||||
customer = context[:customer]
|
customer = context[:customer]
|
||||||
appointments = customer.customer_appointments.where('date >= ?', Date.today).order(date: :asc)
|
appointments = customer.customer_appointments.where('date >= ?', Date.today).order(date: :asc)
|
||||||
|
|
||||||
return if appointments.nil?
|
return if appointments.empty?
|
||||||
|
|
||||||
context[:controller].send(:render_to_string, {
|
context[:controller].send(:render_to_string, {
|
||||||
partial: 'customer_appointments/list_simple', locals: { appointments: appointments }
|
partial: 'customer_appointments/list_simple', locals: { appointments: appointments }
|
||||||
|
|||||||
Reference in new issue
Block a user