<% pagestart = params[:page].present? ? params[:page].to_i : 1 %> <% i = pagestart <= 1 ? 1 : ((pagestart - 1) * 10) + 1 %> <% if mydata.length>0 %> <% mydata.each do |decro| functiontype= "" functiobj = get_catering_details(decro.ch_compcode,decro.ch_entry_no) if functiobj functiontype=functiobj.chd_function datetype = functiobj.chd_date datetime = functiobj.chd_time remakrs = functiobj.chd_remarks end funcnam = "" funcobj = get_function_type_name(functiontype) if funcobj funcnam = funcobj.func_type end username= "" userobj = user_detail(decro.ch_cater_entryby) if userobj username = userobj.firstname end priority_class = case decro.ch_priority when 'Silver' 'badge-silver' when 'Gold' 'badge-gold' when 'Platinum' 'badge-platinum' else '' end %>
<%=i%> <%=decro.ch_guest_name%>
<%=decro.ch_contact_no%> <%=funcnam%>
<%=datetype%>
<%=datetime%> <%=remakrs%>
<%=decro.ch_priority%> <%if decro.ch_city.present?%><%=decro.ch_city%>, <%end%><%=decro.ch_address%> <% latest_followup = get_latest_followup(decro.id, 'C') %> <% if latest_followup.present? %> Follow-up on <%= formatted_date(latest_followup.FLLW_Next_Date) %> at <%= format_time(latest_followup.FLLW_Next_Time) %>
with remarks: <%= latest_followup.FLLW_Next_Remarks.presence || "No remarks" %>. Status: <%= latest_followup.FLLW_Status %>. <% if latest_followup.present? && latest_followup.FLLW_Next_Remarks != 'Auto-generated follow-up'%> ')"> <% end %> <% else %> No Follow-up Details. <% end %> <% i += 1 %> <% end %> <% end %>