tbody id="service-container-#{service.id}" class="#{:hide if params[:type]=='week'}" data-date=(service.check_in_time.to_date) tr.service td span input.checkbox-custom id="service-checkbox-#{service.tradesmen_trip_id}-#{service&.id}" name='checkbox-1' type='checkbox' value="#{service.id}" label.checkbox-custom-label for="service-checkbox-#{service.tradesmen_trip_id}-#{service&.id}" td - if service.service_exception - service.service_exception.exception_reasons.each do |exception_reason| strong.grey.fs12 = exception_reason.titleize br p.type-details = "Agrreement: #{service&.agreement_contract&.id}" p.type-details = link_to details_company_work_order_path(service.work_order) do = "WO: #{service&.work_order&.id}" p.type-details = "Trip: #{service&.trip&.position}" td - unless service.no_schedule strong = service.round_scheduled_start_time.try(:in_time_zone).try(:strftime, '%I:%M %P') p.m2 = service.round_scheduled_start_time.try(:in_time_zone).try(:strftime, '%m/%d/%Y') strong = service.round_scheduled_end_time.try(:in_time_zone).try(:strftime, '%I:%M %P') p.m2 = service.round_scheduled_end_time.try(:in_time_zone).try(:strftime, '%m/%d/%Y') td span.check_in_time - if service.not_checkin_exception? | (Tradesmen Never Arrived) - else strong = service.effective_check_in_time.try(:in_time_zone).try(:strftime, '%I:%M %P') p.m2 = service.effective_check_in_time.try(:in_time_zone).try(:strftime, '%m/%d/%Y') strong = service.effective_check_out_time.try(:in_time_zone).try(:strftime, '%I:%M %P') p.m2 = service.effective_check_out_time.try(:in_time_zone).try(:strftime, '%m/%d/%Y') td.duration_in_words - if service.vendor.is_equipment_sp? - if service.duration? = distance_of_time_in_words(service.duration) - else p.bold.m2 = "Total: #{ round_duration(service.duration) }" p.m2 strong Work: span.ml5 = "#{round_duration(service.effective_duration)}" p.m2 strong Meal: span.ml5 = "#{round_duration(service.effective_meal_time_in_seconds)}" p.m2 strong Paid: span.ml5 = "#{round_duration(service.effective_duration)}" td - if service.recent_adjustment = service.recent_adjustment.adjusted_by&.full_name br/ ="date: #{service.recent_adjustment.created_at.try(:strftime, '%m/%d/%Y')}" td = service.recent_adjustment&.reason td class="pay_roll_status_#{service.id}" = review_service_url(service) td - if loyalty(service, 'company/service_exceptions').edit? - if service.service_exception.present? - if service.service_exception.approved? = link_to 'Approved', '#', class: 'btn no-action review-btn' - else = link_to 'Approve', approve_company_service_exception_path(service.service_exception.id), turboboost: true, class: 'btn review-btn approve_btn' br/ = link_to 'Adjust', new_company_work_order_service_service_adjustment_path(service, logbook: true), turboboost: true, class: "btn review-btn mt10", data: {id: service.id} br/ = link_to 'View Service', company_work_order_service_path(service), class: 'services-link mt10', data: {toggle: :emodal, size: :xl, title: 'Service'} td = link_to company_work_order_service_service_adjustments_path(service), turboboost: true do = fa_icon('ellipsis-v') br/ .mt20 - if loyalty(service, 'company/work_order_services').lock_unlock? = link_to lock_unlock_company_work_order_service_path(service), data: {confirm: "Are you sure to #{service.lock? ? 'unlock' : 'lock'} the service?"}, remote: true, class: "service-lock-link-#{service.id}" do span.unlocked class="#{'hide' if service.lock?}" = fa_icon('unlock') span.locked class="#{'hide' unless service.lock?}"= fa_icon('lock') tr id="service-review-container-#{service.id}"